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
|
---|---|---|---|---|---|
test/test_children_tree.py | kisliakovsky/structures | 0 | 30329 | <filename>test/test_children_tree.py
from unittest import TestCase
from src.tree import ChildrenTree
class TestChildrenTree(TestCase):
def test_height(self):
tree = ChildrenTree(1, [[], [3, 4], [], [], [0, 2]])
self.assertEqual(3, tree.height())
| [
1,
529,
9507,
29958,
1688,
29914,
1688,
29918,
11991,
29918,
8336,
29889,
2272,
13,
3166,
443,
27958,
1053,
4321,
8259,
13,
13,
3166,
4765,
29889,
8336,
1053,
20986,
9643,
13,
13,
13,
1990,
4321,
19334,
9643,
29898,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
3545,
29898,
1311,
1125,
13,
4706,
5447,
353,
20986,
9643,
29898,
29896,
29892,
5519,
1402,
518,
29941,
29892,
29871,
29946,
1402,
19997,
19997,
518,
29900,
29892,
29871,
29906,
24960,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29941,
29892,
5447,
29889,
3545,
3101,
13,
2
] |
api/tests/integration/tests/layout/threads.py | f1nzer/Indigo | 0 | 107132 | <reponame>f1nzer/Indigo
import sys
from threading import Thread
sys.path.append("../../common")
from env_indigo import *
class testThread(Thread):
def __init__(self, id, smiles):
Thread.__init__(self)
self.id = id
self.smiles = smiles
def run(self):
indigo_1 = Indigo()
indigo_2 = Indigo()
indigo_1.setOption("molfile-saving-skip-date", "1")
indigo_2.setOption("molfile-saving-skip-date", "0")
m1 = indigo_1.loadMolecule(self.smiles)
m2 = indigo_2.loadMolecule(self.smiles)
m1.layout()
m2.layout()
c1 = str(m1.molfile()).splitlines()
c2 = str(m2.molfile()).splitlines()
header_1 = "\n".join(c1[:3])
body_1 = "\n".join(c1[3:])
header_2 = "\n".join(c2[:3])
body_2 = "\n".join(c2[3:])
# Check that two instances of Indigo even in one thread have different options - headers should differ
assert header_1 != header_2
# Bodies should be equal
assert body_1 == body_2
threads = []
indigo = Indigo()
for i, smi in enumerate(
indigo.iterateSmilesFile(
joinPathPy(
"../../../../../data/molecules/basic/pubchem_slice_5000.smi",
__file__,
)
)
):
current = testThread(i, smi.rawData())
threads.append(current)
current.start()
for thread in threads:
thread.join()
| [
1,
529,
276,
1112,
420,
29958,
29888,
29896,
29876,
3298,
29914,
2568,
5973,
13,
5215,
10876,
13,
3166,
3244,
292,
1053,
10480,
13,
13,
9675,
29889,
2084,
29889,
4397,
703,
21546,
9435,
1159,
13,
3166,
8829,
29918,
513,
5973,
1053,
334,
13,
13,
13,
1990,
1243,
4899,
29898,
4899,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1178,
29892,
1560,
5475,
1125,
13,
4706,
10480,
17255,
2344,
12035,
1311,
29897,
13,
4706,
1583,
29889,
333,
353,
1178,
13,
4706,
1583,
29889,
3844,
5475,
353,
1560,
5475,
13,
13,
1678,
822,
1065,
29898,
1311,
1125,
13,
4706,
1399,
5973,
29918,
29896,
353,
1894,
5973,
580,
13,
4706,
1399,
5973,
29918,
29906,
353,
1894,
5973,
580,
13,
4706,
1399,
5973,
29918,
29896,
29889,
842,
8375,
703,
29885,
324,
1445,
29899,
29879,
5555,
29899,
11014,
29899,
1256,
613,
376,
29896,
1159,
13,
4706,
1399,
5973,
29918,
29906,
29889,
842,
8375,
703,
29885,
324,
1445,
29899,
29879,
5555,
29899,
11014,
29899,
1256,
613,
376,
29900,
1159,
13,
13,
4706,
286,
29896,
353,
1399,
5973,
29918,
29896,
29889,
1359,
29924,
1772,
29883,
1297,
29898,
1311,
29889,
3844,
5475,
29897,
13,
4706,
286,
29906,
353,
1399,
5973,
29918,
29906,
29889,
1359,
29924,
1772,
29883,
1297,
29898,
1311,
29889,
3844,
5475,
29897,
13,
4706,
286,
29896,
29889,
2680,
580,
13,
4706,
286,
29906,
29889,
2680,
580,
13,
13,
4706,
274,
29896,
353,
851,
29898,
29885,
29896,
29889,
29885,
324,
1445,
16655,
5451,
9012,
580,
13,
4706,
274,
29906,
353,
851,
29898,
29885,
29906,
29889,
29885,
324,
1445,
16655,
5451,
9012,
580,
13,
13,
4706,
4839,
29918,
29896,
353,
6634,
29876,
1642,
7122,
29898,
29883,
29896,
7503,
29941,
2314,
13,
4706,
3573,
29918,
29896,
353,
6634,
29876,
1642,
7122,
29898,
29883,
29896,
29961,
29941,
29901,
2314,
13,
4706,
4839,
29918,
29906,
353,
6634,
29876,
1642,
7122,
29898,
29883,
29906,
7503,
29941,
2314,
13,
4706,
3573,
29918,
29906,
353,
6634,
29876,
1642,
7122,
29898,
29883,
29906,
29961,
29941,
29901,
2314,
13,
4706,
396,
5399,
393,
1023,
8871,
310,
1894,
5973,
1584,
297,
697,
3244,
505,
1422,
3987,
448,
9066,
881,
1163,
13,
4706,
4974,
4839,
29918,
29896,
2804,
4839,
29918,
29906,
13,
4706,
396,
19929,
583,
881,
367,
5186,
13,
4706,
4974,
3573,
29918,
29896,
1275,
3573,
29918,
29906,
13,
13,
13,
28993,
353,
5159,
13,
513,
5973,
353,
1894,
5973,
580,
13,
1454,
474,
29892,
1560,
29875,
297,
26985,
29898,
13,
1678,
1399,
5973,
29889,
1524,
403,
12636,
5475,
2283,
29898,
13,
4706,
5988,
2605,
19737,
29898,
13,
9651,
376,
21546,
21546,
6995,
1272,
29914,
29885,
1772,
21337,
29914,
16121,
29914,
5467,
14969,
29918,
18337,
29918,
29945,
29900,
29900,
29900,
29889,
29879,
2460,
613,
13,
9651,
4770,
1445,
1649,
29892,
13,
4706,
1723,
13,
1678,
1723,
13,
1125,
13,
1678,
1857,
353,
1243,
4899,
29898,
29875,
29892,
1560,
29875,
29889,
1610,
1469,
3101,
13,
1678,
9717,
29889,
4397,
29898,
3784,
29897,
13,
1678,
1857,
29889,
2962,
580,
13,
1454,
3244,
297,
9717,
29901,
13,
1678,
3244,
29889,
7122,
580,
13,
2
] |
sphinxcontrib/collections/drivers/copy_file.py | useblocks/sphinx-collections | 4 | 30588 | import os
from shutil import copyfile
from sphinxcontrib.collections.drivers import Driver
class CopyFileDriver(Driver):
def run(self):
self.info('Copy file...')
if not os.path.exists(self.config['source']):
self.error('Source {} does not exist'.format(self.config['source']))
return
try:
copyfile(self.config['source'],
self.config['target'])
except IOError as e:
self.error('Problems during copying file.', e)
def clean(self):
try:
os.remove(self.config['target'])
self.info('File deleted: {}'.format(self.config['target']))
except FileNotFoundError:
pass # Already cleaned? I'm okay with it.
except IOError as e:
self.error('Problems during cleaning for collection {}'.format(self.config['name']), e)
| [
1,
1053,
2897,
13,
13,
3166,
528,
4422,
1053,
3509,
1445,
13,
13,
3166,
269,
561,
14668,
21570,
29889,
29027,
29889,
24477,
874,
1053,
26391,
13,
13,
13,
1990,
14187,
2283,
12376,
29898,
12376,
1125,
13,
13,
1678,
822,
1065,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3888,
877,
11882,
934,
856,
1495,
13,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1311,
29889,
2917,
1839,
4993,
2033,
1125,
13,
9651,
1583,
29889,
2704,
877,
4435,
6571,
947,
451,
1863,
4286,
4830,
29898,
1311,
29889,
2917,
1839,
4993,
25901,
13,
9651,
736,
13,
13,
4706,
1018,
29901,
13,
9651,
3509,
1445,
29898,
1311,
29889,
2917,
1839,
4993,
7464,
13,
462,
268,
1583,
29889,
2917,
1839,
5182,
11287,
13,
4706,
5174,
10663,
2392,
408,
321,
29901,
13,
9651,
1583,
29889,
2704,
877,
26604,
29879,
2645,
17596,
934,
29889,
742,
321,
29897,
13,
13,
1678,
822,
5941,
29898,
1311,
1125,
13,
4706,
1018,
29901,
13,
9651,
2897,
29889,
5992,
29898,
1311,
29889,
2917,
1839,
5182,
11287,
13,
9651,
1583,
29889,
3888,
877,
2283,
11132,
29901,
6571,
4286,
4830,
29898,
1311,
29889,
2917,
1839,
5182,
25901,
13,
4706,
5174,
3497,
17413,
2392,
29901,
13,
9651,
1209,
29871,
396,
838,
2040,
5941,
287,
29973,
306,
29915,
29885,
20759,
411,
372,
29889,
13,
4706,
5174,
10663,
2392,
408,
321,
29901,
13,
9651,
1583,
29889,
2704,
877,
26604,
29879,
2645,
5941,
292,
363,
4333,
6571,
4286,
4830,
29898,
1311,
29889,
2917,
1839,
978,
2033,
511,
321,
29897,
13,
13,
2
] |
notebooks/utils.py | wranda12/06-machine-learning | 1 | 36750 | <gh_stars>1-10
#
# Some functions to be used in the tutorial
#
# Developed by <NAME>
import datetime
import pandas as pd
import matplotlib.pyplot as plt # for 2D plotting
import numpy as np
import seaborn as sns # plot nicely =)
from sklearn.base import clone
from sklearn.decomposition import PCA
from sklearn.model_selection import learning_curve
def plot_decision_boundary(x_train, y_train, estimator):
"""Plot the decision boundary
based on: http://scikit-learn.org/stable/auto_examples/semi_supervised/plot_label_propagation_versus_svm_iris.html
Parameters
----------
x_train: training set
y_train: labels of the training set
estimator: classifier, probability must be set as True
"""
def make_meshgrid(x, y, h=.02):
"""Create a mesh of points to plot in
Parameters
----------
x: data to base x-axis meshgrid on
y: data to base y-axis meshgrid on
h: stepsize for meshgrid, optional
Returns
-------
xx, yy : ndarray
"""
x_min, x_max = x.min() - 1, x.max() + 1
y_min, y_max = y.min() - 1, y.max() + 1
xx, yy = np.meshgrid(np.arange(x_min, x_max, h),
np.arange(y_min, y_max, h))
return xx, yy
# cloning the estimator
clf = clone(estimator)
pca = PCA(n_components=2)
x_train_pca = pca.fit_transform(x_train)
clf.fit(x_train_pca, y_train)
xx, yy = make_meshgrid(x_train_pca[:, 0], x_train_pca[:, 1])
grid = np.c_[xx.ravel(), yy.ravel()]
probs = clf.predict_proba(grid)[:, 1].reshape(xx.shape)
# plotting the decision boundary
f, ax = plt.subplots(figsize=(8, 6))
sns.set(context="notebook", style="whitegrid",
rc={"axes.axisbelow": False})
contour = ax.contourf(xx, yy, probs, 25, cmap="RdBu",
vmin=0, vmax=1)
ax_c = f.colorbar(contour)
ax_c.set_label("$P(y = 1)$")
ax_c.set_ticks([0, .25, .5, .75, 1])
ax.scatter(x_train_pca[:,0], x_train_pca[:, 1], c=y_train, s=50,
cmap="RdBu", vmin=-.2, vmax=1.2,
edgecolor="white", linewidth=1)
ax.set(aspect="equal",
xlim=(-5, 5), ylim=(-5, 5),
xlabel="$X_1$", ylabel="$X_2$")
plt.show()
def plot_roc_curve(fpr, tpr, label=None):
plt.plot(fpr, tpr, linewidth=2, label=label)
plt.plot([0, 1], [0, 1], 'k--')
plt.axis([0, 1, 0, 1])
plt.xlabel('False Positive Rate')
plt.ylabel('True Positive Rate')
plt.show()
def plot_learning_curve(estimator, title, X, y, ylim=None, cv=None,
n_jobs=None, train_sizes=np.linspace(.1, 1.0, 5)):
"""
Generate a simple plot of the test and training learning curve.
based on: http://scikit-learn.org/stable/auto_examples/model_selection/plot_learning_curve.html
Parameters
----------
estimator : classifier
title : title for the chart.
X : training set, where n_samples is the number of samples and
n_features is the number of features.
y : labels of the training set
ylim : defines minimum and maximum yvalues plotted.
cv : determines the cross-validation splitting strategy.
Possible inputs for cv are:
- None, to use the default 3-fold cross-validation,
- integer, to specify the number of folds.
- An object to be used as a cross-validation generator.
- An iterable yielding train/test splits.
n_jobs : number of jobs to run in parallel.
train_sizes : relative or absolute numbers of training examples that will be used to
generate the learning curve. If the dtype is float, it is regarded as a
fraction of the maximum size of the training set (that is determined
by the selected validation method), i.e. it has to be within (0, 1].
Otherwise it is interpreted as absolute sizes of the training sets.
Note that for classification the number of samples usually have to
be big enough to contain at least one sample from each class.
(default: np.linspace(0.1, 1.0, 5))
"""
# cloning the estimator
clf = clone(estimator)
plt.figure()
plt.title(title)
if ylim is not None:
plt.ylim(*ylim)
plt.xlabel("Training examples")
plt.ylabel("Score")
train_sizes, train_scores, test_scores = learning_curve(
clf, X, y, cv=cv, n_jobs=n_jobs, train_sizes=train_sizes)
train_scores_mean = np.mean(train_scores, axis=1)
train_scores_std = np.std(train_scores, axis=1)
test_scores_mean = np.mean(test_scores, axis=1)
test_scores_std = np.std(test_scores, axis=1)
plt.grid()
plt.fill_between(train_sizes, train_scores_mean - train_scores_std,
train_scores_mean + train_scores_std, alpha=0.1,
color="r")
plt.fill_between(train_sizes, test_scores_mean - test_scores_std,
test_scores_mean + test_scores_std, alpha=0.1, color="g")
plt.plot(train_sizes, train_scores_mean, 'o-', color="r",
label="Training score")
plt.plot(train_sizes, test_scores_mean, 'o-', color="g",
label="Cross-validation score")
plt.legend(loc="best")
return plt
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
13,
29937,
13,
29937,
3834,
3168,
304,
367,
1304,
297,
278,
9673,
13,
29937,
13,
29937,
10682,
287,
491,
529,
5813,
29958,
13,
13,
5215,
12865,
13,
5215,
11701,
408,
10518,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
396,
363,
29871,
29906,
29928,
6492,
1259,
13,
5215,
12655,
408,
7442,
13,
5215,
409,
370,
1398,
408,
269,
1983,
396,
6492,
28138,
353,
29897,
13,
13,
3166,
2071,
19668,
29889,
3188,
1053,
17432,
13,
13,
3166,
2071,
19668,
29889,
311,
510,
3283,
1053,
349,
5454,
13,
3166,
2071,
19668,
29889,
4299,
29918,
21731,
1053,
6509,
29918,
2764,
345,
13,
13,
1753,
6492,
29918,
7099,
2459,
29918,
9917,
653,
29898,
29916,
29918,
14968,
29892,
343,
29918,
14968,
29892,
4844,
1061,
1125,
13,
1678,
9995,
20867,
278,
10608,
10452,
13,
13,
1678,
2729,
373,
29901,
1732,
597,
26167,
7354,
29899,
19668,
29889,
990,
29914,
13844,
29914,
6921,
29918,
19057,
29914,
12846,
29875,
29918,
9136,
11292,
29914,
5317,
29918,
1643,
29918,
7728,
351,
362,
29918,
874,
375,
29918,
4501,
29885,
29918,
381,
275,
29889,
1420,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
921,
29918,
14968,
29901,
6694,
731,
13,
1678,
343,
29918,
14968,
29901,
11073,
310,
278,
6694,
731,
13,
1678,
4844,
1061,
29901,
770,
3709,
29892,
6976,
1818,
367,
731,
408,
5852,
13,
1678,
9995,
13,
13,
1678,
822,
1207,
29918,
4467,
29882,
7720,
29898,
29916,
29892,
343,
29892,
298,
21098,
29900,
29906,
1125,
13,
4706,
9995,
4391,
263,
27716,
310,
3291,
304,
6492,
297,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
921,
29901,
848,
304,
2967,
921,
29899,
8990,
27716,
7720,
373,
13,
4706,
343,
29901,
848,
304,
2967,
343,
29899,
8990,
27716,
7720,
373,
13,
4706,
298,
29901,
6576,
675,
363,
27716,
7720,
29892,
13136,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
15473,
29892,
343,
29891,
584,
29871,
299,
2378,
13,
4706,
9995,
13,
4706,
921,
29918,
1195,
29892,
921,
29918,
3317,
353,
921,
29889,
1195,
580,
448,
29871,
29896,
29892,
921,
29889,
3317,
580,
718,
29871,
29896,
13,
4706,
343,
29918,
1195,
29892,
343,
29918,
3317,
353,
343,
29889,
1195,
580,
448,
29871,
29896,
29892,
343,
29889,
3317,
580,
718,
29871,
29896,
13,
4706,
15473,
29892,
343,
29891,
353,
7442,
29889,
4467,
29882,
7720,
29898,
9302,
29889,
279,
927,
29898,
29916,
29918,
1195,
29892,
921,
29918,
3317,
29892,
298,
511,
13,
462,
632,
7442,
29889,
279,
927,
29898,
29891,
29918,
1195,
29892,
343,
29918,
3317,
29892,
298,
876,
13,
4706,
736,
15473,
29892,
343,
29891,
13,
268,
13,
1678,
396,
1067,
28259,
278,
4844,
1061,
13,
1678,
1067,
29888,
353,
17432,
29898,
342,
326,
1061,
29897,
13,
13,
1678,
282,
1113,
353,
349,
5454,
29898,
29876,
29918,
14036,
29922,
29906,
29897,
13,
1678,
921,
29918,
14968,
29918,
29886,
1113,
353,
282,
1113,
29889,
9202,
29918,
9067,
29898,
29916,
29918,
14968,
29897,
13,
1678,
1067,
29888,
29889,
9202,
29898,
29916,
29918,
14968,
29918,
29886,
1113,
29892,
343,
29918,
14968,
29897,
13,
268,
13,
1678,
15473,
29892,
343,
29891,
353,
1207,
29918,
4467,
29882,
7720,
29898,
29916,
29918,
14968,
29918,
29886,
1113,
7503,
29892,
29871,
29900,
1402,
921,
29918,
14968,
29918,
29886,
1113,
7503,
29892,
29871,
29896,
2314,
13,
1678,
6856,
353,
7442,
29889,
29883,
29918,
29961,
4419,
29889,
336,
955,
3285,
343,
29891,
29889,
336,
955,
580,
29962,
13,
1678,
2070,
29879,
353,
1067,
29888,
29889,
27711,
29918,
771,
2291,
29898,
7720,
29897,
7503,
29892,
29871,
29896,
1822,
690,
14443,
29898,
4419,
29889,
12181,
29897,
13,
268,
13,
1678,
396,
6492,
1259,
278,
10608,
10452,
13,
1678,
285,
29892,
4853,
353,
14770,
29889,
1491,
26762,
29898,
1003,
2311,
7607,
29947,
29892,
29871,
29953,
876,
13,
13,
1678,
269,
1983,
29889,
842,
29898,
4703,
543,
1333,
19273,
613,
3114,
543,
1332,
277,
387,
2429,
613,
13,
9651,
364,
29883,
3790,
29908,
1165,
267,
29889,
8990,
22503,
1115,
7700,
1800,
13,
13,
1678,
640,
473,
353,
4853,
29889,
1285,
473,
29888,
29898,
4419,
29892,
343,
29891,
29892,
2070,
29879,
29892,
29871,
29906,
29945,
29892,
274,
1958,
543,
29934,
29881,
3727,
613,
13,
462,
3986,
325,
1195,
29922,
29900,
29892,
325,
3317,
29922,
29896,
29897,
13,
13,
1678,
4853,
29918,
29883,
353,
285,
29889,
2780,
1646,
29898,
1285,
473,
29897,
13,
1678,
4853,
29918,
29883,
29889,
842,
29918,
1643,
703,
29938,
29925,
29898,
29891,
353,
29871,
29896,
1262,
1159,
13,
1678,
4853,
29918,
29883,
29889,
842,
29918,
29873,
7358,
4197,
29900,
29892,
869,
29906,
29945,
29892,
869,
29945,
29892,
869,
29955,
29945,
29892,
29871,
29896,
2314,
13,
13,
1678,
4853,
29889,
1557,
2620,
29898,
29916,
29918,
14968,
29918,
29886,
1113,
7503,
29892,
29900,
1402,
921,
29918,
14968,
29918,
29886,
1113,
7503,
29892,
29871,
29896,
1402,
274,
29922,
29891,
29918,
14968,
29892,
269,
29922,
29945,
29900,
29892,
13,
1669,
274,
1958,
543,
29934,
29881,
3727,
613,
325,
1195,
10457,
29889,
29906,
29892,
325,
3317,
29922,
29896,
29889,
29906,
29892,
13,
1669,
7636,
2780,
543,
10921,
613,
1196,
2103,
29922,
29896,
29897,
13,
13,
1678,
4853,
29889,
842,
29898,
294,
1103,
543,
11745,
613,
13,
965,
921,
2576,
29922,
6278,
29945,
29892,
29871,
29945,
511,
343,
2576,
29922,
6278,
29945,
29892,
29871,
29945,
511,
13,
965,
921,
1643,
18965,
29990,
29918,
29896,
29938,
613,
343,
1643,
18965,
29990,
29918,
29906,
29938,
1159,
13,
268,
13,
1678,
14770,
29889,
4294,
580,
13,
13,
1753,
6492,
29918,
10198,
29918,
2764,
345,
29898,
29888,
558,
29892,
260,
558,
29892,
3858,
29922,
8516,
1125,
13,
1678,
14770,
29889,
5317,
29898,
29888,
558,
29892,
260,
558,
29892,
1196,
2103,
29922,
29906,
29892,
3858,
29922,
1643,
29897,
13,
1678,
14770,
29889,
5317,
4197,
29900,
29892,
29871,
29896,
1402,
518,
29900,
29892,
29871,
29896,
1402,
525,
29895,
489,
1495,
13,
1678,
14770,
29889,
8990,
4197,
29900,
29892,
29871,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
2314,
13,
1678,
14770,
29889,
29916,
1643,
877,
8824,
10321,
3321,
390,
403,
1495,
13,
1678,
14770,
29889,
29891,
1643,
877,
5574,
10321,
3321,
390,
403,
1495,
13,
13,
1678,
14770,
29889,
4294,
580,
13,
13,
1753,
6492,
29918,
21891,
29918,
2764,
345,
29898,
342,
326,
1061,
29892,
3611,
29892,
1060,
29892,
343,
29892,
343,
2576,
29922,
8516,
29892,
13850,
29922,
8516,
29892,
13,
462,
4706,
302,
29918,
9057,
29879,
29922,
8516,
29892,
7945,
29918,
29879,
7093,
29922,
9302,
29889,
1915,
3493,
11891,
29896,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29945,
22164,
13,
1678,
9995,
13,
1678,
3251,
403,
263,
2560,
6492,
310,
278,
1243,
322,
6694,
6509,
11672,
29889,
13,
13,
1678,
2729,
373,
29901,
1732,
597,
26167,
7354,
29899,
19668,
29889,
990,
29914,
13844,
29914,
6921,
29918,
19057,
29914,
4299,
29918,
21731,
29914,
5317,
29918,
21891,
29918,
2764,
345,
29889,
1420,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
4844,
1061,
584,
770,
3709,
13,
13,
1678,
3611,
584,
3611,
363,
278,
8727,
29889,
13,
13,
1678,
1060,
584,
6694,
731,
29892,
988,
302,
29918,
27736,
338,
278,
1353,
310,
11916,
322,
13,
4706,
302,
29918,
22100,
338,
278,
1353,
310,
5680,
29889,
13,
13,
1678,
343,
584,
11073,
310,
278,
6694,
731,
13,
13,
1678,
343,
2576,
584,
17645,
9212,
322,
7472,
343,
5975,
715,
15048,
29889,
13,
13,
1678,
13850,
584,
3683,
1475,
278,
4891,
29899,
18157,
24368,
13705,
29889,
13,
4706,
20049,
10970,
363,
13850,
526,
29901,
13,
3986,
448,
6213,
29892,
304,
671,
278,
2322,
29871,
29941,
29899,
8771,
4891,
29899,
18157,
29892,
13,
3986,
448,
6043,
29892,
304,
6084,
278,
1353,
310,
900,
6289,
29889,
13,
3986,
448,
530,
1203,
304,
367,
1304,
408,
263,
4891,
29899,
18157,
15299,
29889,
13,
3986,
448,
530,
4256,
519,
7709,
292,
7945,
29914,
1688,
8536,
1169,
29889,
13,
13,
1678,
302,
29918,
9057,
29879,
584,
1353,
310,
17643,
304,
1065,
297,
8943,
29889,
13,
13,
1678,
7945,
29918,
29879,
7093,
584,
6198,
470,
8380,
3694,
310,
6694,
6455,
393,
674,
367,
1304,
304,
13,
4706,
5706,
278,
6509,
11672,
29889,
960,
278,
26688,
338,
5785,
29892,
372,
338,
17878,
408,
263,
13,
4706,
15958,
310,
278,
7472,
2159,
310,
278,
6694,
731,
313,
5747,
338,
10087,
13,
4706,
491,
278,
4629,
8845,
1158,
511,
474,
29889,
29872,
29889,
372,
756,
304,
367,
2629,
313,
29900,
29892,
29871,
29896,
1822,
13,
4706,
13466,
372,
338,
21551,
408,
8380,
15786,
310,
278,
6694,
6166,
29889,
13,
4706,
3940,
393,
363,
12965,
278,
1353,
310,
11916,
5491,
505,
304,
13,
4706,
367,
4802,
3307,
304,
1712,
472,
3203,
697,
4559,
515,
1269,
770,
29889,
13,
4706,
313,
4381,
29901,
7442,
29889,
1915,
3493,
29898,
29900,
29889,
29896,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29945,
876,
13,
1678,
9995,
13,
1678,
396,
1067,
28259,
278,
4844,
1061,
13,
1678,
1067,
29888,
353,
17432,
29898,
342,
326,
1061,
29897,
13,
13,
1678,
14770,
29889,
4532,
580,
13,
1678,
14770,
29889,
3257,
29898,
3257,
29897,
13,
1678,
565,
343,
2576,
338,
451,
6213,
29901,
13,
4706,
14770,
29889,
29891,
2576,
10456,
29891,
2576,
29897,
13,
1678,
14770,
29889,
29916,
1643,
703,
5323,
2827,
6455,
1159,
13,
1678,
14770,
29889,
29891,
1643,
703,
20097,
1159,
13,
1678,
7945,
29918,
29879,
7093,
29892,
7945,
29918,
1557,
2361,
29892,
1243,
29918,
1557,
2361,
353,
6509,
29918,
2764,
345,
29898,
13,
4706,
1067,
29888,
29892,
1060,
29892,
343,
29892,
13850,
29922,
11023,
29892,
302,
29918,
9057,
29879,
29922,
29876,
29918,
9057,
29879,
29892,
7945,
29918,
29879,
7093,
29922,
14968,
29918,
29879,
7093,
29897,
13,
1678,
7945,
29918,
1557,
2361,
29918,
12676,
353,
7442,
29889,
12676,
29898,
14968,
29918,
1557,
2361,
29892,
9685,
29922,
29896,
29897,
13,
1678,
7945,
29918,
1557,
2361,
29918,
4172,
353,
7442,
29889,
4172,
29898,
14968,
29918,
1557,
2361,
29892,
9685,
29922,
29896,
29897,
13,
1678,
1243,
29918,
1557,
2361,
29918,
12676,
353,
7442,
29889,
12676,
29898,
1688,
29918,
1557,
2361,
29892,
9685,
29922,
29896,
29897,
13,
1678,
1243,
29918,
1557,
2361,
29918,
4172,
353,
7442,
29889,
4172,
29898,
1688,
29918,
1557,
2361,
29892,
9685,
29922,
29896,
29897,
13,
1678,
14770,
29889,
7720,
580,
13,
13,
1678,
14770,
29889,
5589,
29918,
14811,
29898,
14968,
29918,
29879,
7093,
29892,
7945,
29918,
1557,
2361,
29918,
12676,
448,
7945,
29918,
1557,
2361,
29918,
4172,
29892,
13,
462,
268,
7945,
29918,
1557,
2361,
29918,
12676,
718,
7945,
29918,
1557,
2361,
29918,
4172,
29892,
15595,
29922,
29900,
29889,
29896,
29892,
13,
462,
268,
2927,
543,
29878,
1159,
13,
1678,
14770,
29889,
5589,
29918,
14811,
29898,
14968,
29918,
29879,
7093,
29892,
1243,
29918,
1557,
2361,
29918,
12676,
448,
1243,
29918,
1557,
2361,
29918,
4172,
29892,
13,
462,
268,
1243,
29918,
1557,
2361,
29918,
12676,
718,
1243,
29918,
1557,
2361,
29918,
4172,
29892,
15595,
29922,
29900,
29889,
29896,
29892,
2927,
543,
29887,
1159,
13,
1678,
14770,
29889,
5317,
29898,
14968,
29918,
29879,
7093,
29892,
7945,
29918,
1557,
2361,
29918,
12676,
29892,
525,
29877,
29899,
742,
2927,
543,
29878,
613,
13,
632,
3858,
543,
5323,
2827,
8158,
1159,
13,
1678,
14770,
29889,
5317,
29898,
14968,
29918,
29879,
7093,
29892,
1243,
29918,
1557,
2361,
29918,
12676,
29892,
525,
29877,
29899,
742,
2927,
543,
29887,
613,
13,
632,
3858,
543,
29907,
2124,
29899,
18157,
8158,
1159,
13,
13,
1678,
14770,
29889,
26172,
29898,
2029,
543,
13318,
1159,
13,
1678,
736,
14770,
13,
2
] |
src/world/logosplashworld.py | alisonbento/steering-all | 3 | 153725 | import dotworld
import ufrnsplashworld
from src.define import *
from src.dot.entities.dotpairg import DotPairg
from src.dot.dottext import DotText
import i18n
_ = i18n.language.ugettext
class LogoSplashWorld(dotworld.DotWorld):
def __init__(self):
dotworld.DotWorld.__init__(self)
self.counter = 0
self.limit = 400
self.alpha = 0
self.animState = 1
self.logo = DotPairg()
self.label = DotText("PAIRG - Physical Artifacts of Interaction Research Group", 16, (0, 0, 0), (255, 255, 255))
self.sublabel = DotText(_("Developed by") + " <NAME>", 16, (0, 0, 0), (255, 255, 255))
def onAttachScreen(self):
self.logo.setMedium()
self.logo.centerX(self.screen.width)
self.logo.centerY(self.screen.height)
self.logo.createSurface()
self.label.centerX(self.screen.width)
self.label.marginTop(dotget(1))
self.label.below(self.logo)
self.sublabel.centerX(self.screen.width)
self.sublabel.marginTop(dotget(1))
self.sublabel.below(self.label)
def changeAlpha(self):
self.logo.setDotAlpha(self.alpha)
# self.logo.createSurface()
self.label.surface.set_alpha(self.alpha)
self.sublabel.surface.set_alpha(self.alpha)
def listen(self, inputResult):
if inputResult == GameDefine.COMMAND_EXIT:
self.screen.turnOff()
if inputResult == GameDefine.COMMAND_BOOST:
self.pause()
def step(self):
if self.active:
self.changeAlpha()
self.logo.draw(self.screen.displaysurf)
self.label.draw(self.screen.displaysurf)
self.sublabel.draw(self.screen.displaysurf)
self.counter += 1
if self.animState == 1:
self.alpha += 2
if self.alpha > 255:
self.animState = 2
self.counter = 0
if self.animState == 2:
self.counter += 1
if self.counter > self.screen.fps * 3:
self.animState = 3
if self.animState == 3:
self.alpha -= 2
if self.alpha <= 0:
self.pause()
else:
self.screen.setWorld(ufrnsplashworld.UfrnSplashWorld())
del self
| [
1,
1053,
8329,
11526,
13,
5215,
318,
1341,
1983,
572,
1161,
11526,
13,
3166,
4765,
29889,
7922,
1053,
334,
13,
3166,
4765,
29889,
6333,
29889,
296,
1907,
29889,
6333,
18784,
29887,
1053,
360,
327,
20547,
29887,
13,
3166,
4765,
29889,
6333,
29889,
6333,
726,
1053,
360,
327,
1626,
13,
13,
5215,
474,
29896,
29947,
29876,
13,
29918,
353,
474,
29896,
29947,
29876,
29889,
11675,
29889,
29884,
657,
726,
13,
13,
13,
1990,
4522,
29877,
29903,
572,
1161,
14058,
29898,
6333,
11526,
29889,
29928,
327,
14058,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
8329,
11526,
29889,
29928,
327,
14058,
17255,
2344,
12035,
1311,
29897,
13,
4706,
1583,
29889,
11808,
353,
29871,
29900,
13,
4706,
1583,
29889,
13400,
353,
29871,
29946,
29900,
29900,
13,
4706,
1583,
29889,
2312,
353,
29871,
29900,
13,
4706,
1583,
29889,
11576,
2792,
353,
29871,
29896,
13,
13,
4706,
1583,
29889,
14569,
353,
360,
327,
20547,
29887,
580,
13,
4706,
1583,
29889,
1643,
353,
360,
327,
1626,
703,
7228,
8193,
29954,
448,
11661,
936,
3012,
7060,
29879,
310,
4124,
2467,
10550,
6431,
613,
29871,
29896,
29953,
29892,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
511,
313,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
876,
13,
4706,
1583,
29889,
1491,
1643,
353,
360,
327,
1626,
7373,
703,
21956,
287,
491,
1159,
718,
376,
529,
5813,
28341,
29871,
29896,
29953,
29892,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
511,
313,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
876,
13,
13,
1678,
822,
373,
4165,
496,
11357,
29898,
1311,
1125,
13,
4706,
1583,
29889,
14569,
29889,
842,
19302,
1974,
580,
13,
4706,
1583,
29889,
14569,
29889,
5064,
29990,
29898,
1311,
29889,
10525,
29889,
2103,
29897,
13,
4706,
1583,
29889,
14569,
29889,
5064,
29979,
29898,
1311,
29889,
10525,
29889,
3545,
29897,
13,
4706,
1583,
29889,
14569,
29889,
3258,
18498,
2161,
580,
13,
13,
4706,
1583,
29889,
1643,
29889,
5064,
29990,
29898,
1311,
29889,
10525,
29889,
2103,
29897,
13,
4706,
1583,
29889,
1643,
29889,
9264,
7031,
29898,
6333,
657,
29898,
29896,
876,
13,
4706,
1583,
29889,
1643,
29889,
22503,
29898,
1311,
29889,
14569,
29897,
13,
13,
4706,
1583,
29889,
1491,
1643,
29889,
5064,
29990,
29898,
1311,
29889,
10525,
29889,
2103,
29897,
13,
4706,
1583,
29889,
1491,
1643,
29889,
9264,
7031,
29898,
6333,
657,
29898,
29896,
876,
13,
4706,
1583,
29889,
1491,
1643,
29889,
22503,
29898,
1311,
29889,
1643,
29897,
13,
13,
1678,
822,
1735,
28630,
29898,
1311,
1125,
13,
4706,
1583,
29889,
14569,
29889,
842,
29928,
327,
28630,
29898,
1311,
29889,
2312,
29897,
13,
4706,
396,
1583,
29889,
14569,
29889,
3258,
18498,
2161,
580,
13,
13,
4706,
1583,
29889,
1643,
29889,
7610,
2161,
29889,
842,
29918,
2312,
29898,
1311,
29889,
2312,
29897,
13,
4706,
1583,
29889,
1491,
1643,
29889,
7610,
2161,
29889,
842,
29918,
2312,
29898,
1311,
29889,
2312,
29897,
13,
13,
1678,
822,
11621,
29898,
1311,
29892,
1881,
3591,
1125,
13,
4706,
565,
1881,
3591,
1275,
8448,
3206,
457,
29889,
19795,
1529,
2797,
29918,
5746,
1806,
29901,
13,
9651,
1583,
29889,
10525,
29889,
685,
6880,
580,
13,
13,
4706,
565,
1881,
3591,
1275,
8448,
3206,
457,
29889,
19795,
1529,
2797,
29918,
8456,
3718,
29901,
13,
9651,
1583,
29889,
29886,
1071,
580,
13,
13,
1678,
822,
4331,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
4925,
29901,
13,
9651,
1583,
29889,
3167,
28630,
580,
13,
13,
9651,
1583,
29889,
14569,
29889,
4012,
29898,
1311,
29889,
10525,
29889,
2218,
12922,
332,
29888,
29897,
13,
9651,
1583,
29889,
1643,
29889,
4012,
29898,
1311,
29889,
10525,
29889,
2218,
12922,
332,
29888,
29897,
13,
9651,
1583,
29889,
1491,
1643,
29889,
4012,
29898,
1311,
29889,
10525,
29889,
2218,
12922,
332,
29888,
29897,
13,
13,
9651,
1583,
29889,
11808,
4619,
29871,
29896,
13,
13,
9651,
565,
1583,
29889,
11576,
2792,
1275,
29871,
29896,
29901,
13,
18884,
1583,
29889,
2312,
4619,
29871,
29906,
13,
13,
18884,
565,
1583,
29889,
2312,
1405,
29871,
29906,
29945,
29945,
29901,
13,
462,
1678,
1583,
29889,
11576,
2792,
353,
29871,
29906,
13,
462,
1678,
1583,
29889,
11808,
353,
29871,
29900,
13,
13,
9651,
565,
1583,
29889,
11576,
2792,
1275,
29871,
29906,
29901,
13,
18884,
1583,
29889,
11808,
4619,
29871,
29896,
13,
18884,
565,
1583,
29889,
11808,
1405,
1583,
29889,
10525,
29889,
29888,
567,
334,
29871,
29941,
29901,
13,
462,
1678,
1583,
29889,
11576,
2792,
353,
29871,
29941,
13,
13,
9651,
565,
1583,
29889,
11576,
2792,
1275,
29871,
29941,
29901,
13,
18884,
1583,
29889,
2312,
22361,
29871,
29906,
13,
18884,
565,
1583,
29889,
2312,
5277,
29871,
29900,
29901,
13,
462,
1678,
1583,
29889,
29886,
1071,
580,
13,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
10525,
29889,
842,
14058,
29898,
1137,
29878,
1983,
572,
1161,
11526,
29889,
29965,
1341,
29876,
29903,
572,
1161,
14058,
3101,
13,
9651,
628,
1583,
13,
2
] |
opps/contrib/multisite/models.py | jeanmask/opps | 159 | 162537 | <gh_stars>100-1000
# -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from opps.core.permissions.models import Permission
class SitePermission(Permission):
pass
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
9557,
29889,
13239,
29889,
3286,
18411,
1053,
318,
657,
726,
29918,
433,
1537,
408,
903,
13,
3166,
4575,
29879,
29889,
3221,
29889,
17858,
6847,
29889,
9794,
1053,
20894,
2333,
13,
13,
13,
1990,
10781,
27293,
29898,
27293,
1125,
13,
1678,
1209,
13,
2
] |
testing/performances.py | severin-lemaignan/underworlds | 3 | 133871 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import time
import uuid
from multiprocessing import Pipe, Pool
import threading
from concurrent.futures import ThreadPoolExecutor
import logging; logger = logging.getLogger("underworlds.testing.performances")
import underworlds
import underworlds.server
from underworlds.types import Node
from underworlds.helpers.profile import profileonce
import underworlds.underworlds_pb2 as gRPC
def ms(duration):
return "%.1fms" % (duration * 1000)
def passthrough(world1, world2, signaling_pipe):
""" Simple passthrough filter: wait for changes on a world world1 and
propagate these changes to world world2.
"""
name = "passthrough_filter_%s_to_%s" % (world1, world2)
with underworlds.Context(name) as ctx:
world1 = ctx.worlds[world1]
world2 = ctx.worlds[world2]
try:
print("Waiting for changes...")
while not signaling_pipe.poll():
#print("%f -- %s waiting" % (time.time(), name))
change = world1.scene.waitforchanges(0.5)
#print("%f -- %s Done waiting (last change: %s)" % (time.time(), name, str(change)))
if change is not None:
id, op = change
#print("%f -- propagating from %s to %s" % (time.time(), name, world1, world2))
world2.scene.update_and_propagate(world1.scene.nodes[id])
change = None
except Exception as e:
import traceback
traceback.print_exc()
print("Stopping passthrough")
print("Passthrough stopped")
def wait_for_changes(world, nb_changes):
print("Waiting for changes in world %s" % world)
starttime = time.time()
change = None
for i in range(nb_changes):
change = world.scene.waitforchanges(3)
profileonce("waitforchanges triggered")
return change, time.time()-starttime
def test_propagation_time(nb_worlds, nb_changes):
executor = ThreadPoolExecutor(max_workers=nb_worlds)
pool = Pool(nb_worlds)
pipes = []
res = []
for i in range(nb_worlds-1):
print("Setting up passthrough between world %d and world %d" % (i, i+1))
#f = executor.submit(passthrough, "world%d" % i, "world%d" % (i+1))
conn1, conn2 = Pipe()
pipes.append(conn1)
res.append(pool.apply_async(passthrough, ["world%d" % i, "world%d" % (i+1), conn2]))
time.sleep(0.5)
ctx = underworlds.Context("test_client")
entry_world = ctx.worlds["world0"]
exit_world = ctx.worlds["world%d" % (nb_worlds-1)]
future = executor.submit(wait_for_changes, exit_world, nb_changes)
print("\n\n\nPropagating %d change(s) from world %s..." % (nb_changes, entry_world))
profileonce("start test with %d worlds" % nb_worlds)
for i in range(nb_changes):
n = Node()
n.name = "node_%d" % i
entry_world.scene.append_and_propagate(n)
time.sleep(0.01)
seen, duration = future.result()
profileonce("end test")
if seen is None:
logger.error("The changes have not been seen!")
duration = 0
else:
print("It took %s to be notified of the %d change(s) in world %s" % (ms(duration), nb_changes, exit_world))
executor.shutdown(wait=True)
for p in pipes:
p.send(True)
pool.close()
pool.join()
ctx.close()
return duration
if __name__ == '__main__':
durations = {}
parser = argparse.ArgumentParser()
parser.add_argument("maxworlds", default=5, type=int, nargs="?", help="Maximum number of Underworlds worlds to spawn")
parser.add_argument("-d", "--debug", help="debug mode", action="store_true")
parser.add_argument("-dd", "--fulldebug", help="debug mode (verbose)", action="store_true")
parser.add_argument("-i", "--incremental", action="store_true", help="test for every nb of worlds, from 2 to maxworlds")
parser.add_argument("-r", "--repeat", default=1, type=int, nargs="?", help="how many times the test should be repeated (default: no repeat)")
parser.add_argument("-c", "--changes", default=1, type=int, nargs="?", help="how many changes should be propagated (default: one)")
args = parser.parse_args()
if args.debug or args.fulldebug:
if args.fulldebug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)
else:
logger.setLevel(logging.WARN)
minworlds = 2 if args.incremental else args.maxworlds
for idx in range(0, args.repeat):
print("\n\n\n-- Iteration #%d --\n" % idx)
for nb in range(minworlds, args.maxworlds+1):
print("\n\n\n-- %d worlds --\n" % nb)
server = underworlds.server.start()
durations.setdefault(nb,[]).append(test_propagation_time(nb, args.changes))
server.stop(0).wait()
time.sleep(0.5)
for nb,times in durations.items():
print("%d;%s" % (nb, ";".join([str("%.1f" % (d * 1000)) for d in times])))
| [
1,
396,
29991,
847,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
1852,
5510,
13,
5215,
931,
13,
5215,
318,
5416,
13,
13,
3166,
6674,
307,
985,
292,
1053,
7362,
412,
29892,
28625,
13,
5215,
3244,
292,
13,
3166,
21984,
29889,
29888,
329,
1973,
1053,
10480,
11426,
13366,
13,
13,
5215,
12183,
29936,
17927,
353,
12183,
29889,
657,
16363,
703,
5062,
11526,
29879,
29889,
13424,
29889,
19826,
2925,
1159,
13,
13,
5215,
1090,
11526,
29879,
13,
5215,
1090,
11526,
29879,
29889,
2974,
13,
3166,
1090,
11526,
29879,
29889,
8768,
1053,
9071,
13,
3166,
1090,
11526,
29879,
29889,
3952,
6774,
29889,
10185,
1053,
8722,
10646,
13,
5215,
1090,
11526,
29879,
29889,
5062,
11526,
29879,
29918,
24381,
29906,
408,
330,
29934,
9026,
13,
13,
1753,
10887,
29898,
19708,
1125,
13,
1678,
736,
11860,
29889,
29896,
29888,
1516,
29908,
1273,
313,
19708,
334,
29871,
29896,
29900,
29900,
29900,
29897,
13,
13,
13,
1753,
2331,
303,
1092,
820,
29898,
11526,
29896,
29892,
3186,
29906,
29892,
7182,
292,
29918,
17760,
1125,
13,
1678,
9995,
12545,
2331,
303,
1092,
820,
4175,
29901,
4480,
363,
3620,
373,
263,
3186,
3186,
29896,
322,
13,
1678,
13089,
403,
1438,
3620,
304,
3186,
3186,
29906,
29889,
13,
1678,
9995,
13,
13,
1678,
1024,
353,
376,
18182,
303,
1092,
820,
29918,
4572,
29918,
29995,
29879,
29918,
517,
29918,
29995,
29879,
29908,
1273,
313,
11526,
29896,
29892,
3186,
29906,
29897,
13,
1678,
411,
1090,
11526,
29879,
29889,
2677,
29898,
978,
29897,
408,
12893,
29901,
13,
13,
4706,
3186,
29896,
353,
12893,
29889,
11526,
29879,
29961,
11526,
29896,
29962,
13,
4706,
3186,
29906,
353,
12893,
29889,
11526,
29879,
29961,
11526,
29906,
29962,
13,
13,
4706,
1018,
29901,
13,
9651,
1596,
703,
15716,
292,
363,
3620,
856,
1159,
13,
9651,
1550,
451,
7182,
292,
29918,
17760,
29889,
29886,
3028,
7295,
13,
18884,
396,
2158,
11702,
29888,
1192,
1273,
29879,
10534,
29908,
1273,
313,
2230,
29889,
2230,
3285,
1024,
876,
13,
18884,
1735,
353,
3186,
29896,
29889,
24645,
29889,
10685,
1454,
25990,
29898,
29900,
29889,
29945,
29897,
13,
18884,
396,
2158,
11702,
29888,
1192,
1273,
29879,
25679,
10534,
313,
4230,
1735,
29901,
1273,
29879,
5513,
1273,
313,
2230,
29889,
2230,
3285,
1024,
29892,
851,
29898,
3167,
4961,
13,
18884,
565,
1735,
338,
451,
6213,
29901,
13,
462,
1678,
1178,
29892,
1015,
353,
1735,
13,
462,
1678,
396,
2158,
11702,
29888,
1192,
13089,
1218,
515,
1273,
29879,
304,
1273,
29879,
29908,
1273,
313,
2230,
29889,
2230,
3285,
1024,
29892,
3186,
29896,
29892,
3186,
29906,
876,
13,
462,
1678,
3186,
29906,
29889,
24645,
29889,
5504,
29918,
392,
29918,
7728,
351,
403,
29898,
11526,
29896,
29889,
24645,
29889,
18010,
29961,
333,
2314,
13,
462,
1678,
1735,
353,
6213,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1053,
9637,
1627,
13,
9651,
9637,
1627,
29889,
2158,
29918,
735,
29883,
580,
13,
4706,
1596,
703,
20754,
3262,
2331,
303,
1092,
820,
1159,
13,
1678,
1596,
703,
29925,
294,
303,
1092,
820,
11084,
1159,
13,
13,
13,
1753,
4480,
29918,
1454,
29918,
25990,
29898,
11526,
29892,
302,
29890,
29918,
25990,
1125,
13,
13,
1678,
1596,
703,
15716,
292,
363,
3620,
297,
3186,
1273,
29879,
29908,
1273,
3186,
29897,
13,
13,
1678,
1369,
2230,
353,
931,
29889,
2230,
580,
13,
13,
1678,
1735,
353,
6213,
13,
13,
1678,
363,
474,
297,
3464,
29898,
9877,
29918,
25990,
1125,
13,
4706,
1735,
353,
3186,
29889,
24645,
29889,
10685,
1454,
25990,
29898,
29941,
29897,
13,
13,
1678,
8722,
10646,
703,
10685,
1454,
25990,
19799,
1159,
13,
13,
1678,
736,
1735,
29892,
931,
29889,
2230,
580,
29899,
2962,
2230,
13,
13,
13,
13,
268,
13,
1753,
1243,
29918,
7728,
351,
362,
29918,
2230,
29898,
9877,
29918,
11526,
29879,
29892,
302,
29890,
29918,
25990,
1125,
13,
13,
1678,
2279,
3406,
353,
10480,
11426,
13366,
29898,
3317,
29918,
1287,
414,
29922,
9877,
29918,
11526,
29879,
29897,
13,
1678,
11565,
353,
28625,
29898,
9877,
29918,
11526,
29879,
29897,
13,
13,
1678,
8450,
267,
353,
5159,
13,
1678,
620,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
9877,
29918,
11526,
29879,
29899,
29896,
1125,
13,
4706,
1596,
703,
29020,
701,
2331,
303,
1092,
820,
1546,
3186,
1273,
29881,
322,
3186,
1273,
29881,
29908,
1273,
313,
29875,
29892,
474,
29974,
29896,
876,
13,
4706,
396,
29888,
353,
2279,
3406,
29889,
7892,
29898,
18182,
303,
1092,
820,
29892,
376,
11526,
29995,
29881,
29908,
1273,
474,
29892,
376,
11526,
29995,
29881,
29908,
1273,
313,
29875,
29974,
29896,
876,
13,
4706,
11009,
29896,
29892,
11009,
29906,
353,
7362,
412,
580,
13,
4706,
8450,
267,
29889,
4397,
29898,
13082,
29896,
29897,
13,
4706,
620,
29889,
4397,
29898,
10109,
29889,
7302,
29918,
12674,
29898,
18182,
303,
1092,
820,
29892,
6796,
11526,
29995,
29881,
29908,
1273,
474,
29892,
376,
11526,
29995,
29881,
29908,
1273,
313,
29875,
29974,
29896,
511,
11009,
29906,
12622,
13,
13,
1678,
931,
29889,
17059,
29898,
29900,
29889,
29945,
29897,
13,
13,
1678,
12893,
353,
1090,
11526,
29879,
29889,
2677,
703,
1688,
29918,
4645,
1159,
13,
1678,
6251,
29918,
11526,
353,
12893,
29889,
11526,
29879,
3366,
11526,
29900,
3108,
13,
1678,
6876,
29918,
11526,
353,
12893,
29889,
11526,
29879,
3366,
11526,
29995,
29881,
29908,
1273,
313,
9877,
29918,
11526,
29879,
29899,
29896,
4638,
13,
13,
1678,
5434,
353,
2279,
3406,
29889,
7892,
29898,
10685,
29918,
1454,
29918,
25990,
29892,
6876,
29918,
11526,
29892,
302,
29890,
29918,
25990,
29897,
13,
13,
1678,
1596,
14182,
29876,
29905,
29876,
29905,
29876,
1184,
13573,
1218,
1273,
29881,
1735,
29898,
29879,
29897,
515,
3186,
1273,
29879,
17794,
1273,
313,
9877,
29918,
25990,
29892,
6251,
29918,
11526,
876,
13,
1678,
8722,
10646,
703,
2962,
1243,
411,
1273,
29881,
3186,
29879,
29908,
1273,
302,
29890,
29918,
11526,
29879,
29897,
13,
13,
13,
1678,
363,
474,
297,
3464,
29898,
9877,
29918,
25990,
1125,
13,
4706,
302,
353,
9071,
580,
13,
4706,
302,
29889,
978,
353,
376,
3177,
29918,
29995,
29881,
29908,
1273,
474,
13,
4706,
6251,
29918,
11526,
29889,
24645,
29889,
4397,
29918,
392,
29918,
7728,
351,
403,
29898,
29876,
29897,
13,
4706,
931,
29889,
17059,
29898,
29900,
29889,
29900,
29896,
29897,
13,
13,
1678,
3595,
29892,
14385,
353,
5434,
29889,
2914,
580,
13,
13,
1678,
8722,
10646,
703,
355,
1243,
1159,
13,
13,
13,
1678,
565,
3595,
338,
6213,
29901,
13,
4706,
17927,
29889,
2704,
703,
1576,
3620,
505,
451,
1063,
3595,
29991,
1159,
13,
4706,
14385,
353,
29871,
29900,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
3112,
3614,
1273,
29879,
304,
367,
451,
2164,
310,
278,
1273,
29881,
1735,
29898,
29879,
29897,
297,
3186,
1273,
29879,
29908,
1273,
313,
1516,
29898,
19708,
511,
302,
29890,
29918,
25990,
29892,
6876,
29918,
11526,
876,
13,
13,
1678,
2279,
3406,
29889,
845,
329,
3204,
29898,
10685,
29922,
5574,
29897,
13,
13,
1678,
363,
282,
297,
8450,
267,
29901,
13,
4706,
282,
29889,
6717,
29898,
5574,
29897,
13,
1678,
11565,
29889,
5358,
580,
13,
1678,
11565,
29889,
7122,
580,
13,
1678,
12893,
29889,
5358,
580,
13,
13,
1678,
736,
14385,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1411,
800,
353,
6571,
13,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
3317,
11526,
29879,
613,
2322,
29922,
29945,
29892,
1134,
29922,
524,
29892,
302,
5085,
543,
29973,
613,
1371,
543,
7976,
12539,
1353,
310,
7634,
11526,
29879,
3186,
29879,
304,
29178,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
29899,
29881,
613,
376,
489,
8382,
613,
1371,
543,
8382,
4464,
613,
3158,
543,
8899,
29918,
3009,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
29899,
1289,
613,
376,
489,
8159,
8382,
613,
1371,
543,
8382,
4464,
313,
369,
15828,
19123,
3158,
543,
8899,
29918,
3009,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
29899,
29875,
613,
376,
489,
25629,
284,
613,
3158,
543,
8899,
29918,
3009,
613,
1371,
543,
1688,
363,
1432,
302,
29890,
310,
3186,
29879,
29892,
515,
29871,
29906,
304,
4236,
11526,
29879,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
29899,
29878,
613,
376,
489,
14358,
613,
2322,
29922,
29896,
29892,
1134,
29922,
524,
29892,
302,
5085,
543,
29973,
613,
1371,
543,
3525,
1784,
3064,
278,
1243,
881,
367,
10324,
313,
4381,
29901,
694,
12312,
25760,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
29899,
29883,
613,
376,
489,
25990,
613,
2322,
29922,
29896,
29892,
1134,
29922,
524,
29892,
302,
5085,
543,
29973,
613,
1371,
543,
3525,
1784,
3620,
881,
367,
13089,
630,
313,
4381,
29901,
697,
25760,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
1678,
565,
6389,
29889,
8382,
470,
6389,
29889,
8159,
8382,
29901,
13,
4706,
565,
6389,
29889,
8159,
8382,
29901,
13,
9651,
12183,
29889,
16121,
3991,
29898,
5563,
29922,
21027,
29889,
18525,
29897,
13,
4706,
1683,
29901,
13,
9651,
12183,
29889,
16121,
3991,
29898,
5563,
29922,
21027,
29889,
11690,
29897,
13,
1678,
1683,
29901,
13,
4706,
17927,
29889,
842,
10108,
29898,
21027,
29889,
29956,
15249,
29897,
13,
13,
1678,
1375,
11526,
29879,
353,
29871,
29906,
565,
6389,
29889,
25629,
284,
1683,
6389,
29889,
3317,
11526,
29879,
13,
13,
1678,
363,
22645,
297,
3464,
29898,
29900,
29892,
6389,
29889,
14358,
1125,
13,
4706,
1596,
14182,
29876,
29905,
29876,
29905,
29876,
489,
20504,
362,
396,
29995,
29881,
1192,
29905,
29876,
29908,
1273,
22645,
29897,
13,
13,
4706,
363,
302,
29890,
297,
3464,
29898,
1195,
11526,
29879,
29892,
6389,
29889,
3317,
11526,
29879,
29974,
29896,
1125,
13,
9651,
1596,
14182,
29876,
29905,
29876,
29905,
29876,
489,
1273,
29881,
3186,
29879,
1192,
29905,
29876,
29908,
1273,
302,
29890,
29897,
13,
13,
9651,
1923,
353,
1090,
11526,
29879,
29889,
2974,
29889,
2962,
580,
13,
9651,
1411,
800,
29889,
842,
4381,
29898,
9877,
29892,
2636,
467,
4397,
29898,
1688,
29918,
7728,
351,
362,
29918,
2230,
29898,
9877,
29892,
6389,
29889,
25990,
876,
13,
9651,
1923,
29889,
9847,
29898,
29900,
467,
10685,
580,
13,
13,
13,
4706,
931,
29889,
17059,
29898,
29900,
29889,
29945,
29897,
13,
13,
4706,
363,
302,
29890,
29892,
3706,
297,
1411,
800,
29889,
7076,
7295,
13,
9651,
1596,
11702,
29881,
29936,
29995,
29879,
29908,
1273,
313,
9877,
29892,
12159,
1642,
7122,
4197,
710,
11702,
29889,
29896,
29888,
29908,
1273,
313,
29881,
334,
29871,
29896,
29900,
29900,
29900,
876,
363,
270,
297,
3064,
29962,
4961,
13,
13,
13,
2
] |
__init__.py | zznop/bn-kconfig-recover | 18 | 35012 | <filename>__init__.py
"""
Binary Ninja plugin for recovering kernel build configuration settings using BNIL
"""
import argparse
import logging
from binaryninja import (BinaryViewType, BinaryView, PluginCommand,
SaveFileNameField, get_form_input, BackgroundTaskThread)
class RecoverKConfigBackground(BackgroundTaskThread):
"""Class for running kernel configuration recovery in background
"""
def __init__(self, view: BinaryView, outpath: str) -> None:
BackgroundTaskThread.__init__(self, 'Recovering Linux kernel configuration', False)
self.outpath = outpath
self.view = view
def run(self):
"""Run analysis task
"""
self.view.reanalyze()
self.view.update_analysis_and_wait()
kconfigr = KConfigRecover(self.view)
config = kconfigr.recover()
save_kconfig(config, self.outpath)
self.progress = ""
def run_from_ui(view: BinaryView) -> None:
"""Run as a plugin under the UI
Args:
view: Binary view
"""
logger = logging.getLogger()
logger.setLevel(logging.INFO)
config_field = SaveFileNameField('Configuration Output Path')
get_form_input([config_field], 'Kernel Configuration Recovery Options')
outpath = 'generated.config'
if config_field.result != '':
outpath = config_field.result
kconfig_task = RecoverKConfigBackground(view, outpath)
kconfig_task.start()
def parse_args() -> argparse.Namespace:
"""Parses command line arguments.
Returns:
Parsed command line arguments.
"""
parser = argparse.ArgumentParser()
parser.add_argument(
'bndb', help='File path to kernel ELF or Binary Ninja database')
parser.add_argument(
'kconfig', help='File path to save recovered kernel configuration')
parser.add_argument('-d',
'--debug',
action='store_true',
help='Enable debug logging')
return parser.parse_args()
def run_headless() -> None:
"""Parse command line arguments and run app.
"""
args = parse_args()
logger = logging.getLogger()
if args.debug:
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.INFO)
logging.info('Opening "%s" and getting view...', args.bndb)
view = BinaryViewType.get_view_of_file(args.bndb)
logging.info('Running BN analysis, this may take some time...')
kconfig_task = RecoverKConfigBackground(view, args.kconfig)
kconfig_task.start()
if __name__ == '__main__':
from kconfig import KConfigRecover, save_kconfig
run_headless()
else:
from .kconfig import KConfigRecover, save_kconfig
PluginCommand.register(
"Recover Linux kernel config",
"Analyze Linux kernel binary and recover kernel configuration options",
run_from_ui,
)
| [
1,
529,
9507,
29958,
1649,
2344,
26914,
2272,
13,
15945,
29908,
13,
25196,
27960,
1764,
7079,
363,
9792,
292,
8466,
2048,
5285,
6055,
773,
350,
29940,
6227,
13,
15945,
29908,
13,
13,
5215,
1852,
5510,
13,
5215,
12183,
13,
3166,
7581,
29876,
262,
1764,
1053,
313,
25196,
1043,
1542,
29892,
29479,
1043,
29892,
1858,
3851,
6255,
29892,
13,
462,
308,
16913,
17020,
3073,
29892,
679,
29918,
689,
29918,
2080,
29892,
16585,
5398,
4899,
29897,
13,
13,
1990,
3599,
957,
29968,
3991,
10581,
29898,
10581,
5398,
4899,
1125,
13,
1678,
9995,
2385,
363,
2734,
8466,
5285,
24205,
297,
3239,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1776,
29901,
29479,
1043,
29892,
714,
2084,
29901,
851,
29897,
1599,
6213,
29901,
13,
4706,
16585,
5398,
4899,
17255,
2344,
12035,
1311,
29892,
525,
4789,
957,
292,
8074,
8466,
5285,
742,
7700,
29897,
13,
4706,
1583,
29889,
449,
2084,
353,
714,
2084,
13,
4706,
1583,
29889,
1493,
353,
1776,
13,
13,
1678,
822,
1065,
29898,
1311,
1125,
13,
4706,
9995,
6558,
7418,
3414,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
1493,
29889,
276,
24209,
911,
580,
13,
4706,
1583,
29889,
1493,
29889,
5504,
29918,
15916,
29918,
392,
29918,
10685,
580,
13,
4706,
413,
2917,
29878,
353,
476,
3991,
4789,
957,
29898,
1311,
29889,
1493,
29897,
13,
4706,
2295,
353,
413,
2917,
29878,
29889,
3757,
957,
580,
13,
4706,
4078,
29918,
29895,
2917,
29898,
2917,
29892,
1583,
29889,
449,
2084,
29897,
13,
4706,
1583,
29889,
18035,
353,
5124,
13,
13,
1753,
1065,
29918,
3166,
29918,
1481,
29898,
1493,
29901,
29479,
1043,
29897,
1599,
6213,
29901,
13,
1678,
9995,
6558,
408,
263,
7079,
1090,
278,
3740,
13,
13,
1678,
826,
3174,
29901,
13,
418,
1776,
29901,
29479,
1776,
13,
1678,
9995,
13,
13,
1678,
17927,
353,
12183,
29889,
657,
16363,
580,
13,
1678,
17927,
29889,
842,
10108,
29898,
21027,
29889,
11690,
29897,
13,
13,
1678,
2295,
29918,
2671,
353,
16913,
17020,
3073,
877,
8614,
10604,
10802,
1495,
13,
1678,
679,
29918,
689,
29918,
2080,
4197,
2917,
29918,
2671,
1402,
525,
29968,
5851,
20999,
3599,
22205,
25186,
1495,
13,
1678,
714,
2084,
353,
525,
13525,
29889,
2917,
29915,
13,
1678,
565,
2295,
29918,
2671,
29889,
2914,
2804,
525,
2396,
13,
4706,
714,
2084,
353,
2295,
29918,
2671,
29889,
2914,
13,
13,
1678,
413,
2917,
29918,
7662,
353,
3599,
957,
29968,
3991,
10581,
29898,
1493,
29892,
714,
2084,
29897,
13,
1678,
413,
2917,
29918,
7662,
29889,
2962,
580,
13,
13,
1753,
6088,
29918,
5085,
580,
1599,
1852,
5510,
29889,
23335,
29901,
13,
1678,
9995,
29925,
1503,
267,
1899,
1196,
6273,
29889,
13,
13,
1678,
16969,
29901,
13,
418,
1459,
8485,
1899,
1196,
6273,
29889,
13,
1678,
9995,
13,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
525,
29890,
299,
29890,
742,
1371,
2433,
2283,
2224,
304,
8466,
14845,
29943,
470,
29479,
27960,
1764,
2566,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
525,
29895,
2917,
742,
1371,
2433,
2283,
2224,
304,
4078,
24776,
8466,
5285,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
29899,
29881,
742,
13,
462,
4706,
525,
489,
8382,
742,
13,
462,
4706,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
4706,
1371,
2433,
20701,
4744,
12183,
1495,
13,
1678,
736,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
1753,
1065,
29918,
2813,
2222,
580,
1599,
6213,
29901,
13,
1678,
9995,
12914,
1899,
1196,
6273,
322,
1065,
623,
29889,
13,
1678,
9995,
13,
13,
1678,
6389,
353,
6088,
29918,
5085,
580,
13,
13,
1678,
17927,
353,
12183,
29889,
657,
16363,
580,
13,
1678,
565,
6389,
29889,
8382,
29901,
13,
4706,
17927,
29889,
842,
10108,
29898,
21027,
29889,
18525,
29897,
13,
1678,
1683,
29901,
13,
4706,
17927,
29889,
842,
10108,
29898,
21027,
29889,
11690,
29897,
13,
13,
1678,
12183,
29889,
3888,
877,
6585,
292,
11860,
29879,
29908,
322,
2805,
1776,
856,
742,
6389,
29889,
29890,
299,
29890,
29897,
13,
1678,
1776,
353,
29479,
1043,
1542,
29889,
657,
29918,
1493,
29918,
974,
29918,
1445,
29898,
5085,
29889,
29890,
299,
29890,
29897,
13,
1678,
12183,
29889,
3888,
877,
27795,
350,
29940,
7418,
29892,
445,
1122,
2125,
777,
931,
856,
1495,
13,
13,
1678,
413,
2917,
29918,
7662,
353,
3599,
957,
29968,
3991,
10581,
29898,
1493,
29892,
6389,
29889,
29895,
2917,
29897,
13,
1678,
413,
2917,
29918,
7662,
29889,
2962,
580,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
515,
413,
2917,
1053,
476,
3991,
4789,
957,
29892,
4078,
29918,
29895,
2917,
13,
1678,
1065,
29918,
2813,
2222,
580,
13,
2870,
29901,
13,
1678,
515,
869,
29895,
2917,
1053,
476,
3991,
4789,
957,
29892,
4078,
29918,
29895,
2917,
13,
1678,
1858,
3851,
6255,
29889,
9573,
29898,
13,
4706,
376,
4789,
957,
8074,
8466,
2295,
613,
13,
4706,
376,
2744,
14997,
911,
8074,
8466,
7581,
322,
9792,
8466,
5285,
3987,
613,
13,
4706,
1065,
29918,
3166,
29918,
1481,
29892,
13,
1678,
1723,
13,
2
] |
Temperatura.py | russeleiser/ProjectTemperature | 0 | 37205 | print ("--------------------------------------------------------")
print ("-------------Bienvenido a la Temperatura----------------")
print ("--------------------------------------------------------\n")
x = 0
while x < 10000:
print ("Elige tus opciones:")
print ("(1) Convertir de °C a °F")
print ("(2) Convertir de °C a °K")
print ("(3) Convertir de °F a °C")
print ("(4) Convertir de °F a °K")
print ("(5) Convertir de °K a °C")
print ("(6) Convertir de °K a °F\n")
op = int(input("Elige una opcion de acuerdo a su numero: "))
if op ==1:
r11 = int(input("Escriba el numero que quiere convertir: "))
var11 = r11
var12 = var11 * 1.8
var13 = var12 + 32
print ("°F =", var11, "x 1.8 + 32\n°F =", var12,"+ 32\n°F =", var13,"\n")
elif op ==2:
r12 = int(input("Escriba el numero que quiere convertir: "))
var21 = r12
var22 = var21 + 273
print ("°K =", var21, "-273\n°K =", var22,"\n")
elif op ==3:
r13 = int(input("Escriba el numero que quiere convertir: "))
var31 = r13
var32 = var31 - 32
var33 = var32 / 1.8
print ("°C = (", var31,"- 32 ) / 1.8\n°C =", var32, "/ 1.8\n°C =", var33, "\n")
elif op ==4:
r14 = int(input("Escriba el numero que quiere convertir: "))
var41 = r14
var42 = var41 - 32
bla = 0.5 * var42
var43 = bla + 273
print ("°K = 5/9 (", var41,"- 32 ) + 273\n°K = 5/9", var42, "+ 273\n°K = 0.5 x", var42,"+ 273\n°K =",var43, "\n")
elif op ==5:
r15 = int(input("Escriba el numero que quiere convertir: "))
var51 = r15
var52 = var51 - 273
print ("El resultado es: ", var52)
elif op ==6:
r16 = int(input("Escriba el numero que quiere convertir: "))
var61 = r16
var62 = var61 - 273
num = 1.8 * var62
var63 = num + 32
print ("El resultado es: ", var63)
else:
print ("Esta opcion no existe, ingrese una nueva opcion...")
x = x + 1
| [
1,
1596,
4852,
2683,
2683,
2683,
1378,
1159,
13,
2158,
4852,
9072,
29899,
29933,
819,
854,
1941,
263,
425,
6789,
546,
7969,
2683,
1159,
13,
2158,
4852,
2683,
2683,
2683,
1378,
29905,
29876,
1159,
13,
13,
29916,
353,
29871,
29900,
13,
8000,
921,
529,
29871,
29896,
29900,
29900,
29900,
29900,
29901,
13,
13,
1678,
1596,
4852,
6489,
2231,
260,
375,
1015,
17593,
29901,
1159,
13,
13,
1678,
1596,
4852,
29898,
29896,
29897,
14806,
381,
316,
6719,
29907,
263,
6719,
29943,
1159,
13,
1678,
1596,
4852,
29898,
29906,
29897,
14806,
381,
316,
6719,
29907,
263,
6719,
29968,
1159,
13,
1678,
1596,
4852,
29898,
29941,
29897,
14806,
381,
316,
6719,
29943,
263,
6719,
29907,
1159,
13,
1678,
1596,
4852,
29898,
29946,
29897,
14806,
381,
316,
6719,
29943,
263,
6719,
29968,
1159,
13,
1678,
1596,
4852,
29898,
29945,
29897,
14806,
381,
316,
6719,
29968,
263,
6719,
29907,
1159,
13,
1678,
1596,
4852,
29898,
29953,
29897,
14806,
381,
316,
6719,
29968,
263,
6719,
29943,
29905,
29876,
1159,
13,
13,
1678,
1015,
353,
938,
29898,
2080,
703,
6489,
2231,
1185,
1015,
12401,
316,
1274,
25768,
263,
480,
17910,
29901,
376,
876,
13,
13,
1678,
565,
1015,
1275,
29896,
29901,
13,
4706,
364,
29896,
29896,
353,
938,
29898,
2080,
703,
29923,
7588,
2291,
560,
17910,
712,
1750,
406,
3588,
381,
29901,
376,
876,
13,
4706,
722,
29896,
29896,
353,
364,
29896,
29896,
13,
4706,
722,
29896,
29906,
353,
722,
29896,
29896,
334,
29871,
29896,
29889,
29947,
13,
4706,
722,
29896,
29941,
353,
722,
29896,
29906,
718,
29871,
29941,
29906,
13,
4706,
1596,
4852,
30073,
29943,
353,
613,
722,
29896,
29896,
29892,
376,
29916,
29871,
29896,
29889,
29947,
718,
29871,
29941,
29906,
29905,
29876,
30073,
29943,
353,
613,
722,
29896,
29906,
1699,
29974,
29871,
29941,
29906,
29905,
29876,
30073,
29943,
353,
613,
722,
29896,
29941,
1699,
29905,
29876,
1159,
13,
268,
13,
1678,
25342,
1015,
1275,
29906,
29901,
13,
4706,
364,
29896,
29906,
353,
938,
29898,
2080,
703,
29923,
7588,
2291,
560,
17910,
712,
1750,
406,
3588,
381,
29901,
376,
876,
13,
4706,
722,
29906,
29896,
353,
364,
29896,
29906,
13,
4706,
722,
29906,
29906,
353,
722,
29906,
29896,
718,
29871,
29906,
29955,
29941,
13,
4706,
1596,
4852,
30073,
29968,
353,
613,
722,
29906,
29896,
29892,
11663,
29906,
29955,
29941,
29905,
29876,
30073,
29968,
353,
613,
722,
29906,
29906,
1699,
29905,
29876,
1159,
13,
13,
1678,
25342,
1015,
1275,
29941,
29901,
13,
4706,
364,
29896,
29941,
353,
938,
29898,
2080,
703,
29923,
7588,
2291,
560,
17910,
712,
1750,
406,
3588,
381,
29901,
376,
876,
13,
4706,
722,
29941,
29896,
353,
364,
29896,
29941,
13,
4706,
722,
29941,
29906,
353,
722,
29941,
29896,
448,
29871,
29941,
29906,
13,
4706,
722,
29941,
29941,
353,
722,
29941,
29906,
847,
29871,
29896,
29889,
29947,
13,
4706,
1596,
4852,
30073,
29907,
353,
313,
613,
722,
29941,
29896,
1699,
29899,
29871,
29941,
29906,
1723,
847,
29871,
29896,
29889,
29947,
29905,
29876,
30073,
29907,
353,
613,
722,
29941,
29906,
29892,
5591,
29871,
29896,
29889,
29947,
29905,
29876,
30073,
29907,
353,
613,
722,
29941,
29941,
29892,
6634,
29876,
1159,
13,
13,
1678,
25342,
1015,
1275,
29946,
29901,
13,
4706,
364,
29896,
29946,
353,
938,
29898,
2080,
703,
29923,
7588,
2291,
560,
17910,
712,
1750,
406,
3588,
381,
29901,
376,
876,
13,
4706,
722,
29946,
29896,
353,
364,
29896,
29946,
13,
4706,
722,
29946,
29906,
353,
722,
29946,
29896,
448,
29871,
29941,
29906,
13,
4706,
12995,
353,
29871,
29900,
29889,
29945,
334,
722,
29946,
29906,
13,
4706,
722,
29946,
29941,
353,
12995,
718,
29871,
29906,
29955,
29941,
13,
4706,
1596,
4852,
30073,
29968,
353,
29871,
29945,
29914,
29929,
313,
613,
722,
29946,
29896,
1699,
29899,
29871,
29941,
29906,
1723,
718,
29871,
29906,
29955,
29941,
29905,
29876,
30073,
29968,
353,
29871,
29945,
29914,
29929,
613,
722,
29946,
29906,
29892,
15691,
29871,
29906,
29955,
29941,
29905,
29876,
30073,
29968,
353,
29871,
29900,
29889,
29945,
921,
613,
722,
29946,
29906,
1699,
29974,
29871,
29906,
29955,
29941,
29905,
29876,
30073,
29968,
353,
613,
1707,
29946,
29941,
29892,
6634,
29876,
1159,
13,
13,
1678,
25342,
1015,
1275,
29945,
29901,
13,
4706,
364,
29896,
29945,
353,
938,
29898,
2080,
703,
29923,
7588,
2291,
560,
17910,
712,
1750,
406,
3588,
381,
29901,
376,
876,
13,
4706,
722,
29945,
29896,
353,
364,
29896,
29945,
13,
4706,
722,
29945,
29906,
353,
722,
29945,
29896,
448,
29871,
29906,
29955,
29941,
13,
4706,
1596,
4852,
6489,
24578,
831,
29901,
9162,
722,
29945,
29906,
29897,
13,
13,
1678,
25342,
1015,
1275,
29953,
29901,
13,
4706,
364,
29896,
29953,
353,
938,
29898,
2080,
703,
29923,
7588,
2291,
560,
17910,
712,
1750,
406,
3588,
381,
29901,
376,
876,
13,
4706,
722,
29953,
29896,
353,
364,
29896,
29953,
13,
4706,
722,
29953,
29906,
353,
722,
29953,
29896,
448,
29871,
29906,
29955,
29941,
13,
4706,
954,
353,
29871,
29896,
29889,
29947,
334,
722,
29953,
29906,
13,
4706,
722,
29953,
29941,
353,
954,
718,
29871,
29941,
29906,
13,
4706,
1596,
4852,
6489,
24578,
831,
29901,
9162,
722,
29953,
29941,
29897,
13,
13,
1678,
1683,
29901,
13,
4706,
1596,
4852,
29923,
5173,
1015,
12401,
694,
19947,
29892,
2348,
690,
29872,
1185,
22288,
1015,
12401,
856,
1159,
13,
268,
13,
1678,
921,
353,
921,
718,
29871,
29896,
13,
2
] |
mura/eval.py | ZZ87229861/benchmarx | 0 | 197623 | <reponame>ZZ87229861/benchmarx<gh_stars>0
#!/usr/bin/env python3
import os
import sys
import simplejson as json
import subprocess as sp
if len(sys.argv) != 2:
print("Usage: %s result_file" % sys.argv[0])
sys.exit(0)
result_file = sys.argv[1]
ROOT = os.path.abspath(os.path.dirname(__file__))
kapp = os.path.abspath(os.path.join(ROOT, 'kapp.pl'))
official = os.path.abspath(os.path.join(ROOT, 'evaluate-v1.1.py'))
gt = os.path.abspath(os.path.join(ROOT, '../data/mura/train_labeled_studies.csv'))
if not os.path.isfile(gt):
print("Create a symbolic link benchmarx/data/mura which should point to MURA-v1.1")
print("You should see benchmarx/data/mura/train_labeled_studies.csv")
sys.exit(0)
lookup = {}
with open(gt, 'r') as f:
for l in f:
k, v = l.strip().split(',')
lookup[k] = v
C = 0
with open(result_file, 'r') as f, \
open('temp_gt_xxxx', 'w') as of:
for l in f:
k, v = l.strip().split(',')
assert k in lookup
of.write('%s,%s\n' % (k, lookup[k]))
C += 1
pass
pass
print('evaluating %s lines' % C)
st = sp.check_output('python %s temp_gt_xxxx %s' % (official, result_file), shell=True)
print(json.dumps(json.loads(st), indent=4, sort_keys=True))
sp.check_call('%s temp_gt_xxxx %s' % (kapp, result_file), shell=True)
sp.check_call('rm temp_gt_xxxx', shell=True)
| [
1,
529,
276,
1112,
420,
29958,
29999,
29999,
29947,
29955,
29906,
29906,
29929,
29947,
29953,
29896,
29914,
1785,
305,
3034,
29916,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
2560,
3126,
408,
4390,
13,
5215,
1014,
5014,
408,
805,
13,
13,
361,
7431,
29898,
9675,
29889,
19218,
29897,
2804,
29871,
29906,
29901,
13,
1678,
1596,
703,
27573,
29901,
1273,
29879,
1121,
29918,
1445,
29908,
1273,
10876,
29889,
19218,
29961,
29900,
2314,
13,
1678,
10876,
29889,
13322,
29898,
29900,
29897,
13,
13,
2914,
29918,
1445,
353,
10876,
29889,
19218,
29961,
29896,
29962,
13,
13,
21289,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
876,
13,
13,
29895,
932,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
7122,
29898,
21289,
29892,
525,
29895,
932,
29889,
572,
8785,
13,
29877,
7880,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
7122,
29898,
21289,
29892,
525,
24219,
403,
29899,
29894,
29896,
29889,
29896,
29889,
2272,
8785,
13,
13,
4141,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
7122,
29898,
21289,
29892,
525,
6995,
1272,
29914,
29885,
2002,
29914,
14968,
29918,
29880,
24025,
29918,
18082,
583,
29889,
7638,
8785,
13,
13,
361,
451,
2897,
29889,
2084,
29889,
275,
1445,
29898,
4141,
1125,
13,
1678,
1596,
703,
4391,
263,
5829,
293,
1544,
3856,
305,
3034,
29916,
29914,
1272,
29914,
29885,
2002,
607,
881,
1298,
304,
341,
4574,
29909,
29899,
29894,
29896,
29889,
29896,
1159,
13,
1678,
1596,
703,
3492,
881,
1074,
3856,
305,
3034,
29916,
29914,
1272,
29914,
29885,
2002,
29914,
14968,
29918,
29880,
24025,
29918,
18082,
583,
29889,
7638,
1159,
13,
1678,
10876,
29889,
13322,
29898,
29900,
29897,
13,
13,
13,
20401,
353,
6571,
13,
2541,
1722,
29898,
4141,
29892,
525,
29878,
1495,
408,
285,
29901,
13,
1678,
363,
301,
297,
285,
29901,
13,
4706,
413,
29892,
325,
353,
301,
29889,
17010,
2141,
5451,
29317,
1495,
13,
4706,
16280,
29961,
29895,
29962,
353,
325,
13,
13,
29907,
353,
29871,
29900,
13,
2541,
1722,
29898,
2914,
29918,
1445,
29892,
525,
29878,
1495,
408,
285,
29892,
320,
13,
1678,
1722,
877,
7382,
29918,
4141,
29918,
14633,
742,
525,
29893,
1495,
408,
310,
29901,
13,
1678,
363,
301,
297,
285,
29901,
13,
4706,
413,
29892,
325,
353,
301,
29889,
17010,
2141,
5451,
29317,
1495,
13,
4706,
4974,
413,
297,
16280,
13,
4706,
310,
29889,
3539,
877,
29995,
29879,
24163,
29879,
29905,
29876,
29915,
1273,
313,
29895,
29892,
16280,
29961,
29895,
12622,
13,
4706,
315,
4619,
29871,
29896,
13,
4706,
1209,
13,
1678,
1209,
13,
13,
2158,
877,
24219,
1218,
1273,
29879,
3454,
29915,
1273,
315,
29897,
13,
303,
353,
805,
29889,
3198,
29918,
4905,
877,
4691,
1273,
29879,
5694,
29918,
4141,
29918,
14633,
1273,
29879,
29915,
1273,
313,
29877,
7880,
29892,
1121,
29918,
1445,
511,
6473,
29922,
5574,
29897,
13,
2158,
29898,
3126,
29889,
29881,
17204,
29898,
3126,
29889,
18132,
29898,
303,
511,
29536,
29922,
29946,
29892,
2656,
29918,
8149,
29922,
5574,
876,
13,
1028,
29889,
3198,
29918,
4804,
877,
29995,
29879,
5694,
29918,
4141,
29918,
14633,
1273,
29879,
29915,
1273,
313,
29895,
932,
29892,
1121,
29918,
1445,
511,
6473,
29922,
5574,
29897,
13,
1028,
29889,
3198,
29918,
4804,
877,
1758,
5694,
29918,
4141,
29918,
14633,
742,
6473,
29922,
5574,
29897,
13,
2
] |
python/language/lang.py | kenkeiras/codigoparallevar | 2 | 64311 | #!/usr/bin/env python
# coding: utf-8
import re
import os
import sys
# Define un color para mostrar los resultados
color = True
if color:
colorfile = "\x1b[0;92m" # Verde
colorend = "\x1b[0m" # Fin del color
else:
colorfile = colorend = ""
# Diccionarios a comprobar
dictionaries = ["american-english", "british-english", "galician", "spanish"]
path = "/usr/share/dict"
class LangReader:
words = re.compile(r'\w+')
def __init__(self, dicts):
'''Carga los diccionarios con las palabras,
una por línea, en minúsculas.
'''
self.dicts = {}
for d in dicts:
self.dicts[d] = set(map(lambda x: x.strip().lower(),
open(d, "rt").read().strip().split("\n")))
def get_file_props(self, f):
return self.get_props(f.read())
def get_percents(self, data):
'''Devuelve el porcentaje de palabras de cada idioma.'''
props, total = self.get_props(data)
percents = {}
for lang in props:
percents[lang] = round((float(props[lang]) / total) * 100, 2)
return percents
def get_props(self, data):
'''Devuelve el número de palabras que se corresponde
con el diccionario de cada idioma.'''
counters = {}
total = 0
words = map(lambda w: w.lower(), self.words.findall(data))
for lang in self.dicts:
ldict = self.dicts[lang]
counter = 0
for word in words:
if word in ldict:
counter += 1
counters[lang] = counter
return counters, len(words)
if __name__ == "__main__":
if len(sys.argv) == 1:
print >>sys.stderr, "%s <file>" % sys.argv[0]
exit(0)
files = map(lambda x: open(x, "rt"), sys.argv[1:])
os.chdir(path)
ld = LangReader(dictionaries)
first = True
for f in files:
if not first:
print "\n"
props, total = ld.get_file_props(f)
if total > 0:
print "%s%s%s [%i]\n" % (colorfile, f.name, colorend, total)
for i in sorted(props,
lambda x, y: props[x].__cmp__(props[y]),
reverse=True):
print "%5.2f%% %s" % ((props[i] / float(total)) * 100, i)
else:
print "%s%s%s nothing found" % (colorfile, f.name, colorend)
first = False
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
5215,
337,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
29937,
22402,
443,
2927,
1702,
1556,
13678,
1232,
1121,
2255,
13,
2780,
353,
5852,
13,
361,
2927,
29901,
13,
1678,
2927,
1445,
353,
6634,
29916,
29896,
29890,
29961,
29900,
29936,
29929,
29906,
29885,
29908,
29871,
396,
1798,
311,
13,
1678,
2927,
355,
353,
6634,
29916,
29896,
29890,
29961,
29900,
29885,
29908,
418,
396,
4231,
628,
2927,
13,
2870,
29901,
13,
1678,
2927,
1445,
353,
2927,
355,
353,
5124,
13,
13,
29937,
28550,
12401,
8596,
263,
752,
307,
1646,
13,
29467,
4314,
353,
6796,
4183,
2185,
29899,
996,
1674,
613,
376,
26549,
728,
29899,
996,
1674,
613,
376,
23014,
8910,
613,
376,
9653,
728,
3108,
13,
2084,
353,
5591,
4855,
29914,
13653,
29914,
8977,
29908,
13,
13,
13,
1990,
10476,
6982,
29901,
13,
1678,
3838,
353,
337,
29889,
12198,
29898,
29878,
12764,
29893,
29974,
1495,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
9657,
29879,
1125,
13,
4706,
14550,
29907,
21899,
1232,
12124,
12401,
8596,
378,
1869,
27555,
3417,
29892,
13,
965,
1185,
1277,
23698,
29892,
427,
1375,
30030,
1557,
15173,
29889,
13,
4706,
14550,
13,
4706,
1583,
29889,
8977,
29879,
353,
6571,
13,
4706,
363,
270,
297,
9657,
29879,
29901,
13,
9651,
1583,
29889,
8977,
29879,
29961,
29881,
29962,
353,
731,
29898,
1958,
29898,
2892,
921,
29901,
921,
29889,
17010,
2141,
13609,
3285,
13,
462,
462,
1678,
1722,
29898,
29881,
29892,
376,
2273,
2564,
949,
2141,
17010,
2141,
5451,
14182,
29876,
29908,
4961,
13,
13,
1678,
822,
679,
29918,
1445,
29918,
11030,
29898,
1311,
29892,
285,
1125,
13,
4706,
736,
1583,
29889,
657,
29918,
11030,
29898,
29888,
29889,
949,
3101,
13,
13,
1678,
822,
679,
29918,
546,
29883,
1237,
29898,
1311,
29892,
848,
1125,
13,
4706,
14550,
16618,
2491,
345,
560,
1277,
1760,
8339,
316,
27555,
3417,
316,
9747,
1178,
29875,
4125,
29889,
12008,
13,
4706,
17761,
29892,
3001,
353,
1583,
29889,
657,
29918,
11030,
29898,
1272,
29897,
13,
4706,
639,
29883,
1237,
353,
6571,
13,
4706,
363,
6361,
297,
17761,
29901,
13,
9651,
639,
29883,
1237,
29961,
3893,
29962,
353,
4513,
3552,
7411,
29898,
11030,
29961,
3893,
2314,
847,
3001,
29897,
334,
29871,
29896,
29900,
29900,
29892,
29871,
29906,
29897,
13,
4706,
736,
639,
29883,
1237,
13,
13,
1678,
822,
679,
29918,
11030,
29898,
1311,
29892,
848,
1125,
13,
4706,
14550,
16618,
2491,
345,
560,
13831,
316,
27555,
3417,
712,
409,
1034,
690,
1112,
311,
13,
965,
378,
560,
12124,
12401,
2628,
316,
9747,
1178,
29875,
4125,
29889,
12008,
13,
4706,
2613,
2153,
353,
6571,
13,
4706,
3001,
353,
29871,
29900,
13,
4706,
3838,
353,
2910,
29898,
2892,
281,
29901,
281,
29889,
13609,
3285,
1583,
29889,
9303,
29889,
2886,
497,
29898,
1272,
876,
13,
13,
4706,
363,
6361,
297,
1583,
29889,
8977,
29879,
29901,
13,
9651,
301,
8977,
353,
1583,
29889,
8977,
29879,
29961,
3893,
29962,
13,
9651,
6795,
353,
29871,
29900,
13,
9651,
363,
1734,
297,
3838,
29901,
13,
18884,
565,
1734,
297,
301,
8977,
29901,
13,
462,
1678,
6795,
4619,
29871,
29896,
13,
13,
9651,
2613,
2153,
29961,
3893,
29962,
353,
6795,
13,
13,
4706,
736,
2613,
2153,
29892,
7431,
29898,
9303,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
565,
7431,
29898,
9675,
29889,
19218,
29897,
1275,
29871,
29896,
29901,
13,
4706,
1596,
5099,
9675,
29889,
303,
20405,
29892,
11860,
29879,
529,
1445,
11903,
1273,
10876,
29889,
19218,
29961,
29900,
29962,
13,
4706,
6876,
29898,
29900,
29897,
13,
13,
1678,
2066,
353,
2910,
29898,
2892,
921,
29901,
1722,
29898,
29916,
29892,
376,
2273,
4968,
10876,
29889,
19218,
29961,
29896,
29901,
2314,
13,
1678,
2897,
29889,
305,
3972,
29898,
2084,
29897,
13,
13,
1678,
301,
29881,
353,
10476,
6982,
29898,
29467,
4314,
29897,
13,
1678,
937,
353,
5852,
13,
1678,
363,
285,
297,
2066,
29901,
13,
13,
4706,
565,
451,
937,
29901,
13,
9651,
1596,
6634,
29876,
29908,
13,
13,
4706,
17761,
29892,
3001,
353,
301,
29881,
29889,
657,
29918,
1445,
29918,
11030,
29898,
29888,
29897,
13,
4706,
565,
3001,
1405,
29871,
29900,
29901,
13,
9651,
1596,
11860,
29879,
29995,
29879,
29995,
29879,
518,
29995,
29875,
10725,
29876,
29908,
1273,
313,
2780,
1445,
29892,
285,
29889,
978,
29892,
2927,
355,
29892,
3001,
29897,
13,
9651,
363,
474,
297,
12705,
29898,
11030,
29892,
13,
462,
9651,
14013,
921,
29892,
343,
29901,
17761,
29961,
29916,
1822,
1649,
21058,
12035,
11030,
29961,
29891,
11724,
13,
462,
9651,
11837,
29922,
5574,
1125,
13,
13,
18884,
1596,
11860,
29945,
29889,
29906,
29888,
7686,
29871,
1273,
29879,
29908,
1273,
5135,
11030,
29961,
29875,
29962,
847,
5785,
29898,
7827,
876,
334,
29871,
29896,
29900,
29900,
29892,
474,
29897,
13,
13,
4706,
1683,
29901,
13,
9651,
1596,
11860,
29879,
29995,
29879,
29995,
29879,
3078,
1476,
29908,
1273,
313,
2780,
1445,
29892,
285,
29889,
978,
29892,
2927,
355,
29897,
13,
4706,
937,
353,
7700,
13,
2
] |
tests/fixtures.py | vfxetc/sgcache | 13 | 22341 | <reponame>vfxetc/sgcache
from . import uuid
def task_crud(self, shotgun, trigger_poll=lambda: None):
shot_name = uuid(8)
shot = shotgun.create('Shot', {'code': shot_name})
name = uuid(8)
task = shotgun.create('Task', {'content': name, 'entity': shot})
trigger_poll()
x = self.cached.find_one('Task', [('id', 'is', task['id'])], ['content'])
self.assertSameEntity(task, x)
# entity field
x = self.cached.find_one('Task', [('id', 'is', task['id'])], ['entity'])
self.assertSameEntity(shot, x['entity'])
# return through entity field
x = self.cached.find_one('Task', [('id', 'is', task['id'])], ['entity.Shot.code'])
self.assertEqual(shot_name, x['entity.Shot.code'])
# Updates
name += '-2'
shotgun.update('Task', task['id'], {'content': name})
trigger_poll()
x = self.cached.find_one('Task', [('id', 'is', task['id'])], ['content'])
self.assertEqual(x['content'], name)
# Delete
shotgun.delete('Task', task['id'])
trigger_poll()
x = self.cached.find_one('Task', [('id', 'is', task['id'])], ['content'])
self.assertIs(x, None)
x = self.cached.find_one('Task', [('id', 'is', task['id'])], ['content'], retired_only=True)
self.assertSameEntity(task, x)
# Revive
shotgun.revive('Task', task['id'])
trigger_poll()
x = self.cached.find_one('Task', [('id', 'is', task['id'])], ['content'])
self.assertSameEntity(task, x, 'Should get revived task.')
x = self.cached.find_one('Task', [('id', 'is', task['id'])], ['content'], retired_only=True)
self.assertIs(x, None)
| [
1,
529,
276,
1112,
420,
29958,
29894,
11093,
7070,
29914,
5311,
8173,
13,
3166,
869,
1053,
318,
5416,
13,
13,
13,
1753,
3414,
29918,
7283,
566,
29898,
1311,
29892,
10322,
28798,
29892,
7135,
29918,
29886,
3028,
29922,
2892,
29901,
6213,
1125,
13,
13,
1678,
10322,
29918,
978,
353,
318,
5416,
29898,
29947,
29897,
13,
1678,
10322,
353,
10322,
28798,
29889,
3258,
877,
2713,
327,
742,
11117,
401,
2396,
10322,
29918,
978,
1800,
13,
13,
1678,
1024,
353,
318,
5416,
29898,
29947,
29897,
13,
1678,
3414,
353,
10322,
28798,
29889,
3258,
877,
5398,
742,
11117,
3051,
2396,
1024,
29892,
525,
10041,
2396,
10322,
1800,
13,
1678,
7135,
29918,
29886,
3028,
580,
13,
13,
1678,
921,
353,
1583,
29889,
29883,
3791,
29889,
2886,
29918,
650,
877,
5398,
742,
518,
877,
333,
742,
525,
275,
742,
3414,
1839,
333,
11287,
1402,
6024,
3051,
11287,
13,
1678,
1583,
29889,
9294,
29903,
420,
6691,
29898,
7662,
29892,
921,
29897,
13,
13,
1678,
396,
7855,
1746,
13,
1678,
921,
353,
1583,
29889,
29883,
3791,
29889,
2886,
29918,
650,
877,
5398,
742,
518,
877,
333,
742,
525,
275,
742,
3414,
1839,
333,
11287,
1402,
6024,
10041,
11287,
13,
1678,
1583,
29889,
9294,
29903,
420,
6691,
29898,
8962,
29892,
921,
1839,
10041,
11287,
13,
13,
1678,
396,
736,
1549,
7855,
1746,
13,
1678,
921,
353,
1583,
29889,
29883,
3791,
29889,
2886,
29918,
650,
877,
5398,
742,
518,
877,
333,
742,
525,
275,
742,
3414,
1839,
333,
11287,
1402,
6024,
10041,
29889,
2713,
327,
29889,
401,
11287,
13,
1678,
1583,
29889,
9294,
9843,
29898,
8962,
29918,
978,
29892,
921,
1839,
10041,
29889,
2713,
327,
29889,
401,
11287,
13,
13,
1678,
396,
5020,
15190,
13,
1678,
1024,
4619,
17411,
29906,
29915,
13,
1678,
10322,
28798,
29889,
5504,
877,
5398,
742,
3414,
1839,
333,
7464,
11117,
3051,
2396,
1024,
1800,
13,
1678,
7135,
29918,
29886,
3028,
580,
13,
1678,
921,
353,
1583,
29889,
29883,
3791,
29889,
2886,
29918,
650,
877,
5398,
742,
518,
877,
333,
742,
525,
275,
742,
3414,
1839,
333,
11287,
1402,
6024,
3051,
11287,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29916,
1839,
3051,
7464,
1024,
29897,
13,
13,
1678,
396,
21267,
13,
1678,
10322,
28798,
29889,
8143,
877,
5398,
742,
3414,
1839,
333,
11287,
13,
1678,
7135,
29918,
29886,
3028,
580,
13,
1678,
921,
353,
1583,
29889,
29883,
3791,
29889,
2886,
29918,
650,
877,
5398,
742,
518,
877,
333,
742,
525,
275,
742,
3414,
1839,
333,
11287,
1402,
6024,
3051,
11287,
13,
1678,
1583,
29889,
9294,
3624,
29898,
29916,
29892,
6213,
29897,
13,
1678,
921,
353,
1583,
29889,
29883,
3791,
29889,
2886,
29918,
650,
877,
5398,
742,
518,
877,
333,
742,
525,
275,
742,
3414,
1839,
333,
11287,
1402,
6024,
3051,
7464,
16528,
29918,
6194,
29922,
5574,
29897,
13,
1678,
1583,
29889,
9294,
29903,
420,
6691,
29898,
7662,
29892,
921,
29897,
13,
13,
1678,
396,
11459,
573,
13,
1678,
10322,
28798,
29889,
13478,
573,
877,
5398,
742,
3414,
1839,
333,
11287,
13,
1678,
7135,
29918,
29886,
3028,
580,
13,
1678,
921,
353,
1583,
29889,
29883,
3791,
29889,
2886,
29918,
650,
877,
5398,
742,
518,
877,
333,
742,
525,
275,
742,
3414,
1839,
333,
11287,
1402,
6024,
3051,
11287,
13,
1678,
1583,
29889,
9294,
29903,
420,
6691,
29898,
7662,
29892,
921,
29892,
525,
26857,
679,
6664,
2347,
3414,
29889,
1495,
13,
1678,
921,
353,
1583,
29889,
29883,
3791,
29889,
2886,
29918,
650,
877,
5398,
742,
518,
877,
333,
742,
525,
275,
742,
3414,
1839,
333,
11287,
1402,
6024,
3051,
7464,
16528,
29918,
6194,
29922,
5574,
29897,
13,
1678,
1583,
29889,
9294,
3624,
29898,
29916,
29892,
6213,
29897,
13,
2
] |
commands/m_link.py | davidferguson/lektor-markdown-mactutor | 2 | 67477 | <filename>commands/m_link.py
# -*- coding: utf-8 -*-
import re
import mistune
name = 'm_link'
type = 'inline'
position = 0
regex = re.compile(r'\[m\s*(?:=\s*(?P<name>\w+)\s*)?](?P<text>.*?)\[\/m\]')
def render(match):
name = match.group('name')
text = match.group('text')
# special case if there is no explicit name specified, in which case we
# have to derive it ourselves
if name == None:
name = text.split()[-1]
# and remove all accents from it.
name = purge(name)
# format the appropriate link structure
return '<a href="/Mathematicians/%s.html" data-name="%s" onclick="m_popup(this)">%s</a>' % (name,name,text)
def purge(s):
# The below code is modified from the original htmlformat function
# to ensure compatibility
rawch = ['á','à','â','ä','ã','Á','Â','Ä','é','è','ê','ë','É','î','í','ó','ô','ö','ò','õ','Ö','û','ú','ü','ù','Ü','ç','ï','ø','Ø','ñ']
transch = ['a','a','a','a','a','A','A','A','e','e','e','e','E','i','i','o','o','o','o','o','O','u','u','u','u','U','c','i','o','O','n']
for idx, raw in enumerate(rawch):
s = s.replace(raw, transch[idx])
return s
| [
1,
529,
9507,
29958,
26381,
29914,
29885,
29918,
2324,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
337,
13,
5215,
5862,
1540,
13,
13,
13,
978,
353,
525,
29885,
29918,
2324,
29915,
13,
1853,
353,
525,
14764,
29915,
13,
3283,
353,
29871,
29900,
13,
13087,
353,
337,
29889,
12198,
29898,
29878,
12764,
29961,
29885,
29905,
29879,
29930,
10780,
29901,
2013,
29879,
29930,
10780,
29925,
29966,
978,
14247,
29893,
29974,
2144,
29879,
29930,
6877,
850,
29973,
29925,
29966,
726,
29958,
5575,
29973,
2144,
7110,
29914,
29885,
18899,
1495,
13,
13,
13,
1753,
4050,
29898,
4352,
1125,
13,
1678,
1024,
353,
1993,
29889,
2972,
877,
978,
1495,
13,
1678,
1426,
353,
1993,
29889,
2972,
877,
726,
1495,
13,
1678,
396,
4266,
1206,
565,
727,
338,
694,
6261,
1024,
6790,
29892,
297,
607,
1206,
591,
13,
1678,
396,
505,
304,
21340,
372,
20278,
13,
1678,
565,
1024,
1275,
6213,
29901,
13,
4706,
1024,
353,
1426,
29889,
5451,
580,
14352,
29896,
29962,
13,
4706,
396,
322,
3349,
599,
1035,
1237,
515,
372,
29889,
13,
4706,
1024,
353,
3708,
479,
29898,
978,
29897,
13,
1678,
396,
3402,
278,
8210,
1544,
3829,
13,
1678,
736,
12801,
29874,
2822,
13802,
11309,
4579,
14722,
22584,
29879,
29889,
1420,
29908,
848,
29899,
978,
543,
29995,
29879,
29908,
15630,
543,
29885,
29918,
7323,
786,
29898,
1366,
29897,
1013,
29995,
29879,
829,
29874,
16299,
1273,
313,
978,
29892,
978,
29892,
726,
29897,
13,
13,
13,
1753,
3708,
479,
29898,
29879,
1125,
13,
1678,
396,
450,
2400,
775,
338,
9120,
515,
278,
2441,
3472,
4830,
740,
13,
1678,
396,
304,
9801,
24521,
13,
1678,
10650,
305,
259,
353,
6024,
29976,
3788,
30001,
3788,
30057,
3788,
29986,
3788,
30033,
3788,
30102,
3788,
30212,
3788,
30125,
3788,
29948,
3788,
30000,
3788,
30037,
3788,
30083,
3788,
30062,
3788,
30058,
3788,
29983,
3788,
29980,
3788,
30069,
3788,
29997,
3788,
30059,
3788,
30084,
3788,
30094,
3788,
30095,
3788,
30030,
3788,
29993,
3788,
30071,
3788,
30104,
3788,
30019,
3788,
30085,
3788,
30077,
3788,
30222,
3788,
30046,
2033,
13,
1678,
1301,
305,
353,
6024,
29874,
3788,
29874,
3788,
29874,
3788,
29874,
3788,
29874,
3788,
29909,
3788,
29909,
3788,
29909,
3788,
29872,
3788,
29872,
3788,
29872,
3788,
29872,
3788,
29923,
3788,
29875,
3788,
29875,
3788,
29877,
3788,
29877,
3788,
29877,
3788,
29877,
3788,
29877,
3788,
29949,
3788,
29884,
3788,
29884,
3788,
29884,
3788,
29884,
3788,
29965,
3788,
29883,
3788,
29875,
3788,
29877,
3788,
29949,
3788,
29876,
2033,
13,
1678,
363,
22645,
29892,
10650,
297,
26985,
29898,
1610,
305,
1125,
13,
4706,
269,
353,
269,
29889,
6506,
29898,
1610,
29892,
1301,
305,
29961,
13140,
2314,
13,
1678,
736,
269,
13,
2
] |
read_data_objects.py | PawWitGit/alaska-methan-flux | 0 | 180123 | import pandas as pd
import matplotlib as plt
import matplotlib.pyplot as plt
import numpy as np
from read_data import ReadData
# class DataObjects:
# """Create ReadData objects"""
# read_data = ReadData("CH4_Flux_BigTrail_Goldstream_AK.csv")
# """Functions"""
# read_data.return_data_file()
# read_data.return_data_table()
| [
1,
1053,
11701,
408,
10518,
13,
5215,
22889,
408,
14770,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
1303,
29918,
1272,
1053,
7523,
1469,
13,
13,
13,
29937,
770,
3630,
12724,
29901,
13,
13,
29937,
9995,
4391,
7523,
1469,
3618,
15945,
29908,
13,
13,
29937,
1303,
29918,
1272,
353,
7523,
1469,
703,
3210,
29946,
29918,
8754,
1314,
29918,
6970,
5323,
309,
29918,
29954,
1025,
5461,
29918,
22311,
29889,
7638,
1159,
13,
13,
29937,
9995,
6678,
29879,
15945,
29908,
13,
13,
29937,
1303,
29918,
1272,
29889,
2457,
29918,
1272,
29918,
1445,
580,
13,
29937,
1303,
29918,
1272,
29889,
2457,
29918,
1272,
29918,
2371,
580,
13,
2
] |
djnic/core/models.py | avdata99/nic | 8 | 165687 | <reponame>avdata99/nic
from django.db import models
class News(models.Model):
""" novedades internas del sistema """
priority = models.IntegerField(default=50, help_text='0/100 priority level')
title = models.CharField(max_length=90)
description = models.TextField(null=True, blank=True)
object_created = models.DateTimeField(auto_now_add=True)
def __str__(self):
return f'{self.title} {self.object_created}'
class Meta:
ordering = ['-id'] | [
1,
529,
276,
1112,
420,
29958,
485,
1272,
29929,
29929,
29914,
7823,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
13,
13,
1990,
10130,
29898,
9794,
29889,
3195,
1125,
13,
1678,
9995,
2420,
287,
3076,
2836,
294,
628,
10502,
9995,
13,
1678,
20136,
353,
4733,
29889,
7798,
3073,
29898,
4381,
29922,
29945,
29900,
29892,
1371,
29918,
726,
2433,
29900,
29914,
29896,
29900,
29900,
20136,
3233,
1495,
13,
1678,
3611,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29929,
29900,
29897,
13,
1678,
6139,
353,
4733,
29889,
15778,
29898,
4304,
29922,
5574,
29892,
9654,
29922,
5574,
29897,
13,
1678,
1203,
29918,
11600,
353,
4733,
29889,
11384,
3073,
29898,
6921,
29918,
3707,
29918,
1202,
29922,
5574,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
285,
29915,
29912,
1311,
29889,
3257,
29913,
426,
1311,
29889,
3318,
29918,
11600,
10162,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
20520,
353,
6024,
29899,
333,
2033,
2
] |
Backend/pose_analyser/models.py | saksham1991999/Yoga-Pose-Analyser | 0 | 1601017 | from django.db import models
class Pose(models.Model):
name = models.CharField(max_length=256)
description = models.TextField(blank=True, null=True)
file = models.FileField()
def __str__(self):
return self.name
class PoseAnalysis(models.Model):
pose = models.ForeignKey("pose_analyser.Pose", blank=True, null=True, on_delete=models.CASCADE)
image = models.ImageField()
analysis = models.TextField(blank=True, null=True)
| [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
13,
13,
1990,
349,
852,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1024,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29953,
29897,
13,
1678,
6139,
353,
4733,
29889,
15778,
29898,
19465,
29922,
5574,
29892,
1870,
29922,
5574,
29897,
13,
1678,
934,
353,
4733,
29889,
2283,
3073,
580,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
978,
13,
13,
13,
1990,
349,
852,
21067,
4848,
29898,
9794,
29889,
3195,
1125,
13,
1678,
18593,
353,
4733,
29889,
27755,
2558,
703,
4220,
29918,
24209,
643,
29889,
29925,
852,
613,
9654,
29922,
5574,
29892,
1870,
29922,
5574,
29892,
373,
29918,
8143,
29922,
9794,
29889,
29907,
3289,
5454,
2287,
29897,
13,
1678,
1967,
353,
4733,
29889,
2940,
3073,
580,
13,
1678,
7418,
353,
4733,
29889,
15778,
29898,
19465,
29922,
5574,
29892,
1870,
29922,
5574,
29897,
13,
2
] |
python/data_helper.py | justinmzt/text_classification-system | 4 | 106338 | <reponame>justinmzt/text_classification-system<filename>python/data_helper.py
# -*- coding: UTF-8 -*-
import time
class Timer():
def __init__(self):
self.start = time.time()
def print(self, op="训练"):
print("%s用时 %f 秒。" % (op, time.time() - self.start))
def open_file(filename, mode='r'):
"""
常用文件操作,可在python2和python3间切换.
mode: 'r' or 'w' for read or write
"""
# if is_py3:
return open(filename, mode, encoding='utf-8', errors='ignore')
# else:
# return open(filename, mode)
def read_file(filename):
"""读取文件数据"""
output = []
with open_file(filename) as f:
output = [_.strip() for _ in f.readlines()]
return output
def write_list(filename, array):
"""读取文件数据"""
with open_file(filename, 'w') as f:
f.write('\n'.join(array) + '\n')
f.close()
def read_cnews(filename, cut_file=None):
x, y = [], []
with open_file(filename) as tr:
for line in tr:
label, content = line.strip().split('\t')
if content:
x.append(content)
y.append(label)
if cut_file:
x = read_file(cut_file)
return x,y
def write_file(filename, x, y):
with open(filename,'a', encoding='utf8') as f:
if isinstance(x, str) and isinstance(y, str):
f.write('%s\t%s\n' % (y, x))
elif isinstance(x, list) and isinstance(y, list):
if len(x) != len(y):
print("Not same scale.")
return False
for i in range(len(x)):
f.write('%s\t%s\n' % (y[i], x[i]))
else:
print("Write False")
| [
1,
529,
276,
1112,
420,
29958,
5143,
262,
29885,
2065,
29914,
726,
29918,
1990,
2450,
29899,
5205,
29966,
9507,
29958,
4691,
29914,
1272,
29918,
20907,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
18351,
29899,
29947,
448,
29930,
29899,
13,
5215,
931,
13,
1990,
29168,
7295,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
2962,
353,
931,
29889,
2230,
580,
13,
268,
13,
1678,
822,
1596,
29898,
1311,
29892,
1015,
543,
235,
177,
176,
234,
190,
134,
29908,
1125,
13,
4706,
1596,
11702,
29879,
30406,
30594,
1273,
29888,
29871,
234,
170,
149,
30267,
29908,
1273,
313,
459,
29892,
931,
29889,
2230,
580,
448,
1583,
29889,
2962,
876,
13,
13,
1753,
1722,
29918,
1445,
29898,
9507,
29892,
4464,
2433,
29878,
29374,
13,
1678,
9995,
13,
268,
31190,
30406,
30333,
30631,
31904,
30732,
30214,
30682,
30505,
4691,
29906,
30503,
4691,
29941,
31016,
31757,
31640,
29889,
13,
1678,
4464,
29901,
525,
29878,
29915,
470,
525,
29893,
29915,
363,
1303,
470,
2436,
13,
1678,
9995,
13,
29937,
268,
565,
338,
29918,
2272,
29941,
29901,
13,
1678,
736,
1722,
29898,
9507,
29892,
4464,
29892,
8025,
2433,
9420,
29899,
29947,
742,
4436,
2433,
17281,
1495,
13,
29937,
268,
1683,
29901,
13,
29937,
308,
736,
1722,
29898,
9507,
29892,
4464,
29897,
13,
13,
1753,
1303,
29918,
1445,
29898,
9507,
1125,
13,
1678,
9995,
235,
178,
190,
30683,
30333,
30631,
30354,
30763,
15945,
29908,
13,
1678,
1962,
353,
5159,
13,
1678,
411,
1722,
29918,
1445,
29898,
9507,
29897,
408,
285,
29901,
13,
4706,
1962,
353,
518,
5396,
17010,
580,
363,
903,
297,
285,
29889,
949,
9012,
580,
29962,
13,
1678,
736,
1962,
13,
13,
1753,
2436,
29918,
1761,
29898,
9507,
29892,
1409,
1125,
13,
1678,
9995,
235,
178,
190,
30683,
30333,
30631,
30354,
30763,
15945,
29908,
13,
1678,
411,
1722,
29918,
1445,
29898,
9507,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
4706,
285,
29889,
3539,
28909,
29876,
4286,
7122,
29898,
2378,
29897,
718,
11297,
29876,
1495,
13,
4706,
285,
29889,
5358,
580,
13,
13,
1753,
1303,
29918,
29883,
15753,
29898,
9507,
29892,
5700,
29918,
1445,
29922,
8516,
1125,
13,
1678,
921,
29892,
343,
353,
19997,
5159,
13,
1678,
411,
1722,
29918,
1445,
29898,
9507,
29897,
408,
534,
29901,
13,
4706,
363,
1196,
297,
534,
29901,
13,
9651,
3858,
29892,
2793,
353,
1196,
29889,
17010,
2141,
5451,
28909,
29873,
1495,
13,
9651,
565,
2793,
29901,
13,
18884,
921,
29889,
4397,
29898,
3051,
29897,
13,
18884,
343,
29889,
4397,
29898,
1643,
29897,
13,
4706,
565,
5700,
29918,
1445,
29901,
13,
9651,
921,
353,
1303,
29918,
1445,
29898,
7582,
29918,
1445,
29897,
13,
4706,
736,
921,
29892,
29891,
13,
13,
1753,
2436,
29918,
1445,
29898,
9507,
29892,
921,
29892,
343,
1125,
13,
1678,
411,
1722,
29898,
9507,
5501,
29874,
742,
8025,
2433,
9420,
29947,
1495,
408,
285,
29901,
13,
4706,
565,
338,
8758,
29898,
29916,
29892,
851,
29897,
322,
338,
8758,
29898,
29891,
29892,
851,
1125,
13,
9651,
285,
29889,
3539,
877,
29995,
29879,
29905,
29873,
29995,
29879,
29905,
29876,
29915,
1273,
313,
29891,
29892,
921,
876,
13,
4706,
25342,
338,
8758,
29898,
29916,
29892,
1051,
29897,
322,
338,
8758,
29898,
29891,
29892,
1051,
1125,
13,
9651,
565,
7431,
29898,
29916,
29897,
2804,
7431,
29898,
29891,
1125,
13,
18884,
1596,
703,
3664,
1021,
6287,
23157,
13,
18884,
736,
7700,
13,
9651,
363,
474,
297,
3464,
29898,
2435,
29898,
29916,
22164,
13,
18884,
285,
29889,
3539,
877,
29995,
29879,
29905,
29873,
29995,
29879,
29905,
29876,
29915,
1273,
313,
29891,
29961,
29875,
1402,
921,
29961,
29875,
12622,
13,
4706,
1683,
29901,
13,
9651,
1596,
703,
6113,
7700,
1159,
13,
13,
13,
2
] |
MMMaker/core/highlight_extractor.py | C4Ution/MMMaker | 9 | 38707 | <gh_stars>1-10
import numpy as np
import scipy.io.wavfile as wave
from moviepy.editor import VideoFileClip
from scipy.fftpack import fft
from misc import get_random_name
HIGHLIGHT_LENGTH = 0.65
def extract_highlights(file_paths):
"""
:param file_paths: 동영상 경로 리스트
:return: 추출한 하이라이트 동영상 경로 리스트
"""
max_highlights = []
min_highlights = []
for file_path in file_paths:
video_clip = VideoFileClip(file_path)
audio_clip = video_clip.audio
src_audio_file_name = get_random_name('wav')
audio_clip.write_audiofile(src_audio_file_name)
source_wave = wave.read(src_audio_file_name)
stereo_channel_wave = source_wave[1].T[1]
normalize_wave = [(ele / 2 ** 8.) * 2 - 1 for ele in stereo_channel_wave] # this is 8-bit track, now normalized on [-1,1)
# fourier_transform_wave = fft(normalize_wave) # calculate fourier transform (complex numbers list)
fourier_transform_wave = normalize_wave
normalize_time = len(fourier_transform_wave) / video_clip.duration
argmax_frequency = np.argmax(fourier_transform_wave) / normalize_time
argmin_frequency = np.argmin(fourier_transform_wave) / normalize_time
max_highlight_path = max_highlights.append(get_random_name('mp4'))
min_highlight_path = min_highlights.append(get_random_name('mp4'))
start_max = argmax_frequency - (HIGHLIGHT_LENGTH/2)
end_max = argmax_frequency + (HIGHLIGHT_LENGTH/2)
if start_max < 0:
end_max -= start_max
start_max = 0
elif end_max > video_clip.duration:
start_max -= end_max - video_clip.duration
end_max = video_clip.duration
video_clip.subclip(start_max, end_max).write_videofile(max_highlights[-1], codec='libx264', audio_codec='aac')
start_min = argmin_frequency - (HIGHLIGHT_LENGTH/2)
end_min = argmin_frequency + (HIGHLIGHT_LENGTH/2)
if start_min < 0:
end_min -= start_min
start_min = 0
elif end_min > video_clip.duration:
start_min -= end_min - video_clip.duration
end_min = video_clip.duration
video_clip.subclip(start_min, end_min).write_videofile(min_highlights[-1], codec='libx264', audio_codec='aac')
video_clip.close()
return max_highlights, min_highlights
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
12655,
408,
7442,
13,
5215,
4560,
2272,
29889,
601,
29889,
29893,
485,
1445,
408,
10742,
13,
3166,
14064,
2272,
29889,
15204,
1053,
13987,
2283,
29907,
3466,
13,
3166,
4560,
2272,
29889,
600,
29873,
4058,
1053,
285,
615,
13,
13,
3166,
3984,
29883,
1053,
679,
29918,
8172,
29918,
978,
13,
13,
29950,
6259,
29950,
5265,
29954,
3912,
29918,
19433,
353,
29871,
29900,
29889,
29953,
29945,
13,
13,
13,
1753,
6597,
29918,
28970,
29879,
29898,
1445,
29918,
24772,
1125,
13,
1678,
9995,
13,
1678,
584,
3207,
934,
29918,
24772,
29901,
29871,
31000,
31288,
31158,
29871,
31378,
30906,
29871,
30826,
30784,
31177,
13,
1678,
584,
2457,
29901,
29871,
239,
185,
151,
239,
185,
159,
30877,
29871,
30944,
30393,
31197,
30393,
31177,
29871,
31000,
31288,
31158,
29871,
31378,
30906,
29871,
30826,
30784,
31177,
13,
1678,
9995,
13,
13,
1678,
4236,
29918,
28970,
29879,
353,
5159,
13,
1678,
1375,
29918,
28970,
29879,
353,
5159,
13,
13,
1678,
363,
934,
29918,
2084,
297,
934,
29918,
24772,
29901,
13,
4706,
4863,
29918,
24049,
353,
13987,
2283,
29907,
3466,
29898,
1445,
29918,
2084,
29897,
13,
4706,
10348,
29918,
24049,
353,
4863,
29918,
24049,
29889,
18494,
13,
4706,
4765,
29918,
18494,
29918,
1445,
29918,
978,
353,
679,
29918,
8172,
29918,
978,
877,
29893,
485,
1495,
13,
4706,
10348,
29918,
24049,
29889,
3539,
29918,
18494,
1445,
29898,
4351,
29918,
18494,
29918,
1445,
29918,
978,
29897,
13,
4706,
2752,
29918,
27766,
353,
10742,
29889,
949,
29898,
4351,
29918,
18494,
29918,
1445,
29918,
978,
29897,
13,
13,
4706,
269,
12358,
29877,
29918,
12719,
29918,
27766,
353,
2752,
29918,
27766,
29961,
29896,
1822,
29911,
29961,
29896,
29962,
13,
4706,
4226,
675,
29918,
27766,
353,
17288,
6146,
847,
29871,
29906,
3579,
29871,
29947,
1846,
334,
29871,
29906,
448,
29871,
29896,
363,
4552,
297,
269,
12358,
29877,
29918,
12719,
29918,
27766,
29962,
29871,
396,
445,
338,
29871,
29947,
29899,
2966,
5702,
29892,
1286,
4226,
1891,
373,
21069,
29896,
29892,
29896,
29897,
13,
4706,
396,
12584,
4336,
29918,
9067,
29918,
27766,
353,
285,
615,
29898,
8945,
675,
29918,
27766,
29897,
29871,
396,
8147,
12584,
4336,
4327,
313,
19676,
3694,
1051,
29897,
13,
4706,
12584,
4336,
29918,
9067,
29918,
27766,
353,
4226,
675,
29918,
27766,
13,
4706,
4226,
675,
29918,
2230,
353,
7431,
29898,
29888,
283,
4336,
29918,
9067,
29918,
27766,
29897,
847,
4863,
29918,
24049,
29889,
19708,
13,
13,
4706,
1852,
3317,
29918,
10745,
23860,
353,
7442,
29889,
1191,
3317,
29898,
29888,
283,
4336,
29918,
9067,
29918,
27766,
29897,
847,
4226,
675,
29918,
2230,
13,
4706,
1852,
1195,
29918,
10745,
23860,
353,
7442,
29889,
1191,
1195,
29898,
29888,
283,
4336,
29918,
9067,
29918,
27766,
29897,
847,
4226,
675,
29918,
2230,
13,
13,
4706,
4236,
29918,
28970,
29918,
2084,
353,
4236,
29918,
28970,
29879,
29889,
4397,
29898,
657,
29918,
8172,
29918,
978,
877,
1526,
29946,
8785,
13,
4706,
1375,
29918,
28970,
29918,
2084,
353,
1375,
29918,
28970,
29879,
29889,
4397,
29898,
657,
29918,
8172,
29918,
978,
877,
1526,
29946,
8785,
13,
13,
4706,
1369,
29918,
3317,
353,
1852,
3317,
29918,
10745,
23860,
448,
313,
29950,
6259,
29950,
5265,
29954,
3912,
29918,
19433,
29914,
29906,
29897,
13,
4706,
1095,
29918,
3317,
353,
1852,
3317,
29918,
10745,
23860,
718,
313,
29950,
6259,
29950,
5265,
29954,
3912,
29918,
19433,
29914,
29906,
29897,
13,
13,
4706,
565,
1369,
29918,
3317,
529,
29871,
29900,
29901,
13,
9651,
1095,
29918,
3317,
22361,
1369,
29918,
3317,
13,
9651,
1369,
29918,
3317,
353,
29871,
29900,
13,
4706,
25342,
1095,
29918,
3317,
1405,
4863,
29918,
24049,
29889,
19708,
29901,
13,
9651,
1369,
29918,
3317,
22361,
1095,
29918,
3317,
448,
4863,
29918,
24049,
29889,
19708,
13,
9651,
1095,
29918,
3317,
353,
4863,
29918,
24049,
29889,
19708,
13,
13,
4706,
4863,
29918,
24049,
29889,
1491,
24049,
29898,
2962,
29918,
3317,
29892,
1095,
29918,
3317,
467,
3539,
29918,
29894,
680,
974,
488,
29898,
3317,
29918,
28970,
29879,
14352,
29896,
1402,
775,
29883,
2433,
1982,
29916,
29906,
29953,
29946,
742,
10348,
29918,
401,
29883,
2433,
29874,
562,
1495,
13,
13,
4706,
1369,
29918,
1195,
353,
1852,
1195,
29918,
10745,
23860,
448,
313,
29950,
6259,
29950,
5265,
29954,
3912,
29918,
19433,
29914,
29906,
29897,
13,
4706,
1095,
29918,
1195,
353,
1852,
1195,
29918,
10745,
23860,
718,
313,
29950,
6259,
29950,
5265,
29954,
3912,
29918,
19433,
29914,
29906,
29897,
13,
13,
4706,
565,
1369,
29918,
1195,
529,
29871,
29900,
29901,
13,
9651,
1095,
29918,
1195,
22361,
1369,
29918,
1195,
13,
9651,
1369,
29918,
1195,
353,
29871,
29900,
13,
4706,
25342,
1095,
29918,
1195,
1405,
4863,
29918,
24049,
29889,
19708,
29901,
13,
9651,
1369,
29918,
1195,
22361,
1095,
29918,
1195,
448,
4863,
29918,
24049,
29889,
19708,
13,
9651,
1095,
29918,
1195,
353,
4863,
29918,
24049,
29889,
19708,
13,
13,
4706,
4863,
29918,
24049,
29889,
1491,
24049,
29898,
2962,
29918,
1195,
29892,
1095,
29918,
1195,
467,
3539,
29918,
29894,
680,
974,
488,
29898,
1195,
29918,
28970,
29879,
14352,
29896,
1402,
775,
29883,
2433,
1982,
29916,
29906,
29953,
29946,
742,
10348,
29918,
401,
29883,
2433,
29874,
562,
1495,
13,
13,
4706,
4863,
29918,
24049,
29889,
5358,
580,
13,
13,
1678,
736,
4236,
29918,
28970,
29879,
29892,
1375,
29918,
28970,
29879,
13,
2
] |
flask_security_bundle/commands/roles.py | briancappello/flask-security-bundle | 0 | 158409 | from flask_unchained import unchained
from flask_unchained.cli import cli, click
from flask_unchained.commands.utils import print_table
from .utils import _query_to_role
from ..services import RoleManager
role_manager: RoleManager = unchained.services.role_manager
@cli.group()
def roles():
"""
Role commands.
"""
@roles.command(name='list')
def list_roles():
"""
List roles.
"""
roles = role_manager.find_all()
if roles:
print_table(['ID', 'Name'], [(role.id, role.name) for role in roles])
else:
click.echo('No roles found.')
@roles.command(name='create')
@click.option('--name', prompt='Role name',
help='The name of the role to create, eg `ROLE_USER`.')
def create_role(name):
"""
Create a new role.
"""
role = role_manager.create(name=name)
if click.confirm(f'Are you sure you want to create {role!r}?'):
role_manager.save(role, commit=True)
click.echo(f'Successfully created {role!r}')
else:
click.echo('Cancelled.')
@roles.command(name='delete')
@click.argument('query', help='The query to search for a role by. For example, '
'`id=5` or `name=ROLE_USER`.')
def delete_role(query):
"""
Delete a role.
"""
role = _query_to_role(query)
if click.confirm(f'Are you sure you want to delete {role!r}?'):
role_manager.delete(role, commit=True)
click.echo(f'Successfully deleted {role!r}')
else:
click.echo('Cancelled.')
| [
1,
515,
29784,
29918,
3322,
7114,
1053,
443,
305,
7114,
13,
3166,
29784,
29918,
3322,
7114,
29889,
11303,
1053,
9335,
29892,
2828,
13,
3166,
29784,
29918,
3322,
7114,
29889,
26381,
29889,
13239,
1053,
1596,
29918,
2371,
13,
13,
3166,
869,
13239,
1053,
903,
1972,
29918,
517,
29918,
12154,
13,
3166,
6317,
9916,
1053,
1528,
280,
3260,
13,
13,
12154,
29918,
12847,
29901,
1528,
280,
3260,
353,
443,
305,
7114,
29889,
9916,
29889,
12154,
29918,
12847,
13,
13,
13,
29992,
11303,
29889,
2972,
580,
13,
1753,
16178,
7295,
13,
1678,
9995,
13,
1678,
1528,
280,
8260,
29889,
13,
1678,
9995,
13,
13,
13,
29992,
307,
793,
29889,
6519,
29898,
978,
2433,
1761,
1495,
13,
1753,
1051,
29918,
307,
793,
7295,
13,
1678,
9995,
13,
1678,
2391,
16178,
29889,
13,
1678,
9995,
13,
1678,
16178,
353,
6297,
29918,
12847,
29889,
2886,
29918,
497,
580,
13,
1678,
565,
16178,
29901,
13,
4706,
1596,
29918,
2371,
18959,
1367,
742,
525,
1170,
7464,
17288,
12154,
29889,
333,
29892,
6297,
29889,
978,
29897,
363,
6297,
297,
16178,
2314,
13,
1678,
1683,
29901,
13,
4706,
2828,
29889,
8057,
877,
3782,
16178,
1476,
29889,
1495,
13,
13,
13,
29992,
307,
793,
29889,
6519,
29898,
978,
2433,
3258,
1495,
13,
29992,
3808,
29889,
3385,
877,
489,
978,
742,
9508,
2433,
16727,
1024,
742,
13,
795,
1371,
2433,
1576,
1024,
310,
278,
6297,
304,
1653,
29892,
8087,
421,
1672,
1307,
29918,
11889,
1412,
1495,
13,
1753,
1653,
29918,
12154,
29898,
978,
1125,
13,
1678,
9995,
13,
1678,
6204,
263,
716,
6297,
29889,
13,
1678,
9995,
13,
1678,
6297,
353,
6297,
29918,
12847,
29889,
3258,
29898,
978,
29922,
978,
29897,
13,
1678,
565,
2828,
29889,
26897,
29898,
29888,
29915,
17506,
366,
1854,
366,
864,
304,
1653,
426,
12154,
29991,
29878,
29913,
17901,
1125,
13,
4706,
6297,
29918,
12847,
29889,
7620,
29898,
12154,
29892,
9063,
29922,
5574,
29897,
13,
4706,
2828,
29889,
8057,
29898,
29888,
29915,
14191,
3730,
2825,
426,
12154,
29991,
29878,
29913,
1495,
13,
1678,
1683,
29901,
13,
4706,
2828,
29889,
8057,
877,
19420,
839,
29889,
1495,
13,
13,
13,
29992,
307,
793,
29889,
6519,
29898,
978,
2433,
8143,
1495,
13,
29992,
3808,
29889,
23516,
877,
1972,
742,
1371,
2433,
1576,
2346,
304,
2740,
363,
263,
6297,
491,
29889,
1152,
1342,
29892,
525,
13,
462,
795,
525,
29952,
333,
29922,
29945,
29952,
470,
421,
978,
29922,
1672,
1307,
29918,
11889,
1412,
1495,
13,
1753,
5217,
29918,
12154,
29898,
1972,
1125,
13,
1678,
9995,
13,
1678,
21267,
263,
6297,
29889,
13,
1678,
9995,
13,
1678,
6297,
353,
903,
1972,
29918,
517,
29918,
12154,
29898,
1972,
29897,
13,
1678,
565,
2828,
29889,
26897,
29898,
29888,
29915,
17506,
366,
1854,
366,
864,
304,
5217,
426,
12154,
29991,
29878,
29913,
17901,
1125,
13,
4706,
6297,
29918,
12847,
29889,
8143,
29898,
12154,
29892,
9063,
29922,
5574,
29897,
13,
4706,
2828,
29889,
8057,
29898,
29888,
29915,
14191,
3730,
11132,
426,
12154,
29991,
29878,
29913,
1495,
13,
1678,
1683,
29901,
13,
4706,
2828,
29889,
8057,
877,
19420,
839,
29889,
1495,
13,
2
] |
nucypher/tests/config/test_firstula_circumstances.py | kanzeparov/NuCypher | 0 | 22728 | """
This file is part of nucypher.
nucypher is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
nucypher is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
"""
from functools import partial
import maya
import pytest
import pytest_twisted
from twisted.internet.threads import deferToThread
from nucypher.network.middleware import RestMiddleware
from nucypher.utilities.sandbox.ursula import make_federated_ursulas
def test_proper_seed_node_instantiation(ursula_federated_test_config):
lonely_ursula_maker = partial(make_federated_ursulas,
ursula_config=ursula_federated_test_config,
quantity=1,
know_each_other=False)
firstula = lonely_ursula_maker().pop()
firstula_as_seed_node = firstula.seed_node_metadata()
any_other_ursula = lonely_ursula_maker(seed_nodes=[firstula_as_seed_node]).pop()
assert not any_other_ursula.known_nodes
any_other_ursula.start_learning_loop(now=True)
assert firstula in any_other_ursula.known_nodes.values()
@pytest_twisted.inlineCallbacks
def test_get_cert_from_running_seed_node(ursula_federated_test_config):
lonely_ursula_maker = partial(make_federated_ursulas,
ursula_config=ursula_federated_test_config,
quantity=1,
know_each_other=False)
firstula = lonely_ursula_maker().pop()
node_deployer = firstula.get_deployer()
node_deployer.addServices()
node_deployer.catalogServers(node_deployer.hendrix)
node_deployer.start()
certificate_as_deployed = node_deployer.cert.to_cryptography()
firstula_as_seed_node = firstula.seed_node_metadata()
any_other_ursula = lonely_ursula_maker(seed_nodes=[firstula_as_seed_node],
network_middleware=RestMiddleware()).pop()
assert not any_other_ursula.known_nodes
def start_lonely_learning_loop():
any_other_ursula.start_learning_loop()
start = maya.now()
while not firstula in any_other_ursula.known_nodes.values():
passed = maya.now() - start
if passed.seconds > 2:
pytest.fail("Didn't find the seed node.")
yield deferToThread(start_lonely_learning_loop)
assert firstula in any_other_ursula.known_nodes.values()
certificate_as_learned = list(any_other_ursula.known_nodes.values())[0].certificate
assert certificate_as_learned == certificate_as_deployed
any_other_ursula.stop_learning_loop()
| [
1,
9995,
13,
4013,
934,
338,
760,
310,
4948,
1270,
8096,
29889,
13,
13,
3433,
1270,
8096,
338,
3889,
7047,
29901,
366,
508,
2654,
391,
2666,
372,
322,
29914,
272,
6623,
13,
277,
1090,
278,
4958,
310,
278,
15143,
4593,
5236,
19245,
408,
6369,
491,
13,
1552,
12362,
18540,
10606,
29892,
2845,
1873,
29871,
29941,
310,
278,
19245,
29892,
470,
13,
29898,
271,
596,
2984,
29897,
738,
2678,
1873,
29889,
13,
13,
3433,
1270,
8096,
338,
13235,
297,
278,
4966,
393,
372,
674,
367,
5407,
29892,
13,
4187,
399,
1806,
8187,
2692,
13764,
29979,
399,
1718,
29934,
13566,
29979,
29936,
1728,
1584,
278,
2411,
2957,
1370,
21867,
29891,
310,
13,
29924,
1001,
3210,
13566,
2882,
6227,
11937,
470,
383,
1806,
8186,
1799,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
29889,
29871,
2823,
278,
13,
29954,
11601,
4593,
5236,
19245,
363,
901,
4902,
29889,
13,
13,
3492,
881,
505,
4520,
263,
3509,
310,
278,
15143,
4593,
5236,
19245,
13,
284,
549,
411,
4948,
1270,
8096,
29889,
29871,
960,
451,
29892,
1074,
529,
991,
597,
1636,
29889,
18713,
29889,
990,
29914,
506,
11259,
3779,
29889,
13,
15945,
29908,
13,
3166,
2090,
312,
8789,
1053,
7687,
13,
13,
5215,
1122,
29874,
13,
5215,
11451,
1688,
13,
5215,
11451,
1688,
29918,
7516,
12652,
13,
3166,
3252,
12652,
29889,
14168,
300,
29889,
28993,
1053,
316,
571,
1762,
4899,
13,
13,
3166,
4948,
1270,
8096,
29889,
11618,
29889,
17662,
2519,
1053,
11654,
25411,
2519,
13,
3166,
4948,
1270,
8096,
29889,
4422,
1907,
29889,
29879,
26738,
29889,
1295,
2497,
1053,
1207,
29918,
29888,
2447,
630,
29918,
1295,
15173,
13,
13,
13,
1753,
1243,
29918,
771,
546,
29918,
26776,
29918,
3177,
29918,
2611,
3656,
362,
29898,
1295,
2497,
29918,
29888,
2447,
630,
29918,
1688,
29918,
2917,
1125,
13,
1678,
23123,
873,
29918,
1295,
2497,
29918,
28107,
353,
7687,
29898,
5675,
29918,
29888,
2447,
630,
29918,
1295,
15173,
29892,
13,
462,
462,
29871,
19980,
2497,
29918,
2917,
29922,
1295,
2497,
29918,
29888,
2447,
630,
29918,
1688,
29918,
2917,
29892,
13,
462,
462,
29871,
14728,
29922,
29896,
29892,
13,
462,
462,
29871,
1073,
29918,
4204,
29918,
1228,
29922,
8824,
29897,
13,
13,
1678,
937,
2497,
353,
23123,
873,
29918,
1295,
2497,
29918,
28107,
2141,
7323,
580,
13,
1678,
937,
2497,
29918,
294,
29918,
26776,
29918,
3177,
353,
937,
2497,
29889,
26776,
29918,
3177,
29918,
19635,
580,
13,
1678,
738,
29918,
1228,
29918,
1295,
2497,
353,
23123,
873,
29918,
1295,
2497,
29918,
28107,
29898,
26776,
29918,
18010,
11759,
4102,
2497,
29918,
294,
29918,
26776,
29918,
3177,
14664,
7323,
580,
13,
13,
1678,
4974,
451,
738,
29918,
1228,
29918,
1295,
2497,
29889,
5203,
29918,
18010,
13,
1678,
738,
29918,
1228,
29918,
1295,
2497,
29889,
2962,
29918,
21891,
29918,
7888,
29898,
3707,
29922,
5574,
29897,
13,
1678,
4974,
937,
2497,
297,
738,
29918,
1228,
29918,
1295,
2497,
29889,
5203,
29918,
18010,
29889,
5975,
580,
13,
13,
13,
29992,
2272,
1688,
29918,
7516,
12652,
29889,
14764,
10717,
29879,
13,
1753,
1243,
29918,
657,
29918,
6327,
29918,
3166,
29918,
21094,
29918,
26776,
29918,
3177,
29898,
1295,
2497,
29918,
29888,
2447,
630,
29918,
1688,
29918,
2917,
1125,
13,
1678,
23123,
873,
29918,
1295,
2497,
29918,
28107,
353,
7687,
29898,
5675,
29918,
29888,
2447,
630,
29918,
1295,
15173,
29892,
13,
462,
462,
29871,
19980,
2497,
29918,
2917,
29922,
1295,
2497,
29918,
29888,
2447,
630,
29918,
1688,
29918,
2917,
29892,
13,
462,
462,
29871,
14728,
29922,
29896,
29892,
13,
462,
462,
29871,
1073,
29918,
4204,
29918,
1228,
29922,
8824,
29897,
13,
1678,
937,
2497,
353,
23123,
873,
29918,
1295,
2497,
29918,
28107,
2141,
7323,
580,
13,
1678,
2943,
29918,
16519,
261,
353,
937,
2497,
29889,
657,
29918,
16519,
261,
580,
13,
13,
1678,
2943,
29918,
16519,
261,
29889,
1202,
13779,
580,
13,
1678,
2943,
29918,
16519,
261,
29889,
28045,
1748,
874,
29898,
3177,
29918,
16519,
261,
29889,
29882,
355,
2126,
29897,
13,
1678,
2943,
29918,
16519,
261,
29889,
2962,
580,
13,
13,
1678,
12289,
29918,
294,
29918,
16519,
287,
353,
2943,
29918,
16519,
261,
29889,
6327,
29889,
517,
29918,
29883,
4641,
5275,
580,
13,
13,
1678,
937,
2497,
29918,
294,
29918,
26776,
29918,
3177,
353,
937,
2497,
29889,
26776,
29918,
3177,
29918,
19635,
580,
13,
1678,
738,
29918,
1228,
29918,
1295,
2497,
353,
23123,
873,
29918,
1295,
2497,
29918,
28107,
29898,
26776,
29918,
18010,
11759,
4102,
2497,
29918,
294,
29918,
26776,
29918,
3177,
1402,
13,
462,
462,
965,
3564,
29918,
17662,
2519,
29922,
15078,
25411,
2519,
16655,
7323,
580,
13,
1678,
4974,
451,
738,
29918,
1228,
29918,
1295,
2497,
29889,
5203,
29918,
18010,
13,
13,
1678,
822,
1369,
29918,
12957,
873,
29918,
21891,
29918,
7888,
7295,
13,
4706,
738,
29918,
1228,
29918,
1295,
2497,
29889,
2962,
29918,
21891,
29918,
7888,
580,
13,
4706,
1369,
353,
1122,
29874,
29889,
3707,
580,
13,
4706,
1550,
451,
937,
2497,
297,
738,
29918,
1228,
29918,
1295,
2497,
29889,
5203,
29918,
18010,
29889,
5975,
7295,
13,
9651,
4502,
353,
1122,
29874,
29889,
3707,
580,
448,
1369,
13,
9651,
565,
4502,
29889,
23128,
1405,
29871,
29906,
29901,
13,
18884,
11451,
1688,
29889,
14057,
703,
9260,
29876,
29915,
29873,
1284,
278,
16717,
2943,
23157,
13,
13,
1678,
7709,
316,
571,
1762,
4899,
29898,
2962,
29918,
12957,
873,
29918,
21891,
29918,
7888,
29897,
13,
1678,
4974,
937,
2497,
297,
738,
29918,
1228,
29918,
1295,
2497,
29889,
5203,
29918,
18010,
29889,
5975,
580,
13,
13,
1678,
12289,
29918,
294,
29918,
1945,
9571,
353,
1051,
29898,
1384,
29918,
1228,
29918,
1295,
2497,
29889,
5203,
29918,
18010,
29889,
5975,
3101,
29961,
29900,
1822,
6327,
8021,
13,
1678,
4974,
12289,
29918,
294,
29918,
1945,
9571,
1275,
12289,
29918,
294,
29918,
16519,
287,
13,
1678,
738,
29918,
1228,
29918,
1295,
2497,
29889,
9847,
29918,
21891,
29918,
7888,
580,
13,
2
] |
rok/tests/conftest.py | rak-n-rok/Krake | 1 | 75308 | import os
import sys
import logging.config
# Prepend package directory for working imports
package_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.insert(0, package_dir)
logging.config.dictConfig(
{
"version": 1,
"handlers": {"console": {"class": "logging.StreamHandler", "level": "DEBUG"}},
"loggers": {"rok": {"handlers": ["console"]}},
}
)
| [
1,
1053,
2897,
13,
5215,
10876,
13,
5215,
12183,
29889,
2917,
13,
13,
13,
29937,
349,
3445,
355,
3577,
3884,
363,
1985,
24802,
13,
5113,
29918,
3972,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
7122,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
511,
376,
636,
5783,
13,
9675,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
3577,
29918,
3972,
29897,
13,
13,
13,
21027,
29889,
2917,
29889,
8977,
3991,
29898,
13,
1678,
426,
13,
4706,
376,
3259,
1115,
29871,
29896,
29892,
13,
4706,
376,
3179,
9306,
1115,
8853,
11058,
1115,
8853,
1990,
1115,
376,
21027,
29889,
3835,
4598,
613,
376,
5563,
1115,
376,
18525,
29908,
11656,
13,
4706,
376,
1188,
5743,
1115,
8853,
16475,
1115,
8853,
3179,
9306,
1115,
6796,
11058,
3108,
11656,
13,
1678,
500,
13,
29897,
13,
2
] |
src/student.py | RushiRaut/SRMS-using-Flask | 0 | 85214 | <filename>src/student.py
from flask import *
from src.connection import cursor, db
add_student = Blueprint ('add_student', __name__)
manage_student = Blueprint('manage_student', __name__)
delete_student = Blueprint('delete_student',__name__)
edit = Blueprint('pre_edit',__name__)
@add_student.route ('/add_student1', methods=['GET', 'POST'])
def add_student1():
class_details = {}
msg = 'Please Fill the Form'
if request.method.lower() == 'post' and 'student_name' in request.form and request.form['roll_no']:
id = request.form['id']
roll_no = request.form['roll_no']
cursor.execute ("select * from students where roll_no =%s", (roll_no,))
student_found = cursor.fetchone ()
if student_found:
msg = 'Student roll number allready exixt'
else:
student_name = request.form['student_name']
student_gender = request.form['student_Gender']
student_mobile = request.form['student_mobile']
student_class_name = request.form['student_class_name']
cursor.execute('insert into students values (%s,%s,%s,%s,%s,%s)',
(id, student_name, roll_no, student_gender, student_mobile, student_class_name))
db.commit ()
msg = 'Student Created Successfully'
cursor.execute ('select * from students')
students = cursor.fetchall ()
columns = ["id", "student_name", "roll_no", "student_gender", "student_mobile", "student_class_name"]
student_details = [dict (zip (columns, row)) for row in students]
return render_template ('add_student.html', rows=student_details)
cursor.execute("select class_name from student_classes")
class_found = cursor.fetchall()
columns = ["class_name"]
class_details = [dict(zip(columns, row)) for row in class_found]
return render_template ('add_student.html', row=class_details,msg = msg)
@manage_student.route('/manage_students', methods=['GET', 'POST'])
def manage_students():
msg = ''
cursor.execute('select * from students')
students = cursor.fetchall()
columns = ["id", "student_name", "roll_no", "student_gender", "student_mobile", "student_class_name"]
student_details = [dict(zip(columns, row)) for row in students]
return render_template('manage_student.html', rows=student_details)
@delete_student.route('/delete_student/<id>',methods = ['GET','POST'])
def delete1(id):
cursor.execute('delete from students where id = %s', (id,))
db.commit()
cursor.execute ('select * from students')
students = cursor.fetchall ()
columns = ["id", "student_name", "roll_no", "student_gender", "student_mobile", "student_class_name"]
student_details = [dict (zip (columns, row)) for row in students]
return render_template ('manage_student.html', rows=student_details)
@add_student.route('/pre_edit/<id>',methods=['GET','POST'])
def pre_edit(id):
cursor.execute ('select * from students where id = %s', (id,))
student = cursor.fetchone ()
columns = ["id", "student_name", "roll_no", "student_gender", "student_mobile", "student_class_name"]
student_details = dict (zip (columns, student))
cursor.execute ("select class_name from student_classes")
class_found = cursor.fetchall ()
columns = ["class_name"]
class_details = [dict (zip (columns, row)) for row in class_found]
return render_template ('edit_student.html', row=student_details, row1=class_details)
@add_student.route('/edit_student', methods=['POST','GET'])
def edit_student():
if request.method == 'POST' and 'student_name' in request.form and request.form['roll_no']:
id = request.form['id']
roll_no = request.form['roll_no']
student_name = request.form['student_name']
student_gender = request.form['student_Gender']
student_mobile = request.form['student_mobile']
student_class_name = request.form['student_class_name']
cursor.execute ('update students set id =%s ,student_name = %s,roll_no=%s, student_gender=%s,'
'student_mobile=%s,student_class_name=%s where id = %s',
(id, student_name, roll_no, student_gender, student_mobile, student_class_name, id))
db.commit ()
cursor.execute ('select * from students')
students = cursor.fetchall ()
columns = ["id", "student_name", "roll_no", "student_gender", "student_mobile", "student_class_name"]
student_details = [dict (zip (columns, row)) for row in students]
return render_template ('manage_student.html', rows=student_details) | [
1,
529,
9507,
29958,
4351,
29914,
18945,
29889,
2272,
13,
3166,
29784,
1053,
334,
13,
3166,
4765,
29889,
9965,
1053,
10677,
29892,
4833,
13,
13,
13,
1202,
29918,
18945,
353,
10924,
2158,
6702,
1202,
29918,
18945,
742,
4770,
978,
1649,
29897,
13,
1171,
482,
29918,
18945,
353,
10924,
2158,
877,
1171,
482,
29918,
18945,
742,
4770,
978,
1649,
29897,
13,
8143,
29918,
18945,
353,
10924,
2158,
877,
8143,
29918,
18945,
742,
1649,
978,
1649,
29897,
13,
5628,
353,
10924,
2158,
877,
1457,
29918,
5628,
742,
1649,
978,
1649,
29897,
13,
13,
13,
29992,
1202,
29918,
18945,
29889,
13134,
6702,
29914,
1202,
29918,
18945,
29896,
742,
3519,
29922,
1839,
7194,
742,
525,
5438,
11287,
13,
1753,
788,
29918,
18945,
29896,
7295,
13,
1678,
770,
29918,
14144,
353,
6571,
13,
1678,
10191,
353,
525,
12148,
383,
453,
278,
3812,
29915,
13,
1678,
565,
2009,
29889,
5696,
29889,
13609,
580,
1275,
525,
2490,
29915,
322,
525,
18945,
29918,
978,
29915,
297,
2009,
29889,
689,
322,
2009,
29889,
689,
1839,
1245,
29918,
1217,
2033,
29901,
13,
4706,
1178,
353,
2009,
29889,
689,
1839,
333,
2033,
13,
4706,
9679,
29918,
1217,
353,
2009,
29889,
689,
1839,
1245,
29918,
1217,
2033,
13,
4706,
10677,
29889,
7978,
4852,
2622,
334,
515,
8041,
988,
9679,
29918,
1217,
353,
29995,
29879,
613,
313,
1245,
29918,
1217,
29892,
876,
13,
4706,
8368,
29918,
11940,
353,
10677,
29889,
9155,
650,
3861,
13,
4706,
565,
8368,
29918,
11940,
29901,
13,
9651,
10191,
353,
525,
20791,
9679,
1353,
599,
2040,
429,
29875,
486,
29915,
13,
4706,
1683,
29901,
13,
9651,
8368,
29918,
978,
353,
2009,
29889,
689,
1839,
18945,
29918,
978,
2033,
13,
9651,
8368,
29918,
26098,
353,
2009,
29889,
689,
1839,
18945,
29918,
29954,
1581,
2033,
13,
9651,
8368,
29918,
16769,
353,
2009,
29889,
689,
1839,
18945,
29918,
16769,
2033,
13,
9651,
8368,
29918,
1990,
29918,
978,
353,
2009,
29889,
689,
1839,
18945,
29918,
1990,
29918,
978,
2033,
13,
9651,
10677,
29889,
7978,
877,
7851,
964,
8041,
1819,
313,
29995,
29879,
24163,
29879,
24163,
29879,
24163,
29879,
24163,
29879,
24163,
29879,
29897,
742,
13,
462,
9651,
313,
333,
29892,
8368,
29918,
978,
29892,
9679,
29918,
1217,
29892,
8368,
29918,
26098,
29892,
8368,
29918,
16769,
29892,
8368,
29918,
1990,
29918,
978,
876,
13,
9651,
4833,
29889,
15060,
3861,
13,
9651,
10191,
353,
525,
20791,
6760,
630,
21397,
3730,
29915,
13,
9651,
10677,
29889,
7978,
6702,
2622,
334,
515,
8041,
1495,
13,
9651,
8041,
353,
10677,
29889,
9155,
497,
3861,
13,
9651,
4341,
353,
6796,
333,
613,
376,
18945,
29918,
978,
613,
376,
1245,
29918,
1217,
613,
376,
18945,
29918,
26098,
613,
376,
18945,
29918,
16769,
613,
376,
18945,
29918,
1990,
29918,
978,
3108,
13,
9651,
8368,
29918,
14144,
353,
518,
8977,
313,
7554,
313,
13099,
29892,
1948,
876,
363,
1948,
297,
8041,
29962,
13,
9651,
736,
4050,
29918,
6886,
6702,
1202,
29918,
18945,
29889,
1420,
742,
4206,
29922,
18945,
29918,
14144,
29897,
13,
1678,
10677,
29889,
7978,
703,
2622,
770,
29918,
978,
515,
8368,
29918,
13203,
1159,
13,
1678,
770,
29918,
11940,
353,
10677,
29889,
9155,
497,
580,
13,
1678,
4341,
353,
6796,
1990,
29918,
978,
3108,
13,
1678,
770,
29918,
14144,
353,
518,
8977,
29898,
7554,
29898,
13099,
29892,
1948,
876,
363,
1948,
297,
770,
29918,
11940,
29962,
13,
1678,
736,
4050,
29918,
6886,
6702,
1202,
29918,
18945,
29889,
1420,
742,
1948,
29922,
1990,
29918,
14144,
29892,
7645,
353,
10191,
29897,
13,
13,
13,
29992,
1171,
482,
29918,
18945,
29889,
13134,
11219,
1171,
482,
29918,
18082,
1237,
742,
3519,
29922,
1839,
7194,
742,
525,
5438,
11287,
13,
1753,
10933,
29918,
18082,
1237,
7295,
13,
1678,
10191,
353,
6629,
13,
1678,
10677,
29889,
7978,
877,
2622,
334,
515,
8041,
1495,
13,
1678,
8041,
353,
10677,
29889,
9155,
497,
580,
13,
1678,
4341,
353,
6796,
333,
613,
376,
18945,
29918,
978,
613,
376,
1245,
29918,
1217,
613,
376,
18945,
29918,
26098,
613,
376,
18945,
29918,
16769,
613,
376,
18945,
29918,
1990,
29918,
978,
3108,
13,
1678,
8368,
29918,
14144,
353,
518,
8977,
29898,
7554,
29898,
13099,
29892,
1948,
876,
363,
1948,
297,
8041,
29962,
13,
1678,
736,
4050,
29918,
6886,
877,
1171,
482,
29918,
18945,
29889,
1420,
742,
4206,
29922,
18945,
29918,
14144,
29897,
13,
13,
29992,
8143,
29918,
18945,
29889,
13134,
11219,
8143,
29918,
18945,
29914,
29966,
333,
29958,
742,
23515,
353,
6024,
7194,
3788,
5438,
11287,
13,
1753,
5217,
29896,
29898,
333,
1125,
13,
1678,
10677,
29889,
7978,
877,
8143,
515,
8041,
988,
29871,
1178,
353,
1273,
29879,
742,
313,
333,
29892,
876,
13,
1678,
4833,
29889,
15060,
580,
13,
1678,
10677,
29889,
7978,
6702,
2622,
334,
515,
8041,
1495,
13,
1678,
8041,
353,
10677,
29889,
9155,
497,
3861,
13,
1678,
4341,
353,
6796,
333,
613,
376,
18945,
29918,
978,
613,
376,
1245,
29918,
1217,
613,
376,
18945,
29918,
26098,
613,
376,
18945,
29918,
16769,
613,
376,
18945,
29918,
1990,
29918,
978,
3108,
13,
1678,
8368,
29918,
14144,
353,
518,
8977,
313,
7554,
313,
13099,
29892,
1948,
876,
363,
1948,
297,
8041,
29962,
13,
1678,
736,
4050,
29918,
6886,
6702,
1171,
482,
29918,
18945,
29889,
1420,
742,
4206,
29922,
18945,
29918,
14144,
29897,
13,
13,
29992,
1202,
29918,
18945,
29889,
13134,
11219,
1457,
29918,
5628,
29914,
29966,
333,
29958,
742,
23515,
29922,
1839,
7194,
3788,
5438,
11287,
13,
1753,
758,
29918,
5628,
29898,
333,
1125,
13,
1678,
10677,
29889,
7978,
6702,
2622,
334,
515,
8041,
988,
1178,
353,
1273,
29879,
742,
313,
333,
29892,
876,
13,
1678,
8368,
353,
10677,
29889,
9155,
650,
3861,
13,
1678,
4341,
353,
6796,
333,
613,
376,
18945,
29918,
978,
613,
376,
1245,
29918,
1217,
613,
376,
18945,
29918,
26098,
613,
376,
18945,
29918,
16769,
613,
376,
18945,
29918,
1990,
29918,
978,
3108,
13,
1678,
8368,
29918,
14144,
353,
9657,
313,
7554,
313,
13099,
29892,
8368,
876,
13,
1678,
10677,
29889,
7978,
4852,
2622,
770,
29918,
978,
515,
8368,
29918,
13203,
1159,
13,
1678,
770,
29918,
11940,
353,
10677,
29889,
9155,
497,
3861,
13,
1678,
4341,
353,
6796,
1990,
29918,
978,
3108,
13,
1678,
770,
29918,
14144,
353,
518,
8977,
313,
7554,
313,
13099,
29892,
1948,
876,
363,
1948,
297,
770,
29918,
11940,
29962,
13,
1678,
736,
4050,
29918,
6886,
6702,
5628,
29918,
18945,
29889,
1420,
742,
1948,
29922,
18945,
29918,
14144,
29892,
1948,
29896,
29922,
1990,
29918,
14144,
29897,
13,
13,
13,
29992,
1202,
29918,
18945,
29889,
13134,
11219,
5628,
29918,
18945,
742,
3519,
29922,
1839,
5438,
3788,
7194,
11287,
13,
1753,
3863,
29918,
18945,
7295,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
5438,
29915,
322,
525,
18945,
29918,
978,
29915,
297,
2009,
29889,
689,
322,
2009,
29889,
689,
1839,
1245,
29918,
1217,
2033,
29901,
13,
4706,
1178,
353,
2009,
29889,
689,
1839,
333,
2033,
13,
4706,
9679,
29918,
1217,
353,
2009,
29889,
689,
1839,
1245,
29918,
1217,
2033,
13,
4706,
8368,
29918,
978,
353,
2009,
29889,
689,
1839,
18945,
29918,
978,
2033,
13,
4706,
8368,
29918,
26098,
353,
2009,
29889,
689,
1839,
18945,
29918,
29954,
1581,
2033,
13,
4706,
8368,
29918,
16769,
353,
2009,
29889,
689,
1839,
18945,
29918,
16769,
2033,
13,
4706,
8368,
29918,
1990,
29918,
978,
353,
2009,
29889,
689,
1839,
18945,
29918,
1990,
29918,
978,
2033,
13,
4706,
10677,
29889,
7978,
6702,
5504,
8041,
731,
1178,
353,
29995,
29879,
1919,
18945,
29918,
978,
353,
1273,
29879,
29892,
1245,
29918,
1217,
16328,
29879,
29892,
8368,
29918,
26098,
16328,
29879,
5501,
13,
462,
4706,
525,
18945,
29918,
16769,
16328,
29879,
29892,
18945,
29918,
1990,
29918,
978,
16328,
29879,
988,
1178,
353,
1273,
29879,
742,
13,
462,
4706,
313,
333,
29892,
8368,
29918,
978,
29892,
9679,
29918,
1217,
29892,
8368,
29918,
26098,
29892,
8368,
29918,
16769,
29892,
8368,
29918,
1990,
29918,
978,
29892,
1178,
876,
13,
4706,
4833,
29889,
15060,
3861,
13,
1678,
10677,
29889,
7978,
6702,
2622,
334,
515,
8041,
1495,
13,
1678,
8041,
353,
10677,
29889,
9155,
497,
3861,
13,
1678,
4341,
353,
6796,
333,
613,
376,
18945,
29918,
978,
613,
376,
1245,
29918,
1217,
613,
376,
18945,
29918,
26098,
613,
376,
18945,
29918,
16769,
613,
376,
18945,
29918,
1990,
29918,
978,
3108,
13,
1678,
8368,
29918,
14144,
353,
518,
8977,
313,
7554,
313,
13099,
29892,
1948,
876,
363,
1948,
297,
8041,
29962,
13,
1678,
736,
4050,
29918,
6886,
6702,
1171,
482,
29918,
18945,
29889,
1420,
742,
4206,
29922,
18945,
29918,
14144,
29897,
2
] |
modules/backend.py | Uncle-Yuanl/model_zoo | 0 | 16881 | import os, sys
from distutils.util import strtobool
import numpy as np
import tensorflow as tf
import tensorflow.keras.backend as K
from tensorflow.python.util import nest, tf_inspect
from tensorflow.python.eager import tape
# from tensorflow.python.ops.custom_gradient import graph_mode_decorator
# 是否使用重计算
do_recompute = strtobool(os.environ.get('RECOMPUTE', '0'))
# 知乎:https://zhuanlan.zhihu.com/p/349492378
# 论文:https://arxiv.53yu.com/pdf/1606.08415.pdf
def gelu_erf(x):
"""根据erf直接计算gelu
"""
# np的精度更高,默认64位,tf默认32位
return 0.5 * x * (1.0 + tf.math.erf(x / np.sqrt(2.0)))
def gelu_tanh(x):
cdf = 0.5 * (
1 + K.tanh(np.sqrt(2 / np.pi) * (x + 0.044715 * K.pow(x,3)))
)
return x * cdf
def set_gelu(version):
"""设置gelu版本
"""
version = version.lower()
assert version in ['erf', 'tanh'], 'gelu version must in erf or tanh'
if version == 'erf':
tf.keras.utils.get_custom_objects()['gelu'] = gelu_erf
elif version == 'tanh':
tf.keras.utils.get_custom_objects()['gelu'] = gelu_tanh
def align(tensor, axes, ndim=None):
"""重新对齐tensor(批量版expand_dims)感觉更像是transpose
axes: 原来的第i维对齐新tensor的第axes[i]维;
ndim: 新tensor的维度
Example:
>>> tensor = tf.constant(np.arange(12).reshape(3,4), dtype=tf.float32)
>>> print(tensor)
tf.Tensor(
[[ 0. 1. 2. 3.]
[ 4. 5. 6. 7.]
[ 8. 9. 10. 11.]], shape=(3, 4), dtype=float32)
>>> same_dim = align(tensor, [0, -1], 2)
>>> print(same_dim)
tf.Tensor(
[[ 0. 1. 2. 3.]
[ 4. 5. 6. 7.]
[ 8. 9. 10. 11.]], shape=(3, 4), dtype=float32)
>>> more_dim = align(tensor, [0, -1], 3)
>>> print(more_dim)
tf.Tensor(
[[[ 0. 1. 2. 3.]]
<BLANKLINE>
[[ 4. 5. 6. 7.]]
<BLANKLINE>
[[ 8. 9. 10. 11.]]], shape=(3, 1, 4), dtype=float32)
"""
assert len(axes) == K.ndim(tensor)
indices = [None] * (ndim or max(axes))
for i in axes:
indices[i] = slice(None)
return tensor[indices]
def sequence_masking(x, mask, value=0, axis=None):
"""为序列条件mask的函数
parameters:
-----------
x: tensor
输入张量
mask: tensor
形如(batch_size, seq_len)的0-1矩阵
value: float or str
mask部分要被替换成的值,允许'inf'与'-inf'
axis: int
序列所在的轴,默认为1
"""
if mask is None:
return x
# 确保x类型,可以执行*运算
x_type = K.dtype(x)
if x_type == 'bool':
x = K.cast(x, 'int32')
# 确保mask类型 = x类型
if K.dtype(mask) != K.dtype(x):
mask = K.cast(mask, K.dtype(x))
if value == '-inf':
# -----------是个函数吗??---------------
value = -K.infinity
if value == 'inf':
value = K.infinity
value = K.cast(value, K.dtype(x))
# 确定axis
if axis is None:
axis = 1
if axis < 0:
axis = K.ndim(x) + axis
assert axis > 0, 'axis must be greater than 0'
# 统一shape
for _ in range(axis - 1): # > 1时生效
mask = K.expand_dims(mask, 1) # 把第0维让给batch_size
for _ in range(K.ndim(x) - K.ndim(mask)):
mask = K.expand_dims(mask, K.ndim(mask))
x = x * mask + value * (1 - mask)
# 与输入x的类型统一
if x_type == 'bool':
x = K.cast(x, x_type)
return x
def recompute_grad(call):
# ----------------------完全没看懂????------------------------
"""重计算装饰器,用来装饰keras层的call函数
目的是:通过一些额外的计算减少显存的占用
论文:https://arxiv.org/abs/1604.06174
"""
if not do_recompute:
return call
def inner(self, inputs, **kwargs):
# 2.x的tf.nest.flatten不会对numpy和tf.tensor进行展平
flat_inputs = nest.flatten(inputs)
call_args = tf_inspect.getfullargspec(call).args
for key in ['mask', 'training']:
if key not in call_args and key in kwargs:
del kwargs[key]
def kernel_call():
"""定义前向计算
"""
return call(self, inputs, **kwargs)
def call_and_grad(*inputs):
"""定义前向计算和反向计算
"""
with tape.stop_recording():
outputs = kernel_call()
outputs = tf.identity(outputs)
def grad_fn(doutputs, variables=None):
watches = list(inputs)
if variables is not None:
watches += list(variables)
with tf.GradientTape() as t:
t.watch(watches)
with tf.control_dependencies([doutputs]):
outputs = kernel_call()
grads = t.gradient(
outputs, watches, output_gradients=[doutputs]
)
del t
return grads[:len(inputs)], grads[len(inputs):]
return outputs, grad_fn
outputs, grad_fn = call_and_grad(*flat_inputs)
flat_outputs = nest.flatten(outputs)
def actual_grad_fn(*doutputs):
grads = grad_fn(*doutputs, variables=self.trainable_weights)
return grads[0] + grads[1]
watches = flat_inputs + self.trainable_weights
watches = [tf.convert_to_tensor(x) for x in watches]
tape.record_operation(
call.__name__, flat_outputs, watches, actual_grad_fn
)
return outputs
return inner
def infinity():
"""返回默认的代表无穷大的数值
"""
return tf.keras.utils.get_custom_objects().get('infinity', 1e12)
def set_infinity(value):
"""设置新的代表无穷大的数值
"""
tf.keras.utils.get_custom_objects()['infinity'] = value
# 添加到 keras.backend 上,使其可以像 K.epsilon() 那样操作
K.infinity = infinity
K.set_infinity = set_infinity
sys.modules['tensorflow.keras.backend'] = K
custom_objects = {
'gelu_erf': gelu_erf,
'gelu_tanh': gelu_tanh,
'gelu': gelu_erf,
}
tf.keras.utils.get_custom_objects().update(custom_objects)
if __name__ == '__main__':
import doctest
doctest.testmod()
| [
1,
1053,
2897,
29892,
10876,
30004,
13,
3166,
1320,
13239,
29889,
4422,
1053,
851,
517,
11227,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
5215,
26110,
408,
15886,
30004,
13,
5215,
26110,
29889,
3946,
294,
29889,
27852,
408,
476,
30004,
13,
30004,
13,
3166,
26110,
29889,
4691,
29889,
4422,
1053,
17763,
29892,
15886,
29918,
1144,
1103,
30004,
13,
3166,
26110,
29889,
4691,
29889,
29872,
1875,
1053,
260,
4085,
30004,
13,
29937,
515,
26110,
29889,
4691,
29889,
3554,
29889,
6341,
29918,
24970,
1053,
3983,
29918,
8513,
29918,
19557,
1061,
30004,
13,
30004,
13,
30004,
13,
29937,
29871,
30392,
31191,
30785,
30406,
30908,
31466,
31565,
30004,
13,
1867,
29918,
276,
26017,
353,
851,
517,
11227,
29898,
359,
29889,
21813,
29889,
657,
877,
1525,
21514,
26027,
742,
525,
29900,
8785,
30004,
13,
30004,
13,
30004,
13,
29937,
29871,
31043,
231,
188,
145,
30383,
991,
597,
29920,
6905,
273,
6468,
29889,
29920,
2918,
6905,
29889,
510,
29914,
29886,
29914,
29941,
29946,
29929,
29946,
29929,
29906,
29941,
29955,
29947,
30004,
13,
29937,
29871,
235,
177,
189,
30333,
30383,
991,
597,
279,
26560,
29889,
29945,
29941,
29891,
29884,
29889,
510,
29914,
5140,
29914,
29896,
29953,
29900,
29953,
29889,
29900,
29947,
29946,
29896,
29945,
29889,
5140,
30004,
13,
1753,
9127,
29884,
29918,
261,
29888,
29898,
29916,
1125,
30004,
13,
1678,
9995,
31393,
30763,
261,
29888,
31157,
31092,
31466,
31565,
7467,
29884,
30004,
13,
1678,
9995,
30004,
13,
1678,
396,
7442,
30210,
234,
181,
193,
30898,
31100,
30528,
30214,
31735,
31439,
29953,
29946,
30956,
30214,
13264,
31735,
31439,
29941,
29906,
30956,
30004,
13,
1678,
736,
29871,
29900,
29889,
29945,
334,
921,
334,
313,
29896,
29889,
29900,
718,
15886,
29889,
755,
29889,
261,
29888,
29898,
29916,
847,
7442,
29889,
3676,
29898,
29906,
29889,
29900,
4961,
30004,
13,
30004,
13,
30004,
13,
1753,
9127,
29884,
29918,
13161,
29882,
29898,
29916,
1125,
30004,
13,
1678,
274,
2176,
353,
29871,
29900,
29889,
29945,
334,
313,
30004,
13,
308,
29896,
718,
476,
29889,
13161,
29882,
29898,
9302,
29889,
3676,
29898,
29906,
847,
7442,
29889,
1631,
29897,
334,
313,
29916,
718,
29871,
29900,
29889,
29900,
29946,
29946,
29955,
29896,
29945,
334,
476,
29889,
12248,
29898,
29916,
29892,
29941,
4961,
30004,
13,
1678,
1723,
30004,
13,
1678,
736,
921,
334,
274,
2176,
30004,
13,
30004,
13,
30004,
13,
1753,
731,
29918,
7467,
29884,
29898,
3259,
1125,
30004,
13,
1678,
9995,
30872,
30669,
7467,
29884,
30845,
30346,
30004,
13,
1678,
9995,
30004,
13,
1678,
1873,
353,
1873,
29889,
13609,
26471,
13,
1678,
4974,
1873,
297,
6024,
261,
29888,
742,
525,
13161,
29882,
7464,
525,
7467,
29884,
1873,
1818,
297,
23467,
470,
10345,
29882,
29915,
30004,
13,
1678,
565,
1873,
1275,
525,
261,
29888,
2396,
30004,
13,
4706,
15886,
29889,
3946,
294,
29889,
13239,
29889,
657,
29918,
6341,
29918,
12650,
580,
1839,
7467,
29884,
2033,
353,
9127,
29884,
29918,
261,
29888,
30004,
13,
1678,
25342,
1873,
1275,
525,
13161,
29882,
2396,
30004,
13,
4706,
15886,
29889,
3946,
294,
29889,
13239,
29889,
657,
29918,
6341,
29918,
12650,
580,
1839,
7467,
29884,
2033,
353,
9127,
29884,
29918,
13161,
29882,
30004,
13,
30004,
13,
30004,
13,
1753,
7595,
29898,
20158,
29892,
27815,
29892,
29871,
299,
326,
29922,
8516,
1125,
30004,
13,
1678,
9995,
30908,
30374,
30783,
236,
192,
147,
20158,
30419,
233,
140,
188,
31180,
30845,
18837,
29918,
6229,
29879,
30409,
233,
135,
162,
235,
170,
140,
31100,
31551,
30392,
3286,
4220,
30004,
13,
1678,
27815,
29901,
29871,
30667,
30805,
30210,
30622,
29875,
234,
190,
183,
30783,
236,
192,
147,
30374,
20158,
30210,
30622,
1165,
267,
29961,
29875,
29962,
234,
190,
183,
31608,
30004,
13,
268,
299,
326,
29901,
29871,
30374,
20158,
30210,
234,
190,
183,
30898,
30004,
13,
30004,
13,
1678,
8741,
29901,
30004,
13,
30004,
13,
1678,
8653,
12489,
353,
15886,
29889,
23362,
29898,
9302,
29889,
279,
927,
29898,
29896,
29906,
467,
690,
14443,
29898,
29941,
29892,
29946,
511,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
8443,
13,
1678,
8653,
1596,
29898,
20158,
8443,
13,
1678,
15886,
29889,
29911,
6073,
29898,
30004,
13,
1678,
5519,
29871,
29900,
29889,
259,
29896,
29889,
259,
29906,
29889,
259,
29941,
5586,
30004,
13,
268,
518,
29871,
29946,
29889,
259,
29945,
29889,
259,
29953,
29889,
259,
29955,
5586,
30004,
13,
268,
518,
29871,
29947,
29889,
259,
29929,
29889,
29871,
29896,
29900,
29889,
29871,
29896,
29896,
5586,
1402,
8267,
7607,
29941,
29892,
29871,
29946,
511,
26688,
29922,
7411,
29941,
29906,
8443,
13,
30004,
13,
1678,
8653,
1021,
29918,
6229,
353,
7595,
29898,
20158,
29892,
518,
29900,
29892,
448,
29896,
1402,
29871,
29906,
8443,
13,
1678,
8653,
1596,
29898,
17642,
29918,
6229,
8443,
13,
1678,
15886,
29889,
29911,
6073,
29898,
30004,
13,
1678,
5519,
29871,
29900,
29889,
259,
29896,
29889,
259,
29906,
29889,
259,
29941,
5586,
30004,
13,
268,
518,
29871,
29946,
29889,
259,
29945,
29889,
259,
29953,
29889,
259,
29955,
5586,
30004,
13,
268,
518,
29871,
29947,
29889,
259,
29929,
29889,
29871,
29896,
29900,
29889,
29871,
29896,
29896,
5586,
1402,
8267,
7607,
29941,
29892,
29871,
29946,
511,
26688,
29922,
7411,
29941,
29906,
8443,
13,
30004,
13,
1678,
8653,
901,
29918,
6229,
353,
7595,
29898,
20158,
29892,
518,
29900,
29892,
448,
29896,
1402,
29871,
29941,
8443,
13,
1678,
8653,
1596,
29898,
5514,
29918,
6229,
8443,
13,
1678,
15886,
29889,
29911,
6073,
29898,
30004,
13,
1678,
5519,
29961,
29871,
29900,
29889,
259,
29896,
29889,
259,
29906,
29889,
259,
29941,
29889,
5262,
30004,
13,
1678,
529,
13367,
2190,
29968,
18521,
3238,
13,
268,
5519,
29871,
29946,
29889,
259,
29945,
29889,
259,
29953,
29889,
259,
29955,
29889,
5262,
30004,
13,
1678,
529,
13367,
2190,
29968,
18521,
3238,
13,
268,
5519,
29871,
29947,
29889,
259,
29929,
29889,
29871,
29896,
29900,
29889,
29871,
29896,
29896,
29889,
5262,
1402,
8267,
7607,
29941,
29892,
29871,
29896,
29892,
29871,
29946,
511,
26688,
29922,
7411,
29941,
29906,
8443,
13,
1678,
9995,
30004,
13,
1678,
4974,
7431,
29898,
1165,
267,
29897,
1275,
476,
29889,
299,
326,
29898,
20158,
8443,
13,
1678,
16285,
353,
518,
8516,
29962,
334,
313,
299,
326,
470,
4236,
29898,
1165,
267,
876,
30004,
13,
1678,
363,
474,
297,
27815,
29901,
30004,
13,
4706,
16285,
29961,
29875,
29962,
353,
22780,
29898,
8516,
8443,
13,
1678,
736,
12489,
29961,
513,
1575,
29962,
30004,
13,
30004,
13,
30004,
13,
1753,
5665,
29918,
13168,
292,
29898,
29916,
29892,
11105,
29892,
995,
29922,
29900,
29892,
9685,
29922,
8516,
1125,
30004,
13,
1678,
9995,
30573,
31463,
31025,
31217,
30631,
13168,
30210,
31629,
30354,
30004,
13,
30004,
13,
1678,
4128,
29901,
30004,
13,
1678,
448,
28400,
30004,
13,
1678,
921,
29901,
12489,
30004,
13,
308,
31573,
30752,
31328,
31180,
30004,
13,
1678,
11105,
29901,
12489,
30004,
13,
308,
31305,
30847,
29898,
16175,
29918,
2311,
29892,
19359,
29918,
2435,
29897,
30210,
29900,
29899,
29896,
234,
162,
172,
236,
155,
184,
30004,
13,
1678,
995,
29901,
5785,
470,
851,
30004,
13,
4706,
11105,
30636,
30748,
30698,
31407,
233,
158,
194,
31640,
30494,
30210,
30959,
30214,
232,
136,
132,
235,
177,
187,
29915,
7192,
29915,
31267,
28560,
7192,
29915,
30004,
13,
1678,
9685,
29901,
938,
30004,
13,
308,
31463,
31025,
30744,
30505,
30210,
235,
192,
183,
30214,
31735,
31439,
30573,
29896,
30004,
13,
1678,
9995,
30004,
13,
1678,
565,
11105,
338,
6213,
29901,
30004,
13,
4706,
736,
921,
30004,
13,
1678,
396,
29871,
31835,
30982,
29916,
30832,
30883,
30214,
30682,
30651,
233,
140,
170,
30448,
29930,
31894,
31565,
30004,
13,
1678,
921,
29918,
1853,
353,
476,
29889,
29881,
1853,
29898,
29916,
8443,
13,
1678,
565,
921,
29918,
1853,
1275,
525,
11227,
2396,
30004,
13,
4706,
921,
353,
476,
29889,
4384,
29898,
29916,
29892,
525,
524,
29941,
29906,
1495,
30004,
13,
1678,
396,
29871,
31835,
30982,
13168,
30832,
30883,
353,
921,
30832,
30883,
30004,
13,
1678,
565,
476,
29889,
29881,
1853,
29898,
13168,
29897,
2804,
476,
29889,
29881,
1853,
29898,
29916,
1125,
30004,
13,
4706,
11105,
353,
476,
29889,
4384,
29898,
13168,
29892,
476,
29889,
29881,
1853,
29898,
29916,
876,
30004,
13,
1678,
565,
995,
1275,
17411,
7192,
2396,
30004,
13,
4706,
396,
448,
28400,
30392,
30502,
31629,
30354,
232,
147,
154,
30882,
30882,
9072,
5634,
30004,
13,
4706,
995,
353,
448,
29968,
29889,
262,
4951,
537,
30004,
13,
1678,
565,
995,
1275,
525,
7192,
2396,
30004,
13,
4706,
995,
353,
476,
29889,
262,
4951,
537,
30004,
13,
1678,
995,
353,
476,
29889,
4384,
29898,
1767,
29892,
476,
29889,
29881,
1853,
29898,
29916,
876,
30004,
13,
1678,
396,
29871,
31835,
30495,
8990,
30004,
13,
1678,
565,
9685,
338,
6213,
29901,
30004,
13,
4706,
9685,
353,
29871,
29896,
30004,
13,
1678,
565,
9685,
529,
29871,
29900,
29901,
30004,
13,
4706,
9685,
353,
476,
29889,
299,
326,
29898,
29916,
29897,
718,
9685,
30004,
13,
1678,
4974,
9685,
1405,
29871,
29900,
29892,
525,
8990,
1818,
367,
7621,
1135,
29871,
29900,
29915,
30004,
13,
1678,
396,
29871,
31675,
30287,
12181,
30004,
13,
1678,
363,
903,
297,
3464,
29898,
8990,
448,
29871,
29896,
1125,
29871,
396,
1405,
29871,
29896,
30594,
30486,
31944,
30004,
13,
4706,
11105,
353,
476,
29889,
18837,
29918,
6229,
29879,
29898,
13168,
29892,
29871,
29896,
29897,
29871,
396,
29871,
233,
141,
141,
30622,
29900,
234,
190,
183,
235,
177,
172,
31999,
16175,
29918,
2311,
30004,
13,
1678,
363,
903,
297,
3464,
29898,
29968,
29889,
299,
326,
29898,
29916,
29897,
448,
476,
29889,
299,
326,
29898,
13168,
22164,
30004,
13,
4706,
11105,
353,
476,
29889,
18837,
29918,
6229,
29879,
29898,
13168,
29892,
476,
29889,
299,
326,
29898,
13168,
876,
30004,
13,
1678,
921,
353,
921,
334,
11105,
718,
995,
334,
313,
29896,
448,
11105,
8443,
13,
1678,
396,
29871,
31267,
31573,
30752,
29916,
30210,
30832,
30883,
31675,
30287,
30004,
13,
1678,
565,
921,
29918,
1853,
1275,
525,
11227,
2396,
30004,
13,
4706,
921,
353,
476,
29889,
4384,
29898,
29916,
29892,
921,
29918,
1853,
8443,
13,
1678,
736,
921,
30004,
13,
30004,
13,
30004,
13,
1753,
337,
26017,
29918,
5105,
29898,
4804,
1125,
30004,
13,
1678,
396,
448,
2683,
23648,
31366,
30753,
31423,
31811,
233,
138,
133,
30882,
30882,
30882,
30882,
2683,
1378,
30004,
13,
1678,
9995,
30908,
31466,
31565,
31905,
236,
168,
179,
30943,
30214,
30406,
30805,
31905,
236,
168,
179,
3946,
294,
232,
180,
133,
30210,
4804,
31629,
30354,
30004,
13,
268,
30895,
30210,
30392,
30383,
30768,
31138,
30287,
31959,
236,
165,
160,
31066,
30210,
31466,
31565,
232,
138,
146,
31022,
31542,
30946,
30210,
232,
144,
163,
30406,
30004,
13,
268,
235,
177,
189,
30333,
30383,
991,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29896,
29953,
29900,
29946,
29889,
29900,
29953,
29896,
29955,
29946,
30004,
13,
1678,
9995,
30004,
13,
1678,
565,
451,
437,
29918,
276,
26017,
29901,
30004,
13,
4706,
736,
1246,
30004,
13,
30004,
13,
1678,
822,
6426,
29898,
1311,
29892,
10970,
29892,
3579,
19290,
1125,
30004,
13,
4706,
396,
29871,
29906,
29889,
29916,
30210,
13264,
29889,
17510,
29889,
1579,
8606,
30413,
30437,
30783,
23749,
30503,
13264,
29889,
20158,
31174,
30448,
31599,
30606,
30004,
13,
4706,
12151,
29918,
2080,
29879,
353,
17763,
29889,
1579,
8606,
29898,
2080,
29879,
8443,
13,
4706,
1246,
29918,
5085,
353,
15886,
29918,
1144,
1103,
29889,
657,
8159,
5085,
3135,
29898,
4804,
467,
5085,
30004,
13,
4706,
363,
1820,
297,
6024,
13168,
742,
525,
26495,
2033,
29901,
30004,
13,
9651,
565,
1820,
451,
297,
1246,
29918,
5085,
322,
1820,
297,
9049,
5085,
29901,
30004,
13,
18884,
628,
9049,
5085,
29961,
1989,
29962,
30004,
13,
30004,
13,
4706,
822,
8466,
29918,
4804,
7295,
30004,
13,
9651,
9995,
30495,
31349,
30658,
31331,
31466,
31565,
30004,
13,
9651,
9995,
30004,
13,
9651,
736,
1246,
29898,
1311,
29892,
10970,
29892,
3579,
19290,
8443,
13,
30004,
13,
4706,
822,
1246,
29918,
392,
29918,
5105,
10456,
2080,
29879,
1125,
30004,
13,
9651,
9995,
30495,
31349,
30658,
31331,
31466,
31565,
30503,
31908,
31331,
31466,
31565,
30004,
13,
9651,
9995,
30004,
13,
9651,
411,
260,
4085,
29889,
9847,
29918,
3757,
3278,
7295,
30004,
13,
18884,
14391,
353,
8466,
29918,
4804,
26471,
13,
18884,
14391,
353,
15886,
29889,
22350,
29898,
4905,
29879,
8443,
13,
30004,
13,
9651,
822,
4656,
29918,
9144,
29898,
29881,
4905,
29879,
29892,
3651,
29922,
8516,
1125,
30004,
13,
18884,
6505,
267,
353,
1051,
29898,
2080,
29879,
8443,
13,
18884,
565,
3651,
338,
451,
6213,
29901,
30004,
13,
462,
1678,
6505,
267,
4619,
1051,
29898,
20897,
8443,
13,
18884,
411,
15886,
29889,
25584,
993,
29911,
4085,
580,
408,
260,
29901,
30004,
13,
462,
1678,
260,
29889,
12344,
29898,
12344,
267,
8443,
13,
462,
1678,
411,
15886,
29889,
6451,
29918,
22594,
4197,
29881,
4905,
29879,
29962,
1125,
30004,
13,
462,
4706,
14391,
353,
8466,
29918,
4804,
26471,
13,
18884,
4656,
29879,
353,
260,
29889,
24970,
29898,
30004,
13,
462,
1678,
14391,
29892,
6505,
267,
29892,
1962,
29918,
5105,
10070,
11759,
29881,
4905,
29879,
29962,
30004,
13,
18884,
1723,
30004,
13,
18884,
628,
260,
30004,
13,
18884,
736,
4656,
29879,
7503,
2435,
29898,
2080,
29879,
29897,
1402,
4656,
29879,
29961,
2435,
29898,
2080,
29879,
1125,
29962,
30004,
13,
30004,
13,
9651,
736,
14391,
29892,
4656,
29918,
9144,
30004,
13,
30004,
13,
4706,
14391,
29892,
4656,
29918,
9144,
353,
1246,
29918,
392,
29918,
5105,
10456,
20620,
29918,
2080,
29879,
8443,
13,
4706,
12151,
29918,
4905,
29879,
353,
17763,
29889,
1579,
8606,
29898,
4905,
29879,
8443,
13,
30004,
13,
4706,
822,
3935,
29918,
5105,
29918,
9144,
10456,
29881,
4905,
29879,
1125,
30004,
13,
9651,
4656,
29879,
353,
4656,
29918,
9144,
10456,
29881,
4905,
29879,
29892,
3651,
29922,
1311,
29889,
14968,
519,
29918,
705,
5861,
8443,
13,
9651,
736,
4656,
29879,
29961,
29900,
29962,
718,
4656,
29879,
29961,
29896,
29962,
30004,
13,
30004,
13,
4706,
6505,
267,
353,
12151,
29918,
2080,
29879,
718,
1583,
29889,
14968,
519,
29918,
705,
5861,
30004,
13,
4706,
6505,
267,
353,
518,
13264,
29889,
13441,
29918,
517,
29918,
20158,
29898,
29916,
29897,
363,
921,
297,
6505,
267,
29962,
30004,
13,
4706,
260,
4085,
29889,
11651,
29918,
16453,
29898,
30004,
13,
9651,
1246,
17255,
978,
1649,
29892,
12151,
29918,
4905,
29879,
29892,
6505,
267,
29892,
3935,
29918,
5105,
29918,
9144,
30004,
13,
4706,
1723,
30004,
13,
4706,
736,
14391,
30004,
13,
30004,
13,
1678,
736,
6426,
30004,
13,
30004,
13,
30004,
13,
30004,
13,
1753,
27971,
7295,
30004,
13,
1678,
9995,
31086,
30742,
31735,
31439,
30210,
30690,
30746,
31352,
234,
172,
186,
30257,
30210,
30354,
30959,
30004,
13,
1678,
9995,
30004,
13,
1678,
736,
15886,
29889,
3946,
294,
29889,
13239,
29889,
657,
29918,
6341,
29918,
12650,
2141,
657,
877,
262,
4951,
537,
742,
29871,
29896,
29872,
29896,
29906,
8443,
13,
30004,
13,
30004,
13,
1753,
731,
29918,
262,
4951,
537,
29898,
1767,
1125,
30004,
13,
1678,
9995,
30872,
30669,
30374,
30210,
30690,
30746,
31352,
234,
172,
186,
30257,
30210,
30354,
30959,
30004,
13,
1678,
9995,
30004,
13,
1678,
15886,
29889,
3946,
294,
29889,
13239,
29889,
657,
29918,
6341,
29918,
12650,
580,
1839,
262,
4951,
537,
2033,
353,
995,
30004,
13,
30004,
13,
30004,
13,
29937,
29871,
31538,
30666,
30780,
13023,
294,
29889,
27852,
29871,
30429,
30214,
30785,
31149,
30682,
30651,
31551,
476,
29889,
5463,
580,
29871,
31356,
31819,
31904,
30732,
30004,
13,
29968,
29889,
262,
4951,
537,
353,
27971,
30004,
13,
29968,
29889,
842,
29918,
262,
4951,
537,
353,
731,
29918,
262,
4951,
537,
30004,
13,
9675,
29889,
7576,
1839,
29056,
29889,
3946,
294,
29889,
27852,
2033,
353,
476,
30004,
13,
30004,
13,
6341,
29918,
12650,
353,
3336,
13,
1678,
525,
7467,
29884,
29918,
261,
29888,
2396,
9127,
29884,
29918,
261,
29888,
11167,
13,
1678,
525,
7467,
29884,
29918,
13161,
29882,
2396,
9127,
29884,
29918,
13161,
29882,
11167,
13,
1678,
525,
7467,
29884,
2396,
9127,
29884,
29918,
261,
29888,
11167,
13,
8117,
13,
13264,
29889,
3946,
294,
29889,
13239,
29889,
657,
29918,
6341,
29918,
12650,
2141,
5504,
29898,
6341,
29918,
12650,
8443,
13,
30004,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
30004,
13,
1678,
1053,
437,
312,
342,
30004,
13,
1678,
437,
312,
342,
29889,
1688,
1545,
26471,
13,
30004,
13,
2
] |
camd3/infrastructure/component/tests/test_component.py | mamrhein/CAmD3 | 0 | 30913 | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Name: test_component
# Purpose: Test driver for module component
#
# Author: <NAME> (<EMAIL>)
#
# Copyright: (c) 2014 <NAME>
# ----------------------------------------------------------------------------
# $Source$
# $Revision$
"""Test driver for module component"""
from abc import ABC
from numbers import Number
from typing import Tuple
import unittest
from camd3.infrastructure.component import (
Attribute, Component, ComponentLookupError, Immutable, implementer)
from camd3.infrastructure.component.component import _ABCSet, ComponentMeta
DFLT_NAMESPACE = ('__module__', '__qualname__', '__doc__')
class TestComp1(Component):
"""TestComp1"""
class TestComp2(Component):
"""TestComp2"""
attr1 = Attribute()
attr2 = Attribute()
def meth(self):
pass
attr3 = Attribute()
@property
def prop(self):
pass
@implementer(TestComp1, TestComp2)
class TestImpl(Component):
def __init__(self):
pass
class TestComp1Factory:
def __call__(self, i: Number) -> TestComp1:
return TestImpl()
def Number2TestComp1(i: Number) -> TestComp1: # noqa: D103
return TestImpl()
def Str2TestComp2(s: str) -> TestComp2: # noqa: D103
return TestImpl()
@implementer(TestComp1)
class TestABC(ABC):
pass
class TestComp3(Component):
"""TestComp3"""
def __init_subclass__(subcls, **kwds): # noqa: D105
try:
param = kwds.pop('param')
except KeyError:
pass
else:
subcls.param = param
class TestImpl3(TestComp3, param='P'):
pass
class TestComp4(Component, Immutable):
"""TestComp4"""
class TestComp5(TestComp4):
"""TestComp5"""
a = Attribute()
b = Attribute()
class TestComp6(TestComp5):
"""TestComp6"""
c = Attribute()
def __init__(self, a, b, c):
self.a = a
self.b = b
self.c = c
def Obj2TestComp6(obj: object) -> TestComp6: # noqa: D103
return TestComp6(obj, None, None)
def Tuple2TestComp6(tpl: Tuple[int, int, str]) -> TestComp6: # noqa: D103
return TestComp6(*tpl)
class TestComp7(TestComp6):
"""TestComp7"""
class TestComp8(TestComp1):
"""TestComp8"""
def __init__(self, a):
self.a = a
self.i = self.initialized
class ABCSetTest(unittest.TestCase):
def testAdd(self):
cls_list = (ABC, Immutable, TestComp4, Component)
self.assertEqual(_ABCSet(cls_list), _ABCSet({ABC, TestComp4}))
cls_list = (int, object, Number, float)
self.assertEqual(_ABCSet(cls_list), _ABCSet({int, float}))
class ComponentMetaTest(unittest.TestCase):
def test_constructor(self):
# name of descriptors
for name in ('attr1', 'attr2', 'attr3'):
self.assertEqual(getattr(getattr(TestComp2, name, None),
'name', None), name)
# __slots__ forced?
self.assertEqual(getattr(TestComp4, '__slots__', None), ())
self.assertEqual(getattr(TestComp5, '__slots__', None), ('_a', '_b'))
self.assertEqual(getattr(TestComp6, '__slots__', None), ('_c',))
self.assertRaises(TypeError, ComponentMeta, 'Test',
(TestImpl, TestComp4), {})
def test_init_subclass(self):
# init_subclass turned into a class method?
meth = TestComp3.__init_subclass__
self.assertTrue(getattr(meth, '__self__', None) is TestComp3)
# __init_subclass called?
self.assertEqual(getattr(TestImpl3, 'param', None), 'P')
def test_attr_names(self):
self.assertEqual(TestComp2.attr_names, ('attr1', 'attr2', 'attr3'))
self.assertEqual(TestComp2.all_attr_names,
('attr1', 'attr2', 'attr3'))
self.assertEqual(TestImpl.attr_names, ())
self.assertEqual(TestImpl.all_attr_names, ())
self.assertEqual(TestComp6.attr_names, ('c',))
self.assertEqual(TestComp6.all_attr_names, ('a', 'b', 'c'))
def test_implementer(self):
self.assertTrue(issubclass(TestImpl, TestComp1))
self.assertTrue(issubclass(TestImpl, TestComp2))
self.assertEqual(TestImpl.__virtual_bases__, {TestComp1, TestComp2})
self.assertTrue(issubclass(TestABC, TestComp1))
def test_adaptation(self):
# wrong component
self.assertRaises(AssertionError, TestComp2.add_adapter,
TestComp1Factory())
self.assertRaises(AssertionError, TestComp2.add_adapter,
Tuple2TestComp6)
# wrong number of args
func = lambda x, y: TestComp2()
func.__annotations__ = {'return': TestComp2, 'x': int, 'y': int}
self.assertRaises(AssertionError, TestComp2.add_adapter, func)
# variable number of args
func = lambda *args: TestComp2()
func.__annotations__ = {'return': TestComp2, 'args': int}
self.assertRaises(AssertionError, TestComp2.add_adapter, func)
# register some adapters
fct = TestComp1Factory()
TestComp1.add_adapter(fct)
self.assertIn(Number, TestComp1.__adapters__)
self.assertIn(fct, TestComp1.__adapters__[Number])
TestComp1.add_adapter(Number2TestComp1)
self.assertIn(Number2TestComp1, TestComp1.__adapters__[Number])
TestComp1.add_adapter(Number2TestComp1)
self.assertEqual(len(TestComp1.__adapters__[Number]), 2)
TestComp2.add_adapter(Str2TestComp2)
self.assertIn(str, TestComp2.__adapters__)
self.assertIn(Str2TestComp2, TestComp2.__adapters__[str])
TestComp6.add_adapter(Tuple2TestComp6)
adapter = TestComp6.add_adapter(Obj2TestComp6)
self.assertEqual(adapter, Obj2TestComp6)
# retrieve adapters
self.assertEqual(TestComp1.get_adapter(5), Number2TestComp1)
self.assertEqual(TestComp1.get_adapter(5.0), Number2TestComp1)
self.assertRaises(ComponentLookupError, TestComp1.get_adapter, 'x')
self.assertEqual(TestComp2.get_adapter('abc'), Str2TestComp2)
self.assertRaises(ComponentLookupError, TestComp2.get_adapter, 3)
self.assertEqual(TestComp6.get_adapter((3, 1, 'x')), Tuple2TestComp6)
self.assertEqual(TestComp6.get_adapter([3, 1, 'x']), Obj2TestComp6)
self.assertEqual(TestComp6.get_adapter(TestComp6(3, 1, 'x')),
Obj2TestComp6)
self.assertEqual(TestComp4.get_adapter((3, 1, 'x')), Tuple2TestComp6)
self.assertEqual(TestComp4.get_adapter([3, 1, 'x']), Obj2TestComp6)
# adapt objects
self.assertIsInstance(TestComp1.adapt(5), TestComp1)
self.assertIsInstance(TestComp1[5.0], TestComp1)
self.assertIsInstance(TestComp2.adapt('x'), TestComp2)
t1 = TestComp6.adapt((5, 17, 'abc'))
self.assertIsInstance(t1, TestComp6)
self.assertEqual((t1.a, t1.b, t1.c), (5, 17, 'abc'))
t2 = TestComp6.adapt(fct)
self.assertIsInstance(t2, TestComp6)
self.assertIs(t2.a, fct)
self.assertRaises(TypeError, TestComp7.adapt, t2)
t3 = TestComp6(4, 9, 'y')
for ct in (TestComp6, TestComp5, TestComp4):
self.assertIs(ct.adapt(t3), t3)
def test_repr(self):
self.assertEqual(repr(TestComp3),
'.'.join((__name__, TestComp3.__qualname__)))
class ComponentTest(unittest.TestCase):
def test_constructor(self):
comp = TestComp8(19)
self.assertFalse(comp.i)
self.assertTrue(comp.initialized)
if __name__ == '__main__':
unittest.main()
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
2683,
2683,
2683,
2683,
1378,
5634,
13,
29937,
4408,
29901,
4706,
1243,
29918,
9700,
13,
29937,
15247,
4220,
29901,
268,
4321,
7156,
363,
3883,
4163,
13,
29937,
13,
29937,
13361,
29901,
418,
529,
5813,
29958,
313,
29966,
26862,
6227,
12948,
13,
29937,
13,
29937,
14187,
1266,
29901,
259,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29946,
529,
5813,
29958,
13,
29937,
448,
2683,
2683,
2683,
2683,
1378,
5634,
13,
29937,
395,
4435,
29938,
13,
29937,
395,
1123,
4924,
29938,
13,
13,
13,
15945,
29908,
3057,
7156,
363,
3883,
4163,
15945,
29908,
13,
13,
13,
3166,
25638,
1053,
16417,
13,
3166,
3694,
1053,
9681,
13,
3166,
19229,
1053,
12603,
552,
13,
5215,
443,
27958,
13,
13,
3166,
3949,
29881,
29941,
29889,
262,
14867,
12425,
29889,
9700,
1053,
313,
13,
1678,
23833,
29892,
15924,
29892,
15924,
14959,
786,
2392,
29892,
1954,
23975,
29892,
2334,
261,
29897,
13,
3166,
3949,
29881,
29941,
29889,
262,
14867,
12425,
29889,
9700,
29889,
9700,
1053,
903,
19658,
2697,
29892,
15924,
19346,
13,
13,
13,
4037,
5850,
29918,
5813,
5550,
11538,
353,
6702,
1649,
5453,
1649,
742,
525,
1649,
15380,
978,
1649,
742,
525,
1649,
1514,
1649,
1495,
13,
13,
13,
1990,
4321,
6843,
29896,
29898,
5308,
1125,
13,
1678,
9995,
3057,
6843,
29896,
15945,
29908,
13,
13,
13,
1990,
4321,
6843,
29906,
29898,
5308,
1125,
13,
1678,
9995,
3057,
6843,
29906,
15945,
29908,
13,
13,
1678,
12421,
29896,
353,
23833,
580,
13,
1678,
12421,
29906,
353,
23833,
580,
13,
13,
1678,
822,
286,
621,
29898,
1311,
1125,
13,
4706,
1209,
13,
13,
1678,
12421,
29941,
353,
23833,
580,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3107,
29898,
1311,
1125,
13,
4706,
1209,
13,
13,
13,
29992,
326,
2037,
261,
29898,
3057,
6843,
29896,
29892,
4321,
6843,
29906,
29897,
13,
1990,
4321,
6647,
29898,
5308,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1209,
13,
13,
13,
1990,
4321,
6843,
29896,
5126,
29901,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
474,
29901,
9681,
29897,
1599,
4321,
6843,
29896,
29901,
13,
4706,
736,
4321,
6647,
580,
13,
13,
13,
1753,
9681,
29906,
3057,
6843,
29896,
29898,
29875,
29901,
9681,
29897,
1599,
4321,
6843,
29896,
29901,
462,
259,
396,
694,
25621,
29901,
360,
29896,
29900,
29941,
13,
1678,
736,
4321,
6647,
580,
13,
13,
13,
1753,
3767,
29906,
3057,
6843,
29906,
29898,
29879,
29901,
851,
29897,
1599,
4321,
6843,
29906,
29901,
462,
308,
396,
694,
25621,
29901,
360,
29896,
29900,
29941,
13,
1678,
736,
4321,
6647,
580,
13,
13,
13,
29992,
326,
2037,
261,
29898,
3057,
6843,
29896,
29897,
13,
1990,
4321,
19658,
29898,
19658,
1125,
13,
1678,
1209,
13,
13,
13,
1990,
4321,
6843,
29941,
29898,
5308,
1125,
13,
1678,
9995,
3057,
6843,
29941,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
29918,
1491,
1990,
12035,
1491,
25932,
29892,
3579,
11022,
6289,
1125,
462,
418,
396,
694,
25621,
29901,
360,
29896,
29900,
29945,
13,
4706,
1018,
29901,
13,
9651,
1828,
353,
9049,
6289,
29889,
7323,
877,
3207,
1495,
13,
4706,
5174,
7670,
2392,
29901,
13,
9651,
1209,
13,
4706,
1683,
29901,
13,
9651,
1014,
25932,
29889,
3207,
353,
1828,
13,
13,
13,
1990,
4321,
6647,
29941,
29898,
3057,
6843,
29941,
29892,
1828,
2433,
29925,
29374,
13,
1678,
1209,
13,
13,
13,
1990,
4321,
6843,
29946,
29898,
5308,
29892,
1954,
23975,
1125,
13,
1678,
9995,
3057,
6843,
29946,
15945,
29908,
13,
13,
13,
1990,
4321,
6843,
29945,
29898,
3057,
6843,
29946,
1125,
13,
1678,
9995,
3057,
6843,
29945,
15945,
29908,
13,
13,
1678,
263,
353,
23833,
580,
13,
1678,
289,
353,
23833,
580,
13,
13,
13,
1990,
4321,
6843,
29953,
29898,
3057,
6843,
29945,
1125,
13,
1678,
9995,
3057,
6843,
29953,
15945,
29908,
13,
13,
1678,
274,
353,
23833,
580,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
263,
29892,
289,
29892,
274,
1125,
13,
4706,
1583,
29889,
29874,
353,
263,
13,
4706,
1583,
29889,
29890,
353,
289,
13,
4706,
1583,
29889,
29883,
353,
274,
13,
13,
13,
1753,
4250,
29926,
29906,
3057,
6843,
29953,
29898,
5415,
29901,
1203,
29897,
1599,
4321,
6843,
29953,
29901,
462,
259,
396,
694,
25621,
29901,
360,
29896,
29900,
29941,
13,
1678,
736,
4321,
6843,
29953,
29898,
5415,
29892,
6213,
29892,
6213,
29897,
13,
13,
13,
1753,
12603,
552,
29906,
3057,
6843,
29953,
29898,
29873,
572,
29901,
12603,
552,
29961,
524,
29892,
938,
29892,
851,
2314,
1599,
4321,
6843,
29953,
29901,
259,
396,
694,
25621,
29901,
360,
29896,
29900,
29941,
13,
1678,
736,
4321,
6843,
29953,
10456,
29873,
572,
29897,
13,
13,
13,
1990,
4321,
6843,
29955,
29898,
3057,
6843,
29953,
1125,
13,
1678,
9995,
3057,
6843,
29955,
15945,
29908,
13,
13,
13,
1990,
4321,
6843,
29947,
29898,
3057,
6843,
29896,
1125,
13,
1678,
9995,
3057,
6843,
29947,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
263,
1125,
13,
4706,
1583,
29889,
29874,
353,
263,
13,
4706,
1583,
29889,
29875,
353,
1583,
29889,
11228,
1891,
13,
13,
13,
1990,
16417,
2697,
3057,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
2528,
29898,
1311,
1125,
13,
4706,
1067,
29879,
29918,
1761,
353,
313,
19658,
29892,
1954,
23975,
29892,
4321,
6843,
29946,
29892,
15924,
29897,
13,
4706,
1583,
29889,
9294,
9843,
7373,
19658,
2697,
29898,
25932,
29918,
1761,
511,
903,
19658,
2697,
3319,
19658,
29892,
4321,
6843,
29946,
20073,
13,
4706,
1067,
29879,
29918,
1761,
353,
313,
524,
29892,
1203,
29892,
9681,
29892,
5785,
29897,
13,
4706,
1583,
29889,
9294,
9843,
7373,
19658,
2697,
29898,
25932,
29918,
1761,
511,
903,
19658,
2697,
3319,
524,
29892,
5785,
20073,
13,
13,
13,
1990,
15924,
19346,
3057,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
27821,
29898,
1311,
1125,
13,
4706,
396,
1024,
310,
29037,
943,
13,
4706,
363,
1024,
297,
6702,
5552,
29896,
742,
525,
5552,
29906,
742,
525,
5552,
29941,
29374,
13,
9651,
1583,
29889,
9294,
9843,
29898,
657,
5552,
29898,
657,
5552,
29898,
3057,
6843,
29906,
29892,
1024,
29892,
6213,
511,
13,
462,
462,
268,
525,
978,
742,
6213,
511,
1024,
29897,
13,
4706,
396,
4770,
2536,
1862,
1649,
11826,
29973,
13,
4706,
1583,
29889,
9294,
9843,
29898,
657,
5552,
29898,
3057,
6843,
29946,
29892,
525,
1649,
2536,
1862,
1649,
742,
6213,
511,
313,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
657,
5552,
29898,
3057,
6843,
29945,
29892,
525,
1649,
2536,
1862,
1649,
742,
6213,
511,
6702,
29918,
29874,
742,
22868,
29890,
8785,
13,
4706,
1583,
29889,
9294,
9843,
29898,
657,
5552,
29898,
3057,
6843,
29953,
29892,
525,
1649,
2536,
1862,
1649,
742,
6213,
511,
6702,
29918,
29883,
742,
876,
13,
4706,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1542,
2392,
29892,
15924,
19346,
29892,
525,
3057,
742,
13,
462,
3986,
313,
3057,
6647,
29892,
4321,
6843,
29946,
511,
426,
1800,
13,
13,
1678,
822,
1243,
29918,
2344,
29918,
1491,
1990,
29898,
1311,
1125,
13,
4706,
396,
2069,
29918,
1491,
1990,
6077,
964,
263,
770,
1158,
29973,
13,
4706,
286,
621,
353,
4321,
6843,
29941,
17255,
2344,
29918,
1491,
1990,
1649,
13,
4706,
1583,
29889,
9294,
5574,
29898,
657,
5552,
29898,
29885,
621,
29892,
525,
1649,
1311,
1649,
742,
6213,
29897,
338,
4321,
6843,
29941,
29897,
13,
4706,
396,
4770,
2344,
29918,
1491,
1990,
2000,
29973,
13,
4706,
1583,
29889,
9294,
9843,
29898,
657,
5552,
29898,
3057,
6647,
29941,
29892,
525,
3207,
742,
6213,
511,
525,
29925,
1495,
13,
13,
1678,
822,
1243,
29918,
5552,
29918,
7039,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29906,
29889,
5552,
29918,
7039,
29892,
6702,
5552,
29896,
742,
525,
5552,
29906,
742,
525,
5552,
29941,
8785,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29906,
29889,
497,
29918,
5552,
29918,
7039,
29892,
13,
462,
308,
6702,
5552,
29896,
742,
525,
5552,
29906,
742,
525,
5552,
29941,
8785,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6647,
29889,
5552,
29918,
7039,
29892,
313,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6647,
29889,
497,
29918,
5552,
29918,
7039,
29892,
313,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29953,
29889,
5552,
29918,
7039,
29892,
6702,
29883,
742,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29953,
29889,
497,
29918,
5552,
29918,
7039,
29892,
6702,
29874,
742,
525,
29890,
742,
525,
29883,
8785,
13,
13,
1678,
822,
1243,
29918,
326,
2037,
261,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
5574,
29898,
790,
431,
1990,
29898,
3057,
6647,
29892,
4321,
6843,
29896,
876,
13,
4706,
1583,
29889,
9294,
5574,
29898,
790,
431,
1990,
29898,
3057,
6647,
29892,
4321,
6843,
29906,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6647,
17255,
18714,
29918,
29890,
2129,
1649,
29892,
426,
3057,
6843,
29896,
29892,
4321,
6843,
29906,
1800,
13,
4706,
1583,
29889,
9294,
5574,
29898,
790,
431,
1990,
29898,
3057,
19658,
29892,
4321,
6843,
29896,
876,
13,
13,
1678,
822,
1243,
29918,
1114,
415,
362,
29898,
1311,
1125,
13,
4706,
396,
2743,
4163,
13,
4706,
1583,
29889,
9294,
29934,
1759,
267,
29898,
14697,
291,
2392,
29892,
4321,
6843,
29906,
29889,
1202,
29918,
21412,
29892,
13,
462,
3986,
4321,
6843,
29896,
5126,
3101,
13,
4706,
1583,
29889,
9294,
29934,
1759,
267,
29898,
14697,
291,
2392,
29892,
4321,
6843,
29906,
29889,
1202,
29918,
21412,
29892,
13,
462,
3986,
12603,
552,
29906,
3057,
6843,
29953,
29897,
13,
4706,
396,
2743,
1353,
310,
6389,
13,
4706,
3653,
353,
14013,
921,
29892,
343,
29901,
4321,
6843,
29906,
580,
13,
4706,
3653,
17255,
6735,
800,
1649,
353,
11117,
2457,
2396,
4321,
6843,
29906,
29892,
525,
29916,
2396,
938,
29892,
525,
29891,
2396,
938,
29913,
13,
4706,
1583,
29889,
9294,
29934,
1759,
267,
29898,
14697,
291,
2392,
29892,
4321,
6843,
29906,
29889,
1202,
29918,
21412,
29892,
3653,
29897,
13,
4706,
396,
2286,
1353,
310,
6389,
13,
4706,
3653,
353,
14013,
334,
5085,
29901,
4321,
6843,
29906,
580,
13,
4706,
3653,
17255,
6735,
800,
1649,
353,
11117,
2457,
2396,
4321,
6843,
29906,
29892,
525,
5085,
2396,
938,
29913,
13,
4706,
1583,
29889,
9294,
29934,
1759,
267,
29898,
14697,
291,
2392,
29892,
4321,
6843,
29906,
29889,
1202,
29918,
21412,
29892,
3653,
29897,
13,
4706,
396,
6036,
777,
594,
481,
2153,
13,
4706,
285,
312,
353,
4321,
6843,
29896,
5126,
580,
13,
4706,
4321,
6843,
29896,
29889,
1202,
29918,
21412,
29898,
29888,
312,
29897,
13,
4706,
1583,
29889,
9294,
797,
29898,
4557,
29892,
4321,
6843,
29896,
17255,
328,
481,
2153,
1649,
29897,
13,
4706,
1583,
29889,
9294,
797,
29898,
29888,
312,
29892,
4321,
6843,
29896,
17255,
328,
481,
2153,
1649,
29961,
4557,
2314,
13,
4706,
4321,
6843,
29896,
29889,
1202,
29918,
21412,
29898,
4557,
29906,
3057,
6843,
29896,
29897,
13,
4706,
1583,
29889,
9294,
797,
29898,
4557,
29906,
3057,
6843,
29896,
29892,
4321,
6843,
29896,
17255,
328,
481,
2153,
1649,
29961,
4557,
2314,
13,
4706,
4321,
6843,
29896,
29889,
1202,
29918,
21412,
29898,
4557,
29906,
3057,
6843,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
3057,
6843,
29896,
17255,
328,
481,
2153,
1649,
29961,
4557,
11724,
29871,
29906,
29897,
13,
4706,
4321,
6843,
29906,
29889,
1202,
29918,
21412,
29898,
5015,
29906,
3057,
6843,
29906,
29897,
13,
4706,
1583,
29889,
9294,
797,
29898,
710,
29892,
4321,
6843,
29906,
17255,
328,
481,
2153,
1649,
29897,
13,
4706,
1583,
29889,
9294,
797,
29898,
5015,
29906,
3057,
6843,
29906,
29892,
4321,
6843,
29906,
17255,
328,
481,
2153,
1649,
29961,
710,
2314,
13,
4706,
4321,
6843,
29953,
29889,
1202,
29918,
21412,
29898,
23215,
552,
29906,
3057,
6843,
29953,
29897,
13,
4706,
13304,
353,
4321,
6843,
29953,
29889,
1202,
29918,
21412,
29898,
9930,
29906,
3057,
6843,
29953,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
21412,
29892,
4250,
29926,
29906,
3057,
6843,
29953,
29897,
13,
4706,
396,
10563,
594,
481,
2153,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29896,
29889,
657,
29918,
21412,
29898,
29945,
511,
9681,
29906,
3057,
6843,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29896,
29889,
657,
29918,
21412,
29898,
29945,
29889,
29900,
511,
9681,
29906,
3057,
6843,
29896,
29897,
13,
4706,
1583,
29889,
9294,
29934,
1759,
267,
29898,
5308,
14959,
786,
2392,
29892,
4321,
6843,
29896,
29889,
657,
29918,
21412,
29892,
525,
29916,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29906,
29889,
657,
29918,
21412,
877,
10736,
5477,
3767,
29906,
3057,
6843,
29906,
29897,
13,
4706,
1583,
29889,
9294,
29934,
1759,
267,
29898,
5308,
14959,
786,
2392,
29892,
4321,
6843,
29906,
29889,
657,
29918,
21412,
29892,
29871,
29941,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29953,
29889,
657,
29918,
21412,
3552,
29941,
29892,
29871,
29896,
29892,
525,
29916,
1495,
511,
12603,
552,
29906,
3057,
6843,
29953,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29953,
29889,
657,
29918,
21412,
4197,
29941,
29892,
29871,
29896,
29892,
525,
29916,
2033,
511,
4250,
29926,
29906,
3057,
6843,
29953,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29953,
29889,
657,
29918,
21412,
29898,
3057,
6843,
29953,
29898,
29941,
29892,
29871,
29896,
29892,
525,
29916,
1495,
511,
13,
462,
308,
4250,
29926,
29906,
3057,
6843,
29953,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29946,
29889,
657,
29918,
21412,
3552,
29941,
29892,
29871,
29896,
29892,
525,
29916,
1495,
511,
12603,
552,
29906,
3057,
6843,
29953,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3057,
6843,
29946,
29889,
657,
29918,
21412,
4197,
29941,
29892,
29871,
29896,
29892,
525,
29916,
2033,
511,
4250,
29926,
29906,
3057,
6843,
29953,
29897,
13,
4706,
396,
7744,
3618,
13,
4706,
1583,
29889,
9294,
3624,
4998,
29898,
3057,
6843,
29896,
29889,
1114,
415,
29898,
29945,
511,
4321,
6843,
29896,
29897,
13,
4706,
1583,
29889,
9294,
3624,
4998,
29898,
3057,
6843,
29896,
29961,
29945,
29889,
29900,
1402,
4321,
6843,
29896,
29897,
13,
4706,
1583,
29889,
9294,
3624,
4998,
29898,
3057,
6843,
29906,
29889,
1114,
415,
877,
29916,
5477,
4321,
6843,
29906,
29897,
13,
4706,
260,
29896,
353,
4321,
6843,
29953,
29889,
1114,
415,
3552,
29945,
29892,
29871,
29896,
29955,
29892,
525,
10736,
8785,
13,
4706,
1583,
29889,
9294,
3624,
4998,
29898,
29873,
29896,
29892,
4321,
6843,
29953,
29897,
13,
4706,
1583,
29889,
9294,
9843,
3552,
29873,
29896,
29889,
29874,
29892,
260,
29896,
29889,
29890,
29892,
260,
29896,
29889,
29883,
511,
313,
29945,
29892,
29871,
29896,
29955,
29892,
525,
10736,
8785,
13,
4706,
260,
29906,
353,
4321,
6843,
29953,
29889,
1114,
415,
29898,
29888,
312,
29897,
13,
4706,
1583,
29889,
9294,
3624,
4998,
29898,
29873,
29906,
29892,
4321,
6843,
29953,
29897,
13,
4706,
1583,
29889,
9294,
3624,
29898,
29873,
29906,
29889,
29874,
29892,
285,
312,
29897,
13,
4706,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1542,
2392,
29892,
4321,
6843,
29955,
29889,
1114,
415,
29892,
260,
29906,
29897,
13,
4706,
260,
29941,
353,
4321,
6843,
29953,
29898,
29946,
29892,
29871,
29929,
29892,
525,
29891,
1495,
13,
4706,
363,
274,
29873,
297,
313,
3057,
6843,
29953,
29892,
4321,
6843,
29945,
29892,
4321,
6843,
29946,
1125,
13,
9651,
1583,
29889,
9294,
3624,
29898,
312,
29889,
1114,
415,
29898,
29873,
29941,
511,
260,
29941,
29897,
13,
13,
1678,
822,
1243,
29918,
276,
558,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
3057,
6843,
29941,
511,
13,
462,
308,
15300,
4286,
7122,
3552,
1649,
978,
1649,
29892,
4321,
6843,
29941,
17255,
15380,
978,
1649,
4961,
13,
13,
13,
1990,
15924,
3057,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
27821,
29898,
1311,
1125,
13,
4706,
752,
353,
4321,
6843,
29947,
29898,
29896,
29929,
29897,
13,
4706,
1583,
29889,
9294,
8824,
29898,
2388,
29889,
29875,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
2388,
29889,
11228,
1891,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
443,
27958,
29889,
3396,
580,
13,
2
] |
Algoritimos/uri1020.py | mathspin/Algoritimos-py | 0 | 132671 | <filename>Algoritimos/uri1020.py
v = input("digite um valor em dias: ")
a = int(int(v)/365)
m = int((int(v)%365)/30)
d = int((int(v)%365)%30)
print(str(a)+" ano(s)")
print(str(m)+" mes(es)")
print(str(d)+" dias(s)")
| [
1,
529,
9507,
29958,
2499,
21208,
277,
18594,
29914,
5338,
29896,
29900,
29906,
29900,
29889,
2272,
13,
29894,
353,
1881,
703,
7501,
568,
1922,
16497,
953,
652,
294,
29901,
16521,
13,
29874,
353,
938,
29898,
524,
29898,
29894,
6802,
29941,
29953,
29945,
29897,
13,
29885,
353,
938,
3552,
524,
29898,
29894,
29897,
29995,
29941,
29953,
29945,
6802,
29941,
29900,
29897,
13,
29881,
353,
938,
3552,
524,
29898,
29894,
29897,
29995,
29941,
29953,
29945,
29897,
29995,
29941,
29900,
29897,
13,
2158,
29898,
710,
29898,
29874,
7240,
29908,
19410,
29898,
29879,
25760,
13,
2158,
29898,
710,
29898,
29885,
7240,
29908,
4883,
29898,
267,
25760,
13,
2158,
29898,
710,
29898,
29881,
7240,
29908,
652,
294,
29898,
29879,
25760,
13,
2
] |
orangecontrib/aps/shadow/widgets/extension/ow_bendable_ellipsoid_mirror.py | oasys-aps-kit/OASYS1-APS-ShadowOui | 1 | 139140 | import os, sys, numpy
from scipy.interpolate import RectBivariateSpline, interp2d
from scipy.optimize import curve_fit
from matplotlib import cm
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
from matplotlib.figure import Figure
try:
from mpl_toolkits.mplot3d import Axes3D # necessario per caricare i plot 3D
except:
pass
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QSettings
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from oasys.widgets import congruence
from oasys.util.oasys_util import TriggerIn
from orangecontrib.shadow.util.shadow_objects import ShadowOpticalElement, ShadowBeam, ShadowPreProcessorData
from orangecontrib.shadow.util.shadow_util import ShadowPreProcessor
from orangecontrib.shadow.widgets.gui import ow_ellipsoid_element, ow_optical_element
from Shadow import ShadowTools as ST
TRAPEZIUM = 0
RECTANGLE = 1
SINGLE_MOMENTUM = 0
DOUBLE_MOMENTUM = 1
class BendableEllipsoidMirror(ow_ellipsoid_element.EllipsoidElement):
name = "Bendable Ellipsoid Mirror"
description = "Shadow OE: Bendable Ellipsoid Mirror"
icon = "icons/bendable_ellipsoid_mirror.png"
maintainer = "<NAME>"
maintainer_email = "<EMAIL>"
priority = 6
category = "Optical Elements"
keywords = ["data", "file", "load", "read"]
send_footprint_beam = QSettings().value("output/send-footprint", 0, int) == 1
if send_footprint_beam:
outputs = [{"name":"Beam",
"type":ShadowBeam,
"doc":"Shadow Beam",
"id":"beam"},
{"name":"Footprint",
"type":list,
"doc":"Footprint",
"id":"beam"},
{"name":"Trigger",
"type": TriggerIn,
"doc":"Feedback signal to start a new beam simulation",
"id":"Trigger"},
{"name": "PreProcessor_Data",
"type": ShadowPreProcessorData,
"doc": "PreProcessor Data",
"id": "PreProcessor_Data"}
]
else:
outputs = [{"name":"Beam",
"type":ShadowBeam,
"doc":"Shadow Beam",
"id":"beam"},
{"name":"Trigger",
"type": TriggerIn,
"doc":"Feedback signal to start a new beam simulation",
"id":"Trigger"},
{"name": "PreProcessor_Data",
"type": ShadowPreProcessorData,
"doc": "PreProcessor Data",
"id": "PreProcessor_Data"}
]
show_bender_plots = Setting(0)
bender_bin_x = Setting(100)
bender_bin_y = Setting(500)
E = Setting(131000)
h = Setting(10)
kind_of_bender = Setting(1)
shape = Setting(0)
output_file_name = Setting("mirror_bender.dat")
which_length = Setting(0)
optimized_length = Setting(0.0)
M1 = Setting(0.0)
ratio = Setting(0.5)
e = Setting(0.3)
M1_out = 0.0
ratio_out = 0.0
e_out = 0.0
M1_fixed = Setting(False)
ratio_fixed = Setting(False)
e_fixed = Setting(False)
M1_min = Setting(0.0)
ratio_min = Setting(0.0)
e_min = Setting(0.0)
M1_max = Setting(1000.0)
ratio_max = Setting(10.0)
e_max = Setting(1.0)
def __init__(self):
graphical_Options=ow_optical_element.GraphicalOptions(is_mirror=True)
super().__init__(graphical_Options)
tabs = gui.tabWidget(oasysgui.createTabPage(self.tabs_basic_setting, "Bender"))
tab_bender = oasysgui.createTabPage(tabs, "Bender Setting")
surface_box = oasysgui.widgetBox(tab_bender, "Surface Setting", addSpace=False, orientation="vertical")
oasysgui.lineEdit(surface_box, self, "bender_bin_x", "bins Sagittal", labelWidth=260, valueType=int, orientation="horizontal")
oasysgui.lineEdit(surface_box, self, "bender_bin_y", "bins Transversal", labelWidth=260, valueType=int, orientation="horizontal")
material_box = oasysgui.widgetBox(tab_bender, "Bender Setting", addSpace=False, orientation="vertical")
self.le_E = oasysgui.lineEdit(material_box, self, "E", "Young's Modulus ", labelWidth=260, valueType=float, orientation="horizontal")
self.le_h = oasysgui.lineEdit(material_box, self, "h", "Thickness ", labelWidth=260, valueType=float, orientation="horizontal")
gui.comboBox(material_box, self, "kind_of_bender", label="Kind Of Bender ", items=["Single Momentum", "Double Momentum"],
labelWidth=150, orientation="horizontal", callback=self.set_kind_of_bender)
gui.comboBox(material_box, self, "shape", label="Shape ", items=["Trapezium", "Rectangle"],
labelWidth=150, orientation="horizontal", callback=self.set_shape)
tab_fit = oasysgui.createTabPage(tabs, "Fit Setting")
fit_box = oasysgui.widgetBox(tab_fit, "", addSpace=False, orientation="vertical")
file_box = oasysgui.widgetBox(fit_box, "", addSpace=False, orientation="horizontal", height=25)
self.le_output_file_name = oasysgui.lineEdit(file_box, self, "output_file_name", "Out File Name", labelWidth=100, valueType=str, orientation="horizontal")
gui.button(file_box, self, "...", callback=self.select_output_file, width=20)
length_box = oasysgui.widgetBox(fit_box, "", addSpace=False, orientation="horizontal")
self.cb_optimized_length = gui.comboBox(length_box, self, "which_length", label="Optimized Length ", items=["Total", "Partial"],
labelWidth=150, orientation="horizontal", callback=self.set_which_length)
self.le_optimized_length = oasysgui.lineEdit(length_box, self, "optimized_length", " ", labelWidth=10, valueType=float, orientation="horizontal")
self.set_which_length()
gui.separator(fit_box)
def add_parameter_box(container_box, variable, label):
box = oasysgui.widgetBox(container_box, "", addSpace=False, orientation="horizontal")
oasysgui.lineEdit(box, self, variable, label, labelWidth=50, valueType=float, orientation="horizontal")
gui.label(box, self, " ", labelWidth=58)
box = oasysgui.widgetBox(container_box, "", addSpace=False, orientation="horizontal")
setattr(self, "le_" + variable + "_min", oasysgui.lineEdit(box, self, variable + "_min", "Min",
labelWidth=50, valueType=float, orientation="horizontal"))
setattr(self, "le_" + variable + "_max", oasysgui.lineEdit(box, self, variable + "_max", "Max",
labelWidth=35, valueType=float, orientation="horizontal"))
gui.checkBox(box, self, variable + "_fixed", "Fixed", callback=getattr(self, "set_" + variable))
box = oasysgui.widgetBox(container_box, "", addSpace=False, orientation="horizontal")
le = oasysgui.lineEdit(box, self, variable + "_out", "Fitted", labelWidth=50, valueType=float, orientation="horizontal")
le.setEnabled(False)
le.setStyleSheet("color: blue; background-color: rgb(254, 244, 205); font:bold")
def set_variable_fit(): setattr(self, variable, getattr(self, variable + "_out"))
gui.button(box, self, "<- Use", width=58, callback=set_variable_fit)
getattr(self, "set_" + variable)()
m1_box = oasysgui.widgetBox(fit_box, "", addSpace=False, orientation="vertical")
gui.separator(fit_box, 10)
self.ratio_box = oasysgui.widgetBox(fit_box, "", addSpace=False, orientation="vertical")
gui.separator(fit_box, 10)
self.e_box = oasysgui.widgetBox(fit_box, "", addSpace=False, orientation="vertical")
gui.separator(fit_box, 10)
add_parameter_box(m1_box, "M1", "M1")
add_parameter_box(self.ratio_box, "ratio", "M1/M2")
add_parameter_box(self.e_box, "e", "e")
self.set_kind_of_bender()
self.set_shape()
#######################################################
plot_tab = oasysgui.createTabPage(self.main_tabs, "Bender Plots")
view_box = oasysgui.widgetBox(plot_tab, "Plotting Style", addSpace=False, orientation="vertical", width=350)
self.view_type_combo = gui.comboBox(view_box, self, "show_bender_plots", label="Show Plots", labelWidth=220,
items=["No", "Yes"], sendSelectedValue=False, orientation="horizontal")
bender_tabs = oasysgui.tabWidget(plot_tab)
tabs = [oasysgui.createTabPage(bender_tabs, "Bender vs. Ideal (1D)"),
oasysgui.createTabPage(bender_tabs, "Ideal - Bender (1D)"),
oasysgui.createTabPage(bender_tabs, "Ideal - Bender (3D)"),
oasysgui.createTabPage(bender_tabs, "Figure Error (3D)"),
oasysgui.createTabPage(bender_tabs, "Ideal - Bender + Figure Error (3D)")]
def create_figure_canvas(mode="3D"):
figure = Figure(figsize=(100, 100))
figure.patch.set_facecolor('white')
if mode == "3D": figure.add_subplot(111, projection='3d')
else: figure.add_subplot(111)
figure_canvas = FigureCanvasQTAgg(figure)
figure_canvas.setFixedWidth(self.IMAGE_WIDTH)
figure_canvas.setFixedHeight(self.IMAGE_HEIGHT-10)
return figure_canvas
self.figure_canvas = [create_figure_canvas("1D"), create_figure_canvas("1D"),
create_figure_canvas(), create_figure_canvas(), create_figure_canvas()]
for tab, figure_canvas in zip(tabs, self.figure_canvas): tab.layout().addWidget(figure_canvas)
gui.rubber(self.controlArea)
gui.rubber(self.mainArea)
################################################################
#
# SHADOW MANAGEMENT
#
################################################################
def select_output_file(self):
self.le_output_file_name.setText(oasysgui.selectFileFromDialog(self, self.output_file_name, "Select Output File", file_extension_filter="Data Files (*.dat)"))
def set_kind_of_bender(self):
self.ratio_box.setVisible(self.kind_of_bender==1)
def set_shape(self):
self.e_box.setVisible(self.shape==0)
def set_which_length(self):
self.le_optimized_length.setEnabled(self.which_length==1)
def set_M1(self):
self.le_M1_min.setEnabled(self.M1_fixed==False)
self.le_M1_max.setEnabled(self.M1_fixed==False)
def set_ratio(self):
self.le_ratio_min.setEnabled(self.ratio_fixed==False)
self.le_ratio_max.setEnabled(self.ratio_fixed==False)
def set_e(self):
self.le_e_min.setEnabled(self.e_fixed==False)
self.le_e_max.setEnabled(self.e_fixed==False)
def after_change_workspace_units(self):
super().after_change_workspace_units()
label = self.le_E.parent().layout().itemAt(0).widget()
label.setText(label.text() + " [N/" + self.workspace_units_label + "^2]")
label = self.le_h.parent().layout().itemAt(0).widget()
label.setText(label.text() + " [" + self.workspace_units_label + "]")
label = self.cb_optimized_length.parent().layout().itemAt(0).widget()
label.setText(label.text() + " [" + self.workspace_units_label + "]")
def checkFields(self):
super().checkFields()
if self.is_cylinder != 1: raise ValueError("Bender Ellipse must be a cylinder")
if self.cylinder_orientation != 0: raise ValueError("Cylinder orientation must be 0")
if self.is_infinite == 0: raise ValueError("This OE can't have infinite dimensions")
if self.which_length==1:
congruence.checkStrictlyPositiveNumber(self.optimized_length, "Optimized Length")
congruence.checkLessOrEqualThan(self.optimized_length, self.dim_y_plus+self.dim_y_minus, "Optimized Length", "Total Length")
if self.modified_surface > 0:
if not (self.modified_surface == 1 and self.ms_type_of_defect == 2):
raise ValueError("Only Preprocessor generated error profiles are admitted")
congruence.checkStrictlyPositiveNumber(self.bender_bin_x, "Bins X")
congruence.checkStrictlyPositiveNumber(self.bender_bin_y, "Bins Y")
self.output_file_name_full = congruence.checkFileName(self.output_file_name)
def completeOperations(self, shadow_oe):
shadow_oe_temp = shadow_oe.duplicate()
input_beam_temp = self.input_beam.duplicate(history=False)
self.manage_acceptance_slits(shadow_oe_temp)
ShadowBeam.traceFromOE(input_beam_temp,
shadow_oe_temp,
write_start_file=0,
write_end_file=0,
widget_class_name=type(self).__name__)
x, y, z = self.calculate_ideal_surface(shadow_oe_temp)
bender_parameter, z_bender_correction = self.calculate_bender_correction(y, z, self.kind_of_bender, self.shape)
self.M1_out = round(bender_parameter[0], int(6*self.workspace_units_to_mm))
if self.shape == TRAPEZIUM:
self.e_out = round(bender_parameter[1], 5)
if self.kind_of_bender == DOUBLE_MOMENTUM: self.ratio_out = round(bender_parameter[2], 5)
elif self.shape == RECTANGLE:
if self.kind_of_bender == DOUBLE_MOMENTUM: self.ratio_out = round(bender_parameter[1], 5)
self.plot3D(x, y, z_bender_correction, 2, "Ideal - Bender Surfaces")
if self.modified_surface > 0:
x_e, y_e, z_e = ShadowPreProcessor.read_surface_error_file(self.ms_defect_file_name)
if len(x) == len(x_e) and len(y) == len(y_e) and \
x[0] == x_e[0] and x[-1] == x_e[-1] and \
y[0] == y_e[0] and y[-1] == y_e[-1]:
z_figure_error = z_e
else:
z_figure_error = interp2d(y_e, x_e, z_e, kind='cubic')(y, x)
z_bender_correction += z_figure_error
self.plot3D(x, y, z_figure_error, 3, "Figure Error Surface")
self.plot3D(x, y, z_bender_correction, 4, "Ideal - Bender + Figure Error Surfaces")
ST.write_shadow_surface(z_bender_correction.T, numpy.round(x, 6), numpy.round(y, 6), self.output_file_name_full)
# Add new surface as figure error
shadow_oe._oe.F_RIPPLE = 1
shadow_oe._oe.F_G_S = 2
shadow_oe._oe.FILE_RIP = bytes(self.output_file_name_full, 'utf-8')
# Redo Raytracing with the new file
super().completeOperations(shadow_oe)
self.send("PreProcessor_Data", ShadowPreProcessorData(error_profile_data_file=self.output_file_name,
error_profile_x_dim=self.dim_x_plus+self.dim_x_minus,
error_profile_y_dim=self.dim_y_plus+self.dim_y_minus))
def instantiateShadowOE(self):
return ShadowOpticalElement.create_ellipsoid_mirror()
def calculate_ideal_surface(self, shadow_oe, sign=-1):
x = numpy.linspace(-self.dim_x_minus, self.dim_x_plus, self.bender_bin_x + 1)
y = numpy.linspace(-self.dim_y_minus, self.dim_y_plus, self.bender_bin_y + 1)
c1 = round(shadow_oe._oe.CCC[0], 10)
c2 = round(shadow_oe._oe.CCC[1], 10)
c3 = round(shadow_oe._oe.CCC[2], 10)
c4 = round(shadow_oe._oe.CCC[3], 10)
c5 = round(shadow_oe._oe.CCC[4], 10)
c6 = round(shadow_oe._oe.CCC[5], 10)
c7 = round(shadow_oe._oe.CCC[6], 10)
c8 = round(shadow_oe._oe.CCC[7], 10)
c9 = round(shadow_oe._oe.CCC[8], 10)
c10 = round(shadow_oe._oe.CCC[9], 10)
xx, yy = numpy.meshgrid(x, y)
c = c1*(xx**2) + c2*(yy**2) + c4*xx*yy + c7*xx + c8*yy + c10
b = c5*yy + c6*xx + c9
a = c3
z = (-b + sign*numpy.sqrt(b**2 - 4*a*c))/(2*a)
z[b**2 - 4*a*c < 0] = numpy.nan
return x, y, z.T
def calculate_bender_correction(self, y, z, kind_of_bender, shape):
b0 = self.dim_x_plus + self.dim_x_minus
L = self.dim_y_plus + self.dim_y_minus # add optimization length
# flip the coordinate system to be consistent with Mike's formulas
ideal_profile = z[0, :][::-1] # one row is the profile of the cylinder, enough for the minimizer
ideal_profile += -ideal_profile[0] + ((L/2 + y)*(ideal_profile[0]-ideal_profile[-1]))/L # Rotation
if self.which_length == 0:
y_fit = y
ideal_profile_fit = ideal_profile
else:
cursor = numpy.where(numpy.logical_and(y >= -self.optimized_length/2,
y <= self.optimized_length/2) )
y_fit = y[cursor]
ideal_profile_fit = ideal_profile[cursor]
epsilon_minus = 1 - 1e-8
epsilon_plus = 1 + 1e-8
Eh_3 = self.E * self.h ** 3
initial_guess = None
constraints = None
bender_function = None
if shape == TRAPEZIUM:
def general_bender_function(Y, M1, e, ratio):
M2 = M1 * ratio
A = (M1 + M2) / 2
B = (M1 - M2) / L
C = Eh_3 * (2 * b0 + e * b0) / 24
D = Eh_3 * e * b0 / (12 * L)
H = (A * D + B * C) / D ** 2
CDLP = C + D * L / 2
CDLM = C - D * L / 2
F = (H / L) * ((CDLM * numpy.log(CDLM) - CDLP * numpy.log(CDLP)) / D + L)
G = (-H * ((CDLM * numpy.log(CDLM) + CDLP * numpy.log(CDLP))) + (B * L ** 2) / 4) / (2 * D)
CDY = C + D * Y
return H * ((CDY / D) * numpy.log(CDY) - Y) - (B * Y ** 2) / (2 * D) + F * Y + G
def bender_function_2m(Y, M1, e, ratio): return general_bender_function(Y, M1, e, ratio)
def bender_function_1m(Y, M1, e): return general_bender_function(Y, M1, e, 1.0)
if kind_of_bender == SINGLE_MOMENTUM:
bender_function = bender_function_1m
initial_guess = [self.M1, self.e]
constraints = [[self.M1_min if self.M1_fixed == False else (self.M1 * epsilon_minus),
self.e_min if self.e_fixed == False else (self.e * epsilon_minus)],
[self.M1_max if self.M1_fixed == False else (self.M1 * epsilon_plus),
self.e_max if self.e_fixed == False else (self.e * epsilon_plus)]]
elif kind_of_bender == DOUBLE_MOMENTUM:
bender_function = bender_function_2m
initial_guess = [self.M1, self.e, self.ratio]
constraints = [[self.M1_min if self.M1_fixed == False else (self.M1*epsilon_minus),
self.e_min if self.e_fixed == False else (self.e*epsilon_minus),
self.ratio_min if self.ratio_fixed == False else (self.ratio*epsilon_minus)],
[self.M1_max if self.M1_fixed == False else (self.M1*epsilon_plus),
self.e_max if self.e_fixed == False else (self.e*epsilon_plus),
self.ratio_max if self.ratio_fixed == False else (self.ratio*epsilon_plus)]]
elif shape == RECTANGLE:
def general_bender_function(Y, M1, ratio):
M2 = M1 * ratio
A = (M1 + M2) / 2
B = (M1 - M2) / L
C = Eh_3 * b0 / 12
F = (B * L**2) / (24 * C)
G = -(A * L**2) / (8 * C)
return -(B * Y**3) / (6 * C) + (A * Y**2) / (2 * C) + F * Y + G
def bender_function_2m(Y, M1, ratio): return general_bender_function(Y, M1, ratio)
def bender_function_1m(Y, M1): return general_bender_function(Y, M1, 1.0)
if kind_of_bender == SINGLE_MOMENTUM:
bender_function = bender_function_1m
initial_guess = [self.M1]
constraints = [[self.M1_min if self.M1_fixed == False else (self.M1 * epsilon_minus)],
[self.M1_max if self.M1_fixed == False else (self.M1 * epsilon_plus)]]
elif kind_of_bender == DOUBLE_MOMENTUM:
bender_function = bender_function_2m
initial_guess = [self.M1, self.ratio]
constraints = [[self.M1_min if self.M1_fixed == False else (self.M1*epsilon_minus),
self.ratio_min if self.ratio_fixed == False else (self.ratio*epsilon_minus)],
[self.M1_max if self.M1_fixed == False else (self.M1*epsilon_plus),
self.ratio_max if self.ratio_fixed == False else (self.ratio*epsilon_plus)]]
parameters, _ = curve_fit(f=bender_function,
xdata=y_fit,
ydata=ideal_profile_fit,
p0=initial_guess,
bounds=constraints,
method='trf')
if len(parameters) == 1: bender_profile = bender_function(y, parameters[0])
elif len(parameters) == 2: bender_profile = bender_function(y, parameters[0], parameters[1])
else: bender_profile = bender_function(y, parameters[0], parameters[1], parameters[2])
# rotate back to Shadow system
bender_profile = bender_profile[::-1]
ideal_profile = ideal_profile[::-1]
# from here it's Shadow Axis system
correction_profile = ideal_profile - bender_profile
if self.which_length == 1: correction_profile_fit = correction_profile[cursor]
# r-squared = 1 - residual sum of squares / total sum of squares
r_squared = 1 - (numpy.sum(correction_profile**2) / numpy.sum((ideal_profile - numpy.mean(ideal_profile))**2))
rms = round(correction_profile.std()*1e9*self.workspace_units_to_m, 6)
if self.which_length == 1: rms_opt = round(correction_profile_fit.std()*1e9*self.workspace_units_to_m, 6)
self.plot1D(y, bender_profile, y_values_2=ideal_profile, index=0, title = "Bender vs. Ideal Profiles" + "\n" + r'$R^2$ = ' + str(r_squared), um=1)
self.plot1D(y, correction_profile, index=1, title="Correction Profile 1D, r.m.s. = " + str(rms) + " nm" +
("" if self.which_length == 0 else (", " + str(rms_opt) + " nm (optimized)")))
z_bender_correction = numpy.zeros(z.shape)
for i in range(z_bender_correction.shape[0]): z_bender_correction[i, :] = numpy.copy(correction_profile)
return parameters, z_bender_correction
def plot1D(self, x_coords, y_values, y_values_2=None, index=0, title="", um=0):
if self.show_bender_plots == 1:
figure = self.figure_canvas[index].figure
axis = figure.gca()
axis.clear()
axis.set_xlabel("Y [" + self.workspace_units_label + "]")
axis.set_ylabel("Z [" + ("nm" if um==0 else "\u03bcm") + "]")
axis.set_title(title)
axis.plot(x_coords, (y_values * self.workspace_units_to_m * (1e9 if um==0 else 1e6)), color="blue", label="bender", linewidth=2)
if not y_values_2 is None: axis.plot(x_coords, (y_values_2 * self.workspace_units_to_m * (1e9 if um==0 else 1e6)), "-.r", label="ideal")
axis.legend(loc=0, fontsize='small')
figure.canvas.draw()
def plot3D(self, x_coords, y_coords, z_values, index, title=""):
if self.show_bender_plots == 1:
figure = self.figure_canvas[index].figure
x_to_plot, y_to_plot = numpy.meshgrid(x_coords, y_coords)
z_to_plot = z_values.T
axis = figure.gca()
axis.clear()
axis.set_xlabel("X [" + self.workspace_units_label + "]")
axis.set_ylabel("Y [" + self.workspace_units_label + "]")
axis.set_zlabel("Z [nm]")
axis.set_title(title)
axis.plot_surface(x_to_plot, y_to_plot, (z_to_plot * self.workspace_units_to_m * 1e9),
rstride=1, cstride=1, cmap=cm.autumn, linewidth=0.5, antialiased=True)
figure.canvas.draw()
axis.mouse_init()
if __name__ == "__main__":
a = QApplication(sys.argv)
ow = BendableEllipsoidMirror()
ow.show()
a.exec_()
ow.saveSettings()
| [
1,
1053,
2897,
29892,
10876,
29892,
12655,
13,
3166,
4560,
2272,
29889,
1639,
3733,
403,
1053,
22914,
29933,
27432,
403,
29903,
572,
457,
29892,
1006,
29886,
29906,
29881,
13,
3166,
4560,
2272,
29889,
20640,
675,
1053,
11672,
29918,
9202,
13,
13,
3166,
22889,
1053,
7477,
13,
3166,
22889,
29889,
1627,
1975,
29889,
27852,
29918,
17915,
29945,
16170,
1053,
11479,
21960,
29984,
6040,
1505,
13,
3166,
22889,
29889,
4532,
1053,
11479,
13,
2202,
29901,
13,
1678,
515,
286,
572,
29918,
10154,
29895,
1169,
29889,
29885,
5317,
29941,
29881,
1053,
319,
9100,
29941,
29928,
29871,
396,
3520,
2628,
639,
1559,
293,
598,
474,
6492,
29871,
29941,
29928,
13,
19499,
29901,
13,
1678,
1209,
13,
13,
3166,
10772,
17303,
29945,
29889,
17303,
8801,
29879,
1053,
660,
4873,
13,
3166,
10772,
17303,
29945,
29889,
17303,
9203,
1053,
660,
9585,
13,
13,
3166,
24841,
8030,
1053,
1410,
29875,
13,
3166,
24841,
8030,
29889,
11027,
1053,
21605,
13,
3166,
288,
294,
952,
29889,
8030,
29879,
1053,
1410,
29875,
408,
288,
294,
952,
23569,
13,
3166,
288,
294,
952,
29889,
8030,
29879,
1053,
378,
7108,
663,
13,
3166,
288,
294,
952,
29889,
4422,
29889,
29877,
294,
952,
29918,
4422,
1053,
1605,
3567,
797,
13,
13,
3166,
24841,
21570,
29889,
17505,
29889,
4422,
29889,
17505,
29918,
12650,
1053,
1383,
6986,
20624,
936,
2642,
29892,
1383,
6986,
3629,
314,
29892,
1383,
6986,
6572,
18689,
1469,
13,
3166,
24841,
21570,
29889,
17505,
29889,
4422,
29889,
17505,
29918,
4422,
1053,
1383,
6986,
6572,
18689,
13,
3166,
24841,
21570,
29889,
17505,
29889,
8030,
29879,
29889,
23569,
1053,
8152,
29918,
5481,
567,
3398,
29918,
5029,
29892,
8152,
29918,
3670,
936,
29918,
5029,
13,
13,
3166,
1383,
6986,
1053,
1383,
6986,
24183,
408,
6850,
13,
13,
5659,
3301,
29923,
29999,
29902,
5005,
353,
29871,
29900,
13,
26282,
19453,
1307,
353,
29871,
29896,
13,
13,
29903,
4214,
1307,
29918,
29924,
6488,
3919,
5005,
353,
29871,
29900,
13,
3970,
7466,
1307,
29918,
29924,
6488,
3919,
5005,
353,
29871,
29896,
13,
13,
1990,
350,
355,
519,
6489,
492,
567,
3398,
29924,
381,
729,
29898,
340,
29918,
5481,
567,
3398,
29918,
5029,
29889,
6489,
492,
567,
3398,
2642,
1125,
13,
1678,
1024,
353,
376,
29933,
355,
519,
26656,
567,
3398,
11612,
729,
29908,
13,
1678,
6139,
353,
376,
2713,
6986,
438,
29923,
29901,
350,
355,
519,
26656,
567,
3398,
11612,
729,
29908,
13,
1678,
9849,
353,
376,
27078,
29914,
29890,
355,
519,
29918,
5481,
567,
3398,
29918,
11038,
729,
29889,
2732,
29908,
13,
1678,
7344,
261,
353,
9872,
5813,
11903,
13,
1678,
7344,
261,
29918,
5269,
353,
9872,
26862,
6227,
11903,
13,
1678,
20136,
353,
29871,
29953,
13,
1678,
7663,
353,
376,
20624,
936,
10619,
29879,
29908,
13,
1678,
29361,
353,
6796,
1272,
613,
376,
1445,
613,
376,
1359,
613,
376,
949,
3108,
13,
13,
1678,
3638,
29918,
6661,
2158,
29918,
915,
314,
353,
660,
9585,
2141,
1767,
703,
4905,
29914,
6717,
29899,
6661,
2158,
613,
29871,
29900,
29892,
938,
29897,
1275,
29871,
29896,
13,
13,
1678,
565,
3638,
29918,
6661,
2158,
29918,
915,
314,
29901,
13,
4706,
14391,
353,
518,
6377,
978,
4710,
3629,
314,
613,
13,
462,
1678,
376,
1853,
1115,
2713,
6986,
3629,
314,
29892,
13,
462,
1678,
376,
1514,
4710,
2713,
6986,
1522,
314,
613,
13,
462,
1678,
376,
333,
4710,
915,
314,
10758,
13,
462,
259,
8853,
978,
4710,
13440,
2158,
613,
13,
462,
1678,
376,
1853,
1115,
1761,
29892,
13,
462,
1678,
376,
1514,
4710,
13440,
2158,
613,
13,
462,
1678,
376,
333,
4710,
915,
314,
10758,
13,
462,
259,
8853,
978,
4710,
20211,
613,
13,
462,
1678,
376,
1853,
1115,
1605,
3567,
797,
29892,
13,
462,
1678,
376,
1514,
4710,
29737,
1627,
7182,
304,
1369,
263,
716,
22913,
17402,
613,
13,
462,
1678,
376,
333,
4710,
20211,
10758,
13,
462,
259,
8853,
978,
1115,
376,
6572,
18689,
29918,
1469,
613,
13,
462,
1678,
376,
1853,
1115,
1383,
6986,
6572,
18689,
1469,
29892,
13,
462,
1678,
376,
1514,
1115,
376,
6572,
18689,
3630,
613,
13,
462,
1678,
376,
333,
1115,
376,
6572,
18689,
29918,
1469,
9092,
13,
462,
259,
4514,
13,
1678,
1683,
29901,
13,
4706,
14391,
353,
518,
6377,
978,
4710,
3629,
314,
613,
13,
462,
1678,
376,
1853,
1115,
2713,
6986,
3629,
314,
29892,
13,
462,
1678,
376,
1514,
4710,
2713,
6986,
1522,
314,
613,
13,
462,
1678,
376,
333,
4710,
915,
314,
10758,
13,
462,
259,
8853,
978,
4710,
20211,
613,
13,
462,
1678,
376,
1853,
1115,
1605,
3567,
797,
29892,
13,
462,
1678,
376,
1514,
4710,
29737,
1627,
7182,
304,
1369,
263,
716,
22913,
17402,
613,
13,
462,
1678,
376,
333,
4710,
20211,
10758,
13,
462,
259,
8853,
978,
1115,
376,
6572,
18689,
29918,
1469,
613,
13,
462,
1678,
376,
1853,
1115,
1383,
6986,
6572,
18689,
1469,
29892,
13,
462,
1678,
376,
1514,
1115,
376,
6572,
18689,
3630,
613,
13,
462,
1678,
376,
333,
1115,
376,
6572,
18689,
29918,
1469,
9092,
13,
462,
259,
4514,
13,
13,
1678,
1510,
29918,
29890,
1581,
29918,
26762,
353,
21605,
29898,
29900,
29897,
13,
13,
1678,
289,
1581,
29918,
2109,
29918,
29916,
353,
21605,
29898,
29896,
29900,
29900,
29897,
13,
1678,
289,
1581,
29918,
2109,
29918,
29891,
353,
21605,
29898,
29945,
29900,
29900,
29897,
13,
13,
1678,
382,
353,
21605,
29898,
29896,
29941,
29896,
29900,
29900,
29900,
29897,
13,
1678,
298,
353,
21605,
29898,
29896,
29900,
29897,
13,
13,
1678,
2924,
29918,
974,
29918,
29890,
1581,
353,
21605,
29898,
29896,
29897,
13,
1678,
8267,
353,
21605,
29898,
29900,
29897,
13,
13,
1678,
1962,
29918,
1445,
29918,
978,
353,
21605,
703,
11038,
729,
29918,
29890,
1581,
29889,
4130,
1159,
13,
13,
1678,
607,
29918,
2848,
353,
21605,
29898,
29900,
29897,
13,
1678,
27545,
29918,
2848,
353,
21605,
29898,
29900,
29889,
29900,
29897,
13,
13,
1678,
341,
29896,
1678,
353,
21605,
29898,
29900,
29889,
29900,
29897,
13,
1678,
11959,
353,
21605,
29898,
29900,
29889,
29945,
29897,
13,
1678,
321,
268,
353,
21605,
29898,
29900,
29889,
29941,
29897,
13,
13,
1678,
341,
29896,
29918,
449,
1678,
353,
29871,
29900,
29889,
29900,
13,
1678,
11959,
29918,
449,
353,
29871,
29900,
29889,
29900,
13,
1678,
321,
29918,
449,
268,
353,
29871,
29900,
29889,
29900,
13,
13,
1678,
341,
29896,
29918,
20227,
1678,
353,
21605,
29898,
8824,
29897,
13,
1678,
11959,
29918,
20227,
353,
21605,
29898,
8824,
29897,
13,
1678,
321,
29918,
20227,
268,
353,
21605,
29898,
8824,
29897,
13,
13,
1678,
341,
29896,
29918,
1195,
1678,
353,
21605,
29898,
29900,
29889,
29900,
29897,
13,
1678,
11959,
29918,
1195,
353,
21605,
29898,
29900,
29889,
29900,
29897,
13,
1678,
321,
29918,
1195,
268,
353,
21605,
29898,
29900,
29889,
29900,
29897,
13,
13,
1678,
341,
29896,
29918,
3317,
1678,
353,
21605,
29898,
29896,
29900,
29900,
29900,
29889,
29900,
29897,
13,
1678,
11959,
29918,
3317,
353,
21605,
29898,
29896,
29900,
29889,
29900,
29897,
13,
1678,
321,
29918,
3317,
268,
353,
21605,
29898,
29896,
29889,
29900,
29897,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
3983,
936,
29918,
5856,
29922,
340,
29918,
3670,
936,
29918,
5029,
29889,
9527,
936,
5856,
29898,
275,
29918,
11038,
729,
29922,
5574,
29897,
13,
13,
4706,
2428,
2141,
1649,
2344,
12035,
4262,
936,
29918,
5856,
29897,
13,
13,
4706,
18859,
353,
1410,
29875,
29889,
3891,
8801,
29898,
29877,
294,
952,
23569,
29889,
3258,
8863,
5074,
29898,
1311,
29889,
21175,
29918,
16121,
29918,
26740,
29892,
376,
29933,
1581,
5783,
13,
13,
4706,
4434,
29918,
29890,
1581,
353,
288,
294,
952,
23569,
29889,
3258,
8863,
5074,
29898,
21175,
29892,
376,
29933,
1581,
21605,
1159,
13,
13,
4706,
7101,
29918,
1884,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
3891,
29918,
29890,
1581,
29892,
376,
18498,
2161,
21605,
613,
788,
14936,
29922,
8824,
29892,
19843,
543,
18575,
1159,
13,
13,
4706,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
7610,
2161,
29918,
1884,
29892,
1583,
29892,
376,
29890,
1581,
29918,
2109,
29918,
29916,
613,
376,
29890,
1144,
317,
351,
986,
284,
613,
3858,
6110,
29922,
29906,
29953,
29900,
29892,
995,
1542,
29922,
524,
29892,
19843,
543,
22672,
1159,
13,
4706,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
7610,
2161,
29918,
1884,
29892,
1583,
29892,
376,
29890,
1581,
29918,
2109,
29918,
29891,
613,
376,
29890,
1144,
4103,
874,
284,
613,
3858,
6110,
29922,
29906,
29953,
29900,
29892,
995,
1542,
29922,
524,
29892,
19843,
543,
22672,
1159,
13,
13,
4706,
5518,
29918,
1884,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
3891,
29918,
29890,
1581,
29892,
376,
29933,
1581,
21605,
613,
788,
14936,
29922,
8824,
29892,
19843,
543,
18575,
1159,
13,
13,
4706,
1583,
29889,
280,
29918,
29923,
353,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
15388,
29918,
1884,
29892,
1583,
29892,
376,
29923,
613,
376,
3492,
865,
29915,
29879,
3382,
14999,
9162,
3858,
6110,
29922,
29906,
29953,
29900,
29892,
995,
1542,
29922,
7411,
29892,
19843,
543,
22672,
1159,
13,
4706,
1583,
29889,
280,
29918,
29882,
353,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
15388,
29918,
1884,
29892,
1583,
29892,
376,
29882,
613,
376,
1349,
860,
2264,
9162,
3858,
6110,
29922,
29906,
29953,
29900,
29892,
995,
1542,
29922,
7411,
29892,
19843,
543,
22672,
1159,
13,
13,
4706,
1410,
29875,
29889,
510,
17801,
29898,
15388,
29918,
1884,
29892,
1583,
29892,
376,
14380,
29918,
974,
29918,
29890,
1581,
613,
3858,
543,
11885,
4587,
350,
1581,
9162,
4452,
29922,
3366,
15771,
341,
2932,
398,
613,
376,
11843,
341,
2932,
398,
12436,
13,
462,
268,
3858,
6110,
29922,
29896,
29945,
29900,
29892,
19843,
543,
22672,
613,
6939,
29922,
1311,
29889,
842,
29918,
14380,
29918,
974,
29918,
29890,
1581,
29897,
13,
13,
4706,
1410,
29875,
29889,
510,
17801,
29898,
15388,
29918,
1884,
29892,
1583,
29892,
376,
12181,
613,
3858,
543,
24111,
9162,
4452,
29922,
3366,
5323,
14001,
1974,
613,
376,
7364,
2521,
12436,
13,
462,
268,
3858,
6110,
29922,
29896,
29945,
29900,
29892,
19843,
543,
22672,
613,
6939,
29922,
1311,
29889,
842,
29918,
12181,
29897,
13,
13,
4706,
4434,
29918,
9202,
353,
288,
294,
952,
23569,
29889,
3258,
8863,
5074,
29898,
21175,
29892,
376,
29943,
277,
21605,
1159,
13,
13,
4706,
6216,
29918,
1884,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
3891,
29918,
9202,
29892,
12633,
788,
14936,
29922,
8824,
29892,
19843,
543,
18575,
1159,
13,
13,
4706,
934,
29918,
1884,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
9202,
29918,
1884,
29892,
12633,
788,
14936,
29922,
8824,
29892,
19843,
543,
22672,
613,
3171,
29922,
29906,
29945,
29897,
13,
4706,
1583,
29889,
280,
29918,
4905,
29918,
1445,
29918,
978,
353,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1445,
29918,
1884,
29892,
1583,
29892,
376,
4905,
29918,
1445,
29918,
978,
613,
376,
3744,
3497,
4408,
613,
3858,
6110,
29922,
29896,
29900,
29900,
29892,
995,
1542,
29922,
710,
29892,
19843,
543,
22672,
1159,
13,
4706,
1410,
29875,
29889,
3092,
29898,
1445,
29918,
1884,
29892,
1583,
29892,
29804,
613,
6939,
29922,
1311,
29889,
2622,
29918,
4905,
29918,
1445,
29892,
2920,
29922,
29906,
29900,
29897,
13,
13,
4706,
3309,
29918,
1884,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
9202,
29918,
1884,
29892,
12633,
788,
14936,
29922,
8824,
29892,
19843,
543,
22672,
1159,
13,
13,
4706,
1583,
29889,
10702,
29918,
20640,
1891,
29918,
2848,
353,
1410,
29875,
29889,
510,
17801,
29898,
2848,
29918,
1884,
29892,
1583,
29892,
376,
4716,
29918,
2848,
613,
3858,
543,
20624,
326,
1891,
365,
1477,
9162,
4452,
29922,
3366,
11536,
613,
376,
7439,
616,
12436,
13,
462,
462,
18884,
3858,
6110,
29922,
29896,
29945,
29900,
29892,
19843,
543,
22672,
613,
6939,
29922,
1311,
29889,
842,
29918,
4716,
29918,
2848,
29897,
13,
4706,
1583,
29889,
280,
29918,
20640,
1891,
29918,
2848,
353,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
2848,
29918,
1884,
29892,
1583,
29892,
376,
20640,
1891,
29918,
2848,
613,
376,
9162,
3858,
6110,
29922,
29896,
29900,
29892,
995,
1542,
29922,
7411,
29892,
19843,
543,
22672,
1159,
13,
4706,
1583,
29889,
842,
29918,
4716,
29918,
2848,
580,
13,
13,
4706,
1410,
29875,
29889,
344,
17954,
29898,
9202,
29918,
1884,
29897,
13,
13,
4706,
822,
788,
29918,
15501,
29918,
1884,
29898,
7611,
29918,
1884,
29892,
2286,
29892,
3858,
1125,
13,
9651,
3800,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
7611,
29918,
1884,
29892,
12633,
788,
14936,
29922,
8824,
29892,
19843,
543,
22672,
1159,
13,
9651,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29892,
1583,
29892,
2286,
29892,
3858,
29892,
3858,
6110,
29922,
29945,
29900,
29892,
995,
1542,
29922,
7411,
29892,
19843,
543,
22672,
1159,
13,
9651,
1410,
29875,
29889,
1643,
29898,
1884,
29892,
1583,
29892,
376,
9162,
3858,
6110,
29922,
29945,
29947,
29897,
13,
13,
9651,
3800,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
7611,
29918,
1884,
29892,
12633,
788,
14936,
29922,
8824,
29892,
19843,
543,
22672,
1159,
13,
13,
9651,
731,
5552,
29898,
1311,
29892,
376,
280,
27508,
718,
2286,
718,
11119,
1195,
613,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29892,
1583,
29892,
2286,
718,
11119,
1195,
613,
376,
8140,
613,
13,
462,
462,
462,
462,
539,
3858,
6110,
29922,
29945,
29900,
29892,
995,
1542,
29922,
7411,
29892,
19843,
543,
22672,
5783,
13,
9651,
731,
5552,
29898,
1311,
29892,
376,
280,
27508,
718,
2286,
718,
11119,
3317,
613,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29892,
1583,
29892,
2286,
718,
11119,
3317,
613,
376,
7976,
613,
13,
462,
462,
462,
462,
4706,
3858,
6110,
29922,
29941,
29945,
29892,
995,
1542,
29922,
7411,
29892,
19843,
543,
22672,
5783,
13,
13,
9651,
1410,
29875,
29889,
3198,
3313,
29898,
1884,
29892,
1583,
29892,
2286,
718,
11119,
20227,
613,
376,
26262,
613,
6939,
29922,
657,
5552,
29898,
1311,
29892,
376,
842,
27508,
718,
2286,
876,
13,
13,
9651,
3800,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
7611,
29918,
1884,
29892,
12633,
788,
14936,
29922,
8824,
29892,
19843,
543,
22672,
1159,
13,
13,
9651,
454,
353,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29892,
1583,
29892,
2286,
718,
11119,
449,
613,
376,
29943,
4430,
613,
3858,
6110,
29922,
29945,
29900,
29892,
995,
1542,
29922,
7411,
29892,
19843,
543,
22672,
1159,
13,
9651,
454,
29889,
842,
10861,
29898,
8824,
29897,
13,
9651,
454,
29889,
842,
5568,
10654,
703,
2780,
29901,
7254,
29936,
3239,
29899,
2780,
29901,
15552,
29890,
29898,
29906,
29945,
29946,
29892,
29871,
29906,
29946,
29946,
29892,
29871,
29906,
29900,
29945,
416,
4079,
29901,
8934,
1159,
13,
13,
9651,
822,
731,
29918,
11918,
29918,
9202,
7295,
731,
5552,
29898,
1311,
29892,
2286,
29892,
679,
5552,
29898,
1311,
29892,
2286,
718,
11119,
449,
5783,
13,
9651,
1410,
29875,
29889,
3092,
29898,
1884,
29892,
1583,
29892,
9872,
29899,
4803,
613,
2920,
29922,
29945,
29947,
29892,
6939,
29922,
842,
29918,
11918,
29918,
9202,
29897,
13,
13,
9651,
679,
5552,
29898,
1311,
29892,
376,
842,
27508,
718,
2286,
29897,
580,
13,
13,
4706,
286,
29896,
29918,
1884,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
9202,
29918,
1884,
29892,
12633,
788,
14936,
29922,
8824,
29892,
19843,
543,
18575,
1159,
13,
4706,
1410,
29875,
29889,
344,
17954,
29898,
9202,
29918,
1884,
29892,
29871,
29896,
29900,
29897,
13,
4706,
1583,
29889,
3605,
601,
29918,
1884,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
9202,
29918,
1884,
29892,
12633,
788,
14936,
29922,
8824,
29892,
19843,
543,
18575,
1159,
13,
4706,
1410,
29875,
29889,
344,
17954,
29898,
9202,
29918,
1884,
29892,
29871,
29896,
29900,
29897,
13,
4706,
1583,
29889,
29872,
29918,
1884,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
9202,
29918,
1884,
29892,
12633,
788,
14936,
29922,
8824,
29892,
19843,
543,
18575,
1159,
13,
4706,
1410,
29875,
29889,
344,
17954,
29898,
9202,
29918,
1884,
29892,
29871,
29896,
29900,
29897,
13,
13,
4706,
788,
29918,
15501,
29918,
1884,
29898,
29885,
29896,
29918,
1884,
29892,
376,
29924,
29896,
613,
376,
29924,
29896,
1159,
13,
4706,
788,
29918,
15501,
29918,
1884,
29898,
1311,
29889,
3605,
601,
29918,
1884,
29892,
376,
3605,
601,
613,
376,
29924,
29896,
29914,
29924,
29906,
1159,
13,
4706,
788,
29918,
15501,
29918,
1884,
29898,
1311,
29889,
29872,
29918,
1884,
29892,
376,
29872,
613,
376,
29872,
1159,
13,
13,
4706,
1583,
29889,
842,
29918,
14380,
29918,
974,
29918,
29890,
1581,
580,
13,
4706,
1583,
29889,
842,
29918,
12181,
580,
13,
13,
4706,
835,
13383,
13383,
13383,
4136,
13,
308,
13,
4706,
6492,
29918,
3891,
353,
288,
294,
952,
23569,
29889,
3258,
8863,
5074,
29898,
1311,
29889,
3396,
29918,
21175,
29892,
376,
29933,
1581,
1858,
1862,
1159,
13,
13,
4706,
1776,
29918,
1884,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
5317,
29918,
3891,
29892,
376,
20867,
1259,
22135,
613,
788,
14936,
29922,
8824,
29892,
19843,
543,
18575,
613,
2920,
29922,
29941,
29945,
29900,
29897,
13,
13,
4706,
1583,
29889,
1493,
29918,
1853,
29918,
510,
833,
353,
1410,
29875,
29889,
510,
17801,
29898,
1493,
29918,
1884,
29892,
1583,
29892,
376,
4294,
29918,
29890,
1581,
29918,
26762,
613,
3858,
543,
8964,
1858,
1862,
613,
3858,
6110,
29922,
29906,
29906,
29900,
29892,
13,
462,
462,
9651,
4452,
29922,
3366,
3782,
613,
376,
8241,
12436,
3638,
8592,
1917,
29922,
8824,
29892,
19843,
543,
22672,
1159,
13,
13,
4706,
289,
1581,
29918,
21175,
353,
288,
294,
952,
23569,
29889,
3891,
8801,
29898,
5317,
29918,
3891,
29897,
13,
13,
4706,
18859,
353,
518,
29877,
294,
952,
23569,
29889,
3258,
8863,
5074,
29898,
29890,
1581,
29918,
21175,
29892,
376,
29933,
1581,
7186,
29889,
13001,
284,
313,
29896,
29928,
29897,
4968,
13,
18884,
288,
294,
952,
23569,
29889,
3258,
8863,
5074,
29898,
29890,
1581,
29918,
21175,
29892,
376,
29902,
311,
284,
448,
350,
1581,
313,
29896,
29928,
29897,
4968,
13,
18884,
288,
294,
952,
23569,
29889,
3258,
8863,
5074,
29898,
29890,
1581,
29918,
21175,
29892,
376,
29902,
311,
284,
448,
350,
1581,
313,
29941,
29928,
29897,
4968,
13,
18884,
288,
294,
952,
23569,
29889,
3258,
8863,
5074,
29898,
29890,
1581,
29918,
21175,
29892,
376,
13080,
545,
4829,
313,
29941,
29928,
29897,
4968,
13,
18884,
288,
294,
952,
23569,
29889,
3258,
8863,
5074,
29898,
29890,
1581,
29918,
21175,
29892,
376,
29902,
311,
284,
448,
350,
1581,
718,
11479,
4829,
313,
29941,
29928,
29897,
13531,
13,
13,
4706,
822,
1653,
29918,
4532,
29918,
15257,
29898,
8513,
543,
29941,
29928,
29908,
1125,
13,
9651,
4377,
353,
11479,
29898,
1003,
2311,
7607,
29896,
29900,
29900,
29892,
29871,
29896,
29900,
29900,
876,
13,
9651,
4377,
29889,
5041,
29889,
842,
29918,
2161,
2780,
877,
10921,
1495,
13,
9651,
565,
4464,
1275,
376,
29941,
29928,
1115,
4377,
29889,
1202,
29918,
1491,
5317,
29898,
29896,
29896,
29896,
29892,
18246,
2433,
29941,
29881,
1495,
13,
9651,
1683,
29901,
4377,
29889,
1202,
29918,
1491,
5317,
29898,
29896,
29896,
29896,
29897,
13,
13,
9651,
4377,
29918,
15257,
353,
11479,
21960,
29984,
6040,
1505,
29898,
4532,
29897,
13,
9651,
4377,
29918,
15257,
29889,
842,
26262,
6110,
29898,
1311,
29889,
2382,
29918,
22574,
29897,
13,
9651,
4377,
29918,
15257,
29889,
842,
26262,
7011,
29898,
1311,
29889,
2382,
29918,
9606,
22530,
29899,
29896,
29900,
29897,
13,
13,
9651,
736,
4377,
29918,
15257,
13,
13,
4706,
1583,
29889,
4532,
29918,
15257,
353,
518,
3258,
29918,
4532,
29918,
15257,
703,
29896,
29928,
4968,
1653,
29918,
4532,
29918,
15257,
703,
29896,
29928,
4968,
13,
462,
795,
1653,
29918,
4532,
29918,
15257,
3285,
1653,
29918,
4532,
29918,
15257,
3285,
1653,
29918,
4532,
29918,
15257,
580,
29962,
13,
13,
4706,
363,
4434,
29892,
4377,
29918,
15257,
297,
14319,
29898,
21175,
29892,
1583,
29889,
4532,
29918,
15257,
1125,
4434,
29889,
2680,
2141,
1202,
8801,
29898,
4532,
29918,
15257,
29897,
13,
13,
4706,
1410,
29875,
29889,
29878,
431,
495,
29898,
1311,
29889,
6451,
13799,
29897,
13,
4706,
1410,
29875,
29889,
29878,
431,
495,
29898,
1311,
29889,
3396,
13799,
29897,
13,
13,
1678,
835,
13383,
13383,
13383,
7346,
4136,
29937,
13,
1678,
396,
13,
1678,
396,
29871,
24972,
3035,
9806,
341,
2190,
10461,
13780,
13,
1678,
396,
13,
1678,
835,
13383,
13383,
13383,
7346,
4136,
29937,
13,
13,
1678,
822,
1831,
29918,
4905,
29918,
1445,
29898,
1311,
1125,
13,
4706,
1583,
29889,
280,
29918,
4905,
29918,
1445,
29918,
978,
29889,
12038,
29898,
29877,
294,
952,
23569,
29889,
2622,
2283,
4591,
7647,
29898,
1311,
29892,
1583,
29889,
4905,
29918,
1445,
29918,
978,
29892,
376,
3549,
10604,
3497,
613,
934,
29918,
17588,
29918,
4572,
543,
1469,
12745,
3070,
29889,
4130,
5513,
876,
13,
13,
1678,
822,
731,
29918,
14380,
29918,
974,
29918,
29890,
1581,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3605,
601,
29918,
1884,
29889,
842,
12911,
29898,
1311,
29889,
14380,
29918,
974,
29918,
29890,
1581,
1360,
29896,
29897,
13,
13,
1678,
822,
731,
29918,
12181,
29898,
1311,
1125,
13,
4706,
1583,
29889,
29872,
29918,
1884,
29889,
842,
12911,
29898,
1311,
29889,
12181,
1360,
29900,
29897,
13,
13,
1678,
822,
731,
29918,
4716,
29918,
2848,
29898,
1311,
1125,
13,
4706,
1583,
29889,
280,
29918,
20640,
1891,
29918,
2848,
29889,
842,
10861,
29898,
1311,
29889,
4716,
29918,
2848,
1360,
29896,
29897,
13,
268,
13,
1678,
822,
731,
29918,
29924,
29896,
29898,
1311,
1125,
13,
4706,
1583,
29889,
280,
29918,
29924,
29896,
29918,
1195,
29889,
842,
10861,
29898,
1311,
29889,
29924,
29896,
29918,
20227,
1360,
8824,
29897,
13,
4706,
1583,
29889,
280,
29918,
29924,
29896,
29918,
3317,
29889,
842,
10861,
29898,
1311,
29889,
29924,
29896,
29918,
20227,
1360,
8824,
29897,
13,
13,
1678,
822,
731,
29918,
3605,
601,
29898,
1311,
1125,
13,
4706,
1583,
29889,
280,
29918,
3605,
601,
29918,
1195,
29889,
842,
10861,
29898,
1311,
29889,
3605,
601,
29918,
20227,
1360,
8824,
29897,
13,
4706,
1583,
29889,
280,
29918,
3605,
601,
29918,
3317,
29889,
842,
10861,
29898,
1311,
29889,
3605,
601,
29918,
20227,
1360,
8824,
29897,
13,
308,
13,
1678,
822,
731,
29918,
29872,
29898,
1311,
1125,
13,
4706,
1583,
29889,
280,
29918,
29872,
29918,
1195,
29889,
842,
10861,
29898,
1311,
29889,
29872,
29918,
20227,
1360,
8824,
29897,
13,
4706,
1583,
29889,
280,
29918,
29872,
29918,
3317,
29889,
842,
10861,
29898,
1311,
29889,
29872,
29918,
20227,
1360,
8824,
29897,
13,
13,
1678,
822,
1156,
29918,
3167,
29918,
1287,
3493,
29918,
348,
1169,
29898,
1311,
1125,
13,
4706,
2428,
2141,
7045,
29918,
3167,
29918,
1287,
3493,
29918,
348,
1169,
580,
13,
13,
4706,
3858,
353,
1583,
29889,
280,
29918,
29923,
29889,
3560,
2141,
2680,
2141,
667,
4178,
29898,
29900,
467,
8030,
580,
13,
4706,
3858,
29889,
12038,
29898,
1643,
29889,
726,
580,
718,
376,
518,
29940,
12975,
718,
1583,
29889,
1287,
3493,
29918,
348,
1169,
29918,
1643,
718,
13898,
29906,
29962,
1159,
13,
4706,
3858,
353,
1583,
29889,
280,
29918,
29882,
29889,
3560,
2141,
2680,
2141,
667,
4178,
29898,
29900,
467,
8030,
580,
13,
4706,
3858,
29889,
12038,
29898,
1643,
29889,
726,
580,
718,
376,
6796,
718,
1583,
29889,
1287,
3493,
29918,
348,
1169,
29918,
1643,
718,
376,
29962,
1159,
13,
4706,
3858,
353,
1583,
29889,
10702,
29918,
20640,
1891,
29918,
2848,
29889,
3560,
2141,
2680,
2141,
667,
4178,
29898,
29900,
467,
8030,
580,
13,
4706,
3858,
29889,
12038,
29898,
1643,
29889,
726,
580,
718,
376,
6796,
718,
1583,
29889,
1287,
3493,
29918,
348,
1169,
29918,
1643,
718,
376,
29962,
1159,
13,
13,
1678,
822,
1423,
14256,
29898,
1311,
1125,
13,
4706,
2428,
2141,
3198,
14256,
580,
13,
13,
4706,
565,
1583,
29889,
275,
29918,
1270,
29880,
4995,
2804,
29871,
29896,
29901,
12020,
7865,
2392,
703,
29933,
1581,
1260,
5843,
1818,
367,
263,
20396,
4995,
1159,
13,
4706,
565,
1583,
29889,
1270,
29880,
4995,
29918,
20659,
2804,
29871,
29900,
29901,
12020,
7865,
2392,
703,
29907,
2904,
4995,
19843,
1818,
367,
29871,
29900,
1159,
13,
4706,
565,
1583,
29889,
275,
29918,
262,
18925,
1275,
29871,
29900,
29901,
12020,
7865,
2392,
703,
4013,
438,
29923,
508,
29915,
29873,
505,
10362,
13391,
1159,
13,
4706,
565,
1583,
29889,
4716,
29918,
2848,
1360,
29896,
29901,
13,
9651,
378,
7108,
663,
29889,
3198,
5015,
919,
368,
9135,
3321,
4557,
29898,
1311,
29889,
20640,
1891,
29918,
2848,
29892,
376,
20624,
326,
1891,
365,
1477,
1159,
13,
9651,
378,
7108,
663,
29889,
3198,
29931,
404,
2816,
9843,
1349,
273,
29898,
1311,
29889,
20640,
1891,
29918,
2848,
29892,
1583,
29889,
6229,
29918,
29891,
29918,
11242,
29974,
1311,
29889,
6229,
29918,
29891,
29918,
12254,
29892,
376,
20624,
326,
1891,
365,
1477,
613,
376,
11536,
365,
1477,
1159,
13,
13,
4706,
565,
1583,
29889,
1545,
2164,
29918,
7610,
2161,
1405,
29871,
29900,
29901,
13,
9651,
565,
451,
313,
1311,
29889,
1545,
2164,
29918,
7610,
2161,
1275,
29871,
29896,
322,
1583,
29889,
1516,
29918,
1853,
29918,
974,
29918,
1753,
522,
1275,
29871,
29906,
1125,
13,
18884,
12020,
7865,
2392,
703,
11730,
4721,
26482,
5759,
1059,
28723,
526,
20186,
1159,
13,
13,
4706,
378,
7108,
663,
29889,
3198,
5015,
919,
368,
9135,
3321,
4557,
29898,
1311,
29889,
29890,
1581,
29918,
2109,
29918,
29916,
29892,
376,
29933,
1144,
1060,
1159,
13,
4706,
378,
7108,
663,
29889,
3198,
5015,
919,
368,
9135,
3321,
4557,
29898,
1311,
29889,
29890,
1581,
29918,
2109,
29918,
29891,
29892,
376,
29933,
1144,
612,
1159,
13,
4706,
1583,
29889,
4905,
29918,
1445,
29918,
978,
29918,
8159,
353,
378,
7108,
663,
29889,
3198,
17020,
29898,
1311,
29889,
4905,
29918,
1445,
29918,
978,
29897,
13,
13,
1678,
822,
4866,
7094,
800,
29898,
1311,
29892,
15504,
29918,
7297,
1125,
13,
4706,
15504,
29918,
7297,
29918,
7382,
29871,
353,
15504,
29918,
7297,
29889,
20908,
5926,
580,
13,
4706,
1881,
29918,
915,
314,
29918,
7382,
353,
1583,
29889,
2080,
29918,
915,
314,
29889,
20908,
5926,
29898,
18434,
29922,
8824,
29897,
13,
13,
4706,
1583,
29889,
1171,
482,
29918,
16044,
749,
29918,
2536,
1169,
29898,
17505,
29918,
7297,
29918,
7382,
29897,
13,
13,
4706,
1383,
6986,
3629,
314,
29889,
15003,
4591,
29949,
29923,
29898,
2080,
29918,
915,
314,
29918,
7382,
29892,
13,
462,
1669,
15504,
29918,
7297,
29918,
7382,
29892,
13,
462,
1669,
2436,
29918,
2962,
29918,
1445,
29922,
29900,
29892,
13,
462,
1669,
2436,
29918,
355,
29918,
1445,
29922,
29900,
29892,
13,
462,
1669,
11109,
29918,
1990,
29918,
978,
29922,
1853,
29898,
1311,
467,
1649,
978,
1649,
29897,
13,
13,
4706,
921,
29892,
343,
29892,
503,
353,
1583,
29889,
15807,
403,
29918,
680,
284,
29918,
7610,
2161,
29898,
17505,
29918,
7297,
29918,
7382,
29897,
13,
13,
4706,
289,
1581,
29918,
15501,
29892,
503,
29918,
29890,
1581,
29918,
2616,
276,
428,
353,
1583,
29889,
15807,
403,
29918,
29890,
1581,
29918,
2616,
276,
428,
29898,
29891,
29892,
503,
29892,
1583,
29889,
14380,
29918,
974,
29918,
29890,
1581,
29892,
1583,
29889,
12181,
29897,
13,
13,
4706,
1583,
29889,
29924,
29896,
29918,
449,
353,
4513,
29898,
29890,
1581,
29918,
15501,
29961,
29900,
1402,
938,
29898,
29953,
29930,
1311,
29889,
1287,
3493,
29918,
348,
1169,
29918,
517,
29918,
4317,
876,
13,
4706,
565,
1583,
29889,
12181,
1275,
10014,
3301,
29923,
29999,
29902,
5005,
29901,
13,
9651,
1583,
29889,
29872,
29918,
449,
353,
4513,
29898,
29890,
1581,
29918,
15501,
29961,
29896,
1402,
29871,
29945,
29897,
13,
9651,
565,
1583,
29889,
14380,
29918,
974,
29918,
29890,
1581,
1275,
11662,
7466,
1307,
29918,
29924,
6488,
3919,
5005,
29901,
1583,
29889,
3605,
601,
29918,
449,
353,
4513,
29898,
29890,
1581,
29918,
15501,
29961,
29906,
1402,
29871,
29945,
29897,
13,
4706,
25342,
1583,
29889,
12181,
1275,
5195,
1783,
19453,
1307,
29901,
13,
9651,
565,
1583,
29889,
14380,
29918,
974,
29918,
29890,
1581,
1275,
11662,
7466,
1307,
29918,
29924,
6488,
3919,
5005,
29901,
1583,
29889,
3605,
601,
29918,
449,
353,
4513,
29898,
29890,
1581,
29918,
15501,
29961,
29896,
1402,
29871,
29945,
29897,
13,
13,
4706,
1583,
29889,
5317,
29941,
29928,
29898,
29916,
29892,
343,
29892,
503,
29918,
29890,
1581,
29918,
2616,
276,
428,
29892,
29871,
29906,
29892,
376,
29902,
311,
284,
448,
350,
1581,
6298,
8726,
1159,
13,
13,
4706,
565,
1583,
29889,
1545,
2164,
29918,
7610,
2161,
1405,
29871,
29900,
29901,
13,
9651,
921,
29918,
29872,
29892,
343,
29918,
29872,
29892,
503,
29918,
29872,
353,
1383,
6986,
6572,
18689,
29889,
949,
29918,
7610,
2161,
29918,
2704,
29918,
1445,
29898,
1311,
29889,
1516,
29918,
1753,
522,
29918,
1445,
29918,
978,
29897,
13,
13,
9651,
565,
7431,
29898,
29916,
29897,
1275,
7431,
29898,
29916,
29918,
29872,
29897,
322,
7431,
29898,
29891,
29897,
1275,
7431,
29898,
29891,
29918,
29872,
29897,
322,
320,
13,
462,
1678,
921,
29961,
29900,
29962,
1275,
921,
29918,
29872,
29961,
29900,
29962,
322,
921,
14352,
29896,
29962,
1275,
921,
29918,
29872,
14352,
29896,
29962,
322,
320,
13,
462,
1678,
343,
29961,
29900,
29962,
1275,
343,
29918,
29872,
29961,
29900,
29962,
322,
343,
14352,
29896,
29962,
1275,
343,
29918,
29872,
14352,
29896,
5387,
13,
18884,
503,
29918,
4532,
29918,
2704,
353,
503,
29918,
29872,
13,
9651,
1683,
29901,
13,
18884,
503,
29918,
4532,
29918,
2704,
353,
1006,
29886,
29906,
29881,
29898,
29891,
29918,
29872,
29892,
921,
29918,
29872,
29892,
503,
29918,
29872,
29892,
2924,
2433,
29883,
431,
293,
1495,
29898,
29891,
29892,
921,
29897,
13,
13,
9651,
503,
29918,
29890,
1581,
29918,
2616,
276,
428,
4619,
503,
29918,
4532,
29918,
2704,
13,
13,
9651,
1583,
29889,
5317,
29941,
29928,
29898,
29916,
29892,
343,
29892,
503,
29918,
4532,
29918,
2704,
29892,
539,
29941,
29892,
376,
13080,
545,
4829,
6298,
2161,
1159,
13,
9651,
1583,
29889,
5317,
29941,
29928,
29898,
29916,
29892,
343,
29892,
503,
29918,
29890,
1581,
29918,
2616,
276,
428,
29892,
29871,
29946,
29892,
376,
29902,
311,
284,
448,
350,
1581,
718,
11479,
4829,
6298,
8726,
1159,
13,
13,
4706,
6850,
29889,
3539,
29918,
17505,
29918,
7610,
2161,
29898,
29920,
29918,
29890,
1581,
29918,
2616,
276,
428,
29889,
29911,
29892,
12655,
29889,
14486,
29898,
29916,
29892,
29871,
29953,
511,
12655,
29889,
14486,
29898,
29891,
29892,
29871,
29953,
511,
1583,
29889,
4905,
29918,
1445,
29918,
978,
29918,
8159,
29897,
13,
13,
4706,
396,
3462,
716,
7101,
408,
4377,
1059,
13,
4706,
15504,
29918,
7297,
3032,
7297,
29889,
29943,
29918,
3960,
18009,
1307,
29871,
353,
29871,
29896,
13,
4706,
15504,
29918,
7297,
3032,
7297,
29889,
29943,
29918,
29954,
29918,
29903,
268,
353,
29871,
29906,
13,
4706,
15504,
29918,
7297,
3032,
7297,
29889,
7724,
29918,
3960,
29925,
29871,
353,
6262,
29898,
1311,
29889,
4905,
29918,
1445,
29918,
978,
29918,
8159,
29892,
525,
9420,
29899,
29947,
1495,
13,
13,
4706,
396,
4367,
29877,
9596,
29873,
945,
292,
411,
278,
716,
934,
13,
4706,
2428,
2141,
8835,
7094,
800,
29898,
17505,
29918,
7297,
29897,
13,
13,
4706,
1583,
29889,
6717,
703,
6572,
18689,
29918,
1469,
613,
1383,
6986,
6572,
18689,
1469,
29898,
2704,
29918,
10185,
29918,
1272,
29918,
1445,
29922,
1311,
29889,
4905,
29918,
1445,
29918,
978,
29892,
13,
462,
462,
462,
795,
1059,
29918,
10185,
29918,
29916,
29918,
6229,
29922,
1311,
29889,
6229,
29918,
29916,
29918,
11242,
29974,
1311,
29889,
6229,
29918,
29916,
29918,
12254,
29892,
13,
462,
462,
462,
795,
1059,
29918,
10185,
29918,
29891,
29918,
6229,
29922,
1311,
29889,
6229,
29918,
29891,
29918,
11242,
29974,
1311,
29889,
6229,
29918,
29891,
29918,
12254,
876,
13,
13,
1678,
822,
25112,
2713,
6986,
29949,
29923,
29898,
1311,
1125,
13,
4706,
736,
1383,
6986,
20624,
936,
2642,
29889,
3258,
29918,
5481,
567,
3398,
29918,
11038,
729,
580,
13,
13,
13,
1678,
822,
8147,
29918,
680,
284,
29918,
7610,
2161,
29898,
1311,
29892,
15504,
29918,
7297,
29892,
1804,
10457,
29896,
1125,
13,
4706,
921,
353,
12655,
29889,
1915,
3493,
6278,
1311,
29889,
6229,
29918,
29916,
29918,
12254,
29892,
1583,
29889,
6229,
29918,
29916,
29918,
11242,
29892,
1583,
29889,
29890,
1581,
29918,
2109,
29918,
29916,
718,
29871,
29896,
29897,
13,
4706,
343,
353,
12655,
29889,
1915,
3493,
6278,
1311,
29889,
6229,
29918,
29891,
29918,
12254,
29892,
1583,
29889,
6229,
29918,
29891,
29918,
11242,
29892,
1583,
29889,
29890,
1581,
29918,
2109,
29918,
29891,
718,
29871,
29896,
29897,
13,
13,
4706,
274,
29896,
29871,
353,
4513,
29898,
17505,
29918,
7297,
3032,
7297,
29889,
4174,
29907,
29961,
29900,
1402,
29871,
29896,
29900,
29897,
13,
4706,
274,
29906,
29871,
353,
4513,
29898,
17505,
29918,
7297,
3032,
7297,
29889,
4174,
29907,
29961,
29896,
1402,
29871,
29896,
29900,
29897,
13,
4706,
274,
29941,
29871,
353,
4513,
29898,
17505,
29918,
7297,
3032,
7297,
29889,
4174,
29907,
29961,
29906,
1402,
29871,
29896,
29900,
29897,
13,
4706,
274,
29946,
29871,
353,
4513,
29898,
17505,
29918,
7297,
3032,
7297,
29889,
4174,
29907,
29961,
29941,
1402,
29871,
29896,
29900,
29897,
13,
4706,
274,
29945,
29871,
353,
4513,
29898,
17505,
29918,
7297,
3032,
7297,
29889,
4174,
29907,
29961,
29946,
1402,
29871,
29896,
29900,
29897,
13,
4706,
274,
29953,
29871,
353,
4513,
29898,
17505,
29918,
7297,
3032,
7297,
29889,
4174,
29907,
29961,
29945,
1402,
29871,
29896,
29900,
29897,
13,
4706,
274,
29955,
29871,
353,
4513,
29898,
17505,
29918,
7297,
3032,
7297,
29889,
4174,
29907,
29961,
29953,
1402,
29871,
29896,
29900,
29897,
13,
4706,
274,
29947,
29871,
353,
4513,
29898,
17505,
29918,
7297,
3032,
7297,
29889,
4174,
29907,
29961,
29955,
1402,
29871,
29896,
29900,
29897,
13,
4706,
274,
29929,
29871,
353,
4513,
29898,
17505,
29918,
7297,
3032,
7297,
29889,
4174,
29907,
29961,
29947,
1402,
29871,
29896,
29900,
29897,
13,
4706,
274,
29896,
29900,
353,
4513,
29898,
17505,
29918,
7297,
3032,
7297,
29889,
4174,
29907,
29961,
29929,
1402,
29871,
29896,
29900,
29897,
13,
13,
4706,
15473,
29892,
343,
29891,
353,
12655,
29889,
4467,
29882,
7720,
29898,
29916,
29892,
343,
29897,
13,
13,
4706,
274,
353,
274,
29896,
16395,
4419,
1068,
29906,
29897,
718,
274,
29906,
16395,
8071,
1068,
29906,
29897,
718,
274,
29946,
29930,
4419,
29930,
8071,
718,
274,
29955,
29930,
4419,
718,
274,
29947,
29930,
8071,
718,
274,
29896,
29900,
13,
4706,
289,
353,
274,
29945,
29930,
8071,
718,
274,
29953,
29930,
4419,
718,
274,
29929,
13,
4706,
263,
353,
274,
29941,
13,
13,
4706,
503,
353,
8521,
29890,
718,
1804,
29930,
23749,
29889,
3676,
29898,
29890,
1068,
29906,
448,
29871,
29946,
29930,
29874,
29930,
29883,
876,
14571,
29906,
29930,
29874,
29897,
13,
4706,
503,
29961,
29890,
1068,
29906,
448,
29871,
29946,
29930,
29874,
29930,
29883,
529,
29871,
29900,
29962,
353,
12655,
29889,
13707,
13,
13,
4706,
736,
921,
29892,
343,
29892,
503,
29889,
29911,
13,
13,
1678,
822,
8147,
29918,
29890,
1581,
29918,
2616,
276,
428,
29898,
1311,
29892,
343,
29892,
503,
29892,
2924,
29918,
974,
29918,
29890,
1581,
29892,
8267,
1125,
13,
4706,
289,
29900,
353,
1583,
29889,
6229,
29918,
29916,
29918,
11242,
718,
1583,
29889,
6229,
29918,
29916,
29918,
12254,
13,
4706,
365,
29871,
353,
1583,
29889,
6229,
29918,
29891,
29918,
11242,
718,
1583,
29889,
6229,
29918,
29891,
29918,
12254,
29871,
396,
788,
13883,
3309,
13,
13,
4706,
396,
285,
3466,
278,
14821,
1788,
304,
367,
13747,
411,
12828,
29915,
29879,
26760,
13,
4706,
10839,
29918,
10185,
353,
503,
29961,
29900,
29892,
584,
3816,
1057,
29899,
29896,
29962,
29871,
396,
697,
1948,
338,
278,
8722,
310,
278,
20396,
4995,
29892,
3307,
363,
278,
6260,
3950,
13,
4706,
10839,
29918,
10185,
4619,
448,
680,
284,
29918,
10185,
29961,
29900,
29962,
718,
5135,
29931,
29914,
29906,
718,
343,
11877,
29898,
680,
284,
29918,
10185,
29961,
29900,
29962,
29899,
680,
284,
29918,
10185,
14352,
29896,
12622,
29914,
29931,
396,
9664,
362,
13,
13,
4706,
565,
1583,
29889,
4716,
29918,
2848,
1275,
29871,
29900,
29901,
13,
9651,
343,
29918,
9202,
632,
353,
343,
13,
9651,
10839,
29918,
10185,
29918,
9202,
353,
10839,
29918,
10185,
13,
4706,
1683,
29901,
13,
9651,
10677,
9651,
353,
12655,
29889,
3062,
29898,
23749,
29889,
1188,
936,
29918,
392,
29898,
29891,
6736,
448,
1311,
29889,
20640,
1891,
29918,
2848,
29914,
29906,
29892,
13,
462,
462,
462,
795,
343,
5277,
1583,
29889,
20640,
1891,
29918,
2848,
29914,
29906,
29897,
1723,
13,
9651,
343,
29918,
9202,
632,
353,
343,
29961,
18127,
29962,
13,
9651,
10839,
29918,
10185,
29918,
9202,
353,
10839,
29918,
10185,
29961,
18127,
29962,
13,
13,
4706,
321,
3232,
29918,
12254,
353,
29871,
29896,
448,
29871,
29896,
29872,
29899,
29947,
13,
4706,
321,
3232,
29918,
11242,
353,
29871,
29896,
718,
29871,
29896,
29872,
29899,
29947,
13,
13,
4706,
382,
29882,
29918,
29941,
353,
1583,
29889,
29923,
334,
1583,
29889,
29882,
3579,
29871,
29941,
13,
13,
4706,
2847,
29918,
2543,
404,
353,
6213,
13,
4706,
11938,
353,
6213,
13,
4706,
289,
1581,
29918,
2220,
353,
6213,
13,
13,
4706,
565,
8267,
1275,
10014,
3301,
29923,
29999,
29902,
5005,
29901,
13,
9651,
822,
2498,
29918,
29890,
1581,
29918,
2220,
29898,
29979,
29892,
341,
29896,
29892,
321,
29892,
11959,
1125,
13,
18884,
341,
29906,
353,
341,
29896,
334,
11959,
13,
18884,
319,
353,
313,
29924,
29896,
718,
341,
29906,
29897,
847,
29871,
29906,
13,
18884,
350,
353,
313,
29924,
29896,
448,
341,
29906,
29897,
847,
365,
13,
18884,
315,
353,
382,
29882,
29918,
29941,
334,
313,
29906,
334,
289,
29900,
718,
321,
334,
289,
29900,
29897,
847,
29871,
29906,
29946,
13,
18884,
360,
353,
382,
29882,
29918,
29941,
334,
321,
334,
289,
29900,
847,
313,
29896,
29906,
334,
365,
29897,
13,
18884,
379,
353,
313,
29909,
334,
360,
718,
350,
334,
315,
29897,
847,
360,
3579,
29871,
29906,
13,
18884,
7307,
13208,
353,
315,
718,
360,
334,
365,
847,
29871,
29906,
13,
18884,
7307,
26369,
353,
315,
448,
360,
334,
365,
847,
29871,
29906,
13,
18884,
383,
353,
313,
29950,
847,
365,
29897,
334,
5135,
6530,
26369,
334,
12655,
29889,
1188,
29898,
6530,
26369,
29897,
448,
7307,
13208,
334,
12655,
29889,
1188,
29898,
6530,
13208,
876,
847,
360,
718,
365,
29897,
13,
18884,
402,
353,
8521,
29950,
334,
5135,
6530,
26369,
334,
12655,
29889,
1188,
29898,
6530,
26369,
29897,
718,
7307,
13208,
334,
12655,
29889,
1188,
29898,
6530,
13208,
4961,
718,
313,
29933,
334,
365,
3579,
29871,
29906,
29897,
847,
29871,
29946,
29897,
847,
313,
29906,
334,
360,
29897,
13,
18884,
7307,
29979,
353,
315,
718,
360,
334,
612,
13,
13,
18884,
736,
379,
334,
5135,
6530,
29979,
847,
360,
29897,
334,
12655,
29889,
1188,
29898,
6530,
29979,
29897,
448,
612,
29897,
448,
313,
29933,
334,
612,
3579,
29871,
29906,
29897,
847,
313,
29906,
334,
360,
29897,
718,
383,
334,
612,
718,
402,
13,
13,
9651,
822,
289,
1581,
29918,
2220,
29918,
29906,
29885,
29898,
29979,
29892,
341,
29896,
29892,
321,
29892,
11959,
1125,
736,
2498,
29918,
29890,
1581,
29918,
2220,
29898,
29979,
29892,
341,
29896,
29892,
321,
29892,
11959,
29897,
13,
9651,
822,
289,
1581,
29918,
2220,
29918,
29896,
29885,
29898,
29979,
29892,
341,
29896,
29892,
321,
1125,
4706,
736,
2498,
29918,
29890,
1581,
29918,
2220,
29898,
29979,
29892,
341,
29896,
29892,
321,
29892,
29871,
29896,
29889,
29900,
29897,
13,
13,
9651,
565,
2924,
29918,
974,
29918,
29890,
1581,
1275,
317,
4214,
1307,
29918,
29924,
6488,
3919,
5005,
29901,
13,
18884,
289,
1581,
29918,
2220,
353,
289,
1581,
29918,
2220,
29918,
29896,
29885,
13,
18884,
2847,
29918,
2543,
404,
353,
518,
1311,
29889,
29924,
29896,
29892,
1583,
29889,
29872,
29962,
13,
18884,
11938,
353,
5519,
1311,
29889,
29924,
29896,
29918,
1195,
565,
1583,
29889,
29924,
29896,
29918,
20227,
1275,
7700,
1683,
313,
1311,
29889,
29924,
29896,
334,
321,
3232,
29918,
12254,
511,
13,
462,
18884,
1583,
29889,
29872,
29918,
1195,
29871,
565,
1583,
29889,
29872,
29918,
20227,
1275,
7700,
29871,
1683,
313,
1311,
29889,
29872,
334,
321,
3232,
29918,
12254,
29897,
1402,
13,
462,
1669,
518,
1311,
29889,
29924,
29896,
29918,
3317,
565,
1583,
29889,
29924,
29896,
29918,
20227,
1275,
7700,
1683,
313,
1311,
29889,
29924,
29896,
334,
321,
3232,
29918,
11242,
511,
13,
462,
18884,
1583,
29889,
29872,
29918,
3317,
29871,
565,
1583,
29889,
29872,
29918,
20227,
1275,
7700,
29871,
1683,
313,
1311,
29889,
29872,
334,
321,
3232,
29918,
11242,
4638,
29962,
13,
9651,
25342,
2924,
29918,
974,
29918,
29890,
1581,
1275,
11662,
7466,
1307,
29918,
29924,
6488,
3919,
5005,
29901,
13,
18884,
289,
1581,
29918,
2220,
353,
289,
1581,
29918,
2220,
29918,
29906,
29885,
13,
18884,
2847,
29918,
2543,
404,
353,
518,
1311,
29889,
29924,
29896,
29892,
1583,
29889,
29872,
29892,
1583,
29889,
3605,
601,
29962,
13,
18884,
11938,
353,
5519,
1311,
29889,
29924,
29896,
29918,
1195,
1678,
565,
1583,
29889,
29924,
29896,
29918,
20227,
1275,
7700,
1678,
1683,
313,
1311,
29889,
29924,
29896,
29930,
5463,
29918,
12254,
511,
13,
462,
18884,
1583,
29889,
29872,
29918,
1195,
268,
565,
1583,
29889,
29872,
29918,
20227,
1275,
7700,
268,
1683,
313,
1311,
29889,
29872,
29930,
5463,
29918,
12254,
511,
13,
462,
18884,
1583,
29889,
3605,
601,
29918,
1195,
565,
1583,
29889,
3605,
601,
29918,
20227,
1275,
7700,
1683,
313,
1311,
29889,
3605,
601,
29930,
5463,
29918,
12254,
29897,
1402,
13,
462,
1669,
518,
1311,
29889,
29924,
29896,
29918,
3317,
1678,
565,
1583,
29889,
29924,
29896,
29918,
20227,
1275,
7700,
1678,
1683,
313,
1311,
29889,
29924,
29896,
29930,
5463,
29918,
11242,
511,
13,
462,
18884,
1583,
29889,
29872,
29918,
3317,
268,
565,
1583,
29889,
29872,
29918,
20227,
1275,
7700,
268,
1683,
313,
1311,
29889,
29872,
29930,
5463,
29918,
11242,
511,
13,
462,
18884,
1583,
29889,
3605,
601,
29918,
3317,
565,
1583,
29889,
3605,
601,
29918,
20227,
1275,
7700,
1683,
313,
1311,
29889,
3605,
601,
29930,
5463,
29918,
11242,
4638,
29962,
13,
4706,
25342,
8267,
1275,
5195,
1783,
19453,
1307,
29901,
13,
9651,
822,
2498,
29918,
29890,
1581,
29918,
2220,
29898,
29979,
29892,
341,
29896,
29892,
11959,
1125,
13,
18884,
341,
29906,
353,
341,
29896,
334,
11959,
13,
18884,
319,
353,
313,
29924,
29896,
718,
341,
29906,
29897,
847,
29871,
29906,
13,
18884,
350,
353,
313,
29924,
29896,
448,
341,
29906,
29897,
847,
365,
13,
18884,
315,
353,
382,
29882,
29918,
29941,
334,
289,
29900,
847,
29871,
29896,
29906,
13,
18884,
383,
353,
313,
29933,
334,
365,
1068,
29906,
29897,
847,
313,
29906,
29946,
334,
315,
29897,
13,
18884,
402,
353,
19691,
29909,
334,
365,
1068,
29906,
29897,
847,
313,
29947,
334,
315,
29897,
13,
13,
18884,
736,
19691,
29933,
334,
612,
1068,
29941,
29897,
847,
313,
29953,
334,
315,
29897,
718,
313,
29909,
334,
612,
1068,
29906,
29897,
847,
313,
29906,
334,
315,
29897,
718,
383,
334,
612,
718,
402,
13,
13,
9651,
822,
289,
1581,
29918,
2220,
29918,
29906,
29885,
29898,
29979,
29892,
341,
29896,
29892,
11959,
1125,
736,
2498,
29918,
29890,
1581,
29918,
2220,
29898,
29979,
29892,
341,
29896,
29892,
11959,
29897,
13,
9651,
822,
289,
1581,
29918,
2220,
29918,
29896,
29885,
29898,
29979,
29892,
341,
29896,
1125,
4706,
736,
2498,
29918,
29890,
1581,
29918,
2220,
29898,
29979,
29892,
341,
29896,
29892,
29871,
29896,
29889,
29900,
29897,
13,
13,
9651,
565,
2924,
29918,
974,
29918,
29890,
1581,
1275,
317,
4214,
1307,
29918,
29924,
6488,
3919,
5005,
29901,
13,
18884,
289,
1581,
29918,
2220,
353,
289,
1581,
29918,
2220,
29918,
29896,
29885,
13,
18884,
2847,
29918,
2543,
404,
353,
518,
1311,
29889,
29924,
29896,
29962,
13,
18884,
11938,
353,
5519,
1311,
29889,
29924,
29896,
29918,
1195,
565,
1583,
29889,
29924,
29896,
29918,
20227,
1275,
7700,
1683,
313,
1311,
29889,
29924,
29896,
334,
321,
3232,
29918,
12254,
29897,
1402,
13,
462,
1669,
518,
1311,
29889,
29924,
29896,
29918,
3317,
565,
1583,
29889,
29924,
29896,
29918,
20227,
1275,
7700,
1683,
313,
1311,
29889,
29924,
29896,
334,
321,
3232,
29918,
11242,
4638,
29962,
13,
9651,
25342,
2924,
29918,
974,
29918,
29890,
1581,
1275,
11662,
7466,
1307,
29918,
29924,
6488,
3919,
5005,
29901,
13,
18884,
289,
1581,
29918,
2220,
353,
289,
1581,
29918,
2220,
29918,
29906,
29885,
13,
18884,
2847,
29918,
2543,
404,
353,
518,
1311,
29889,
29924,
29896,
29892,
1583,
29889,
3605,
601,
29962,
13,
18884,
11938,
353,
5519,
1311,
29889,
29924,
29896,
29918,
1195,
1678,
565,
1583,
29889,
29924,
29896,
29918,
20227,
1275,
7700,
1678,
1683,
313,
1311,
29889,
29924,
29896,
29930,
5463,
29918,
12254,
511,
13,
462,
18884,
1583,
29889,
3605,
601,
29918,
1195,
565,
1583,
29889,
3605,
601,
29918,
20227,
1275,
7700,
1683,
313,
1311,
29889,
3605,
601,
29930,
5463,
29918,
12254,
29897,
1402,
13,
462,
1669,
518,
1311,
29889,
29924,
29896,
29918,
3317,
1678,
565,
1583,
29889,
29924,
29896,
29918,
20227,
1275,
7700,
1678,
1683,
313,
1311,
29889,
29924,
29896,
29930,
5463,
29918,
11242,
511,
13,
462,
18884,
1583,
29889,
3605,
601,
29918,
3317,
565,
1583,
29889,
3605,
601,
29918,
20227,
1275,
7700,
1683,
313,
1311,
29889,
3605,
601,
29930,
5463,
29918,
11242,
4638,
29962,
13,
13,
4706,
4128,
29892,
903,
353,
11672,
29918,
9202,
29898,
29888,
29922,
29890,
1581,
29918,
2220,
29892,
13,
462,
462,
29871,
921,
1272,
29922,
29891,
29918,
9202,
29892,
13,
462,
462,
29871,
343,
1272,
29922,
680,
284,
29918,
10185,
29918,
9202,
29892,
13,
462,
462,
29871,
282,
29900,
29922,
11228,
29918,
2543,
404,
29892,
13,
462,
462,
29871,
13451,
29922,
13646,
29879,
29892,
13,
462,
462,
29871,
1158,
2433,
509,
29888,
1495,
13,
13,
4706,
565,
7431,
29898,
16744,
29897,
259,
1275,
29871,
29896,
29901,
289,
1581,
29918,
10185,
353,
289,
1581,
29918,
2220,
29898,
29891,
29892,
4128,
29961,
29900,
2314,
13,
4706,
25342,
7431,
29898,
16744,
29897,
1275,
29871,
29906,
29901,
289,
1581,
29918,
10185,
353,
289,
1581,
29918,
2220,
29898,
29891,
29892,
4128,
29961,
29900,
1402,
4128,
29961,
29896,
2314,
13,
4706,
1683,
29901,
462,
418,
289,
1581,
29918,
10185,
353,
289,
1581,
29918,
2220,
29898,
29891,
29892,
4128,
29961,
29900,
1402,
4128,
29961,
29896,
1402,
4128,
29961,
29906,
2314,
13,
13,
4706,
396,
16734,
1250,
304,
1383,
6986,
1788,
13,
4706,
289,
1581,
29918,
10185,
353,
289,
1581,
29918,
10185,
29961,
1057,
29899,
29896,
29962,
13,
4706,
10839,
29918,
10185,
29871,
353,
10839,
29918,
10185,
29961,
1057,
29899,
29896,
29962,
13,
13,
4706,
396,
515,
1244,
372,
29915,
29879,
1383,
6986,
319,
11497,
1788,
13,
4706,
26385,
29918,
10185,
353,
10839,
29918,
10185,
448,
289,
1581,
29918,
10185,
13,
4706,
565,
1583,
29889,
4716,
29918,
2848,
1275,
29871,
29896,
29901,
26385,
29918,
10185,
29918,
9202,
353,
26385,
29918,
10185,
29961,
18127,
29962,
13,
13,
4706,
396,
364,
29899,
26613,
1965,
353,
29871,
29896,
448,
10995,
950,
2533,
310,
25256,
847,
3001,
2533,
310,
25256,
13,
4706,
364,
29918,
26613,
1965,
353,
29871,
29896,
448,
313,
23749,
29889,
2083,
29898,
2616,
276,
428,
29918,
10185,
1068,
29906,
29897,
847,
12655,
29889,
2083,
3552,
680,
284,
29918,
10185,
448,
12655,
29889,
12676,
29898,
680,
284,
29918,
10185,
876,
1068,
29906,
876,
13,
4706,
364,
1516,
539,
353,
4513,
29898,
2616,
276,
428,
29918,
10185,
29889,
4172,
580,
29930,
29896,
29872,
29929,
29930,
1311,
29889,
1287,
3493,
29918,
348,
1169,
29918,
517,
29918,
29885,
29892,
29871,
29953,
29897,
13,
4706,
565,
1583,
29889,
4716,
29918,
2848,
1275,
29871,
29896,
29901,
364,
1516,
29918,
3670,
353,
4513,
29898,
2616,
276,
428,
29918,
10185,
29918,
9202,
29889,
4172,
580,
29930,
29896,
29872,
29929,
29930,
1311,
29889,
1287,
3493,
29918,
348,
1169,
29918,
517,
29918,
29885,
29892,
29871,
29953,
29897,
13,
13,
4706,
1583,
29889,
5317,
29896,
29928,
29898,
29891,
29892,
289,
1581,
29918,
10185,
29892,
343,
29918,
5975,
29918,
29906,
29922,
680,
284,
29918,
10185,
29892,
2380,
29922,
29900,
29892,
3611,
353,
376,
29933,
1581,
7186,
29889,
13001,
284,
1019,
5325,
29908,
718,
6634,
29876,
29908,
718,
364,
13090,
29934,
29985,
29906,
29938,
353,
525,
718,
851,
29898,
29878,
29918,
26613,
1965,
511,
1922,
29922,
29896,
29897,
13,
4706,
1583,
29889,
5317,
29896,
29928,
29898,
29891,
29892,
26385,
29918,
10185,
29892,
2380,
29922,
29896,
29892,
3611,
543,
12521,
276,
428,
20802,
29871,
29896,
29928,
29892,
364,
29889,
29885,
29889,
29879,
29889,
353,
376,
718,
851,
29898,
29878,
1516,
29897,
718,
376,
302,
29885,
29908,
718,
13,
462,
462,
462,
3986,
4852,
29908,
565,
1583,
29889,
4716,
29918,
2848,
1275,
29871,
29900,
1683,
313,
613,
376,
718,
851,
29898,
29878,
1516,
29918,
3670,
29897,
718,
376,
302,
29885,
313,
20640,
1891,
5513,
4961,
13,
13,
4706,
503,
29918,
29890,
1581,
29918,
2616,
276,
428,
353,
12655,
29889,
3298,
359,
29898,
29920,
29889,
12181,
29897,
13,
4706,
363,
474,
297,
3464,
29898,
29920,
29918,
29890,
1581,
29918,
2616,
276,
428,
29889,
12181,
29961,
29900,
29962,
1125,
503,
29918,
29890,
1581,
29918,
2616,
276,
428,
29961,
29875,
29892,
584,
29962,
353,
12655,
29889,
8552,
29898,
2616,
276,
428,
29918,
10185,
29897,
13,
13,
4706,
736,
4128,
29892,
503,
29918,
29890,
1581,
29918,
2616,
276,
428,
13,
13,
1678,
822,
6492,
29896,
29928,
29898,
1311,
29892,
921,
29918,
1111,
4339,
29892,
343,
29918,
5975,
29892,
343,
29918,
5975,
29918,
29906,
29922,
8516,
29892,
2380,
29922,
29900,
29892,
3611,
543,
613,
1922,
29922,
29900,
1125,
13,
4706,
565,
1583,
29889,
4294,
29918,
29890,
1581,
29918,
26762,
1275,
29871,
29896,
29901,
13,
9651,
4377,
353,
1583,
29889,
4532,
29918,
15257,
29961,
2248,
1822,
4532,
13,
13,
9651,
9685,
353,
4377,
29889,
29887,
1113,
580,
13,
9651,
9685,
29889,
8551,
580,
13,
13,
9651,
9685,
29889,
842,
29918,
29916,
1643,
703,
29979,
6796,
718,
1583,
29889,
1287,
3493,
29918,
348,
1169,
29918,
1643,
718,
376,
29962,
1159,
13,
9651,
9685,
29889,
842,
29918,
29891,
1643,
703,
29999,
6796,
718,
4852,
22882,
29908,
565,
1922,
1360,
29900,
1683,
6634,
29884,
29900,
29941,
29890,
4912,
1159,
718,
376,
29962,
1159,
13,
9651,
9685,
29889,
842,
29918,
3257,
29898,
3257,
29897,
13,
632,
13,
9651,
9685,
29889,
5317,
29898,
29916,
29918,
1111,
4339,
29892,
313,
29891,
29918,
5975,
334,
1583,
29889,
1287,
3493,
29918,
348,
1169,
29918,
517,
29918,
29885,
334,
313,
29896,
29872,
29929,
565,
1922,
1360,
29900,
1683,
29871,
29896,
29872,
29953,
8243,
2927,
543,
9539,
613,
3858,
543,
29890,
1581,
613,
1196,
2103,
29922,
29906,
29897,
13,
9651,
565,
451,
343,
29918,
5975,
29918,
29906,
338,
6213,
29901,
9685,
29889,
5317,
29898,
29916,
29918,
1111,
4339,
29892,
313,
29891,
29918,
5975,
29918,
29906,
334,
1583,
29889,
1287,
3493,
29918,
348,
1169,
29918,
517,
29918,
29885,
334,
313,
29896,
29872,
29929,
565,
1922,
1360,
29900,
1683,
29871,
29896,
29872,
29953,
8243,
11663,
29889,
29878,
613,
3858,
543,
680,
284,
1159,
13,
13,
9651,
9685,
29889,
26172,
29898,
2029,
29922,
29900,
29892,
4079,
2311,
2433,
9278,
1495,
13,
13,
9651,
4377,
29889,
15257,
29889,
4012,
580,
13,
13,
1678,
822,
6492,
29941,
29928,
29898,
1311,
29892,
921,
29918,
1111,
4339,
29892,
343,
29918,
1111,
4339,
29892,
503,
29918,
5975,
29892,
2380,
29892,
3611,
13776,
1125,
13,
4706,
565,
1583,
29889,
4294,
29918,
29890,
1581,
29918,
26762,
1275,
29871,
29896,
29901,
13,
9651,
4377,
353,
1583,
29889,
4532,
29918,
15257,
29961,
2248,
1822,
4532,
13,
9651,
921,
29918,
517,
29918,
5317,
29892,
343,
29918,
517,
29918,
5317,
353,
12655,
29889,
4467,
29882,
7720,
29898,
29916,
29918,
1111,
4339,
29892,
343,
29918,
1111,
4339,
29897,
13,
9651,
503,
29918,
517,
29918,
5317,
353,
503,
29918,
5975,
29889,
29911,
13,
13,
9651,
9685,
353,
4377,
29889,
29887,
1113,
580,
13,
9651,
9685,
29889,
8551,
580,
13,
13,
9651,
9685,
29889,
842,
29918,
29916,
1643,
703,
29990,
6796,
718,
1583,
29889,
1287,
3493,
29918,
348,
1169,
29918,
1643,
718,
376,
29962,
1159,
13,
9651,
9685,
29889,
842,
29918,
29891,
1643,
703,
29979,
6796,
718,
1583,
29889,
1287,
3493,
29918,
348,
1169,
29918,
1643,
718,
376,
29962,
1159,
13,
9651,
9685,
29889,
842,
29918,
29920,
1643,
703,
29999,
518,
22882,
29962,
1159,
13,
9651,
9685,
29889,
842,
29918,
3257,
29898,
3257,
29897,
13,
13,
9651,
9685,
29889,
5317,
29918,
7610,
2161,
29898,
29916,
29918,
517,
29918,
5317,
29892,
343,
29918,
517,
29918,
5317,
29892,
313,
29920,
29918,
517,
29918,
5317,
334,
1583,
29889,
1287,
3493,
29918,
348,
1169,
29918,
517,
29918,
29885,
334,
29871,
29896,
29872,
29929,
511,
13,
462,
795,
364,
303,
2426,
29922,
29896,
29892,
274,
303,
2426,
29922,
29896,
29892,
274,
1958,
29922,
4912,
29889,
1300,
1227,
29892,
1196,
2103,
29922,
29900,
29889,
29945,
29892,
3677,
24341,
1463,
29922,
5574,
29897,
13,
13,
9651,
4377,
29889,
15257,
29889,
4012,
580,
13,
13,
9651,
9685,
29889,
15769,
29918,
2344,
580,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
263,
353,
660,
4873,
29898,
9675,
29889,
19218,
29897,
13,
1678,
8152,
353,
350,
355,
519,
6489,
492,
567,
3398,
29924,
381,
729,
580,
13,
1678,
8152,
29889,
4294,
580,
13,
1678,
263,
29889,
4258,
29918,
580,
13,
1678,
8152,
29889,
7620,
9585,
580,
13,
2
] |
azext/batch/models/_models.py | bgklein/azure-batch-cli-extensions | 0 | 138319 | <gh_stars>0
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=too-many-lines
import os
import azure.batch.models as models
from msrest.serialization import Model
from .constants import ATTRS_RESERVED_FOR_TEMPLATES
class TaskFactoryBase(Model):
"""A Task Factory for automatically adding a collection of tasks to a job on
submission.
:param merge_task: An optional additional task to be run after all the other
generated tasks have completed successfully.
:type merge_task: :class:`MergeTask <azext.batch.models.MergeTask>`
"""
_validation = {
'type': {'required': True},
}
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'merge_task': {'key': 'mergeTask', 'type': 'MergeTask'}
}
_subtype_map = {
'type': {'parametricSweep': 'ParametricSweepTaskFactory',
'taskPerFile': 'FileCollectionTaskFactory',
'taskCollection': 'TaskCollectionTaskFactory'}
}
def __init__(self, **kwargs):
super(TaskFactoryBase, self).__init__(**kwargs)
self.merge_task = kwargs.get('merge_task', None)
self.type = None
class PackageReferenceBase(Model):
"""A reference to a package to be installed on the compute nodes using
a package manager.
:param str id: The name of the package.
:param str version: The version of the package to be installed. If omitted,
the latest version (according to the package repository) will be installed.
"""
_validation = {
'type': {'required': True},
'id': {'required': True},
}
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'version': {'key': 'version', 'type': 'str'},
}
_subtype_map = {
'type': {'aptPackage': 'AptPackageReference',
'chocolateyPackage': 'ChocolateyPackageReference',
'yumPackage': 'YumPackageReference'}
}
def __init__(self, **kwargs):
super(PackageReferenceBase, self).__init__(**kwargs)
self.type = None
self.id = kwargs.get('id')
self.version = kwargs.get('version', None)
class ApplicationTemplate(Model):
"""An Azure Batch Application Template.
:param job_manager_task: Details of a Job Manager task to be launched when
the job is started. If the job does not specify a Job Manager task, the
user must explicitly add tasks to the job. If the job does specify a Job
Manager task, the Batch service creates the Job Manager task when the job
is created, and will try to schedule the Job Manager task before
scheduling other tasks in the job. The Job Manager task's typical purpose
is to control and/or monitor job execution, for example by deciding what
additional tasks to run, determining when the work is complete, etc.
(However, a Job Manager task is not restricted to these activities - it is
a fully-fledged task in the system and perform whatever actions are
required for the job.) For example, a Job Manager task might download a
file specified as a parameter, analyze the contents of that file and
submit additional tasks based on those contents.
:type job_manager_task: :class:`JobManagerTask
<azure.batch.models.JobManagerTask>`
:param job_preparation_task: The Job Preparation task. If a job has a Job
Preparation task, the Batch service will run the Job Preparation task on a
compute node before starting any tasks of that job on that compute node.
:type job_preparation_task: :class:`JobPreparationTask
<azure.batch.models.JobPreparationTask>`
:param job_release_task: The Job Release task. A Job Release task cannot
be specified without also specifying a Job Preparation task for the job.
The Batch service runs the Job Release task on the compute nodes that have
run the Job Preparation task. The primary purpose of the Job Release task
is to undo changes to compute nodes made by the Job Preparation task.
Example activities include deleting local files, or shutting down services
that were started as part of job preparation.
:type job_release_task: :class:`JobReleaseTask
<azure.batch.models.JobReleaseTask>`
:param common_environment_settings: The list of common environment
variable settings. These environment variables are set for all tasks in
the job (including the Job Manager, Job Preparation and Job Release
tasks). Individual tasks can override an environment setting specified
here by specifying the same setting name with a different value.
:type common_environment_settings: list of :class:`EnvironmentSetting
<azure.batch.models.EnvironmentSetting>`
:param on_all_tasks_complete: The action the Batch service should take
when all tasks in the job are in the completed state. Note that if a job
contains no tasks, then all tasks are considered complete. This option is
therefore most commonly used with a Job Manager task; if you want to use
automatic job termination without a Job Manager, you should initially set
onAllTasksComplete to noAction and update the job properties to set
onAllTasksComplete to terminateJob once you have finished adding tasks.
Permitted values are: noAction - do nothing. The job remains active unless
terminated or disabled by some other means. terminateJob - terminate the
job. The job's terminateReason is set to 'AllTasksComplete'. The default
is noAction. Possible values include: 'noAction', 'terminateJob'
:type on_all_tasks_complete: str or :class:`OnAllTasksComplete
<azure.batch.models.OnAllTasksComplete>`
:param on_task_failure: The action the Batch service should take when any
task in the job fails. A task is considered to have failed if has a
failureInfo. A failureInfo is set if the task completes with a non-zero
exit code after exhausting its retry count, or if there was an error
starting the task, for example due to a resource file download error.
noAction - do nothing. performExitOptionsJobAction - take the action
associated with the task exit condition in the task's exitConditions
collection. (This may still result in no action being taken, if that is
what the task specifies.) The default is noAction. Possible values
include: 'noAction', 'performExitOptionsJobAction'
:type on_task_failure: str or :class:`OnTaskFailure
<azure.batch.models.OnTaskFailure>`
:param metadata: A list of name-value pairs associated with the job as
metadata. The Batch service does not assign any meaning to metadata; it is
solely for the use of user code.
:type metadata: list of :class:`MetadataItem
<azure.batch.models.MetadataItem>`
:param uses_task_dependencies: Whether tasks in the job can define
dependencies on each other. The default is false.
:type uses_task_dependencies: bool
:param task_factory: A task factory reference to automatically generate a set of
tasks to be added to the job.
:type task_factory: :class:`TaskFactoryBase
<azext.batch.models.TaskFactoryBase>`
"""
_attribute_map = {
'job_manager_task': {'key': 'jobManagerTask', 'type': 'JobManagerTask'},
'job_preparation_task': {'key': 'jobPreparationTask', 'type': 'JobPreparationTask'},
'job_release_task': {'key': 'jobReleaseTask', 'type': 'JobReleaseTask'},
'common_environment_settings': {'key': 'commonEnvironmentSettings', 'type': '[EnvironmentSetting]'},
'on_all_tasks_complete': {'key': 'onAllTasksComplete', 'type': 'OnAllTasksComplete'},
'on_task_failure': {'key': 'onTaskFailure', 'type': 'OnTaskFailure'},
'metadata': {'key': 'metadata', 'type': '[MetadataItem]'},
'uses_task_dependencies': {'key': 'usesTaskDependencies', 'type': 'bool'},
'task_factory': {'key': 'taskFactory', 'type': 'TaskFactoryBase'},
}
def __init__(self, **kwargs):
super(ApplicationTemplate, self).__init__(**kwargs)
self.job_manager_task = kwargs.get('job_manager_task', None)
self.job_preparation_task = kwargs.get('job_preparation_task', None)
self.job_release_task = kwargs.get('job_release_task', None)
self.common_environment_settings = kwargs.get('common_environment_settings', None)
self.on_all_tasks_complete = kwargs.get('on_all_tasks_complete', None)
self.on_task_failure = kwargs.get('on_task_failure', None)
self.metadata = kwargs.get('metadata', None)
self.uses_task_dependencies = kwargs.get('uses_task_dependencies', None)
self.task_factory = kwargs.get('task_factory', None)
class ApplicationTemplateInfo(Model):
"""A reference to an Azure Batch Application Template.
:param str file_path: The path to an application template file. This can
be a full path, or relative to the current working directory. Alternatively
a relative directory can be supplied with the 'current_directory' argument.
A ValueError will be raised if the supplied file path cannot be found.
:param dict parameters: A dictory of parameter names and values to be
subtituted into the application template.
"""
_validation = {
'file_path': {'required': True},
}
_attribute_map = {
'file_path': {'key': 'filePath', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'object'},
}
def __init__(self, **kwargs):
super(ApplicationTemplateInfo, self).__init__(**kwargs)
self.file_path = kwargs.get('file_path', None)
if not os.path.isfile(self.file_path):
current_directory = kwargs.get('current_directory', ".")
self.file_path = os.path.abspath(os.path.join(current_directory, str(self.file_path)))
self.parameters = kwargs.get('parameters', None)
# Rule: Template file must exist
# (We do this in order to give a good diagnostic in the most common case, knowing that this is
# technically a race condition because someone could delete the file between our check here and
# reading the file later on. We expect such cases to be rare.)
try:
with open(self.file_path, 'r'):
pass
except EnvironmentError as error:
raise ValueError("Unable to read the template '{}': {}".format(self.file_path, error))
class AptPackageReference(PackageReferenceBase):
"""A reference to a package to be installed using the APT package
manager on a Linux node (apt-get).
:param str id: The name of the package.
:param str version: The version of the package to be installed. If omitted,
the latest version (according to the package repository) will be installed.
"""
_validation = {
'type': {'required': True},
'id': {'required': True},
}
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'version': {'key': 'version', 'type': 'str'},
}
def __init__(self, **kwargs):
super(AptPackageReference, self).__init__(**kwargs)
self.type = 'aptPackage'
class AutoPoolSpecification(Model):
"""Specifies characteristics for a temporary 'auto pool'. The Batch service
will create this auto pool when the job is submitted.
:param auto_pool_id_prefix: A prefix to be added to the unique identifier
when a pool is automatically created. The Batch service assigns each auto
pool a unique identifier on creation. To distinguish between pools created
for different purposes, you can specify this element to add a prefix to
the ID that is assigned. The prefix can be up to 20 characters long.
:type auto_pool_id_prefix: str
:param pool_lifetime_option: The minimum lifetime of created auto pools,
and how multiple jobs on a schedule are assigned to pools. When the pool
lifetime is jobSchedule the pool exists for the lifetime of the job
schedule. The Batch Service creates the pool when it creates the first job
on the schedule. You may apply this option only to job schedules, not to
jobs. When the pool lifetime is job the pool exists for the lifetime of
the job to which it is dedicated. The Batch service creates the pool when
it creates the job. If the 'job' option is applied to a job schedule, the
Batch service creates a new auto pool for every job created on the
schedule. Possible values include: 'jobSchedule', 'job'
:type pool_lifetime_option: str or :class:`PoolLifetimeOption
<azure.batch.models.PoolLifetimeOption>`
:param keep_alive: Whether to keep an auto pool alive after its lifetime
expires. If false, the Batch service deletes the pool once its lifetime
(as determined by the poolLifetimeOption setting) expires; that is, when
the job or job schedule completes. If true, the Batch service does not
delete the pool automatically. It is up to the user to delete auto pools
created with this option.
:type keep_alive: bool
:param pool: The pool specification for the auto pool.
:type pool: :class:`PoolSpecification
<azure.batch.models.PoolSpecification>`
"""
_validation = {
'pool_lifetime_option': {'required': True},
}
_attribute_map = {
'auto_pool_id_prefix': {'key': 'autoPoolIdPrefix', 'type': 'str'},
'pool_lifetime_option': {'key': 'poolLifetimeOption', 'type': 'PoolLifetimeOption'},
'keep_alive': {'key': 'keepAlive', 'type': 'bool'},
'pool': {'key': 'pool', 'type': 'ExtendedPoolSpecification'},
}
def __init__(self, **kwargs):
super(AutoPoolSpecification, self).__init__(**kwargs)
self.auto_pool_id_prefix = kwargs.get('auto_pool_id_prefix', None)
self.pool_lifetime_option = kwargs.get('pool_lifetime_option', None)
self.keep_alive = kwargs.get('keep_alive', None)
self.pool = kwargs.get('pool', None)
class ChocolateyPackageReference(PackageReferenceBase):
"""A reference to a package to be installed using the Chocolatey package
manager on a Windows node.
:param str id: The name of the package.
:param str version: The version of the package to be installed. If omitted,
the latest version (according to the package repository) will be installed.
:param bool allow_empty_checksums: Whether Chocolatey will install packages
without a checksum for validation. Default is false.
"""
_validation = {
'type': {'required': True},
'id': {'required': True},
}
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'version': {'key': 'version', 'type': 'str'},
'allow_empty_checksums': {'key': 'allowEmptyChecksums', 'type': 'bool'}
}
def __init__(self, **kwargs):
super(ChocolateyPackageReference, self).__init__(**kwargs)
self.allow_empty_checksums = kwargs.get('allow_empty_checksums', None)
self.type = 'chocolateyPackage'
class ExtendedJobParameter(models.JobAddParameter):
"""An Azure Batch job to add.
:param id: A string that uniquely identifies the job within the account.
The ID can contain any combination of alphanumeric characters including
hyphens and underscores, and cannot contain more than 64 characters. The
ID is case-preserving and case-insensitive (that is, you may not have two
IDs within an account that differ only by case).
:type id: str
:param display_name: The display name for the job. The display name need
not be unique and can contain any Unicode characters up to a maximum
length of 1024.
:type display_name: str
:param priority: The priority of the job. Priority values can range from
-1000 to 1000, with -1000 being the lowest priority and 1000 being the
highest priority. The default value is 0.
:type priority: int
:param constraints: The execution constraints for the job.
:type constraints: :class:`JobConstraints
<azure.batch.models.JobConstraints>`
:param job_manager_task: Details of a Job Manager task to be launched when
the job is started. If the job does not specify a Job Manager task, the
user must explicitly add tasks to the job. If the job does specify a Job
Manager task, the Batch service creates the Job Manager task when the job
is created, and will try to schedule the Job Manager task before
scheduling other tasks in the job. The Job Manager task's typical purpose
is to control and/or monitor job execution, for example by deciding what
additional tasks to run, determining when the work is complete, etc.
(However, a Job Manager task is not restricted to these activities - it is
a fully-fledged task in the system and perform whatever actions are
required for the job.) For example, a Job Manager task might download a
file specified as a parameter, analyze the contents of that file and
submit additional tasks based on those contents.
:type job_manager_task: :class:`JobManagerTask
<azure.batch.models.JobManagerTask>`
:param job_preparation_task: The Job Preparation task. If a job has a Job
Preparation task, the Batch service will run the Job Preparation task on a
compute node before starting any tasks of that job on that compute node.
:type job_preparation_task: :class:`JobPreparationTask
<azure.batch.models.JobPreparationTask>`
:param job_release_task: The Job Release task. A Job Release task cannot
be specified without also specifying a Job Preparation task for the job.
The Batch service runs the Job Release task on the compute nodes that have
run the Job Preparation task. The primary purpose of the Job Release task
is to undo changes to compute nodes made by the Job Preparation task.
Example activities include deleting local files, or shutting down services
that were started as part of job preparation.
:type job_release_task: :class:`JobReleaseTask
<azure.batch.models.JobReleaseTask>`
:param common_environment_settings: The list of common environment
variable settings. These environment variables are set for all tasks in
the job (including the Job Manager, Job Preparation and Job Release
tasks). Individual tasks can override an environment setting specified
here by specifying the same setting name with a different value.
:type common_environment_settings: list of :class:`EnvironmentSetting
<azure.batch.models.EnvironmentSetting>`
:param pool_info: The pool on which the Batch service runs the job's
tasks.
:type pool_info: :class:`PoolInformation
<azure.batch.models.PoolInformation>`
:param on_all_tasks_complete: The action the Batch service should take
when all tasks in the job are in the completed state. Note that if a job
contains no tasks, then all tasks are considered complete. This option is
therefore most commonly used with a Job Manager task; if you want to use
automatic job termination without a Job Manager, you should initially set
onAllTasksComplete to noAction and update the job properties to set
onAllTasksComplete to terminateJob once you have finished adding tasks.
Permitted values are: noAction - do nothing. The job remains active unless
terminated or disabled by some other means. terminateJob - terminate the
job. The job's terminateReason is set to 'AllTasksComplete'. The default
is noAction. Possible values include: 'noAction', 'terminateJob'
:type on_all_tasks_complete: str or :class:`OnAllTasksComplete
<azure.batch.models.OnAllTasksComplete>`
:param on_task_failure: The action the Batch service should take when any
task in the job fails. A task is considered to have failed if has a
failureInfo. A failureInfo is set if the task completes with a non-zero
exit code after exhausting its retry count, or if there was an error
starting the task, for example due to a resource file download error.
noAction - do nothing. performExitOptionsJobAction - take the action
associated with the task exit condition in the task's exitConditions
collection. (This may still result in no action being taken, if that is
what the task specifies.) The default is noAction. Possible values
include: 'noAction', 'performExitOptionsJobAction'
:type on_task_failure: str or :class:`OnTaskFailure
<azure.batch.models.OnTaskFailure>`
:param metadata: A list of name-value pairs associated with the job as
metadata. The Batch service does not assign any meaning to metadata; it is
solely for the use of user code.
:type metadata: list of :class:`MetadataItem
<azure.batch.models.MetadataItem>`
:param uses_task_dependencies: Whether tasks in the job can define
dependencies on each other. The default is false.
:type uses_task_dependencies: bool
:param task_factory: A task factory reference to automatically generate a set of
tasks to be added to the job.
:type task_factory: :class:`TaskFactoryBase
<azext.batch.models.TaskFactoryBase>`
:param application_template_info: A reference to an application template file to
be expanded to complete the job specification. If supplied, the following arugments
cannot also be supplied or they will be overwritten: 'job_manager_task',
'common_environment_settings', 'uses_task_dependencies', 'on_all_tasks_complete',
'on_task_failure', 'task_factory', 'job_preparation_task', 'job_release_task'.
:type application_template_info: :class:`ApplicationTemplateInfo
<azext.batch.models.ApplicationTemplateInfo>`
"""
_validation = {
'id': {'required': True},
'pool_info': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'priority': {'key': 'priority', 'type': 'int'},
'constraints': {'key': 'constraints', 'type': 'JobConstraints'},
'job_manager_task': {'key': 'jobManagerTask', 'type': 'JobManagerTask'},
'job_preparation_task': {'key': 'jobPreparationTask', 'type': 'JobPreparationTask'},
'job_release_task': {'key': 'jobReleaseTask', 'type': 'JobReleaseTask'},
'common_environment_settings': {'key': 'commonEnvironmentSettings', 'type': '[EnvironmentSetting]'},
'pool_info': {'key': 'poolInfo', 'type': 'PoolInformation'},
'on_all_tasks_complete': {'key': 'onAllTasksComplete', 'type': 'OnAllTasksComplete'},
'on_task_failure': {'key': 'onTaskFailure', 'type': 'OnTaskFailure'},
'metadata': {'key': 'metadata', 'type': '[MetadataItem]'},
'uses_task_dependencies': {'key': 'usesTaskDependencies', 'type': 'bool'},
'task_factory': {'key': 'taskFactory', 'type': 'TaskFactoryBase'},
'application_template_info': {'key': 'applicationTemplateInfo', 'type': 'ApplicationTemplateInfo'}
}
def __init__(self, **kwargs):
super(ExtendedJobParameter, self).__init__(**kwargs)
self.task_factory = kwargs.get('task_factory', None)
self.application_template_info = kwargs.get('application_template_info', None)
if self.application_template_info:
# Rule: Jobs may not use properties reserved for template use
reserved = [k for k, v in self.__dict__.items() \
if k in ATTRS_RESERVED_FOR_TEMPLATES and v is not None]
if reserved:
raise ValueError("Jobs using application templates may not use these "
"properties: {}".format(', '.join(reserved)))
class ExtendedOutputFileDestination(Model):
"""The specification for where output files should be uploaded to on task
completion.
:param container: A location in Azure blob storage to which files are
uploaded. This cannot be combined with auto_storage.
:type container: :class:`OutputFileBlobContainerDestination
<azure.batch.models.OutputFileBlobContainerDestination>`
:param auto_storage: An auto-storage file group reference. This cannot be
combined with container.
:type auto_storage: :class:`OutputFileAutoStorageDestination
<azext.batch.models.OutputFileAutoStorageDestination>`
"""
_attribute_map = {
'container': {'key': 'container', 'type': 'OutputFileBlobContainerDestination'},
'auto_storage': {'key': 'autoStorage', 'type': 'OutputFileAutoStorageDestination'},
}
def __init__(self, **kwargs):
super(ExtendedOutputFileDestination, self).__init__(**kwargs)
self.container = kwargs.get('container', None)
self.auto_storage = kwargs.get('auto_storage', None)
if self.container and self.auto_storage:
raise ValueError("Cannot specify both container and auto_storage.")
class ExtendedPoolParameter(models.PoolAddParameter):
"""A pool in the Azure Batch service to add.
:param id: A string that uniquely identifies the pool within the account.
The ID can contain any combination of alphanumeric characters including
hyphens and underscores, and cannot contain more than 64 characters. The
ID is case-preserving and case-insensitive (that is, you may not have two
pool IDs within an account that differ only by case).
:type id: str
:param display_name: The display name for the pool. The display name need
not be unique and can contain any Unicode characters up to a maximum
length of 1024.
:type display_name: str
:param vm_size: The size of virtual machines in the pool. All virtual
machines in a pool are the same size. For information about available
sizes of virtual machines for Cloud Services pools (pools created with
cloudServiceConfiguration), see Sizes for Cloud Services
(http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/).
Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and
A2V2. For information about available VM sizes for pools using images from
the Virtual Machines Marketplace (pools created with
virtualMachineConfiguration) see Sizes for Virtual Machines (Linux)
(https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/)
or Sizes for Virtual Machines (Windows)
(https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/).
Batch supports all Azure VM sizes except STANDARD_A0 and those with
premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
:type vm_size: str
:param cloud_service_configuration: The cloud service configuration for
the pool. This property and virtualMachineConfiguration are mutually
exclusive and one of the properties must be specified. This property
cannot be specified if the Batch account was created with its
poolAllocationMode property set to 'UserSubscription'.
:type cloud_service_configuration: :class:`CloudServiceConfiguration
<azure.batch.models.CloudServiceConfiguration>`
:param virtual_machine_configuration: The virtual machine configuration
for the pool. This property and cloudServiceConfiguration are mutually
exclusive and one of the properties must be specified.
:type virtual_machine_configuration: :class:`VirtualMachineConfiguration
<azure.batch.models.VirtualMachineConfiguration>`
:param resize_timeout: The timeout for allocation of compute nodes to the
pool. This timeout applies only to manual scaling; it has no effect when
enableAutoScale is set to true. The default value is 15 minutes. The
minimum value is 5 minutes. If you specify a value less than 5 minutes,
the Batch service returns an error; if you are calling the REST API
directly, the HTTP status code is 400 (Bad Request).
:type resize_timeout: timedelta
:param target_dedicated_nodes: The desired number of dedicated compute
nodes in the pool. This property must not be specified if enableAutoScale
is set to true. If enableAutoScale is set to false, then you must set
either targetDedicatedNodes, targetLowPriorityNodes, or both.
:type target_dedicated_nodes: int
:param target_low_priority_nodes: The desired number of low-priority
compute nodes in the pool. This property must not be specified if
enableAutoScale is set to true. If enableAutoScale is set to false, then
you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
:type target_low_priority_nodes: int
:param enable_auto_scale: Whether the pool size should automatically
adjust over time. If false, at least one of targetDedicateNodes and
targetLowPriorityNodes must be specified. If true, the autoScaleFormula
property is required and the pool automatically resizes according to the
formula. The default value is false.
:type enable_auto_scale: bool
:param auto_scale_formula: A formula for the desired number of compute
nodes in the pool. This property must not be specified if enableAutoScale
is set to false. It is required if enableAutoScale is set to true. The
formula is checked for validity before the pool is created. If the formula
is not valid, the Batch service rejects the request with detailed error
information. For more information about specifying this formula, see
'Automatically scale compute nodes in an Azure Batch pool'
(https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/).
:type auto_scale_formula: str
:param auto_scale_evaluation_interval: The time interval at which to
automatically adjust the pool size according to the autoscale formula. The
default value is 15 minutes. The minimum and maximum value are 5 minutes
and 168 hours respectively. If you specify a value less than 5 minutes or
greater than 168 hours, the Batch service returns an error; if you are
calling the REST API directly, the HTTP status code is 400 (Bad Request).
:type auto_scale_evaluation_interval: timedelta
:param enable_inter_node_communication: Whether the pool permits direct
communication between nodes. Enabling inter-node communication limits the
maximum size of the pool due to deployment restrictions on the nodes of
the pool. This may result in the pool not reaching its desired size. The
default value is false.
:type enable_inter_node_communication: bool
:param network_configuration: The network configuration for the pool.
:type network_configuration: :class:`NetworkConfiguration
<azure.batch.models.NetworkConfiguration>`
:param start_task: A task specified to run on each compute node as it
joins the pool. The task runs when the node is added to the pool or when
the node is restarted.
:type start_task: :class:`StartTask <azure.batch.models.StartTask>`
:param certificate_references: The list of certificates to be installed on
each compute node in the pool. For Windows compute nodes, the Batch
service installs the certificates to the specified certificate store and
location. For Linux compute nodes, the certificates are stored in a
directory inside the task working directory and an environment variable
AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this
location. For certificates with visibility of 'remoteUser', a 'certs'
directory is created in the user's home directory (e.g.,
/home/{user-name}/certs) and certificates are placed in that directory.
:type certificate_references: list of :class:`CertificateReference
<azure.batch.models.CertificateReference>`
:param application_package_references: The list of application packages to
be installed on each compute node in the pool.
:type application_package_references: list of
:class:`ApplicationPackageReference
<azure.batch.models.ApplicationPackageReference>`
:param application_licenses: The list of application licenses the Batch
service will make available on each compute node in the pool. The list of
application licenses must be a subset of available Batch service
application licenses. If a license is requested which is not supported,
pool creation will fail.
:type application_licenses: list of str
:param max_tasks_per_node: The maximum number of tasks that can run
concurrently on a single compute node in the pool. The default value is 1.
The maximum value of this setting depends on the size of the compute nodes
in the pool (the vmSize setting).
:type max_tasks_per_node: int
:param task_scheduling_policy: How tasks are distributed across compute
nodes in a pool.
:type task_scheduling_policy: :class:`TaskSchedulingPolicy
<azure.batch.models.TaskSchedulingPolicy>`
:param user_accounts: The list of user accounts to be created on each node
in the pool.
:type user_accounts: list of :class:`UserAccount
<azure.batch.models.UserAccount>`
:param metadata: A list of name-value pairs associated with the pool as
metadata. The Batch service does not assign any meaning to metadata; it is
solely for the use of user code.
:type metadata: list of :class:`MetadataItem
<azure.batch.models.MetadataItem>`
:param package_references: A list of packages to be installed on the compute
nodes. Must be of a Package Manager type in accordance with the selected
operating system.
:type package_references: list of :class:`PackageReferenceBase
<azext.batch.models.PackageReferenceBase>`
"""
_validation = {
'id': {'required': True},
'vm_size': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'vm_size': {'key': 'vmSize', 'type': 'str'},
'cloud_service_configuration': {'key': 'cloudServiceConfiguration',
'type': 'CloudServiceConfiguration'},
'virtual_machine_configuration': {'key': 'virtualMachineConfiguration',
'type': 'VirtualMachineConfiguration'},
'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'},
'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'},
'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'},
'enable_auto_scale': {'key': 'enableAutoScale', 'type': 'bool'},
'auto_scale_formula': {'key': 'autoScaleFormula', 'type': 'str'},
'auto_scale_evaluation_interval': {'key': 'autoScaleEvaluationInterval', 'type': 'duration'},
'enable_inter_node_communication': {'key': 'enableInterNodeCommunication', 'type': 'bool'},
'network_configuration': {'key': 'networkConfiguration', 'type': 'NetworkConfiguration'},
'start_task': {'key': 'startTask', 'type': 'StartTask'},
'certificate_references': {'key': 'certificateReferences', 'type': '[CertificateReference]'},
'application_package_references': {'key': 'applicationPackageReferences',
'type': '[ApplicationPackageReference]'},
'application_licenses': {'key': 'applicationLicenses', 'type': '[str]'},
'max_tasks_per_node': {'key': 'maxTasksPerNode', 'type': 'int'},
'task_scheduling_policy': {'key': 'taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'},
'user_accounts': {'key': 'userAccounts', 'type': '[UserAccount]'},
'metadata': {'key': 'metadata', 'type': '[MetadataItem]'},
'package_references': {'key': 'packageReferences', 'type': '[PackageReferenceBase]'}
}
def __init__(self, **kwargs):
super(ExtendedPoolParameter, self).__init__(**kwargs)
self.package_references = kwargs.get('package_references', None)
class ExtendedPoolSpecification(models.PoolSpecification):
"""Specification for creating a new pool.
:param display_name: The display name for the pool. The display name need
not be unique and can contain any Unicode characters up to a maximum
length of 1024.
:type display_name: str
:param vm_size: The size of the virtual machines in the pool. All virtual
machines in a pool are the same size. For information about available
sizes of virtual machines for Cloud Services pools (pools created with
cloudServiceConfiguration), see Sizes for Cloud Services
(http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/).
Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and
A2V2. For information about available VM sizes for pools using images from
the Virtual Machines Marketplace (pools created with
virtualMachineConfiguration) see Sizes for Virtual Machines (Linux)
(https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/)
or Sizes for Virtual Machines (Windows)
(https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/).
Batch supports all Azure VM sizes except STANDARD_A0 and those with
premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
:type vm_size: str
:param cloud_service_configuration: The cloud service configuration for
the pool. This property must be specified if the pool needs to be created
with Azure PaaS VMs. This property and virtualMachineConfiguration are
mutually exclusive and one of the properties must be specified. If neither
is specified then the Batch service returns an error; if you are calling
the REST API directly, the HTTP status code is 400 (Bad Request). This
property cannot be specified if the Batch account was created with its
poolAllocationMode property set to 'UserSubscription'.
:type cloud_service_configuration: :class:`CloudServiceConfiguration
<azure.batch.models.CloudServiceConfiguration>`
:param virtual_machine_configuration: The virtual machine configuration
for the pool. This property must be specified if the pool needs to be
created with Azure IaaS VMs. This property and cloudServiceConfiguration
are mutually exclusive and one of the properties must be specified. If
neither is specified then the Batch service returns an error; if you are
calling the REST API directly, the HTTP status code is 400 (Bad Request).
:type virtual_machine_configuration: :class:`VirtualMachineConfiguration
<azure.batch.models.VirtualMachineConfiguration>`
:param max_tasks_per_node: The maximum number of tasks that can run
concurrently on a single compute node in the pool. The default value is 1.
The maximum value of this setting depends on the size of the compute nodes
in the pool (the vmSize setting).
:type max_tasks_per_node: int
:param task_scheduling_policy: How tasks are distributed across compute
nodes in a pool.
:type task_scheduling_policy: :class:`TaskSchedulingPolicy
<azure.batch.models.TaskSchedulingPolicy>`
:param resize_timeout: The timeout for allocation of compute nodes to the
pool. This timeout applies only to manual scaling; it has no effect when
enableAutoScale is set to true. The default value is 15 minutes. The
minimum value is 5 minutes. If you specify a value less than 5 minutes,
the Batch service rejects the request with an error; if you are calling
the REST API directly, the HTTP status code is 400 (Bad Request).
:type resize_timeout: timedelta
:param target_dedicated_nodes: The desired number of dedicated compute
nodes in the pool. This property must not be specified if enableAutoScale
is set to true. If enableAutoScale is set to false, then you must set
either targetDedicatedNodes, targetLowPriorityNodes, or both.
:type target_dedicated_nodes: int
:param target_low_priority_nodes: The desired number of low-priority
compute nodes in the pool. This property must not be specified if
enableAutoScale is set to true. If enableAutoScale is set to false, then
you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
:type target_low_priority_nodes: int
:param enable_auto_scale: Whether the pool size should automatically
adjust over time. If false, the targetDedicated element is required. If
true, the autoScaleFormula element is required. The pool automatically
resizes according to the formula. The default value is false.
:type enable_auto_scale: bool
:param auto_scale_formula: The formula for the desired number of compute
nodes in the pool. This property must not be specified if enableAutoScale
is set to false. It is required if enableAutoScale is set to true. The
formula is checked for validity before the pool is created. If the formula
is not valid, the Batch service rejects the request with detailed error
information.
:type auto_scale_formula: str
:param auto_scale_evaluation_interval: The time interval at which to
automatically adjust the pool size according to the autoscale formula. The
default value is 15 minutes. The minimum and maximum value are 5 minutes
and 168 hours respectively. If you specify a value less than 5 minutes or
greater than 168 hours, the Batch service rejects the request with an
invalid property value error; if you are calling the REST API directly,
the HTTP status code is 400 (Bad Request).
:type auto_scale_evaluation_interval: timedelta
:param enable_inter_node_communication: Whether the pool permits direct
communication between nodes. Enabling inter-node communication limits the
maximum size of the pool due to deployment restrictions on the nodes of
the pool. This may result in the pool not reaching its desired size. The
default value is false.
:type enable_inter_node_communication: bool
:param network_configuration: The network configuration for the pool.
:type network_configuration: :class:`NetworkConfiguration
<azure.batch.models.NetworkConfiguration>`
:param start_task: A task to run on each compute node as it joins the
pool. The task runs when the node is added to the pool or when the node is
restarted.
:type start_task: :class:`StartTask <azure.batch.models.StartTask>`
:param certificate_references: A list of certificates to be installed on
each compute node in the pool. For Windows compute nodes, the Batch
service installs the certificates to the specified certificate store and
location. For Linux compute nodes, the certificates are stored in a
directory inside the task working directory and an environment variable
AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this
location. For certificates with visibility of 'remoteUser', a 'certs'
directory is created in the user's home directory (e.g.,
/home/{user-name}/certs) and certificates are placed in that directory.
:type certificate_references: list of :class:`CertificateReference
<azure.batch.models.CertificateReference>`
:param application_package_references: The list of application packages to
be installed on each compute node in the pool.
:type application_package_references: list of
:class:`ApplicationPackageReference
<azure.batch.models.ApplicationPackageReference>`
:param application_licenses: The list of application licenses the Batch
service will make available on each compute node in the pool. The list of
application licenses must be a subset of available Batch service
application licenses. If a license is requested which is not supported,
pool creation will fail.
:type application_licenses: list of str
:param user_accounts: The list of user accounts to be created on each node
in the pool.
:type user_accounts: list of :class:`UserAccount
<azure.batch.models.UserAccount>`
:param metadata: A list of name-value pairs associated with the pool as
metadata. The Batch service does not assign any meaning to metadata; it is
solely for the use of user code.
:type metadata: list of :class:`MetadataItem
<azure.batch.models.MetadataItem>`
:param package_references: A list of packages to be installed on the compute
nodes. Must be of a Package Manager type in accordance with the selected
operating system.
:type package_references: list of :class:`PackageReferenceBase
<azext.batch.models.PackageReferenceBase>`
"""
_validation = {
'vm_size': {'required': True},
}
_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'vm_size': {'key': 'vmSize', 'type': 'str'},
'cloud_service_configuration': {'key': 'cloudServiceConfiguration',
'type': 'CloudServiceConfiguration'},
'virtual_machine_configuration': {'key': 'virtualMachineConfiguration',
'type': 'VirtualMachineConfiguration'},
'max_tasks_per_node': {'key': 'maxTasksPerNode', 'type': 'int'},
'task_scheduling_policy': {'key': 'taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'},
'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'},
'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'},
'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'},
'enable_auto_scale': {'key': 'enableAutoScale', 'type': 'bool'},
'auto_scale_formula': {'key': 'autoScaleFormula', 'type': 'str'},
'auto_scale_evaluation_interval': {'key': 'autoScaleEvaluationInterval', 'type': 'duration'},
'enable_inter_node_communication': {'key': 'enableInterNodeCommunication', 'type': 'bool'},
'network_configuration': {'key': 'networkConfiguration', 'type': 'NetworkConfiguration'},
'start_task': {'key': 'startTask', 'type': 'StartTask'},
'certificate_references': {'key': 'certificateReferences', 'type': '[CertificateReference]'},
'application_package_references': {'key': 'applicationPackageReferences',
'type': '[ApplicationPackageReference]'},
'application_licenses': {'key': 'applicationLicenses', 'type': '[str]'},
'user_accounts': {'key': 'userAccounts', 'type': '[UserAccount]'},
'metadata': {'key': 'metadata', 'type': '[MetadataItem]'},
'package_references': {'key': 'packageReferences', 'type': '[PackageReferenceBase]'}
}
def __init__(self, **kwargs):
super(ExtendedPoolSpecification, self).__init__(**kwargs)
self.package_references = kwargs.get('package_references', None)
class ExtendedResourceFile(models.ResourceFile):
"""A file to be downloaded from Azure blob storage to a compute node.
:param http_url: The URL of the file within Azure Blob Storage. This
URL must be readable using anonymous access; that is, the Batch service
does not present any credentials when downloading the blob. There are two
ways to get such a URL for a blob in Azure storage: include a Shared
Access Signature (SAS) granting read permissions on the blob, or set the
ACL for the blob or its container to allow public access.
:type http_url: str
:param auto_storage_container_name: The storage container name in the auto
storage account. The autoStorageContainerName, storageContainerUrl and
httpUrl properties are mutually exclusive and one of them must be specified.
:type auto_storage_container_name: str
:param storage_container_url: The URL of the blob container within Azure
Blob Storage. The autoStorageContainerName, storageContainerUrl and httpUrl
properties are mutually exclusive and one of them must be specified. This
URL must be readable and listable using anonymous access; that is, the
Batch service does not present any credentials when downloading blobs from
the container. There are two ways to get such a URL for a container in
Azure storage: include a Shared Access Signature (SAS) granting read and
list permissions on the container, or set the ACL for the container to
allow public access.
:type storage_container_url: str
:param blob_prefix: The blob prefix to use when downloading blobs from an
Azure Storage container. Only the blobs whose names begin with the specified
prefix will be downloaded. The property is valid only when
autoStorageContainerName or storageContainerUrl is used. This prefix can be
a partial filename or a subdirectory. If a prefix is not specified, all the
files in the container will be downloaded.
:type blob_prefix: str
:param file_path: The location on the compute node to which to download
the file, relative to the task's working directory. If using a file group
source that references more than one file, this will be considered the name
of a directory, otherwise it will be treated as the destination file name.
:type file_path: str
:param file_mode: The file permission mode attribute in octal format. This
property applies only to files being downloaded to Linux compute nodes. It
will be ignored if it is specified for a resourceFile which will be
downloaded to a Windows node. If this property is not specified for a
Linux node, then a default value of 0770 is applied to the file.
If using a file group source that references more than one file, this will be
applied to all files in the group.
:type file_mode: str
:param source: A file source reference which could include a collection of files from
a Azure Storage container or an auto-storage file group.
:type source: :class:`FileSource
<azext.batch.models.FileSource>`
"""
_attribute_map = {
'http_url': {'key': 'httpUrl', 'type': 'str'},
'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'},
'blob_prefix': {'key': 'blobPrefix', 'type': 'str'},
'storage_container_url': {'key': 'storageContainerUrl', 'type': 'str'},
'file_path': {'key': 'filePath', 'type': 'str'},
'file_mode': {'key': 'fileMode', 'type': 'str'},
'source': {'key': 'source', 'type': 'FileSource'}
}
def __init__(self, **kwargs):
super(ExtendedResourceFile, self).__init__(**kwargs)
self.source = kwargs.get('source', None)
class ExtendedTaskParameter(models.TaskAddParameter):
"""An Azure Batch task to add.
:param id: A string that uniquely identifies the task within the job. The
ID can contain any combination of alphanumeric characters including
hyphens and underscores, and cannot contain more than 64 characters. The
ID is case-preserving and case-insensitive (that is, you may not have two
IDs within a job that differ only by case).
:type id: str
:param display_name: A display name for the task. The display name need
not be unique and can contain any Unicode characters up to a maximum
length of 1024.
:type display_name: str
:param command_line: The command line of the task. For multi-instance
tasks, the command line is executed as the primary task, after the primary
task and all subtasks have finished executing the coordination command
line. The command line does not run under a shell, and therefore cannot
take advantage of shell features such as environment variable expansion.
If you want to take advantage of such features, you should invoke the
shell in the command line, for example using "cmd /c MyCommand" in Windows
or "/bin/sh -c MyCommand" in Linux.
:type command_line: str
:param container_settings: The settings for the container under which the
task runs. If the pool that will run this task has containerConfiguration
set, this must be set as well. If the pool that will run this task doesn't
have containerConfiguration set, this must not be set. When this is
specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR
(the root of Azure Batch directories on the node) are mapped into the
container, all task environment variables are mapped into the container,
and the task command line is executed in the container.
:type container_settings: :class:`TaskContainerSettings
<azure.batch.models.TaskContainerSettings>`
:param exit_conditions: How the Batch service should respond when the task
completes.
:type exit_conditions: :class:`ExitConditions
<azure.batch.models.ExitConditions>`
:param resource_files: A list of files that the Batch service will
download to the compute node before running the command line. For
multi-instance tasks, the resource files will only be downloaded to the
compute node on which the primary task is executed.
:type resource_files: list of :class:`ResourceFile
<azure.batch.models.ResourceFile>`
:param environment_settings: A list of environment variable settings for
the task.
:type environment_settings: list of :class:`EnvironmentSetting
<azure.batch.models.EnvironmentSetting>`
:param affinity_info: A locality hint that can be used by the Batch
service to select a compute node on which to start the new task.
:type affinity_info: :class:`AffinityInformation
<azure.batch.models.AffinityInformation>`
:param constraints: The execution constraints that apply to this task. If
you do not specify constraints, the maxTaskRetryCount is the
maxTaskRetryCount specified for the job, and the maxWallClockTime and
retentionTime are infinite.
:type constraints: :class:`TaskConstraints
<azure.batch.models.TaskConstraints>`
:param user_identity: The user identity under which the task runs. If
omitted, the task runs as a non-administrative user unique to the task.
:type user_identity: :class:`UserIdentity
<azure.batch.models.UserIdentity>`
:param multi_instance_settings: An object that indicates that the task is
a multi-instance task, and contains information about how to run the
multi-instance task.
:type multi_instance_settings: :class:`MultiInstanceSettings
<azure.batch.models.MultiInstanceSettings>`
:param depends_on: The tasks that this task depends on. This task will not
be scheduled until all tasks that it depends on have completed
successfully. If any of those tasks fail and exhaust their retry counts,
this task will never be scheduled. If the job does not have
usesTaskDependencies set to true, and this element is present, the request
fails with error code TaskDependenciesNotSpecifiedOnJob.
:type depends_on: :class:`TaskDependencies
<azure.batch.models.TaskDependencies>`
:param application_package_references: A list of application packages that
the Batch service will deploy to the compute node before running the
command line. Application packages are downloaded and deployed to a shared
directory, not the task working directory. Therefore, if a referenced
package is already on the compute node, and is up to date, then it is not
re-downloaded; the existing copy on the compute node is used. If a
referenced application package cannot be installed, for example because
the package has been deleted or because download failed, the task fails.
:type application_package_references: list of
:class:`ApplicationPackageReference
<azure.batch.models.ApplicationPackageReference>`
:param authentication_token_settings: The settings for an authentication
token that the task can use to perform Batch service operations. If this
property is set, the Batch service provides the task with an
authentication token which can be used to authenticate Batch service
operations without requiring an account access key. The token is provided
via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations
that the task can carry out using the token depend on the settings. For
example, a task can request job permissions in order to add other tasks to
the job, or check the status of the job or of other tasks under the job.
:type authentication_token_settings: :class:`AuthenticationTokenSettings
<azure.batch.models.AuthenticationTokenSettings>`
:param output_files: A list of files that the Batch service will upload
from the compute node after running the command line. For multi-instance
tasks, the files will only be uploaded from the compute node on which the
primary task is executed.
:type output_files: list of :class:`OutputFile
<azext.batch.models.OutputFile>`
:param package_references: A list of packages to be installed on the compute
nodes. Must be of a Package Manager type in accordance with the selected
operating system.
:type package_references: list of :class:`PackageReferenceBase
<azext.batch.models.PackageReferenceBase>`
"""
_validation = {
'id': {'required': True},
'command_line': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'command_line': {'key': 'commandLine', 'type': 'str'},
'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'},
'exit_conditions': {'key': 'exitConditions', 'type': 'ExitConditions'},
'resource_files': {'key': 'resourceFiles', 'type': '[ExtendedResourceFile]'},
'output_files': {'key': 'outputFiles', 'type': '[OutputFile]'},
'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'},
'affinity_info': {'key': 'affinityInfo', 'type': 'AffinityInformation'},
'constraints': {'key': 'constraints', 'type': 'TaskConstraints'},
'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'},
'multi_instance_settings': {'key': 'multiInstanceSettings', 'type': 'MultiInstanceSettings'},
'depends_on': {'key': 'dependsOn', 'type': 'TaskDependencies'},
'application_package_references': {'key': 'applicationPackageReferences',
'type': '[ApplicationPackageReference]'},
'authentication_token_settings': {'key': 'authenticationTokenSettings',
'type': 'AuthenticationTokenSettings'},
'package_references': {'key': 'packageReferences', 'type': '[PackageReferenceBase]'}
}
def __init__(self, **kwargs):
super(ExtendedTaskParameter, self).__init__(**kwargs)
self.package_references = kwargs.get('package_references', None)
class FileCollectionTaskFactory(TaskFactoryBase):
"""A Task Factory for generating a set of tasks based on the contents
of an Azure Storage container or auto-storage file group. One task
will be generated per input file, and automatically added to the job.
:param source: The input file source from which the tasks will be generated.
:type source: :class:`FileSource <azext.batch.models.FileSource>`
:param repeat_task: The task template the will be used to generate each task.
:type repeat_task: :class:`RepeatTask <azext.batch.models.RepeatTask>`
:param merge_task: An optional additional task to be run after all the other
generated tasks have completed successfully.
:type merge_task: :class:`MergeTask <azext.batch.models.MergeTask>`
"""
_validation = {
'type': {'required': True},
'source': {'required': True},
'repeat_task': {'required': True}
}
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'source': {'key': 'source', 'type': 'FileSource'},
'repeat_task': {'key': 'repeatTask', 'type': 'RepeatTask'},
'merge_task': {'key': 'mergeTask', 'type': 'MergeTask'}
}
def __init__(self, **kwargs):
super(FileCollectionTaskFactory, self).__init__(**kwargs)
self.source = kwargs.get('source', None)
self.repeat_task = kwargs.get('repeat_task', None)
self.type = 'taskPerFile'
class FileSource(Model):
"""A source of input files to be downloaded onto a compute node.
:param str file_group: The name of an auto-storage file group.
:param str url: The URL of a file to be downloaded.
:param str container_url: The SAS URL of an Azure Storage container.
:param str prefix: The filename prefix or subdirectory of input files
in either an auto-storage file group or container. Will be ignored if
conbined with url.
"""
_attribute_map = {
'file_group': {'key': 'fileGroup', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'container_url': {'key': 'containerUrl', 'type': 'str'},
'prefix': {'key': 'prefix', 'type': 'str'},
}
def __init__(self, **kwargs):
super(FileSource, self).__init__(**kwargs)
self.file_group = kwargs.get('file_group', None)
self.url = kwargs.get('url', None)
self.container_url = kwargs.get('container_url', None)
self.prefix = kwargs.get('prefix', None)
class JobManagerTask(Model):
"""Specifies details of a Job Manager task.
The Job Manager task is automatically started when the job is created. The
Batch service tries to schedule the Job Manager task before any other tasks
in the job. When shrinking a pool, the Batch service tries to preserve
compute nodes where Job Manager tasks are running for as long as possible
(that is, nodes running 'normal' tasks are removed before nodes running Job
Manager tasks). When a Job Manager task fails and needs to be restarted,
the system tries to schedule it at the highest priority. If there are no
idle nodes available, the system may terminate one of the running tasks in
the pool and return it to the queue in order to make room for the Job
Manager task to restart. Note that a Job Manager task in one job does not
have priority over tasks in other jobs. Across jobs, only job level
priorities are observed. For example, if a Job Manager in a priority 0 job
needs to be restarted, it will not displace tasks of a priority 1 job.
:param id: A string that uniquely identifies the Job Manager task within
the job. The ID can contain any combination of alphanumeric characters
including hyphens and underscores and cannot contain more than 64
characters.
:type id: str
:param display_name: The display name of the Job Manager task. It need not
be unique and can contain any Unicode characters up to a maximum length of
1024.
:type display_name: str
:param command_line: The command line of the Job Manager task. The command
line does not run under a shell, and therefore cannot take advantage of
shell features such as environment variable expansion. If you want to take
advantage of such features, you should invoke the shell in the command
line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c
MyCommand" in Linux.
:type command_line: str
:param container_settings: The settings for the container under which the
Job Manager task runs. If the pool that will run this task has
containerConfiguration set, this must be set as well. If the pool that
will run this task doesn't have containerConfiguration set, this must not
be set. When this is specified, all directories recursively below the
AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node)
are mapped into the container, all task environment variables are mapped
into the container, and the task command line is executed in the
container.
:type container_settings: :class:`TaskContainerSettings
<azure.batch.models.TaskContainerSettings>`
:param resource_files: A list of files that the Batch service will
download to the compute node before running the command line. Files listed
under this element are located in the task's working directory.
:type resource_files: list of :class:`ExtendedResourceFile
<azext.batch.models.ExtendedResourceFile>`
:param output_files: A list of files that the Batch service will upload
from the compute node after running the command line. For multi-instance
tasks, the files will only be uploaded from the compute node on which the
primary task is executed.
:type output_files: list of :class:`OutputFile
<azure.batch.models.OutputFile>`
:param environment_settings: A list of environment variable settings for
the Job Manager task.
:type environment_settings: list of :class:`EnvironmentSetting
<azure.batch.models.EnvironmentSetting>`
:param constraints: Constraints that apply to the Job Manager task.
:type constraints: :class:`TaskConstraints
<azure.batch.models.TaskConstraints>`
:param kill_job_on_completion: Whether completion of the Job Manager task
signifies completion of the entire job. If true, when the Job Manager task
completes, the Batch service marks the job as complete. If any tasks are
still running at this time (other than Job Release), those tasks are
terminated. If false, the completion of the Job Manager task does not
affect the job status. In this case, you should either use the
onAllTasksComplete attribute to terminate the job, or have a client or
user terminate the job explicitly. An example of this is if the Job
Manager creates a set of tasks but then takes no further role in their
execution. The default value is true. If you are using the
onAllTasksComplete and onTaskFailure attributes to control job lifetime,
and using the Job Manager task only to create the tasks for the job (not
to monitor progress), then it is important to set killJobOnCompletion to
false.
:type kill_job_on_completion: bool
:param user_identity: The user identity under which the Job Manager task
runs. If omitted, the task runs as a non-administrative user unique to the
task.
:type user_identity: :class:`UserIdentity
<azure.batch.models.UserIdentity>`
:param run_exclusive: Whether the Job Manager task requires exclusive use
of the compute node where it runs. If true, no other tasks will run on the
same compute node for as long as the Job Manager is running. If false,
other tasks can run simultaneously with the Job Manager on a compute node.
The Job Manager task counts normally against the node's concurrent task
limit, so this is only relevant if the node allows multiple concurrent
tasks. The default value is true.
:type run_exclusive: bool
:param application_package_references: A list of application packages that
the Batch service will deploy to the compute node before running the
command line. Application packages are downloaded and deployed to a shared
directory, not the task working directory. Therefore, if a referenced
package is already on the compute node, and is up to date, then it is not
re-downloaded; the existing copy on the compute node is used. If a
referenced application package cannot be installed, for example because
the package has been deleted or because download failed, the task fails.
:type application_package_references: list of
:class:`ApplicationPackageReference
<azure.batch.models.ApplicationPackageReference>`
:param authentication_token_settings: The settings for an authentication
token that the task can use to perform Batch service operations. If this
property is set, the Batch service provides the task with an
authentication token which can be used to authenticate Batch service
operations without requiring an account access key. The token is provided
via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations
that the task can carry out using the token depend on the settings. For
example, a task can request job permissions in order to add other tasks to
the job, or check the status of the job or of other tasks under the job.
:type authentication_token_settings: :class:`AuthenticationTokenSettings
<azure.batch.models.AuthenticationTokenSettings>`
:param allow_low_priority_node: Whether the Job Manager task may run on a
low-priority compute node. The default value is false.
:type allow_low_priority_node: bool
"""
_validation = {
'id': {'required': True},
'command_line': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'command_line': {'key': 'commandLine', 'type': 'str'},
'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'},
'resource_files': {'key': 'resourceFiles', 'type': '[ExtendedResourceFile]'},
'output_files': {'key': 'outputFiles', 'type': '[OutputFile]'},
'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'},
'constraints': {'key': 'constraints', 'type': 'TaskConstraints'},
'kill_job_on_completion': {'key': 'killJobOnCompletion', 'type': 'bool'},
'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'},
'run_exclusive': {'key': 'runExclusive', 'type': 'bool'},
'application_package_references': {'key': 'applicationPackageReferences',
'type': '[ApplicationPackageReference]'},
'authentication_token_settings': {'key': 'authenticationTokenSettings',
'type': 'AuthenticationTokenSettings'},
'allow_low_priority_node': {'key': 'allowLowPriorityNode', 'type': 'bool'},
}
def __init__(self, **kwargs):
super(JobManagerTask, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.display_name = kwargs.get('display_name', None)
self.command_line = kwargs.get('command_line', None)
self.container_settings = kwargs.get('container_settings', None)
self.resource_files = kwargs.get('resource_files', None)
self.output_files = kwargs.get('output_files', None)
self.environment_settings = kwargs.get('environment_settings', None)
self.constraints = kwargs.get('constraints', None)
self.kill_job_on_completion = kwargs.get('kill_job_on_completion', None)
self.user_identity = kwargs.get('user_identity', None)
self.run_exclusive = kwargs.get('run_exclusive', None)
self.application_package_references = kwargs.get('application_package_references', None)
self.authentication_token_settings = kwargs.get('authentication_token_settings', None)
self.allow_low_priority_node = kwargs.get('allow_low_priority_node', None)
class JobPreparationTask(Model):
"""A Job Preparation task to run before any tasks of the job on any given
compute node.
You can use Job Preparation to prepare a compute node to run tasks for the
job. Activities commonly performed in Job Preparation include: Downloading
common resource files used by all the tasks in the job. The Job Preparation
task can download these common resource files to the shared location on the
compute node. (AZ_BATCH_NODE_ROOT_DIR\\shared), or starting a local service
on the compute node so that all tasks of that job can communicate with it.
If the Job Preparation task fails (that is, exhausts its retry count before
exiting with exit code 0), Batch will not run tasks of this job on the
compute node. The node remains ineligible to run tasks of this job until it
is reimaged. The node remains active and can be used for other jobs. The
Job Preparation task can run multiple times on the same compute node.
Therefore, you should write the Job Preparation task to handle
re-execution. If the compute node is rebooted, the Job Preparation task is
run again on the node before scheduling any other task of the job, if
rerunOnNodeRebootAfterSuccess is true or if the Job Preparation task did
not previously complete. If the compute node is reimaged, the Job
Preparation task is run again before scheduling any task of the job.
:param id: A string that uniquely identifies the Job Preparation task
within the job. The ID can contain any combination of alphanumeric
characters including hyphens and underscores and cannot contain more than
64 characters. If you do not specify this property, the Batch service
assigns a default value of 'jobpreparation'. No other task in the job can
have the same ID as the Job Preparation task. If you try to submit a task
with the same ID, the Batch service rejects the request with error code
TaskIdSameAsJobPreparationTask; if you are calling the REST API directly,
the HTTP status code is 409 (Conflict).
:type id: str
:param command_line: The command line of the Job Preparation task. The
command line does not run under a shell, and therefore cannot take
advantage of shell features such as environment variable expansion. If you
want to take advantage of such features, you should invoke the shell in
the command line, for example using "cmd /c MyCommand" in Windows or
"/bin/sh -c MyCommand" in Linux.
:type command_line: str
:param container_settings: The settings for the container under which the
Job Preparation task runs. When this is specified, all directories
recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch
directories on the node) are mapped into the container, all task
environment variables are mapped into the container, and the task command
line is executed in the container.
:type container_settings: :class:`TaskContainerSettings
<azure.batch.models.TaskContainerSettings>`
:param resource_files: A list of files that the Batch service will
download to the compute node before running the command line. Files listed
under this element are located in the task's working directory.
:type resource_files: list of :class:`ExtendedResourceFile
<azext.batch.models.ExtendedResourceFile>`
:param environment_settings: A list of environment variable settings for
the Job Preparation task.
:type environment_settings: list of :class:`EnvironmentSetting
<azure.batch.models.EnvironmentSetting>`
:param constraints: Constraints that apply to the Job Preparation task.
:type constraints: :class:`TaskConstraints
<azure.batch.models.TaskConstraints>`
:param wait_for_success: Whether the Batch service should wait for the Job
Preparation task to complete successfully before scheduling any other
tasks of the job on the compute node. A Job Preparation task has completed
successfully if it exits with exit code 0. If true and the Job Preparation
task fails on a compute node, the Batch service retries the Job
Preparation task up to its maximum retry count (as specified in the
constraints element). If the task has still not completed successfully
after all retries, then the Batch service will not schedule tasks of the
job to the compute node. The compute node remains active and eligible to
run tasks of other jobs. If false, the Batch service will not wait for the
Job Preparation task to complete. In this case, other tasks of the job can
start executing on the compute node while the Job Preparation task is
still running; and even if the Job Preparation task fails, new tasks will
continue to be scheduled on the node. The default value is true.
:type wait_for_success: bool
:param user_identity: The user identity under which the Job Preparation
task runs. If omitted, the task runs as a non-administrative user unique
to the task on Windows nodes, or a a non-administrative user unique to the
pool on Linux nodes.
:type user_identity: :class:`UserIdentity
<azure.batch.models.UserIdentity>`
:param rerun_on_node_reboot_after_success: Whether the Batch service
should rerun the Job Preparation task after a compute node reboots. The
Job Preparation task is always rerun if a compute node is reimaged, or if
the Job Preparation task did not complete (e.g. because the reboot
occurred while the task was running). Therefore, you should always write a
Job Preparation task to be idempotent and to behave correctly if run
multiple times. The default value is true.
:type rerun_on_node_reboot_after_success: bool
"""
_validation = {
'command_line': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'command_line': {'key': 'commandLine', 'type': 'str'},
'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'},
'resource_files': {'key': 'resourceFiles', 'type': '[ExtendedResourceFile]'},
'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'},
'constraints': {'key': 'constraints', 'type': 'TaskConstraints'},
'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'},
'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'},
'rerun_on_node_reboot_after_success': {'key': 'rerunOnNodeRebootAfterSuccess', 'type': 'bool'},
}
def __init__(self, **kwargs):
super(JobPreparationTask, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.command_line = kwargs.get('command_line', None)
self.container_settings = kwargs.get('container_settings', None)
self.resource_files = kwargs.get('resource_files', None)
self.environment_settings = kwargs.get('environment_settings', None)
self.constraints = kwargs.get('constraints', None)
self.wait_for_success = kwargs.get('wait_for_success', None)
self.user_identity = kwargs.get('user_identity', None)
self.rerun_on_node_reboot_after_success = kwargs.get('rerun_on_node_reboot_after_success', None)
class JobReleaseTask(Model):
"""A Job Release task to run on job completion on any compute node where the
job has run.
The Job Release task runs when the job ends, because of one of the
following: The user calls the Terminate Job API, or the Delete Job API
while the job is still active, the job's maximum wall clock time constraint
is reached, and the job is still active, or the job's Job Manager task
completed, and the job is configured to terminate when the Job Manager
completes. The Job Release task runs on each compute node where tasks of
the job have run and the Job Preparation task ran and completed. If you
reimage a compute node after it has run the Job Preparation task, and the
job ends without any further tasks of the job running on that compute node
(and hence the Job Preparation task does not re-run), then the Job Release
task does not run on that node. If a compute node reboots while the Job
Release task is still running, the Job Release task runs again when the
compute node starts up. The job is not marked as complete until all Job
Release tasks have completed. The Job Release task runs in the background.
It does not occupy a scheduling slot; that is, it does not count towards
the maxTasksPerNode limit specified on the pool.
:param id: A string that uniquely identifies the Job Release task within
the job. The ID can contain any combination of alphanumeric characters
including hyphens and underscores and cannot contain more than 64
characters. If you do not specify this property, the Batch service assigns
a default value of 'jobrelease'. No other task in the job can have the
same ID as the Job Release task. If you try to submit a task with the same
ID, the Batch service rejects the request with error code
TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the
HTTP status code is 409 (Conflict).
:type id: str
:param command_line: The command line of the Job Release task. The command
line does not run under a shell, and therefore cannot take advantage of
shell features such as environment variable expansion. If you want to take
advantage of such features, you should invoke the shell in the command
line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c
MyCommand" in Linux.
:type command_line: str
:param container_settings: The settings for the container under which the
Job Release task runs. When this is specified, all directories recursively
below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on
the node) are mapped into the container, all task environment variables
are mapped into the container, and the task command line is executed in
the container.
:type container_settings: :class:`TaskContainerSettings
<azure.batch.models.TaskContainerSettings>`
:param resource_files: A list of files that the Batch service will
download to the compute node before running the command line. Files listed
under this element are located in the task's working directory.
:type resource_files: list of :class:`ExtendedResourceFile
<azext.batch.models.ExtendedResourceFile>`
:param environment_settings: A list of environment variable settings for
the Job Release task.
:type environment_settings: list of :class:`EnvironmentSetting
<azure.batch.models.EnvironmentSetting>`
:param max_wall_clock_time: The maximum elapsed time that the Job Release
task may run on a given compute node, measured from the time the task
starts. If the task does not complete within the time limit, the Batch
service terminates it. The default value is 15 minutes. You may not
specify a timeout longer than 15 minutes. If you do, the Batch service
rejects it with an error; if you are calling the REST API directly, the
HTTP status code is 400 (Bad Request).
:type max_wall_clock_time: timedelta
:param retention_time: The minimum time to retain the task directory for
the Job Release task on the compute node. After this time, the Batch
service may delete the task directory and all its contents. The default is
infinite, i.e. the task directory will be retained until the compute node
is removed or reimaged.
:type retention_time: timedelta
:param user_identity: The user identity under which the Job Release task
runs. If omitted, the task runs as a non-administrative user unique to the
task.
:type user_identity: :class:`UserIdentity
<azure.batch.models.UserIdentity>`
"""
_validation = {
'command_line': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'command_line': {'key': 'commandLine', 'type': 'str'},
'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'},
'resource_files': {'key': 'resourceFiles', 'type': '[ExtendedResourceFile]'},
'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'},
'max_wall_clock_time': {'key': 'maxWallClockTime', 'type': 'duration'},
'retention_time': {'key': 'retentionTime', 'type': 'duration'},
'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'},
}
def __init__(self, **kwargs):
super(JobReleaseTask, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.command_line = kwargs.get('command_line', None)
self.container_settings = kwargs.get('container_settings', None)
self.resource_files = kwargs.get('resource_files', None)
self.environment_settings = kwargs.get('environment_settings', None)
self.max_wall_clock_time = kwargs.get('max_wall_clock_time', None)
self.retention_time = kwargs.get('retention_time', None)
self.user_identity = kwargs.get('user_identity', None)
class JobTemplate(Model):
"""A Job Template.
:ivar type: The type of object described by the template. Must be:
"Microsoft.Batch/batchAccounts/jobs"
:type type: str
:param api_version: The API version that the template conforms to.
:type api_version: str
:param properties: The specificaton of the job.
:type properties: :class:`ExtendedJobParameter<azext.batch.models.ExtendedJobParameter>`
"""
_validation = {
'type': {'required': True, 'constant': True},
'properties': {'required': True},
}
_attribute_map = {
'type': {'key': 'id', 'type': 'str'},
'api_version': {'key': 'apiVersion', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'ExtendedJobParameter'},
}
type = "Microsoft.Batch/batchAccounts/jobs"
def __init__(self, **kwargs):
super(JobTemplate, self).__init__(**kwargs)
self.properties = kwargs.get('properties')
self.api_version = kwargs.get('api_version', None)
class MergeTask(Model):
"""An Azure Batch task template to repeat.
:param str id: The ID of the merge task.
:param display_name: A display name for the task. The display name need
not be unique and can contain any Unicode characters up to a maximum
length of 1024.
:type display_name: str
:param command_line: The command line of the task. For multi-instance
tasks, the command line is executed as the primary task, after the primary
task and all subtasks have finished executing the coordination command
line. The command line does not run under a shell, and therefore cannot
take advantage of shell features such as environment variable expansion.
If you want to take advantage of such features, you should invoke the
shell in the command line, for example using "cmd /c MyCommand" in Windows
or "/bin/sh -c MyCommand" in Linux.
:type command_line: str
:param exit_conditions: How the Batch service should respond when the task
completes.
:type exit_conditions: :class:`ExitConditions
<azure.batch.models.ExitConditions>`
:param resource_files: A list of files that the Batch service will
download to the compute node before running the command line. For
multi-instance tasks, the resource files will only be downloaded to the
compute node on which the primary task is executed.
:type resource_files: list of :class:`ExtendedResourceFile
<azext.batch.models.ExtendedResourceFile>`
:param environment_settings: A list of environment variable settings for
the task.
:type environment_settings: list of :class:`EnvironmentSetting
<azure.batch.models.EnvironmentSetting>`
:param affinity_info: A locality hint that can be used by the Batch
service to select a compute node on which to start the new task.
:type affinity_info: :class:`AffinityInformation
<azure.batch.models.AffinityInformation>`
:param constraints: The execution constraints that apply to this task. If
you do not specify constraints, the maxTaskRetryCount is the
maxTaskRetryCount specified for the job, and the maxWallClockTime and
retentionTime are infinite.
:type constraints: :class:`TaskConstraints
<azure.batch.models.TaskConstraints>`
:param user_identity: The user identity under which the task runs. If
omitted, the task runs as a non-administrative user unique to the task.
:type user_identity: :class:`UserIdentity
<azure.batch.models.UserIdentity>`
:param depends_on: The tasks that this task depends on. This task will not
be scheduled until all tasks that it depends on have completed
successfully. If any of those tasks fail and exhaust their retry counts,
this task will never be scheduled. If the job does not have
usesTaskDependencies set to true, and this element is present, the request
fails with error code TaskDependenciesNotSpecifiedOnJob.
:type depends_on: :class:`TaskDependencies
<azure.batch.models.TaskDependencies>`
:param application_package_references: A list of application packages that
the Batch service will deploy to the compute node before running the
command line.
:type application_package_references: list of
:class:`ApplicationPackageReference
<azure.batch.models.ApplicationPackageReference>`
:param authentication_token_settings: The settings for an authentication
token that the task can use to perform Batch service operations. If this
property is set, the Batch service provides the task with an
authentication token which can be used to authenticate Batch service
operations without requiring an account access key. The token is provided
via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations
that the task can carry out using the token depend on the settings. For
example, a task can request job permissions in order to add other tasks to
the job, or check the status of the job or of other tasks under the job.
:type authentication_token_settings: :class:`AuthenticationTokenSettings
<azure.batch.models.AuthenticationTokenSettings>`
:param output_files: A list of output file references to up persisted once
the task has completed.
:type output_files: list of :class:`OutputFile
<azext.batch.models.OutputFile>`
:param package_references: A list of packages to be installed on the compute
nodes. Must be of a Package Manager type in accordance with the selected
operating system.
:type package_references: list of :class:`PackageReferenceBase
<azext.batch.models.PackageReferenceBase>`
"""
_validation = {
'command_line': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'command_line': {'key': 'commandLine', 'type': 'str'},
'exit_conditions': {'key': 'exitConditions', 'type': 'ExitConditions'},
'resource_files': {'key': 'resourceFiles', 'type': '[ExtendedResourceFile]'},
'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'},
'affinity_info': {'key': 'affinityInfo', 'type': 'AffinityInformation'},
'constraints': {'key': 'constraints', 'type': 'TaskConstraints'},
'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'},
'depends_on': {'key': 'dependsOn', 'type': 'TaskDependencies'},
'application_package_references': {'key': 'applicationPackageReferences',
'type': '[ApplicationPackageReference]'},
'authentication_token_settings': {'key': 'authenticationTokenSettings',
'type': 'AuthenticationTokenSettings'},
'output_files': {'key': 'outputFiles', 'type': '[OutputFile]'},
'package_references': {'key': 'packageReferences', 'type': '[PackageReferenceBase]'},
}
def __init__(self, **kwargs):
super(MergeTask, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.display_name = kwargs.get('display_name', None)
self.command_line = kwargs.get('command_line')
self.exit_conditions = kwargs.get('exit_conditions', None)
self.resource_files = kwargs.get('resource_files', None)
self.environment_settings = kwargs.get('environment_settings', None)
self.affinity_info = kwargs.get('affinity_info', None)
self.constraints = kwargs.get('constraints', None)
self.user_identity = kwargs.get('user_identity', None)
self.depends_on = kwargs.get('depends_on', None)
self.application_package_references = kwargs.get('application_package_references', None)
self.authentication_token_settings = kwargs.get('authentication_token_settings', None)
self.output_files = kwargs.get('output_files', None)
self.package_references = kwargs.get('package_references', None)
class MultiInstanceSettings(Model):
"""Settings which specify how to run a multi-instance task.
Multi-instance tasks are commonly used to support MPI tasks.
:param number_of_instances: The number of compute nodes required by the
task. If omitted, the default is 1.
:type number_of_instances: int
:param coordination_command_line: The command line to run on all the
compute nodes to enable them to coordinate when the primary runs the main
task command. A typical coordination command line launches a background
service and verifies that the service is ready to process inter-node
messages.
:type coordination_command_line: str
:param common_resource_files: A list of files that the Batch service will
download before running the coordination command line. The difference
between common resource files and task resource files is that common
resource files are downloaded for all subtasks including the primary,
whereas task resource files are downloaded only for the primary. Also note
that these resource files are not downloaded to the task working
directory, but instead are downloaded to the task root directory (one
directory above the working directory).
:type common_resource_files: list of :class:`ExtendedResourceFile
<azext.batch.models.ExtendedResourceFile>`
"""
_validation = {
'coordination_command_line': {'required': True},
}
_attribute_map = {
'number_of_instances': {'key': 'numberOfInstances', 'type': 'int'},
'coordination_command_line': {'key': 'coordinationCommandLine', 'type': 'str'},
'common_resource_files': {'key': 'commonResourceFiles', 'type': '[ExtendedResourceFile]'},
}
def __init__(self, **kwargs):
super(MultiInstanceSettings, self).__init__(**kwargs)
self.number_of_instances = kwargs.get('number_of_instances')
self.coordination_command_line = kwargs.get('coordination_command_line', None)
self.common_resource_files = kwargs.get('common_resource_files', None)
class OutputFile(Model):
"""A specification for uploading files from an Azure Batch node to another
location after the Batch service has finished executing the task process.
:param file_pattern: A pattern indicating which file(s) to upload. Both
relative and absolute paths are supported. Relative paths are relative to
the task working directory. The following wildcards are supported: *
matches 0 or more characters (for example pattern abc* would match abc or
abcdef), ** matches any directory, ? matches any single character, [abc]
matches one character in the brackets, and [a-c] matches one character in
the range. Brackets can include a negation to match any character not
specified (for example [!abc] matches any character but a, b, or c). If a
file name starts with "." it is ignored by default but may be matched by
specifying it explicitly (for example *.gif will not match .a.gif, but
.*.gif will). A simple example: **\\*.txt matches any file that does not
start in '.' and ends with .txt in the task working directory or any
subdirectory. If the filename contains a wildcard character it can be
escaped using brackets (for example abc[*] would match a file named abc*).
Note that both \\ and / are treated as directory separators on Windows,
but only / is on Linux. Environment variables (%var% on Windows or $var on
Linux) are expanded prior to the pattern being applied.
:type file_pattern: str
:param destination: The destination for the output file(s).
:type destination: :class:`ExtendedOutputFileDestination
<azext.batch.models.ExtendedOutputFileDestination>`
:param upload_options: Additional options for the upload operation,
including under what conditions to perform the upload.
:type upload_options: :class:`OutputFileUploadOptions
<azure.batch.models.OutputFileUploadOptions>`
"""
_validation = {
'file_pattern': {'required': True},
'destination': {'required': True},
'upload_options': {'required': True},
}
_attribute_map = {
'file_pattern': {'key': 'filePattern', 'type': 'str'},
'destination': {'key': 'destination', 'type': 'ExtendedOutputFileDestination'},
'upload_options': {'key': 'uploadOptions', 'type': 'OutputFileUploadOptions'},
}
def __init__(self, **kwargs):
super(OutputFile, self).__init__(**kwargs)
self.file_pattern = kwargs.get('file_pattern')
self.destination = kwargs.get('destination')
self.upload_options = kwargs.get('upload_options')
class OutputFileAutoStorageDestination(Model):
"""An speficition of output files upload destination that uses an
auto-storage file group.
:param str file_group: The name of the file group that the output files will
be uploaded to.
:param str path: The destination path within the file group that the files will
be uploaded to. Is the output file specification refers to a single file, this will
be treated as a file name. If the output file specification refers to potentially
multiple files, this will be treated as a subfolder.
"""
_validation = {
'file_group': {'required': True}
}
_attribute_map = {
'file_group': {'key': 'fileGroup', 'type': 'str'},
'path': {'key': 'path', 'type': 'str'},
}
def __init__(self, **kwargs):
super(OutputFileAutoStorageDestination, self).__init__(**kwargs)
self.file_group = kwargs.get('file_group')
self.path = kwargs.get('path', None)
class ParameterSet(Model):
"""A set of parametric sweep range range parameters.
:param int start: The starting value of the sweep.
:param int end: The ending value of the sweep (inclusive).
:param int step: The incremental step value, default is 1. The step value
can be negative (i.e. a decending sweep), but only id the start value is
a higher value than the end.
"""
_validation = {
'start': {'required': True},
'end': {'required': True},
}
_attribute_map = {
'start': {'key': 'start', 'type': 'int'},
'end': {'key': 'end', 'type': 'int'},
'step': {'key': 'step', 'type': 'int'},
}
def __init__(self, **kwargs):
super(ParameterSet, self).__init__(**kwargs)
try:
self.start = int(kwargs.get('start'))
self.end = int(kwargs.get('end'))
self.step = int(kwargs.get('step', 1))
except (TypeError, ValueError):
raise ValueError("'start', 'end' and 'step' parameters must be integers.")
if self.step == 0:
raise ValueError("'step' parameter cannot be 0.")
elif self.start > self.end and self.step > 0:
raise ValueError(
"'step' must be a negative number when 'start' is greater than 'end'")
elif self.start < self.end and self.step < 0:
raise ValueError(
"'step' must be a positive number when 'end' is greater than 'start'")
class ParametricSweepTaskFactory(TaskFactoryBase):
"""A Task Factory for generating a set of tasks based on one or more parameter
sets to define a numeric input range. Each parameter set will have a start, end
and step value. A task will be generated for each integer in this range. Multiple
parameter sets can be combined for a multi-dimensional sweep.
:param parameter_sets: A list if parameter sets from which tasks will be generated.
:type parameter_sets: A list of :class:`ParameterSet<azext.batch.models.ParameterSet>`
:param repeat_task: The task template the will be used to generate each task.
:type repeat_task: :class:`RepeatTask <azext.batch.models.RepeatTask>`
:param merge_task: An optional additional task to be run after all the other
generated tasks have completed successfully.
:type merge_task: :class:`MergeTask <azext.batch.models.MergeTask>`
"""
_validation = {
'type': {'required': True},
'parameter_sets': {'required': True, 'min_items': 1},
'repeat_task': {'required': True}
}
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'parameter_sets': {'key': 'parameterSets', 'type': '[ParameterSet]'},
'repeat_task': {'key': 'repeatTask', 'type': 'RepeatTask'},
'merge_task': {'key': 'mergeTask', 'type': 'MergeTask'}
}
def __init__(self, **kwargs):
super(ParametricSweepTaskFactory, self).__init__(**kwargs)
self.parameter_sets = kwargs.get('parameter_sets', None)
self.repeat_task = kwargs.get('repeat_task', None)
self.type = 'parametricSweep'
if not self.parameter_sets:
raise ValueError("Parametric Sweep task factory requires at least one parameter set.")
class PoolTemplate(Model):
"""A Pool Template.
:ivar type: The type of object described by the template. Must be:
"Microsoft.Batch/batchAccounts/pools"
:type type: str
:param api_version: The API version that the template conforms to.
:type api_version: str
:param properties: The specificaton of the pool.
:type properties: :class:`ExtendedPoolParameter<azext.batch.models.ExtendedPoolParameter>`
"""
_validation = {
'type': {'required': True, 'constant': True},
'properties': {'required': True},
}
_attribute_map = {
'type': {'key': 'id', 'type': 'str'},
'api_version': {'key': 'apiVersion', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'ExtendedPoolParameter'},
}
type = "Microsoft.Batch/batchAccounts/pools"
def __init__(self, **kwargs):
super(PoolTemplate, self).__init__(**kwargs)
self.properties = kwargs.get('properties')
self.api_version = kwargs.get('api_version', None)
class RepeatTask(Model):
"""An Azure Batch task template to repeat.
:param display_name: A display name for the task. The display name need
not be unique and can contain any Unicode characters up to a maximum
length of 1024.
:type display_name: str
:param command_line: The command line of the task.
:type command_line: str
:param container_settings: The settings for the container under which the
task runs. If the pool that will run this task has containerConfiguration
set, this must be set as well. If the pool that will run this task doesn't
have containerConfiguration set, this must not be set. When this is
specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR
(the root of Azure Batch directories on the node) are mapped into the
container, all task environment variables are mapped into the container,
and the task command line is executed in the container.
:type container_settings: :class:`TaskContainerSettings
<azure.batch.models.TaskContainerSettings>`
:param exit_conditions: How the Batch service should respond when the task
completes.
:type exit_conditions: :class:`ExitConditions
<azure.batch.models.ExitConditions>`
:param resource_files: A list of files that the Batch service will
download to the compute node before running the command line.
:type resource_files: list of :class:`ExtendedResourceFile
<azext.batch.models.ExtendedResourceFile>`
:param environment_settings: A list of environment variable settings for
the task.
:type environment_settings: list of :class:`EnvironmentSetting
<azure.batch.models.EnvironmentSetting>`
:param affinity_info: A locality hint that can be used by the Batch
service to select a compute node on which to start the new task.
:type affinity_info: :class:`AffinityInformation
<azure.batch.models.AffinityInformation>`
:param constraints: The execution constraints that apply to this task. If
you do not specify constraints, the maxTaskRetryCount is the
maxTaskRetryCount specified for the job, and the maxWallClockTime and
retentionTime are infinite.
:type constraints: :class:`TaskConstraints
<azure.batch.models.TaskConstraints>`
:param user_identity: The user identity under which the task runs. If
omitted, the task runs as a non-administrative user unique to the task.
:type user_identity: :class:`UserIdentity
<azure.batch.models.UserIdentity>`
:param application_package_references: A list of application packages that
the Batch service will deploy to the compute node before running the
command line.
:type application_package_references: list of
:class:`ApplicationPackageReference
<azure.batch.models.ApplicationPackageReference>`
:param authentication_token_settings: The settings for an authentication
token that the task can use to perform Batch service operations. If this
property is set, the Batch service provides the task with an
authentication token which can be used to authenticate Batch service
operations without requiring an account access key. The token is provided
via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations
that the task can carry out using the token depend on the settings. For
example, a task can request job permissions in order to add other tasks to
the job, or check the status of the job or of other tasks under the job.
:type authentication_token_settings: :class:`AuthenticationTokenSettings
<azure.batch.models.AuthenticationTokenSettings>`
:param output_files: A list of output file references to up persisted once
the task has completed.
:type output_files: list of :class:`OutputFile
<azext.batch.models.OutputFile>`
:param package_references: A list of packages to be installed on the compute
nodes. Must be of a Package Manager type in accordance with the selected
operating system.
:type package_references: list of :class:`PackageReferenceBase
<azext.batch.models.PackageReferenceBase>`
"""
_validation = {
'command_line': {'required': True},
}
_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'command_line': {'key': 'commandLine', 'type': 'str'},
'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'},
'exit_conditions': {'key': 'exitConditions', 'type': 'ExitConditions'},
'resource_files': {'key': 'resourceFiles', 'type': '[ExtendedResourceFile]'},
'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'},
'affinity_info': {'key': 'affinityInfo', 'type': 'AffinityInformation'},
'constraints': {'key': 'constraints', 'type': 'TaskConstraints'},
'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'},
'application_package_references': {'key': 'applicationPackageReferences',
'type': '[ApplicationPackageReference]'},
'authentication_token_settings': {'key': 'authenticationTokenSettings',
'type': 'AuthenticationTokenSettings'},
'output_files': {'key': 'outputFiles', 'type': '[OutputFile]'},
'package_references': {'key': 'packageReferences', 'type': '[PackageReferenceBase]'}
}
def __init__(self, **kwargs):
super(RepeatTask, self).__init__(**kwargs)
self.display_name = kwargs.get('display_name')
self.command_line = kwargs.get('command_line', None)
self.exit_conditions = kwargs.get('exit_conditions', None)
self.resource_files = kwargs.get('resource_files', None)
self.environment_settings = kwargs.get('environment_settings', None)
self.affinity_info = kwargs.get('affinity_info', None)
self.constraints = kwargs.get('constraints', None)
self.user_identity = kwargs.get('user_identity', None)
self.application_package_references = kwargs.get('application_package_references', None)
self.authentication_token_settings = kwargs.get('authentication_token_settings', None)
self.output_files = kwargs.get('output_files', None)
self.package_references = kwargs.get('package_references', None)
class StartTask(Model):
"""A task which is run when a compute node joins a pool in the Azure Batch
service, or when the compute node is rebooted or reimaged.
:param command_line: The command line of the start task. The command line
does not run under a shell, and therefore cannot take advantage of shell
features such as environment variable expansion. If you want to take
advantage of such features, you should invoke the shell in the command
line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c
MyCommand" in Linux.
:type command_line: str
:param container_settings: The settings for the container under which the
start task runs. When this is specified, all directories recursively below
the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the
node) are mapped into the container, all task environment variables are
mapped into the container, and the task command line is executed in the
container.
:type container_settings: :class:`TaskContainerSettings
<azure.batch.models.TaskContainerSettings>`
:param resource_files: A list of files that the Batch service will
download to the compute node before running the command line. Files listed
under this element are located in the task's working directory.
:type resource_files: list of :class:`ExtendedResourceFile
<azext.batch.models.ExtendedResourceFile>`
:param environment_settings: A list of environment variable settings for
the start task.
:type environment_settings: list of :class:`EnvironmentSetting
<azure.batch.models.EnvironmentSetting>`
:param user_identity: The user identity under which the start task runs.
If omitted, the task runs as a non-administrative user unique to the task.
:type user_identity: :class:`UserIdentity
<azure.batch.models.UserIdentity>`
:param max_task_retry_count: The maximum number of times the task may be
retried. The Batch service retries a task if its exit code is nonzero.
Note that this value specifically controls the number of retries. The
Batch service will try the task once, and may then retry up to this limit.
For example, if the maximum retry count is 3, Batch tries the task up to 4
times (one initial try and 3 retries). If the maximum retry count is 0,
the Batch service does not retry the task. If the maximum retry count is
-1, the Batch service retries the task without limit.
:type max_task_retry_count: int
:param wait_for_success: Whether the Batch service should wait for the
start task to complete successfully (that is, to exit with exit code 0)
before scheduling any tasks on the compute node. If true and the start
task fails on a compute node, the Batch service retries the start task up
to its maximum retry count (maxTaskRetryCount). If the task has still not
completed successfully after all retries, then the Batch service marks the
compute node unusable, and will not schedule tasks to it. This condition
can be detected via the node state and failure info details. If false, the
Batch service will not wait for the start task to complete. In this case,
other tasks can start executing on the compute node while the start task
is still running; and even if the start task fails, new tasks will
continue to be scheduled on the node. The default is false.
:type wait_for_success: bool
"""
_validation = {
'command_line': {'required': True},
}
_attribute_map = {
'command_line': {'key': 'commandLine', 'type': 'str'},
'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'},
'resource_files': {'key': 'resourceFiles', 'type': '[ExtendedResourceFile]'},
'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'},
'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'},
'max_task_retry_count': {'key': 'maxTaskRetryCount', 'type': 'int'},
'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'},
}
def __init__(self, **kwargs):
super(StartTask, self).__init__(**kwargs)
self.command_line = kwargs.get('command_line')
self.container_settings = kwargs.get('container_settings', None)
self.resource_files = kwargs.get('resource_files', None)
self.environment_settings = kwargs.get('environment_settings', None)
self.user_identity = kwargs.get('user_identity', None)
self.max_task_retry_count = kwargs.get('max_task_retry_count', None)
self.wait_for_success = kwargs.get('wait_for_success', None)
class TaskCollectionTaskFactory(TaskFactoryBase):
"""A Task Factory for adding a predefined collection of tasks automatically
to a job on submission.
:param tasks: A list if task parameters, each of which will be added straight to the job.
:type tasks: A list of :class:`ExtendedTaskParameter
<azext.batch.models.ExtendedTaskParameter>`
"""
_validation = {
'type': {'required': True},
'tasks': {'required': True},
}
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'tasks': {'key': 'tasks', 'type': '[ExtendedTaskParameter]'},
}
def __init__(self, **kwargs):
super(TaskCollectionTaskFactory, self).__init__(**kwargs)
self.tasks = kwargs.get('tasks')
self.type = 'taskCollection'
class YumPackageReference(PackageReferenceBase):
"""A reference to a package to be installed using the YUM package
manager on a Linux node.
:param str id: The name of the package.
:param str version: The version of the package to be installed. If omitted,
the latest version (according to the package repository) will be installed.
:param bool disable_excludes: Whether to allow packages that might otherwise
be excluded by VM configuration (e.g. kernel packages). Default is False.
"""
_validation = {
'type': {'required': True},
'id': {'required': True},
}
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'version': {'key': 'version', 'type': 'str'},
'disable_excludes': {'key': 'disableExcludes', 'type': 'bool'}
}
def __init__(self, **kwargs):
super(YumPackageReference, self).__init__(**kwargs)
self.id = kwargs.get('id')
self.version = kwargs.get('version', None)
self.disable = kwargs.get('disable', None)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
2683,
2683,
2683,
2683,
2683,
1378,
5634,
13,
29937,
14187,
1266,
313,
29883,
29897,
7783,
15025,
29889,
2178,
10462,
21676,
29889,
13,
29937,
10413,
21144,
1090,
278,
341,
1806,
19245,
29889,
2823,
19245,
29889,
3945,
297,
278,
2060,
3876,
363,
19405,
2472,
29889,
13,
29937,
448,
2683,
2683,
2683,
2683,
2683,
1378,
5634,
13,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
517,
29877,
29899,
13011,
29899,
9012,
13,
13,
5215,
2897,
13,
5215,
15699,
29889,
16175,
29889,
9794,
408,
4733,
13,
3166,
10887,
5060,
29889,
15550,
2133,
1053,
8125,
13,
3166,
869,
3075,
1934,
1053,
15531,
5659,
29903,
29918,
1525,
6304,
29963,
3352,
29918,
22051,
29918,
4330,
3580,
29931,
1299,
2890,
13,
13,
13,
1990,
9330,
5126,
5160,
29898,
3195,
1125,
13,
1678,
9995,
29909,
9330,
27561,
363,
6336,
4417,
263,
4333,
310,
9595,
304,
263,
4982,
373,
13,
1678,
29240,
29889,
13,
13,
1678,
584,
3207,
10366,
29918,
7662,
29901,
530,
13136,
5684,
3414,
304,
367,
1065,
1156,
599,
278,
916,
13,
268,
5759,
9595,
505,
8676,
8472,
29889,
13,
1678,
584,
1853,
10366,
29918,
7662,
29901,
584,
1990,
18078,
15836,
479,
5398,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
15836,
479,
5398,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
1989,
2396,
525,
1853,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
14634,
29918,
7662,
2396,
11117,
1989,
2396,
525,
14634,
5398,
742,
525,
1853,
2396,
525,
15836,
479,
5398,
10827,
13,
1678,
500,
13,
13,
1678,
903,
1491,
1853,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
3207,
300,
2200,
29903,
705,
1022,
2396,
525,
4736,
300,
2200,
29903,
705,
1022,
5398,
5126,
742,
13,
462,
525,
7662,
5894,
2283,
2396,
525,
2283,
7196,
5398,
5126,
742,
13,
462,
525,
7662,
7196,
2396,
525,
5398,
7196,
5398,
5126,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
5398,
5126,
5160,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
14634,
29918,
7662,
353,
9049,
5085,
29889,
657,
877,
14634,
29918,
7662,
742,
6213,
29897,
13,
4706,
1583,
29889,
1853,
353,
6213,
13,
13,
13,
1990,
22029,
7422,
5160,
29898,
3195,
1125,
13,
1678,
9995,
29909,
3407,
304,
263,
3577,
304,
367,
5130,
373,
278,
10272,
7573,
773,
13,
1678,
263,
3577,
8455,
29889,
13,
13,
1678,
584,
3207,
851,
1178,
29901,
450,
1024,
310,
278,
3577,
29889,
13,
1678,
584,
3207,
851,
1873,
29901,
450,
1873,
310,
278,
3577,
304,
367,
5130,
29889,
960,
25811,
29892,
13,
268,
278,
9281,
1873,
313,
5753,
3278,
304,
278,
3577,
9810,
29897,
674,
367,
5130,
29889,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
333,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
1989,
2396,
525,
1853,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
333,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
3259,
2396,
11117,
1989,
2396,
525,
3259,
742,
525,
1853,
2396,
525,
710,
16675,
13,
1678,
500,
13,
13,
1678,
903,
1491,
1853,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
2156,
14459,
2396,
525,
29909,
415,
14459,
7422,
742,
13,
462,
525,
305,
542,
23167,
29891,
14459,
2396,
525,
1451,
542,
23167,
29891,
14459,
7422,
742,
13,
462,
525,
29891,
398,
14459,
2396,
525,
29979,
398,
14459,
7422,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
14459,
7422,
5160,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
1853,
353,
6213,
13,
4706,
1583,
29889,
333,
353,
9049,
5085,
29889,
657,
877,
333,
1495,
13,
4706,
1583,
29889,
3259,
353,
9049,
5085,
29889,
657,
877,
3259,
742,
6213,
29897,
13,
13,
13,
1990,
8427,
6733,
29898,
3195,
1125,
13,
1678,
9995,
2744,
12634,
350,
905,
8427,
25663,
29889,
13,
13,
1678,
584,
3207,
4982,
29918,
12847,
29918,
7662,
29901,
25577,
310,
263,
17163,
15629,
3414,
304,
367,
15241,
746,
13,
268,
278,
4982,
338,
4687,
29889,
960,
278,
4982,
947,
451,
6084,
263,
17163,
15629,
3414,
29892,
278,
13,
268,
1404,
1818,
9479,
788,
9595,
304,
278,
4982,
29889,
960,
278,
4982,
947,
6084,
263,
17163,
13,
268,
15629,
3414,
29892,
278,
350,
905,
2669,
10017,
278,
17163,
15629,
3414,
746,
278,
4982,
13,
268,
338,
2825,
29892,
322,
674,
1018,
304,
20410,
278,
17163,
15629,
3414,
1434,
13,
268,
28598,
19478,
916,
9595,
297,
278,
4982,
29889,
450,
17163,
15629,
3414,
29915,
29879,
15662,
6437,
13,
268,
338,
304,
2761,
322,
29914,
272,
11819,
4982,
8225,
29892,
363,
1342,
491,
1602,
4821,
825,
13,
268,
5684,
9595,
304,
1065,
29892,
3683,
2827,
746,
278,
664,
338,
4866,
29892,
2992,
29889,
13,
268,
313,
17245,
29892,
263,
17163,
15629,
3414,
338,
451,
22078,
304,
1438,
14188,
448,
372,
338,
13,
268,
263,
8072,
29899,
29888,
839,
3192,
3414,
297,
278,
1788,
322,
2189,
6514,
8820,
526,
13,
268,
3734,
363,
278,
4982,
1846,
1152,
1342,
29892,
263,
17163,
15629,
3414,
1795,
5142,
263,
13,
268,
934,
6790,
408,
263,
3443,
29892,
27599,
278,
8118,
310,
393,
934,
322,
13,
268,
9752,
5684,
9595,
2729,
373,
1906,
8118,
29889,
13,
1678,
584,
1853,
4982,
29918,
12847,
29918,
7662,
29901,
584,
1990,
18078,
11947,
3260,
5398,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
11947,
3260,
5398,
13885,
13,
1678,
584,
3207,
4982,
29918,
1457,
862,
362,
29918,
7662,
29901,
450,
17163,
4721,
862,
362,
3414,
29889,
960,
263,
4982,
756,
263,
17163,
13,
268,
4721,
862,
362,
3414,
29892,
278,
350,
905,
2669,
674,
1065,
278,
17163,
4721,
862,
362,
3414,
373,
263,
13,
268,
10272,
2943,
1434,
6257,
738,
9595,
310,
393,
4982,
373,
393,
10272,
2943,
29889,
13,
1678,
584,
1853,
4982,
29918,
1457,
862,
362,
29918,
7662,
29901,
584,
1990,
18078,
11947,
6572,
862,
362,
5398,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
11947,
6572,
862,
362,
5398,
13885,
13,
1678,
584,
3207,
4982,
29918,
14096,
29918,
7662,
29901,
450,
17163,
23708,
3414,
29889,
319,
17163,
23708,
3414,
2609,
13,
268,
367,
6790,
1728,
884,
22146,
263,
17163,
4721,
862,
362,
3414,
363,
278,
4982,
29889,
13,
268,
450,
350,
905,
2669,
6057,
278,
17163,
23708,
3414,
373,
278,
10272,
7573,
393,
505,
13,
268,
1065,
278,
17163,
4721,
862,
362,
3414,
29889,
450,
7601,
6437,
310,
278,
17163,
23708,
3414,
13,
268,
338,
304,
563,
29877,
3620,
304,
10272,
7573,
1754,
491,
278,
17163,
4721,
862,
362,
3414,
29889,
13,
268,
8741,
14188,
3160,
21228,
1887,
2066,
29892,
470,
12522,
1259,
1623,
5786,
13,
268,
393,
892,
4687,
408,
760,
310,
4982,
10223,
362,
29889,
13,
1678,
584,
1853,
4982,
29918,
14096,
29918,
7662,
29901,
584,
1990,
18078,
11947,
19729,
5398,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
11947,
19729,
5398,
13885,
13,
1678,
584,
3207,
3619,
29918,
20944,
29918,
11027,
29901,
450,
1051,
310,
3619,
5177,
13,
268,
2286,
6055,
29889,
4525,
5177,
3651,
526,
731,
363,
599,
9595,
297,
13,
268,
278,
4982,
313,
18271,
278,
17163,
15629,
29892,
17163,
4721,
862,
362,
322,
17163,
23708,
13,
268,
9595,
467,
1894,
23352,
9595,
508,
5712,
385,
5177,
4444,
6790,
13,
268,
1244,
491,
22146,
278,
1021,
4444,
1024,
411,
263,
1422,
995,
29889,
13,
1678,
584,
1853,
3619,
29918,
20944,
29918,
11027,
29901,
1051,
310,
584,
1990,
18078,
18649,
29020,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18649,
29020,
13885,
13,
1678,
584,
3207,
373,
29918,
497,
29918,
20673,
29918,
8835,
29901,
450,
3158,
278,
350,
905,
2669,
881,
2125,
13,
268,
746,
599,
9595,
297,
278,
4982,
526,
297,
278,
8676,
2106,
29889,
3940,
393,
565,
263,
4982,
13,
268,
3743,
694,
9595,
29892,
769,
599,
9595,
526,
5545,
4866,
29889,
910,
2984,
338,
13,
268,
5480,
1556,
15574,
1304,
411,
263,
17163,
15629,
3414,
29936,
565,
366,
864,
304,
671,
13,
268,
18428,
4982,
1840,
3381,
1728,
263,
17163,
15629,
29892,
366,
881,
12919,
731,
13,
268,
373,
3596,
26249,
17813,
304,
694,
4276,
322,
2767,
278,
4982,
4426,
304,
731,
13,
268,
373,
3596,
26249,
17813,
304,
29504,
11947,
2748,
366,
505,
7743,
4417,
9595,
29889,
13,
268,
20894,
4430,
1819,
526,
29901,
694,
4276,
448,
437,
3078,
29889,
450,
4982,
9242,
6136,
6521,
13,
268,
29185,
470,
12708,
491,
777,
916,
2794,
29889,
29504,
11947,
448,
29504,
278,
13,
268,
4982,
29889,
450,
4982,
29915,
29879,
29504,
1123,
1658,
338,
731,
304,
525,
3596,
26249,
17813,
4286,
450,
2322,
13,
268,
338,
694,
4276,
29889,
20049,
1819,
3160,
29901,
525,
1217,
4276,
742,
525,
18821,
403,
11947,
29915,
13,
1678,
584,
1853,
373,
29918,
497,
29918,
20673,
29918,
8835,
29901,
851,
470,
584,
1990,
18078,
2951,
3596,
26249,
17813,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2951,
3596,
26249,
17813,
13885,
13,
1678,
584,
3207,
373,
29918,
7662,
29918,
14057,
545,
29901,
450,
3158,
278,
350,
905,
2669,
881,
2125,
746,
738,
13,
268,
3414,
297,
278,
4982,
8465,
29889,
319,
3414,
338,
5545,
304,
505,
5229,
565,
756,
263,
13,
268,
10672,
3401,
29889,
319,
10672,
3401,
338,
731,
565,
278,
3414,
1614,
2167,
411,
263,
1661,
29899,
9171,
13,
268,
6876,
775,
1156,
27096,
292,
967,
337,
2202,
2302,
29892,
470,
565,
727,
471,
385,
1059,
13,
268,
6257,
278,
3414,
29892,
363,
1342,
2861,
304,
263,
6503,
934,
5142,
1059,
29889,
13,
268,
694,
4276,
448,
437,
3078,
29889,
2189,
24365,
5856,
11947,
4276,
448,
2125,
278,
3158,
13,
268,
6942,
411,
278,
3414,
6876,
4195,
297,
278,
3414,
29915,
29879,
6876,
10983,
2187,
13,
268,
4333,
29889,
313,
4013,
1122,
1603,
1121,
297,
694,
3158,
1641,
4586,
29892,
565,
393,
338,
13,
268,
825,
278,
3414,
1580,
11057,
1846,
450,
2322,
338,
694,
4276,
29889,
20049,
1819,
13,
268,
3160,
29901,
525,
1217,
4276,
742,
525,
19826,
24365,
5856,
11947,
4276,
29915,
13,
1678,
584,
1853,
373,
29918,
7662,
29918,
14057,
545,
29901,
851,
470,
584,
1990,
18078,
2951,
5398,
24155,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2951,
5398,
24155,
13885,
13,
1678,
584,
3207,
15562,
29901,
319,
1051,
310,
1024,
29899,
1767,
11000,
6942,
411,
278,
4982,
408,
13,
268,
15562,
29889,
450,
350,
905,
2669,
947,
451,
3566,
738,
6593,
304,
15562,
29936,
372,
338,
13,
268,
14419,
368,
363,
278,
671,
310,
1404,
775,
29889,
13,
1678,
584,
1853,
15562,
29901,
1051,
310,
584,
1990,
18078,
18417,
2001,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18417,
2001,
13885,
13,
1678,
584,
3207,
3913,
29918,
7662,
29918,
22594,
29901,
26460,
9595,
297,
278,
4982,
508,
4529,
13,
268,
9962,
373,
1269,
916,
29889,
450,
2322,
338,
2089,
29889,
13,
1678,
584,
1853,
3913,
29918,
7662,
29918,
22594,
29901,
6120,
13,
1678,
584,
3207,
3414,
29918,
14399,
29901,
319,
3414,
12529,
3407,
304,
6336,
5706,
263,
731,
310,
13,
268,
9595,
304,
367,
2715,
304,
278,
4982,
29889,
13,
1678,
584,
1853,
3414,
29918,
14399,
29901,
584,
1990,
18078,
5398,
5126,
5160,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5398,
5126,
5160,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
9057,
29918,
12847,
29918,
7662,
2396,
11117,
1989,
2396,
525,
9057,
3260,
5398,
742,
525,
1853,
2396,
525,
11947,
3260,
5398,
16675,
13,
4706,
525,
9057,
29918,
1457,
862,
362,
29918,
7662,
2396,
11117,
1989,
2396,
525,
9057,
6572,
862,
362,
5398,
742,
525,
1853,
2396,
525,
11947,
6572,
862,
362,
5398,
16675,
13,
4706,
525,
9057,
29918,
14096,
29918,
7662,
2396,
11117,
1989,
2396,
525,
9057,
19729,
5398,
742,
525,
1853,
2396,
525,
11947,
19729,
5398,
16675,
13,
4706,
525,
9435,
29918,
20944,
29918,
11027,
2396,
11117,
1989,
2396,
525,
9435,
18649,
9585,
742,
525,
1853,
2396,
525,
29961,
18649,
29020,
29962,
16675,
13,
4706,
525,
265,
29918,
497,
29918,
20673,
29918,
8835,
2396,
11117,
1989,
2396,
525,
265,
3596,
26249,
17813,
742,
525,
1853,
2396,
525,
2951,
3596,
26249,
17813,
16675,
13,
4706,
525,
265,
29918,
7662,
29918,
14057,
545,
2396,
11117,
1989,
2396,
525,
265,
5398,
24155,
742,
525,
1853,
2396,
525,
2951,
5398,
24155,
16675,
13,
4706,
525,
19635,
2396,
11117,
1989,
2396,
525,
19635,
742,
525,
1853,
2396,
525,
29961,
18417,
2001,
29962,
16675,
13,
4706,
525,
6394,
29918,
7662,
29918,
22594,
2396,
11117,
1989,
2396,
525,
6394,
5398,
8498,
7158,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
4706,
525,
7662,
29918,
14399,
2396,
11117,
1989,
2396,
525,
7662,
5126,
742,
525,
1853,
2396,
525,
5398,
5126,
5160,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
4873,
6733,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
9057,
29918,
12847,
29918,
7662,
353,
9049,
5085,
29889,
657,
877,
9057,
29918,
12847,
29918,
7662,
742,
6213,
29897,
13,
4706,
1583,
29889,
9057,
29918,
1457,
862,
362,
29918,
7662,
353,
9049,
5085,
29889,
657,
877,
9057,
29918,
1457,
862,
362,
29918,
7662,
742,
6213,
29897,
13,
4706,
1583,
29889,
9057,
29918,
14096,
29918,
7662,
353,
9049,
5085,
29889,
657,
877,
9057,
29918,
14096,
29918,
7662,
742,
6213,
29897,
13,
4706,
1583,
29889,
9435,
29918,
20944,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
9435,
29918,
20944,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
265,
29918,
497,
29918,
20673,
29918,
8835,
353,
9049,
5085,
29889,
657,
877,
265,
29918,
497,
29918,
20673,
29918,
8835,
742,
6213,
29897,
13,
4706,
1583,
29889,
265,
29918,
7662,
29918,
14057,
545,
353,
9049,
5085,
29889,
657,
877,
265,
29918,
7662,
29918,
14057,
545,
742,
6213,
29897,
13,
4706,
1583,
29889,
19635,
353,
9049,
5085,
29889,
657,
877,
19635,
742,
6213,
29897,
13,
4706,
1583,
29889,
6394,
29918,
7662,
29918,
22594,
353,
9049,
5085,
29889,
657,
877,
6394,
29918,
7662,
29918,
22594,
742,
6213,
29897,
13,
4706,
1583,
29889,
7662,
29918,
14399,
353,
9049,
5085,
29889,
657,
877,
7662,
29918,
14399,
742,
6213,
29897,
13,
13,
13,
1990,
8427,
6733,
3401,
29898,
3195,
1125,
13,
1678,
9995,
29909,
3407,
304,
385,
12634,
350,
905,
8427,
25663,
29889,
13,
13,
1678,
584,
3207,
851,
934,
29918,
2084,
29901,
450,
2224,
304,
385,
2280,
4472,
934,
29889,
910,
508,
13,
268,
367,
263,
2989,
2224,
29892,
470,
6198,
304,
278,
1857,
1985,
3884,
29889,
20360,
13,
268,
263,
6198,
3884,
508,
367,
19056,
411,
278,
525,
3784,
29918,
12322,
29915,
2980,
29889,
13,
268,
319,
7865,
2392,
674,
367,
10425,
565,
278,
19056,
934,
2224,
2609,
367,
1476,
29889,
13,
1678,
584,
3207,
9657,
4128,
29901,
319,
9657,
706,
310,
3443,
2983,
322,
1819,
304,
367,
13,
268,
12059,
277,
3860,
964,
278,
2280,
4472,
29889,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1445,
29918,
2084,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1445,
29918,
2084,
2396,
11117,
1989,
2396,
525,
1445,
2605,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
16744,
2396,
11117,
1989,
2396,
525,
16744,
742,
525,
1853,
2396,
525,
3318,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
4873,
6733,
3401,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
1445,
29918,
2084,
353,
9049,
5085,
29889,
657,
877,
1445,
29918,
2084,
742,
6213,
29897,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
275,
1445,
29898,
1311,
29889,
1445,
29918,
2084,
1125,
13,
9651,
1857,
29918,
12322,
353,
9049,
5085,
29889,
657,
877,
3784,
29918,
12322,
742,
11393,
1159,
13,
9651,
1583,
29889,
1445,
29918,
2084,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3784,
29918,
12322,
29892,
851,
29898,
1311,
29889,
1445,
29918,
2084,
4961,
13,
4706,
1583,
29889,
16744,
353,
9049,
5085,
29889,
657,
877,
16744,
742,
6213,
29897,
13,
13,
4706,
396,
27308,
29901,
25663,
934,
1818,
1863,
13,
4706,
396,
313,
4806,
437,
445,
297,
1797,
304,
2367,
263,
1781,
652,
21780,
297,
278,
1556,
3619,
1206,
29892,
13797,
393,
445,
338,
13,
4706,
396,
5722,
1711,
263,
8175,
4195,
1363,
4856,
1033,
5217,
278,
934,
1546,
1749,
1423,
1244,
322,
13,
4706,
396,
5183,
278,
934,
2678,
373,
29889,
1334,
2149,
1316,
4251,
304,
367,
10812,
1846,
13,
4706,
1018,
29901,
13,
9651,
411,
1722,
29898,
1311,
29889,
1445,
29918,
2084,
29892,
525,
29878,
29374,
13,
18884,
1209,
13,
4706,
5174,
16738,
2392,
408,
1059,
29901,
13,
9651,
12020,
7865,
2392,
703,
2525,
519,
304,
1303,
278,
4472,
525,
8875,
2396,
6571,
1642,
4830,
29898,
1311,
29889,
1445,
29918,
2084,
29892,
1059,
876,
13,
13,
13,
1990,
319,
415,
14459,
7422,
29898,
14459,
7422,
5160,
1125,
13,
1678,
9995,
29909,
3407,
304,
263,
3577,
304,
367,
5130,
773,
278,
319,
7982,
3577,
13,
1678,
8455,
373,
263,
8074,
2943,
313,
2156,
29899,
657,
467,
13,
13,
1678,
584,
3207,
851,
1178,
29901,
450,
1024,
310,
278,
3577,
29889,
13,
1678,
584,
3207,
851,
1873,
29901,
450,
1873,
310,
278,
3577,
304,
367,
5130,
29889,
960,
25811,
29892,
13,
268,
278,
9281,
1873,
313,
5753,
3278,
304,
278,
3577,
9810,
29897,
674,
367,
5130,
29889,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
333,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
1989,
2396,
525,
1853,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
333,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
3259,
2396,
11117,
1989,
2396,
525,
3259,
742,
525,
1853,
2396,
525,
710,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
29909,
415,
14459,
7422,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
1853,
353,
525,
2156,
14459,
29915,
13,
13,
13,
1990,
11133,
11426,
10299,
2450,
29898,
3195,
1125,
13,
1678,
9995,
10299,
11057,
21862,
363,
263,
13201,
525,
6921,
11565,
4286,
450,
350,
905,
2669,
13,
1678,
674,
1653,
445,
4469,
11565,
746,
278,
4982,
338,
18397,
29889,
13,
13,
1678,
584,
3207,
4469,
29918,
10109,
29918,
333,
29918,
13506,
29901,
319,
10944,
304,
367,
2715,
304,
278,
5412,
15882,
13,
268,
746,
263,
11565,
338,
6336,
2825,
29889,
450,
350,
905,
2669,
3566,
29879,
1269,
4469,
13,
268,
11565,
263,
5412,
15882,
373,
11265,
29889,
1763,
20820,
1546,
772,
3775,
2825,
13,
268,
363,
1422,
11976,
29892,
366,
508,
6084,
445,
1543,
304,
788,
263,
10944,
304,
13,
268,
278,
3553,
393,
338,
9859,
29889,
450,
10944,
508,
367,
701,
304,
29871,
29906,
29900,
4890,
1472,
29889,
13,
1678,
584,
1853,
4469,
29918,
10109,
29918,
333,
29918,
13506,
29901,
851,
13,
1678,
584,
3207,
11565,
29918,
29880,
361,
5410,
29918,
3385,
29901,
450,
9212,
25423,
310,
2825,
4469,
772,
3775,
29892,
13,
268,
322,
920,
2999,
17643,
373,
263,
20410,
526,
9859,
304,
772,
3775,
29889,
1932,
278,
11565,
13,
268,
25423,
338,
4982,
4504,
11272,
278,
11565,
4864,
363,
278,
25423,
310,
278,
4982,
13,
268,
20410,
29889,
450,
350,
905,
6692,
10017,
278,
11565,
746,
372,
10017,
278,
937,
4982,
13,
268,
373,
278,
20410,
29889,
887,
1122,
3394,
445,
2984,
871,
304,
4982,
28598,
2540,
29892,
451,
304,
13,
268,
17643,
29889,
1932,
278,
11565,
25423,
338,
4982,
278,
11565,
4864,
363,
278,
25423,
310,
13,
268,
278,
4982,
304,
607,
372,
338,
16955,
29889,
450,
350,
905,
2669,
10017,
278,
11565,
746,
13,
268,
372,
10017,
278,
4982,
29889,
960,
278,
525,
9057,
29915,
2984,
338,
7436,
304,
263,
4982,
20410,
29892,
278,
13,
268,
350,
905,
2669,
10017,
263,
716,
4469,
11565,
363,
1432,
4982,
2825,
373,
278,
13,
268,
20410,
29889,
20049,
1819,
3160,
29901,
525,
9057,
4504,
11272,
742,
525,
9057,
29915,
13,
1678,
584,
1853,
11565,
29918,
29880,
361,
5410,
29918,
3385,
29901,
851,
470,
584,
1990,
18078,
11426,
29931,
361,
5410,
8375,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
11426,
29931,
361,
5410,
8375,
13885,
13,
1678,
584,
3207,
3013,
29918,
284,
573,
29901,
26460,
304,
3013,
385,
4469,
11565,
18758,
1156,
967,
25423,
13,
268,
1518,
2658,
29889,
960,
2089,
29892,
278,
350,
905,
2669,
7374,
267,
278,
11565,
2748,
967,
25423,
13,
268,
313,
294,
10087,
491,
278,
11565,
29931,
361,
5410,
8375,
4444,
29897,
1518,
2658,
29936,
393,
338,
29892,
746,
13,
268,
278,
4982,
470,
4982,
20410,
1614,
2167,
29889,
960,
1565,
29892,
278,
350,
905,
2669,
947,
451,
13,
268,
5217,
278,
11565,
6336,
29889,
739,
338,
701,
304,
278,
1404,
304,
5217,
4469,
772,
3775,
13,
268,
2825,
411,
445,
2984,
29889,
13,
1678,
584,
1853,
3013,
29918,
284,
573,
29901,
6120,
13,
1678,
584,
3207,
11565,
29901,
450,
11565,
21992,
363,
278,
4469,
11565,
29889,
13,
1678,
584,
1853,
11565,
29901,
584,
1990,
18078,
11426,
10299,
2450,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
11426,
10299,
2450,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
10109,
29918,
29880,
361,
5410,
29918,
3385,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
6921,
29918,
10109,
29918,
333,
29918,
13506,
2396,
11117,
1989,
2396,
525,
6921,
11426,
1204,
23095,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
10109,
29918,
29880,
361,
5410,
29918,
3385,
2396,
11117,
1989,
2396,
525,
10109,
29931,
361,
5410,
8375,
742,
525,
1853,
2396,
525,
11426,
29931,
361,
5410,
8375,
16675,
13,
4706,
525,
17462,
29918,
284,
573,
2396,
11117,
1989,
2396,
525,
17462,
29909,
9258,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
4706,
525,
10109,
2396,
11117,
1989,
2396,
525,
10109,
742,
525,
1853,
2396,
525,
5647,
2760,
11426,
10299,
2450,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
12300,
11426,
10299,
2450,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
6921,
29918,
10109,
29918,
333,
29918,
13506,
353,
9049,
5085,
29889,
657,
877,
6921,
29918,
10109,
29918,
333,
29918,
13506,
742,
6213,
29897,
13,
4706,
1583,
29889,
10109,
29918,
29880,
361,
5410,
29918,
3385,
353,
9049,
5085,
29889,
657,
877,
10109,
29918,
29880,
361,
5410,
29918,
3385,
742,
6213,
29897,
13,
4706,
1583,
29889,
17462,
29918,
284,
573,
353,
9049,
5085,
29889,
657,
877,
17462,
29918,
284,
573,
742,
6213,
29897,
13,
4706,
1583,
29889,
10109,
353,
9049,
5085,
29889,
657,
877,
10109,
742,
6213,
29897,
13,
13,
13,
1990,
678,
542,
23167,
29891,
14459,
7422,
29898,
14459,
7422,
5160,
1125,
13,
1678,
9995,
29909,
3407,
304,
263,
3577,
304,
367,
5130,
773,
278,
678,
542,
23167,
29891,
3577,
13,
1678,
8455,
373,
263,
3852,
2943,
29889,
13,
13,
1678,
584,
3207,
851,
1178,
29901,
450,
1024,
310,
278,
3577,
29889,
13,
1678,
584,
3207,
851,
1873,
29901,
450,
1873,
310,
278,
3577,
304,
367,
5130,
29889,
960,
25811,
29892,
13,
268,
278,
9281,
1873,
313,
5753,
3278,
304,
278,
3577,
9810,
29897,
674,
367,
5130,
29889,
13,
1678,
584,
3207,
6120,
2758,
29918,
6310,
29918,
3198,
2083,
29879,
29901,
26460,
678,
542,
23167,
29891,
674,
2601,
9741,
13,
268,
1728,
263,
1423,
2083,
363,
8845,
29889,
13109,
338,
2089,
29889,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
333,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
1989,
2396,
525,
1853,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
333,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
3259,
2396,
11117,
1989,
2396,
525,
3259,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
9536,
29918,
6310,
29918,
3198,
2083,
29879,
2396,
11117,
1989,
2396,
525,
9536,
8915,
5596,
2083,
29879,
742,
525,
1853,
2396,
525,
11227,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
1451,
542,
23167,
29891,
14459,
7422,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
9536,
29918,
6310,
29918,
3198,
2083,
29879,
353,
9049,
5085,
29889,
657,
877,
9536,
29918,
6310,
29918,
3198,
2083,
29879,
742,
6213,
29897,
13,
4706,
1583,
29889,
1853,
353,
525,
305,
542,
23167,
29891,
14459,
29915,
13,
13,
13,
1990,
7338,
2760,
11947,
9329,
29898,
9794,
29889,
11947,
2528,
9329,
1125,
13,
1678,
9995,
2744,
12634,
350,
905,
4982,
304,
788,
29889,
13,
13,
1678,
584,
3207,
1178,
29901,
319,
1347,
393,
20498,
873,
2893,
11057,
278,
4982,
2629,
278,
3633,
29889,
13,
268,
450,
3553,
508,
1712,
738,
10296,
310,
394,
16711,
25099,
4890,
3704,
13,
268,
7498,
561,
575,
322,
23400,
29883,
2361,
29892,
322,
2609,
1712,
901,
1135,
29871,
29953,
29946,
4890,
29889,
450,
13,
268,
3553,
338,
1206,
29899,
4569,
29530,
322,
1206,
29899,
1144,
575,
3321,
313,
5747,
338,
29892,
366,
1122,
451,
505,
1023,
13,
268,
23481,
2629,
385,
3633,
393,
1163,
871,
491,
1206,
467,
13,
1678,
584,
1853,
1178,
29901,
851,
13,
1678,
584,
3207,
2479,
29918,
978,
29901,
450,
2479,
1024,
363,
278,
4982,
29889,
450,
2479,
1024,
817,
13,
268,
451,
367,
5412,
322,
508,
1712,
738,
23862,
4890,
701,
304,
263,
7472,
13,
268,
3309,
310,
29871,
29896,
29900,
29906,
29946,
29889,
13,
1678,
584,
1853,
2479,
29918,
978,
29901,
851,
13,
1678,
584,
3207,
20136,
29901,
450,
20136,
310,
278,
4982,
29889,
22096,
537,
1819,
508,
3464,
515,
13,
268,
448,
29896,
29900,
29900,
29900,
304,
29871,
29896,
29900,
29900,
29900,
29892,
411,
448,
29896,
29900,
29900,
29900,
1641,
278,
19604,
20136,
322,
29871,
29896,
29900,
29900,
29900,
1641,
278,
13,
268,
9939,
20136,
29889,
450,
2322,
995,
338,
29871,
29900,
29889,
13,
1678,
584,
1853,
20136,
29901,
938,
13,
1678,
584,
3207,
11938,
29901,
450,
8225,
11938,
363,
278,
4982,
29889,
13,
1678,
584,
1853,
11938,
29901,
584,
1990,
18078,
11947,
27427,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
11947,
27427,
13885,
13,
1678,
584,
3207,
4982,
29918,
12847,
29918,
7662,
29901,
25577,
310,
263,
17163,
15629,
3414,
304,
367,
15241,
746,
13,
268,
278,
4982,
338,
4687,
29889,
960,
278,
4982,
947,
451,
6084,
263,
17163,
15629,
3414,
29892,
278,
13,
268,
1404,
1818,
9479,
788,
9595,
304,
278,
4982,
29889,
960,
278,
4982,
947,
6084,
263,
17163,
13,
268,
15629,
3414,
29892,
278,
350,
905,
2669,
10017,
278,
17163,
15629,
3414,
746,
278,
4982,
13,
268,
338,
2825,
29892,
322,
674,
1018,
304,
20410,
278,
17163,
15629,
3414,
1434,
13,
268,
28598,
19478,
916,
9595,
297,
278,
4982,
29889,
450,
17163,
15629,
3414,
29915,
29879,
15662,
6437,
13,
268,
338,
304,
2761,
322,
29914,
272,
11819,
4982,
8225,
29892,
363,
1342,
491,
1602,
4821,
825,
13,
268,
5684,
9595,
304,
1065,
29892,
3683,
2827,
746,
278,
664,
338,
4866,
29892,
2992,
29889,
13,
268,
313,
17245,
29892,
263,
17163,
15629,
3414,
338,
451,
22078,
304,
1438,
14188,
448,
372,
338,
13,
268,
263,
8072,
29899,
29888,
839,
3192,
3414,
297,
278,
1788,
322,
2189,
6514,
8820,
526,
13,
268,
3734,
363,
278,
4982,
1846,
1152,
1342,
29892,
263,
17163,
15629,
3414,
1795,
5142,
263,
13,
268,
934,
6790,
408,
263,
3443,
29892,
27599,
278,
8118,
310,
393,
934,
322,
13,
268,
9752,
5684,
9595,
2729,
373,
1906,
8118,
29889,
13,
1678,
584,
1853,
4982,
29918,
12847,
29918,
7662,
29901,
584,
1990,
18078,
11947,
3260,
5398,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
11947,
3260,
5398,
13885,
13,
1678,
584,
3207,
4982,
29918,
1457,
862,
362,
29918,
7662,
29901,
450,
17163,
4721,
862,
362,
3414,
29889,
960,
263,
4982,
756,
263,
17163,
13,
268,
4721,
862,
362,
3414,
29892,
278,
350,
905,
2669,
674,
1065,
278,
17163,
4721,
862,
362,
3414,
373,
263,
13,
268,
10272,
2943,
1434,
6257,
738,
9595,
310,
393,
4982,
373,
393,
10272,
2943,
29889,
13,
1678,
584,
1853,
4982,
29918,
1457,
862,
362,
29918,
7662,
29901,
584,
1990,
18078,
11947,
6572,
862,
362,
5398,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
11947,
6572,
862,
362,
5398,
13885,
13,
1678,
584,
3207,
4982,
29918,
14096,
29918,
7662,
29901,
450,
17163,
23708,
3414,
29889,
319,
17163,
23708,
3414,
2609,
13,
268,
367,
6790,
1728,
884,
22146,
263,
17163,
4721,
862,
362,
3414,
363,
278,
4982,
29889,
13,
268,
450,
350,
905,
2669,
6057,
278,
17163,
23708,
3414,
373,
278,
10272,
7573,
393,
505,
13,
268,
1065,
278,
17163,
4721,
862,
362,
3414,
29889,
450,
7601,
6437,
310,
278,
17163,
23708,
3414,
13,
268,
338,
304,
563,
29877,
3620,
304,
10272,
7573,
1754,
491,
278,
17163,
4721,
862,
362,
3414,
29889,
13,
268,
8741,
14188,
3160,
21228,
1887,
2066,
29892,
470,
12522,
1259,
1623,
5786,
13,
268,
393,
892,
4687,
408,
760,
310,
4982,
10223,
362,
29889,
13,
1678,
584,
1853,
4982,
29918,
14096,
29918,
7662,
29901,
584,
1990,
18078,
11947,
19729,
5398,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
11947,
19729,
5398,
13885,
13,
1678,
584,
3207,
3619,
29918,
20944,
29918,
11027,
29901,
450,
1051,
310,
3619,
5177,
13,
268,
2286,
6055,
29889,
4525,
5177,
3651,
526,
731,
363,
599,
9595,
297,
13,
268,
278,
4982,
313,
18271,
278,
17163,
15629,
29892,
17163,
4721,
862,
362,
322,
17163,
23708,
13,
268,
9595,
467,
1894,
23352,
9595,
508,
5712,
385,
5177,
4444,
6790,
13,
268,
1244,
491,
22146,
278,
1021,
4444,
1024,
411,
263,
1422,
995,
29889,
13,
1678,
584,
1853,
3619,
29918,
20944,
29918,
11027,
29901,
1051,
310,
584,
1990,
18078,
18649,
29020,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18649,
29020,
13885,
13,
1678,
584,
3207,
11565,
29918,
3888,
29901,
450,
11565,
373,
607,
278,
350,
905,
2669,
6057,
278,
4982,
29915,
29879,
13,
268,
9595,
29889,
13,
1678,
584,
1853,
11565,
29918,
3888,
29901,
584,
1990,
18078,
11426,
20350,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
11426,
20350,
13885,
13,
1678,
584,
3207,
373,
29918,
497,
29918,
20673,
29918,
8835,
29901,
450,
3158,
278,
350,
905,
2669,
881,
2125,
13,
268,
746,
599,
9595,
297,
278,
4982,
526,
297,
278,
8676,
2106,
29889,
3940,
393,
565,
263,
4982,
13,
268,
3743,
694,
9595,
29892,
769,
599,
9595,
526,
5545,
4866,
29889,
910,
2984,
338,
13,
268,
5480,
1556,
15574,
1304,
411,
263,
17163,
15629,
3414,
29936,
565,
366,
864,
304,
671,
13,
268,
18428,
4982,
1840,
3381,
1728,
263,
17163,
15629,
29892,
366,
881,
12919,
731,
13,
268,
373,
3596,
26249,
17813,
304,
694,
4276,
322,
2767,
278,
4982,
4426,
304,
731,
13,
268,
373,
3596,
26249,
17813,
304,
29504,
11947,
2748,
366,
505,
7743,
4417,
9595,
29889,
13,
268,
20894,
4430,
1819,
526,
29901,
694,
4276,
448,
437,
3078,
29889,
450,
4982,
9242,
6136,
6521,
13,
268,
29185,
470,
12708,
491,
777,
916,
2794,
29889,
29504,
11947,
448,
29504,
278,
13,
268,
4982,
29889,
450,
4982,
29915,
29879,
29504,
1123,
1658,
338,
731,
304,
525,
3596,
26249,
17813,
4286,
450,
2322,
13,
268,
338,
694,
4276,
29889,
20049,
1819,
3160,
29901,
525,
1217,
4276,
742,
525,
18821,
403,
11947,
29915,
13,
1678,
584,
1853,
373,
29918,
497,
29918,
20673,
29918,
8835,
29901,
851,
470,
584,
1990,
18078,
2951,
3596,
26249,
17813,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2951,
3596,
26249,
17813,
13885,
13,
1678,
584,
3207,
373,
29918,
7662,
29918,
14057,
545,
29901,
450,
3158,
278,
350,
905,
2669,
881,
2125,
746,
738,
13,
268,
3414,
297,
278,
4982,
8465,
29889,
319,
3414,
338,
5545,
304,
505,
5229,
565,
756,
263,
13,
268,
10672,
3401,
29889,
319,
10672,
3401,
338,
731,
565,
278,
3414,
1614,
2167,
411,
263,
1661,
29899,
9171,
13,
268,
6876,
775,
1156,
27096,
292,
967,
337,
2202,
2302,
29892,
470,
565,
727,
471,
385,
1059,
13,
268,
6257,
278,
3414,
29892,
363,
1342,
2861,
304,
263,
6503,
934,
5142,
1059,
29889,
13,
268,
694,
4276,
448,
437,
3078,
29889,
2189,
24365,
5856,
11947,
4276,
448,
2125,
278,
3158,
13,
268,
6942,
411,
278,
3414,
6876,
4195,
297,
278,
3414,
29915,
29879,
6876,
10983,
2187,
13,
268,
4333,
29889,
313,
4013,
1122,
1603,
1121,
297,
694,
3158,
1641,
4586,
29892,
565,
393,
338,
13,
268,
825,
278,
3414,
1580,
11057,
1846,
450,
2322,
338,
694,
4276,
29889,
20049,
1819,
13,
268,
3160,
29901,
525,
1217,
4276,
742,
525,
19826,
24365,
5856,
11947,
4276,
29915,
13,
1678,
584,
1853,
373,
29918,
7662,
29918,
14057,
545,
29901,
851,
470,
584,
1990,
18078,
2951,
5398,
24155,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2951,
5398,
24155,
13885,
13,
1678,
584,
3207,
15562,
29901,
319,
1051,
310,
1024,
29899,
1767,
11000,
6942,
411,
278,
4982,
408,
13,
268,
15562,
29889,
450,
350,
905,
2669,
947,
451,
3566,
738,
6593,
304,
15562,
29936,
372,
338,
13,
268,
14419,
368,
363,
278,
671,
310,
1404,
775,
29889,
13,
1678,
584,
1853,
15562,
29901,
1051,
310,
584,
1990,
18078,
18417,
2001,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18417,
2001,
13885,
13,
1678,
584,
3207,
3913,
29918,
7662,
29918,
22594,
29901,
26460,
9595,
297,
278,
4982,
508,
4529,
13,
268,
9962,
373,
1269,
916,
29889,
450,
2322,
338,
2089,
29889,
13,
1678,
584,
1853,
3913,
29918,
7662,
29918,
22594,
29901,
6120,
13,
1678,
584,
3207,
3414,
29918,
14399,
29901,
319,
3414,
12529,
3407,
304,
6336,
5706,
263,
731,
310,
13,
268,
9595,
304,
367,
2715,
304,
278,
4982,
29889,
13,
1678,
584,
1853,
3414,
29918,
14399,
29901,
584,
1990,
18078,
5398,
5126,
5160,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5398,
5126,
5160,
13885,
13,
1678,
584,
3207,
2280,
29918,
6886,
29918,
3888,
29901,
319,
3407,
304,
385,
2280,
4472,
934,
304,
13,
268,
367,
17832,
304,
4866,
278,
4982,
21992,
29889,
960,
19056,
29892,
278,
1494,
564,
688,
1860,
13,
268,
2609,
884,
367,
19056,
470,
896,
674,
367,
975,
17625,
29901,
525,
9057,
29918,
12847,
29918,
7662,
742,
13,
1678,
525,
9435,
29918,
20944,
29918,
11027,
742,
525,
6394,
29918,
7662,
29918,
22594,
742,
525,
265,
29918,
497,
29918,
20673,
29918,
8835,
742,
13,
1678,
525,
265,
29918,
7662,
29918,
14057,
545,
742,
525,
7662,
29918,
14399,
742,
525,
9057,
29918,
1457,
862,
362,
29918,
7662,
742,
525,
9057,
29918,
14096,
29918,
7662,
4286,
13,
1678,
584,
1853,
2280,
29918,
6886,
29918,
3888,
29901,
584,
1990,
18078,
4873,
6733,
3401,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
4873,
6733,
3401,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
333,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
10109,
29918,
3888,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
333,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
4990,
29918,
978,
2396,
11117,
1989,
2396,
525,
4990,
1170,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
29886,
21766,
2396,
11117,
1989,
2396,
525,
29886,
21766,
742,
525,
1853,
2396,
525,
524,
16675,
13,
4706,
525,
13646,
29879,
2396,
11117,
1989,
2396,
525,
13646,
29879,
742,
525,
1853,
2396,
525,
11947,
27427,
16675,
13,
4706,
525,
9057,
29918,
12847,
29918,
7662,
2396,
11117,
1989,
2396,
525,
9057,
3260,
5398,
742,
525,
1853,
2396,
525,
11947,
3260,
5398,
16675,
13,
4706,
525,
9057,
29918,
1457,
862,
362,
29918,
7662,
2396,
11117,
1989,
2396,
525,
9057,
6572,
862,
362,
5398,
742,
525,
1853,
2396,
525,
11947,
6572,
862,
362,
5398,
16675,
13,
4706,
525,
9057,
29918,
14096,
29918,
7662,
2396,
11117,
1989,
2396,
525,
9057,
19729,
5398,
742,
525,
1853,
2396,
525,
11947,
19729,
5398,
16675,
13,
4706,
525,
9435,
29918,
20944,
29918,
11027,
2396,
11117,
1989,
2396,
525,
9435,
18649,
9585,
742,
525,
1853,
2396,
525,
29961,
18649,
29020,
29962,
16675,
13,
4706,
525,
10109,
29918,
3888,
2396,
11117,
1989,
2396,
525,
10109,
3401,
742,
525,
1853,
2396,
525,
11426,
20350,
16675,
13,
4706,
525,
265,
29918,
497,
29918,
20673,
29918,
8835,
2396,
11117,
1989,
2396,
525,
265,
3596,
26249,
17813,
742,
525,
1853,
2396,
525,
2951,
3596,
26249,
17813,
16675,
13,
4706,
525,
265,
29918,
7662,
29918,
14057,
545,
2396,
11117,
1989,
2396,
525,
265,
5398,
24155,
742,
525,
1853,
2396,
525,
2951,
5398,
24155,
16675,
13,
4706,
525,
19635,
2396,
11117,
1989,
2396,
525,
19635,
742,
525,
1853,
2396,
525,
29961,
18417,
2001,
29962,
16675,
13,
4706,
525,
6394,
29918,
7662,
29918,
22594,
2396,
11117,
1989,
2396,
525,
6394,
5398,
8498,
7158,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
4706,
525,
7662,
29918,
14399,
2396,
11117,
1989,
2396,
525,
7662,
5126,
742,
525,
1853,
2396,
525,
5398,
5126,
5160,
16675,
13,
4706,
525,
6214,
29918,
6886,
29918,
3888,
2396,
11117,
1989,
2396,
525,
6214,
6733,
3401,
742,
525,
1853,
2396,
525,
4873,
6733,
3401,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
5647,
2760,
11947,
9329,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
7662,
29918,
14399,
353,
9049,
5085,
29889,
657,
877,
7662,
29918,
14399,
742,
6213,
29897,
13,
4706,
1583,
29889,
6214,
29918,
6886,
29918,
3888,
353,
9049,
5085,
29889,
657,
877,
6214,
29918,
6886,
29918,
3888,
742,
6213,
29897,
13,
4706,
565,
1583,
29889,
6214,
29918,
6886,
29918,
3888,
29901,
13,
9651,
396,
27308,
29901,
17163,
29879,
1122,
451,
671,
4426,
21676,
363,
4472,
671,
13,
9651,
21676,
353,
518,
29895,
363,
413,
29892,
325,
297,
1583,
17255,
8977,
26914,
7076,
580,
320,
13,
462,
4706,
565,
413,
297,
15531,
5659,
29903,
29918,
1525,
6304,
29963,
3352,
29918,
22051,
29918,
4330,
3580,
29931,
1299,
2890,
322,
325,
338,
451,
6213,
29962,
13,
9651,
565,
21676,
29901,
13,
18884,
12020,
7865,
2392,
703,
11947,
29879,
773,
2280,
17475,
1122,
451,
671,
1438,
376,
13,
462,
462,
376,
11330,
29901,
6571,
1642,
4830,
29317,
15300,
7122,
29898,
690,
9841,
4961,
13,
13,
13,
1990,
7338,
2760,
6466,
2283,
14994,
3381,
29898,
3195,
1125,
13,
1678,
9995,
1576,
21992,
363,
988,
1962,
2066,
881,
367,
20373,
304,
373,
3414,
13,
1678,
13285,
29889,
13,
13,
1678,
584,
3207,
5639,
29901,
319,
4423,
297,
12634,
23755,
8635,
304,
607,
2066,
526,
13,
268,
20373,
29889,
910,
2609,
367,
12420,
411,
4469,
29918,
12925,
29889,
13,
1678,
584,
1853,
5639,
29901,
584,
1990,
18078,
6466,
2283,
29933,
2127,
7895,
14994,
3381,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
6466,
2283,
29933,
2127,
7895,
14994,
3381,
13885,
13,
1678,
584,
3207,
4469,
29918,
12925,
29901,
530,
4469,
29899,
12925,
934,
2318,
3407,
29889,
910,
2609,
367,
13,
268,
12420,
411,
5639,
29889,
13,
1678,
584,
1853,
4469,
29918,
12925,
29901,
584,
1990,
18078,
6466,
2283,
12300,
10486,
14994,
3381,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
6466,
2283,
12300,
10486,
14994,
3381,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
7611,
2396,
11117,
1989,
2396,
525,
7611,
742,
525,
1853,
2396,
525,
6466,
2283,
29933,
2127,
7895,
14994,
3381,
16675,
13,
4706,
525,
6921,
29918,
12925,
2396,
11117,
1989,
2396,
525,
6921,
10486,
742,
525,
1853,
2396,
525,
6466,
2283,
12300,
10486,
14994,
3381,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
5647,
2760,
6466,
2283,
14994,
3381,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
7611,
353,
9049,
5085,
29889,
657,
877,
7611,
742,
6213,
29897,
13,
4706,
1583,
29889,
6921,
29918,
12925,
353,
9049,
5085,
29889,
657,
877,
6921,
29918,
12925,
742,
6213,
29897,
13,
4706,
565,
1583,
29889,
7611,
322,
1583,
29889,
6921,
29918,
12925,
29901,
13,
9651,
12020,
7865,
2392,
703,
29089,
6084,
1716,
5639,
322,
4469,
29918,
12925,
23157,
13,
13,
13,
1990,
7338,
2760,
11426,
9329,
29898,
9794,
29889,
11426,
2528,
9329,
1125,
13,
1678,
9995,
29909,
11565,
297,
278,
12634,
350,
905,
2669,
304,
788,
29889,
13,
13,
1678,
584,
3207,
1178,
29901,
319,
1347,
393,
20498,
873,
2893,
11057,
278,
11565,
2629,
278,
3633,
29889,
13,
268,
450,
3553,
508,
1712,
738,
10296,
310,
394,
16711,
25099,
4890,
3704,
13,
268,
7498,
561,
575,
322,
23400,
29883,
2361,
29892,
322,
2609,
1712,
901,
1135,
29871,
29953,
29946,
4890,
29889,
450,
13,
268,
3553,
338,
1206,
29899,
4569,
29530,
322,
1206,
29899,
1144,
575,
3321,
313,
5747,
338,
29892,
366,
1122,
451,
505,
1023,
13,
268,
11565,
23481,
2629,
385,
3633,
393,
1163,
871,
491,
1206,
467,
13,
1678,
584,
1853,
1178,
29901,
851,
13,
1678,
584,
3207,
2479,
29918,
978,
29901,
450,
2479,
1024,
363,
278,
11565,
29889,
450,
2479,
1024,
817,
13,
268,
451,
367,
5412,
322,
508,
1712,
738,
23862,
4890,
701,
304,
263,
7472,
13,
268,
3309,
310,
29871,
29896,
29900,
29906,
29946,
29889,
13,
1678,
584,
1853,
2479,
29918,
978,
29901,
851,
13,
1678,
584,
3207,
22419,
29918,
2311,
29901,
450,
2159,
310,
6901,
14884,
297,
278,
11565,
29889,
2178,
6901,
13,
268,
14884,
297,
263,
11565,
526,
278,
1021,
2159,
29889,
1152,
2472,
1048,
3625,
13,
268,
15786,
310,
6901,
14884,
363,
14293,
15538,
772,
3775,
313,
1129,
3775,
2825,
411,
13,
268,
9570,
3170,
8614,
511,
1074,
317,
7093,
363,
14293,
15538,
13,
268,
313,
1124,
597,
17688,
29889,
4994,
29889,
510,
29914,
12663,
29914,
18569,
29914,
9274,
29899,
9916,
29899,
29879,
7093,
29899,
5965,
2395,
12495,
13,
268,
350,
905,
11286,
599,
14293,
15538,
11400,
15786,
5174,
7338,
336,
12636,
497,
29892,
319,
29896,
29963,
29906,
322,
13,
268,
319,
29906,
29963,
29906,
29889,
1152,
2472,
1048,
3625,
11400,
15786,
363,
772,
3775,
773,
4558,
515,
13,
268,
278,
19181,
17197,
1475,
28794,
6689,
313,
1129,
3775,
2825,
411,
13,
268,
6901,
29076,
8614,
29897,
1074,
317,
7093,
363,
19181,
17197,
1475,
313,
24085,
29897,
13,
268,
313,
991,
597,
17688,
29889,
4994,
29889,
510,
29914,
12663,
29914,
18569,
29914,
18714,
29899,
29885,
496,
1475,
29899,
9389,
29899,
29879,
7093,
4551,
13,
268,
470,
317,
7093,
363,
19181,
17197,
1475,
313,
7685,
29897,
13,
268,
313,
991,
597,
17688,
29889,
4994,
29889,
510,
29914,
12663,
29914,
18569,
29914,
18714,
29899,
29885,
496,
1475,
29899,
10499,
29899,
29879,
7093,
12495,
13,
268,
350,
905,
11286,
599,
12634,
11400,
15786,
5174,
6850,
9468,
17011,
29918,
29909,
29900,
322,
1906,
411,
13,
268,
5188,
1974,
8635,
313,
1254,
9468,
17011,
29918,
10749,
29892,
6850,
9468,
17011,
29918,
8452,
29892,
322,
6850,
9468,
17011,
29918,
29928,
7597,
29906,
3652,
467,
13,
1678,
584,
1853,
22419,
29918,
2311,
29901,
851,
13,
1678,
584,
3207,
9570,
29918,
5509,
29918,
13305,
29901,
450,
9570,
2669,
5285,
363,
13,
268,
278,
11565,
29889,
910,
2875,
322,
6901,
29076,
8614,
526,
5478,
1474,
13,
268,
29192,
322,
697,
310,
278,
4426,
1818,
367,
6790,
29889,
910,
2875,
13,
268,
2609,
367,
6790,
565,
278,
350,
905,
3633,
471,
2825,
411,
967,
13,
268,
11565,
2499,
5479,
6818,
2875,
731,
304,
525,
2659,
4035,
22371,
4286,
13,
1678,
584,
1853,
9570,
29918,
5509,
29918,
13305,
29901,
584,
1990,
18078,
20442,
3170,
8614,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
20442,
3170,
8614,
13885,
13,
1678,
584,
3207,
6901,
29918,
23523,
29918,
13305,
29901,
450,
6901,
4933,
5285,
13,
268,
363,
278,
11565,
29889,
910,
2875,
322,
9570,
3170,
8614,
526,
5478,
1474,
13,
268,
29192,
322,
697,
310,
278,
4426,
1818,
367,
6790,
29889,
13,
1678,
584,
1853,
6901,
29918,
23523,
29918,
13305,
29901,
584,
1990,
18078,
21287,
29076,
8614,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
21287,
29076,
8614,
13885,
13,
1678,
584,
3207,
19490,
29918,
15619,
29901,
450,
11815,
363,
24082,
310,
10272,
7573,
304,
278,
13,
268,
11565,
29889,
910,
11815,
16058,
871,
304,
12219,
21640,
29936,
372,
756,
694,
2779,
746,
13,
268,
9025,
12300,
17185,
338,
731,
304,
1565,
29889,
450,
2322,
995,
338,
29871,
29896,
29945,
6233,
29889,
450,
13,
268,
9212,
995,
338,
29871,
29945,
6233,
29889,
960,
366,
6084,
263,
995,
3109,
1135,
29871,
29945,
6233,
29892,
13,
268,
278,
350,
905,
2669,
3639,
385,
1059,
29936,
565,
366,
526,
5432,
278,
16759,
3450,
13,
268,
4153,
29892,
278,
7331,
4660,
775,
338,
29871,
29946,
29900,
29900,
313,
22050,
10729,
467,
13,
1678,
584,
1853,
19490,
29918,
15619,
29901,
5335,
287,
2554,
13,
1678,
584,
3207,
3646,
29918,
7176,
293,
630,
29918,
18010,
29901,
450,
7429,
1353,
310,
16955,
10272,
13,
268,
7573,
297,
278,
11565,
29889,
910,
2875,
1818,
451,
367,
6790,
565,
9025,
12300,
17185,
13,
268,
338,
731,
304,
1565,
29889,
960,
9025,
12300,
17185,
338,
731,
304,
2089,
29892,
769,
366,
1818,
731,
13,
268,
2845,
3646,
29928,
7486,
630,
20284,
29892,
3646,
29931,
340,
29925,
21766,
20284,
29892,
470,
1716,
29889,
13,
1678,
584,
1853,
3646,
29918,
7176,
293,
630,
29918,
18010,
29901,
938,
13,
1678,
584,
3207,
3646,
29918,
677,
29918,
29886,
21766,
29918,
18010,
29901,
450,
7429,
1353,
310,
4482,
29899,
29886,
21766,
13,
268,
10272,
7573,
297,
278,
11565,
29889,
910,
2875,
1818,
451,
367,
6790,
565,
13,
268,
9025,
12300,
17185,
338,
731,
304,
1565,
29889,
960,
9025,
12300,
17185,
338,
731,
304,
2089,
29892,
769,
13,
268,
366,
1818,
731,
2845,
3646,
29928,
7486,
630,
20284,
29892,
3646,
29931,
340,
29925,
21766,
20284,
29892,
470,
1716,
29889,
13,
1678,
584,
1853,
3646,
29918,
677,
29918,
29886,
21766,
29918,
18010,
29901,
938,
13,
1678,
584,
3207,
9025,
29918,
6921,
29918,
7052,
29901,
26460,
278,
11565,
2159,
881,
6336,
13,
268,
10365,
975,
931,
29889,
960,
2089,
29892,
472,
3203,
697,
310,
3646,
29928,
7486,
403,
20284,
322,
13,
268,
3646,
29931,
340,
29925,
21766,
20284,
1818,
367,
6790,
29889,
960,
1565,
29892,
278,
4469,
17185,
2500,
2497,
13,
268,
2875,
338,
3734,
322,
278,
11565,
6336,
620,
7093,
5034,
304,
278,
13,
268,
7063,
29889,
450,
2322,
995,
338,
2089,
29889,
13,
1678,
584,
1853,
9025,
29918,
6921,
29918,
7052,
29901,
6120,
13,
1678,
584,
3207,
4469,
29918,
7052,
29918,
689,
2497,
29901,
319,
7063,
363,
278,
7429,
1353,
310,
10272,
13,
268,
7573,
297,
278,
11565,
29889,
910,
2875,
1818,
451,
367,
6790,
565,
9025,
12300,
17185,
13,
268,
338,
731,
304,
2089,
29889,
739,
338,
3734,
565,
9025,
12300,
17185,
338,
731,
304,
1565,
29889,
450,
13,
268,
7063,
338,
7120,
363,
2854,
537,
1434,
278,
11565,
338,
2825,
29889,
960,
278,
7063,
13,
268,
338,
451,
2854,
29892,
278,
350,
905,
2669,
12560,
29879,
278,
2009,
411,
13173,
1059,
13,
268,
2472,
29889,
1152,
901,
2472,
1048,
22146,
445,
7063,
29892,
1074,
13,
268,
525,
28451,
19574,
6287,
10272,
7573,
297,
385,
12634,
350,
905,
11565,
29915,
13,
268,
313,
991,
597,
17688,
29889,
4994,
29889,
510,
29914,
12663,
29914,
18569,
29914,
16175,
29899,
17405,
2454,
29899,
19529,
292,
12495,
13,
1678,
584,
1853,
4469,
29918,
7052,
29918,
689,
2497,
29901,
851,
13,
1678,
584,
3207,
4469,
29918,
7052,
29918,
24219,
362,
29918,
19207,
29901,
450,
931,
7292,
472,
607,
304,
13,
268,
6336,
10365,
278,
11565,
2159,
5034,
304,
278,
1120,
14174,
744,
7063,
29889,
450,
13,
268,
2322,
995,
338,
29871,
29896,
29945,
6233,
29889,
450,
9212,
322,
7472,
995,
526,
29871,
29945,
6233,
13,
268,
322,
29871,
29896,
29953,
29947,
6199,
8307,
29889,
960,
366,
6084,
263,
995,
3109,
1135,
29871,
29945,
6233,
470,
13,
268,
7621,
1135,
29871,
29896,
29953,
29947,
6199,
29892,
278,
350,
905,
2669,
3639,
385,
1059,
29936,
565,
366,
526,
13,
268,
5432,
278,
16759,
3450,
4153,
29892,
278,
7331,
4660,
775,
338,
29871,
29946,
29900,
29900,
313,
22050,
10729,
467,
13,
1678,
584,
1853,
4469,
29918,
7052,
29918,
24219,
362,
29918,
19207,
29901,
5335,
287,
2554,
13,
1678,
584,
3207,
9025,
29918,
1639,
29918,
3177,
29918,
27820,
362,
29901,
26460,
278,
11565,
3635,
1169,
1513,
13,
268,
12084,
1546,
7573,
29889,
1174,
17961,
1006,
29899,
3177,
12084,
13071,
278,
13,
268,
7472,
2159,
310,
278,
11565,
2861,
304,
18209,
25091,
373,
278,
7573,
310,
13,
268,
278,
11565,
29889,
910,
1122,
1121,
297,
278,
11565,
451,
20888,
967,
7429,
2159,
29889,
450,
13,
268,
2322,
995,
338,
2089,
29889,
13,
1678,
584,
1853,
9025,
29918,
1639,
29918,
3177,
29918,
27820,
362,
29901,
6120,
13,
1678,
584,
3207,
3564,
29918,
13305,
29901,
450,
3564,
5285,
363,
278,
11565,
29889,
13,
1678,
584,
1853,
3564,
29918,
13305,
29901,
584,
1990,
18078,
13724,
8614,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
13724,
8614,
13885,
13,
1678,
584,
3207,
1369,
29918,
7662,
29901,
319,
3414,
6790,
304,
1065,
373,
1269,
10272,
2943,
408,
372,
13,
268,
26205,
278,
11565,
29889,
450,
3414,
6057,
746,
278,
2943,
338,
2715,
304,
278,
11565,
470,
746,
13,
268,
278,
2943,
338,
10715,
287,
29889,
13,
1678,
584,
1853,
1369,
29918,
7662,
29901,
584,
1990,
18078,
4763,
5398,
529,
17688,
29889,
16175,
29889,
9794,
29889,
4763,
5398,
13885,
13,
1678,
584,
3207,
12289,
29918,
276,
10662,
29901,
450,
1051,
310,
23199,
1078,
304,
367,
5130,
373,
13,
268,
1269,
10272,
2943,
297,
278,
11565,
29889,
1152,
3852,
10272,
7573,
29892,
278,
350,
905,
13,
268,
2669,
2601,
29879,
278,
23199,
1078,
304,
278,
6790,
12289,
3787,
322,
13,
268,
4423,
29889,
1152,
8074,
10272,
7573,
29892,
278,
23199,
1078,
526,
6087,
297,
263,
13,
268,
3884,
2768,
278,
3414,
1985,
3884,
322,
385,
5177,
2286,
13,
268,
319,
29999,
29918,
29933,
14789,
29918,
29907,
20161,
6545,
2965,
1299,
2890,
29918,
9464,
338,
19056,
304,
278,
3414,
304,
2346,
363,
445,
13,
268,
4423,
29889,
1152,
23199,
1078,
411,
26401,
310,
525,
16674,
2659,
742,
263,
525,
6327,
29879,
29915,
13,
268,
3884,
338,
2825,
297,
278,
1404,
29915,
29879,
3271,
3884,
313,
29872,
29889,
29887,
1696,
13,
268,
847,
5184,
19248,
1792,
29899,
978,
6822,
6327,
29879,
29897,
322,
23199,
1078,
526,
7180,
297,
393,
3884,
29889,
13,
1678,
584,
1853,
12289,
29918,
276,
10662,
29901,
1051,
310,
584,
1990,
18078,
20455,
8021,
7422,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
20455,
8021,
7422,
13885,
13,
1678,
584,
3207,
2280,
29918,
5113,
29918,
276,
10662,
29901,
450,
1051,
310,
2280,
9741,
304,
13,
268,
367,
5130,
373,
1269,
10272,
2943,
297,
278,
11565,
29889,
13,
1678,
584,
1853,
2280,
29918,
5113,
29918,
276,
10662,
29901,
1051,
310,
13,
268,
584,
1990,
18078,
4873,
14459,
7422,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
4873,
14459,
7422,
13885,
13,
1678,
584,
3207,
2280,
29918,
506,
11259,
29901,
450,
1051,
310,
2280,
7794,
11259,
278,
350,
905,
13,
268,
2669,
674,
1207,
3625,
373,
1269,
10272,
2943,
297,
278,
11565,
29889,
450,
1051,
310,
13,
268,
2280,
7794,
11259,
1818,
367,
263,
11306,
310,
3625,
350,
905,
2669,
13,
268,
2280,
7794,
11259,
29889,
960,
263,
19405,
338,
13877,
607,
338,
451,
6969,
29892,
13,
268,
11565,
11265,
674,
4418,
29889,
13,
1678,
584,
1853,
2280,
29918,
506,
11259,
29901,
1051,
310,
851,
13,
1678,
584,
3207,
4236,
29918,
20673,
29918,
546,
29918,
3177,
29901,
450,
7472,
1353,
310,
9595,
393,
508,
1065,
13,
268,
21984,
368,
373,
263,
2323,
10272,
2943,
297,
278,
11565,
29889,
450,
2322,
995,
338,
29871,
29896,
29889,
13,
268,
450,
7472,
995,
310,
445,
4444,
7111,
373,
278,
2159,
310,
278,
10272,
7573,
13,
268,
297,
278,
11565,
313,
1552,
22419,
3505,
4444,
467,
13,
1678,
584,
1853,
4236,
29918,
20673,
29918,
546,
29918,
3177,
29901,
938,
13,
1678,
584,
3207,
3414,
29918,
816,
287,
19478,
29918,
22197,
29901,
1128,
9595,
526,
13235,
4822,
10272,
13,
268,
7573,
297,
263,
11565,
29889,
13,
1678,
584,
1853,
3414,
29918,
816,
287,
19478,
29918,
22197,
29901,
584,
1990,
18078,
5398,
4504,
287,
19478,
15644,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
4504,
287,
19478,
15644,
13885,
13,
1678,
584,
3207,
1404,
29918,
10149,
29879,
29901,
450,
1051,
310,
1404,
15303,
304,
367,
2825,
373,
1269,
2943,
13,
268,
297,
278,
11565,
29889,
13,
1678,
584,
1853,
1404,
29918,
10149,
29879,
29901,
1051,
310,
584,
1990,
18078,
2659,
10601,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2659,
10601,
13885,
13,
1678,
584,
3207,
15562,
29901,
319,
1051,
310,
1024,
29899,
1767,
11000,
6942,
411,
278,
11565,
408,
13,
268,
15562,
29889,
450,
350,
905,
2669,
947,
451,
3566,
738,
6593,
304,
15562,
29936,
372,
338,
13,
268,
14419,
368,
363,
278,
671,
310,
1404,
775,
29889,
13,
1678,
584,
1853,
15562,
29901,
1051,
310,
584,
1990,
18078,
18417,
2001,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18417,
2001,
13885,
13,
1678,
584,
3207,
3577,
29918,
276,
10662,
29901,
319,
1051,
310,
9741,
304,
367,
5130,
373,
278,
10272,
13,
268,
7573,
29889,
19928,
367,
310,
263,
22029,
15629,
1134,
297,
15017,
749,
411,
278,
4629,
13,
268,
13598,
1788,
29889,
13,
1678,
584,
1853,
3577,
29918,
276,
10662,
29901,
1051,
310,
584,
1990,
18078,
14459,
7422,
5160,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
14459,
7422,
5160,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
333,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
6925,
29918,
2311,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
333,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
4990,
29918,
978,
2396,
11117,
1989,
2396,
525,
4990,
1170,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
6925,
29918,
2311,
2396,
11117,
1989,
2396,
525,
6925,
3505,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
9274,
29918,
5509,
29918,
13305,
2396,
11117,
1989,
2396,
525,
9274,
3170,
8614,
742,
13,
462,
462,
4706,
525,
1853,
2396,
525,
20442,
3170,
8614,
16675,
13,
4706,
525,
18714,
29918,
23523,
29918,
13305,
2396,
11117,
1989,
2396,
525,
18714,
29076,
8614,
742,
13,
462,
462,
3986,
525,
1853,
2396,
525,
21287,
29076,
8614,
16675,
13,
4706,
525,
21476,
29918,
15619,
2396,
11117,
1989,
2396,
525,
21476,
10851,
742,
525,
1853,
2396,
525,
19708,
16675,
13,
4706,
525,
5182,
29918,
7176,
293,
630,
29918,
18010,
2396,
11117,
1989,
2396,
525,
5182,
29928,
7486,
630,
20284,
742,
525,
1853,
2396,
525,
524,
16675,
13,
4706,
525,
5182,
29918,
677,
29918,
29886,
21766,
29918,
18010,
2396,
11117,
1989,
2396,
525,
5182,
29931,
340,
29925,
21766,
20284,
742,
525,
1853,
2396,
525,
524,
16675,
13,
4706,
525,
12007,
29918,
6921,
29918,
7052,
2396,
11117,
1989,
2396,
525,
12007,
12300,
17185,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
4706,
525,
6921,
29918,
7052,
29918,
689,
2497,
2396,
11117,
1989,
2396,
525,
6921,
17185,
2500,
2497,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
6921,
29918,
7052,
29918,
24219,
362,
29918,
19207,
2396,
11117,
1989,
2396,
525,
6921,
17185,
29923,
4387,
362,
12506,
742,
525,
1853,
2396,
525,
19708,
16675,
13,
4706,
525,
12007,
29918,
1639,
29918,
3177,
29918,
27820,
362,
2396,
11117,
1989,
2396,
525,
12007,
4074,
4247,
5261,
2523,
362,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
4706,
525,
11618,
29918,
13305,
2396,
11117,
1989,
2396,
525,
11618,
8614,
742,
525,
1853,
2396,
525,
13724,
8614,
16675,
13,
4706,
525,
2962,
29918,
7662,
2396,
11117,
1989,
2396,
525,
2962,
5398,
742,
525,
1853,
2396,
525,
4763,
5398,
16675,
13,
4706,
525,
6327,
8021,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
6327,
8021,
1123,
10662,
742,
525,
1853,
2396,
525,
29961,
20455,
8021,
7422,
29962,
16675,
13,
4706,
525,
6214,
29918,
5113,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
6214,
14459,
1123,
10662,
742,
13,
462,
462,
965,
525,
1853,
2396,
525,
29961,
4873,
14459,
7422,
29962,
16675,
13,
4706,
525,
6214,
29918,
506,
11259,
2396,
11117,
1989,
2396,
525,
6214,
29931,
293,
11259,
742,
525,
1853,
2396,
525,
29961,
710,
29962,
16675,
13,
4706,
525,
3317,
29918,
20673,
29918,
546,
29918,
3177,
2396,
11117,
1989,
2396,
525,
3317,
26249,
5894,
4247,
742,
525,
1853,
2396,
525,
524,
16675,
13,
4706,
525,
7662,
29918,
816,
287,
19478,
29918,
22197,
2396,
11117,
1989,
2396,
525,
7662,
4504,
287,
19478,
15644,
742,
525,
1853,
2396,
525,
5398,
4504,
287,
19478,
15644,
16675,
13,
4706,
525,
1792,
29918,
10149,
29879,
2396,
11117,
1989,
2396,
525,
1792,
10601,
29879,
742,
525,
1853,
2396,
525,
29961,
2659,
10601,
29962,
16675,
13,
4706,
525,
19635,
2396,
11117,
1989,
2396,
525,
19635,
742,
525,
1853,
2396,
525,
29961,
18417,
2001,
29962,
16675,
13,
4706,
525,
5113,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
5113,
1123,
10662,
742,
525,
1853,
2396,
525,
29961,
14459,
7422,
5160,
29962,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
5647,
2760,
11426,
9329,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
5113,
29918,
276,
10662,
353,
9049,
5085,
29889,
657,
877,
5113,
29918,
276,
10662,
742,
6213,
29897,
13,
13,
13,
1990,
7338,
2760,
11426,
10299,
2450,
29898,
9794,
29889,
11426,
10299,
2450,
1125,
13,
1678,
9995,
10299,
2450,
363,
4969,
263,
716,
11565,
29889,
13,
13,
1678,
584,
3207,
2479,
29918,
978,
29901,
450,
2479,
1024,
363,
278,
11565,
29889,
450,
2479,
1024,
817,
13,
268,
451,
367,
5412,
322,
508,
1712,
738,
23862,
4890,
701,
304,
263,
7472,
13,
268,
3309,
310,
29871,
29896,
29900,
29906,
29946,
29889,
13,
1678,
584,
1853,
2479,
29918,
978,
29901,
851,
13,
1678,
584,
3207,
22419,
29918,
2311,
29901,
450,
2159,
310,
278,
6901,
14884,
297,
278,
11565,
29889,
2178,
6901,
13,
268,
14884,
297,
263,
11565,
526,
278,
1021,
2159,
29889,
1152,
2472,
1048,
3625,
13,
268,
15786,
310,
6901,
14884,
363,
14293,
15538,
772,
3775,
313,
1129,
3775,
2825,
411,
13,
268,
9570,
3170,
8614,
511,
1074,
317,
7093,
363,
14293,
15538,
13,
268,
313,
1124,
597,
17688,
29889,
4994,
29889,
510,
29914,
12663,
29914,
18569,
29914,
9274,
29899,
9916,
29899,
29879,
7093,
29899,
5965,
2395,
12495,
13,
268,
350,
905,
11286,
599,
14293,
15538,
11400,
15786,
5174,
7338,
336,
12636,
497,
29892,
319,
29896,
29963,
29906,
322,
13,
268,
319,
29906,
29963,
29906,
29889,
1152,
2472,
1048,
3625,
11400,
15786,
363,
772,
3775,
773,
4558,
515,
13,
268,
278,
19181,
17197,
1475,
28794,
6689,
313,
1129,
3775,
2825,
411,
13,
268,
6901,
29076,
8614,
29897,
1074,
317,
7093,
363,
19181,
17197,
1475,
313,
24085,
29897,
13,
268,
313,
991,
597,
17688,
29889,
4994,
29889,
510,
29914,
12663,
29914,
18569,
29914,
18714,
29899,
29885,
496,
1475,
29899,
9389,
29899,
29879,
7093,
4551,
13,
268,
470,
317,
7093,
363,
19181,
17197,
1475,
313,
7685,
29897,
13,
268,
313,
991,
597,
17688,
29889,
4994,
29889,
510,
29914,
12663,
29914,
18569,
29914,
18714,
29899,
29885,
496,
1475,
29899,
10499,
29899,
29879,
7093,
12495,
13,
268,
350,
905,
11286,
599,
12634,
11400,
15786,
5174,
6850,
9468,
17011,
29918,
29909,
29900,
322,
1906,
411,
13,
268,
5188,
1974,
8635,
313,
1254,
9468,
17011,
29918,
10749,
29892,
6850,
9468,
17011,
29918,
8452,
29892,
322,
6850,
9468,
17011,
29918,
29928,
7597,
29906,
3652,
467,
13,
1678,
584,
1853,
22419,
29918,
2311,
29901,
851,
13,
1678,
584,
3207,
9570,
29918,
5509,
29918,
13305,
29901,
450,
9570,
2669,
5285,
363,
13,
268,
278,
11565,
29889,
910,
2875,
1818,
367,
6790,
565,
278,
11565,
4225,
304,
367,
2825,
13,
268,
411,
12634,
2621,
29874,
29903,
11400,
29879,
29889,
910,
2875,
322,
6901,
29076,
8614,
526,
13,
268,
5478,
1474,
29192,
322,
697,
310,
278,
4426,
1818,
367,
6790,
29889,
960,
9561,
13,
268,
338,
6790,
769,
278,
350,
905,
2669,
3639,
385,
1059,
29936,
565,
366,
526,
5432,
13,
268,
278,
16759,
3450,
4153,
29892,
278,
7331,
4660,
775,
338,
29871,
29946,
29900,
29900,
313,
22050,
10729,
467,
910,
13,
268,
2875,
2609,
367,
6790,
565,
278,
350,
905,
3633,
471,
2825,
411,
967,
13,
268,
11565,
2499,
5479,
6818,
2875,
731,
304,
525,
2659,
4035,
22371,
4286,
13,
1678,
584,
1853,
9570,
29918,
5509,
29918,
13305,
29901,
584,
1990,
18078,
20442,
3170,
8614,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
20442,
3170,
8614,
13885,
13,
1678,
584,
3207,
6901,
29918,
23523,
29918,
13305,
29901,
450,
6901,
4933,
5285,
13,
268,
363,
278,
11565,
29889,
910,
2875,
1818,
367,
6790,
565,
278,
11565,
4225,
304,
367,
13,
268,
2825,
411,
12634,
306,
7340,
29903,
11400,
29879,
29889,
910,
2875,
322,
9570,
3170,
8614,
13,
268,
526,
5478,
1474,
29192,
322,
697,
310,
278,
4426,
1818,
367,
6790,
29889,
960,
13,
268,
9561,
338,
6790,
769,
278,
350,
905,
2669,
3639,
385,
1059,
29936,
565,
366,
526,
13,
268,
5432,
278,
16759,
3450,
4153,
29892,
278,
7331,
4660,
775,
338,
29871,
29946,
29900,
29900,
313,
22050,
10729,
467,
13,
1678,
584,
1853,
6901,
29918,
23523,
29918,
13305,
29901,
584,
1990,
18078,
21287,
29076,
8614,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
21287,
29076,
8614,
13885,
13,
1678,
584,
3207,
4236,
29918,
20673,
29918,
546,
29918,
3177,
29901,
450,
7472,
1353,
310,
9595,
393,
508,
1065,
13,
268,
21984,
368,
373,
263,
2323,
10272,
2943,
297,
278,
11565,
29889,
450,
2322,
995,
338,
29871,
29896,
29889,
13,
268,
450,
7472,
995,
310,
445,
4444,
7111,
373,
278,
2159,
310,
278,
10272,
7573,
13,
268,
297,
278,
11565,
313,
1552,
22419,
3505,
4444,
467,
13,
1678,
584,
1853,
4236,
29918,
20673,
29918,
546,
29918,
3177,
29901,
938,
13,
1678,
584,
3207,
3414,
29918,
816,
287,
19478,
29918,
22197,
29901,
1128,
9595,
526,
13235,
4822,
10272,
13,
268,
7573,
297,
263,
11565,
29889,
13,
1678,
584,
1853,
3414,
29918,
816,
287,
19478,
29918,
22197,
29901,
584,
1990,
18078,
5398,
4504,
287,
19478,
15644,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
4504,
287,
19478,
15644,
13885,
13,
1678,
584,
3207,
19490,
29918,
15619,
29901,
450,
11815,
363,
24082,
310,
10272,
7573,
304,
278,
13,
268,
11565,
29889,
910,
11815,
16058,
871,
304,
12219,
21640,
29936,
372,
756,
694,
2779,
746,
13,
268,
9025,
12300,
17185,
338,
731,
304,
1565,
29889,
450,
2322,
995,
338,
29871,
29896,
29945,
6233,
29889,
450,
13,
268,
9212,
995,
338,
29871,
29945,
6233,
29889,
960,
366,
6084,
263,
995,
3109,
1135,
29871,
29945,
6233,
29892,
13,
268,
278,
350,
905,
2669,
12560,
29879,
278,
2009,
411,
385,
1059,
29936,
565,
366,
526,
5432,
13,
268,
278,
16759,
3450,
4153,
29892,
278,
7331,
4660,
775,
338,
29871,
29946,
29900,
29900,
313,
22050,
10729,
467,
13,
1678,
584,
1853,
19490,
29918,
15619,
29901,
5335,
287,
2554,
13,
1678,
584,
3207,
3646,
29918,
7176,
293,
630,
29918,
18010,
29901,
450,
7429,
1353,
310,
16955,
10272,
13,
268,
7573,
297,
278,
11565,
29889,
910,
2875,
1818,
451,
367,
6790,
565,
9025,
12300,
17185,
13,
268,
338,
731,
304,
1565,
29889,
960,
9025,
12300,
17185,
338,
731,
304,
2089,
29892,
769,
366,
1818,
731,
13,
268,
2845,
3646,
29928,
7486,
630,
20284,
29892,
3646,
29931,
340,
29925,
21766,
20284,
29892,
470,
1716,
29889,
13,
1678,
584,
1853,
3646,
29918,
7176,
293,
630,
29918,
18010,
29901,
938,
13,
1678,
584,
3207,
3646,
29918,
677,
29918,
29886,
21766,
29918,
18010,
29901,
450,
7429,
1353,
310,
4482,
29899,
29886,
21766,
13,
268,
10272,
7573,
297,
278,
11565,
29889,
910,
2875,
1818,
451,
367,
6790,
565,
13,
268,
9025,
12300,
17185,
338,
731,
304,
1565,
29889,
960,
9025,
12300,
17185,
338,
731,
304,
2089,
29892,
769,
13,
268,
366,
1818,
731,
2845,
3646,
29928,
7486,
630,
20284,
29892,
3646,
29931,
340,
29925,
21766,
20284,
29892,
470,
1716,
29889,
13,
1678,
584,
1853,
3646,
29918,
677,
29918,
29886,
21766,
29918,
18010,
29901,
938,
13,
1678,
584,
3207,
9025,
29918,
6921,
29918,
7052,
29901,
26460,
278,
11565,
2159,
881,
6336,
13,
268,
10365,
975,
931,
29889,
960,
2089,
29892,
278,
3646,
29928,
7486,
630,
1543,
338,
3734,
29889,
960,
13,
268,
1565,
29892,
278,
4469,
17185,
2500,
2497,
1543,
338,
3734,
29889,
450,
11565,
6336,
13,
268,
620,
7093,
5034,
304,
278,
7063,
29889,
450,
2322,
995,
338,
2089,
29889,
13,
1678,
584,
1853,
9025,
29918,
6921,
29918,
7052,
29901,
6120,
13,
1678,
584,
3207,
4469,
29918,
7052,
29918,
689,
2497,
29901,
450,
7063,
363,
278,
7429,
1353,
310,
10272,
13,
268,
7573,
297,
278,
11565,
29889,
910,
2875,
1818,
451,
367,
6790,
565,
9025,
12300,
17185,
13,
268,
338,
731,
304,
2089,
29889,
739,
338,
3734,
565,
9025,
12300,
17185,
338,
731,
304,
1565,
29889,
450,
13,
268,
7063,
338,
7120,
363,
2854,
537,
1434,
278,
11565,
338,
2825,
29889,
960,
278,
7063,
13,
268,
338,
451,
2854,
29892,
278,
350,
905,
2669,
12560,
29879,
278,
2009,
411,
13173,
1059,
13,
268,
2472,
29889,
13,
1678,
584,
1853,
4469,
29918,
7052,
29918,
689,
2497,
29901,
851,
13,
1678,
584,
3207,
4469,
29918,
7052,
29918,
24219,
362,
29918,
19207,
29901,
450,
931,
7292,
472,
607,
304,
13,
268,
6336,
10365,
278,
11565,
2159,
5034,
304,
278,
1120,
14174,
744,
7063,
29889,
450,
13,
268,
2322,
995,
338,
29871,
29896,
29945,
6233,
29889,
450,
9212,
322,
7472,
995,
526,
29871,
29945,
6233,
13,
268,
322,
29871,
29896,
29953,
29947,
6199,
8307,
29889,
960,
366,
6084,
263,
995,
3109,
1135,
29871,
29945,
6233,
470,
13,
268,
7621,
1135,
29871,
29896,
29953,
29947,
6199,
29892,
278,
350,
905,
2669,
12560,
29879,
278,
2009,
411,
385,
13,
268,
8340,
2875,
995,
1059,
29936,
565,
366,
526,
5432,
278,
16759,
3450,
4153,
29892,
13,
268,
278,
7331,
4660,
775,
338,
29871,
29946,
29900,
29900,
313,
22050,
10729,
467,
13,
1678,
584,
1853,
4469,
29918,
7052,
29918,
24219,
362,
29918,
19207,
29901,
5335,
287,
2554,
13,
1678,
584,
3207,
9025,
29918,
1639,
29918,
3177,
29918,
27820,
362,
29901,
26460,
278,
11565,
3635,
1169,
1513,
13,
268,
12084,
1546,
7573,
29889,
1174,
17961,
1006,
29899,
3177,
12084,
13071,
278,
13,
268,
7472,
2159,
310,
278,
11565,
2861,
304,
18209,
25091,
373,
278,
7573,
310,
13,
268,
278,
11565,
29889,
910,
1122,
1121,
297,
278,
11565,
451,
20888,
967,
7429,
2159,
29889,
450,
13,
268,
2322,
995,
338,
2089,
29889,
13,
1678,
584,
1853,
9025,
29918,
1639,
29918,
3177,
29918,
27820,
362,
29901,
6120,
13,
1678,
584,
3207,
3564,
29918,
13305,
29901,
450,
3564,
5285,
363,
278,
11565,
29889,
13,
1678,
584,
1853,
3564,
29918,
13305,
29901,
584,
1990,
18078,
13724,
8614,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
13724,
8614,
13885,
13,
1678,
584,
3207,
1369,
29918,
7662,
29901,
319,
3414,
304,
1065,
373,
1269,
10272,
2943,
408,
372,
26205,
278,
13,
268,
11565,
29889,
450,
3414,
6057,
746,
278,
2943,
338,
2715,
304,
278,
11565,
470,
746,
278,
2943,
338,
13,
268,
10715,
287,
29889,
13,
1678,
584,
1853,
1369,
29918,
7662,
29901,
584,
1990,
18078,
4763,
5398,
529,
17688,
29889,
16175,
29889,
9794,
29889,
4763,
5398,
13885,
13,
1678,
584,
3207,
12289,
29918,
276,
10662,
29901,
319,
1051,
310,
23199,
1078,
304,
367,
5130,
373,
13,
268,
1269,
10272,
2943,
297,
278,
11565,
29889,
1152,
3852,
10272,
7573,
29892,
278,
350,
905,
13,
268,
2669,
2601,
29879,
278,
23199,
1078,
304,
278,
6790,
12289,
3787,
322,
13,
268,
4423,
29889,
1152,
8074,
10272,
7573,
29892,
278,
23199,
1078,
526,
6087,
297,
263,
13,
268,
3884,
2768,
278,
3414,
1985,
3884,
322,
385,
5177,
2286,
13,
268,
319,
29999,
29918,
29933,
14789,
29918,
29907,
20161,
6545,
2965,
1299,
2890,
29918,
9464,
338,
19056,
304,
278,
3414,
304,
2346,
363,
445,
13,
268,
4423,
29889,
1152,
23199,
1078,
411,
26401,
310,
525,
16674,
2659,
742,
263,
525,
6327,
29879,
29915,
13,
268,
3884,
338,
2825,
297,
278,
1404,
29915,
29879,
3271,
3884,
313,
29872,
29889,
29887,
1696,
13,
268,
847,
5184,
19248,
1792,
29899,
978,
6822,
6327,
29879,
29897,
322,
23199,
1078,
526,
7180,
297,
393,
3884,
29889,
13,
1678,
584,
1853,
12289,
29918,
276,
10662,
29901,
1051,
310,
584,
1990,
18078,
20455,
8021,
7422,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
20455,
8021,
7422,
13885,
13,
1678,
584,
3207,
2280,
29918,
5113,
29918,
276,
10662,
29901,
450,
1051,
310,
2280,
9741,
304,
13,
268,
367,
5130,
373,
1269,
10272,
2943,
297,
278,
11565,
29889,
13,
1678,
584,
1853,
2280,
29918,
5113,
29918,
276,
10662,
29901,
1051,
310,
13,
268,
584,
1990,
18078,
4873,
14459,
7422,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
4873,
14459,
7422,
13885,
13,
1678,
584,
3207,
2280,
29918,
506,
11259,
29901,
450,
1051,
310,
2280,
7794,
11259,
278,
350,
905,
13,
268,
2669,
674,
1207,
3625,
373,
1269,
10272,
2943,
297,
278,
11565,
29889,
450,
1051,
310,
13,
268,
2280,
7794,
11259,
1818,
367,
263,
11306,
310,
3625,
350,
905,
2669,
13,
268,
2280,
7794,
11259,
29889,
960,
263,
19405,
338,
13877,
607,
338,
451,
6969,
29892,
13,
268,
11565,
11265,
674,
4418,
29889,
13,
1678,
584,
1853,
2280,
29918,
506,
11259,
29901,
1051,
310,
851,
13,
1678,
584,
3207,
1404,
29918,
10149,
29879,
29901,
450,
1051,
310,
1404,
15303,
304,
367,
2825,
373,
1269,
2943,
13,
268,
297,
278,
11565,
29889,
13,
1678,
584,
1853,
1404,
29918,
10149,
29879,
29901,
1051,
310,
584,
1990,
18078,
2659,
10601,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2659,
10601,
13885,
13,
1678,
584,
3207,
15562,
29901,
319,
1051,
310,
1024,
29899,
1767,
11000,
6942,
411,
278,
11565,
408,
13,
268,
15562,
29889,
450,
350,
905,
2669,
947,
451,
3566,
738,
6593,
304,
15562,
29936,
372,
338,
13,
268,
14419,
368,
363,
278,
671,
310,
1404,
775,
29889,
13,
1678,
584,
1853,
15562,
29901,
1051,
310,
584,
1990,
18078,
18417,
2001,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18417,
2001,
13885,
13,
1678,
584,
3207,
3577,
29918,
276,
10662,
29901,
319,
1051,
310,
9741,
304,
367,
5130,
373,
278,
10272,
13,
268,
7573,
29889,
19928,
367,
310,
263,
22029,
15629,
1134,
297,
15017,
749,
411,
278,
4629,
13,
268,
13598,
1788,
29889,
13,
1678,
584,
1853,
3577,
29918,
276,
10662,
29901,
1051,
310,
584,
1990,
18078,
14459,
7422,
5160,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
14459,
7422,
5160,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
6925,
29918,
2311,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
4990,
29918,
978,
2396,
11117,
1989,
2396,
525,
4990,
1170,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
6925,
29918,
2311,
2396,
11117,
1989,
2396,
525,
6925,
3505,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
9274,
29918,
5509,
29918,
13305,
2396,
11117,
1989,
2396,
525,
9274,
3170,
8614,
742,
13,
462,
462,
4706,
525,
1853,
2396,
525,
20442,
3170,
8614,
16675,
13,
4706,
525,
18714,
29918,
23523,
29918,
13305,
2396,
11117,
1989,
2396,
525,
18714,
29076,
8614,
742,
13,
462,
462,
3986,
525,
1853,
2396,
525,
21287,
29076,
8614,
16675,
13,
4706,
525,
3317,
29918,
20673,
29918,
546,
29918,
3177,
2396,
11117,
1989,
2396,
525,
3317,
26249,
5894,
4247,
742,
525,
1853,
2396,
525,
524,
16675,
13,
4706,
525,
7662,
29918,
816,
287,
19478,
29918,
22197,
2396,
11117,
1989,
2396,
525,
7662,
4504,
287,
19478,
15644,
742,
525,
1853,
2396,
525,
5398,
4504,
287,
19478,
15644,
16675,
13,
4706,
525,
21476,
29918,
15619,
2396,
11117,
1989,
2396,
525,
21476,
10851,
742,
525,
1853,
2396,
525,
19708,
16675,
13,
4706,
525,
5182,
29918,
7176,
293,
630,
29918,
18010,
2396,
11117,
1989,
2396,
525,
5182,
29928,
7486,
630,
20284,
742,
525,
1853,
2396,
525,
524,
16675,
13,
4706,
525,
5182,
29918,
677,
29918,
29886,
21766,
29918,
18010,
2396,
11117,
1989,
2396,
525,
5182,
29931,
340,
29925,
21766,
20284,
742,
525,
1853,
2396,
525,
524,
16675,
13,
4706,
525,
12007,
29918,
6921,
29918,
7052,
2396,
11117,
1989,
2396,
525,
12007,
12300,
17185,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
4706,
525,
6921,
29918,
7052,
29918,
689,
2497,
2396,
11117,
1989,
2396,
525,
6921,
17185,
2500,
2497,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
6921,
29918,
7052,
29918,
24219,
362,
29918,
19207,
2396,
11117,
1989,
2396,
525,
6921,
17185,
29923,
4387,
362,
12506,
742,
525,
1853,
2396,
525,
19708,
16675,
13,
4706,
525,
12007,
29918,
1639,
29918,
3177,
29918,
27820,
362,
2396,
11117,
1989,
2396,
525,
12007,
4074,
4247,
5261,
2523,
362,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
4706,
525,
11618,
29918,
13305,
2396,
11117,
1989,
2396,
525,
11618,
8614,
742,
525,
1853,
2396,
525,
13724,
8614,
16675,
13,
4706,
525,
2962,
29918,
7662,
2396,
11117,
1989,
2396,
525,
2962,
5398,
742,
525,
1853,
2396,
525,
4763,
5398,
16675,
13,
4706,
525,
6327,
8021,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
6327,
8021,
1123,
10662,
742,
525,
1853,
2396,
525,
29961,
20455,
8021,
7422,
29962,
16675,
13,
4706,
525,
6214,
29918,
5113,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
6214,
14459,
1123,
10662,
742,
13,
462,
462,
965,
525,
1853,
2396,
525,
29961,
4873,
14459,
7422,
29962,
16675,
13,
4706,
525,
6214,
29918,
506,
11259,
2396,
11117,
1989,
2396,
525,
6214,
29931,
293,
11259,
742,
525,
1853,
2396,
525,
29961,
710,
29962,
16675,
13,
4706,
525,
1792,
29918,
10149,
29879,
2396,
11117,
1989,
2396,
525,
1792,
10601,
29879,
742,
525,
1853,
2396,
525,
29961,
2659,
10601,
29962,
16675,
13,
4706,
525,
19635,
2396,
11117,
1989,
2396,
525,
19635,
742,
525,
1853,
2396,
525,
29961,
18417,
2001,
29962,
16675,
13,
4706,
525,
5113,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
5113,
1123,
10662,
742,
525,
1853,
2396,
525,
29961,
14459,
7422,
5160,
29962,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
5647,
2760,
11426,
10299,
2450,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
5113,
29918,
276,
10662,
353,
9049,
5085,
29889,
657,
877,
5113,
29918,
276,
10662,
742,
6213,
29897,
13,
13,
13,
1990,
7338,
2760,
6848,
2283,
29898,
9794,
29889,
6848,
2283,
1125,
13,
1678,
9995,
29909,
934,
304,
367,
16532,
515,
12634,
23755,
8635,
304,
263,
10272,
2943,
29889,
13,
13,
1678,
584,
3207,
1732,
29918,
2271,
29901,
450,
3988,
310,
278,
934,
2629,
12634,
350,
2127,
26162,
29889,
910,
13,
268,
3988,
1818,
367,
19909,
773,
21560,
2130,
29936,
393,
338,
29892,
278,
350,
905,
2669,
13,
268,
947,
451,
2198,
738,
16140,
746,
28536,
278,
23755,
29889,
1670,
526,
1023,
13,
268,
5837,
304,
679,
1316,
263,
3988,
363,
263,
23755,
297,
12634,
8635,
29901,
3160,
263,
21236,
13,
268,
11028,
9954,
1535,
313,
29903,
3289,
29897,
16690,
292,
1303,
11239,
373,
278,
23755,
29892,
470,
731,
278,
13,
268,
319,
6154,
363,
278,
23755,
470,
967,
5639,
304,
2758,
970,
2130,
29889,
13,
1678,
584,
1853,
1732,
29918,
2271,
29901,
851,
13,
1678,
584,
3207,
4469,
29918,
12925,
29918,
7611,
29918,
978,
29901,
450,
8635,
5639,
1024,
297,
278,
4469,
13,
1678,
8635,
3633,
29889,
450,
4469,
10486,
7895,
1170,
29892,
8635,
7895,
5983,
322,
13,
1678,
1732,
5983,
4426,
526,
5478,
1474,
29192,
322,
697,
310,
963,
1818,
367,
6790,
29889,
13,
1678,
584,
1853,
4469,
29918,
12925,
29918,
7611,
29918,
978,
29901,
851,
13,
1678,
584,
3207,
8635,
29918,
7611,
29918,
2271,
29901,
450,
3988,
310,
278,
23755,
5639,
2629,
12634,
13,
1678,
350,
2127,
26162,
29889,
450,
4469,
10486,
7895,
1170,
29892,
8635,
7895,
5983,
322,
1732,
5983,
13,
1678,
4426,
526,
5478,
1474,
29192,
322,
697,
310,
963,
1818,
367,
6790,
29889,
910,
13,
1678,
3988,
1818,
367,
19909,
322,
1051,
519,
773,
21560,
2130,
29936,
393,
338,
29892,
278,
13,
1678,
350,
905,
2669,
947,
451,
2198,
738,
16140,
746,
28536,
23755,
29879,
515,
13,
1678,
278,
5639,
29889,
1670,
526,
1023,
5837,
304,
679,
1316,
263,
3988,
363,
263,
5639,
297,
13,
1678,
12634,
8635,
29901,
3160,
263,
21236,
11028,
9954,
1535,
313,
29903,
3289,
29897,
16690,
292,
1303,
322,
13,
1678,
1051,
11239,
373,
278,
5639,
29892,
470,
731,
278,
319,
6154,
363,
278,
5639,
304,
13,
1678,
2758,
970,
2130,
29889,
13,
1678,
584,
1853,
8635,
29918,
7611,
29918,
2271,
29901,
851,
13,
1678,
584,
3207,
23755,
29918,
13506,
29901,
450,
23755,
10944,
304,
671,
746,
28536,
23755,
29879,
515,
385,
13,
1678,
12634,
26162,
5639,
29889,
9333,
278,
23755,
29879,
5069,
2983,
3380,
411,
278,
6790,
13,
1678,
10944,
674,
367,
16532,
29889,
450,
2875,
338,
2854,
871,
746,
13,
1678,
4469,
10486,
7895,
1170,
470,
8635,
7895,
5983,
338,
1304,
29889,
910,
10944,
508,
367,
13,
1678,
263,
7687,
10422,
470,
263,
1014,
12322,
29889,
960,
263,
10944,
338,
451,
6790,
29892,
599,
278,
13,
1678,
2066,
297,
278,
5639,
674,
367,
16532,
29889,
13,
1678,
584,
1853,
23755,
29918,
13506,
29901,
851,
13,
1678,
584,
3207,
934,
29918,
2084,
29901,
450,
4423,
373,
278,
10272,
2943,
304,
607,
304,
5142,
13,
268,
278,
934,
29892,
6198,
304,
278,
3414,
29915,
29879,
1985,
3884,
29889,
960,
773,
263,
934,
2318,
13,
268,
2752,
393,
9282,
901,
1135,
697,
934,
29892,
445,
674,
367,
5545,
278,
1024,
13,
268,
310,
263,
3884,
29892,
6467,
372,
674,
367,
14914,
408,
278,
12551,
934,
1024,
29889,
13,
1678,
584,
1853,
934,
29918,
2084,
29901,
851,
13,
1678,
584,
3207,
934,
29918,
8513,
29901,
450,
934,
10751,
4464,
5352,
297,
4725,
284,
3402,
29889,
910,
13,
268,
2875,
16058,
871,
304,
2066,
1641,
16532,
304,
8074,
10272,
7573,
29889,
739,
13,
268,
674,
367,
17262,
565,
372,
338,
6790,
363,
263,
6503,
2283,
607,
674,
367,
13,
268,
16532,
304,
263,
3852,
2943,
29889,
960,
445,
2875,
338,
451,
6790,
363,
263,
13,
268,
8074,
2943,
29892,
769,
263,
2322,
995,
310,
29871,
29900,
29955,
29955,
29900,
338,
7436,
304,
278,
934,
29889,
13,
268,
960,
773,
263,
934,
2318,
2752,
393,
9282,
901,
1135,
697,
934,
29892,
445,
674,
367,
13,
268,
7436,
304,
599,
2066,
297,
278,
2318,
29889,
13,
1678,
584,
1853,
934,
29918,
8513,
29901,
851,
13,
1678,
584,
3207,
2752,
29901,
319,
934,
2752,
3407,
607,
1033,
3160,
263,
4333,
310,
2066,
515,
13,
268,
263,
12634,
26162,
5639,
470,
385,
4469,
29899,
12925,
934,
2318,
29889,
13,
1678,
584,
1853,
2752,
29901,
584,
1990,
18078,
2283,
4435,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
2283,
4435,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1124,
29918,
2271,
2396,
11117,
1989,
2396,
525,
1124,
5983,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
6921,
29918,
12925,
29918,
7611,
29918,
978,
2396,
11117,
1989,
2396,
525,
6921,
10486,
7895,
1170,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
10054,
29918,
13506,
2396,
11117,
1989,
2396,
525,
10054,
23095,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
12925,
29918,
7611,
29918,
2271,
2396,
11117,
1989,
2396,
525,
12925,
7895,
5983,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
1445,
29918,
2084,
2396,
11117,
1989,
2396,
525,
1445,
2605,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
1445,
29918,
8513,
2396,
11117,
1989,
2396,
525,
1445,
6818,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
4993,
2396,
11117,
1989,
2396,
525,
4993,
742,
525,
1853,
2396,
525,
2283,
4435,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
5647,
2760,
6848,
2283,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
4993,
353,
9049,
5085,
29889,
657,
877,
4993,
742,
6213,
29897,
13,
13,
13,
1990,
7338,
2760,
5398,
9329,
29898,
9794,
29889,
5398,
2528,
9329,
1125,
13,
1678,
9995,
2744,
12634,
350,
905,
3414,
304,
788,
29889,
13,
13,
1678,
584,
3207,
1178,
29901,
319,
1347,
393,
20498,
873,
2893,
11057,
278,
3414,
2629,
278,
4982,
29889,
450,
13,
268,
3553,
508,
1712,
738,
10296,
310,
394,
16711,
25099,
4890,
3704,
13,
268,
7498,
561,
575,
322,
23400,
29883,
2361,
29892,
322,
2609,
1712,
901,
1135,
29871,
29953,
29946,
4890,
29889,
450,
13,
268,
3553,
338,
1206,
29899,
4569,
29530,
322,
1206,
29899,
1144,
575,
3321,
313,
5747,
338,
29892,
366,
1122,
451,
505,
1023,
13,
268,
23481,
2629,
263,
4982,
393,
1163,
871,
491,
1206,
467,
13,
1678,
584,
1853,
1178,
29901,
851,
13,
1678,
584,
3207,
2479,
29918,
978,
29901,
319,
2479,
1024,
363,
278,
3414,
29889,
450,
2479,
1024,
817,
13,
268,
451,
367,
5412,
322,
508,
1712,
738,
23862,
4890,
701,
304,
263,
7472,
13,
268,
3309,
310,
29871,
29896,
29900,
29906,
29946,
29889,
13,
1678,
584,
1853,
2479,
29918,
978,
29901,
851,
13,
1678,
584,
3207,
1899,
29918,
1220,
29901,
450,
1899,
1196,
310,
278,
3414,
29889,
1152,
2473,
29899,
8758,
13,
268,
9595,
29892,
278,
1899,
1196,
338,
8283,
408,
278,
7601,
3414,
29892,
1156,
278,
7601,
13,
268,
3414,
322,
599,
1014,
20673,
505,
7743,
14012,
278,
29311,
3381,
1899,
13,
268,
1196,
29889,
450,
1899,
1196,
947,
451,
1065,
1090,
263,
6473,
29892,
322,
5480,
2609,
13,
268,
2125,
10631,
310,
6473,
5680,
1316,
408,
5177,
2286,
13184,
29889,
13,
268,
960,
366,
864,
304,
2125,
10631,
310,
1316,
5680,
29892,
366,
881,
15928,
278,
13,
268,
6473,
297,
278,
1899,
1196,
29892,
363,
1342,
773,
376,
9006,
847,
29883,
1619,
6255,
29908,
297,
3852,
13,
268,
470,
5591,
2109,
29914,
845,
448,
29883,
1619,
6255,
29908,
297,
8074,
29889,
13,
1678,
584,
1853,
1899,
29918,
1220,
29901,
851,
13,
1678,
584,
3207,
5639,
29918,
11027,
29901,
450,
6055,
363,
278,
5639,
1090,
607,
278,
13,
268,
3414,
6057,
29889,
960,
278,
11565,
393,
674,
1065,
445,
3414,
756,
5639,
8614,
13,
268,
731,
29892,
445,
1818,
367,
731,
408,
1532,
29889,
960,
278,
11565,
393,
674,
1065,
445,
3414,
1838,
29915,
29873,
13,
268,
505,
5639,
8614,
731,
29892,
445,
1818,
451,
367,
731,
29889,
1932,
445,
338,
13,
268,
6790,
29892,
599,
17525,
8304,
3598,
2400,
278,
319,
29999,
29918,
29933,
14789,
29918,
6632,
2287,
29918,
21289,
29918,
9464,
13,
268,
313,
1552,
3876,
310,
12634,
350,
905,
17525,
373,
278,
2943,
29897,
526,
20545,
964,
278,
13,
268,
5639,
29892,
599,
3414,
5177,
3651,
526,
20545,
964,
278,
5639,
29892,
13,
268,
322,
278,
3414,
1899,
1196,
338,
8283,
297,
278,
5639,
29889,
13,
1678,
584,
1853,
5639,
29918,
11027,
29901,
584,
1990,
18078,
5398,
7895,
9585,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
7895,
9585,
13885,
13,
1678,
584,
3207,
6876,
29918,
1116,
2187,
29901,
1128,
278,
350,
905,
2669,
881,
10049,
746,
278,
3414,
13,
268,
1614,
2167,
29889,
13,
1678,
584,
1853,
6876,
29918,
1116,
2187,
29901,
584,
1990,
18078,
24365,
10983,
2187,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
24365,
10983,
2187,
13885,
13,
1678,
584,
3207,
6503,
29918,
5325,
29901,
319,
1051,
310,
2066,
393,
278,
350,
905,
2669,
674,
13,
268,
5142,
304,
278,
10272,
2943,
1434,
2734,
278,
1899,
1196,
29889,
1152,
13,
268,
2473,
29899,
8758,
9595,
29892,
278,
6503,
2066,
674,
871,
367,
16532,
304,
278,
13,
268,
10272,
2943,
373,
607,
278,
7601,
3414,
338,
8283,
29889,
13,
1678,
584,
1853,
6503,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
6848,
2283,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
6848,
2283,
13885,
13,
1678,
584,
3207,
5177,
29918,
11027,
29901,
319,
1051,
310,
5177,
2286,
6055,
363,
13,
268,
278,
3414,
29889,
13,
1678,
584,
1853,
5177,
29918,
11027,
29901,
1051,
310,
584,
1990,
18078,
18649,
29020,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18649,
29020,
13885,
13,
1678,
584,
3207,
2756,
13593,
29918,
3888,
29901,
319,
1887,
537,
13182,
393,
508,
367,
1304,
491,
278,
350,
905,
13,
268,
2669,
304,
1831,
263,
10272,
2943,
373,
607,
304,
1369,
278,
716,
3414,
29889,
13,
1678,
584,
1853,
2756,
13593,
29918,
3888,
29901,
584,
1990,
18078,
27867,
13593,
20350,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
27867,
13593,
20350,
13885,
13,
1678,
584,
3207,
11938,
29901,
450,
8225,
11938,
393,
3394,
304,
445,
3414,
29889,
960,
13,
268,
366,
437,
451,
6084,
11938,
29892,
278,
4236,
5398,
8015,
719,
3981,
338,
278,
13,
268,
4236,
5398,
8015,
719,
3981,
6790,
363,
278,
4982,
29892,
322,
278,
4236,
29956,
497,
29907,
908,
2481,
322,
13,
268,
3240,
2509,
2481,
526,
10362,
29889,
13,
1678,
584,
1853,
11938,
29901,
584,
1990,
18078,
5398,
27427,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
27427,
13885,
13,
1678,
584,
3207,
1404,
29918,
22350,
29901,
450,
1404,
10110,
1090,
607,
278,
3414,
6057,
29889,
960,
13,
268,
25811,
29892,
278,
3414,
6057,
408,
263,
1661,
29899,
6406,
2132,
1230,
1404,
5412,
304,
278,
3414,
29889,
13,
1678,
584,
1853,
1404,
29918,
22350,
29901,
584,
1990,
18078,
2659,
18415,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2659,
18415,
13885,
13,
1678,
584,
3207,
2473,
29918,
8758,
29918,
11027,
29901,
530,
1203,
393,
14088,
393,
278,
3414,
338,
13,
268,
263,
2473,
29899,
8758,
3414,
29892,
322,
3743,
2472,
1048,
920,
304,
1065,
278,
13,
268,
2473,
29899,
8758,
3414,
29889,
13,
1678,
584,
1853,
2473,
29918,
8758,
29918,
11027,
29901,
584,
1990,
18078,
15329,
4998,
9585,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
15329,
4998,
9585,
13885,
13,
1678,
584,
3207,
7111,
29918,
265,
29901,
450,
9595,
393,
445,
3414,
7111,
373,
29889,
910,
3414,
674,
451,
13,
268,
367,
21467,
2745,
599,
9595,
393,
372,
7111,
373,
505,
8676,
13,
268,
8472,
29889,
960,
738,
310,
1906,
9595,
4418,
322,
27096,
1009,
337,
2202,
18139,
29892,
13,
268,
445,
3414,
674,
2360,
367,
21467,
29889,
960,
278,
4982,
947,
451,
505,
13,
268,
3913,
5398,
8498,
7158,
731,
304,
1565,
29892,
322,
445,
1543,
338,
2198,
29892,
278,
2009,
13,
268,
8465,
411,
1059,
775,
9330,
8498,
7158,
3664,
10299,
2164,
2951,
11947,
29889,
13,
1678,
584,
1853,
7111,
29918,
265,
29901,
584,
1990,
18078,
5398,
8498,
7158,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
8498,
7158,
13885,
13,
1678,
584,
3207,
2280,
29918,
5113,
29918,
276,
10662,
29901,
319,
1051,
310,
2280,
9741,
393,
13,
268,
278,
350,
905,
2669,
674,
7246,
304,
278,
10272,
2943,
1434,
2734,
278,
13,
268,
1899,
1196,
29889,
8427,
9741,
526,
16532,
322,
21168,
304,
263,
7258,
13,
268,
3884,
29892,
451,
278,
3414,
1985,
3884,
29889,
7857,
29892,
565,
263,
16180,
13,
268,
3577,
338,
2307,
373,
278,
10272,
2943,
29892,
322,
338,
701,
304,
2635,
29892,
769,
372,
338,
451,
13,
268,
337,
29899,
10382,
287,
29936,
278,
5923,
3509,
373,
278,
10272,
2943,
338,
1304,
29889,
960,
263,
13,
268,
16180,
2280,
3577,
2609,
367,
5130,
29892,
363,
1342,
1363,
13,
268,
278,
3577,
756,
1063,
11132,
470,
1363,
5142,
5229,
29892,
278,
3414,
8465,
29889,
13,
1678,
584,
1853,
2280,
29918,
5113,
29918,
276,
10662,
29901,
1051,
310,
13,
268,
584,
1990,
18078,
4873,
14459,
7422,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
4873,
14459,
7422,
13885,
13,
1678,
584,
3207,
10760,
29918,
6979,
29918,
11027,
29901,
450,
6055,
363,
385,
10760,
13,
268,
5993,
393,
278,
3414,
508,
671,
304,
2189,
350,
905,
2669,
6931,
29889,
960,
445,
13,
268,
2875,
338,
731,
29892,
278,
350,
905,
2669,
8128,
278,
3414,
411,
385,
13,
268,
10760,
5993,
607,
508,
367,
1304,
304,
15585,
403,
350,
905,
2669,
13,
268,
6931,
1728,
26795,
385,
3633,
2130,
1820,
29889,
450,
5993,
338,
4944,
13,
268,
3025,
278,
319,
29999,
29918,
29933,
14789,
29918,
20656,
29950,
3919,
28541,
29918,
4986,
29968,
1430,
5177,
2286,
29889,
450,
6931,
13,
268,
393,
278,
3414,
508,
8677,
714,
773,
278,
5993,
8839,
373,
278,
6055,
29889,
1152,
13,
268,
1342,
29892,
263,
3414,
508,
2009,
4982,
11239,
297,
1797,
304,
788,
916,
9595,
304,
13,
268,
278,
4982,
29892,
470,
1423,
278,
4660,
310,
278,
4982,
470,
310,
916,
9595,
1090,
278,
4982,
29889,
13,
1678,
584,
1853,
10760,
29918,
6979,
29918,
11027,
29901,
584,
1990,
18078,
16746,
6066,
9585,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
16746,
6066,
9585,
13885,
13,
1678,
584,
3207,
1962,
29918,
5325,
29901,
319,
1051,
310,
2066,
393,
278,
350,
905,
2669,
674,
6441,
13,
268,
515,
278,
10272,
2943,
1156,
2734,
278,
1899,
1196,
29889,
1152,
2473,
29899,
8758,
13,
268,
9595,
29892,
278,
2066,
674,
871,
367,
20373,
515,
278,
10272,
2943,
373,
607,
278,
13,
268,
7601,
3414,
338,
8283,
29889,
13,
1678,
584,
1853,
1962,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
6466,
2283,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
6466,
2283,
13885,
13,
1678,
584,
3207,
3577,
29918,
276,
10662,
29901,
319,
1051,
310,
9741,
304,
367,
5130,
373,
278,
10272,
13,
268,
7573,
29889,
19928,
367,
310,
263,
22029,
15629,
1134,
297,
15017,
749,
411,
278,
4629,
13,
268,
13598,
1788,
29889,
13,
1678,
584,
1853,
3577,
29918,
276,
10662,
29901,
1051,
310,
584,
1990,
18078,
14459,
7422,
5160,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
14459,
7422,
5160,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
333,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
333,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
4990,
29918,
978,
2396,
11117,
1989,
2396,
525,
4990,
1170,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
1989,
2396,
525,
6519,
3542,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
7611,
29918,
11027,
2396,
11117,
1989,
2396,
525,
7611,
9585,
742,
525,
1853,
2396,
525,
5398,
7895,
9585,
16675,
13,
4706,
525,
13322,
29918,
1116,
2187,
2396,
11117,
1989,
2396,
525,
13322,
10983,
2187,
742,
525,
1853,
2396,
525,
24365,
10983,
2187,
16675,
13,
4706,
525,
10314,
29918,
5325,
2396,
11117,
1989,
2396,
525,
10314,
10547,
742,
525,
1853,
2396,
525,
29961,
5647,
2760,
6848,
2283,
29962,
16675,
13,
4706,
525,
4905,
29918,
5325,
2396,
11117,
1989,
2396,
525,
4905,
10547,
742,
525,
1853,
2396,
525,
29961,
6466,
2283,
29962,
16675,
13,
4706,
525,
20944,
29918,
11027,
2396,
11117,
1989,
2396,
525,
20944,
9585,
742,
525,
1853,
2396,
525,
29961,
18649,
29020,
29962,
16675,
13,
4706,
525,
3470,
13593,
29918,
3888,
2396,
11117,
1989,
2396,
525,
3470,
13593,
3401,
742,
525,
1853,
2396,
525,
27867,
13593,
20350,
16675,
13,
4706,
525,
13646,
29879,
2396,
11117,
1989,
2396,
525,
13646,
29879,
742,
525,
1853,
2396,
525,
5398,
27427,
16675,
13,
4706,
525,
1792,
29918,
22350,
2396,
11117,
1989,
2396,
525,
1792,
18415,
742,
525,
1853,
2396,
525,
2659,
18415,
16675,
13,
4706,
525,
9910,
29918,
8758,
29918,
11027,
2396,
11117,
1989,
2396,
525,
9910,
4998,
9585,
742,
525,
1853,
2396,
525,
15329,
4998,
9585,
16675,
13,
4706,
525,
2716,
1975,
29918,
265,
2396,
11117,
1989,
2396,
525,
2716,
1975,
2951,
742,
525,
1853,
2396,
525,
5398,
8498,
7158,
16675,
13,
4706,
525,
6214,
29918,
5113,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
6214,
14459,
1123,
10662,
742,
13,
462,
462,
965,
525,
1853,
2396,
525,
29961,
4873,
14459,
7422,
29962,
16675,
13,
4706,
525,
23055,
29918,
6979,
29918,
11027,
2396,
11117,
1989,
2396,
525,
23055,
6066,
9585,
742,
13,
462,
462,
3986,
525,
1853,
2396,
525,
16746,
6066,
9585,
16675,
13,
4706,
525,
5113,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
5113,
1123,
10662,
742,
525,
1853,
2396,
525,
29961,
14459,
7422,
5160,
29962,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
5647,
2760,
5398,
9329,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
5113,
29918,
276,
10662,
353,
9049,
5085,
29889,
657,
877,
5113,
29918,
276,
10662,
742,
6213,
29897,
13,
13,
13,
1990,
3497,
7196,
5398,
5126,
29898,
5398,
5126,
5160,
1125,
13,
1678,
9995,
29909,
9330,
27561,
363,
14655,
263,
731,
310,
9595,
2729,
373,
278,
8118,
13,
1678,
310,
385,
12634,
26162,
5639,
470,
4469,
29899,
12925,
934,
2318,
29889,
3118,
3414,
13,
1678,
674,
367,
5759,
639,
1881,
934,
29892,
322,
6336,
2715,
304,
278,
4982,
29889,
13,
13,
1678,
584,
3207,
2752,
29901,
450,
1881,
934,
2752,
515,
607,
278,
9595,
674,
367,
5759,
29889,
13,
1678,
584,
1853,
2752,
29901,
584,
1990,
18078,
2283,
4435,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
2283,
4435,
13885,
13,
1678,
584,
3207,
12312,
29918,
7662,
29901,
450,
3414,
4472,
278,
674,
367,
1304,
304,
5706,
1269,
3414,
29889,
13,
1678,
584,
1853,
12312,
29918,
7662,
29901,
584,
1990,
18078,
1123,
11666,
5398,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
1123,
11666,
5398,
13885,
13,
1678,
584,
3207,
10366,
29918,
7662,
29901,
530,
13136,
5684,
3414,
304,
367,
1065,
1156,
599,
278,
916,
13,
268,
5759,
9595,
505,
8676,
8472,
29889,
13,
1678,
584,
1853,
10366,
29918,
7662,
29901,
584,
1990,
18078,
15836,
479,
5398,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
15836,
479,
5398,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
4993,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
14358,
29918,
7662,
2396,
11117,
12403,
2396,
5852,
29913,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
1989,
2396,
525,
1853,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
4993,
2396,
11117,
1989,
2396,
525,
4993,
742,
525,
1853,
2396,
525,
2283,
4435,
16675,
13,
4706,
525,
14358,
29918,
7662,
2396,
11117,
1989,
2396,
525,
14358,
5398,
742,
525,
1853,
2396,
525,
1123,
11666,
5398,
16675,
13,
4706,
525,
14634,
29918,
7662,
2396,
11117,
1989,
2396,
525,
14634,
5398,
742,
525,
1853,
2396,
525,
15836,
479,
5398,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
2283,
7196,
5398,
5126,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
4993,
353,
9049,
5085,
29889,
657,
877,
4993,
742,
6213,
29897,
13,
4706,
1583,
29889,
14358,
29918,
7662,
353,
9049,
5085,
29889,
657,
877,
14358,
29918,
7662,
742,
6213,
29897,
13,
4706,
1583,
29889,
1853,
353,
525,
7662,
5894,
2283,
29915,
13,
13,
13,
1990,
3497,
4435,
29898,
3195,
1125,
13,
1678,
9995,
29909,
2752,
310,
1881,
2066,
304,
367,
16532,
11480,
263,
10272,
2943,
29889,
13,
13,
1678,
584,
3207,
851,
934,
29918,
2972,
29901,
450,
1024,
310,
385,
4469,
29899,
12925,
934,
2318,
29889,
13,
1678,
584,
3207,
851,
3142,
29901,
450,
3988,
310,
263,
934,
304,
367,
16532,
29889,
13,
1678,
584,
3207,
851,
5639,
29918,
2271,
29901,
450,
317,
3289,
3988,
310,
385,
12634,
26162,
5639,
29889,
13,
1678,
584,
3207,
851,
10944,
29901,
450,
10422,
10944,
470,
1014,
12322,
310,
1881,
2066,
13,
268,
297,
2845,
385,
4469,
29899,
12925,
934,
2318,
470,
5639,
29889,
2811,
367,
17262,
565,
13,
268,
378,
29890,
1312,
411,
3142,
29889,
13,
1678,
9995,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1445,
29918,
2972,
2396,
11117,
1989,
2396,
525,
1445,
4782,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
2271,
2396,
11117,
1989,
2396,
525,
2271,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
7611,
29918,
2271,
2396,
11117,
1989,
2396,
525,
7611,
5983,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
13506,
2396,
11117,
1989,
2396,
525,
13506,
742,
525,
1853,
2396,
525,
710,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
2283,
4435,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
1445,
29918,
2972,
353,
9049,
5085,
29889,
657,
877,
1445,
29918,
2972,
742,
6213,
29897,
13,
4706,
1583,
29889,
2271,
353,
9049,
5085,
29889,
657,
877,
2271,
742,
6213,
29897,
13,
4706,
1583,
29889,
7611,
29918,
2271,
353,
9049,
5085,
29889,
657,
877,
7611,
29918,
2271,
742,
6213,
29897,
13,
4706,
1583,
29889,
13506,
353,
9049,
5085,
29889,
657,
877,
13506,
742,
6213,
29897,
13,
13,
13,
1990,
17163,
3260,
5398,
29898,
3195,
1125,
13,
1678,
9995,
10299,
11057,
4902,
310,
263,
17163,
15629,
3414,
29889,
13,
13,
1678,
450,
17163,
15629,
3414,
338,
6336,
4687,
746,
278,
4982,
338,
2825,
29889,
450,
13,
1678,
350,
905,
2669,
14335,
304,
20410,
278,
17163,
15629,
3414,
1434,
738,
916,
9595,
13,
1678,
297,
278,
4982,
29889,
1932,
14653,
18159,
263,
11565,
29892,
278,
350,
905,
2669,
14335,
304,
19905,
13,
1678,
10272,
7573,
988,
17163,
15629,
9595,
526,
2734,
363,
408,
1472,
408,
1950,
13,
1678,
313,
5747,
338,
29892,
7573,
2734,
525,
8945,
29915,
9595,
526,
6206,
1434,
7573,
2734,
17163,
13,
1678,
15629,
9595,
467,
1932,
263,
17163,
15629,
3414,
8465,
322,
4225,
304,
367,
10715,
287,
29892,
13,
1678,
278,
1788,
14335,
304,
20410,
372,
472,
278,
9939,
20136,
29889,
960,
727,
526,
694,
13,
1678,
28132,
7573,
3625,
29892,
278,
1788,
1122,
29504,
697,
310,
278,
2734,
9595,
297,
13,
1678,
278,
11565,
322,
736,
372,
304,
278,
9521,
297,
1797,
304,
1207,
5716,
363,
278,
17163,
13,
1678,
15629,
3414,
304,
10715,
29889,
3940,
393,
263,
17163,
15629,
3414,
297,
697,
4982,
947,
451,
13,
1678,
505,
20136,
975,
9595,
297,
916,
17643,
29889,
7255,
2124,
17643,
29892,
871,
4982,
3233,
13,
1678,
7536,
1907,
526,
8900,
29889,
1152,
1342,
29892,
565,
263,
17163,
15629,
297,
263,
20136,
29871,
29900,
4982,
13,
1678,
4225,
304,
367,
10715,
287,
29892,
372,
674,
451,
766,
6689,
9595,
310,
263,
20136,
29871,
29896,
4982,
29889,
13,
13,
1678,
584,
3207,
1178,
29901,
319,
1347,
393,
20498,
873,
2893,
11057,
278,
17163,
15629,
3414,
2629,
13,
268,
278,
4982,
29889,
450,
3553,
508,
1712,
738,
10296,
310,
394,
16711,
25099,
4890,
13,
268,
3704,
7498,
561,
575,
322,
23400,
29883,
2361,
322,
2609,
1712,
901,
1135,
29871,
29953,
29946,
13,
268,
4890,
29889,
13,
1678,
584,
1853,
1178,
29901,
851,
13,
1678,
584,
3207,
2479,
29918,
978,
29901,
450,
2479,
1024,
310,
278,
17163,
15629,
3414,
29889,
739,
817,
451,
13,
268,
367,
5412,
322,
508,
1712,
738,
23862,
4890,
701,
304,
263,
7472,
3309,
310,
13,
418,
29896,
29900,
29906,
29946,
29889,
13,
1678,
584,
1853,
2479,
29918,
978,
29901,
851,
13,
1678,
584,
3207,
1899,
29918,
1220,
29901,
450,
1899,
1196,
310,
278,
17163,
15629,
3414,
29889,
450,
1899,
13,
268,
1196,
947,
451,
1065,
1090,
263,
6473,
29892,
322,
5480,
2609,
2125,
10631,
310,
13,
268,
6473,
5680,
1316,
408,
5177,
2286,
13184,
29889,
960,
366,
864,
304,
2125,
13,
268,
10631,
310,
1316,
5680,
29892,
366,
881,
15928,
278,
6473,
297,
278,
1899,
13,
268,
1196,
29892,
363,
1342,
773,
376,
9006,
847,
29883,
1619,
6255,
29908,
297,
3852,
470,
5591,
2109,
29914,
845,
448,
29883,
13,
268,
1619,
6255,
29908,
297,
8074,
29889,
13,
1678,
584,
1853,
1899,
29918,
1220,
29901,
851,
13,
1678,
584,
3207,
5639,
29918,
11027,
29901,
450,
6055,
363,
278,
5639,
1090,
607,
278,
13,
268,
17163,
15629,
3414,
6057,
29889,
960,
278,
11565,
393,
674,
1065,
445,
3414,
756,
13,
268,
5639,
8614,
731,
29892,
445,
1818,
367,
731,
408,
1532,
29889,
960,
278,
11565,
393,
13,
268,
674,
1065,
445,
3414,
1838,
29915,
29873,
505,
5639,
8614,
731,
29892,
445,
1818,
451,
13,
268,
367,
731,
29889,
1932,
445,
338,
6790,
29892,
599,
17525,
8304,
3598,
2400,
278,
13,
268,
319,
29999,
29918,
29933,
14789,
29918,
6632,
2287,
29918,
21289,
29918,
9464,
313,
1552,
3876,
310,
12634,
350,
905,
17525,
373,
278,
2943,
29897,
13,
268,
526,
20545,
964,
278,
5639,
29892,
599,
3414,
5177,
3651,
526,
20545,
13,
268,
964,
278,
5639,
29892,
322,
278,
3414,
1899,
1196,
338,
8283,
297,
278,
13,
268,
5639,
29889,
13,
1678,
584,
1853,
5639,
29918,
11027,
29901,
584,
1990,
18078,
5398,
7895,
9585,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
7895,
9585,
13885,
13,
1678,
584,
3207,
6503,
29918,
5325,
29901,
319,
1051,
310,
2066,
393,
278,
350,
905,
2669,
674,
13,
268,
5142,
304,
278,
10272,
2943,
1434,
2734,
278,
1899,
1196,
29889,
12745,
9904,
13,
268,
1090,
445,
1543,
526,
5982,
297,
278,
3414,
29915,
29879,
1985,
3884,
29889,
13,
1678,
584,
1853,
6503,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
5647,
2760,
6848,
2283,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5647,
2760,
6848,
2283,
13885,
13,
1678,
584,
3207,
1962,
29918,
5325,
29901,
319,
1051,
310,
2066,
393,
278,
350,
905,
2669,
674,
6441,
13,
268,
515,
278,
10272,
2943,
1156,
2734,
278,
1899,
1196,
29889,
1152,
2473,
29899,
8758,
13,
268,
9595,
29892,
278,
2066,
674,
871,
367,
20373,
515,
278,
10272,
2943,
373,
607,
278,
13,
268,
7601,
3414,
338,
8283,
29889,
13,
1678,
584,
1853,
1962,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
6466,
2283,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
6466,
2283,
13885,
13,
1678,
584,
3207,
5177,
29918,
11027,
29901,
319,
1051,
310,
5177,
2286,
6055,
363,
13,
268,
278,
17163,
15629,
3414,
29889,
13,
1678,
584,
1853,
5177,
29918,
11027,
29901,
1051,
310,
584,
1990,
18078,
18649,
29020,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18649,
29020,
13885,
13,
1678,
584,
3207,
11938,
29901,
1281,
4151,
9466,
393,
3394,
304,
278,
17163,
15629,
3414,
29889,
13,
1678,
584,
1853,
11938,
29901,
584,
1990,
18078,
5398,
27427,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
27427,
13885,
13,
1678,
584,
3207,
12088,
29918,
9057,
29918,
265,
29918,
5729,
12757,
29901,
26460,
13285,
310,
278,
17163,
15629,
3414,
13,
268,
1804,
11057,
13285,
310,
278,
4152,
4982,
29889,
960,
1565,
29892,
746,
278,
17163,
15629,
3414,
13,
268,
1614,
2167,
29892,
278,
350,
905,
2669,
17997,
278,
4982,
408,
4866,
29889,
960,
738,
9595,
526,
13,
268,
1603,
2734,
472,
445,
931,
313,
1228,
1135,
17163,
23708,
511,
1906,
9595,
526,
13,
268,
29185,
29889,
960,
2089,
29892,
278,
13285,
310,
278,
17163,
15629,
3414,
947,
451,
13,
268,
6602,
278,
4982,
4660,
29889,
512,
445,
1206,
29892,
366,
881,
2845,
671,
278,
13,
268,
373,
3596,
26249,
17813,
5352,
304,
29504,
278,
4982,
29892,
470,
505,
263,
3132,
470,
13,
268,
1404,
29504,
278,
4982,
9479,
29889,
530,
1342,
310,
445,
338,
565,
278,
17163,
13,
268,
15629,
10017,
263,
731,
310,
9595,
541,
769,
4893,
694,
4340,
6297,
297,
1009,
13,
268,
8225,
29889,
450,
2322,
995,
338,
1565,
29889,
960,
366,
526,
773,
278,
13,
268,
373,
3596,
26249,
17813,
322,
373,
5398,
24155,
8393,
304,
2761,
4982,
25423,
29892,
13,
268,
322,
773,
278,
17163,
15629,
3414,
871,
304,
1653,
278,
9595,
363,
278,
4982,
313,
1333,
13,
268,
304,
11819,
6728,
511,
769,
372,
338,
4100,
304,
731,
12088,
11947,
2951,
28958,
304,
13,
268,
2089,
29889,
13,
1678,
584,
1853,
12088,
29918,
9057,
29918,
265,
29918,
5729,
12757,
29901,
6120,
13,
1678,
584,
3207,
1404,
29918,
22350,
29901,
450,
1404,
10110,
1090,
607,
278,
17163,
15629,
3414,
13,
268,
6057,
29889,
960,
25811,
29892,
278,
3414,
6057,
408,
263,
1661,
29899,
6406,
2132,
1230,
1404,
5412,
304,
278,
13,
268,
3414,
29889,
13,
1678,
584,
1853,
1404,
29918,
22350,
29901,
584,
1990,
18078,
2659,
18415,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2659,
18415,
13885,
13,
1678,
584,
3207,
1065,
29918,
735,
7009,
573,
29901,
26460,
278,
17163,
15629,
3414,
6858,
29192,
671,
13,
268,
310,
278,
10272,
2943,
988,
372,
6057,
29889,
960,
1565,
29892,
694,
916,
9595,
674,
1065,
373,
278,
13,
268,
1021,
10272,
2943,
363,
408,
1472,
408,
278,
17163,
15629,
338,
2734,
29889,
960,
2089,
29892,
13,
268,
916,
9595,
508,
1065,
21699,
411,
278,
17163,
15629,
373,
263,
10272,
2943,
29889,
13,
268,
450,
17163,
15629,
3414,
18139,
12891,
2750,
278,
2943,
29915,
29879,
21984,
3414,
13,
268,
4046,
29892,
577,
445,
338,
871,
8018,
565,
278,
2943,
6511,
2999,
21984,
13,
268,
9595,
29889,
450,
2322,
995,
338,
1565,
29889,
13,
1678,
584,
1853,
1065,
29918,
735,
7009,
573,
29901,
6120,
13,
1678,
584,
3207,
2280,
29918,
5113,
29918,
276,
10662,
29901,
319,
1051,
310,
2280,
9741,
393,
13,
268,
278,
350,
905,
2669,
674,
7246,
304,
278,
10272,
2943,
1434,
2734,
278,
13,
268,
1899,
1196,
29889,
8427,
9741,
526,
16532,
322,
21168,
304,
263,
7258,
13,
268,
3884,
29892,
451,
278,
3414,
1985,
3884,
29889,
7857,
29892,
565,
263,
16180,
13,
268,
3577,
338,
2307,
373,
278,
10272,
2943,
29892,
322,
338,
701,
304,
2635,
29892,
769,
372,
338,
451,
13,
268,
337,
29899,
10382,
287,
29936,
278,
5923,
3509,
373,
278,
10272,
2943,
338,
1304,
29889,
960,
263,
13,
268,
16180,
2280,
3577,
2609,
367,
5130,
29892,
363,
1342,
1363,
13,
268,
278,
3577,
756,
1063,
11132,
470,
1363,
5142,
5229,
29892,
278,
3414,
8465,
29889,
13,
1678,
584,
1853,
2280,
29918,
5113,
29918,
276,
10662,
29901,
1051,
310,
13,
268,
584,
1990,
18078,
4873,
14459,
7422,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
4873,
14459,
7422,
13885,
13,
1678,
584,
3207,
10760,
29918,
6979,
29918,
11027,
29901,
450,
6055,
363,
385,
10760,
13,
268,
5993,
393,
278,
3414,
508,
671,
304,
2189,
350,
905,
2669,
6931,
29889,
960,
445,
13,
268,
2875,
338,
731,
29892,
278,
350,
905,
2669,
8128,
278,
3414,
411,
385,
13,
268,
10760,
5993,
607,
508,
367,
1304,
304,
15585,
403,
350,
905,
2669,
13,
268,
6931,
1728,
26795,
385,
3633,
2130,
1820,
29889,
450,
5993,
338,
4944,
13,
268,
3025,
278,
319,
29999,
29918,
29933,
14789,
29918,
20656,
29950,
3919,
28541,
29918,
4986,
29968,
1430,
5177,
2286,
29889,
450,
6931,
13,
268,
393,
278,
3414,
508,
8677,
714,
773,
278,
5993,
8839,
373,
278,
6055,
29889,
1152,
13,
268,
1342,
29892,
263,
3414,
508,
2009,
4982,
11239,
297,
1797,
304,
788,
916,
9595,
304,
13,
268,
278,
4982,
29892,
470,
1423,
278,
4660,
310,
278,
4982,
470,
310,
916,
9595,
1090,
278,
4982,
29889,
13,
1678,
584,
1853,
10760,
29918,
6979,
29918,
11027,
29901,
584,
1990,
18078,
16746,
6066,
9585,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
16746,
6066,
9585,
13885,
13,
1678,
584,
3207,
2758,
29918,
677,
29918,
29886,
21766,
29918,
3177,
29901,
26460,
278,
17163,
15629,
3414,
1122,
1065,
373,
263,
13,
268,
4482,
29899,
29886,
21766,
10272,
2943,
29889,
450,
2322,
995,
338,
2089,
29889,
13,
1678,
584,
1853,
2758,
29918,
677,
29918,
29886,
21766,
29918,
3177,
29901,
6120,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
333,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
333,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
4990,
29918,
978,
2396,
11117,
1989,
2396,
525,
4990,
1170,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
1989,
2396,
525,
6519,
3542,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
7611,
29918,
11027,
2396,
11117,
1989,
2396,
525,
7611,
9585,
742,
525,
1853,
2396,
525,
5398,
7895,
9585,
16675,
13,
4706,
525,
10314,
29918,
5325,
2396,
11117,
1989,
2396,
525,
10314,
10547,
742,
525,
1853,
2396,
525,
29961,
5647,
2760,
6848,
2283,
29962,
16675,
13,
4706,
525,
4905,
29918,
5325,
2396,
11117,
1989,
2396,
525,
4905,
10547,
742,
525,
1853,
2396,
525,
29961,
6466,
2283,
29962,
16675,
13,
4706,
525,
20944,
29918,
11027,
2396,
11117,
1989,
2396,
525,
20944,
9585,
742,
525,
1853,
2396,
525,
29961,
18649,
29020,
29962,
16675,
13,
4706,
525,
13646,
29879,
2396,
11117,
1989,
2396,
525,
13646,
29879,
742,
525,
1853,
2396,
525,
5398,
27427,
16675,
13,
4706,
525,
21174,
29918,
9057,
29918,
265,
29918,
5729,
12757,
2396,
11117,
1989,
2396,
525,
21174,
11947,
2951,
28958,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
4706,
525,
1792,
29918,
22350,
2396,
11117,
1989,
2396,
525,
1792,
18415,
742,
525,
1853,
2396,
525,
2659,
18415,
16675,
13,
4706,
525,
3389,
29918,
735,
7009,
573,
2396,
11117,
1989,
2396,
525,
3389,
1252,
7009,
573,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
4706,
525,
6214,
29918,
5113,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
6214,
14459,
1123,
10662,
742,
13,
462,
462,
965,
525,
1853,
2396,
525,
29961,
4873,
14459,
7422,
29962,
16675,
13,
4706,
525,
23055,
29918,
6979,
29918,
11027,
2396,
11117,
1989,
2396,
525,
23055,
6066,
9585,
742,
13,
462,
462,
3986,
525,
1853,
2396,
525,
16746,
6066,
9585,
16675,
13,
4706,
525,
9536,
29918,
677,
29918,
29886,
21766,
29918,
3177,
2396,
11117,
1989,
2396,
525,
9536,
29931,
340,
29925,
21766,
4247,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
11947,
3260,
5398,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
333,
353,
9049,
5085,
29889,
657,
877,
333,
742,
6213,
29897,
13,
4706,
1583,
29889,
4990,
29918,
978,
353,
9049,
5085,
29889,
657,
877,
4990,
29918,
978,
742,
6213,
29897,
13,
4706,
1583,
29889,
6519,
29918,
1220,
353,
9049,
5085,
29889,
657,
877,
6519,
29918,
1220,
742,
6213,
29897,
13,
4706,
1583,
29889,
7611,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
7611,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
10314,
29918,
5325,
353,
9049,
5085,
29889,
657,
877,
10314,
29918,
5325,
742,
6213,
29897,
13,
4706,
1583,
29889,
4905,
29918,
5325,
353,
9049,
5085,
29889,
657,
877,
4905,
29918,
5325,
742,
6213,
29897,
13,
4706,
1583,
29889,
20944,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
20944,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
13646,
29879,
353,
9049,
5085,
29889,
657,
877,
13646,
29879,
742,
6213,
29897,
13,
4706,
1583,
29889,
21174,
29918,
9057,
29918,
265,
29918,
5729,
12757,
353,
9049,
5085,
29889,
657,
877,
21174,
29918,
9057,
29918,
265,
29918,
5729,
12757,
742,
6213,
29897,
13,
4706,
1583,
29889,
1792,
29918,
22350,
353,
9049,
5085,
29889,
657,
877,
1792,
29918,
22350,
742,
6213,
29897,
13,
4706,
1583,
29889,
3389,
29918,
735,
7009,
573,
353,
9049,
5085,
29889,
657,
877,
3389,
29918,
735,
7009,
573,
742,
6213,
29897,
13,
4706,
1583,
29889,
6214,
29918,
5113,
29918,
276,
10662,
353,
9049,
5085,
29889,
657,
877,
6214,
29918,
5113,
29918,
276,
10662,
742,
6213,
29897,
13,
4706,
1583,
29889,
23055,
29918,
6979,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
23055,
29918,
6979,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
9536,
29918,
677,
29918,
29886,
21766,
29918,
3177,
353,
9049,
5085,
29889,
657,
877,
9536,
29918,
677,
29918,
29886,
21766,
29918,
3177,
742,
6213,
29897,
13,
13,
13,
1990,
17163,
6572,
862,
362,
5398,
29898,
3195,
1125,
13,
1678,
9995,
29909,
17163,
4721,
862,
362,
3414,
304,
1065,
1434,
738,
9595,
310,
278,
4982,
373,
738,
2183,
13,
1678,
10272,
2943,
29889,
13,
13,
1678,
887,
508,
671,
17163,
4721,
862,
362,
304,
19012,
263,
10272,
2943,
304,
1065,
9595,
363,
278,
13,
1678,
4982,
29889,
21775,
1907,
15574,
8560,
297,
17163,
4721,
862,
362,
3160,
29901,
9943,
13234,
13,
1678,
3619,
6503,
2066,
1304,
491,
599,
278,
9595,
297,
278,
4982,
29889,
450,
17163,
4721,
862,
362,
13,
1678,
3414,
508,
5142,
1438,
3619,
6503,
2066,
304,
278,
7258,
4423,
373,
278,
13,
1678,
10272,
2943,
29889,
313,
29909,
29999,
29918,
29933,
14789,
29918,
6632,
2287,
29918,
21289,
29918,
9464,
1966,
12366,
511,
470,
6257,
263,
1887,
2669,
13,
1678,
373,
278,
10272,
2943,
577,
393,
599,
9595,
310,
393,
4982,
508,
23120,
411,
372,
29889,
13,
1678,
960,
278,
17163,
4721,
862,
362,
3414,
8465,
313,
5747,
338,
29892,
27096,
29879,
967,
337,
2202,
2302,
1434,
13,
1678,
6876,
292,
411,
6876,
775,
29871,
29900,
511,
350,
905,
674,
451,
1065,
9595,
310,
445,
4982,
373,
278,
13,
1678,
10272,
2943,
29889,
450,
2943,
9242,
297,
295,
335,
1821,
304,
1065,
9595,
310,
445,
4982,
2745,
372,
13,
1678,
338,
337,
326,
4063,
29889,
450,
2943,
9242,
6136,
322,
508,
367,
1304,
363,
916,
17643,
29889,
450,
13,
1678,
17163,
4721,
862,
362,
3414,
508,
1065,
2999,
3064,
373,
278,
1021,
10272,
2943,
29889,
13,
1678,
7857,
29892,
366,
881,
2436,
278,
17163,
4721,
862,
362,
3414,
304,
4386,
13,
1678,
337,
29899,
22256,
29889,
960,
278,
10272,
2943,
338,
22538,
287,
29892,
278,
17163,
4721,
862,
362,
3414,
338,
13,
1678,
1065,
1449,
373,
278,
2943,
1434,
28598,
19478,
738,
916,
3414,
310,
278,
4982,
29892,
565,
13,
1678,
364,
261,
348,
2951,
4247,
29934,
774,
3155,
13555,
14191,
338,
1565,
470,
565,
278,
17163,
4721,
862,
362,
3414,
1258,
13,
1678,
451,
9251,
4866,
29889,
960,
278,
10272,
2943,
338,
337,
326,
4063,
29892,
278,
17163,
13,
1678,
4721,
862,
362,
3414,
338,
1065,
1449,
1434,
28598,
19478,
738,
3414,
310,
278,
4982,
29889,
13,
13,
1678,
584,
3207,
1178,
29901,
319,
1347,
393,
20498,
873,
2893,
11057,
278,
17163,
4721,
862,
362,
3414,
13,
268,
2629,
278,
4982,
29889,
450,
3553,
508,
1712,
738,
10296,
310,
394,
16711,
25099,
13,
268,
4890,
3704,
7498,
561,
575,
322,
23400,
29883,
2361,
322,
2609,
1712,
901,
1135,
13,
418,
29953,
29946,
4890,
29889,
960,
366,
437,
451,
6084,
445,
2875,
29892,
278,
350,
905,
2669,
13,
268,
3566,
29879,
263,
2322,
995,
310,
525,
9057,
1457,
862,
362,
4286,
1939,
916,
3414,
297,
278,
4982,
508,
13,
268,
505,
278,
1021,
3553,
408,
278,
17163,
4721,
862,
362,
3414,
29889,
960,
366,
1018,
304,
9752,
263,
3414,
13,
268,
411,
278,
1021,
3553,
29892,
278,
350,
905,
2669,
12560,
29879,
278,
2009,
411,
1059,
775,
13,
268,
9330,
1204,
29903,
420,
2887,
11947,
6572,
862,
362,
5398,
29936,
565,
366,
526,
5432,
278,
16759,
3450,
4153,
29892,
13,
268,
278,
7331,
4660,
775,
338,
29871,
29946,
29900,
29929,
313,
16376,
29176,
467,
13,
1678,
584,
1853,
1178,
29901,
851,
13,
1678,
584,
3207,
1899,
29918,
1220,
29901,
450,
1899,
1196,
310,
278,
17163,
4721,
862,
362,
3414,
29889,
450,
13,
268,
1899,
1196,
947,
451,
1065,
1090,
263,
6473,
29892,
322,
5480,
2609,
2125,
13,
268,
10631,
310,
6473,
5680,
1316,
408,
5177,
2286,
13184,
29889,
960,
366,
13,
268,
864,
304,
2125,
10631,
310,
1316,
5680,
29892,
366,
881,
15928,
278,
6473,
297,
13,
268,
278,
1899,
1196,
29892,
363,
1342,
773,
376,
9006,
847,
29883,
1619,
6255,
29908,
297,
3852,
470,
13,
268,
5591,
2109,
29914,
845,
448,
29883,
1619,
6255,
29908,
297,
8074,
29889,
13,
1678,
584,
1853,
1899,
29918,
1220,
29901,
851,
13,
1678,
584,
3207,
5639,
29918,
11027,
29901,
450,
6055,
363,
278,
5639,
1090,
607,
278,
13,
268,
17163,
4721,
862,
362,
3414,
6057,
29889,
1932,
445,
338,
6790,
29892,
599,
17525,
13,
268,
8304,
3598,
2400,
278,
319,
29999,
29918,
29933,
14789,
29918,
6632,
2287,
29918,
21289,
29918,
9464,
313,
1552,
3876,
310,
12634,
350,
905,
13,
268,
17525,
373,
278,
2943,
29897,
526,
20545,
964,
278,
5639,
29892,
599,
3414,
13,
268,
5177,
3651,
526,
20545,
964,
278,
5639,
29892,
322,
278,
3414,
1899,
13,
268,
1196,
338,
8283,
297,
278,
5639,
29889,
13,
1678,
584,
1853,
5639,
29918,
11027,
29901,
584,
1990,
18078,
5398,
7895,
9585,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
7895,
9585,
13885,
13,
1678,
584,
3207,
6503,
29918,
5325,
29901,
319,
1051,
310,
2066,
393,
278,
350,
905,
2669,
674,
13,
268,
5142,
304,
278,
10272,
2943,
1434,
2734,
278,
1899,
1196,
29889,
12745,
9904,
13,
268,
1090,
445,
1543,
526,
5982,
297,
278,
3414,
29915,
29879,
1985,
3884,
29889,
13,
1678,
584,
1853,
6503,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
5647,
2760,
6848,
2283,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5647,
2760,
6848,
2283,
13885,
13,
1678,
584,
3207,
5177,
29918,
11027,
29901,
319,
1051,
310,
5177,
2286,
6055,
363,
13,
268,
278,
17163,
4721,
862,
362,
3414,
29889,
13,
1678,
584,
1853,
5177,
29918,
11027,
29901,
1051,
310,
584,
1990,
18078,
18649,
29020,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18649,
29020,
13885,
13,
1678,
584,
3207,
11938,
29901,
1281,
4151,
9466,
393,
3394,
304,
278,
17163,
4721,
862,
362,
3414,
29889,
13,
1678,
584,
1853,
11938,
29901,
584,
1990,
18078,
5398,
27427,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
27427,
13885,
13,
1678,
584,
3207,
4480,
29918,
1454,
29918,
8698,
29901,
26460,
278,
350,
905,
2669,
881,
4480,
363,
278,
17163,
13,
268,
4721,
862,
362,
3414,
304,
4866,
8472,
1434,
28598,
19478,
738,
916,
13,
268,
9595,
310,
278,
4982,
373,
278,
10272,
2943,
29889,
319,
17163,
4721,
862,
362,
3414,
756,
8676,
13,
268,
8472,
565,
372,
429,
1169,
411,
6876,
775,
29871,
29900,
29889,
960,
1565,
322,
278,
17163,
4721,
862,
362,
13,
268,
3414,
8465,
373,
263,
10272,
2943,
29892,
278,
350,
905,
2669,
3240,
2722,
278,
17163,
13,
268,
4721,
862,
362,
3414,
701,
304,
967,
7472,
337,
2202,
2302,
313,
294,
6790,
297,
278,
13,
268,
11938,
1543,
467,
960,
278,
3414,
756,
1603,
451,
8676,
8472,
13,
268,
1156,
599,
3240,
2722,
29892,
769,
278,
350,
905,
2669,
674,
451,
20410,
9595,
310,
278,
13,
268,
4982,
304,
278,
10272,
2943,
29889,
450,
10272,
2943,
9242,
6136,
322,
560,
335,
1821,
304,
13,
268,
1065,
9595,
310,
916,
17643,
29889,
960,
2089,
29892,
278,
350,
905,
2669,
674,
451,
4480,
363,
278,
13,
268,
17163,
4721,
862,
362,
3414,
304,
4866,
29889,
512,
445,
1206,
29892,
916,
9595,
310,
278,
4982,
508,
13,
268,
1369,
14012,
373,
278,
10272,
2943,
1550,
278,
17163,
4721,
862,
362,
3414,
338,
13,
268,
1603,
2734,
29936,
322,
1584,
565,
278,
17163,
4721,
862,
362,
3414,
8465,
29892,
716,
9595,
674,
13,
268,
6773,
304,
367,
21467,
373,
278,
2943,
29889,
450,
2322,
995,
338,
1565,
29889,
13,
1678,
584,
1853,
4480,
29918,
1454,
29918,
8698,
29901,
6120,
13,
1678,
584,
3207,
1404,
29918,
22350,
29901,
450,
1404,
10110,
1090,
607,
278,
17163,
4721,
862,
362,
13,
268,
3414,
6057,
29889,
960,
25811,
29892,
278,
3414,
6057,
408,
263,
1661,
29899,
6406,
2132,
1230,
1404,
5412,
13,
268,
304,
278,
3414,
373,
3852,
7573,
29892,
470,
263,
263,
1661,
29899,
6406,
2132,
1230,
1404,
5412,
304,
278,
13,
268,
11565,
373,
8074,
7573,
29889,
13,
1678,
584,
1853,
1404,
29918,
22350,
29901,
584,
1990,
18078,
2659,
18415,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2659,
18415,
13885,
13,
1678,
584,
3207,
364,
261,
348,
29918,
265,
29918,
3177,
29918,
276,
4777,
29918,
7045,
29918,
8698,
29901,
26460,
278,
350,
905,
2669,
13,
268,
881,
364,
261,
348,
278,
17163,
4721,
862,
362,
3414,
1156,
263,
10272,
2943,
337,
833,
1862,
29889,
450,
13,
268,
17163,
4721,
862,
362,
3414,
338,
2337,
364,
261,
348,
565,
263,
10272,
2943,
338,
337,
326,
4063,
29892,
470,
565,
13,
268,
278,
17163,
4721,
862,
362,
3414,
1258,
451,
4866,
313,
29872,
29889,
29887,
29889,
1363,
278,
22538,
13,
268,
10761,
1550,
278,
3414,
471,
2734,
467,
7857,
29892,
366,
881,
2337,
2436,
263,
13,
268,
17163,
4721,
862,
362,
3414,
304,
367,
1957,
1526,
327,
296,
322,
304,
23389,
5149,
565,
1065,
13,
268,
2999,
3064,
29889,
450,
2322,
995,
338,
1565,
29889,
13,
1678,
584,
1853,
364,
261,
348,
29918,
265,
29918,
3177,
29918,
276,
4777,
29918,
7045,
29918,
8698,
29901,
6120,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
333,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
1989,
2396,
525,
6519,
3542,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
7611,
29918,
11027,
2396,
11117,
1989,
2396,
525,
7611,
9585,
742,
525,
1853,
2396,
525,
5398,
7895,
9585,
16675,
13,
4706,
525,
10314,
29918,
5325,
2396,
11117,
1989,
2396,
525,
10314,
10547,
742,
525,
1853,
2396,
525,
29961,
5647,
2760,
6848,
2283,
29962,
16675,
13,
4706,
525,
20944,
29918,
11027,
2396,
11117,
1989,
2396,
525,
20944,
9585,
742,
525,
1853,
2396,
525,
29961,
18649,
29020,
29962,
16675,
13,
4706,
525,
13646,
29879,
2396,
11117,
1989,
2396,
525,
13646,
29879,
742,
525,
1853,
2396,
525,
5398,
27427,
16675,
13,
4706,
525,
10685,
29918,
1454,
29918,
8698,
2396,
11117,
1989,
2396,
525,
10685,
2831,
14191,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
4706,
525,
1792,
29918,
22350,
2396,
11117,
1989,
2396,
525,
1792,
18415,
742,
525,
1853,
2396,
525,
2659,
18415,
16675,
13,
4706,
525,
2872,
348,
29918,
265,
29918,
3177,
29918,
276,
4777,
29918,
7045,
29918,
8698,
2396,
11117,
1989,
2396,
525,
2872,
348,
2951,
4247,
29934,
774,
3155,
13555,
14191,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
11947,
6572,
862,
362,
5398,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
333,
353,
9049,
5085,
29889,
657,
877,
333,
742,
6213,
29897,
13,
4706,
1583,
29889,
6519,
29918,
1220,
353,
9049,
5085,
29889,
657,
877,
6519,
29918,
1220,
742,
6213,
29897,
13,
4706,
1583,
29889,
7611,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
7611,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
10314,
29918,
5325,
353,
9049,
5085,
29889,
657,
877,
10314,
29918,
5325,
742,
6213,
29897,
13,
4706,
1583,
29889,
20944,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
20944,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
13646,
29879,
353,
9049,
5085,
29889,
657,
877,
13646,
29879,
742,
6213,
29897,
13,
4706,
1583,
29889,
10685,
29918,
1454,
29918,
8698,
353,
9049,
5085,
29889,
657,
877,
10685,
29918,
1454,
29918,
8698,
742,
6213,
29897,
13,
4706,
1583,
29889,
1792,
29918,
22350,
353,
9049,
5085,
29889,
657,
877,
1792,
29918,
22350,
742,
6213,
29897,
13,
4706,
1583,
29889,
2872,
348,
29918,
265,
29918,
3177,
29918,
276,
4777,
29918,
7045,
29918,
8698,
353,
9049,
5085,
29889,
657,
877,
2872,
348,
29918,
265,
29918,
3177,
29918,
276,
4777,
29918,
7045,
29918,
8698,
742,
6213,
29897,
13,
13,
13,
1990,
17163,
19729,
5398,
29898,
3195,
1125,
13,
1678,
9995,
29909,
17163,
23708,
3414,
304,
1065,
373,
4982,
13285,
373,
738,
10272,
2943,
988,
278,
13,
1678,
4982,
756,
1065,
29889,
13,
13,
1678,
450,
17163,
23708,
3414,
6057,
746,
278,
4982,
10614,
29892,
1363,
310,
697,
310,
278,
13,
1678,
1494,
29901,
450,
1404,
5717,
278,
11814,
16976,
17163,
3450,
29892,
470,
278,
21267,
17163,
3450,
13,
1678,
1550,
278,
4982,
338,
1603,
6136,
29892,
278,
4982,
29915,
29879,
7472,
10090,
12006,
931,
7276,
13,
1678,
338,
7450,
29892,
322,
278,
4982,
338,
1603,
6136,
29892,
470,
278,
4982,
29915,
29879,
17163,
15629,
3414,
13,
1678,
8676,
29892,
322,
278,
4982,
338,
13252,
304,
29504,
746,
278,
17163,
15629,
13,
1678,
1614,
2167,
29889,
450,
17163,
23708,
3414,
6057,
373,
1269,
10272,
2943,
988,
9595,
310,
13,
1678,
278,
4982,
505,
1065,
322,
278,
17163,
4721,
862,
362,
3414,
6350,
322,
8676,
29889,
960,
366,
13,
1678,
337,
3027,
263,
10272,
2943,
1156,
372,
756,
1065,
278,
17163,
4721,
862,
362,
3414,
29892,
322,
278,
13,
1678,
4982,
10614,
1728,
738,
4340,
9595,
310,
278,
4982,
2734,
373,
393,
10272,
2943,
13,
1678,
313,
392,
8151,
278,
17163,
4721,
862,
362,
3414,
947,
451,
337,
29899,
3389,
511,
769,
278,
17163,
23708,
13,
1678,
3414,
947,
451,
1065,
373,
393,
2943,
29889,
960,
263,
10272,
2943,
337,
833,
1862,
1550,
278,
17163,
13,
1678,
23708,
3414,
338,
1603,
2734,
29892,
278,
17163,
23708,
3414,
6057,
1449,
746,
278,
13,
1678,
10272,
2943,
8665,
701,
29889,
450,
4982,
338,
451,
10902,
408,
4866,
2745,
599,
17163,
13,
1678,
23708,
9595,
505,
8676,
29889,
450,
17163,
23708,
3414,
6057,
297,
278,
3239,
29889,
13,
1678,
739,
947,
451,
6919,
29891,
263,
28598,
19478,
21497,
29936,
393,
338,
29892,
372,
947,
451,
2302,
7113,
13,
1678,
278,
4236,
26249,
5894,
4247,
4046,
6790,
373,
278,
11565,
29889,
13,
13,
1678,
584,
3207,
1178,
29901,
319,
1347,
393,
20498,
873,
2893,
11057,
278,
17163,
23708,
3414,
2629,
13,
268,
278,
4982,
29889,
450,
3553,
508,
1712,
738,
10296,
310,
394,
16711,
25099,
4890,
13,
268,
3704,
7498,
561,
575,
322,
23400,
29883,
2361,
322,
2609,
1712,
901,
1135,
29871,
29953,
29946,
13,
268,
4890,
29889,
960,
366,
437,
451,
6084,
445,
2875,
29892,
278,
350,
905,
2669,
3566,
29879,
13,
268,
263,
2322,
995,
310,
525,
29926,
7630,
1511,
4286,
1939,
916,
3414,
297,
278,
4982,
508,
505,
278,
13,
268,
1021,
3553,
408,
278,
17163,
23708,
3414,
29889,
960,
366,
1018,
304,
9752,
263,
3414,
411,
278,
1021,
13,
268,
3553,
29892,
278,
350,
905,
2669,
12560,
29879,
278,
2009,
411,
1059,
775,
13,
268,
9330,
1204,
29903,
420,
2887,
11947,
19729,
5398,
29936,
565,
366,
526,
5432,
278,
16759,
3450,
4153,
29892,
278,
13,
268,
7331,
4660,
775,
338,
29871,
29946,
29900,
29929,
313,
16376,
29176,
467,
13,
1678,
584,
1853,
1178,
29901,
851,
13,
1678,
584,
3207,
1899,
29918,
1220,
29901,
450,
1899,
1196,
310,
278,
17163,
23708,
3414,
29889,
450,
1899,
13,
268,
1196,
947,
451,
1065,
1090,
263,
6473,
29892,
322,
5480,
2609,
2125,
10631,
310,
13,
268,
6473,
5680,
1316,
408,
5177,
2286,
13184,
29889,
960,
366,
864,
304,
2125,
13,
268,
10631,
310,
1316,
5680,
29892,
366,
881,
15928,
278,
6473,
297,
278,
1899,
13,
268,
1196,
29892,
363,
1342,
773,
376,
9006,
847,
29883,
1619,
6255,
29908,
297,
3852,
470,
5591,
2109,
29914,
845,
448,
29883,
13,
268,
1619,
6255,
29908,
297,
8074,
29889,
13,
1678,
584,
1853,
1899,
29918,
1220,
29901,
851,
13,
1678,
584,
3207,
5639,
29918,
11027,
29901,
450,
6055,
363,
278,
5639,
1090,
607,
278,
13,
268,
17163,
23708,
3414,
6057,
29889,
1932,
445,
338,
6790,
29892,
599,
17525,
8304,
3598,
13,
268,
2400,
278,
319,
29999,
29918,
29933,
14789,
29918,
6632,
2287,
29918,
21289,
29918,
9464,
313,
1552,
3876,
310,
12634,
350,
905,
17525,
373,
13,
268,
278,
2943,
29897,
526,
20545,
964,
278,
5639,
29892,
599,
3414,
5177,
3651,
13,
268,
526,
20545,
964,
278,
5639,
29892,
322,
278,
3414,
1899,
1196,
338,
8283,
297,
13,
268,
278,
5639,
29889,
13,
1678,
584,
1853,
5639,
29918,
11027,
29901,
584,
1990,
18078,
5398,
7895,
9585,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
7895,
9585,
13885,
13,
1678,
584,
3207,
6503,
29918,
5325,
29901,
319,
1051,
310,
2066,
393,
278,
350,
905,
2669,
674,
13,
268,
5142,
304,
278,
10272,
2943,
1434,
2734,
278,
1899,
1196,
29889,
12745,
9904,
13,
268,
1090,
445,
1543,
526,
5982,
297,
278,
3414,
29915,
29879,
1985,
3884,
29889,
13,
1678,
584,
1853,
6503,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
5647,
2760,
6848,
2283,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5647,
2760,
6848,
2283,
13885,
13,
1678,
584,
3207,
5177,
29918,
11027,
29901,
319,
1051,
310,
5177,
2286,
6055,
363,
13,
268,
278,
17163,
23708,
3414,
29889,
13,
1678,
584,
1853,
5177,
29918,
11027,
29901,
1051,
310,
584,
1990,
18078,
18649,
29020,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18649,
29020,
13885,
13,
1678,
584,
3207,
4236,
29918,
11358,
29918,
13058,
29918,
2230,
29901,
450,
7472,
560,
28170,
931,
393,
278,
17163,
23708,
13,
268,
3414,
1122,
1065,
373,
263,
2183,
10272,
2943,
29892,
17005,
515,
278,
931,
278,
3414,
13,
268,
8665,
29889,
960,
278,
3414,
947,
451,
4866,
2629,
278,
931,
4046,
29892,
278,
350,
905,
13,
268,
2669,
6624,
1078,
372,
29889,
450,
2322,
995,
338,
29871,
29896,
29945,
6233,
29889,
887,
1122,
451,
13,
268,
6084,
263,
11815,
5520,
1135,
29871,
29896,
29945,
6233,
29889,
960,
366,
437,
29892,
278,
350,
905,
2669,
13,
268,
12560,
29879,
372,
411,
385,
1059,
29936,
565,
366,
526,
5432,
278,
16759,
3450,
4153,
29892,
278,
13,
268,
7331,
4660,
775,
338,
29871,
29946,
29900,
29900,
313,
22050,
10729,
467,
13,
1678,
584,
1853,
4236,
29918,
11358,
29918,
13058,
29918,
2230,
29901,
5335,
287,
2554,
13,
1678,
584,
3207,
3240,
2509,
29918,
2230,
29901,
450,
9212,
931,
304,
11551,
278,
3414,
3884,
363,
13,
268,
278,
17163,
23708,
3414,
373,
278,
10272,
2943,
29889,
2860,
445,
931,
29892,
278,
350,
905,
13,
268,
2669,
1122,
5217,
278,
3414,
3884,
322,
599,
967,
8118,
29889,
450,
2322,
338,
13,
268,
10362,
29892,
474,
29889,
29872,
29889,
278,
3414,
3884,
674,
367,
26060,
2745,
278,
10272,
2943,
13,
268,
338,
6206,
470,
337,
326,
4063,
29889,
13,
1678,
584,
1853,
3240,
2509,
29918,
2230,
29901,
5335,
287,
2554,
13,
1678,
584,
3207,
1404,
29918,
22350,
29901,
450,
1404,
10110,
1090,
607,
278,
17163,
23708,
3414,
13,
268,
6057,
29889,
960,
25811,
29892,
278,
3414,
6057,
408,
263,
1661,
29899,
6406,
2132,
1230,
1404,
5412,
304,
278,
13,
268,
3414,
29889,
13,
1678,
584,
1853,
1404,
29918,
22350,
29901,
584,
1990,
18078,
2659,
18415,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2659,
18415,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
333,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
1989,
2396,
525,
6519,
3542,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
7611,
29918,
11027,
2396,
11117,
1989,
2396,
525,
7611,
9585,
742,
525,
1853,
2396,
525,
5398,
7895,
9585,
16675,
13,
4706,
525,
10314,
29918,
5325,
2396,
11117,
1989,
2396,
525,
10314,
10547,
742,
525,
1853,
2396,
525,
29961,
5647,
2760,
6848,
2283,
29962,
16675,
13,
4706,
525,
20944,
29918,
11027,
2396,
11117,
1989,
2396,
525,
20944,
9585,
742,
525,
1853,
2396,
525,
29961,
18649,
29020,
29962,
16675,
13,
4706,
525,
3317,
29918,
11358,
29918,
13058,
29918,
2230,
2396,
11117,
1989,
2396,
525,
3317,
29956,
497,
29907,
908,
2481,
742,
525,
1853,
2396,
525,
19708,
16675,
13,
4706,
525,
2267,
2509,
29918,
2230,
2396,
11117,
1989,
2396,
525,
2267,
2509,
2481,
742,
525,
1853,
2396,
525,
19708,
16675,
13,
4706,
525,
1792,
29918,
22350,
2396,
11117,
1989,
2396,
525,
1792,
18415,
742,
525,
1853,
2396,
525,
2659,
18415,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
11947,
19729,
5398,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
333,
353,
9049,
5085,
29889,
657,
877,
333,
742,
6213,
29897,
13,
4706,
1583,
29889,
6519,
29918,
1220,
353,
9049,
5085,
29889,
657,
877,
6519,
29918,
1220,
742,
6213,
29897,
13,
4706,
1583,
29889,
7611,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
7611,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
10314,
29918,
5325,
353,
9049,
5085,
29889,
657,
877,
10314,
29918,
5325,
742,
6213,
29897,
13,
4706,
1583,
29889,
20944,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
20944,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
3317,
29918,
11358,
29918,
13058,
29918,
2230,
353,
9049,
5085,
29889,
657,
877,
3317,
29918,
11358,
29918,
13058,
29918,
2230,
742,
6213,
29897,
13,
4706,
1583,
29889,
2267,
2509,
29918,
2230,
353,
9049,
5085,
29889,
657,
877,
2267,
2509,
29918,
2230,
742,
6213,
29897,
13,
4706,
1583,
29889,
1792,
29918,
22350,
353,
9049,
5085,
29889,
657,
877,
1792,
29918,
22350,
742,
6213,
29897,
13,
13,
13,
1990,
17163,
6733,
29898,
3195,
1125,
13,
1678,
9995,
29909,
17163,
25663,
29889,
13,
13,
1678,
584,
440,
279,
1134,
29901,
450,
1134,
310,
1203,
5439,
491,
278,
4472,
29889,
19928,
367,
29901,
13,
268,
376,
11277,
29889,
23145,
29914,
16175,
10601,
29879,
29914,
9057,
29879,
29908,
13,
1678,
584,
1853,
1134,
29901,
851,
13,
1678,
584,
3207,
7882,
29918,
3259,
29901,
450,
3450,
1873,
393,
278,
4472,
378,
9514,
304,
29889,
13,
1678,
584,
1853,
7882,
29918,
3259,
29901,
851,
13,
1678,
584,
3207,
4426,
29901,
450,
2702,
14114,
310,
278,
4982,
29889,
13,
1678,
584,
1853,
4426,
29901,
584,
1990,
18078,
5647,
2760,
11947,
9329,
29966,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5647,
2760,
11947,
9329,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
12403,
2396,
5852,
29892,
525,
23362,
2396,
5852,
1118,
13,
4706,
525,
11330,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
2754,
29918,
3259,
2396,
11117,
1989,
2396,
525,
2754,
6594,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
11330,
2396,
11117,
1989,
2396,
525,
11330,
742,
525,
1853,
2396,
525,
5647,
2760,
11947,
9329,
16675,
13,
1678,
500,
13,
13,
1678,
1134,
353,
376,
11277,
29889,
23145,
29914,
16175,
10601,
29879,
29914,
9057,
29879,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
11947,
6733,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
11330,
353,
9049,
5085,
29889,
657,
877,
11330,
1495,
13,
4706,
1583,
29889,
2754,
29918,
3259,
353,
9049,
5085,
29889,
657,
877,
2754,
29918,
3259,
742,
6213,
29897,
13,
13,
13,
1990,
4702,
479,
5398,
29898,
3195,
1125,
13,
1678,
9995,
2744,
12634,
350,
905,
3414,
4472,
304,
12312,
29889,
13,
13,
1678,
584,
3207,
851,
1178,
29901,
450,
3553,
310,
278,
10366,
3414,
29889,
13,
1678,
584,
3207,
2479,
29918,
978,
29901,
319,
2479,
1024,
363,
278,
3414,
29889,
450,
2479,
1024,
817,
13,
268,
451,
367,
5412,
322,
508,
1712,
738,
23862,
4890,
701,
304,
263,
7472,
13,
268,
3309,
310,
29871,
29896,
29900,
29906,
29946,
29889,
13,
1678,
584,
1853,
2479,
29918,
978,
29901,
851,
13,
1678,
584,
3207,
1899,
29918,
1220,
29901,
450,
1899,
1196,
310,
278,
3414,
29889,
1152,
2473,
29899,
8758,
13,
268,
9595,
29892,
278,
1899,
1196,
338,
8283,
408,
278,
7601,
3414,
29892,
1156,
278,
7601,
13,
268,
3414,
322,
599,
1014,
20673,
505,
7743,
14012,
278,
29311,
3381,
1899,
13,
268,
1196,
29889,
450,
1899,
1196,
947,
451,
1065,
1090,
263,
6473,
29892,
322,
5480,
2609,
13,
268,
2125,
10631,
310,
6473,
5680,
1316,
408,
5177,
2286,
13184,
29889,
13,
268,
960,
366,
864,
304,
2125,
10631,
310,
1316,
5680,
29892,
366,
881,
15928,
278,
13,
268,
6473,
297,
278,
1899,
1196,
29892,
363,
1342,
773,
376,
9006,
847,
29883,
1619,
6255,
29908,
297,
3852,
13,
268,
470,
5591,
2109,
29914,
845,
448,
29883,
1619,
6255,
29908,
297,
8074,
29889,
13,
1678,
584,
1853,
1899,
29918,
1220,
29901,
851,
13,
1678,
584,
3207,
6876,
29918,
1116,
2187,
29901,
1128,
278,
350,
905,
2669,
881,
10049,
746,
278,
3414,
13,
268,
1614,
2167,
29889,
13,
1678,
584,
1853,
6876,
29918,
1116,
2187,
29901,
584,
1990,
18078,
24365,
10983,
2187,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
24365,
10983,
2187,
13885,
13,
1678,
584,
3207,
6503,
29918,
5325,
29901,
319,
1051,
310,
2066,
393,
278,
350,
905,
2669,
674,
13,
268,
5142,
304,
278,
10272,
2943,
1434,
2734,
278,
1899,
1196,
29889,
1152,
13,
268,
2473,
29899,
8758,
9595,
29892,
278,
6503,
2066,
674,
871,
367,
16532,
304,
278,
13,
268,
10272,
2943,
373,
607,
278,
7601,
3414,
338,
8283,
29889,
13,
1678,
584,
1853,
6503,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
5647,
2760,
6848,
2283,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5647,
2760,
6848,
2283,
13885,
13,
1678,
584,
3207,
5177,
29918,
11027,
29901,
319,
1051,
310,
5177,
2286,
6055,
363,
13,
268,
278,
3414,
29889,
13,
1678,
584,
1853,
5177,
29918,
11027,
29901,
1051,
310,
584,
1990,
18078,
18649,
29020,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18649,
29020,
13885,
13,
1678,
584,
3207,
2756,
13593,
29918,
3888,
29901,
319,
1887,
537,
13182,
393,
508,
367,
1304,
491,
278,
350,
905,
13,
268,
2669,
304,
1831,
263,
10272,
2943,
373,
607,
304,
1369,
278,
716,
3414,
29889,
13,
1678,
584,
1853,
2756,
13593,
29918,
3888,
29901,
584,
1990,
18078,
27867,
13593,
20350,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
27867,
13593,
20350,
13885,
13,
1678,
584,
3207,
11938,
29901,
450,
8225,
11938,
393,
3394,
304,
445,
3414,
29889,
960,
13,
268,
366,
437,
451,
6084,
11938,
29892,
278,
4236,
5398,
8015,
719,
3981,
338,
278,
13,
268,
4236,
5398,
8015,
719,
3981,
6790,
363,
278,
4982,
29892,
322,
278,
4236,
29956,
497,
29907,
908,
2481,
322,
13,
268,
3240,
2509,
2481,
526,
10362,
29889,
13,
1678,
584,
1853,
11938,
29901,
584,
1990,
18078,
5398,
27427,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
27427,
13885,
13,
1678,
584,
3207,
1404,
29918,
22350,
29901,
450,
1404,
10110,
1090,
607,
278,
3414,
6057,
29889,
960,
13,
268,
25811,
29892,
278,
3414,
6057,
408,
263,
1661,
29899,
6406,
2132,
1230,
1404,
5412,
304,
278,
3414,
29889,
13,
1678,
584,
1853,
1404,
29918,
22350,
29901,
584,
1990,
18078,
2659,
18415,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2659,
18415,
13885,
13,
1678,
584,
3207,
7111,
29918,
265,
29901,
450,
9595,
393,
445,
3414,
7111,
373,
29889,
910,
3414,
674,
451,
13,
268,
367,
21467,
2745,
599,
9595,
393,
372,
7111,
373,
505,
8676,
13,
268,
8472,
29889,
960,
738,
310,
1906,
9595,
4418,
322,
27096,
1009,
337,
2202,
18139,
29892,
13,
268,
445,
3414,
674,
2360,
367,
21467,
29889,
960,
278,
4982,
947,
451,
505,
13,
268,
3913,
5398,
8498,
7158,
731,
304,
1565,
29892,
322,
445,
1543,
338,
2198,
29892,
278,
2009,
13,
268,
8465,
411,
1059,
775,
9330,
8498,
7158,
3664,
10299,
2164,
2951,
11947,
29889,
13,
1678,
584,
1853,
7111,
29918,
265,
29901,
584,
1990,
18078,
5398,
8498,
7158,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
8498,
7158,
13885,
13,
1678,
584,
3207,
2280,
29918,
5113,
29918,
276,
10662,
29901,
319,
1051,
310,
2280,
9741,
393,
13,
268,
278,
350,
905,
2669,
674,
7246,
304,
278,
10272,
2943,
1434,
2734,
278,
13,
268,
1899,
1196,
29889,
13,
1678,
584,
1853,
2280,
29918,
5113,
29918,
276,
10662,
29901,
1051,
310,
13,
268,
584,
1990,
18078,
4873,
14459,
7422,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
4873,
14459,
7422,
13885,
13,
1678,
584,
3207,
10760,
29918,
6979,
29918,
11027,
29901,
450,
6055,
363,
385,
10760,
13,
268,
5993,
393,
278,
3414,
508,
671,
304,
2189,
350,
905,
2669,
6931,
29889,
960,
445,
13,
268,
2875,
338,
731,
29892,
278,
350,
905,
2669,
8128,
278,
3414,
411,
385,
13,
268,
10760,
5993,
607,
508,
367,
1304,
304,
15585,
403,
350,
905,
2669,
13,
268,
6931,
1728,
26795,
385,
3633,
2130,
1820,
29889,
450,
5993,
338,
4944,
13,
268,
3025,
278,
319,
29999,
29918,
29933,
14789,
29918,
20656,
29950,
3919,
28541,
29918,
4986,
29968,
1430,
5177,
2286,
29889,
450,
6931,
13,
268,
393,
278,
3414,
508,
8677,
714,
773,
278,
5993,
8839,
373,
278,
6055,
29889,
1152,
13,
268,
1342,
29892,
263,
3414,
508,
2009,
4982,
11239,
297,
1797,
304,
788,
916,
9595,
304,
13,
268,
278,
4982,
29892,
470,
1423,
278,
4660,
310,
278,
4982,
470,
310,
916,
9595,
1090,
278,
4982,
29889,
13,
1678,
584,
1853,
10760,
29918,
6979,
29918,
11027,
29901,
584,
1990,
18078,
16746,
6066,
9585,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
16746,
6066,
9585,
13885,
13,
1678,
584,
3207,
1962,
29918,
5325,
29901,
319,
1051,
310,
1962,
934,
9282,
304,
701,
3736,
12652,
2748,
13,
268,
278,
3414,
756,
8676,
29889,
13,
1678,
584,
1853,
1962,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
6466,
2283,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
6466,
2283,
13885,
13,
1678,
584,
3207,
3577,
29918,
276,
10662,
29901,
319,
1051,
310,
9741,
304,
367,
5130,
373,
278,
10272,
13,
268,
7573,
29889,
19928,
367,
310,
263,
22029,
15629,
1134,
297,
15017,
749,
411,
278,
4629,
13,
268,
13598,
1788,
29889,
13,
1678,
584,
1853,
3577,
29918,
276,
10662,
29901,
1051,
310,
584,
1990,
18078,
14459,
7422,
5160,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
14459,
7422,
5160,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
333,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
4990,
29918,
978,
2396,
11117,
1989,
2396,
525,
4990,
1170,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
1989,
2396,
525,
6519,
3542,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
13322,
29918,
1116,
2187,
2396,
11117,
1989,
2396,
525,
13322,
10983,
2187,
742,
525,
1853,
2396,
525,
24365,
10983,
2187,
16675,
13,
4706,
525,
10314,
29918,
5325,
2396,
11117,
1989,
2396,
525,
10314,
10547,
742,
525,
1853,
2396,
525,
29961,
5647,
2760,
6848,
2283,
29962,
16675,
13,
4706,
525,
20944,
29918,
11027,
2396,
11117,
1989,
2396,
525,
20944,
9585,
742,
525,
1853,
2396,
525,
29961,
18649,
29020,
29962,
16675,
13,
4706,
525,
3470,
13593,
29918,
3888,
2396,
11117,
1989,
2396,
525,
3470,
13593,
3401,
742,
525,
1853,
2396,
525,
27867,
13593,
20350,
16675,
13,
4706,
525,
13646,
29879,
2396,
11117,
1989,
2396,
525,
13646,
29879,
742,
525,
1853,
2396,
525,
5398,
27427,
16675,
13,
4706,
525,
1792,
29918,
22350,
2396,
11117,
1989,
2396,
525,
1792,
18415,
742,
525,
1853,
2396,
525,
2659,
18415,
16675,
13,
4706,
525,
2716,
1975,
29918,
265,
2396,
11117,
1989,
2396,
525,
2716,
1975,
2951,
742,
525,
1853,
2396,
525,
5398,
8498,
7158,
16675,
13,
4706,
525,
6214,
29918,
5113,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
6214,
14459,
1123,
10662,
742,
13,
462,
462,
965,
525,
1853,
2396,
525,
29961,
4873,
14459,
7422,
29962,
16675,
13,
4706,
525,
23055,
29918,
6979,
29918,
11027,
2396,
11117,
1989,
2396,
525,
23055,
6066,
9585,
742,
13,
462,
462,
3986,
525,
1853,
2396,
525,
16746,
6066,
9585,
16675,
13,
4706,
525,
4905,
29918,
5325,
2396,
11117,
1989,
2396,
525,
4905,
10547,
742,
525,
1853,
2396,
525,
29961,
6466,
2283,
29962,
16675,
13,
4706,
525,
5113,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
5113,
1123,
10662,
742,
525,
1853,
2396,
525,
29961,
14459,
7422,
5160,
29962,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
15836,
479,
5398,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
333,
353,
9049,
5085,
29889,
657,
877,
333,
742,
6213,
29897,
13,
4706,
1583,
29889,
4990,
29918,
978,
353,
9049,
5085,
29889,
657,
877,
4990,
29918,
978,
742,
6213,
29897,
13,
4706,
1583,
29889,
6519,
29918,
1220,
353,
9049,
5085,
29889,
657,
877,
6519,
29918,
1220,
1495,
13,
4706,
1583,
29889,
13322,
29918,
1116,
2187,
353,
9049,
5085,
29889,
657,
877,
13322,
29918,
1116,
2187,
742,
6213,
29897,
13,
4706,
1583,
29889,
10314,
29918,
5325,
353,
9049,
5085,
29889,
657,
877,
10314,
29918,
5325,
742,
6213,
29897,
13,
4706,
1583,
29889,
20944,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
20944,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
3470,
13593,
29918,
3888,
353,
9049,
5085,
29889,
657,
877,
3470,
13593,
29918,
3888,
742,
6213,
29897,
13,
4706,
1583,
29889,
13646,
29879,
353,
9049,
5085,
29889,
657,
877,
13646,
29879,
742,
6213,
29897,
13,
4706,
1583,
29889,
1792,
29918,
22350,
353,
9049,
5085,
29889,
657,
877,
1792,
29918,
22350,
742,
6213,
29897,
13,
4706,
1583,
29889,
2716,
1975,
29918,
265,
353,
9049,
5085,
29889,
657,
877,
2716,
1975,
29918,
265,
742,
6213,
29897,
13,
4706,
1583,
29889,
6214,
29918,
5113,
29918,
276,
10662,
353,
9049,
5085,
29889,
657,
877,
6214,
29918,
5113,
29918,
276,
10662,
742,
6213,
29897,
13,
4706,
1583,
29889,
23055,
29918,
6979,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
23055,
29918,
6979,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
4905,
29918,
5325,
353,
9049,
5085,
29889,
657,
877,
4905,
29918,
5325,
742,
6213,
29897,
13,
4706,
1583,
29889,
5113,
29918,
276,
10662,
353,
9049,
5085,
29889,
657,
877,
5113,
29918,
276,
10662,
742,
6213,
29897,
13,
13,
13,
1990,
14974,
4998,
9585,
29898,
3195,
1125,
13,
1678,
9995,
9585,
607,
6084,
920,
304,
1065,
263,
2473,
29899,
8758,
3414,
29889,
13,
13,
1678,
14974,
29899,
8758,
9595,
526,
15574,
1304,
304,
2304,
341,
2227,
9595,
29889,
13,
13,
1678,
584,
3207,
1353,
29918,
974,
29918,
2611,
2925,
29901,
450,
1353,
310,
10272,
7573,
3734,
491,
278,
13,
268,
3414,
29889,
960,
25811,
29892,
278,
2322,
338,
29871,
29896,
29889,
13,
1678,
584,
1853,
1353,
29918,
974,
29918,
2611,
2925,
29901,
938,
13,
1678,
584,
3207,
29311,
3381,
29918,
6519,
29918,
1220,
29901,
450,
1899,
1196,
304,
1065,
373,
599,
278,
13,
268,
10272,
7573,
304,
9025,
963,
304,
14821,
746,
278,
7601,
6057,
278,
1667,
13,
268,
3414,
1899,
29889,
319,
15662,
29311,
3381,
1899,
1196,
6826,
267,
263,
3239,
13,
268,
2669,
322,
1147,
11057,
393,
278,
2669,
338,
7960,
304,
1889,
1006,
29899,
3177,
13,
268,
7191,
29889,
13,
1678,
584,
1853,
29311,
3381,
29918,
6519,
29918,
1220,
29901,
851,
13,
1678,
584,
3207,
3619,
29918,
10314,
29918,
5325,
29901,
319,
1051,
310,
2066,
393,
278,
350,
905,
2669,
674,
13,
268,
5142,
1434,
2734,
278,
29311,
3381,
1899,
1196,
29889,
450,
4328,
13,
268,
1546,
3619,
6503,
2066,
322,
3414,
6503,
2066,
338,
393,
3619,
13,
268,
6503,
2066,
526,
16532,
363,
599,
1014,
20673,
3704,
278,
7601,
29892,
13,
268,
13452,
3414,
6503,
2066,
526,
16532,
871,
363,
278,
7601,
29889,
3115,
4443,
13,
268,
393,
1438,
6503,
2066,
526,
451,
16532,
304,
278,
3414,
1985,
13,
268,
3884,
29892,
541,
2012,
526,
16532,
304,
278,
3414,
3876,
3884,
313,
650,
13,
268,
3884,
2038,
278,
1985,
3884,
467,
13,
1678,
584,
1853,
3619,
29918,
10314,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
5647,
2760,
6848,
2283,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5647,
2760,
6848,
2283,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1111,
536,
3381,
29918,
6519,
29918,
1220,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
4537,
29918,
974,
29918,
2611,
2925,
2396,
11117,
1989,
2396,
525,
4537,
2776,
3379,
2925,
742,
525,
1853,
2396,
525,
524,
16675,
13,
4706,
525,
1111,
536,
3381,
29918,
6519,
29918,
1220,
2396,
11117,
1989,
2396,
525,
1111,
536,
3381,
6255,
3542,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
9435,
29918,
10314,
29918,
5325,
2396,
11117,
1989,
2396,
525,
9435,
6848,
10547,
742,
525,
1853,
2396,
525,
29961,
5647,
2760,
6848,
2283,
29962,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
15329,
4998,
9585,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
4537,
29918,
974,
29918,
2611,
2925,
353,
9049,
5085,
29889,
657,
877,
4537,
29918,
974,
29918,
2611,
2925,
1495,
13,
4706,
1583,
29889,
1111,
536,
3381,
29918,
6519,
29918,
1220,
353,
9049,
5085,
29889,
657,
877,
1111,
536,
3381,
29918,
6519,
29918,
1220,
742,
6213,
29897,
13,
4706,
1583,
29889,
9435,
29918,
10314,
29918,
5325,
353,
9049,
5085,
29889,
657,
877,
9435,
29918,
10314,
29918,
5325,
742,
6213,
29897,
13,
13,
13,
1990,
10604,
2283,
29898,
3195,
1125,
13,
1678,
9995,
29909,
21992,
363,
6441,
292,
2066,
515,
385,
12634,
350,
905,
2943,
304,
1790,
13,
1678,
4423,
1156,
278,
350,
905,
2669,
756,
7743,
14012,
278,
3414,
1889,
29889,
13,
13,
1678,
584,
3207,
934,
29918,
11037,
29901,
319,
4766,
23941,
607,
934,
29898,
29879,
29897,
304,
6441,
29889,
9134,
13,
268,
6198,
322,
8380,
10898,
526,
6969,
29889,
6376,
1230,
10898,
526,
6198,
304,
13,
268,
278,
3414,
1985,
3884,
29889,
450,
1494,
8775,
28160,
526,
6969,
29901,
334,
13,
268,
7087,
29871,
29900,
470,
901,
4890,
313,
1454,
1342,
4766,
25638,
29930,
723,
1993,
25638,
470,
13,
268,
25638,
1753,
511,
3579,
7087,
738,
3884,
29892,
1577,
7087,
738,
2323,
2931,
29892,
518,
10736,
29962,
13,
268,
7087,
697,
2931,
297,
278,
20476,
29892,
322,
518,
29874,
29899,
29883,
29962,
7087,
697,
2931,
297,
13,
268,
278,
3464,
29889,
5032,
9737,
508,
3160,
263,
3480,
362,
304,
1993,
738,
2931,
451,
13,
268,
6790,
313,
1454,
1342,
518,
29991,
10736,
29962,
7087,
738,
2931,
541,
263,
29892,
289,
29892,
470,
274,
467,
960,
263,
13,
268,
934,
1024,
8665,
411,
376,
1213,
372,
338,
17262,
491,
2322,
541,
1122,
367,
19228,
491,
13,
268,
22146,
372,
9479,
313,
1454,
1342,
20611,
18660,
674,
451,
1993,
869,
29874,
29889,
18660,
29892,
541,
13,
268,
869,
10521,
18660,
674,
467,
319,
2560,
1342,
29901,
3579,
1966,
10521,
3945,
7087,
738,
934,
393,
947,
451,
13,
268,
1369,
297,
525,
6169,
322,
10614,
411,
869,
3945,
297,
278,
3414,
1985,
3884,
470,
738,
13,
268,
1014,
12322,
29889,
960,
278,
10422,
3743,
263,
8775,
7543,
2931,
372,
508,
367,
13,
268,
19824,
773,
20476,
313,
1454,
1342,
25638,
29961,
29930,
29962,
723,
1993,
263,
934,
4257,
25638,
29930,
467,
13,
268,
3940,
393,
1716,
2474,
322,
847,
526,
14914,
408,
3884,
2903,
4097,
373,
3852,
29892,
13,
268,
541,
871,
847,
338,
373,
8074,
29889,
16738,
3651,
313,
29995,
1707,
29995,
373,
3852,
470,
395,
1707,
373,
13,
268,
8074,
29897,
526,
17832,
7536,
304,
278,
4766,
1641,
7436,
29889,
13,
1678,
584,
1853,
934,
29918,
11037,
29901,
851,
13,
1678,
584,
3207,
12551,
29901,
450,
12551,
363,
278,
1962,
934,
29898,
29879,
467,
13,
1678,
584,
1853,
12551,
29901,
584,
1990,
18078,
5647,
2760,
6466,
2283,
14994,
3381,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5647,
2760,
6466,
2283,
14994,
3381,
13885,
13,
1678,
584,
3207,
6441,
29918,
6768,
29901,
3462,
3245,
3987,
363,
278,
6441,
5858,
29892,
13,
268,
3704,
1090,
825,
5855,
304,
2189,
278,
6441,
29889,
13,
1678,
584,
1853,
6441,
29918,
6768,
29901,
584,
1990,
18078,
6466,
2283,
17553,
5856,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
6466,
2283,
17553,
5856,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1445,
29918,
11037,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
23848,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
9009,
29918,
6768,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1445,
29918,
11037,
2396,
11117,
1989,
2396,
525,
1445,
17144,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
23848,
2396,
11117,
1989,
2396,
525,
23848,
742,
525,
1853,
2396,
525,
5647,
2760,
6466,
2283,
14994,
3381,
16675,
13,
4706,
525,
9009,
29918,
6768,
2396,
11117,
1989,
2396,
525,
9009,
5856,
742,
525,
1853,
2396,
525,
6466,
2283,
17553,
5856,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
6466,
2283,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
1445,
29918,
11037,
353,
9049,
5085,
29889,
657,
877,
1445,
29918,
11037,
1495,
13,
4706,
1583,
29889,
23848,
353,
9049,
5085,
29889,
657,
877,
23848,
1495,
13,
4706,
1583,
29889,
9009,
29918,
6768,
353,
9049,
5085,
29889,
657,
877,
9009,
29918,
6768,
1495,
13,
13,
13,
1990,
10604,
2283,
12300,
10486,
14994,
3381,
29898,
3195,
1125,
13,
1678,
9995,
2744,
961,
9639,
654,
310,
1962,
2066,
6441,
12551,
393,
3913,
385,
13,
1678,
4469,
29899,
12925,
934,
2318,
29889,
13,
13,
1678,
584,
3207,
851,
934,
29918,
2972,
29901,
450,
1024,
310,
278,
934,
2318,
393,
278,
1962,
2066,
674,
13,
268,
367,
20373,
304,
29889,
13,
1678,
584,
3207,
851,
2224,
29901,
450,
12551,
2224,
2629,
278,
934,
2318,
393,
278,
2066,
674,
13,
268,
367,
20373,
304,
29889,
1317,
278,
1962,
934,
21992,
14637,
304,
263,
2323,
934,
29892,
445,
674,
13,
268,
367,
14914,
408,
263,
934,
1024,
29889,
960,
278,
1962,
934,
21992,
14637,
304,
19998,
13,
268,
2999,
2066,
29892,
445,
674,
367,
14914,
408,
263,
1014,
12083,
29889,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1445,
29918,
2972,
2396,
11117,
12403,
2396,
5852,
29913,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1445,
29918,
2972,
2396,
11117,
1989,
2396,
525,
1445,
4782,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
2084,
2396,
11117,
1989,
2396,
525,
2084,
742,
525,
1853,
2396,
525,
710,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
6466,
2283,
12300,
10486,
14994,
3381,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
1445,
29918,
2972,
353,
9049,
5085,
29889,
657,
877,
1445,
29918,
2972,
1495,
13,
4706,
1583,
29889,
2084,
353,
9049,
5085,
29889,
657,
877,
2084,
742,
6213,
29897,
13,
13,
13,
1990,
24953,
2697,
29898,
3195,
1125,
13,
1678,
9995,
29909,
731,
310,
25011,
2200,
7901,
1022,
3464,
3464,
4128,
29889,
13,
13,
1678,
584,
3207,
938,
1369,
29901,
450,
6257,
995,
310,
278,
7901,
1022,
29889,
13,
1678,
584,
3207,
938,
1095,
29901,
450,
17140,
995,
310,
278,
7901,
1022,
313,
262,
7009,
573,
467,
13,
1678,
584,
3207,
938,
4331,
29901,
450,
11924,
284,
4331,
995,
29892,
2322,
338,
29871,
29896,
29889,
450,
4331,
995,
13,
268,
508,
367,
8178,
313,
29875,
29889,
29872,
29889,
263,
1602,
2548,
7901,
1022,
511,
541,
871,
1178,
278,
1369,
995,
338,
13,
268,
263,
6133,
995,
1135,
278,
1095,
29889,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
2962,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
355,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
2962,
2396,
11117,
1989,
2396,
525,
2962,
742,
525,
1853,
2396,
525,
524,
16675,
13,
4706,
525,
355,
2396,
11117,
1989,
2396,
525,
355,
742,
525,
1853,
2396,
525,
524,
16675,
13,
4706,
525,
10568,
2396,
11117,
1989,
2396,
525,
10568,
742,
525,
1853,
2396,
525,
524,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
9329,
2697,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
2962,
353,
938,
29898,
19290,
29889,
657,
877,
2962,
8785,
13,
9651,
1583,
29889,
355,
353,
938,
29898,
19290,
29889,
657,
877,
355,
8785,
13,
9651,
1583,
29889,
10568,
353,
938,
29898,
19290,
29889,
657,
877,
10568,
742,
29871,
29896,
876,
13,
4706,
5174,
313,
1542,
2392,
29892,
7865,
2392,
1125,
13,
9651,
12020,
7865,
2392,
703,
29915,
2962,
742,
525,
355,
29915,
322,
525,
10568,
29915,
4128,
1818,
367,
11920,
23157,
13,
4706,
565,
1583,
29889,
10568,
1275,
29871,
29900,
29901,
13,
9651,
12020,
7865,
2392,
703,
29915,
10568,
29915,
3443,
2609,
367,
29871,
29900,
23157,
13,
4706,
25342,
1583,
29889,
2962,
1405,
1583,
29889,
355,
322,
1583,
29889,
10568,
1405,
29871,
29900,
29901,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
13577,
10568,
29915,
1818,
367,
263,
8178,
1353,
746,
525,
2962,
29915,
338,
7621,
1135,
525,
355,
29915,
1159,
13,
4706,
25342,
1583,
29889,
2962,
529,
1583,
29889,
355,
322,
1583,
29889,
10568,
529,
29871,
29900,
29901,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
13577,
10568,
29915,
1818,
367,
263,
6374,
1353,
746,
525,
355,
29915,
338,
7621,
1135,
525,
2962,
29915,
1159,
13,
13,
13,
1990,
12662,
300,
2200,
29903,
705,
1022,
5398,
5126,
29898,
5398,
5126,
5160,
1125,
13,
1678,
9995,
29909,
9330,
27561,
363,
14655,
263,
731,
310,
9595,
2729,
373,
697,
470,
901,
3443,
13,
1678,
6166,
304,
4529,
263,
16985,
1881,
3464,
29889,
7806,
3443,
731,
674,
505,
263,
1369,
29892,
1095,
13,
1678,
322,
4331,
995,
29889,
319,
3414,
674,
367,
5759,
363,
1269,
6043,
297,
445,
3464,
29889,
26905,
13,
1678,
3443,
6166,
508,
367,
12420,
363,
263,
2473,
29899,
12531,
7901,
1022,
29889,
13,
13,
1678,
584,
3207,
3443,
29918,
7224,
29901,
319,
1051,
565,
3443,
6166,
515,
607,
9595,
674,
367,
5759,
29889,
13,
1678,
584,
1853,
3443,
29918,
7224,
29901,
319,
1051,
310,
584,
1990,
18078,
9329,
2697,
29966,
834,
1062,
29889,
16175,
29889,
9794,
29889,
9329,
2697,
13885,
13,
1678,
584,
3207,
12312,
29918,
7662,
29901,
450,
3414,
4472,
278,
674,
367,
1304,
304,
5706,
1269,
3414,
29889,
13,
1678,
584,
1853,
12312,
29918,
7662,
29901,
584,
1990,
18078,
1123,
11666,
5398,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
1123,
11666,
5398,
13885,
13,
1678,
584,
3207,
10366,
29918,
7662,
29901,
530,
13136,
5684,
3414,
304,
367,
1065,
1156,
599,
278,
916,
13,
268,
5759,
9595,
505,
8676,
8472,
29889,
13,
1678,
584,
1853,
10366,
29918,
7662,
29901,
584,
1990,
18078,
15836,
479,
5398,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
15836,
479,
5398,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
15501,
29918,
7224,
2396,
11117,
12403,
2396,
5852,
29892,
525,
1195,
29918,
7076,
2396,
29871,
29896,
1118,
13,
4706,
525,
14358,
29918,
7662,
2396,
11117,
12403,
2396,
5852,
29913,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
1989,
2396,
525,
1853,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
15501,
29918,
7224,
2396,
11117,
1989,
2396,
525,
15501,
29903,
1691,
742,
525,
1853,
2396,
525,
29961,
9329,
2697,
29962,
16675,
13,
4706,
525,
14358,
29918,
7662,
2396,
11117,
1989,
2396,
525,
14358,
5398,
742,
525,
1853,
2396,
525,
1123,
11666,
5398,
16675,
13,
4706,
525,
14634,
29918,
7662,
2396,
11117,
1989,
2396,
525,
14634,
5398,
742,
525,
1853,
2396,
525,
15836,
479,
5398,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
4736,
300,
2200,
29903,
705,
1022,
5398,
5126,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
15501,
29918,
7224,
353,
9049,
5085,
29889,
657,
877,
15501,
29918,
7224,
742,
6213,
29897,
13,
4706,
1583,
29889,
14358,
29918,
7662,
353,
9049,
5085,
29889,
657,
877,
14358,
29918,
7662,
742,
6213,
29897,
13,
4706,
1583,
29889,
1853,
353,
525,
3207,
300,
2200,
29903,
705,
1022,
29915,
13,
4706,
565,
451,
1583,
29889,
15501,
29918,
7224,
29901,
13,
9651,
12020,
7865,
2392,
703,
4736,
300,
2200,
317,
705,
1022,
3414,
12529,
6858,
472,
3203,
697,
3443,
731,
23157,
13,
13,
13,
1990,
28625,
6733,
29898,
3195,
1125,
13,
1678,
9995,
29909,
28625,
25663,
29889,
13,
13,
1678,
584,
440,
279,
1134,
29901,
450,
1134,
310,
1203,
5439,
491,
278,
4472,
29889,
19928,
367,
29901,
13,
268,
376,
11277,
29889,
23145,
29914,
16175,
10601,
29879,
29914,
1129,
3775,
29908,
13,
1678,
584,
1853,
1134,
29901,
851,
13,
1678,
584,
3207,
7882,
29918,
3259,
29901,
450,
3450,
1873,
393,
278,
4472,
378,
9514,
304,
29889,
13,
1678,
584,
1853,
7882,
29918,
3259,
29901,
851,
13,
1678,
584,
3207,
4426,
29901,
450,
2702,
14114,
310,
278,
11565,
29889,
13,
1678,
584,
1853,
4426,
29901,
584,
1990,
18078,
5647,
2760,
11426,
9329,
29966,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5647,
2760,
11426,
9329,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
12403,
2396,
5852,
29892,
525,
23362,
2396,
5852,
1118,
13,
4706,
525,
11330,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
2754,
29918,
3259,
2396,
11117,
1989,
2396,
525,
2754,
6594,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
11330,
2396,
11117,
1989,
2396,
525,
11330,
742,
525,
1853,
2396,
525,
5647,
2760,
11426,
9329,
16675,
13,
1678,
500,
13,
13,
1678,
1134,
353,
376,
11277,
29889,
23145,
29914,
16175,
10601,
29879,
29914,
1129,
3775,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
11426,
6733,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
11330,
353,
9049,
5085,
29889,
657,
877,
11330,
1495,
13,
4706,
1583,
29889,
2754,
29918,
3259,
353,
9049,
5085,
29889,
657,
877,
2754,
29918,
3259,
742,
6213,
29897,
13,
13,
13,
1990,
830,
11666,
5398,
29898,
3195,
1125,
13,
1678,
9995,
2744,
12634,
350,
905,
3414,
4472,
304,
12312,
29889,
13,
13,
1678,
584,
3207,
2479,
29918,
978,
29901,
319,
2479,
1024,
363,
278,
3414,
29889,
450,
2479,
1024,
817,
13,
268,
451,
367,
5412,
322,
508,
1712,
738,
23862,
4890,
701,
304,
263,
7472,
13,
268,
3309,
310,
29871,
29896,
29900,
29906,
29946,
29889,
13,
1678,
584,
1853,
2479,
29918,
978,
29901,
851,
13,
1678,
584,
3207,
1899,
29918,
1220,
29901,
450,
1899,
1196,
310,
278,
3414,
29889,
13,
1678,
584,
1853,
1899,
29918,
1220,
29901,
851,
13,
1678,
584,
3207,
5639,
29918,
11027,
29901,
450,
6055,
363,
278,
5639,
1090,
607,
278,
13,
268,
3414,
6057,
29889,
960,
278,
11565,
393,
674,
1065,
445,
3414,
756,
5639,
8614,
13,
268,
731,
29892,
445,
1818,
367,
731,
408,
1532,
29889,
960,
278,
11565,
393,
674,
1065,
445,
3414,
1838,
29915,
29873,
13,
268,
505,
5639,
8614,
731,
29892,
445,
1818,
451,
367,
731,
29889,
1932,
445,
338,
13,
268,
6790,
29892,
599,
17525,
8304,
3598,
2400,
278,
319,
29999,
29918,
29933,
14789,
29918,
6632,
2287,
29918,
21289,
29918,
9464,
13,
268,
313,
1552,
3876,
310,
12634,
350,
905,
17525,
373,
278,
2943,
29897,
526,
20545,
964,
278,
13,
268,
5639,
29892,
599,
3414,
5177,
3651,
526,
20545,
964,
278,
5639,
29892,
13,
268,
322,
278,
3414,
1899,
1196,
338,
8283,
297,
278,
5639,
29889,
13,
1678,
584,
1853,
5639,
29918,
11027,
29901,
584,
1990,
18078,
5398,
7895,
9585,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
7895,
9585,
13885,
13,
1678,
584,
3207,
6876,
29918,
1116,
2187,
29901,
1128,
278,
350,
905,
2669,
881,
10049,
746,
278,
3414,
13,
268,
1614,
2167,
29889,
13,
1678,
584,
1853,
6876,
29918,
1116,
2187,
29901,
584,
1990,
18078,
24365,
10983,
2187,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
24365,
10983,
2187,
13885,
13,
1678,
584,
3207,
6503,
29918,
5325,
29901,
319,
1051,
310,
2066,
393,
278,
350,
905,
2669,
674,
13,
268,
5142,
304,
278,
10272,
2943,
1434,
2734,
278,
1899,
1196,
29889,
13,
1678,
584,
1853,
6503,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
5647,
2760,
6848,
2283,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5647,
2760,
6848,
2283,
13885,
13,
1678,
584,
3207,
5177,
29918,
11027,
29901,
319,
1051,
310,
5177,
2286,
6055,
363,
13,
268,
278,
3414,
29889,
13,
1678,
584,
1853,
5177,
29918,
11027,
29901,
1051,
310,
584,
1990,
18078,
18649,
29020,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18649,
29020,
13885,
13,
1678,
584,
3207,
2756,
13593,
29918,
3888,
29901,
319,
1887,
537,
13182,
393,
508,
367,
1304,
491,
278,
350,
905,
13,
268,
2669,
304,
1831,
263,
10272,
2943,
373,
607,
304,
1369,
278,
716,
3414,
29889,
13,
1678,
584,
1853,
2756,
13593,
29918,
3888,
29901,
584,
1990,
18078,
27867,
13593,
20350,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
27867,
13593,
20350,
13885,
13,
1678,
584,
3207,
11938,
29901,
450,
8225,
11938,
393,
3394,
304,
445,
3414,
29889,
960,
13,
268,
366,
437,
451,
6084,
11938,
29892,
278,
4236,
5398,
8015,
719,
3981,
338,
278,
13,
268,
4236,
5398,
8015,
719,
3981,
6790,
363,
278,
4982,
29892,
322,
278,
4236,
29956,
497,
29907,
908,
2481,
322,
13,
268,
3240,
2509,
2481,
526,
10362,
29889,
13,
1678,
584,
1853,
11938,
29901,
584,
1990,
18078,
5398,
27427,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
27427,
13885,
13,
1678,
584,
3207,
1404,
29918,
22350,
29901,
450,
1404,
10110,
1090,
607,
278,
3414,
6057,
29889,
960,
13,
268,
25811,
29892,
278,
3414,
6057,
408,
263,
1661,
29899,
6406,
2132,
1230,
1404,
5412,
304,
278,
3414,
29889,
13,
1678,
584,
1853,
1404,
29918,
22350,
29901,
584,
1990,
18078,
2659,
18415,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2659,
18415,
13885,
13,
1678,
584,
3207,
2280,
29918,
5113,
29918,
276,
10662,
29901,
319,
1051,
310,
2280,
9741,
393,
13,
268,
278,
350,
905,
2669,
674,
7246,
304,
278,
10272,
2943,
1434,
2734,
278,
13,
268,
1899,
1196,
29889,
13,
1678,
584,
1853,
2280,
29918,
5113,
29918,
276,
10662,
29901,
1051,
310,
13,
268,
584,
1990,
18078,
4873,
14459,
7422,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
4873,
14459,
7422,
13885,
13,
1678,
584,
3207,
10760,
29918,
6979,
29918,
11027,
29901,
450,
6055,
363,
385,
10760,
13,
268,
5993,
393,
278,
3414,
508,
671,
304,
2189,
350,
905,
2669,
6931,
29889,
960,
445,
13,
268,
2875,
338,
731,
29892,
278,
350,
905,
2669,
8128,
278,
3414,
411,
385,
13,
268,
10760,
5993,
607,
508,
367,
1304,
304,
15585,
403,
350,
905,
2669,
13,
268,
6931,
1728,
26795,
385,
3633,
2130,
1820,
29889,
450,
5993,
338,
4944,
13,
268,
3025,
278,
319,
29999,
29918,
29933,
14789,
29918,
20656,
29950,
3919,
28541,
29918,
4986,
29968,
1430,
5177,
2286,
29889,
450,
6931,
13,
268,
393,
278,
3414,
508,
8677,
714,
773,
278,
5993,
8839,
373,
278,
6055,
29889,
1152,
13,
268,
1342,
29892,
263,
3414,
508,
2009,
4982,
11239,
297,
1797,
304,
788,
916,
9595,
304,
13,
268,
278,
4982,
29892,
470,
1423,
278,
4660,
310,
278,
4982,
470,
310,
916,
9595,
1090,
278,
4982,
29889,
13,
1678,
584,
1853,
10760,
29918,
6979,
29918,
11027,
29901,
584,
1990,
18078,
16746,
6066,
9585,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
16746,
6066,
9585,
13885,
13,
1678,
584,
3207,
1962,
29918,
5325,
29901,
319,
1051,
310,
1962,
934,
9282,
304,
701,
3736,
12652,
2748,
13,
268,
278,
3414,
756,
8676,
29889,
13,
1678,
584,
1853,
1962,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
6466,
2283,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
6466,
2283,
13885,
13,
1678,
584,
3207,
3577,
29918,
276,
10662,
29901,
319,
1051,
310,
9741,
304,
367,
5130,
373,
278,
10272,
13,
268,
7573,
29889,
19928,
367,
310,
263,
22029,
15629,
1134,
297,
15017,
749,
411,
278,
4629,
13,
268,
13598,
1788,
29889,
13,
1678,
584,
1853,
3577,
29918,
276,
10662,
29901,
1051,
310,
584,
1990,
18078,
14459,
7422,
5160,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
14459,
7422,
5160,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
4990,
29918,
978,
2396,
11117,
1989,
2396,
525,
4990,
1170,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
1989,
2396,
525,
6519,
3542,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
7611,
29918,
11027,
2396,
11117,
1989,
2396,
525,
7611,
9585,
742,
525,
1853,
2396,
525,
5398,
7895,
9585,
16675,
13,
4706,
525,
13322,
29918,
1116,
2187,
2396,
11117,
1989,
2396,
525,
13322,
10983,
2187,
742,
525,
1853,
2396,
525,
24365,
10983,
2187,
16675,
13,
4706,
525,
10314,
29918,
5325,
2396,
11117,
1989,
2396,
525,
10314,
10547,
742,
525,
1853,
2396,
525,
29961,
5647,
2760,
6848,
2283,
29962,
16675,
13,
4706,
525,
20944,
29918,
11027,
2396,
11117,
1989,
2396,
525,
20944,
9585,
742,
525,
1853,
2396,
525,
29961,
18649,
29020,
29962,
16675,
13,
4706,
525,
3470,
13593,
29918,
3888,
2396,
11117,
1989,
2396,
525,
3470,
13593,
3401,
742,
525,
1853,
2396,
525,
27867,
13593,
20350,
16675,
13,
4706,
525,
13646,
29879,
2396,
11117,
1989,
2396,
525,
13646,
29879,
742,
525,
1853,
2396,
525,
5398,
27427,
16675,
13,
4706,
525,
1792,
29918,
22350,
2396,
11117,
1989,
2396,
525,
1792,
18415,
742,
525,
1853,
2396,
525,
2659,
18415,
16675,
13,
4706,
525,
6214,
29918,
5113,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
6214,
14459,
1123,
10662,
742,
13,
462,
462,
965,
525,
1853,
2396,
525,
29961,
4873,
14459,
7422,
29962,
16675,
13,
4706,
525,
23055,
29918,
6979,
29918,
11027,
2396,
11117,
1989,
2396,
525,
23055,
6066,
9585,
742,
13,
462,
462,
3986,
525,
1853,
2396,
525,
16746,
6066,
9585,
16675,
13,
4706,
525,
4905,
29918,
5325,
2396,
11117,
1989,
2396,
525,
4905,
10547,
742,
525,
1853,
2396,
525,
29961,
6466,
2283,
29962,
16675,
13,
4706,
525,
5113,
29918,
276,
10662,
2396,
11117,
1989,
2396,
525,
5113,
1123,
10662,
742,
525,
1853,
2396,
525,
29961,
14459,
7422,
5160,
29962,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
1123,
11666,
5398,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
4990,
29918,
978,
353,
9049,
5085,
29889,
657,
877,
4990,
29918,
978,
1495,
13,
4706,
1583,
29889,
6519,
29918,
1220,
353,
9049,
5085,
29889,
657,
877,
6519,
29918,
1220,
742,
6213,
29897,
13,
4706,
1583,
29889,
13322,
29918,
1116,
2187,
353,
9049,
5085,
29889,
657,
877,
13322,
29918,
1116,
2187,
742,
6213,
29897,
13,
4706,
1583,
29889,
10314,
29918,
5325,
353,
9049,
5085,
29889,
657,
877,
10314,
29918,
5325,
742,
6213,
29897,
13,
4706,
1583,
29889,
20944,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
20944,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
3470,
13593,
29918,
3888,
353,
9049,
5085,
29889,
657,
877,
3470,
13593,
29918,
3888,
742,
6213,
29897,
13,
4706,
1583,
29889,
13646,
29879,
353,
9049,
5085,
29889,
657,
877,
13646,
29879,
742,
6213,
29897,
13,
4706,
1583,
29889,
1792,
29918,
22350,
353,
9049,
5085,
29889,
657,
877,
1792,
29918,
22350,
742,
6213,
29897,
13,
4706,
1583,
29889,
6214,
29918,
5113,
29918,
276,
10662,
353,
9049,
5085,
29889,
657,
877,
6214,
29918,
5113,
29918,
276,
10662,
742,
6213,
29897,
13,
4706,
1583,
29889,
23055,
29918,
6979,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
23055,
29918,
6979,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
4905,
29918,
5325,
353,
9049,
5085,
29889,
657,
877,
4905,
29918,
5325,
742,
6213,
29897,
13,
4706,
1583,
29889,
5113,
29918,
276,
10662,
353,
9049,
5085,
29889,
657,
877,
5113,
29918,
276,
10662,
742,
6213,
29897,
13,
13,
13,
1990,
7370,
5398,
29898,
3195,
1125,
13,
1678,
9995,
29909,
3414,
607,
338,
1065,
746,
263,
10272,
2943,
26205,
263,
11565,
297,
278,
12634,
350,
905,
13,
1678,
2669,
29892,
470,
746,
278,
10272,
2943,
338,
22538,
287,
470,
337,
326,
4063,
29889,
13,
13,
1678,
584,
3207,
1899,
29918,
1220,
29901,
450,
1899,
1196,
310,
278,
1369,
3414,
29889,
450,
1899,
1196,
13,
268,
947,
451,
1065,
1090,
263,
6473,
29892,
322,
5480,
2609,
2125,
10631,
310,
6473,
13,
268,
5680,
1316,
408,
5177,
2286,
13184,
29889,
960,
366,
864,
304,
2125,
13,
268,
10631,
310,
1316,
5680,
29892,
366,
881,
15928,
278,
6473,
297,
278,
1899,
13,
268,
1196,
29892,
363,
1342,
773,
376,
9006,
847,
29883,
1619,
6255,
29908,
297,
3852,
470,
5591,
2109,
29914,
845,
448,
29883,
13,
268,
1619,
6255,
29908,
297,
8074,
29889,
13,
1678,
584,
1853,
1899,
29918,
1220,
29901,
851,
13,
1678,
584,
3207,
5639,
29918,
11027,
29901,
450,
6055,
363,
278,
5639,
1090,
607,
278,
13,
268,
1369,
3414,
6057,
29889,
1932,
445,
338,
6790,
29892,
599,
17525,
8304,
3598,
2400,
13,
268,
278,
319,
29999,
29918,
29933,
14789,
29918,
6632,
2287,
29918,
21289,
29918,
9464,
313,
1552,
3876,
310,
12634,
350,
905,
17525,
373,
278,
13,
268,
2943,
29897,
526,
20545,
964,
278,
5639,
29892,
599,
3414,
5177,
3651,
526,
13,
268,
20545,
964,
278,
5639,
29892,
322,
278,
3414,
1899,
1196,
338,
8283,
297,
278,
13,
268,
5639,
29889,
13,
1678,
584,
1853,
5639,
29918,
11027,
29901,
584,
1990,
18078,
5398,
7895,
9585,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
5398,
7895,
9585,
13885,
13,
1678,
584,
3207,
6503,
29918,
5325,
29901,
319,
1051,
310,
2066,
393,
278,
350,
905,
2669,
674,
13,
268,
5142,
304,
278,
10272,
2943,
1434,
2734,
278,
1899,
1196,
29889,
12745,
9904,
13,
268,
1090,
445,
1543,
526,
5982,
297,
278,
3414,
29915,
29879,
1985,
3884,
29889,
13,
1678,
584,
1853,
6503,
29918,
5325,
29901,
1051,
310,
584,
1990,
18078,
5647,
2760,
6848,
2283,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5647,
2760,
6848,
2283,
13885,
13,
1678,
584,
3207,
5177,
29918,
11027,
29901,
319,
1051,
310,
5177,
2286,
6055,
363,
13,
268,
278,
1369,
3414,
29889,
13,
1678,
584,
1853,
5177,
29918,
11027,
29901,
1051,
310,
584,
1990,
18078,
18649,
29020,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
18649,
29020,
13885,
13,
1678,
584,
3207,
1404,
29918,
22350,
29901,
450,
1404,
10110,
1090,
607,
278,
1369,
3414,
6057,
29889,
13,
268,
960,
25811,
29892,
278,
3414,
6057,
408,
263,
1661,
29899,
6406,
2132,
1230,
1404,
5412,
304,
278,
3414,
29889,
13,
1678,
584,
1853,
1404,
29918,
22350,
29901,
584,
1990,
18078,
2659,
18415,
13,
268,
529,
17688,
29889,
16175,
29889,
9794,
29889,
2659,
18415,
13885,
13,
1678,
584,
3207,
4236,
29918,
7662,
29918,
276,
2202,
29918,
2798,
29901,
450,
7472,
1353,
310,
3064,
278,
3414,
1122,
367,
13,
268,
3240,
1255,
29889,
450,
350,
905,
2669,
3240,
2722,
263,
3414,
565,
967,
6876,
775,
338,
1661,
9171,
29889,
13,
268,
3940,
393,
445,
995,
10816,
11761,
278,
1353,
310,
3240,
2722,
29889,
450,
13,
268,
350,
905,
2669,
674,
1018,
278,
3414,
2748,
29892,
322,
1122,
769,
337,
2202,
701,
304,
445,
4046,
29889,
13,
268,
1152,
1342,
29892,
565,
278,
7472,
337,
2202,
2302,
338,
29871,
29941,
29892,
350,
905,
14335,
278,
3414,
701,
304,
29871,
29946,
13,
268,
3064,
313,
650,
2847,
1018,
322,
29871,
29941,
3240,
2722,
467,
960,
278,
7472,
337,
2202,
2302,
338,
29871,
29900,
29892,
13,
268,
278,
350,
905,
2669,
947,
451,
337,
2202,
278,
3414,
29889,
960,
278,
7472,
337,
2202,
2302,
338,
13,
268,
448,
29896,
29892,
278,
350,
905,
2669,
3240,
2722,
278,
3414,
1728,
4046,
29889,
13,
1678,
584,
1853,
4236,
29918,
7662,
29918,
276,
2202,
29918,
2798,
29901,
938,
13,
1678,
584,
3207,
4480,
29918,
1454,
29918,
8698,
29901,
26460,
278,
350,
905,
2669,
881,
4480,
363,
278,
13,
268,
1369,
3414,
304,
4866,
8472,
313,
5747,
338,
29892,
304,
6876,
411,
6876,
775,
29871,
29900,
29897,
13,
268,
1434,
28598,
19478,
738,
9595,
373,
278,
10272,
2943,
29889,
960,
1565,
322,
278,
1369,
13,
268,
3414,
8465,
373,
263,
10272,
2943,
29892,
278,
350,
905,
2669,
3240,
2722,
278,
1369,
3414,
701,
13,
268,
304,
967,
7472,
337,
2202,
2302,
313,
3317,
5398,
8015,
719,
3981,
467,
960,
278,
3414,
756,
1603,
451,
13,
268,
8676,
8472,
1156,
599,
3240,
2722,
29892,
769,
278,
350,
905,
2669,
17997,
278,
13,
268,
10272,
2943,
18325,
519,
29892,
322,
674,
451,
20410,
9595,
304,
372,
29889,
910,
4195,
13,
268,
508,
367,
17809,
3025,
278,
2943,
2106,
322,
10672,
5235,
4902,
29889,
960,
2089,
29892,
278,
13,
268,
350,
905,
2669,
674,
451,
4480,
363,
278,
1369,
3414,
304,
4866,
29889,
512,
445,
1206,
29892,
13,
268,
916,
9595,
508,
1369,
14012,
373,
278,
10272,
2943,
1550,
278,
1369,
3414,
13,
268,
338,
1603,
2734,
29936,
322,
1584,
565,
278,
1369,
3414,
8465,
29892,
716,
9595,
674,
13,
268,
6773,
304,
367,
21467,
373,
278,
2943,
29889,
450,
2322,
338,
2089,
29889,
13,
1678,
584,
1853,
4480,
29918,
1454,
29918,
8698,
29901,
6120,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
6519,
29918,
1220,
2396,
11117,
1989,
2396,
525,
6519,
3542,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
7611,
29918,
11027,
2396,
11117,
1989,
2396,
525,
7611,
9585,
742,
525,
1853,
2396,
525,
5398,
7895,
9585,
16675,
13,
4706,
525,
10314,
29918,
5325,
2396,
11117,
1989,
2396,
525,
10314,
10547,
742,
525,
1853,
2396,
525,
29961,
5647,
2760,
6848,
2283,
29962,
16675,
13,
4706,
525,
20944,
29918,
11027,
2396,
11117,
1989,
2396,
525,
20944,
9585,
742,
525,
1853,
2396,
525,
29961,
18649,
29020,
29962,
16675,
13,
4706,
525,
1792,
29918,
22350,
2396,
11117,
1989,
2396,
525,
1792,
18415,
742,
525,
1853,
2396,
525,
2659,
18415,
16675,
13,
4706,
525,
3317,
29918,
7662,
29918,
276,
2202,
29918,
2798,
2396,
11117,
1989,
2396,
525,
3317,
5398,
8015,
719,
3981,
742,
525,
1853,
2396,
525,
524,
16675,
13,
4706,
525,
10685,
29918,
1454,
29918,
8698,
2396,
11117,
1989,
2396,
525,
10685,
2831,
14191,
742,
525,
1853,
2396,
525,
11227,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
4763,
5398,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
6519,
29918,
1220,
353,
9049,
5085,
29889,
657,
877,
6519,
29918,
1220,
1495,
13,
4706,
1583,
29889,
7611,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
7611,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
10314,
29918,
5325,
353,
9049,
5085,
29889,
657,
877,
10314,
29918,
5325,
742,
6213,
29897,
13,
4706,
1583,
29889,
20944,
29918,
11027,
353,
9049,
5085,
29889,
657,
877,
20944,
29918,
11027,
742,
6213,
29897,
13,
4706,
1583,
29889,
1792,
29918,
22350,
353,
9049,
5085,
29889,
657,
877,
1792,
29918,
22350,
742,
6213,
29897,
13,
4706,
1583,
29889,
3317,
29918,
7662,
29918,
276,
2202,
29918,
2798,
353,
9049,
5085,
29889,
657,
877,
3317,
29918,
7662,
29918,
276,
2202,
29918,
2798,
742,
6213,
29897,
13,
4706,
1583,
29889,
10685,
29918,
1454,
29918,
8698,
353,
9049,
5085,
29889,
657,
877,
10685,
29918,
1454,
29918,
8698,
742,
6213,
29897,
13,
13,
13,
1990,
9330,
7196,
5398,
5126,
29898,
5398,
5126,
5160,
1125,
13,
1678,
9995,
29909,
9330,
27561,
363,
4417,
263,
758,
12119,
4333,
310,
9595,
6336,
13,
1678,
304,
263,
4982,
373,
29240,
29889,
13,
13,
1678,
584,
3207,
9595,
29901,
319,
1051,
565,
3414,
4128,
29892,
1269,
310,
607,
674,
367,
2715,
7812,
304,
278,
4982,
29889,
13,
1678,
584,
1853,
9595,
29901,
319,
1051,
310,
584,
1990,
18078,
5647,
2760,
5398,
9329,
13,
268,
529,
834,
1062,
29889,
16175,
29889,
9794,
29889,
5647,
2760,
5398,
9329,
13885,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
20673,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
1989,
2396,
525,
1853,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
20673,
2396,
11117,
1989,
2396,
525,
20673,
742,
525,
1853,
2396,
525,
29961,
5647,
2760,
5398,
9329,
29962,
16675,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
5398,
7196,
5398,
5126,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
20673,
353,
9049,
5085,
29889,
657,
877,
20673,
1495,
13,
4706,
1583,
29889,
1853,
353,
525,
7662,
7196,
29915,
13,
13,
13,
1990,
612,
398,
14459,
7422,
29898,
14459,
7422,
5160,
1125,
13,
1678,
9995,
29909,
3407,
304,
263,
3577,
304,
367,
5130,
773,
278,
612,
5005,
3577,
13,
1678,
8455,
373,
263,
8074,
2943,
29889,
13,
13,
1678,
584,
3207,
851,
1178,
29901,
450,
1024,
310,
278,
3577,
29889,
13,
1678,
584,
3207,
851,
1873,
29901,
450,
1873,
310,
278,
3577,
304,
367,
5130,
29889,
960,
25811,
29892,
13,
268,
278,
9281,
1873,
313,
5753,
3278,
304,
278,
3577,
9810,
29897,
674,
367,
5130,
29889,
13,
1678,
584,
3207,
6120,
11262,
29918,
735,
27722,
29901,
26460,
304,
2758,
9741,
393,
1795,
6467,
13,
268,
367,
429,
13347,
491,
11400,
5285,
313,
29872,
29889,
29887,
29889,
8466,
9741,
467,
13109,
338,
7700,
29889,
13,
1678,
9995,
13,
13,
1678,
903,
18157,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
12403,
2396,
5852,
1118,
13,
4706,
525,
333,
2396,
11117,
12403,
2396,
5852,
1118,
13,
1678,
500,
13,
13,
1678,
903,
12715,
29918,
1958,
353,
426,
13,
4706,
525,
1853,
2396,
11117,
1989,
2396,
525,
1853,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
333,
2396,
11117,
1989,
2396,
525,
333,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
3259,
2396,
11117,
1989,
2396,
525,
3259,
742,
525,
1853,
2396,
525,
710,
16675,
13,
4706,
525,
20472,
29918,
735,
27722,
2396,
11117,
1989,
2396,
525,
20472,
1252,
27722,
742,
525,
1853,
2396,
525,
11227,
10827,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
29979,
398,
14459,
7422,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
333,
353,
9049,
5085,
29889,
657,
877,
333,
1495,
13,
4706,
1583,
29889,
3259,
353,
9049,
5085,
29889,
657,
877,
3259,
742,
6213,
29897,
13,
4706,
1583,
29889,
20472,
353,
9049,
5085,
29889,
657,
877,
20472,
742,
6213,
29897,
13,
2
] |
tests/conftest.py | DD-DeCaF/model_warehouse | 0 | 69435 | <reponame>DD-DeCaF/model_warehouse
# Copyright (c) 2018, Novo Nordisk Foundation Center for Biosustainability,
# Technical University of Denmark.
#
# 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.
"""Provide session level fixtures."""
import json
import pytest
from jose import jwt
from model_storage.app import app as app_
from model_storage.app import init_app
from model_storage.models import Model
from model_storage.models import db as db_
@pytest.fixture(scope="session")
def app():
"""Provide an initialized Flask for use in certain test cases."""
init_app(app_, db_)
with app_.app_context():
yield app_
@pytest.fixture(scope="session")
def client(app):
"""Provide a Flask test client for integration tests."""
with app.test_client() as client:
yield client
@pytest.fixture(scope="session")
def reset_tables(app):
"""Ensure a clean database."""
# Clean up anything that might reside in the testing database.
db_.session.remove()
db_.drop_all()
# Re-create tables.
db_.create_all()
@pytest.fixture(scope="session")
def connection():
"""
Use a connection such that transactions can be used.
Notes
-----
Follows a transaction pattern described in the following:
http://docs.sqlalchemy.org/en/latest/orm/session_transaction.html#session-begin-nested
"""
with db_.engine.connect() as connection:
yield connection
@pytest.fixture(scope="session")
def tokens(app):
"""Provide read, write and admin JWT claims to project 4."""
return {
"read": jwt.encode(
{"prj": {4: "read"}}, app.config["JWT_PRIVATE_KEY"], "RS512"
),
"write": jwt.encode(
{"prj": {4: "write"}}, app.config["JWT_PRIVATE_KEY"], "RS512"
),
"admin": jwt.encode(
{"prj": {4: "admin"}}, app.config["JWT_PRIVATE_KEY"], "RS512"
),
}
@pytest.fixture(scope="function")
def session(reset_tables, connection):
"""
Create a transaction and session per test unit.
Rolling back a transaction removes even committed rows
(``session.commit``) from the database.
https://docs.sqlalchemy.org/en/latest/orm/session_transaction.html#joining-a-session-into-an-external-transaction-such-as-for-test-suites
"""
flask_sqlalchemy_session = db_.session
transaction = connection.begin()
db_.session = db_.create_scoped_session(
options={"bind": connection, "binds": {}}
)
yield db_.session
db_.session.close()
transaction.rollback()
db_.session = flask_sqlalchemy_session
@pytest.fixture(scope="session")
def e_coli_core():
"""Provide the e. coli core model as a dict."""
with open("tests/data/e_coli_core.json") as file_:
return json.load(file_)
@pytest.fixture(scope="session")
def model(reset_tables):
"""Return a fixture with test data for the Model data model."""
fixture = Model(
name="iJO1366",
organism_id=4,
project_id=4,
default_biomass_reaction="BIOMASS",
model_serialized={"Reactions": [{"GAPDH": "x->y"}]},
ec_model=False,
)
db_.session.add(fixture)
db_.session.commit()
return fixture
| [
1,
529,
276,
1112,
420,
29958,
7858,
29899,
2772,
26270,
29943,
29914,
4299,
29918,
2519,
8697,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29947,
29892,
2864,
29877,
5245,
3873,
10606,
7817,
363,
350,
2363,
504,
475,
3097,
29892,
13,
29937,
8364,
936,
3014,
310,
3384,
3502,
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,
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,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
13,
15945,
29908,
1184,
29894,
680,
4867,
3233,
5713,
486,
1973,
1213,
15945,
13,
13,
5215,
4390,
13,
13,
5215,
11451,
1688,
13,
3166,
432,
852,
1053,
432,
14554,
13,
13,
3166,
1904,
29918,
12925,
29889,
932,
1053,
623,
408,
623,
29918,
13,
3166,
1904,
29918,
12925,
29889,
932,
1053,
2069,
29918,
932,
13,
3166,
1904,
29918,
12925,
29889,
9794,
1053,
8125,
13,
3166,
1904,
29918,
12925,
29889,
9794,
1053,
4833,
408,
4833,
29918,
13,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
29898,
6078,
543,
7924,
1159,
13,
1753,
623,
7295,
13,
1678,
9995,
1184,
29894,
680,
385,
16601,
2379,
1278,
363,
671,
297,
3058,
1243,
4251,
1213,
15945,
13,
1678,
2069,
29918,
932,
29898,
932,
3383,
4833,
19925,
13,
1678,
411,
623,
5396,
932,
29918,
4703,
7295,
13,
4706,
7709,
623,
29918,
13,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
29898,
6078,
543,
7924,
1159,
13,
1753,
3132,
29898,
932,
1125,
13,
1678,
9995,
1184,
29894,
680,
263,
2379,
1278,
1243,
3132,
363,
13465,
6987,
1213,
15945,
13,
1678,
411,
623,
29889,
1688,
29918,
4645,
580,
408,
3132,
29901,
13,
4706,
7709,
3132,
13,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
29898,
6078,
543,
7924,
1159,
13,
1753,
10092,
29918,
24051,
29898,
932,
1125,
13,
1678,
9995,
29923,
1983,
545,
263,
5941,
2566,
1213,
15945,
13,
1678,
396,
315,
14044,
701,
3099,
393,
1795,
620,
680,
297,
278,
6724,
2566,
29889,
13,
1678,
4833,
5396,
7924,
29889,
5992,
580,
13,
1678,
4833,
5396,
8865,
29918,
497,
580,
13,
1678,
396,
830,
29899,
3258,
6131,
29889,
13,
1678,
4833,
5396,
3258,
29918,
497,
580,
13,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
29898,
6078,
543,
7924,
1159,
13,
1753,
3957,
7295,
13,
1678,
9995,
13,
1678,
4803,
263,
3957,
1316,
393,
22160,
508,
367,
1304,
29889,
13,
13,
1678,
8695,
13,
1678,
448,
807,
13,
1678,
10306,
29879,
263,
10804,
4766,
5439,
297,
278,
1494,
29901,
13,
1678,
1732,
597,
2640,
29889,
2850,
284,
305,
6764,
29889,
990,
29914,
264,
29914,
12333,
29914,
555,
29914,
7924,
29918,
20736,
29889,
1420,
29937,
7924,
29899,
463,
29899,
27420,
13,
13,
1678,
9995,
13,
1678,
411,
4833,
5396,
10599,
29889,
6915,
580,
408,
3957,
29901,
13,
4706,
7709,
3957,
13,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
29898,
6078,
543,
7924,
1159,
13,
1753,
18897,
29898,
932,
1125,
13,
1678,
9995,
1184,
29894,
680,
1303,
29892,
2436,
322,
4113,
435,
17755,
16726,
304,
2060,
29871,
29946,
1213,
15945,
13,
1678,
736,
426,
13,
4706,
376,
949,
1115,
432,
14554,
29889,
12508,
29898,
13,
9651,
8853,
558,
29926,
1115,
426,
29946,
29901,
376,
949,
29908,
11656,
623,
29889,
2917,
3366,
29967,
17755,
29918,
29829,
29963,
3040,
29918,
10818,
12436,
376,
12445,
29945,
29896,
29906,
29908,
13,
4706,
10353,
13,
4706,
376,
3539,
1115,
432,
14554,
29889,
12508,
29898,
13,
9651,
8853,
558,
29926,
1115,
426,
29946,
29901,
376,
3539,
29908,
11656,
623,
29889,
2917,
3366,
29967,
17755,
29918,
29829,
29963,
3040,
29918,
10818,
12436,
376,
12445,
29945,
29896,
29906,
29908,
13,
4706,
10353,
13,
4706,
376,
6406,
1115,
432,
14554,
29889,
12508,
29898,
13,
9651,
8853,
558,
29926,
1115,
426,
29946,
29901,
376,
6406,
29908,
11656,
623,
29889,
2917,
3366,
29967,
17755,
29918,
29829,
29963,
3040,
29918,
10818,
12436,
376,
12445,
29945,
29896,
29906,
29908,
13,
4706,
10353,
13,
1678,
500,
13,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
29898,
6078,
543,
2220,
1159,
13,
1753,
4867,
29898,
12071,
29918,
24051,
29892,
3957,
1125,
13,
1678,
9995,
13,
1678,
6204,
263,
10804,
322,
4867,
639,
1243,
5190,
29889,
13,
13,
1678,
8731,
1847,
1250,
263,
10804,
25388,
1584,
19355,
4206,
13,
1678,
6695,
29952,
7924,
29889,
15060,
29952,
6348,
515,
278,
2566,
29889,
13,
13,
1678,
2045,
597,
2640,
29889,
2850,
284,
305,
6764,
29889,
990,
29914,
264,
29914,
12333,
29914,
555,
29914,
7924,
29918,
20736,
29889,
1420,
29937,
2212,
2827,
29899,
29874,
29899,
7924,
29899,
8941,
29899,
273,
29899,
23176,
29899,
20736,
29899,
14565,
29899,
294,
29899,
1454,
29899,
1688,
29899,
2146,
3246,
13,
1678,
9995,
13,
1678,
29784,
29918,
2850,
284,
305,
6764,
29918,
7924,
353,
4833,
5396,
7924,
13,
1678,
10804,
353,
3957,
29889,
463,
580,
13,
1678,
4833,
5396,
7924,
353,
4833,
5396,
3258,
29918,
21785,
287,
29918,
7924,
29898,
13,
4706,
3987,
3790,
29908,
5355,
1115,
3957,
29892,
376,
5355,
29879,
1115,
426,
930,
13,
1678,
1723,
13,
1678,
7709,
4833,
5396,
7924,
13,
1678,
4833,
5396,
7924,
29889,
5358,
580,
13,
1678,
10804,
29889,
1245,
1627,
580,
13,
1678,
4833,
5396,
7924,
353,
29784,
29918,
2850,
284,
305,
6764,
29918,
7924,
13,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
29898,
6078,
543,
7924,
1159,
13,
1753,
321,
29918,
25776,
29918,
3221,
7295,
13,
1678,
9995,
1184,
29894,
680,
278,
321,
29889,
784,
29875,
7136,
1904,
408,
263,
9657,
1213,
15945,
13,
1678,
411,
1722,
703,
21150,
29914,
1272,
29914,
29872,
29918,
25776,
29918,
3221,
29889,
3126,
1159,
408,
934,
29918,
29901,
13,
4706,
736,
4390,
29889,
1359,
29898,
1445,
19925,
13,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
29898,
6078,
543,
7924,
1159,
13,
1753,
1904,
29898,
12071,
29918,
24051,
1125,
13,
1678,
9995,
11609,
263,
5713,
15546,
411,
1243,
848,
363,
278,
8125,
848,
1904,
1213,
15945,
13,
1678,
5713,
15546,
353,
8125,
29898,
13,
4706,
1024,
543,
29875,
29967,
29949,
29896,
29941,
29953,
29953,
613,
13,
4706,
2894,
1608,
29918,
333,
29922,
29946,
29892,
13,
4706,
2060,
29918,
333,
29922,
29946,
29892,
13,
4706,
2322,
29918,
5365,
290,
465,
29918,
276,
2467,
543,
29933,
5971,
1529,
1799,
613,
13,
4706,
1904,
29918,
15550,
1891,
3790,
29908,
1123,
7387,
1115,
518,
6377,
29954,
3301,
29928,
29950,
1115,
376,
29916,
976,
29891,
29908,
6525,
1118,
13,
4706,
21226,
29918,
4299,
29922,
8824,
29892,
13,
1678,
1723,
13,
1678,
4833,
5396,
7924,
29889,
1202,
29898,
7241,
15546,
29897,
13,
1678,
4833,
5396,
7924,
29889,
15060,
580,
13,
1678,
736,
5713,
15546,
13,
2
] |
Chapter08/rs_cem_comparison.py | verdimrc/Mastering-Reinforcement-Learning-with-Python | 58 | 93365 | from math import sin, pi
import random
import numpy as np
from scipy.stats import norm
def black_box_projectile(theta, v0=10, g=9.81):
assert theta >= 0
assert theta <= 90
return (v0 ** 2) * sin(2 * pi * theta / 180) / g
def random_shooting(n=1, min_a=0, max_a=90):
assert min_a <= max_a
return [random.uniform(min_a, max_a) for i in range(n)]
def pick_elites(actions, M_elites):
actions = np.array(actions)
assert M_elites <= len(actions)
assert M_elites > 0
results = np.array([black_box_projectile(a)
for a in actions])
sorted_ix = np.argsort(results)[-M_elites:][::-1]
return actions[sorted_ix], results[sorted_ix]
def try_random_shooting(trials=10000, n=20):
print("Trying random shooting.")
best_results = []
best_actions = []
for i in range(trials):
actions_to_try = random_shooting(n)
best_action, best_result = pick_elites(actions_to_try, 1)
best_results.append(best_result[0])
best_actions.append(best_action[0])
print(f"Out of {trials} trials:")
print(f"- Average score is {round(np.mean(best_results), 2)}")
print(f"- Average action is {round(np.mean(best_actions), 2)}")
print(f"- Action SD is {round(np.std(best_actions), 2)}")
def try_cem_normal(trials=10000, N=5, M_elites=2, iterations=3):
print("Trying CEM.")
best_results = []
best_actions = []
for i in range(trials):
print(f"================ trial {i}")
print("--iteration: 1")
actions_to_try = random_shooting(N)
elite_acts, _ = pick_elites(actions_to_try, M_elites)
print(f"actions_to_try: {np.round(actions_to_try, 2)}")
print(f"elites: {np.round(elite_acts, 2)}")
for r in range(iterations - 1):
print(f"--iteration: {r + 2}")
mu, std = norm.fit(elite_acts)
print(f"fitted normal mu: {np.round(mu, 2)}, std: {np.round(std, 2)}")
actions_to_try = np.clip(norm.rvs(mu, std, N), 0, 90)
elite_acts, elite_results = pick_elites(actions_to_try,
M_elites)
print(f"actions_to_try: {np.round(actions_to_try, 2)}")
print(f"elites: {np.round(elite_acts, 2)}")
mu, std = norm.fit(elite_acts)
print(f"final action: {np.round(mu, 2)}")
best_results.append(black_box_projectile(mu))
best_actions.append(np.clip(mu, 0, 90))
print(f"Out of {trials} trials:")
print(f"- Average score is {round(np.mean(best_results), 2)}")
print(f"- Average action is {round(np.mean(best_actions), 2)}")
print(f"- Action SD is {round(np.std(best_actions), 2)}") | [
1,
515,
5844,
1053,
4457,
29892,
2930,
13,
5215,
4036,
13,
5215,
12655,
408,
7442,
13,
3166,
4560,
2272,
29889,
16202,
1053,
6056,
13,
13,
1753,
4628,
29918,
1884,
29918,
4836,
488,
29898,
3416,
29892,
325,
29900,
29922,
29896,
29900,
29892,
330,
29922,
29929,
29889,
29947,
29896,
1125,
13,
1678,
4974,
278,
941,
6736,
29871,
29900,
13,
1678,
4974,
278,
941,
5277,
29871,
29929,
29900,
13,
1678,
736,
313,
29894,
29900,
3579,
29871,
29906,
29897,
334,
4457,
29898,
29906,
334,
2930,
334,
278,
941,
847,
29871,
29896,
29947,
29900,
29897,
847,
330,
13,
13,
13,
1753,
4036,
29918,
845,
3155,
292,
29898,
29876,
29922,
29896,
29892,
1375,
29918,
29874,
29922,
29900,
29892,
4236,
29918,
29874,
29922,
29929,
29900,
1125,
13,
1678,
4974,
1375,
29918,
29874,
5277,
4236,
29918,
29874,
13,
1678,
736,
518,
8172,
29889,
29590,
29898,
1195,
29918,
29874,
29892,
4236,
29918,
29874,
29897,
363,
474,
297,
3464,
29898,
29876,
4638,
13,
13,
13,
1753,
5839,
29918,
295,
3246,
29898,
7387,
29892,
341,
29918,
295,
3246,
1125,
13,
1678,
8820,
353,
7442,
29889,
2378,
29898,
7387,
29897,
13,
1678,
4974,
341,
29918,
295,
3246,
5277,
7431,
29898,
7387,
29897,
13,
1678,
4974,
341,
29918,
295,
3246,
1405,
29871,
29900,
13,
1678,
2582,
353,
7442,
29889,
2378,
4197,
8517,
29918,
1884,
29918,
4836,
488,
29898,
29874,
29897,
13,
462,
4706,
363,
263,
297,
8820,
2314,
13,
1678,
12705,
29918,
861,
353,
7442,
29889,
5085,
441,
29898,
9902,
9601,
29899,
29924,
29918,
295,
3246,
29901,
3816,
1057,
29899,
29896,
29962,
13,
1678,
736,
8820,
29961,
24582,
29918,
861,
1402,
2582,
29961,
24582,
29918,
861,
29962,
13,
13,
1753,
1018,
29918,
8172,
29918,
845,
3155,
292,
29898,
3626,
1338,
29922,
29896,
29900,
29900,
29900,
29900,
29892,
302,
29922,
29906,
29900,
1125,
13,
1678,
1596,
703,
15870,
292,
4036,
27904,
23157,
13,
1678,
1900,
29918,
9902,
353,
5159,
13,
1678,
1900,
29918,
7387,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
3626,
1338,
1125,
13,
4706,
8820,
29918,
517,
29918,
2202,
353,
4036,
29918,
845,
3155,
292,
29898,
29876,
29897,
13,
4706,
1900,
29918,
2467,
29892,
1900,
29918,
2914,
353,
5839,
29918,
295,
3246,
29898,
7387,
29918,
517,
29918,
2202,
29892,
29871,
29896,
29897,
13,
4706,
1900,
29918,
9902,
29889,
4397,
29898,
13318,
29918,
2914,
29961,
29900,
2314,
13,
4706,
1900,
29918,
7387,
29889,
4397,
29898,
13318,
29918,
2467,
29961,
29900,
2314,
13,
1678,
1596,
29898,
29888,
29908,
3744,
310,
426,
3626,
1338,
29913,
3367,
1338,
29901,
1159,
13,
1678,
1596,
29898,
29888,
29908,
29899,
319,
19698,
8158,
338,
426,
14486,
29898,
9302,
29889,
12676,
29898,
13318,
29918,
9902,
511,
29871,
29906,
2915,
1159,
13,
1678,
1596,
29898,
29888,
29908,
29899,
319,
19698,
3158,
338,
426,
14486,
29898,
9302,
29889,
12676,
29898,
13318,
29918,
7387,
511,
29871,
29906,
2915,
1159,
13,
1678,
1596,
29898,
29888,
29908,
29899,
9123,
8073,
338,
426,
14486,
29898,
9302,
29889,
4172,
29898,
13318,
29918,
7387,
511,
29871,
29906,
2915,
1159,
13,
13,
13,
1753,
1018,
29918,
19335,
29918,
8945,
29898,
3626,
1338,
29922,
29896,
29900,
29900,
29900,
29900,
29892,
405,
29922,
29945,
29892,
341,
29918,
295,
3246,
29922,
29906,
29892,
24372,
29922,
29941,
1125,
13,
1678,
1596,
703,
15870,
292,
315,
12665,
23157,
13,
1678,
1900,
29918,
9902,
353,
5159,
13,
1678,
1900,
29918,
7387,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
3626,
1338,
1125,
13,
4706,
1596,
29898,
29888,
29908,
9166,
14260,
426,
29875,
27195,
13,
4706,
1596,
703,
489,
1524,
362,
29901,
29871,
29896,
1159,
13,
4706,
8820,
29918,
517,
29918,
2202,
353,
4036,
29918,
845,
3155,
292,
29898,
29940,
29897,
13,
4706,
560,
568,
29918,
627,
29879,
29892,
903,
353,
5839,
29918,
295,
3246,
29898,
7387,
29918,
517,
29918,
2202,
29892,
341,
29918,
295,
3246,
29897,
13,
4706,
1596,
29898,
29888,
29908,
7387,
29918,
517,
29918,
2202,
29901,
426,
9302,
29889,
14486,
29898,
7387,
29918,
517,
29918,
2202,
29892,
29871,
29906,
2915,
1159,
13,
4706,
1596,
29898,
29888,
29908,
295,
3246,
29901,
426,
9302,
29889,
14486,
29898,
295,
568,
29918,
627,
29879,
29892,
29871,
29906,
2915,
1159,
13,
4706,
363,
364,
297,
3464,
29898,
1524,
800,
448,
29871,
29896,
1125,
13,
9651,
1596,
29898,
29888,
29908,
489,
1524,
362,
29901,
426,
29878,
718,
29871,
29906,
27195,
13,
9651,
3887,
29892,
3659,
353,
6056,
29889,
9202,
29898,
295,
568,
29918,
627,
29879,
29897,
13,
9651,
1596,
29898,
29888,
29908,
29888,
4430,
4226,
3887,
29901,
426,
9302,
29889,
14486,
29898,
2589,
29892,
29871,
29906,
19230,
3659,
29901,
426,
9302,
29889,
14486,
29898,
4172,
29892,
29871,
29906,
2915,
1159,
13,
9651,
8820,
29918,
517,
29918,
2202,
353,
7442,
29889,
24049,
29898,
12324,
29889,
29878,
4270,
29898,
2589,
29892,
3659,
29892,
405,
511,
29871,
29900,
29892,
29871,
29929,
29900,
29897,
13,
9651,
560,
568,
29918,
627,
29879,
29892,
560,
568,
29918,
9902,
353,
5839,
29918,
295,
3246,
29898,
7387,
29918,
517,
29918,
2202,
29892,
13,
462,
462,
462,
1678,
341,
29918,
295,
3246,
29897,
13,
9651,
1596,
29898,
29888,
29908,
7387,
29918,
517,
29918,
2202,
29901,
426,
9302,
29889,
14486,
29898,
7387,
29918,
517,
29918,
2202,
29892,
29871,
29906,
2915,
1159,
13,
9651,
1596,
29898,
29888,
29908,
295,
3246,
29901,
426,
9302,
29889,
14486,
29898,
295,
568,
29918,
627,
29879,
29892,
29871,
29906,
2915,
1159,
13,
4706,
3887,
29892,
3659,
353,
6056,
29889,
9202,
29898,
295,
568,
29918,
627,
29879,
29897,
13,
4706,
1596,
29898,
29888,
29908,
8394,
3158,
29901,
426,
9302,
29889,
14486,
29898,
2589,
29892,
29871,
29906,
2915,
1159,
13,
4706,
1900,
29918,
9902,
29889,
4397,
29898,
8517,
29918,
1884,
29918,
4836,
488,
29898,
2589,
876,
13,
4706,
1900,
29918,
7387,
29889,
4397,
29898,
9302,
29889,
24049,
29898,
2589,
29892,
29871,
29900,
29892,
29871,
29929,
29900,
876,
13,
1678,
1596,
29898,
29888,
29908,
3744,
310,
426,
3626,
1338,
29913,
3367,
1338,
29901,
1159,
13,
1678,
1596,
29898,
29888,
29908,
29899,
319,
19698,
8158,
338,
426,
14486,
29898,
9302,
29889,
12676,
29898,
13318,
29918,
9902,
511,
29871,
29906,
2915,
1159,
13,
1678,
1596,
29898,
29888,
29908,
29899,
319,
19698,
3158,
338,
426,
14486,
29898,
9302,
29889,
12676,
29898,
13318,
29918,
7387,
511,
29871,
29906,
2915,
1159,
13,
1678,
1596,
29898,
29888,
29908,
29899,
9123,
8073,
338,
426,
14486,
29898,
9302,
29889,
4172,
29898,
13318,
29918,
7387,
511,
29871,
29906,
2915,
1159,
2
] |
epi/variable.py | Epikem/deep-learning-from-scratch | 0 | 1602054 | import numpy as np
import matplotlib.pylab as plt
import sys
def run():
visualizeTarget = sys.argv[1]
print(visualizeTarget)
if(visualizeTarget=='step'):
x=np.arange(-5.0,5.0,0.1)
y=step(x)
plt.plot(x,y)
plt.ylim(-0.1,1.1)
plt.show()
elif(visualizeTarget=='sigmoid'):
x=np.arange(-5.0,5.0,0.1)
y=sigmoid(x)
plt.plot(x,y)
plt.ylim(-0.1,1.1)
plt.show()
elif(visualizeTarget=='relu'):
x=np.arange(-5.0,5.0,0.1)
y=relu(x)
plt.plot(x,y)
# plt.ylim(-0.1,1.1)
plt.show()
elif(visualizeTarget=='all'):
x=np.arange(-5.0,5.0,0.1)
y=step(x)
plt.plot(x,y)
# plt.ylim(-0.1,1.1)
x=np.arange(-5.0,5.0,0.1)
y=sigmoid(x)
plt.plot(x,y)
x=np.arange(-5.0,5.0,0.1)
y=relu(x)
plt.plot(x,y)
# plt.ylim(-0.1,3.0)
plt.show()
# for x in sys.argv:
# print(x)
class variable():
def __init__(self, value):
self.data = value
pass
def read(self):
return self.data
def test():
v = variable(424)
print(v.read() == 424)
a = np.array([2,3,1,4,2])
print(a)
print(sigmoid(a))
def TestSimpleANDGate():
print('simple AND gate test')
print(SimpleANDGate(0,0))
print(SimpleANDGate(0,1))
print(SimpleANDGate(1,0))
print(SimpleANDGate(1,1))
def SimpleANDGate(x1,x2):
w1,w2,theta = 0.5,0.5,0.7
tmp = x1*w1+x2*w2
if(tmp<=theta): return 0
elif(tmp>theta): return 1
def TestANDGate():
print('and gate test')
print(ANDGate(0,0))
print(ANDGate(0,1))
print(ANDGate(1,0))
print(ANDGate(1,1))
def ANDGate(x1,x2):
x = np.array([x1,x2])
w=np.array([0.5,0.5])
b=-0.7
tmp=np.sum(w*x)+b
if(tmp<=0): return 0
else: return 1
def TestNANDGate():
print('nand gate test')
print(NANDGate(0,0))
print(NANDGate(0,1))
print(NANDGate(1,0))
print(NANDGate(1,1))
def NANDGate(x1,x2):
x = np.array([x1,x2])
w=np.array([-0.5,-0.5])
b=0.7
tmp=np.sum(w*x)+b
if(tmp<=0): return 0
else: return 1
def TestORGate():
print('OR gate test')
print(ORGate(0,0))
print(ORGate(0,1))
print(ORGate(1,0))
print(ORGate(1,1))
def ORGate(x1,x2):
x = np.array([x1,x2])
w=np.array([0.5,0.5])
b=-0.2
tmp=np.sum(w*x)+b
if(tmp<=0): return 0
else: return 1
def XORGate(x1,x2):
a = ORGate(x1,x2)
b = NANDGate(x1,x2)
return ANDGate(a,b)
def step(x):
y=x>0
return y.astype(np.int)
def simple_step(value):
if(value <= 0): return 0
else: return 1
def sigmoid(value):
return 1/(1+np.exp(-value))
def relu(x):
return np.maximum(0,x)
class MultiplyLayer:
def __init__(self):
self.x = None
self.y = None
def forward(self, x, y):
self.x=x
self.y=y
out=x*y
return out
def backward(self, dout):
dx=dout*self.y
dy=dout*self.x
return dx,dy
def matrixTest1():
print('mat')
b = np.array([[1,2],[3,4],[5,6]])
print(b)
print(np.ndim(b)) # 배열의 차원 수
print(b.shape) # 배열의 형상 (모든 차원의 각 길이)
def matrixMultiplyTest():
print('multiply')
a = np.array([[1,2],[3,4]])
print(a.shape)
b=np.array([[5,6],[7,8]])
print(b.shape)
print(np.dot(a,b)) # 행렬 곱셈
a = np.array([[1,2],[3,4],[5,6]])
print(a.shape)
b=np.array([7,8])
print(b.shape)
print(np.dot(a,b))
x = np.array([1,2])
W = np.array([[1,3,5],[2,4,6]])
y = np.dot(x,W)
print(y)
if(__name__=='main'):
# test()
# TestSimpleANDGate()
# matrixTest1()
# matrixMultiplyTest()
run()
| [
1,
1053,
12655,
408,
7442,
13,
5215,
22889,
29889,
2272,
8205,
408,
14770,
13,
5215,
10876,
13,
13,
1753,
1065,
7295,
13,
1678,
7604,
675,
8667,
353,
10876,
29889,
19218,
29961,
29896,
29962,
13,
1678,
1596,
29898,
20119,
675,
8667,
29897,
13,
268,
13,
1678,
565,
29898,
20119,
675,
8667,
1360,
29915,
10568,
29374,
13,
4706,
921,
29922,
9302,
29889,
279,
927,
6278,
29945,
29889,
29900,
29892,
29945,
29889,
29900,
29892,
29900,
29889,
29896,
29897,
13,
4706,
343,
29922,
10568,
29898,
29916,
29897,
13,
4706,
14770,
29889,
5317,
29898,
29916,
29892,
29891,
29897,
13,
4706,
14770,
29889,
29891,
2576,
6278,
29900,
29889,
29896,
29892,
29896,
29889,
29896,
29897,
13,
4706,
14770,
29889,
4294,
580,
13,
1678,
25342,
29898,
20119,
675,
8667,
1360,
29915,
18816,
29885,
3398,
29374,
13,
4706,
921,
29922,
9302,
29889,
279,
927,
6278,
29945,
29889,
29900,
29892,
29945,
29889,
29900,
29892,
29900,
29889,
29896,
29897,
13,
4706,
343,
29922,
18816,
29885,
3398,
29898,
29916,
29897,
13,
4706,
14770,
29889,
5317,
29898,
29916,
29892,
29891,
29897,
13,
4706,
14770,
29889,
29891,
2576,
6278,
29900,
29889,
29896,
29892,
29896,
29889,
29896,
29897,
13,
4706,
14770,
29889,
4294,
580,
13,
1678,
25342,
29898,
20119,
675,
8667,
1360,
29915,
2674,
29884,
29374,
13,
4706,
921,
29922,
9302,
29889,
279,
927,
6278,
29945,
29889,
29900,
29892,
29945,
29889,
29900,
29892,
29900,
29889,
29896,
29897,
13,
4706,
343,
29922,
2674,
29884,
29898,
29916,
29897,
13,
4706,
14770,
29889,
5317,
29898,
29916,
29892,
29891,
29897,
13,
4706,
396,
14770,
29889,
29891,
2576,
6278,
29900,
29889,
29896,
29892,
29896,
29889,
29896,
29897,
13,
4706,
14770,
29889,
4294,
580,
13,
1678,
25342,
29898,
20119,
675,
8667,
1360,
29915,
497,
29374,
13,
4706,
921,
29922,
9302,
29889,
279,
927,
6278,
29945,
29889,
29900,
29892,
29945,
29889,
29900,
29892,
29900,
29889,
29896,
29897,
13,
4706,
343,
29922,
10568,
29898,
29916,
29897,
13,
4706,
14770,
29889,
5317,
29898,
29916,
29892,
29891,
29897,
13,
4706,
396,
14770,
29889,
29891,
2576,
6278,
29900,
29889,
29896,
29892,
29896,
29889,
29896,
29897,
13,
4706,
921,
29922,
9302,
29889,
279,
927,
6278,
29945,
29889,
29900,
29892,
29945,
29889,
29900,
29892,
29900,
29889,
29896,
29897,
13,
4706,
343,
29922,
18816,
29885,
3398,
29898,
29916,
29897,
13,
4706,
14770,
29889,
5317,
29898,
29916,
29892,
29891,
29897,
13,
4706,
921,
29922,
9302,
29889,
279,
927,
6278,
29945,
29889,
29900,
29892,
29945,
29889,
29900,
29892,
29900,
29889,
29896,
29897,
13,
4706,
343,
29922,
2674,
29884,
29898,
29916,
29897,
13,
4706,
14770,
29889,
5317,
29898,
29916,
29892,
29891,
29897,
13,
4706,
396,
14770,
29889,
29891,
2576,
6278,
29900,
29889,
29896,
29892,
29941,
29889,
29900,
29897,
13,
4706,
14770,
29889,
4294,
580,
13,
29937,
363,
921,
297,
10876,
29889,
19218,
29901,
13,
29937,
268,
1596,
29898,
29916,
29897,
13,
13,
13,
1990,
2286,
7295,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
995,
1125,
13,
4706,
1583,
29889,
1272,
353,
995,
13,
4706,
1209,
13,
13,
1678,
822,
1303,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
1272,
13,
13,
1753,
1243,
7295,
13,
1678,
325,
353,
2286,
29898,
29946,
29906,
29946,
29897,
13,
1678,
1596,
29898,
29894,
29889,
949,
580,
1275,
29871,
29946,
29906,
29946,
29897,
13,
1678,
263,
353,
7442,
29889,
2378,
4197,
29906,
29892,
29941,
29892,
29896,
29892,
29946,
29892,
29906,
2314,
13,
1678,
1596,
29898,
29874,
29897,
13,
1678,
1596,
29898,
18816,
29885,
3398,
29898,
29874,
876,
13,
13,
1753,
4321,
15427,
9468,
29954,
403,
7295,
13,
1678,
1596,
877,
12857,
5300,
12417,
1243,
1495,
13,
1678,
1596,
29898,
15427,
9468,
29954,
403,
29898,
29900,
29892,
29900,
876,
13,
1678,
1596,
29898,
15427,
9468,
29954,
403,
29898,
29900,
29892,
29896,
876,
13,
1678,
1596,
29898,
15427,
9468,
29954,
403,
29898,
29896,
29892,
29900,
876,
13,
1678,
1596,
29898,
15427,
9468,
29954,
403,
29898,
29896,
29892,
29896,
876,
13,
13,
1753,
12545,
9468,
29954,
403,
29898,
29916,
29896,
29892,
29916,
29906,
1125,
13,
1678,
281,
29896,
29892,
29893,
29906,
29892,
3416,
353,
29871,
29900,
29889,
29945,
29892,
29900,
29889,
29945,
29892,
29900,
29889,
29955,
13,
1678,
13128,
353,
921,
29896,
29930,
29893,
29896,
29974,
29916,
29906,
29930,
29893,
29906,
13,
1678,
565,
29898,
7050,
14065,
3416,
1125,
736,
29871,
29900,
13,
1678,
25342,
29898,
7050,
29958,
3416,
1125,
736,
29871,
29896,
13,
13,
1753,
4321,
9468,
29954,
403,
7295,
13,
1678,
1596,
877,
392,
12417,
1243,
1495,
13,
1678,
1596,
29898,
9468,
29954,
403,
29898,
29900,
29892,
29900,
876,
13,
1678,
1596,
29898,
9468,
29954,
403,
29898,
29900,
29892,
29896,
876,
13,
1678,
1596,
29898,
9468,
29954,
403,
29898,
29896,
29892,
29900,
876,
13,
1678,
1596,
29898,
9468,
29954,
403,
29898,
29896,
29892,
29896,
876,
13,
13,
1753,
5300,
29954,
403,
29898,
29916,
29896,
29892,
29916,
29906,
1125,
13,
1678,
921,
353,
7442,
29889,
2378,
4197,
29916,
29896,
29892,
29916,
29906,
2314,
13,
1678,
281,
29922,
9302,
29889,
2378,
4197,
29900,
29889,
29945,
29892,
29900,
29889,
29945,
2314,
13,
1678,
289,
10457,
29900,
29889,
29955,
13,
1678,
13128,
29922,
9302,
29889,
2083,
29898,
29893,
29930,
29916,
7240,
29890,
13,
1678,
565,
29898,
7050,
14065,
29900,
1125,
736,
29871,
29900,
13,
1678,
1683,
29901,
736,
29871,
29896,
13,
13,
13,
1753,
4321,
29940,
9468,
29954,
403,
7295,
13,
1678,
1596,
877,
29876,
392,
12417,
1243,
1495,
13,
1678,
1596,
29898,
29940,
9468,
29954,
403,
29898,
29900,
29892,
29900,
876,
13,
1678,
1596,
29898,
29940,
9468,
29954,
403,
29898,
29900,
29892,
29896,
876,
13,
1678,
1596,
29898,
29940,
9468,
29954,
403,
29898,
29896,
29892,
29900,
876,
13,
1678,
1596,
29898,
29940,
9468,
29954,
403,
29898,
29896,
29892,
29896,
876,
13,
13,
1753,
405,
9468,
29954,
403,
29898,
29916,
29896,
29892,
29916,
29906,
1125,
13,
1678,
921,
353,
7442,
29889,
2378,
4197,
29916,
29896,
29892,
29916,
29906,
2314,
13,
1678,
281,
29922,
9302,
29889,
2378,
4197,
29899,
29900,
29889,
29945,
6653,
29900,
29889,
29945,
2314,
13,
1678,
289,
29922,
29900,
29889,
29955,
13,
1678,
13128,
29922,
9302,
29889,
2083,
29898,
29893,
29930,
29916,
7240,
29890,
13,
1678,
565,
29898,
7050,
14065,
29900,
1125,
736,
29871,
29900,
13,
1678,
1683,
29901,
736,
29871,
29896,
13,
13,
13,
1753,
4321,
1955,
29954,
403,
7295,
13,
1678,
1596,
877,
1955,
12417,
1243,
1495,
13,
1678,
1596,
29898,
1955,
29954,
403,
29898,
29900,
29892,
29900,
876,
13,
1678,
1596,
29898,
1955,
29954,
403,
29898,
29900,
29892,
29896,
876,
13,
1678,
1596,
29898,
1955,
29954,
403,
29898,
29896,
29892,
29900,
876,
13,
1678,
1596,
29898,
1955,
29954,
403,
29898,
29896,
29892,
29896,
876,
13,
13,
1753,
6323,
29954,
403,
29898,
29916,
29896,
29892,
29916,
29906,
1125,
13,
1678,
921,
353,
7442,
29889,
2378,
4197,
29916,
29896,
29892,
29916,
29906,
2314,
13,
1678,
281,
29922,
9302,
29889,
2378,
4197,
29900,
29889,
29945,
29892,
29900,
29889,
29945,
2314,
13,
1678,
289,
10457,
29900,
29889,
29906,
13,
1678,
13128,
29922,
9302,
29889,
2083,
29898,
29893,
29930,
29916,
7240,
29890,
13,
1678,
565,
29898,
7050,
14065,
29900,
1125,
736,
29871,
29900,
13,
1678,
1683,
29901,
736,
29871,
29896,
13,
13,
1753,
1060,
1955,
29954,
403,
29898,
29916,
29896,
29892,
29916,
29906,
1125,
13,
1678,
263,
353,
6323,
29954,
403,
29898,
29916,
29896,
29892,
29916,
29906,
29897,
13,
1678,
289,
353,
405,
9468,
29954,
403,
29898,
29916,
29896,
29892,
29916,
29906,
29897,
13,
1678,
736,
5300,
29954,
403,
29898,
29874,
29892,
29890,
29897,
13,
13,
1753,
4331,
29898,
29916,
1125,
13,
1678,
343,
29922,
29916,
29958,
29900,
13,
1678,
736,
343,
29889,
579,
668,
29898,
9302,
29889,
524,
29897,
13,
13,
1753,
2560,
29918,
10568,
29898,
1767,
1125,
13,
1678,
565,
29898,
1767,
5277,
29871,
29900,
1125,
736,
29871,
29900,
13,
1678,
1683,
29901,
736,
29871,
29896,
13,
13,
1753,
4365,
29885,
3398,
29898,
1767,
1125,
13,
1678,
736,
29871,
29896,
14571,
29896,
29974,
9302,
29889,
4548,
6278,
1767,
876,
13,
13,
1753,
1104,
29884,
29898,
29916,
1125,
13,
1678,
736,
7442,
29889,
27525,
398,
29898,
29900,
29892,
29916,
29897,
13,
13,
1990,
9683,
666,
368,
14420,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
29916,
353,
6213,
13,
4706,
1583,
29889,
29891,
353,
6213,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29892,
343,
1125,
13,
4706,
1583,
29889,
29916,
29922,
29916,
13,
4706,
1583,
29889,
29891,
29922,
29891,
13,
4706,
714,
29922,
29916,
29930,
29891,
13,
13,
4706,
736,
714,
13,
13,
1678,
822,
1250,
1328,
29898,
1311,
29892,
270,
449,
1125,
13,
4706,
15414,
29922,
29881,
449,
29930,
1311,
29889,
29891,
13,
4706,
13475,
29922,
29881,
449,
29930,
1311,
29889,
29916,
13,
4706,
736,
15414,
29892,
4518,
13,
13,
13,
1753,
4636,
3057,
29896,
7295,
13,
1678,
1596,
877,
2922,
1495,
13,
1678,
289,
353,
7442,
29889,
2378,
4197,
29961,
29896,
29892,
29906,
16272,
29941,
29892,
29946,
16272,
29945,
29892,
29953,
24960,
13,
1678,
1596,
29898,
29890,
29897,
13,
1678,
1596,
29898,
9302,
29889,
299,
326,
29898,
29890,
876,
396,
29871,
238,
179,
179,
239,
154,
183,
30708,
29871,
31817,
31198,
29871,
30970,
13,
1678,
1596,
29898,
29890,
29889,
12181,
29897,
268,
396,
29871,
238,
179,
179,
239,
154,
183,
30708,
29871,
240,
155,
152,
31158,
313,
31962,
238,
150,
163,
29871,
31817,
31198,
30708,
29871,
237,
179,
132,
29871,
237,
187,
187,
30393,
29897,
13,
13,
1753,
4636,
6857,
666,
368,
3057,
7295,
13,
1678,
1596,
877,
18056,
368,
1495,
13,
1678,
263,
353,
7442,
29889,
2378,
4197,
29961,
29896,
29892,
29906,
16272,
29941,
29892,
29946,
24960,
13,
1678,
1596,
29898,
29874,
29889,
12181,
29897,
13,
1678,
289,
29922,
9302,
29889,
2378,
4197,
29961,
29945,
29892,
29953,
16272,
29955,
29892,
29947,
24960,
13,
1678,
1596,
29898,
29890,
29889,
12181,
29897,
13,
1678,
1596,
29898,
9302,
29889,
6333,
29898,
29874,
29892,
29890,
876,
29871,
396,
29871,
240,
153,
140,
238,
163,
175,
29871,
237,
182,
180,
239,
136,
139,
13,
13,
1678,
263,
353,
7442,
29889,
2378,
4197,
29961,
29896,
29892,
29906,
16272,
29941,
29892,
29946,
16272,
29945,
29892,
29953,
24960,
13,
1678,
1596,
29898,
29874,
29889,
12181,
29897,
13,
1678,
289,
29922,
9302,
29889,
2378,
4197,
29955,
29892,
29947,
2314,
13,
1678,
1596,
29898,
29890,
29889,
12181,
29897,
13,
1678,
1596,
29898,
9302,
29889,
6333,
29898,
29874,
29892,
29890,
876,
13,
1678,
921,
353,
7442,
29889,
2378,
4197,
29896,
29892,
29906,
2314,
13,
1678,
399,
353,
7442,
29889,
2378,
4197,
29961,
29896,
29892,
29941,
29892,
29945,
16272,
29906,
29892,
29946,
29892,
29953,
24960,
13,
1678,
343,
353,
7442,
29889,
6333,
29898,
29916,
29892,
29956,
29897,
13,
1678,
1596,
29898,
29891,
29897,
13,
13,
13,
361,
22168,
978,
1649,
1360,
29915,
3396,
29374,
268,
13,
1678,
396,
1243,
580,
13,
13,
1678,
396,
4321,
15427,
9468,
29954,
403,
580,
13,
1678,
396,
4636,
3057,
29896,
580,
13,
1678,
396,
4636,
6857,
666,
368,
3057,
580,
13,
1678,
1065,
580,
13,
2
] |
integrations-and-supported-tools/fastai/scripts/Neptune_fastai.py | neptune-ai/examples | 15 | 33954 | import fastai
from neptune.new.integrations.fastai import NeptuneCallback
from fastai.vision.all import *
import neptune.new as neptune
run = neptune.init(
project="common/fastai-integration", api_token="<PASSWORD>", tags="basic"
)
path = untar_data(URLs.MNIST_TINY)
dls = ImageDataLoaders.from_csv(path)
# Log all training phases of the learner
learn = cnn_learner(dls, resnet18, cbs=[NeptuneCallback(run=run, base_namespace="experiment")])
learn.fit_one_cycle(2)
learn.fit_one_cycle(1)
run.stop()
| [
1,
1053,
5172,
1794,
13,
3166,
452,
415,
1540,
29889,
1482,
29889,
14146,
800,
29889,
11255,
1794,
1053,
2448,
415,
1540,
10717,
13,
3166,
5172,
1794,
29889,
4924,
29889,
497,
1053,
334,
13,
5215,
452,
415,
1540,
29889,
1482,
408,
452,
415,
1540,
13,
13,
3389,
353,
452,
415,
1540,
29889,
2344,
29898,
13,
1678,
2060,
543,
9435,
29914,
11255,
1794,
29899,
27925,
613,
7882,
29918,
6979,
543,
29966,
25711,
17013,
28341,
8282,
543,
16121,
29908,
13,
29897,
13,
13,
2084,
353,
443,
12637,
29918,
1272,
29898,
4219,
29879,
29889,
29924,
29940,
9047,
29918,
29911,
1177,
29979,
29897,
13,
29881,
3137,
353,
7084,
1469,
5896,
414,
29889,
3166,
29918,
7638,
29898,
2084,
29897,
13,
13,
29937,
4522,
599,
6694,
29540,
310,
278,
24298,
1089,
13,
19668,
353,
274,
15755,
29918,
1945,
1089,
29898,
29881,
3137,
29892,
620,
1212,
29896,
29947,
29892,
274,
5824,
11759,
8139,
415,
1540,
10717,
29898,
3389,
29922,
3389,
29892,
2967,
29918,
22377,
543,
735,
15362,
1159,
2314,
13,
19668,
29889,
9202,
29918,
650,
29918,
23090,
29898,
29906,
29897,
13,
19668,
29889,
9202,
29918,
650,
29918,
23090,
29898,
29896,
29897,
13,
13,
3389,
29889,
9847,
580,
13,
2
] |
first_steps_in_coding_and_simple_operations_and_calculations/exercise/charity_campaign.py | PetkoAndreev/Python-basics | 0 | 16561 | days = int(input())
sladkar = int(input())
cake = int(input())
gofreta = int(input())
pancake = int(input())
cake_price = cake*45
gofreta_price = gofreta*5.8
pancake_price = pancake*3.2
day_price = (cake_price + gofreta_price + pancake_price)*sladkar
total_price = days*day_price
campaign = total_price - (total_price/8)
print(campaign) | [
1,
3841,
353,
938,
29898,
2080,
3101,
13,
2536,
328,
5689,
353,
938,
29898,
2080,
3101,
13,
1113,
446,
353,
938,
29898,
2080,
3101,
13,
29887,
974,
276,
941,
353,
938,
29898,
2080,
3101,
13,
8357,
1113,
446,
353,
938,
29898,
2080,
3101,
13,
1113,
446,
29918,
9175,
353,
274,
1296,
29930,
29946,
29945,
13,
29887,
974,
276,
941,
29918,
9175,
353,
748,
10745,
941,
29930,
29945,
29889,
29947,
13,
8357,
1113,
446,
29918,
9175,
353,
7243,
1113,
446,
29930,
29941,
29889,
29906,
13,
3250,
29918,
9175,
353,
313,
1113,
446,
29918,
9175,
718,
748,
10745,
941,
29918,
9175,
718,
7243,
1113,
446,
29918,
9175,
11877,
2536,
328,
5689,
13,
7827,
29918,
9175,
353,
3841,
29930,
3250,
29918,
9175,
13,
24821,
8729,
353,
3001,
29918,
9175,
448,
313,
7827,
29918,
9175,
29914,
29947,
29897,
13,
2158,
29898,
24821,
8729,
29897,
2
] |
src/learning/train.py | mari-linhares/deep-audio | 0 | 166616 | <reponame>mari-linhares/deep-audio
import tensorflow as tf
tf.enable_eager_execution()
import tensorflowjs as tfjs
import numpy as np
from data_sources.data_source import DataSource
from optimizers.optimizer import Optimizer
import models.model_factory as mf
import utilities.utils as utils
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
def train():
ds_train = DataSource('audio_files/speech/train_data.npy', 'audio_files/speech/train_labels.npy', classes_dict='audio_files/speech/classes')
ds_eval = DataSource('audio_files/speech/eval_data.npy', 'audio_files/speech/eval_labels.npy', classes_dict='audio_files/speech/classes')
ds_test = DataSource('audio_files/speech/test_data.npy', 'audio_files/speech/test_labels.npy', classes_dict='audio_files/speech/classes')
model = mf.build_model('CNN', input_shape=ds_train.input_shape, num_classes = ds_train.num_classes)
optimizer = Optimizer('Adam')
EPOCHS = 1
for epoch in range(EPOCHS):
train_losses = []
train_accuracy = 0
train_instances = 0
for (batch, (img_tensor, label)) in enumerate(ds_train.dataset):
train_loss, predicted = optimizer.compute_and_apply_gradients(model, img_tensor, label)
train_losses.append(train_loss)
train_accuracy += sum(np.argmax(predicted, axis=1) == label.numpy())
train_instances += label.numpy().shape[0]
# print ('Epoch {} Batch {} Train Loss {:.6f}'.format(epoch + 1, batch + 1, sum(train_losses)/len(train_losses)))
eval_losses = []
accuracy = 0
instances = 0
for (batch, (img_tensor, label)) in enumerate(ds_eval.dataset):
eval_loss, predicted = model.compute_loss(img_tensor, label, training=False)
accuracy += sum(np.argmax(predicted, axis=1) == label.numpy())
instances += label.numpy().shape[0]
eval_losses.append(eval_loss)
print ('Epoch {} Train Accuracy: {:.6f} | Test Accuracy: {:.6f}'.format(epoch +1, train_accuracy/train_instances, accuracy/instances))
print ('Epoch {} Train Loss {:.6f} | Eval Loss {:.6f}'.format(epoch + 1, sum(train_losses)/len(train_losses), sum(eval_losses)/len(eval_losses)))
eval_losses = []
accuracy = 0
instances = 0
for (batch, (img_tensor, label)) in enumerate(ds_test.dataset):
eval_loss, predicted = model.compute_loss(img_tensor, label, training=False)
accuracy += sum(np.argmax(predicted, axis=1) == label.numpy())
instances += label.numpy().shape[0]
eval_losses.append(eval_loss)
print ('Epoch {} Train Accuracy: {:.6f} | Test Accuracy: {:.6f}'.format(epoch +1, train_accuracy/train_instances, accuracy/instances))
print ('Epoch {} Train Loss {:.6f} | Eval Loss {:.6f}'.format(epoch + 1, sum(train_losses)/len(train_losses), sum(eval_losses)/len(eval_losses)))
import ipdb; ipdb.set_trace()
saver = tf.train.Checkpoint(model=model, optimizer=optimizer.optimizer)
saver.save('/home/marianne/deep-audio/saver/save')
tfjs.converters.convert_tf_saved_model('/home/marianne/deep-audio/saver/save.ckpt', output_node_names=['test'], output_dir='/home/marianne/deep-audio/')
if __name__ == '__main__':
train() | [
1,
529,
276,
1112,
420,
29958,
29885,
1306,
29899,
1915,
29882,
5114,
29914,
24535,
29899,
18494,
13,
5215,
26110,
408,
15886,
13,
13264,
29889,
12007,
29918,
29872,
1875,
29918,
22256,
580,
13,
13,
5215,
26110,
1315,
408,
15886,
1315,
13,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
848,
29918,
29879,
2863,
29889,
1272,
29918,
4993,
1053,
3630,
4435,
13,
3166,
5994,
19427,
29889,
20640,
3950,
1053,
20693,
326,
3950,
13,
5215,
4733,
29889,
4299,
29918,
14399,
408,
286,
29888,
13,
5215,
3667,
1907,
29889,
13239,
408,
3667,
29879,
13,
13,
3166,
26110,
29889,
4691,
29889,
4645,
1053,
4742,
29918,
1982,
13,
2158,
29898,
10141,
29918,
1982,
29889,
1761,
29918,
2997,
29918,
3359,
1575,
3101,
13,
13,
1753,
7945,
7295,
13,
1678,
18031,
29918,
14968,
353,
3630,
4435,
877,
18494,
29918,
5325,
29914,
5965,
5309,
29914,
14968,
29918,
1272,
29889,
29876,
2272,
742,
525,
18494,
29918,
5325,
29914,
5965,
5309,
29914,
14968,
29918,
21134,
29889,
29876,
2272,
742,
4413,
29918,
8977,
2433,
18494,
29918,
5325,
29914,
5965,
5309,
29914,
13203,
1495,
13,
1678,
18031,
29918,
14513,
29871,
353,
3630,
4435,
877,
18494,
29918,
5325,
29914,
5965,
5309,
29914,
14513,
29918,
1272,
29889,
29876,
2272,
742,
525,
18494,
29918,
5325,
29914,
5965,
5309,
29914,
14513,
29918,
21134,
29889,
29876,
2272,
742,
4413,
29918,
8977,
2433,
18494,
29918,
5325,
29914,
5965,
5309,
29914,
13203,
1495,
13,
1678,
18031,
29918,
1688,
29871,
353,
3630,
4435,
877,
18494,
29918,
5325,
29914,
5965,
5309,
29914,
1688,
29918,
1272,
29889,
29876,
2272,
742,
525,
18494,
29918,
5325,
29914,
5965,
5309,
29914,
1688,
29918,
21134,
29889,
29876,
2272,
742,
4413,
29918,
8977,
2433,
18494,
29918,
5325,
29914,
5965,
5309,
29914,
13203,
1495,
13,
13,
1678,
1904,
353,
286,
29888,
29889,
4282,
29918,
4299,
877,
29907,
10262,
742,
1881,
29918,
12181,
29922,
6289,
29918,
14968,
29889,
2080,
29918,
12181,
29892,
954,
29918,
13203,
353,
18031,
29918,
14968,
29889,
1949,
29918,
13203,
29897,
13,
1678,
5994,
3950,
353,
20693,
326,
3950,
877,
3253,
314,
1495,
13,
13,
1678,
382,
13152,
3210,
29903,
353,
29871,
29896,
13,
1678,
363,
21502,
305,
297,
3464,
29898,
29923,
13152,
3210,
29903,
1125,
13,
4706,
7945,
29918,
6758,
267,
353,
5159,
13,
4706,
7945,
29918,
562,
2764,
4135,
353,
29871,
29900,
13,
4706,
7945,
29918,
2611,
2925,
353,
29871,
29900,
13,
4706,
363,
313,
16175,
29892,
313,
2492,
29918,
20158,
29892,
3858,
876,
297,
26985,
29898,
6289,
29918,
14968,
29889,
24713,
1125,
13,
9651,
7945,
29918,
6758,
29892,
25383,
353,
5994,
3950,
29889,
26017,
29918,
392,
29918,
7302,
29918,
5105,
10070,
29898,
4299,
29892,
10153,
29918,
20158,
29892,
3858,
29897,
13,
9651,
7945,
29918,
6758,
267,
29889,
4397,
29898,
14968,
29918,
6758,
29897,
13,
9651,
7945,
29918,
562,
2764,
4135,
4619,
2533,
29898,
9302,
29889,
1191,
3317,
29898,
11965,
18186,
29892,
9685,
29922,
29896,
29897,
1275,
3858,
29889,
23749,
3101,
13,
9651,
7945,
29918,
2611,
2925,
4619,
3858,
29889,
23749,
2141,
12181,
29961,
29900,
29962,
13,
9651,
396,
1596,
6702,
29923,
1129,
305,
6571,
350,
905,
6571,
28186,
365,
2209,
12365,
29889,
29953,
29888,
29913,
4286,
4830,
29898,
1022,
2878,
718,
29871,
29896,
29892,
9853,
718,
29871,
29896,
29892,
2533,
29898,
14968,
29918,
6758,
267,
6802,
2435,
29898,
14968,
29918,
6758,
267,
4961,
13,
13,
13,
4706,
19745,
29918,
6758,
267,
353,
5159,
13,
4706,
13600,
353,
29871,
29900,
13,
4706,
8871,
353,
29871,
29900,
13,
4706,
363,
313,
16175,
29892,
313,
2492,
29918,
20158,
29892,
3858,
876,
297,
26985,
29898,
6289,
29918,
14513,
29889,
24713,
1125,
13,
9651,
19745,
29918,
6758,
29892,
25383,
353,
1904,
29889,
26017,
29918,
6758,
29898,
2492,
29918,
20158,
29892,
3858,
29892,
6694,
29922,
8824,
29897,
13,
9651,
13600,
4619,
2533,
29898,
9302,
29889,
1191,
3317,
29898,
11965,
18186,
29892,
9685,
29922,
29896,
29897,
1275,
3858,
29889,
23749,
3101,
13,
9651,
8871,
4619,
3858,
29889,
23749,
2141,
12181,
29961,
29900,
29962,
13,
9651,
19745,
29918,
6758,
267,
29889,
4397,
29898,
14513,
29918,
6758,
29897,
13,
13,
4706,
1596,
6702,
29923,
1129,
305,
6571,
28186,
4831,
332,
4135,
29901,
12365,
29889,
29953,
29888,
29913,
891,
4321,
4831,
332,
4135,
29901,
12365,
29889,
29953,
29888,
29913,
4286,
4830,
29898,
1022,
2878,
718,
29896,
29892,
7945,
29918,
562,
2764,
4135,
29914,
14968,
29918,
2611,
2925,
29892,
13600,
29914,
2611,
2925,
876,
13,
4706,
1596,
6702,
29923,
1129,
305,
6571,
28186,
365,
2209,
12365,
29889,
29953,
29888,
29913,
891,
382,
791,
365,
2209,
12365,
29889,
29953,
29888,
29913,
4286,
4830,
29898,
1022,
2878,
718,
29871,
29896,
29892,
2533,
29898,
14968,
29918,
6758,
267,
6802,
2435,
29898,
14968,
29918,
6758,
267,
511,
2533,
29898,
14513,
29918,
6758,
267,
6802,
2435,
29898,
14513,
29918,
6758,
267,
4961,
13,
13,
13,
1678,
19745,
29918,
6758,
267,
353,
5159,
13,
1678,
13600,
353,
29871,
29900,
13,
1678,
8871,
353,
29871,
29900,
13,
1678,
363,
313,
16175,
29892,
313,
2492,
29918,
20158,
29892,
3858,
876,
297,
26985,
29898,
6289,
29918,
1688,
29889,
24713,
1125,
13,
4706,
19745,
29918,
6758,
29892,
25383,
353,
1904,
29889,
26017,
29918,
6758,
29898,
2492,
29918,
20158,
29892,
3858,
29892,
6694,
29922,
8824,
29897,
13,
4706,
13600,
4619,
2533,
29898,
9302,
29889,
1191,
3317,
29898,
11965,
18186,
29892,
9685,
29922,
29896,
29897,
1275,
3858,
29889,
23749,
3101,
13,
4706,
8871,
4619,
3858,
29889,
23749,
2141,
12181,
29961,
29900,
29962,
13,
4706,
19745,
29918,
6758,
267,
29889,
4397,
29898,
14513,
29918,
6758,
29897,
13,
268,
13,
1678,
1596,
6702,
29923,
1129,
305,
6571,
28186,
4831,
332,
4135,
29901,
12365,
29889,
29953,
29888,
29913,
891,
4321,
4831,
332,
4135,
29901,
12365,
29889,
29953,
29888,
29913,
4286,
4830,
29898,
1022,
2878,
718,
29896,
29892,
7945,
29918,
562,
2764,
4135,
29914,
14968,
29918,
2611,
2925,
29892,
13600,
29914,
2611,
2925,
876,
13,
1678,
1596,
6702,
29923,
1129,
305,
6571,
28186,
365,
2209,
12365,
29889,
29953,
29888,
29913,
891,
382,
791,
365,
2209,
12365,
29889,
29953,
29888,
29913,
4286,
4830,
29898,
1022,
2878,
718,
29871,
29896,
29892,
2533,
29898,
14968,
29918,
6758,
267,
6802,
2435,
29898,
14968,
29918,
6758,
267,
511,
2533,
29898,
14513,
29918,
6758,
267,
6802,
2435,
29898,
14513,
29918,
6758,
267,
4961,
13,
13,
13,
1678,
1053,
10377,
2585,
29936,
10377,
2585,
29889,
842,
29918,
15003,
580,
13,
13,
1678,
872,
369,
353,
15886,
29889,
14968,
29889,
5596,
3149,
29898,
4299,
29922,
4299,
29892,
5994,
3950,
29922,
20640,
3950,
29889,
20640,
3950,
29897,
13,
1678,
872,
369,
29889,
7620,
11219,
5184,
29914,
3034,
713,
484,
29914,
24535,
29899,
18494,
29914,
4977,
369,
29914,
7620,
1495,
13,
13,
1678,
15886,
1315,
29889,
535,
369,
2153,
29889,
13441,
29918,
13264,
29918,
17314,
29918,
4299,
11219,
5184,
29914,
3034,
713,
484,
29914,
24535,
29899,
18494,
29914,
4977,
369,
29914,
7620,
29889,
384,
415,
742,
1962,
29918,
3177,
29918,
7039,
29922,
1839,
1688,
7464,
1962,
29918,
3972,
2433,
29914,
5184,
29914,
3034,
713,
484,
29914,
24535,
29899,
18494,
29914,
1495,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
7945,
580,
2
] |
ABC/ABC127/abc127_a.py | yatabis/AtCoder-in-Python3 | 0 | 158108 | <filename>ABC/ABC127/abc127_a.py
# 問題URL: https://atcoder.jp/contests/abc127/tasks/abc127_a
# 解答URL: https://atcoder.jp/contests/abc127/submissions/14655259
a, b = map(int, input().split())
if a <= 5:
print(0)
elif a <= 12:
print(b // 2)
else:
print(b)
| [
1,
529,
9507,
29958,
19658,
29914,
19658,
29896,
29906,
29955,
29914,
10736,
29896,
29906,
29955,
29918,
29874,
29889,
2272,
13,
29937,
29871,
232,
152,
146,
236,
164,
143,
4219,
29901,
2045,
597,
271,
29883,
6119,
29889,
16865,
29914,
1285,
9197,
29914,
10736,
29896,
29906,
29955,
29914,
20673,
29914,
10736,
29896,
29906,
29955,
29918,
29874,
13,
29937,
29871,
31201,
234,
176,
151,
4219,
29901,
2045,
597,
271,
29883,
6119,
29889,
16865,
29914,
1285,
9197,
29914,
10736,
29896,
29906,
29955,
29914,
1491,
29885,
6847,
29914,
29896,
29946,
29953,
29945,
29945,
29906,
29945,
29929,
13,
13,
29874,
29892,
289,
353,
2910,
29898,
524,
29892,
1881,
2141,
5451,
3101,
13,
361,
263,
5277,
29871,
29945,
29901,
13,
1678,
1596,
29898,
29900,
29897,
13,
23681,
263,
5277,
29871,
29896,
29906,
29901,
13,
1678,
1596,
29898,
29890,
849,
29871,
29906,
29897,
13,
2870,
29901,
13,
1678,
1596,
29898,
29890,
29897,
13,
2
] |
components/workstation.py | cqzhao/FooProxy | 0 | 21908 | #coding:utf-8
"""
@author : linkin
@email : <EMAIL>
@date : 2018-10-04
"""
import logging
from APIserver.apiserver import app
from components.collector import Collector
from components.validator import Validator
from components.detector import Detector
from components.scanner import Scaner
from components.tentacle import Tentacle
from multiprocessing import Pool
from multiprocessing import Manager
from config.config import MODE
from const.settings import RUN_FUNC
logger = logging.getLogger()
class Workstation(object):
"""
整个项目的启动工作面板
"""
def __init__(self):
self.collector = Collector()
self.validator = Validator()
self.detector = Detector()
self.scanner = Scaner()
self.tentacle = Tentacle()
self.proxyList = Manager().list()
def run_validator(self,proxyList):
self.validator.run(proxyList)
def run_collector(self,proxyList):
self.collector.run(proxyList)
def run_detector(self,*params):
self.detector.run()
def run_scanner(self,*params):
self.scanner.run()
def run_tentacle(self,*params):
self.tentacle.run()
def work(self):
"""
项目启动,根据config中的MODE配置执行对应的部件
这样可以隔离部件功能,耦合性较低。异步多进程执行需要
共享变量,使用了multiprocessing的Manager来生成
共享List.
"""
pool = Pool(5)
func = []
for i in MODE:
if MODE[i]:
func.append(eval('self.'+RUN_FUNC[i]))
[pool.apply_async(fun,args=(self.proxyList,)) for fun in func]
pool.close()
app.run(host='0.0.0.0',port=2020)
| [
1,
396,
29883,
3689,
29901,
9420,
29899,
29947,
13,
13,
15945,
29908,
13,
1678,
732,
8921,
29871,
584,
1544,
262,
13,
1678,
732,
5269,
259,
584,
529,
26862,
6227,
29958,
13,
1678,
732,
1256,
1678,
584,
29871,
29906,
29900,
29896,
29947,
29899,
29896,
29900,
29899,
29900,
29946,
13,
15945,
29908,
13,
13,
5215,
12183,
13,
3166,
3450,
2974,
29889,
481,
7608,
369,
1678,
1053,
623,
13,
3166,
7117,
29889,
15914,
272,
259,
1053,
24930,
272,
13,
3166,
7117,
29889,
3084,
1061,
259,
1053,
15758,
1061,
13,
3166,
7117,
29889,
4801,
3019,
1678,
1053,
5953,
3019,
13,
3166,
7117,
29889,
1557,
7310,
268,
1053,
2522,
273,
261,
13,
3166,
7117,
29889,
29873,
296,
6436,
1678,
1053,
323,
296,
6436,
13,
3166,
6674,
307,
985,
292,
4706,
1053,
28625,
13,
3166,
6674,
307,
985,
292,
4706,
1053,
15629,
13,
3166,
2295,
29889,
2917,
3986,
1053,
16999,
2287,
13,
3166,
1040,
29889,
11027,
308,
1053,
27694,
29918,
29943,
3904,
29907,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
580,
13,
13,
1990,
5244,
19569,
29898,
3318,
1125,
13,
1678,
9995,
13,
268,
233,
152,
183,
30502,
31888,
30895,
30210,
232,
147,
178,
30846,
31041,
30732,
30806,
233,
160,
194,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
15914,
272,
353,
24930,
272,
580,
13,
4706,
1583,
29889,
3084,
1061,
353,
15758,
1061,
580,
13,
4706,
1583,
29889,
4801,
3019,
29871,
353,
5953,
3019,
580,
13,
4706,
1583,
29889,
1557,
7310,
259,
353,
2522,
273,
261,
580,
13,
4706,
1583,
29889,
29873,
296,
6436,
29871,
353,
323,
296,
6436,
580,
13,
4706,
1583,
29889,
14701,
1293,
353,
15629,
2141,
1761,
580,
13,
13,
1678,
822,
1065,
29918,
3084,
1061,
29898,
1311,
29892,
14701,
1293,
1125,
13,
4706,
1583,
29889,
3084,
1061,
29889,
3389,
29898,
14701,
1293,
29897,
13,
13,
1678,
822,
1065,
29918,
15914,
272,
29898,
1311,
29892,
14701,
1293,
1125,
13,
4706,
1583,
29889,
15914,
272,
29889,
3389,
29898,
14701,
1293,
29897,
13,
13,
1678,
822,
1065,
29918,
4801,
3019,
29898,
1311,
29892,
29930,
7529,
1125,
13,
4706,
1583,
29889,
4801,
3019,
29889,
3389,
580,
13,
13,
1678,
822,
1065,
29918,
1557,
7310,
29898,
1311,
29892,
29930,
7529,
1125,
13,
4706,
1583,
29889,
1557,
7310,
29889,
3389,
580,
13,
13,
1678,
822,
1065,
29918,
29873,
296,
6436,
29898,
1311,
29892,
29930,
7529,
1125,
13,
4706,
1583,
29889,
29873,
296,
6436,
29889,
3389,
580,
13,
13,
1678,
822,
664,
29898,
1311,
1125,
13,
4706,
9995,
13,
308,
31888,
30895,
232,
147,
178,
30846,
30214,
31393,
30763,
2917,
30275,
30210,
20387,
31361,
30669,
233,
140,
170,
30448,
30783,
31370,
30210,
30636,
30631,
13,
308,
30810,
31819,
30682,
30651,
236,
157,
151,
234,
169,
190,
30636,
30631,
31134,
30815,
30214,
235,
131,
169,
30733,
30952,
235,
193,
134,
231,
192,
145,
30267,
232,
191,
133,
233,
176,
168,
30923,
31174,
31101,
233,
140,
170,
30448,
31383,
30698,
13,
308,
31611,
231,
189,
174,
31462,
31180,
30214,
30785,
30406,
30743,
18056,
307,
985,
292,
30210,
3260,
30805,
30486,
30494,
13,
308,
31611,
231,
189,
174,
1293,
29889,
13,
4706,
9995,
13,
4706,
11565,
353,
28625,
29898,
29945,
29897,
13,
4706,
3653,
353,
5159,
13,
4706,
363,
474,
297,
16999,
2287,
29901,
13,
9651,
565,
16999,
2287,
29961,
29875,
5387,
13,
18884,
3653,
29889,
4397,
29898,
14513,
877,
1311,
6169,
29974,
29934,
3904,
29918,
29943,
3904,
29907,
29961,
29875,
12622,
13,
4706,
518,
10109,
29889,
7302,
29918,
12674,
29898,
7692,
29892,
5085,
7607,
1311,
29889,
14701,
1293,
29892,
876,
363,
2090,
297,
3653,
29962,
13,
4706,
11565,
29889,
5358,
580,
13,
4706,
623,
29889,
3389,
29898,
3069,
2433,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
742,
637,
29922,
29906,
29900,
29906,
29900,
29897,
13,
13,
13,
13,
2
] |
src/djanban/apps/api/views/cards.py | diegojromerolopez/djanban | 33 | 109250 | <gh_stars>10-100
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
import re
import tempfile
import dateutil
from django.core.files.base import ContentFile
from django.core.serializers.json import DjangoJSONEncoder
from django.db import transaction
from django.db.models import Q
from django.http import JsonResponse, Http404
from django.utils import timezone
from djanban.apps.api.http import JsonResponseBadRequest, JsonResponseMethodNotAllowed, JsonResponseNotFound
from djanban.apps.api.serializers import Serializer
from djanban.apps.api.util import get_list_or_404, get_card_or_404, get_board_or_404
from djanban.apps.base.auth import get_user_boards
from djanban.apps.base.decorators import member_required
from djanban.apps.boards.models import Board, Card, CardComment, List, CardAttachment
# Point of access to several actions
from djanban.apps.forecasters.models import Forecaster
from djanban.utils.custom_uuid import custom_uuid
@member_required
def modify_cards(request, board_id):
# Create a new card
if request.method == "PUT":
return _add_card(request, board_id)
# Move all cards in a list
if request.method == "POST":
return _move_all_list_cards(request, board_id)
# Otherwise, return HTTP ERROR 405
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
# Adds a new card in the board
# Used by modify_cards
def _add_card(request, board_id):
if request.method != "PUT":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
put_params = json.loads(request.body)
if not put_params.get("name") or not put_params.get("list") or not put_params.get("position"):
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
if put_params.get("position") != "top" and put_params.get("position") != "bottom":
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
try:
list_ = get_list_or_404(request, board_id, put_params.get("list"))
except Http404:
return JsonResponseNotFound({"message": "List not found"})
new_card = list_.add_card(member=member, name=put_params.get("name"), position=put_params.get("position"))
serializer = Serializer(board=new_card.board)
return JsonResponse(serializer.serialize_card(new_card))
# Move all cards from a list to another
# Used by modify_cards
def _move_all_list_cards(request, board_id):
if request.method != "POST":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
try:
board = get_board_or_404(request, board_id)
except Http404:
return JsonResponseNotFound({"message": "Board not found"})
post_params = json.loads(request.body)
if not post_params.get("source_list") or not post_params.get("destination_list"):
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
# Check if the lists exists and if they are different
try:
source_list = board.active_lists.get(id=post_params.get("source_list"))
destination_list = board.active_lists.get(id=post_params.get("destination_list"))
if source_list.id == destination_list.id:
raise AssertionError()
except (List.DoesNotExist, AssertionError):
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
# Move the cards
source_list.move_cards(member=member, destination_list=destination_list)
serializer = Serializer(board=board)
return JsonResponse(serializer.serialize_board())
# Return the JSON representation of a card
@member_required
def get_card(request, board_id, card_id):
if request.method != "GET":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
try:
card = get_card_or_404(request, board_id, card_id)
except Http404:
return JsonResponseNotFound({"message": "Card not found."})
serializer = Serializer(board=card.board)
card_json = serializer.serialize_card(card)
return JsonResponse(card_json)
# Change the name or description of the card
@member_required
@transaction.atomic
def change(request, board_id, card_id):
if request.method != "PUT":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
try:
card = get_card_or_404(request, board_id, card_id)
except Http404:
return JsonResponseNotFound({"message": "Card not found."})
put_params = json.loads(request.body)
if put_params.get("name"):
card.change_attribute(member, attribute="name", value=put_params.get("name"))
elif put_params.get("description"):
card.change_attribute(member, attribute="description", value=put_params.get("name"))
elif put_params.get("is_closed") is not None:
card.change_attribute(member, attribute="is_closed", value=put_params.get("name"))
elif put_params.get("due_datetime"):
due_datetime_str = put_params.get("due_datetime")
due_datetime = dateutil.parser.parse(due_datetime_str)
card.change_attribute(member, attribute="due_datetime", value=due_datetime)
elif "due_datetime" in put_params and put_params.get("due_datetime") is None:
card.change_attribute(member, attribute="due_datetime", value=None)
elif "value" in put_params:
card_value = put_params.get("value")
if card_value == "":
card_value = None
card.change_value(member=member, value=card_value)
else:
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card(card))
# Change the labels of the card
@member_required
@transaction.atomic
def change_labels(request, board_id, card_id):
if request.method != "POST":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
try:
card = get_card_or_404(request, board_id, card_id)
except Http404:
return JsonResponseNotFound({"message": "Card not found."})
board = card.board
post_params = json.loads(request.body)
if not post_params.get("labels"):
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
label_ids = post_params.get("labels")
card.labels.clear()
for label_id in label_ids:
if board.labels.filter(id=label_id).exists():
label = board.labels.get(id=label_id)
card.labels.add(label)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card(card))
@member_required
@transaction.atomic
def change_members(request, board_id, card_id):
if request.method != "POST":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
try:
card = get_card_or_404(request, board_id, card_id)
except Http404:
return JsonResponseNotFound({"message": "Card not found."})
board = card.board
post_params = json.loads(request.body)
if not post_params.get("members"):
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
member_ids = post_params.get("members")
card.update_members(member, board.members.filter(id__in=member_ids))
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card(card))
# Change list
@member_required
@transaction.atomic
def move_to_list(request, board_id, card_id):
if request.method != "POST":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
post_params = json.loads(request.body)
member = request.user.member
try:
card = get_card_or_404(request, board_id, card_id)
except Http404:
return JsonResponseNotFound({"message": "Card not found."})
# The new position of the card
new_position = post_params.get("position", "top")
# If there is no new_list param, the card is going to be moved in the same list currently is
if post_params.get("new_list"):
list_ = card.board.lists.get(id=post_params.get("new_list"))
card.move(member, destination_list=list_, destination_position=new_position)
else:
card.change_order(member, destination_position=new_position)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_board())
# Creates a new attachment
@member_required
@transaction.atomic
def add_attachment(request, board_id, card_id):
if request.method != "POST":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
try:
board = get_user_boards(request.user).get(id=board_id)
card = board.cards.get(id=card_id)
except (Board.DoesNotExist, Card.DoesNotExist) as e:
return JsonResponseNotFound({"message": "Not found."})
uploaded_file_content = request.body
if uploaded_file_content is None:
return JsonResponseNotFound({"message": "No file sent."})
with tempfile.TemporaryFile() as uploaded_file:
uploaded_file.write(uploaded_file_content)
uploaded_file_name = request.GET.get("uploaded_file_name", custom_uuid())
attachment = card.add_new_attachment(member, uploaded_file, uploaded_file_name)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card_attachment(attachment))
# Deletes an attachment
@member_required
@transaction.atomic
def delete_attachment(request, board_id, card_id, attachment_id):
if request.method != "DELETE":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
try:
board = get_user_boards(request.user).get(id=board_id)
card = board.cards.get(id=card_id)
attachment = card.attachments.get(id=attachment_id)
except (Board.DoesNotExist, Card.DoesNotExist, CardAttachment.DoesNotExist) as e:
return JsonResponseNotFound({"message": "Not found."})
card.delete_attachment(member, attachment)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card_attachment(attachment))
# Creates a new comment
@member_required
@transaction.atomic
def add_new_comment(request, board_id, card_id):
if request.method != "PUT":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
put_params = json.loads(request.body)
member = request.user.member
try:
card = get_card_or_404(request, board_id, card_id)
except Http404:
return JsonResponseNotFound({"message": "Card not found."})
# Getting the comment content
comment_content = put_params.get("content")
# If the comment is empty, fail
if not comment_content:
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
# Otherwise, add the comment
new_comment = card.add_comment(member, comment_content)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card_comment(new_comment))
# Add S/E time to card
@member_required
@transaction.atomic
def add_se_time(request, board_id, card_id):
if request.method != "POST":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
try:
card = get_card_or_404(request, board_id, card_id)
except Http404:
return JsonResponseNotFound({"message": "Card not found."})
post_params = json.loads(request.body)
spent_time = post_params.get("spent_time")
estimated_time = post_params.get("estimated_time")
date = post_params.get("date")
description = post_params.get("description", card.name)
if spent_time != "":
try:
spent_time = float(str(spent_time).replace(",", "."))
except ValueError:
return JsonResponseNotFound({"message": "Not found."})
else:
spent_time = None
if estimated_time != "":
try:
estimated_time = float(str(estimated_time).replace(",", "."))
except ValueError:
return JsonResponseNotFound({"message": "Not found."})
else:
estimated_time = None
if spent_time is None and estimated_time is None:
return JsonResponseNotFound({"message": "Not found."})
# Optional days ago parameter
days_ago = None
matches = re.match(r"^\-(?P<days_ago>\d+)$", date)
if matches:
days_ago = int(matches.group("days_ago"))
card.add_spent_estimated_time(member, spent_time, estimated_time, days_ago, description)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card(card))
# Create a new estimation for a card
@member_required
def update_forecasts(request, board_id, card_id):
try:
board = get_user_boards(request.user).get(id=board_id)
card = board.cards.get(id=card_id)
except (Board.DoesNotExist, Card.DoesNotExist) as e:
return JsonResponseNotFound({"message": "Not found."})
available_card_forecasters = Forecaster.objects.filter(
(Q(board=None) & Q(member=None)) |
(Q(board=card.board) & Q(member=None)) |
(Q(board=None) & Q(member__in=card.members.all()))
)
serializer = Serializer(board=card.board)
estimations = []
for forecaster in available_card_forecasters:
forecast = forecaster.make_forecast(card=card)
estimations.append(serializer.serialize_forecast(forecast))
return JsonResponse(estimations, safe=False, encoder=DjangoJSONEncoder)
# Add a new blocking card to this card
@member_required
def add_blocking_card(request, board_id, card_id):
if request.method != "PUT":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
put_body = json.loads(request.body)
if not put_body.get("blocking_card"):
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
try:
board = get_user_boards(request.user).get(id=board_id)
card = board.cards.get(id=card_id)
blocking_card = board.cards.exclude(id=card_id).get(id=put_body.get("blocking_card"))
except (Board.DoesNotExist, Card.DoesNotExist) as e:
return JsonResponseNotFound({"message": "Not found."})
card.add_blocking_card(member, blocking_card)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card(card))
# Remove a blocking card to this card
@member_required
def remove_blocking_card(request, board_id, card_id, blocking_card_id):
if request.method != "DELETE":
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
member = request.user.member
try:
board = get_user_boards(request.user).get(id=board_id)
card = board.cards.get(id=card_id)
blocking_card = card.blocking_cards.exclude(id=card_id).get(id=blocking_card_id)
except (Board.DoesNotExist, Card.DoesNotExist) as e:
return JsonResponseNotFound({"message": "Not found."})
card.remove_blocking_card(member, blocking_card)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card(card))
# Add a new review
@member_required
@transaction.atomic
def add_new_review(request, board_id, card_id):
if request.method != "PUT":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
try:
card = get_card_or_404(request, board_id, card_id)
except Http404:
return JsonResponseNotFound({"message": "Card not found."})
board = card.board
put_body = json.loads(request.body)
if not put_body.get("members"):
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
reviewers = board.members.filter(id__in=put_body.get("members"))
description = put_body.get("description", "")
card.add_review(member, reviewers=reviewers, description=description)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card(card))
# Delete a review
@member_required
@transaction.atomic
def delete_review(request, board_id, card_id, review_id):
if request.method != "DELETE":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
try:
board = get_user_boards(request.user).get(id=board_id)
card = board.cards.get(id=card_id)
review = card.reviews.get(id=review_id)
except (Board.DoesNotExist, Card.DoesNotExist) as e:
return JsonResponseNotFound({"message": "Not found."})
card.delete_review(member, review)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card(card))
# Add a requirement to the card
@member_required
@transaction.atomic
def add_requirement(request, board_id, card_id):
if request.method != "PUT":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
try:
card = get_card_or_404(request, board_id, card_id)
except Http404:
return JsonResponseNotFound({"message": "Card not found."})
board = card.board
put_body = json.loads(request.body)
if not put_body.get("requirement"):
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
requirement = board.requirements.get(id=put_body.get("requirement"))
# If the requirement is already in the card, we can't continue
if card.requirements.filter(id=requirement.id).exists():
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
card.add_requirement(member, requirement)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card(card))
# Remove a requirement of the card
@member_required
@transaction.atomic
def remove_requirement(request, board_id, card_id, requirement_id):
if request.method != "DELETE":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
try:
board = get_user_boards(request.user).get(id=board_id)
card = board.cards.get(id=card_id)
requirement = card.requirements.get(id=requirement_id)
except (Board.DoesNotExist, Card.DoesNotExist) as e:
return JsonResponseNotFound({"message": "Not found."})
card.remove_requirement(member, requirement)
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card(card))
# Delete or update a comment
@member_required
@transaction.atomic
def modify_comment(request, board_id, card_id, comment_id):
if request.method != "DELETE" and request.method != "POST":
return JsonResponseMethodNotAllowed({"message": "HTTP method not allowed."})
member = request.user.member
try:
card = get_card_or_404(request, board_id, card_id)
except Http404:
return JsonResponseNotFound({"message": "Card not found."})
try:
comment = card.comments.get(id=comment_id)
except CardComment.DoesNotExist as e:
return JsonResponseNotFound({"message": "Not found."})
if request.method == "DELETE":
comment = _delete_comment(member, card, comment)
elif request.method == "POST":
post_params = json.loads(request.body)
new_comment_content = post_params.get("content")
if not new_comment_content:
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
comment = _edit_comment(member, card, comment, new_comment_content)
else:
return JsonResponseBadRequest({"message": "Bad request: some parameters are missing."})
serializer = Serializer(board=card.board)
return JsonResponse(serializer.serialize_card_comment(comment))
# Edit comment
@member_required
def _edit_comment(member, card, comment_to_edit, new_comment_content):
edited_comment = card.edit_comment(member, comment_to_edit, new_comment_content)
return edited_comment
# Delete a comment
@member_required
def _delete_comment(member, card, comment_to_delete):
# Delete the comment
card.delete_comment(member, comment_to_delete)
return comment_to_delete
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
5215,
4390,
13,
5215,
337,
13,
5215,
5694,
1445,
13,
13,
5215,
2635,
4422,
13,
3166,
9557,
29889,
3221,
29889,
5325,
29889,
3188,
1053,
10576,
2283,
13,
3166,
9557,
29889,
3221,
29889,
15550,
19427,
29889,
3126,
1053,
15337,
7249,
8566,
6119,
13,
3166,
9557,
29889,
2585,
1053,
10804,
13,
3166,
9557,
29889,
2585,
29889,
9794,
1053,
660,
13,
3166,
9557,
29889,
1124,
1053,
14355,
5103,
29892,
9056,
29946,
29900,
29946,
13,
3166,
9557,
29889,
13239,
1053,
29431,
13,
13,
3166,
270,
8931,
2571,
29889,
13371,
29889,
2754,
29889,
1124,
1053,
14355,
5103,
22050,
3089,
29892,
14355,
5103,
4062,
3664,
15930,
287,
29892,
14355,
5103,
17413,
13,
3166,
270,
8931,
2571,
29889,
13371,
29889,
2754,
29889,
15550,
19427,
1053,
18896,
3950,
13,
3166,
270,
8931,
2571,
29889,
13371,
29889,
2754,
29889,
4422,
1053,
679,
29918,
1761,
29918,
272,
29918,
29946,
29900,
29946,
29892,
679,
29918,
7543,
29918,
272,
29918,
29946,
29900,
29946,
29892,
679,
29918,
3377,
29918,
272,
29918,
29946,
29900,
29946,
13,
3166,
270,
8931,
2571,
29889,
13371,
29889,
3188,
29889,
5150,
1053,
679,
29918,
1792,
29918,
24691,
13,
3166,
270,
8931,
2571,
29889,
13371,
29889,
3188,
29889,
19557,
4097,
1053,
4509,
29918,
12403,
13,
3166,
270,
8931,
2571,
29889,
13371,
29889,
24691,
29889,
9794,
1053,
12590,
29892,
9160,
29892,
9160,
20001,
29892,
2391,
29892,
9160,
4165,
25117,
13,
13,
13,
29937,
8984,
310,
2130,
304,
3196,
8820,
13,
3166,
270,
8931,
2571,
29889,
13371,
29889,
1079,
29883,
1901,
29879,
29889,
9794,
1053,
28297,
29883,
1901,
13,
3166,
270,
8931,
2571,
29889,
13239,
29889,
6341,
29918,
25118,
1053,
2888,
29918,
25118,
13,
13,
13,
29992,
14242,
29918,
12403,
13,
1753,
6623,
29918,
28160,
29898,
3827,
29892,
7613,
29918,
333,
1125,
13,
1678,
396,
6204,
263,
716,
5881,
13,
1678,
565,
2009,
29889,
5696,
1275,
376,
12336,
1115,
13,
4706,
736,
903,
1202,
29918,
7543,
29898,
3827,
29892,
7613,
29918,
333,
29897,
13,
13,
1678,
396,
25249,
599,
15889,
297,
263,
1051,
13,
1678,
565,
2009,
29889,
5696,
1275,
376,
5438,
1115,
13,
4706,
736,
903,
11631,
29918,
497,
29918,
1761,
29918,
28160,
29898,
3827,
29892,
7613,
29918,
333,
29897,
13,
13,
1678,
396,
13466,
29892,
736,
7331,
14431,
29871,
29946,
29900,
29945,
13,
1678,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
13,
29937,
3462,
29879,
263,
716,
5881,
297,
278,
7613,
13,
29937,
501,
8485,
491,
6623,
29918,
28160,
13,
1753,
903,
1202,
29918,
7543,
29898,
3827,
29892,
7613,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
12336,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
13,
1678,
1925,
29918,
7529,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
13,
1678,
565,
451,
1925,
29918,
7529,
29889,
657,
703,
978,
1159,
470,
451,
1925,
29918,
7529,
29889,
657,
703,
1761,
1159,
470,
451,
1925,
29918,
7529,
29889,
657,
703,
3283,
29908,
1125,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
565,
1925,
29918,
7529,
29889,
657,
703,
3283,
1159,
2804,
376,
3332,
29908,
322,
1925,
29918,
7529,
29889,
657,
703,
3283,
1159,
2804,
376,
8968,
1115,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
1018,
29901,
13,
4706,
1051,
29918,
353,
679,
29918,
1761,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29892,
1925,
29918,
7529,
29889,
657,
703,
1761,
5783,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
1293,
451,
1476,
29908,
1800,
13,
13,
1678,
716,
29918,
7543,
353,
1051,
5396,
1202,
29918,
7543,
29898,
14242,
29922,
14242,
29892,
1024,
29922,
649,
29918,
7529,
29889,
657,
703,
978,
4968,
2602,
29922,
649,
29918,
7529,
29889,
657,
703,
3283,
5783,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
1482,
29918,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29898,
1482,
29918,
7543,
876,
13,
13,
13,
29937,
25249,
599,
15889,
515,
263,
1051,
304,
1790,
13,
29937,
501,
8485,
491,
6623,
29918,
28160,
13,
1753,
903,
11631,
29918,
497,
29918,
1761,
29918,
28160,
29898,
3827,
29892,
7613,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
5438,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
7613,
353,
679,
29918,
3377,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29897,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
28397,
451,
1476,
29908,
1800,
13,
13,
1678,
1400,
29918,
7529,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
13,
1678,
565,
451,
1400,
29918,
7529,
29889,
657,
703,
4993,
29918,
1761,
1159,
470,
451,
1400,
29918,
7529,
29889,
657,
703,
23848,
29918,
1761,
29908,
1125,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
396,
5399,
565,
278,
8857,
4864,
322,
565,
896,
526,
1422,
13,
1678,
1018,
29901,
13,
4706,
2752,
29918,
1761,
353,
7613,
29889,
4925,
29918,
21513,
29889,
657,
29898,
333,
29922,
2490,
29918,
7529,
29889,
657,
703,
4993,
29918,
1761,
5783,
13,
4706,
12551,
29918,
1761,
353,
7613,
29889,
4925,
29918,
21513,
29889,
657,
29898,
333,
29922,
2490,
29918,
7529,
29889,
657,
703,
23848,
29918,
1761,
5783,
13,
4706,
565,
2752,
29918,
1761,
29889,
333,
1275,
12551,
29918,
1761,
29889,
333,
29901,
13,
9651,
12020,
16499,
291,
2392,
580,
13,
1678,
5174,
313,
1293,
29889,
25125,
3664,
1252,
391,
29892,
16499,
291,
2392,
1125,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
396,
25249,
278,
15889,
13,
1678,
2752,
29918,
1761,
29889,
11631,
29918,
28160,
29898,
14242,
29922,
14242,
29892,
12551,
29918,
1761,
29922,
23848,
29918,
1761,
29897,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
3377,
3101,
13,
13,
13,
29937,
7106,
278,
4663,
8954,
310,
263,
5881,
13,
29992,
14242,
29918,
12403,
13,
1753,
679,
29918,
7543,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
7194,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
1678,
1018,
29901,
13,
4706,
5881,
353,
679,
29918,
7543,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29897,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
13200,
451,
1476,
1213,
1800,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
5881,
29918,
3126,
353,
7797,
3950,
29889,
643,
6646,
29918,
7543,
29898,
7543,
29897,
13,
1678,
736,
14355,
5103,
29898,
7543,
29918,
3126,
29897,
13,
13,
13,
29937,
10726,
278,
1024,
470,
6139,
310,
278,
5881,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
1735,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
12336,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
5881,
353,
679,
29918,
7543,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29897,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
13200,
451,
1476,
1213,
1800,
13,
13,
1678,
1925,
29918,
7529,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
13,
1678,
565,
1925,
29918,
7529,
29889,
657,
703,
978,
29908,
1125,
13,
4706,
5881,
29889,
3167,
29918,
12715,
29898,
14242,
29892,
5352,
543,
978,
613,
995,
29922,
649,
29918,
7529,
29889,
657,
703,
978,
5783,
13,
13,
1678,
25342,
1925,
29918,
7529,
29889,
657,
703,
8216,
29908,
1125,
13,
4706,
5881,
29889,
3167,
29918,
12715,
29898,
14242,
29892,
5352,
543,
8216,
613,
995,
29922,
649,
29918,
7529,
29889,
657,
703,
978,
5783,
13,
13,
1678,
25342,
1925,
29918,
7529,
29889,
657,
703,
275,
29918,
15603,
1159,
338,
451,
6213,
29901,
13,
4706,
5881,
29889,
3167,
29918,
12715,
29898,
14242,
29892,
5352,
543,
275,
29918,
15603,
613,
995,
29922,
649,
29918,
7529,
29889,
657,
703,
978,
5783,
13,
13,
1678,
25342,
1925,
29918,
7529,
29889,
657,
703,
29123,
29918,
12673,
29908,
1125,
13,
4706,
2861,
29918,
12673,
29918,
710,
353,
1925,
29918,
7529,
29889,
657,
703,
29123,
29918,
12673,
1159,
13,
4706,
2861,
29918,
12673,
353,
2635,
4422,
29889,
16680,
29889,
5510,
29898,
29123,
29918,
12673,
29918,
710,
29897,
13,
4706,
5881,
29889,
3167,
29918,
12715,
29898,
14242,
29892,
5352,
543,
29123,
29918,
12673,
613,
995,
29922,
29123,
29918,
12673,
29897,
13,
13,
1678,
25342,
376,
29123,
29918,
12673,
29908,
297,
1925,
29918,
7529,
322,
1925,
29918,
7529,
29889,
657,
703,
29123,
29918,
12673,
1159,
338,
6213,
29901,
13,
4706,
5881,
29889,
3167,
29918,
12715,
29898,
14242,
29892,
5352,
543,
29123,
29918,
12673,
613,
995,
29922,
8516,
29897,
13,
13,
1678,
25342,
376,
1767,
29908,
297,
1925,
29918,
7529,
29901,
13,
4706,
5881,
29918,
1767,
353,
1925,
29918,
7529,
29889,
657,
703,
1767,
1159,
13,
4706,
565,
5881,
29918,
1767,
1275,
376,
1115,
13,
9651,
5881,
29918,
1767,
353,
6213,
13,
4706,
5881,
29889,
3167,
29918,
1767,
29898,
14242,
29922,
14242,
29892,
995,
29922,
7543,
29918,
1767,
29897,
13,
13,
1678,
1683,
29901,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29898,
7543,
876,
13,
13,
13,
29937,
10726,
278,
11073,
310,
278,
5881,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
1735,
29918,
21134,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
5438,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
1018,
29901,
13,
4706,
5881,
353,
679,
29918,
7543,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29897,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
13200,
451,
1476,
1213,
1800,
13,
1678,
7613,
353,
5881,
29889,
3377,
13,
13,
1678,
1400,
29918,
7529,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
13,
1678,
565,
451,
1400,
29918,
7529,
29889,
657,
703,
21134,
29908,
1125,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
3858,
29918,
4841,
353,
1400,
29918,
7529,
29889,
657,
703,
21134,
1159,
13,
1678,
5881,
29889,
21134,
29889,
8551,
580,
13,
1678,
363,
3858,
29918,
333,
297,
3858,
29918,
4841,
29901,
13,
4706,
565,
7613,
29889,
21134,
29889,
4572,
29898,
333,
29922,
1643,
29918,
333,
467,
9933,
7295,
13,
9651,
3858,
353,
7613,
29889,
21134,
29889,
657,
29898,
333,
29922,
1643,
29918,
333,
29897,
13,
9651,
5881,
29889,
21134,
29889,
1202,
29898,
1643,
29897,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29898,
7543,
876,
13,
13,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
1735,
29918,
28109,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
5438,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
5881,
353,
679,
29918,
7543,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29897,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
13200,
451,
1476,
1213,
1800,
13,
1678,
7613,
353,
5881,
29889,
3377,
13,
13,
1678,
1400,
29918,
7529,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
13,
1678,
565,
451,
1400,
29918,
7529,
29889,
657,
703,
28109,
29908,
1125,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
4509,
29918,
4841,
353,
1400,
29918,
7529,
29889,
657,
703,
28109,
1159,
13,
13,
1678,
5881,
29889,
5504,
29918,
28109,
29898,
14242,
29892,
7613,
29889,
28109,
29889,
4572,
29898,
333,
1649,
262,
29922,
14242,
29918,
4841,
876,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29898,
7543,
876,
13,
13,
13,
29937,
10726,
1051,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
4337,
29918,
517,
29918,
1761,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
5438,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
1400,
29918,
7529,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
5881,
353,
679,
29918,
7543,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29897,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
13200,
451,
1476,
1213,
1800,
13,
13,
1678,
396,
450,
716,
2602,
310,
278,
5881,
13,
1678,
716,
29918,
3283,
353,
1400,
29918,
7529,
29889,
657,
703,
3283,
613,
376,
3332,
1159,
13,
13,
1678,
396,
960,
727,
338,
694,
716,
29918,
1761,
1828,
29892,
278,
5881,
338,
2675,
304,
367,
6153,
297,
278,
1021,
1051,
5279,
338,
13,
1678,
565,
1400,
29918,
7529,
29889,
657,
703,
1482,
29918,
1761,
29908,
1125,
13,
4706,
1051,
29918,
353,
5881,
29889,
3377,
29889,
21513,
29889,
657,
29898,
333,
29922,
2490,
29918,
7529,
29889,
657,
703,
1482,
29918,
1761,
5783,
13,
4706,
5881,
29889,
11631,
29898,
14242,
29892,
12551,
29918,
1761,
29922,
1761,
3383,
12551,
29918,
3283,
29922,
1482,
29918,
3283,
29897,
13,
1678,
1683,
29901,
13,
4706,
5881,
29889,
3167,
29918,
2098,
29898,
14242,
29892,
12551,
29918,
3283,
29922,
1482,
29918,
3283,
29897,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
3377,
3101,
13,
13,
13,
29937,
6760,
1078,
263,
716,
26305,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
788,
29918,
14930,
358,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
5438,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
7613,
353,
679,
29918,
1792,
29918,
24691,
29898,
3827,
29889,
1792,
467,
657,
29898,
333,
29922,
3377,
29918,
333,
29897,
13,
4706,
5881,
353,
7613,
29889,
28160,
29889,
657,
29898,
333,
29922,
7543,
29918,
333,
29897,
13,
1678,
5174,
313,
28397,
29889,
25125,
3664,
1252,
391,
29892,
9160,
29889,
25125,
3664,
1252,
391,
29897,
408,
321,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3664,
1476,
1213,
1800,
13,
13,
1678,
20373,
29918,
1445,
29918,
3051,
353,
2009,
29889,
2587,
13,
1678,
565,
20373,
29918,
1445,
29918,
3051,
338,
6213,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3782,
934,
2665,
1213,
1800,
13,
13,
1678,
411,
5694,
1445,
29889,
5776,
1971,
653,
2283,
580,
408,
20373,
29918,
1445,
29901,
13,
4706,
20373,
29918,
1445,
29889,
3539,
29898,
9009,
287,
29918,
1445,
29918,
3051,
29897,
13,
4706,
20373,
29918,
1445,
29918,
978,
353,
2009,
29889,
7194,
29889,
657,
703,
9009,
287,
29918,
1445,
29918,
978,
613,
2888,
29918,
25118,
3101,
13,
4706,
26305,
353,
5881,
29889,
1202,
29918,
1482,
29918,
14930,
358,
29898,
14242,
29892,
20373,
29918,
1445,
29892,
20373,
29918,
1445,
29918,
978,
29897,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29918,
14930,
358,
29898,
14930,
358,
876,
13,
13,
13,
29937,
897,
1026,
267,
385,
26305,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
5217,
29918,
14930,
358,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29892,
26305,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
2287,
18476,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
7613,
353,
679,
29918,
1792,
29918,
24691,
29898,
3827,
29889,
1792,
467,
657,
29898,
333,
29922,
3377,
29918,
333,
29897,
13,
4706,
5881,
353,
7613,
29889,
28160,
29889,
657,
29898,
333,
29922,
7543,
29918,
333,
29897,
13,
4706,
26305,
353,
5881,
29889,
14930,
1860,
29889,
657,
29898,
333,
29922,
14930,
358,
29918,
333,
29897,
13,
1678,
5174,
313,
28397,
29889,
25125,
3664,
1252,
391,
29892,
9160,
29889,
25125,
3664,
1252,
391,
29892,
9160,
4165,
25117,
29889,
25125,
3664,
1252,
391,
29897,
408,
321,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3664,
1476,
1213,
1800,
13,
13,
1678,
5881,
29889,
8143,
29918,
14930,
358,
29898,
14242,
29892,
26305,
29897,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29918,
14930,
358,
29898,
14930,
358,
876,
13,
13,
13,
29937,
6760,
1078,
263,
716,
3440,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
788,
29918,
1482,
29918,
9342,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
12336,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
1925,
29918,
7529,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
5881,
353,
679,
29918,
7543,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29897,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
13200,
451,
1476,
1213,
1800,
13,
13,
1678,
396,
24162,
278,
3440,
2793,
13,
1678,
3440,
29918,
3051,
353,
1925,
29918,
7529,
29889,
657,
703,
3051,
1159,
13,
13,
1678,
396,
960,
278,
3440,
338,
4069,
29892,
4418,
13,
1678,
565,
451,
3440,
29918,
3051,
29901,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
396,
13466,
29892,
788,
278,
3440,
13,
1678,
716,
29918,
9342,
353,
5881,
29889,
1202,
29918,
9342,
29898,
14242,
29892,
3440,
29918,
3051,
29897,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29918,
9342,
29898,
1482,
29918,
9342,
876,
13,
13,
13,
29937,
3462,
317,
29914,
29923,
931,
304,
5881,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
788,
29918,
344,
29918,
2230,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
5438,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
5881,
353,
679,
29918,
7543,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29897,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
13200,
451,
1476,
1213,
1800,
13,
13,
1678,
1400,
29918,
7529,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
1678,
10398,
29918,
2230,
353,
1400,
29918,
7529,
29889,
657,
703,
1028,
296,
29918,
2230,
1159,
13,
1678,
15899,
29918,
2230,
353,
1400,
29918,
7529,
29889,
657,
703,
342,
326,
630,
29918,
2230,
1159,
13,
1678,
2635,
353,
1400,
29918,
7529,
29889,
657,
703,
1256,
1159,
13,
1678,
6139,
353,
1400,
29918,
7529,
29889,
657,
703,
8216,
613,
5881,
29889,
978,
29897,
13,
13,
1678,
565,
10398,
29918,
2230,
2804,
376,
1115,
13,
4706,
1018,
29901,
13,
9651,
10398,
29918,
2230,
353,
5785,
29898,
710,
29898,
1028,
296,
29918,
2230,
467,
6506,
28165,
613,
376,
1213,
876,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3664,
1476,
1213,
1800,
13,
1678,
1683,
29901,
13,
4706,
10398,
29918,
2230,
353,
6213,
13,
13,
1678,
565,
15899,
29918,
2230,
2804,
376,
1115,
13,
4706,
1018,
29901,
13,
9651,
15899,
29918,
2230,
353,
5785,
29898,
710,
29898,
342,
326,
630,
29918,
2230,
467,
6506,
28165,
613,
376,
1213,
876,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3664,
1476,
1213,
1800,
13,
1678,
1683,
29901,
13,
4706,
15899,
29918,
2230,
353,
6213,
13,
13,
1678,
565,
10398,
29918,
2230,
338,
6213,
322,
15899,
29918,
2230,
338,
6213,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3664,
1476,
1213,
1800,
13,
13,
1678,
396,
28379,
3841,
8020,
3443,
13,
1678,
3841,
29918,
4425,
353,
6213,
13,
1678,
7087,
353,
337,
29889,
4352,
29898,
29878,
29908,
3823,
29899,
10780,
29925,
29966,
16700,
29918,
4425,
14247,
29881,
29974,
1262,
613,
2635,
29897,
13,
1678,
565,
7087,
29901,
13,
4706,
3841,
29918,
4425,
353,
938,
29898,
20317,
29889,
2972,
703,
16700,
29918,
4425,
5783,
13,
13,
1678,
5881,
29889,
1202,
29918,
1028,
296,
29918,
342,
326,
630,
29918,
2230,
29898,
14242,
29892,
10398,
29918,
2230,
29892,
15899,
29918,
2230,
29892,
3841,
29918,
4425,
29892,
6139,
29897,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29898,
7543,
876,
13,
13,
13,
29937,
6204,
263,
716,
23248,
363,
263,
5881,
13,
29992,
14242,
29918,
12403,
13,
1753,
2767,
29918,
1079,
4384,
29879,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
1018,
29901,
13,
4706,
7613,
353,
679,
29918,
1792,
29918,
24691,
29898,
3827,
29889,
1792,
467,
657,
29898,
333,
29922,
3377,
29918,
333,
29897,
13,
4706,
5881,
353,
7613,
29889,
28160,
29889,
657,
29898,
333,
29922,
7543,
29918,
333,
29897,
13,
1678,
5174,
313,
28397,
29889,
25125,
3664,
1252,
391,
29892,
9160,
29889,
25125,
3664,
1252,
391,
29897,
408,
321,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3664,
1476,
1213,
1800,
13,
13,
1678,
3625,
29918,
7543,
29918,
1079,
29883,
1901,
29879,
353,
28297,
29883,
1901,
29889,
12650,
29889,
4572,
29898,
13,
4706,
313,
29984,
29898,
3377,
29922,
8516,
29897,
669,
660,
29898,
14242,
29922,
8516,
876,
891,
13,
4706,
313,
29984,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
669,
660,
29898,
14242,
29922,
8516,
876,
891,
13,
4706,
313,
29984,
29898,
3377,
29922,
8516,
29897,
669,
660,
29898,
14242,
1649,
262,
29922,
7543,
29889,
28109,
29889,
497,
22130,
13,
1678,
1723,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
13,
1678,
4844,
800,
353,
5159,
13,
1678,
363,
29821,
1901,
297,
3625,
29918,
7543,
29918,
1079,
29883,
1901,
29879,
29901,
13,
13,
4706,
29821,
579,
353,
29821,
1901,
29889,
5675,
29918,
1079,
4384,
29898,
7543,
29922,
7543,
29897,
13,
4706,
4844,
800,
29889,
4397,
29898,
15550,
3950,
29889,
643,
6646,
29918,
1079,
4384,
29898,
1079,
4384,
876,
13,
13,
1678,
736,
14355,
5103,
29898,
342,
326,
800,
29892,
9109,
29922,
8824,
29892,
2094,
6119,
29922,
29928,
5364,
7249,
8566,
6119,
29897,
13,
13,
13,
29937,
3462,
263,
716,
23473,
5881,
304,
445,
5881,
13,
29992,
14242,
29918,
12403,
13,
1753,
788,
29918,
1271,
292,
29918,
7543,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
12336,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1925,
29918,
2587,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
1678,
565,
451,
1925,
29918,
2587,
29889,
657,
703,
1271,
292,
29918,
7543,
29908,
1125,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
1018,
29901,
13,
4706,
7613,
353,
679,
29918,
1792,
29918,
24691,
29898,
3827,
29889,
1792,
467,
657,
29898,
333,
29922,
3377,
29918,
333,
29897,
13,
4706,
5881,
353,
7613,
29889,
28160,
29889,
657,
29898,
333,
29922,
7543,
29918,
333,
29897,
13,
4706,
23473,
29918,
7543,
353,
7613,
29889,
28160,
29889,
735,
2325,
29898,
333,
29922,
7543,
29918,
333,
467,
657,
29898,
333,
29922,
649,
29918,
2587,
29889,
657,
703,
1271,
292,
29918,
7543,
5783,
13,
1678,
5174,
313,
28397,
29889,
25125,
3664,
1252,
391,
29892,
9160,
29889,
25125,
3664,
1252,
391,
29897,
408,
321,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3664,
1476,
1213,
1800,
13,
13,
1678,
5881,
29889,
1202,
29918,
1271,
292,
29918,
7543,
29898,
14242,
29892,
23473,
29918,
7543,
29897,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29898,
7543,
876,
13,
13,
13,
29937,
15154,
263,
23473,
5881,
304,
445,
5881,
13,
29992,
14242,
29918,
12403,
13,
1753,
3349,
29918,
1271,
292,
29918,
7543,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29892,
23473,
29918,
7543,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
2287,
18476,
1115,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
7613,
353,
679,
29918,
1792,
29918,
24691,
29898,
3827,
29889,
1792,
467,
657,
29898,
333,
29922,
3377,
29918,
333,
29897,
13,
4706,
5881,
353,
7613,
29889,
28160,
29889,
657,
29898,
333,
29922,
7543,
29918,
333,
29897,
13,
4706,
23473,
29918,
7543,
353,
5881,
29889,
1271,
292,
29918,
28160,
29889,
735,
2325,
29898,
333,
29922,
7543,
29918,
333,
467,
657,
29898,
333,
29922,
1271,
292,
29918,
7543,
29918,
333,
29897,
13,
1678,
5174,
313,
28397,
29889,
25125,
3664,
1252,
391,
29892,
9160,
29889,
25125,
3664,
1252,
391,
29897,
408,
321,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3664,
1476,
1213,
1800,
13,
13,
1678,
5881,
29889,
5992,
29918,
1271,
292,
29918,
7543,
29898,
14242,
29892,
23473,
29918,
7543,
29897,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29898,
7543,
876,
13,
13,
13,
29937,
3462,
263,
716,
9076,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
788,
29918,
1482,
29918,
27828,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
12336,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
5881,
353,
679,
29918,
7543,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29897,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
13200,
451,
1476,
1213,
1800,
13,
1678,
7613,
353,
5881,
29889,
3377,
13,
13,
1678,
1925,
29918,
2587,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
1678,
565,
451,
1925,
29918,
2587,
29889,
657,
703,
28109,
29908,
1125,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
9076,
414,
353,
7613,
29889,
28109,
29889,
4572,
29898,
333,
1649,
262,
29922,
649,
29918,
2587,
29889,
657,
703,
28109,
5783,
13,
13,
1678,
6139,
353,
1925,
29918,
2587,
29889,
657,
703,
8216,
613,
20569,
13,
13,
1678,
5881,
29889,
1202,
29918,
27828,
29898,
14242,
29892,
9076,
414,
29922,
27828,
414,
29892,
6139,
29922,
8216,
29897,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29898,
7543,
876,
13,
13,
13,
29937,
21267,
263,
9076,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
5217,
29918,
27828,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29892,
9076,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
2287,
18476,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
7613,
353,
679,
29918,
1792,
29918,
24691,
29898,
3827,
29889,
1792,
467,
657,
29898,
333,
29922,
3377,
29918,
333,
29897,
13,
4706,
5881,
353,
7613,
29889,
28160,
29889,
657,
29898,
333,
29922,
7543,
29918,
333,
29897,
13,
4706,
9076,
353,
5881,
29889,
276,
7406,
29889,
657,
29898,
333,
29922,
27828,
29918,
333,
29897,
13,
1678,
5174,
313,
28397,
29889,
25125,
3664,
1252,
391,
29892,
9160,
29889,
25125,
3664,
1252,
391,
29897,
408,
321,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3664,
1476,
1213,
1800,
13,
13,
1678,
5881,
29889,
8143,
29918,
27828,
29898,
14242,
29892,
9076,
29897,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29898,
7543,
876,
13,
13,
13,
29937,
3462,
263,
11809,
304,
278,
5881,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
788,
29918,
12277,
358,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
12336,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
5881,
353,
679,
29918,
7543,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29897,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
13200,
451,
1476,
1213,
1800,
13,
1678,
7613,
353,
5881,
29889,
3377,
13,
13,
1678,
1925,
29918,
2587,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
1678,
565,
451,
1925,
29918,
2587,
29889,
657,
703,
12277,
358,
29908,
1125,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
11809,
353,
7613,
29889,
12277,
1860,
29889,
657,
29898,
333,
29922,
649,
29918,
2587,
29889,
657,
703,
12277,
358,
5783,
13,
13,
1678,
396,
960,
278,
11809,
338,
2307,
297,
278,
5881,
29892,
591,
508,
29915,
29873,
6773,
13,
1678,
565,
5881,
29889,
12277,
1860,
29889,
4572,
29898,
333,
29922,
12277,
358,
29889,
333,
467,
9933,
7295,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
5881,
29889,
1202,
29918,
12277,
358,
29898,
14242,
29892,
11809,
29897,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29898,
7543,
876,
13,
13,
13,
29937,
15154,
263,
11809,
310,
278,
5881,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
3349,
29918,
12277,
358,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29892,
11809,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
2287,
18476,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
7613,
353,
679,
29918,
1792,
29918,
24691,
29898,
3827,
29889,
1792,
467,
657,
29898,
333,
29922,
3377,
29918,
333,
29897,
13,
4706,
5881,
353,
7613,
29889,
28160,
29889,
657,
29898,
333,
29922,
7543,
29918,
333,
29897,
13,
4706,
11809,
353,
5881,
29889,
12277,
1860,
29889,
657,
29898,
333,
29922,
12277,
358,
29918,
333,
29897,
13,
1678,
5174,
313,
28397,
29889,
25125,
3664,
1252,
391,
29892,
9160,
29889,
25125,
3664,
1252,
391,
29897,
408,
321,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3664,
1476,
1213,
1800,
13,
13,
1678,
5881,
29889,
5992,
29918,
12277,
358,
29898,
14242,
29892,
11809,
29897,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29898,
7543,
876,
13,
13,
13,
29937,
21267,
470,
2767,
263,
3440,
13,
29992,
14242,
29918,
12403,
13,
29992,
20736,
29889,
21641,
13,
1753,
6623,
29918,
9342,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29892,
3440,
29918,
333,
1125,
13,
1678,
565,
2009,
29889,
5696,
2804,
376,
2287,
18476,
29908,
322,
2009,
29889,
5696,
2804,
376,
5438,
1115,
13,
4706,
736,
14355,
5103,
4062,
3664,
15930,
287,
3319,
29908,
4906,
1115,
376,
10493,
1158,
451,
6068,
1213,
1800,
13,
13,
1678,
4509,
353,
2009,
29889,
1792,
29889,
14242,
13,
1678,
1018,
29901,
13,
4706,
5881,
353,
679,
29918,
7543,
29918,
272,
29918,
29946,
29900,
29946,
29898,
3827,
29892,
7613,
29918,
333,
29892,
5881,
29918,
333,
29897,
13,
1678,
5174,
9056,
29946,
29900,
29946,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
13200,
451,
1476,
1213,
1800,
13,
1678,
1018,
29901,
13,
4706,
3440,
353,
5881,
29889,
21032,
29889,
657,
29898,
333,
29922,
9342,
29918,
333,
29897,
13,
1678,
5174,
9160,
20001,
29889,
25125,
3664,
1252,
391,
408,
321,
29901,
13,
4706,
736,
14355,
5103,
17413,
3319,
29908,
4906,
1115,
376,
3664,
1476,
1213,
1800,
13,
13,
1678,
565,
2009,
29889,
5696,
1275,
376,
2287,
18476,
1115,
13,
4706,
3440,
353,
903,
8143,
29918,
9342,
29898,
14242,
29892,
5881,
29892,
3440,
29897,
13,
13,
1678,
25342,
2009,
29889,
5696,
1275,
376,
5438,
1115,
13,
4706,
1400,
29918,
7529,
353,
4390,
29889,
18132,
29898,
3827,
29889,
2587,
29897,
13,
4706,
716,
29918,
9342,
29918,
3051,
353,
1400,
29918,
7529,
29889,
657,
703,
3051,
1159,
13,
4706,
565,
451,
716,
29918,
9342,
29918,
3051,
29901,
13,
9651,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
4706,
3440,
353,
903,
5628,
29918,
9342,
29898,
14242,
29892,
5881,
29892,
3440,
29892,
716,
29918,
9342,
29918,
3051,
29897,
13,
13,
1678,
1683,
29901,
13,
4706,
736,
14355,
5103,
22050,
3089,
3319,
29908,
4906,
1115,
376,
22050,
2009,
29901,
777,
4128,
526,
4567,
1213,
1800,
13,
13,
1678,
7797,
3950,
353,
18896,
3950,
29898,
3377,
29922,
7543,
29889,
3377,
29897,
13,
1678,
736,
14355,
5103,
29898,
15550,
3950,
29889,
643,
6646,
29918,
7543,
29918,
9342,
29898,
9342,
876,
13,
13,
13,
29937,
7641,
3440,
13,
29992,
14242,
29918,
12403,
13,
1753,
903,
5628,
29918,
9342,
29898,
14242,
29892,
5881,
29892,
3440,
29918,
517,
29918,
5628,
29892,
716,
29918,
9342,
29918,
3051,
1125,
13,
1678,
8788,
29918,
9342,
353,
5881,
29889,
5628,
29918,
9342,
29898,
14242,
29892,
3440,
29918,
517,
29918,
5628,
29892,
716,
29918,
9342,
29918,
3051,
29897,
13,
1678,
736,
8788,
29918,
9342,
13,
13,
13,
29937,
21267,
263,
3440,
13,
29992,
14242,
29918,
12403,
13,
1753,
903,
8143,
29918,
9342,
29898,
14242,
29892,
5881,
29892,
3440,
29918,
517,
29918,
8143,
1125,
13,
1678,
396,
21267,
278,
3440,
13,
1678,
5881,
29889,
8143,
29918,
9342,
29898,
14242,
29892,
3440,
29918,
517,
29918,
8143,
29897,
13,
1678,
736,
3440,
29918,
517,
29918,
8143,
13,
13,
2
] |
contests/atcoder/intro-heuristics/intro_heuristics_b/generate.py | conao3/coder | 0 | 193688 | <reponame>conao3/coder<filename>contests/atcoder/intro-heuristics/intro_heuristics_b/generate.py
#!/usr/bin/env python3
# usage: $ oj generate-input 'python3 generate.py'
import random
# generated by online-judge-template-generator v4.1.0 (https://github.com/kmyk/online-judge-template-generator)
def main():
c = [None for _ in range(26)]
D = random.randint(1, 10 ** 9) # TODO: edit here
s = [[None for _ in range(26)] for _ in range(D + 28)]
t = [None for _ in range(D)]
for i in range(26):
c[i] = random.randint(1, 10 ** 9) # TODO: edit here
for j in range(D + 2):
for i in range(26):
s[i + j][i] = random.randint(1, 10 ** 9) # TODO: edit here
for i in range(D):
t[i] = random.randint(1, 10 ** 9) # TODO: edit here
print(D)
print(*[c[i] for i in range(26)])
for j in range(D + 2):
print(*[s[i + j][i] for i in range(26)])
for i in range(D):
print(t[i])
if __name__ == "__main__":
main()
| [
1,
529,
276,
1112,
420,
29958,
535,
6241,
29941,
29914,
29883,
6119,
29966,
9507,
29958,
1285,
9197,
29914,
271,
29883,
6119,
29914,
23333,
29899,
354,
332,
6765,
29914,
23333,
29918,
354,
332,
6765,
29918,
29890,
29914,
17158,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
8744,
29901,
395,
288,
29926,
5706,
29899,
2080,
525,
4691,
29941,
5706,
29889,
2272,
29915,
13,
5215,
4036,
13,
13,
29937,
5759,
491,
7395,
29899,
17675,
479,
29899,
6886,
29899,
27959,
325,
29946,
29889,
29896,
29889,
29900,
313,
991,
597,
3292,
29889,
510,
29914,
29895,
1357,
29895,
29914,
14627,
29899,
17675,
479,
29899,
6886,
29899,
27959,
29897,
13,
1753,
1667,
7295,
13,
1678,
274,
353,
518,
8516,
363,
903,
297,
3464,
29898,
29906,
29953,
4638,
13,
1678,
360,
353,
4036,
29889,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
3579,
29871,
29929,
29897,
29871,
396,
14402,
29901,
3863,
1244,
13,
1678,
269,
353,
5519,
8516,
363,
903,
297,
3464,
29898,
29906,
29953,
4638,
363,
903,
297,
3464,
29898,
29928,
718,
29871,
29906,
29947,
4638,
13,
1678,
260,
353,
518,
8516,
363,
903,
297,
3464,
29898,
29928,
4638,
13,
1678,
363,
474,
297,
3464,
29898,
29906,
29953,
1125,
13,
4706,
274,
29961,
29875,
29962,
353,
4036,
29889,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
3579,
29871,
29929,
29897,
29871,
396,
14402,
29901,
3863,
1244,
13,
1678,
363,
432,
297,
3464,
29898,
29928,
718,
29871,
29906,
1125,
13,
4706,
363,
474,
297,
3464,
29898,
29906,
29953,
1125,
13,
9651,
269,
29961,
29875,
718,
432,
3816,
29875,
29962,
353,
4036,
29889,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
3579,
29871,
29929,
29897,
29871,
396,
14402,
29901,
3863,
1244,
13,
1678,
363,
474,
297,
3464,
29898,
29928,
1125,
13,
4706,
260,
29961,
29875,
29962,
353,
4036,
29889,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
3579,
29871,
29929,
29897,
29871,
396,
14402,
29901,
3863,
1244,
13,
1678,
1596,
29898,
29928,
29897,
13,
1678,
1596,
10456,
29961,
29883,
29961,
29875,
29962,
363,
474,
297,
3464,
29898,
29906,
29953,
29897,
2314,
13,
1678,
363,
432,
297,
3464,
29898,
29928,
718,
29871,
29906,
1125,
13,
4706,
1596,
10456,
29961,
29879,
29961,
29875,
718,
432,
3816,
29875,
29962,
363,
474,
297,
3464,
29898,
29906,
29953,
29897,
2314,
13,
1678,
363,
474,
297,
3464,
29898,
29928,
1125,
13,
4706,
1596,
29898,
29873,
29961,
29875,
2314,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
2
] |
SharedData/list_all_files.py | kylemcdonald/SoundParts | 22 | 33453 | <reponame>kylemcdonald/SoundParts<filename>SharedData/list_all_files.py<gh_stars>10-100
import os
import fnmatch
# extensions can be a single tring like '.png' or '.jpg'
# or a list of extensions. they should all be lowercase
# but the . is important.
def list_all_files(directory, extensions=None):
for root, dirnames, filenames in os.walk(directory):
for filename in filenames:
base, ext = os.path.splitext(filename)
joined = os.path.join(root, filename)
if extensions is None or ( len(ext) and ext.lower() in extensions ):
yield joined | [
1,
529,
276,
1112,
420,
29958,
29895,
1508,
29885,
2252,
265,
2741,
29914,
29456,
29925,
5708,
29966,
9507,
29958,
21741,
1469,
29914,
1761,
29918,
497,
29918,
5325,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
2897,
13,
5215,
7876,
4352,
13,
13,
29937,
17752,
508,
367,
263,
2323,
534,
292,
763,
15300,
2732,
29915,
470,
15300,
6173,
29915,
13,
29937,
470,
263,
1051,
310,
17752,
29889,
896,
881,
599,
367,
5224,
4878,
13,
29937,
541,
278,
869,
338,
4100,
29889,
13,
1753,
1051,
29918,
497,
29918,
5325,
29898,
12322,
29892,
17752,
29922,
8516,
1125,
13,
1678,
363,
3876,
29892,
4516,
7039,
29892,
977,
264,
1280,
297,
2897,
29889,
20919,
29898,
12322,
1125,
13,
4706,
363,
10422,
297,
977,
264,
1280,
29901,
13,
9651,
2967,
29892,
1294,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
9507,
29897,
13,
9651,
8772,
353,
2897,
29889,
2084,
29889,
7122,
29898,
4632,
29892,
10422,
29897,
13,
9651,
565,
17752,
338,
6213,
470,
313,
7431,
29898,
1062,
29897,
322,
1294,
29889,
13609,
580,
297,
17752,
29871,
1125,
13,
18884,
7709,
8772,
2
] |
src/arima_model.py | SaharCarmel/ARIMA | 0 | 16990 | """ The ARIMA model. """
import torch
import numpy as np
class ARIMA(torch.nn.Module):
"""ARIMA [summary]
"""
def __init__(self,
p: int = 0,
d: int = 0,
q: int = 0) -> None:
"""__init__ General ARIMA model constructor.
Args:
p (int): The number of lag observations included in the model,
also called the lag order.
d (int): The number of times that the raw observations are
differenced, also called the degree of differencing.
q (int): The size of the moving average window,
also called the order of moving average.
"""
super(ARIMA, self).__init__()
self.p = p
self.pWeights = torch.rand(p)
self.pWeights.requires_grad = True
self.q = q
self.qWeights = torch.rand(q)
self.qWeights.requires_grad = True
self.d = d
self.dWeights = torch.rand(d)
self.dWeights.requires_grad = True
self.drift = torch.rand(1)
pass
def forward(self, x: torch.Tensor, err: torch.Tensor) -> torch.Tensor:
"""forward the function that defines the ARIMA(0,1,1) model.
It was written specifically for the case of ARIMA(0,1,1).
Args:
x (torch.Tensor): The input data. All the past observations
err (torch.Tensor): The error term. A normal distribution vector.
Returns:
torch.Tensor: The output of the model. The current prediction.
"""
zData = torch.diff(x)
zPred = self.dWeights*zData[-1] + \
self.qWeights*err[-2] + err[-1] + self.drift
aPred = zPred + x[-1]
return aPred
def generateSample(self, length: int) -> torch.Tensor:
"""generateSample An helper function to generate a sample of data.
Args:
length (int): The length of the sample.
Returns:
torch.Tensor: The generated sample.
"""
sample = torch.zeros(length)
noise = torch.tensor(np.random.normal(
loc=0, scale=1, size=length), dtype=torch.float32)
sample[0] = noise[0]
with torch.no_grad():
for i in range(length-2):
sample[i+2] = self.forward(sample[:i+2], noise[:i+2])
pass
return sample
def fit(self,
trainData: torch.Tensor,
epochs: int,
learningRate: float) -> None:
"""fit A function to fit the model. It is a wrapper of the
Args:
trainData (torch.Tensor): The training data.
epochs (int): The number of epochs.
learningRate (float): The learning rate.
"""
dataLength = len(trainData)
errors = torch.tensor(np.random.normal(
loc=0, scale=1, size=dataLength), dtype=torch.float32)
for epoch in range(epochs):
prediction = torch.zeros(dataLength)
for i in range(dataLength-2):
prediction[i +
2] = self.forward(trainData[0:i+2], errors[0:i+2])
pass
loss = torch.mean(torch.pow(trainData - prediction, 2))
print(f'Epoch {epoch} Loss {loss}')
loss.backward()
self.dWeights.data = self.dWeights.data - \
learningRate * self.dWeights.grad.data
self.dWeights.grad.data.zero_()
self.qWeights.data = self.qWeights.data - \
learningRate * self.qWeights.grad.data
self.qWeights.grad.data.zero_()
pass
| [
1,
9995,
450,
9033,
2260,
1904,
29889,
9995,
13,
13,
5215,
4842,
305,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1990,
9033,
2260,
29898,
7345,
305,
29889,
15755,
29889,
7355,
1125,
13,
1678,
9995,
1718,
2260,
518,
7727,
29962,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
282,
29901,
938,
353,
29871,
29900,
29892,
13,
462,
270,
29901,
938,
353,
29871,
29900,
29892,
13,
462,
3855,
29901,
938,
353,
29871,
29900,
29897,
1599,
6213,
29901,
13,
4706,
9995,
1649,
2344,
1649,
4593,
9033,
2260,
1904,
5823,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
282,
313,
524,
1125,
450,
1353,
310,
11755,
13917,
5134,
297,
278,
1904,
29892,
13,
462,
1678,
884,
2000,
278,
11755,
1797,
29889,
13,
9651,
270,
313,
524,
1125,
450,
1353,
310,
3064,
393,
278,
10650,
13917,
526,
13,
462,
1678,
1163,
9223,
29892,
884,
2000,
278,
7426,
310,
1163,
16750,
29889,
13,
9651,
3855,
313,
524,
1125,
450,
2159,
310,
278,
8401,
6588,
3474,
29892,
13,
462,
1678,
884,
2000,
278,
1797,
310,
8401,
6588,
29889,
13,
4706,
9995,
13,
4706,
2428,
29898,
1718,
2260,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
29886,
353,
282,
13,
4706,
1583,
29889,
29886,
4806,
5861,
353,
4842,
305,
29889,
9502,
29898,
29886,
29897,
13,
4706,
1583,
29889,
29886,
4806,
5861,
29889,
276,
339,
2658,
29918,
5105,
353,
5852,
13,
4706,
1583,
29889,
29939,
353,
3855,
13,
4706,
1583,
29889,
29939,
4806,
5861,
353,
4842,
305,
29889,
9502,
29898,
29939,
29897,
13,
4706,
1583,
29889,
29939,
4806,
5861,
29889,
276,
339,
2658,
29918,
5105,
353,
5852,
13,
4706,
1583,
29889,
29881,
353,
270,
13,
4706,
1583,
29889,
29881,
4806,
5861,
353,
4842,
305,
29889,
9502,
29898,
29881,
29897,
13,
4706,
1583,
29889,
29881,
4806,
5861,
29889,
276,
339,
2658,
29918,
5105,
353,
5852,
13,
4706,
1583,
29889,
29881,
7532,
353,
4842,
305,
29889,
9502,
29898,
29896,
29897,
13,
4706,
1209,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29901,
4842,
305,
29889,
29911,
6073,
29892,
4589,
29901,
4842,
305,
29889,
29911,
6073,
29897,
1599,
4842,
305,
29889,
29911,
6073,
29901,
13,
4706,
9995,
11333,
278,
740,
393,
17645,
278,
9033,
2260,
29898,
29900,
29892,
29896,
29892,
29896,
29897,
1904,
29889,
13,
4706,
739,
471,
3971,
10816,
363,
278,
1206,
310,
9033,
2260,
29898,
29900,
29892,
29896,
29892,
29896,
467,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
921,
313,
7345,
305,
29889,
29911,
6073,
1125,
450,
1881,
848,
29889,
2178,
278,
4940,
13917,
13,
9651,
4589,
313,
7345,
305,
29889,
29911,
6073,
1125,
450,
1059,
1840,
29889,
319,
4226,
4978,
4608,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
4842,
305,
29889,
29911,
6073,
29901,
450,
1962,
310,
278,
1904,
29889,
450,
1857,
18988,
29889,
13,
4706,
9995,
13,
4706,
503,
1469,
353,
4842,
305,
29889,
12765,
29898,
29916,
29897,
13,
4706,
503,
23084,
353,
1583,
29889,
29881,
4806,
5861,
29930,
29920,
1469,
14352,
29896,
29962,
718,
320,
13,
9651,
1583,
29889,
29939,
4806,
5861,
29930,
3127,
14352,
29906,
29962,
718,
4589,
14352,
29896,
29962,
718,
1583,
29889,
29881,
7532,
13,
4706,
263,
23084,
353,
503,
23084,
718,
921,
14352,
29896,
29962,
13,
4706,
736,
263,
23084,
13,
13,
1678,
822,
5706,
17708,
29898,
1311,
29892,
3309,
29901,
938,
29897,
1599,
4842,
305,
29889,
29911,
6073,
29901,
13,
4706,
9995,
17158,
17708,
530,
16876,
740,
304,
5706,
263,
4559,
310,
848,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
3309,
313,
524,
1125,
450,
3309,
310,
278,
4559,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
4842,
305,
29889,
29911,
6073,
29901,
450,
5759,
4559,
29889,
13,
4706,
9995,
13,
4706,
4559,
353,
4842,
305,
29889,
3298,
359,
29898,
2848,
29897,
13,
4706,
11462,
353,
4842,
305,
29889,
20158,
29898,
9302,
29889,
8172,
29889,
8945,
29898,
13,
9651,
1180,
29922,
29900,
29892,
6287,
29922,
29896,
29892,
2159,
29922,
2848,
511,
26688,
29922,
7345,
305,
29889,
7411,
29941,
29906,
29897,
13,
4706,
4559,
29961,
29900,
29962,
353,
11462,
29961,
29900,
29962,
13,
4706,
411,
4842,
305,
29889,
1217,
29918,
5105,
7295,
13,
9651,
363,
474,
297,
3464,
29898,
2848,
29899,
29906,
1125,
13,
18884,
4559,
29961,
29875,
29974,
29906,
29962,
353,
1583,
29889,
11333,
29898,
11249,
7503,
29875,
29974,
29906,
1402,
11462,
7503,
29875,
29974,
29906,
2314,
13,
18884,
1209,
13,
4706,
736,
4559,
13,
13,
1678,
822,
6216,
29898,
1311,
29892,
13,
9651,
7945,
1469,
29901,
4842,
305,
29889,
29911,
6073,
29892,
13,
9651,
21502,
12168,
29901,
938,
29892,
13,
9651,
6509,
19907,
29901,
5785,
29897,
1599,
6213,
29901,
13,
4706,
9995,
9202,
319,
740,
304,
6216,
278,
1904,
29889,
739,
338,
263,
14476,
310,
278,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
7945,
1469,
313,
7345,
305,
29889,
29911,
6073,
1125,
450,
6694,
848,
29889,
13,
9651,
21502,
12168,
313,
524,
1125,
450,
1353,
310,
21502,
12168,
29889,
13,
9651,
6509,
19907,
313,
7411,
1125,
450,
6509,
6554,
29889,
13,
4706,
9995,
13,
4706,
848,
6513,
353,
7431,
29898,
14968,
1469,
29897,
13,
4706,
4436,
353,
4842,
305,
29889,
20158,
29898,
9302,
29889,
8172,
29889,
8945,
29898,
13,
9651,
1180,
29922,
29900,
29892,
6287,
29922,
29896,
29892,
2159,
29922,
1272,
6513,
511,
26688,
29922,
7345,
305,
29889,
7411,
29941,
29906,
29897,
13,
4706,
363,
21502,
305,
297,
3464,
29898,
1022,
2878,
29879,
1125,
13,
9651,
18988,
353,
4842,
305,
29889,
3298,
359,
29898,
1272,
6513,
29897,
13,
9651,
363,
474,
297,
3464,
29898,
1272,
6513,
29899,
29906,
1125,
13,
18884,
18988,
29961,
29875,
718,
13,
462,
9651,
29906,
29962,
353,
1583,
29889,
11333,
29898,
14968,
1469,
29961,
29900,
29901,
29875,
29974,
29906,
1402,
4436,
29961,
29900,
29901,
29875,
29974,
29906,
2314,
13,
18884,
1209,
13,
9651,
6410,
353,
4842,
305,
29889,
12676,
29898,
7345,
305,
29889,
12248,
29898,
14968,
1469,
448,
18988,
29892,
29871,
29906,
876,
13,
9651,
1596,
29898,
29888,
29915,
29923,
1129,
305,
426,
1022,
2878,
29913,
365,
2209,
426,
6758,
29913,
1495,
13,
9651,
6410,
29889,
1627,
1328,
580,
13,
13,
9651,
1583,
29889,
29881,
4806,
5861,
29889,
1272,
353,
1583,
29889,
29881,
4806,
5861,
29889,
1272,
448,
320,
13,
18884,
6509,
19907,
334,
1583,
29889,
29881,
4806,
5861,
29889,
5105,
29889,
1272,
13,
9651,
1583,
29889,
29881,
4806,
5861,
29889,
5105,
29889,
1272,
29889,
9171,
29918,
580,
13,
13,
9651,
1583,
29889,
29939,
4806,
5861,
29889,
1272,
353,
1583,
29889,
29939,
4806,
5861,
29889,
1272,
448,
320,
13,
18884,
6509,
19907,
334,
1583,
29889,
29939,
4806,
5861,
29889,
5105,
29889,
1272,
13,
9651,
1583,
29889,
29939,
4806,
5861,
29889,
5105,
29889,
1272,
29889,
9171,
29918,
580,
13,
1678,
1209,
13,
2
] |
model-optimizer/mo/front/caffe/extractors/batchnorm.py | tdp2110/dldt | 0 | 139454 | <gh_stars>0
"""
Copyright (c) 2018-2019 Intel Corporation
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 numpy as np
from mo.front.caffe.extractors.utils import embed_input
from mo.front.common.partial_infer.elemental import copy_shape_infer
def batch_norm_ext(pb_layer, pb_model):
"""
Extracts properties of the BatchNorm layer.
In case of scale, scale is merged into mean and variance
Args:
pb_layer: proto layer, contains own properties of the layer, i.e epsilon
pb_model: caffemodel layer, contains blobs with 0: mean, 1: variance, (opt)2: scale
Returns:
attrs object with type, partial inference function and mean/variance properties.
"""
assert pb_layer, 'Protobuf layer can not be empty'
param = pb_layer.batch_norm_param
attrs = {
'op': 'BatchNormalization',
'type': 'BatchNormalization',
'eps': param.eps,
'infer': copy_shape_infer
}
if not pb_model:
return attrs
blobs = pb_model.blobs
assert len(blobs) >= 2, 'BatchNorm accepts not less then two input blobs'
mean = np.array(blobs[0].data)
variance = np.array(blobs[1].data)
if len(blobs) == 3:
scale = blobs[2].data[0]
if scale != 0:
scale = 1.0 / scale
mean *= scale
variance *= scale
embed_input(attrs, 1, 'gamma', np.ones(mean.shape), 'gamma')
embed_input(attrs, 2, 'beta', np.zeros(variance.shape), 'beta')
embed_input(attrs, 3, 'mean', mean, 'biases')
embed_input(attrs, 4, 'variance', variance, 'weights')
return attrs
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
13,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29947,
29899,
29906,
29900,
29896,
29929,
18555,
15025,
13,
13,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
13,
418,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
13,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
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,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
27028,
1090,
278,
19245,
29889,
13,
15945,
29908,
13,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
2730,
29889,
8862,
29889,
1113,
17615,
29889,
21111,
943,
29889,
13239,
1053,
8297,
29918,
2080,
13,
3166,
2730,
29889,
8862,
29889,
9435,
29889,
3846,
29918,
262,
571,
29889,
5029,
284,
1053,
3509,
29918,
12181,
29918,
262,
571,
13,
13,
13,
1753,
9853,
29918,
12324,
29918,
1062,
29898,
24381,
29918,
13148,
29892,
282,
29890,
29918,
4299,
1125,
13,
1678,
9995,
13,
1678,
7338,
1461,
29879,
4426,
310,
278,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
512,
1206,
310,
6287,
29892,
6287,
338,
19412,
964,
2099,
322,
20162,
13,
1678,
826,
3174,
29901,
13,
4706,
282,
29890,
29918,
13148,
29901,
17814,
7546,
29892,
3743,
1914,
4426,
310,
278,
7546,
29892,
474,
29889,
29872,
321,
3232,
13,
4706,
282,
29890,
29918,
4299,
29901,
274,
3470,
331,
27224,
7546,
29892,
3743,
23755,
29879,
411,
29871,
29900,
29901,
2099,
29892,
29871,
29896,
29901,
20162,
29892,
313,
3670,
29897,
29906,
29901,
6287,
13,
13,
1678,
16969,
29901,
13,
4706,
12421,
29879,
1203,
411,
1134,
29892,
7687,
27262,
740,
322,
2099,
29914,
1707,
8837,
4426,
29889,
13,
1678,
9995,
13,
1678,
4974,
282,
29890,
29918,
13148,
29892,
525,
1184,
517,
9721,
7546,
508,
451,
367,
4069,
29915,
13,
1678,
1828,
353,
282,
29890,
29918,
13148,
29889,
16175,
29918,
12324,
29918,
3207,
13,
1678,
12421,
29879,
353,
426,
13,
4706,
525,
459,
2396,
525,
23145,
19077,
2133,
742,
13,
4706,
525,
1853,
2396,
525,
23145,
19077,
2133,
742,
13,
4706,
525,
8961,
2396,
1828,
29889,
8961,
29892,
13,
4706,
525,
262,
571,
2396,
3509,
29918,
12181,
29918,
262,
571,
13,
1678,
500,
13,
13,
1678,
565,
451,
282,
29890,
29918,
4299,
29901,
13,
4706,
736,
12421,
29879,
13,
13,
1678,
23755,
29879,
353,
282,
29890,
29918,
4299,
29889,
10054,
29879,
13,
1678,
4974,
7431,
29898,
10054,
29879,
29897,
6736,
29871,
29906,
29892,
525,
23145,
29940,
555,
21486,
451,
3109,
769,
1023,
1881,
23755,
29879,
29915,
13,
1678,
2099,
353,
7442,
29889,
2378,
29898,
10054,
29879,
29961,
29900,
1822,
1272,
29897,
13,
1678,
20162,
353,
7442,
29889,
2378,
29898,
10054,
29879,
29961,
29896,
1822,
1272,
29897,
13,
13,
1678,
565,
7431,
29898,
10054,
29879,
29897,
1275,
29871,
29941,
29901,
13,
4706,
6287,
353,
23755,
29879,
29961,
29906,
1822,
1272,
29961,
29900,
29962,
13,
4706,
565,
6287,
2804,
29871,
29900,
29901,
13,
9651,
6287,
353,
29871,
29896,
29889,
29900,
847,
6287,
13,
4706,
2099,
334,
29922,
6287,
13,
4706,
20162,
334,
29922,
6287,
13,
13,
1678,
8297,
29918,
2080,
29898,
5552,
29879,
29892,
29871,
29896,
29892,
525,
4283,
742,
7442,
29889,
2873,
29898,
12676,
29889,
12181,
511,
525,
4283,
1495,
13,
1678,
8297,
29918,
2080,
29898,
5552,
29879,
29892,
29871,
29906,
29892,
525,
3571,
742,
7442,
29889,
3298,
359,
29898,
1707,
8837,
29889,
12181,
511,
525,
3571,
1495,
13,
1678,
8297,
29918,
2080,
29898,
5552,
29879,
29892,
29871,
29941,
29892,
525,
12676,
742,
2099,
29892,
525,
5365,
2129,
1495,
13,
1678,
8297,
29918,
2080,
29898,
5552,
29879,
29892,
29871,
29946,
29892,
525,
1707,
8837,
742,
20162,
29892,
525,
705,
5861,
1495,
13,
13,
1678,
736,
12421,
29879,
13,
2
] |
flare_removal/python/models.py | shaun95/google-research | 1 | 158586 | # coding=utf-8
# Copyright 2022 The Google Research 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.
"""Models for flare removal."""
from flare_removal.python import u_net
from flare_removal.python import vgg
def build_model(model_type, batch_size):
"""Returns a Keras model specified by name."""
if model_type == 'unet':
return u_net.get_model(
input_shape=(512, 512, 3),
scales=4,
bottleneck_depth=1024,
bottleneck_layers=2)
elif model_type == 'can':
return vgg.build_can(
input_shape=(512, 512, 3), conv_channels=64, out_channels=3)
else:
raise ValueError(model_type)
| [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29906,
450,
5087,
10550,
13189,
943,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
268,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
13,
15945,
29908,
23785,
363,
285,
8663,
28744,
1213,
15945,
13,
13,
3166,
285,
8663,
29918,
1745,
10611,
29889,
4691,
1053,
318,
29918,
1212,
13,
3166,
285,
8663,
29918,
1745,
10611,
29889,
4691,
1053,
325,
1505,
13,
13,
13,
1753,
2048,
29918,
4299,
29898,
4299,
29918,
1853,
29892,
9853,
29918,
2311,
1125,
13,
29871,
9995,
11609,
29879,
263,
12693,
294,
1904,
6790,
491,
1024,
1213,
15945,
13,
29871,
565,
1904,
29918,
1853,
1275,
525,
348,
300,
2396,
13,
1678,
736,
318,
29918,
1212,
29889,
657,
29918,
4299,
29898,
13,
4706,
1881,
29918,
12181,
7607,
29945,
29896,
29906,
29892,
29871,
29945,
29896,
29906,
29892,
29871,
29941,
511,
13,
4706,
23431,
29922,
29946,
29892,
13,
4706,
18046,
29880,
1600,
384,
29918,
19488,
29922,
29896,
29900,
29906,
29946,
29892,
13,
4706,
18046,
29880,
1600,
384,
29918,
29277,
29922,
29906,
29897,
13,
29871,
25342,
1904,
29918,
1853,
1275,
525,
3068,
2396,
13,
1678,
736,
325,
1505,
29889,
4282,
29918,
3068,
29898,
13,
4706,
1881,
29918,
12181,
7607,
29945,
29896,
29906,
29892,
29871,
29945,
29896,
29906,
29892,
29871,
29941,
511,
7602,
29918,
305,
12629,
29922,
29953,
29946,
29892,
714,
29918,
305,
12629,
29922,
29941,
29897,
13,
29871,
1683,
29901,
13,
1678,
12020,
7865,
2392,
29898,
4299,
29918,
1853,
29897,
13,
2
] |
tests/components/image_processing/common.py | pcaston/core | 1 | 186189 | <gh_stars>1-10
"""Collection of helper methods.
All containing methods are legacy helpers that should not be used by new
components. Instead call the service directly.
"""
from openpeerpower.components.image_processing import DOMAIN, SERVICE_SCAN
from openpeerpower.const import ATTR_ENTITY_ID, ENTITY_MATCH_ALL
from openpeerpower.core import callback
from openpeerpower.loader import bind_opp
@bind_opp
def scan(opp, entity_id=ENTITY_MATCH_ALL):
"""Force process of all cameras or given entity."""
opp.add_job(async_scan, opp, entity_id)
@callback
@bind_opp
def async_scan(opp, entity_id=ENTITY_MATCH_ALL):
"""Force process of all cameras or given entity."""
data = {ATTR_ENTITY_ID: entity_id} if entity_id else None
opp.async_add_job(opp.services.async_call(DOMAIN, SERVICE_SCAN, data))
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
7196,
310,
16876,
3519,
29889,
13,
13,
3596,
6943,
3519,
526,
25000,
1371,
414,
393,
881,
451,
367,
1304,
491,
716,
13,
14036,
29889,
8669,
1246,
278,
2669,
4153,
29889,
13,
15945,
29908,
13,
3166,
1722,
412,
261,
13519,
29889,
14036,
29889,
3027,
29918,
19170,
1053,
11662,
29032,
29892,
26996,
19059,
29918,
7187,
2190,
13,
3166,
1722,
412,
261,
13519,
29889,
3075,
1053,
15531,
5659,
29918,
3919,
11937,
29918,
1367,
29892,
12524,
29911,
11937,
29918,
29924,
14789,
29918,
9818,
13,
3166,
1722,
412,
261,
13519,
29889,
3221,
1053,
6939,
13,
3166,
1722,
412,
261,
13519,
29889,
12657,
1053,
7868,
29918,
9354,
13,
13,
13,
29992,
5355,
29918,
9354,
13,
1753,
12812,
29898,
9354,
29892,
7855,
29918,
333,
29922,
3919,
11937,
29918,
29924,
14789,
29918,
9818,
1125,
13,
1678,
9995,
2831,
346,
1889,
310,
599,
3949,
18464,
470,
2183,
7855,
1213,
15945,
13,
1678,
4575,
29889,
1202,
29918,
9057,
29898,
12674,
29918,
16192,
29892,
4575,
29892,
7855,
29918,
333,
29897,
13,
13,
13,
29992,
14035,
13,
29992,
5355,
29918,
9354,
13,
1753,
7465,
29918,
16192,
29898,
9354,
29892,
7855,
29918,
333,
29922,
3919,
11937,
29918,
29924,
14789,
29918,
9818,
1125,
13,
1678,
9995,
2831,
346,
1889,
310,
599,
3949,
18464,
470,
2183,
7855,
1213,
15945,
13,
1678,
848,
353,
426,
1299,
5659,
29918,
3919,
11937,
29918,
1367,
29901,
7855,
29918,
333,
29913,
565,
7855,
29918,
333,
1683,
6213,
13,
1678,
4575,
29889,
12674,
29918,
1202,
29918,
9057,
29898,
9354,
29889,
9916,
29889,
12674,
29918,
4804,
29898,
3970,
29032,
29892,
26996,
19059,
29918,
7187,
2190,
29892,
848,
876,
13,
2
] |
plugins/classbrowser/parser_diff.py | thioshp/MyGeditV2Full | 4 | 1607572 | <gh_stars>1-10
# -*- coding: utf-8 -*-
# Copyright (C) 2007 <NAME> (<EMAIL>)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307, USA.
import gtk
import gobject
import pango
import os
import options
import imagelibrary
from parserinterface import ClassParserInterface
class Token:
def __init__(self):
self.start = 0
self.end = 0
self.name = None
self.parent = None
self.children = []
self.type = 'changeset'
class DiffParser(ClassParserInterface):
def parse(self, geditdoc):
text = geditdoc.get_text(*geditdoc.get_bounds())
linecount = -1
current_file = None
changeset = None
files = []
uri = geditdoc.get_uri()
for line in text.splitlines():
linecount += 1
lstrip = line.lstrip()
ln = lstrip.split()
if len(ln) == 0: continue
if ln[0] == '---':
if current_file is not None:
current_file.end = linecount - 1
current_file = Token()
current_file.name = ln[1]
current_file.start = linecount
current_file.type = 'file'
current_file.uri = uri
files.append(current_file)
elif current_file == None: continue
elif ln[0] == '@@' and ln[-1] == '@@':
if changeset is not None:
changeset.end = linecount
changeset = Token()
changeset.name = ' '.join(ln[1:-1])
changeset.start = linecount
changeset.uri = uri
current_file.children.append(changeset)
changeset.parent = current_file
# Ending line of last tokens
if len(files) > 0:
f = files[-1]
f.end = linecount + 2
if len(f.children) > 0:
f.children[-1].end = linecount + 2
model = gtk.TreeStore(gobject.TYPE_PYOBJECT)
pp = None
# "Fake" common top folder, if any
# TODO: Create hierarchy if patch applies in multiple directories
if len(files) > 0:
paths = map(lambda f:f.name, files)
prefix = os.path.dirname(os.path.commonprefix(paths)) + '/'
if len(prefix) > 1:
parent_path = Token()
parent_path.type = 'path'
parent_path.name = prefix
for f in files: f.name = f.name.replace(prefix,'',1)
pp = model.append(None,(parent_path,))
# Build tree
for f in files:
tree_iter = model.append(pp,(f,))
for c in f.children:
model.append(tree_iter,(c,))
return model
def cellrenderer(self, treeviewcolumn, cellrenderertext, treemodel, it):
token = treemodel.get_value(it,0)
colour = options.singleton().colours["member"]
if token.type == 'path':
colour = options.singleton().colours["namespace"]
elif token.type == 'file':
colour = options.singleton().colours["class"]
cellrenderertext.set_property("text", token.name)
cellrenderertext.set_property("style", pango.STYLE_NORMAL)
cellrenderertext.set_property("foreground-gdk", colour)
def get_tag_position(self, model, path):
tok = model.get_value(model.get_iter(path),0)
try: return tok.uri, tok.start + 1
except: return None
def get_tag_at_line(self, model, doc, linenumber):
def find_path(model, path, iter, data):
line = data[0]
token = model.get_value(iter, 0)
if token.start <= line and token.end > line:
# print path
data[1].append(path)
#return True
return False
path_found = []
model.foreach(find_path, (linenumber, path_found))
if len(path_found) > 0:
return path_found[-1]
return None
def pixbufrenderer(self, treeviewcolumn, cellrendererpixbuf, treemodel, it):
token = treemodel.get_value(it,0)
if token.type == 'path':
cellrendererpixbuf.set_property("stock-id", gtk.STOCK_DIRECTORY)
elif token.type == 'file':
cellrendererpixbuf.set_property("stock-id", gtk.STOCK_FILE)
else:
cellrendererpixbuf.set_property("pixbuf",imagelibrary.pixbufs['patch'])
# -*- coding: utf-8 -*-
# Copyright (C) 2007 <NAME> (<EMAIL>)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307, USA.
import gtk
import gobject
import pango
import os
import options
import imagelibrary
from parserinterface import ClassParserInterface
class Token:
def __init__(self):
self.start = 0
self.end = 0
self.name = None
self.parent = None
self.children = []
self.type = 'changeset'
class DiffParser(ClassParserInterface):
def parse(self, geditdoc):
text = geditdoc.get_text(*geditdoc.get_bounds())
linecount = -1
current_file = None
changeset = None
files = []
uri = geditdoc.get_uri()
for line in text.splitlines():
linecount += 1
lstrip = line.lstrip()
ln = lstrip.split()
if len(ln) == 0: continue
if ln[0] == '---':
if current_file is not None:
current_file.end = linecount - 1
current_file = Token()
current_file.name = ln[1]
current_file.start = linecount
current_file.type = 'file'
current_file.uri = uri
files.append(current_file)
elif current_file == None: continue
elif ln[0] == '@@' and ln[-1] == '@@':
if changeset is not None:
changeset.end = linecount
changeset = Token()
changeset.name = ' '.join(ln[1:-1])
changeset.start = linecount
changeset.uri = uri
current_file.children.append(changeset)
changeset.parent = current_file
# Ending line of last tokens
if len(files) > 0:
f = files[-1]
f.end = linecount + 2
if len(f.children) > 0:
f.children[-1].end = linecount + 2
model = gtk.TreeStore(gobject.TYPE_PYOBJECT)
pp = None
# "Fake" common top folder, if any
# TODO: Create hierarchy if patch applies in multiple directories
if len(files) > 0:
paths = map(lambda f:f.name, files)
prefix = os.path.dirname(os.path.commonprefix(paths)) + '/'
if len(prefix) > 1:
parent_path = Token()
parent_path.type = 'path'
parent_path.name = prefix
for f in files: f.name = f.name.replace(prefix,'',1)
pp = model.append(None,(parent_path,))
# Build tree
for f in files:
tree_iter = model.append(pp,(f,))
for c in f.children:
model.append(tree_iter,(c,))
return model
def cellrenderer(self, treeviewcolumn, cellrenderertext, treemodel, it):
token = treemodel.get_value(it,0)
colour = options.singleton().colours["member"]
if token.type == 'path':
colour = options.singleton().colours["namespace"]
elif token.type == 'file':
colour = options.singleton().colours["class"]
cellrenderertext.set_property("text", token.name)
cellrenderertext.set_property("style", pango.STYLE_NORMAL)
cellrenderertext.set_property("foreground-gdk", colour)
def get_tag_position(self, model, path):
tok = model.get_value(model.get_iter(path),0)
try: return tok.uri, tok.start + 1
except: return None
def get_tag_at_line(self, model, doc, linenumber):
def find_path(model, path, iter, data):
line = data[0]
token = model.get_value(iter, 0)
if token.start <= line and token.end > line:
# print path
data[1].append(path)
#return True
return False
path_found = []
model.foreach(find_path, (linenumber, path_found))
if len(path_found) > 0:
return path_found[-1]
return None
def pixbufrenderer(self, treeviewcolumn, cellrendererpixbuf, treemodel, it):
token = treemodel.get_value(it,0)
if token.type == 'path':
cellrendererpixbuf.set_property("stock-id", gtk.STOCK_DIRECTORY)
elif token.type == 'file':
cellrendererpixbuf.set_property("stock-id", gtk.STOCK_FILE)
else:
cellrendererpixbuf.set_property("pixbuf",imagelibrary.pixbufs['patch'])
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29900,
29955,
529,
5813,
29958,
313,
29966,
26862,
6227,
12948,
13,
29937,
13,
29937,
910,
1824,
338,
3889,
7047,
29936,
366,
508,
2654,
391,
2666,
372,
322,
29914,
272,
6623,
13,
29937,
372,
1090,
278,
4958,
310,
278,
15143,
4593,
5236,
19245,
408,
6369,
491,
13,
29937,
278,
12362,
18540,
10606,
29936,
2845,
1873,
29871,
29906,
310,
278,
19245,
29892,
470,
13,
29937,
313,
271,
596,
2984,
29897,
738,
2678,
1873,
29889,
13,
29937,
13,
29937,
910,
1824,
338,
13235,
297,
278,
4966,
393,
372,
674,
367,
5407,
29892,
13,
29937,
541,
399,
1806,
8187,
2692,
13764,
29979,
399,
1718,
29934,
13566,
29979,
29936,
1728,
1584,
278,
2411,
2957,
1370,
21867,
29891,
310,
13,
29937,
341,
1001,
3210,
13566,
2882,
6227,
11937,
470,
383,
1806,
8186,
1799,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
29889,
29871,
2823,
278,
13,
29937,
15143,
4593,
5236,
19245,
363,
901,
4902,
29889,
13,
29937,
13,
29937,
887,
881,
505,
4520,
263,
3509,
310,
278,
15143,
4593,
5236,
19245,
13,
29937,
3412,
411,
445,
1824,
29936,
565,
451,
29892,
2436,
304,
278,
12362,
18540,
13,
29937,
10606,
29892,
9266,
1696,
29871,
29945,
29929,
18057,
15484,
29892,
2166,
568,
29871,
29941,
29941,
29900,
29892,
13,
29937,
12115,
29892,
14861,
29871,
29900,
29906,
29896,
29896,
29896,
29899,
29896,
29941,
29900,
29955,
29892,
8278,
29889,
13,
13,
5215,
330,
11178,
13,
5215,
330,
3318,
13,
5215,
282,
4524,
13,
5215,
2897,
13,
5215,
3987,
13,
5215,
6382,
295,
6357,
13,
3166,
13812,
13248,
1053,
4134,
11726,
10448,
13,
13,
1990,
25159,
29901,
13,
29871,
822,
4770,
2344,
12035,
1311,
1125,
13,
1678,
1583,
29889,
2962,
353,
29871,
29900,
13,
1678,
1583,
29889,
355,
353,
29871,
29900,
13,
1678,
1583,
29889,
978,
353,
6213,
13,
1678,
1583,
29889,
3560,
353,
6213,
13,
1678,
1583,
29889,
11991,
353,
5159,
13,
1678,
1583,
29889,
1853,
353,
525,
25990,
300,
29915,
13,
13,
1990,
360,
2593,
11726,
29898,
2385,
11726,
10448,
1125,
13,
13,
29871,
822,
6088,
29898,
1311,
29892,
330,
5628,
1514,
1125,
13,
1678,
1426,
353,
330,
5628,
1514,
29889,
657,
29918,
726,
10456,
3192,
277,
1514,
29889,
657,
29918,
23687,
3101,
13,
1678,
1196,
2798,
353,
448,
29896,
13,
1678,
1857,
29918,
1445,
353,
6213,
13,
1678,
3620,
300,
353,
6213,
13,
1678,
2066,
353,
5159,
13,
1678,
21333,
353,
330,
5628,
1514,
29889,
657,
29918,
5338,
580,
13,
13,
1678,
363,
1196,
297,
1426,
29889,
5451,
9012,
7295,
13,
418,
1196,
2798,
4619,
29871,
29896,
13,
418,
301,
17010,
353,
1196,
29889,
29880,
17010,
580,
13,
418,
301,
29876,
353,
301,
17010,
29889,
5451,
580,
13,
418,
565,
7431,
29898,
3083,
29897,
1275,
29871,
29900,
29901,
6773,
13,
13,
418,
565,
301,
29876,
29961,
29900,
29962,
1275,
525,
5634,
2396,
13,
4706,
565,
1857,
29918,
1445,
338,
451,
6213,
29901,
13,
3986,
1857,
29918,
1445,
29889,
355,
353,
1196,
2798,
448,
29871,
29896,
13,
4706,
1857,
29918,
1445,
353,
25159,
580,
13,
4706,
1857,
29918,
1445,
29889,
978,
353,
301,
29876,
29961,
29896,
29962,
13,
4706,
1857,
29918,
1445,
29889,
2962,
353,
1196,
2798,
13,
4706,
1857,
29918,
1445,
29889,
1853,
353,
525,
1445,
29915,
13,
4706,
1857,
29918,
1445,
29889,
5338,
353,
21333,
13,
4706,
2066,
29889,
4397,
29898,
3784,
29918,
1445,
29897,
13,
13,
418,
25342,
1857,
29918,
1445,
1275,
6213,
29901,
6773,
13,
13,
418,
25342,
301,
29876,
29961,
29900,
29962,
1275,
18803,
29992,
29915,
322,
301,
29876,
14352,
29896,
29962,
1275,
18803,
29992,
2396,
13,
4706,
565,
3620,
300,
338,
451,
6213,
29901,
13,
3986,
3620,
300,
29889,
355,
353,
1196,
2798,
13,
4706,
3620,
300,
353,
25159,
580,
13,
4706,
3620,
300,
29889,
978,
353,
525,
15300,
7122,
29898,
3083,
29961,
29896,
13018,
29896,
2314,
13,
4706,
3620,
300,
29889,
2962,
353,
1196,
2798,
13,
4706,
3620,
300,
29889,
5338,
353,
21333,
13,
4706,
1857,
29918,
1445,
29889,
11991,
29889,
4397,
29898,
25990,
300,
29897,
13,
4706,
3620,
300,
29889,
3560,
353,
1857,
29918,
1445,
13,
13,
418,
396,
2796,
292,
1196,
310,
1833,
18897,
13,
418,
565,
7431,
29898,
5325,
29897,
1405,
29871,
29900,
29901,
13,
4706,
285,
353,
29871,
2066,
14352,
29896,
29962,
13,
4706,
285,
29889,
355,
353,
1196,
2798,
718,
29871,
29906,
13,
4706,
565,
7431,
29898,
29888,
29889,
11991,
29897,
1405,
29871,
29900,
29901,
13,
3986,
285,
29889,
11991,
14352,
29896,
1822,
355,
353,
1196,
2798,
718,
29871,
29906,
13,
13,
1678,
1904,
353,
330,
11178,
29889,
9643,
9044,
29898,
29887,
3318,
29889,
11116,
29918,
20055,
14824,
17637,
29897,
13,
13,
1678,
6499,
353,
6213,
13,
13,
1678,
396,
376,
29943,
1296,
29908,
3619,
2246,
4138,
29892,
565,
738,
13,
1678,
396,
14402,
29901,
6204,
21277,
565,
13261,
16058,
297,
2999,
17525,
13,
1678,
565,
7431,
29898,
5325,
29897,
1405,
29871,
29900,
29901,
13,
418,
10898,
353,
2910,
29898,
2892,
285,
29901,
29888,
29889,
978,
29892,
2066,
29897,
13,
418,
10944,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
9435,
13506,
29898,
24772,
876,
718,
8207,
29915,
13,
418,
565,
7431,
29898,
13506,
29897,
1405,
29871,
29896,
29901,
13,
4706,
3847,
29918,
2084,
353,
25159,
580,
13,
4706,
3847,
29918,
2084,
29889,
1853,
353,
525,
2084,
29915,
13,
4706,
3847,
29918,
2084,
29889,
978,
353,
10944,
13,
4706,
363,
285,
297,
2066,
29901,
285,
29889,
978,
353,
285,
29889,
978,
29889,
6506,
29898,
13506,
5501,
742,
29896,
29897,
13,
4706,
6499,
353,
1904,
29889,
4397,
29898,
8516,
22657,
3560,
29918,
2084,
29892,
876,
13,
13,
1678,
396,
8878,
5447,
13,
1678,
363,
285,
297,
2066,
29901,
13,
418,
5447,
29918,
1524,
353,
1904,
29889,
4397,
29898,
407,
22657,
29888,
29892,
876,
13,
418,
363,
274,
297,
285,
29889,
11991,
29901,
13,
308,
1904,
29889,
4397,
29898,
8336,
29918,
1524,
22657,
29883,
29892,
876,
13,
13,
1678,
736,
1904,
13,
13,
29871,
822,
3038,
9482,
261,
29898,
1311,
29892,
5447,
1493,
4914,
29892,
3038,
9482,
261,
726,
29892,
2578,
331,
27224,
29892,
372,
1125,
13,
1678,
5993,
353,
2578,
331,
27224,
29889,
657,
29918,
1767,
29898,
277,
29892,
29900,
29897,
13,
13,
1678,
12384,
353,
3987,
29889,
2976,
11285,
2141,
1054,
2470,
3366,
14242,
3108,
13,
13,
1678,
565,
5993,
29889,
1853,
1275,
525,
2084,
2396,
13,
418,
12384,
353,
3987,
29889,
2976,
11285,
2141,
1054,
2470,
3366,
22377,
3108,
13,
1678,
25342,
5993,
29889,
1853,
1275,
525,
1445,
2396,
13,
418,
12384,
353,
3987,
29889,
2976,
11285,
2141,
1054,
2470,
3366,
1990,
3108,
13,
13,
1678,
3038,
9482,
261,
726,
29889,
842,
29918,
6799,
703,
726,
613,
5993,
29889,
978,
29897,
13,
1678,
3038,
9482,
261,
726,
29889,
842,
29918,
6799,
703,
3293,
613,
282,
4524,
29889,
1254,
29979,
1307,
29918,
29940,
1955,
1529,
29931,
29897,
13,
1678,
3038,
9482,
261,
726,
29889,
842,
29918,
6799,
703,
1454,
18128,
29899,
29887,
8181,
613,
12384,
29897,
13,
13,
29871,
822,
679,
29918,
4039,
29918,
3283,
29898,
1311,
29892,
1904,
29892,
2224,
1125,
13,
1678,
304,
29895,
353,
1904,
29889,
657,
29918,
1767,
29898,
4299,
29889,
657,
29918,
1524,
29898,
2084,
511,
29900,
29897,
13,
1678,
1018,
29901,
736,
304,
29895,
29889,
5338,
29892,
304,
29895,
29889,
2962,
718,
29871,
29896,
13,
1678,
5174,
29901,
736,
6213,
13,
13,
29871,
822,
679,
29918,
4039,
29918,
271,
29918,
1220,
29898,
1311,
29892,
1904,
29892,
1574,
29892,
6276,
264,
2807,
1125,
13,
13,
1678,
822,
1284,
29918,
2084,
29898,
4299,
29892,
2224,
29892,
4256,
29892,
848,
1125,
13,
418,
1196,
353,
848,
29961,
29900,
29962,
13,
418,
5993,
353,
1904,
29889,
657,
29918,
1767,
29898,
1524,
29892,
29871,
29900,
29897,
13,
418,
565,
5993,
29889,
2962,
5277,
1196,
322,
5993,
29889,
355,
1405,
1196,
29901,
13,
4706,
396,
1596,
2224,
13,
4706,
848,
29961,
29896,
1822,
4397,
29898,
2084,
29897,
13,
4706,
396,
2457,
5852,
13,
418,
736,
7700,
13,
13,
1678,
2224,
29918,
11940,
353,
5159,
13,
1678,
1904,
29889,
13150,
29898,
2886,
29918,
2084,
29892,
313,
1915,
264,
2807,
29892,
2224,
29918,
11940,
876,
13,
13,
1678,
565,
7431,
29898,
2084,
29918,
11940,
29897,
1405,
29871,
29900,
29901,
13,
418,
736,
2224,
29918,
11940,
14352,
29896,
29962,
13,
1678,
736,
6213,
13,
13,
29871,
822,
9277,
9721,
9482,
261,
29898,
1311,
29892,
5447,
1493,
4914,
29892,
3038,
9482,
261,
29886,
861,
9721,
29892,
2578,
331,
27224,
29892,
372,
1125,
13,
1678,
5993,
353,
2578,
331,
27224,
29889,
657,
29918,
1767,
29898,
277,
29892,
29900,
29897,
13,
1678,
565,
5993,
29889,
1853,
1275,
525,
2084,
2396,
13,
418,
3038,
9482,
261,
29886,
861,
9721,
29889,
842,
29918,
6799,
703,
17712,
29899,
333,
613,
330,
11178,
29889,
1254,
29949,
7077,
29918,
4571,
26282,
18929,
29897,
13,
1678,
25342,
5993,
29889,
1853,
1275,
525,
1445,
2396,
13,
418,
3038,
9482,
261,
29886,
861,
9721,
29889,
842,
29918,
6799,
703,
17712,
29899,
333,
613,
330,
11178,
29889,
1254,
29949,
7077,
29918,
7724,
29897,
13,
1678,
1683,
29901,
13,
418,
3038,
9482,
261,
29886,
861,
9721,
29889,
842,
29918,
6799,
703,
29886,
861,
9721,
613,
326,
351,
295,
6357,
29889,
29886,
861,
9721,
29879,
1839,
5041,
11287,
13,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29900,
29955,
529,
5813,
29958,
313,
29966,
26862,
6227,
12948,
13,
29937,
13,
29937,
910,
1824,
338,
3889,
7047,
29936,
366,
508,
2654,
391,
2666,
372,
322,
29914,
272,
6623,
13,
29937,
372,
1090,
278,
4958,
310,
278,
15143,
4593,
5236,
19245,
408,
6369,
491,
13,
29937,
278,
12362,
18540,
10606,
29936,
2845,
1873,
29871,
29906,
310,
278,
19245,
29892,
470,
13,
29937,
313,
271,
596,
2984,
29897,
738,
2678,
1873,
29889,
13,
29937,
13,
29937,
910,
1824,
338,
13235,
297,
278,
4966,
393,
372,
674,
367,
5407,
29892,
13,
29937,
541,
399,
1806,
8187,
2692,
13764,
29979,
399,
1718,
29934,
13566,
29979,
29936,
1728,
1584,
278,
2411,
2957,
1370,
21867,
29891,
310,
13,
29937,
341,
1001,
3210,
13566,
2882,
6227,
11937,
470,
383,
1806,
8186,
1799,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
29889,
29871,
2823,
278,
13,
29937,
15143,
4593,
5236,
19245,
363,
901,
4902,
29889,
13,
29937,
13,
29937,
887,
881,
505,
4520,
263,
3509,
310,
278,
15143,
4593,
5236,
19245,
13,
29937,
3412,
411,
445,
1824,
29936,
565,
451,
29892,
2436,
304,
278,
12362,
18540,
13,
29937,
10606,
29892,
9266,
1696,
29871,
29945,
29929,
18057,
15484,
29892,
2166,
568,
29871,
29941,
29941,
29900,
29892,
13,
29937,
12115,
29892,
14861,
29871,
29900,
29906,
29896,
29896,
29896,
29899,
29896,
29941,
29900,
29955,
29892,
8278,
29889,
13,
13,
5215,
330,
11178,
13,
5215,
330,
3318,
13,
5215,
282,
4524,
13,
5215,
2897,
13,
5215,
3987,
13,
5215,
6382,
295,
6357,
13,
3166,
13812,
13248,
1053,
4134,
11726,
10448,
13,
13,
1990,
25159,
29901,
13,
29871,
822,
4770,
2344,
12035,
1311,
1125,
13,
1678,
1583,
29889,
2962,
353,
29871,
29900,
13,
1678,
1583,
29889,
355,
353,
29871,
29900,
13,
1678,
1583,
29889,
978,
353,
6213,
13,
1678,
1583,
29889,
3560,
353,
6213,
13,
1678,
1583,
29889,
11991,
353,
5159,
13,
1678,
1583,
29889,
1853,
353,
525,
25990,
300,
29915,
13,
13,
1990,
360,
2593,
11726,
29898,
2385,
11726,
10448,
1125,
13,
13,
29871,
822,
6088,
29898,
1311,
29892,
330,
5628,
1514,
1125,
13,
1678,
1426,
353,
330,
5628,
1514,
29889,
657,
29918,
726,
10456,
3192,
277,
1514,
29889,
657,
29918,
23687,
3101,
13,
1678,
1196,
2798,
353,
448,
29896,
13,
1678,
1857,
29918,
1445,
353,
6213,
13,
1678,
3620,
300,
353,
6213,
13,
1678,
2066,
353,
5159,
13,
1678,
21333,
353,
330,
5628,
1514,
29889,
657,
29918,
5338,
580,
13,
13,
1678,
363,
1196,
297,
1426,
29889,
5451,
9012,
7295,
13,
418,
1196,
2798,
4619,
29871,
29896,
13,
418,
301,
17010,
353,
1196,
29889,
29880,
17010,
580,
13,
418,
301,
29876,
353,
301,
17010,
29889,
5451,
580,
13,
418,
565,
7431,
29898,
3083,
29897,
1275,
29871,
29900,
29901,
6773,
13,
13,
418,
565,
301,
29876,
29961,
29900,
29962,
1275,
525,
5634,
2396,
13,
4706,
565,
1857,
29918,
1445,
338,
451,
6213,
29901,
13,
3986,
1857,
29918,
1445,
29889,
355,
353,
1196,
2798,
448,
29871,
29896,
13,
4706,
1857,
29918,
1445,
353,
25159,
580,
13,
4706,
1857,
29918,
1445,
29889,
978,
353,
301,
29876,
29961,
29896,
29962,
13,
4706,
1857,
29918,
1445,
29889,
2962,
353,
1196,
2798,
13,
4706,
1857,
29918,
1445,
29889,
1853,
353,
525,
1445,
29915,
13,
4706,
1857,
29918,
1445,
29889,
5338,
353,
21333,
13,
4706,
2066,
29889,
4397,
29898,
3784,
29918,
1445,
29897,
13,
13,
418,
25342,
1857,
29918,
1445,
1275,
6213,
29901,
6773,
13,
13,
418,
25342,
301,
29876,
29961,
29900,
29962,
1275,
18803,
29992,
29915,
322,
301,
29876,
14352,
29896,
29962,
1275,
18803,
29992,
2396,
13,
4706,
565,
3620,
300,
338,
451,
6213,
29901,
13,
3986,
3620,
300,
29889,
355,
353,
1196,
2798,
13,
4706,
3620,
300,
353,
25159,
580,
13,
4706,
3620,
300,
29889,
978,
353,
525,
15300,
7122,
29898,
3083,
29961,
29896,
13018,
29896,
2314,
13,
4706,
3620,
300,
29889,
2962,
353,
1196,
2798,
13,
4706,
3620,
300,
29889,
5338,
353,
21333,
13,
4706,
1857,
29918,
1445,
29889,
11991,
29889,
4397,
29898,
25990,
300,
29897,
13,
4706,
3620,
300,
29889,
3560,
353,
1857,
29918,
1445,
13,
13,
418,
396,
2796,
292,
1196,
310,
1833,
18897,
13,
418,
565,
7431,
29898,
5325,
29897,
1405,
29871,
29900,
29901,
13,
4706,
285,
353,
29871,
2066,
14352,
29896,
29962,
13,
4706,
285,
29889,
355,
353,
1196,
2798,
718,
29871,
29906,
13,
4706,
565,
7431,
29898,
29888,
29889,
11991,
29897,
1405,
29871,
29900,
29901,
13,
3986,
285,
29889,
11991,
14352,
29896,
1822,
355,
353,
1196,
2798,
718,
29871,
29906,
13,
13,
1678,
1904,
353,
330,
11178,
29889,
9643,
9044,
29898,
29887,
3318,
29889,
11116,
29918,
20055,
14824,
17637,
29897,
13,
13,
1678,
6499,
353,
6213,
13,
13,
1678,
396,
376,
29943,
1296,
29908,
3619,
2246,
4138,
29892,
565,
738,
13,
1678,
396,
14402,
29901,
6204,
21277,
565,
13261,
16058,
297,
2999,
17525,
13,
1678,
565,
7431,
29898,
5325,
29897,
1405,
29871,
29900,
29901,
13,
418,
10898,
353,
2910,
29898,
2892,
285,
29901,
29888,
29889,
978,
29892,
2066,
29897,
13,
418,
10944,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
9435,
13506,
29898,
24772,
876,
718,
8207,
29915,
13,
418,
565,
7431,
29898,
13506,
29897,
1405,
29871,
29896,
29901,
13,
4706,
3847,
29918,
2084,
353,
25159,
580,
13,
4706,
3847,
29918,
2084,
29889,
1853,
353,
525,
2084,
29915,
13,
4706,
3847,
29918,
2084,
29889,
978,
353,
10944,
13,
4706,
363,
285,
297,
2066,
29901,
285,
29889,
978,
353,
285,
29889,
978,
29889,
6506,
29898,
13506,
5501,
742,
29896,
29897,
13,
4706,
6499,
353,
1904,
29889,
4397,
29898,
8516,
22657,
3560,
29918,
2084,
29892,
876,
13,
13,
1678,
396,
8878,
5447,
13,
1678,
363,
285,
297,
2066,
29901,
13,
418,
5447,
29918,
1524,
353,
1904,
29889,
4397,
29898,
407,
22657,
29888,
29892,
876,
13,
418,
363,
274,
297,
285,
29889,
11991,
29901,
13,
308,
1904,
29889,
4397,
29898,
8336,
29918,
1524,
22657,
29883,
29892,
876,
13,
13,
1678,
736,
1904,
13,
13,
29871,
822,
3038,
9482,
261,
29898,
1311,
29892,
5447,
1493,
4914,
29892,
3038,
9482,
261,
726,
29892,
2578,
331,
27224,
29892,
372,
1125,
13,
1678,
5993,
353,
2578,
331,
27224,
29889,
657,
29918,
1767,
29898,
277,
29892,
29900,
29897,
13,
13,
1678,
12384,
353,
3987,
29889,
2976,
11285,
2141,
1054,
2470,
3366,
14242,
3108,
13,
13,
1678,
565,
5993,
29889,
1853,
1275,
525,
2084,
2396,
13,
418,
12384,
353,
3987,
29889,
2976,
11285,
2141,
1054,
2470,
3366,
22377,
3108,
13,
1678,
25342,
5993,
29889,
1853,
1275,
525,
1445,
2396,
13,
418,
12384,
353,
3987,
29889,
2976,
11285,
2141,
1054,
2470,
3366,
1990,
3108,
13,
13,
1678,
3038,
9482,
261,
726,
29889,
842,
29918,
6799,
703,
726,
613,
5993,
29889,
978,
29897,
13,
1678,
3038,
9482,
261,
726,
29889,
842,
29918,
6799,
703,
3293,
613,
282,
4524,
29889,
1254,
29979,
1307,
29918,
29940,
1955,
1529,
29931,
29897,
13,
1678,
3038,
9482,
261,
726,
29889,
842,
29918,
6799,
703,
1454,
18128,
29899,
29887,
8181,
613,
12384,
29897,
13,
13,
29871,
822,
679,
29918,
4039,
29918,
3283,
29898,
1311,
29892,
1904,
29892,
2224,
1125,
13,
1678,
304,
29895,
353,
1904,
29889,
657,
29918,
1767,
29898,
4299,
29889,
657,
29918,
1524,
29898,
2084,
511,
29900,
29897,
13,
1678,
1018,
29901,
736,
304,
29895,
29889,
5338,
29892,
304,
29895,
29889,
2962,
718,
29871,
29896,
13,
1678,
5174,
29901,
736,
6213,
13,
13,
29871,
822,
679,
29918,
4039,
29918,
271,
29918,
1220,
29898,
1311,
29892,
1904,
29892,
1574,
29892,
6276,
264,
2807,
1125,
13,
13,
1678,
822,
1284,
29918,
2084,
29898,
4299,
29892,
2224,
29892,
4256,
29892,
848,
1125,
13,
418,
1196,
353,
848,
29961,
29900,
29962,
13,
418,
5993,
353,
1904,
29889,
657,
29918,
1767,
29898,
1524,
29892,
29871,
29900,
29897,
13,
418,
565,
5993,
29889,
2962,
5277,
1196,
322,
5993,
29889,
355,
1405,
1196,
29901,
13,
4706,
396,
1596,
2224,
13,
4706,
848,
29961,
29896,
1822,
4397,
29898,
2084,
29897,
13,
4706,
396,
2457,
5852,
13,
418,
736,
7700,
13,
13,
1678,
2224,
29918,
11940,
353,
5159,
13,
1678,
1904,
29889,
13150,
29898,
2886,
29918,
2084,
29892,
313,
1915,
264,
2807,
29892,
2224,
29918,
11940,
876,
13,
13,
1678,
565,
7431,
29898,
2084,
29918,
11940,
29897,
1405,
29871,
29900,
29901,
13,
418,
736,
2224,
29918,
11940,
14352,
29896,
29962,
13,
1678,
736,
6213,
13,
13,
29871,
822,
9277,
9721,
9482,
261,
29898,
1311,
29892,
5447,
1493,
4914,
29892,
3038,
9482,
261,
29886,
861,
9721,
29892,
2578,
331,
27224,
29892,
372,
1125,
13,
1678,
5993,
353,
2578,
331,
27224,
29889,
657,
29918,
1767,
29898,
277,
29892,
29900,
29897,
13,
1678,
565,
5993,
29889,
1853,
1275,
525,
2084,
2396,
13,
418,
3038,
9482,
261,
29886,
861,
9721,
29889,
842,
29918,
6799,
703,
17712,
29899,
333,
613,
330,
11178,
29889,
1254,
29949,
7077,
29918,
4571,
26282,
18929,
29897,
13,
1678,
25342,
5993,
29889,
1853,
1275,
525,
1445,
2396,
13,
418,
3038,
9482,
261,
29886,
861,
9721,
29889,
842,
29918,
6799,
703,
17712,
29899,
333,
613,
330,
11178,
29889,
1254,
29949,
7077,
29918,
7724,
29897,
13,
1678,
1683,
29901,
13,
418,
3038,
9482,
261,
29886,
861,
9721,
29889,
842,
29918,
6799,
703,
29886,
861,
9721,
613,
326,
351,
295,
6357,
29889,
29886,
861,
9721,
29879,
1839,
5041,
11287,
13,
2
] |
d05.py | nayunhwan/SMaSH_Python | 0 | 1615677 | <reponame>nayunhwan/SMaSH_Python<filename>d05.py
#coding: utf-8
count1 = 0
count2 = 0
count3 = 0
count4 = 0
count5 = 0
while(True):
s = input("직사각형의 가로 세로 입력")
width, height = s.split(" ")
width = int(width)
height = int(height)
if(width <= 0 or height <= 0):
break
else:
if(width == height):
count1 += 1
elif(width >= 2*height):
count2 += 1
elif(width*2 <= height):
count3 += 1
elif(width >= height):
count4 += 1
elif(width <= height):
count5 += 1
print("정사각형의 개수는",count1,"개 입니다.")
print("좌우로 길쭉한 직사각형은",count2,"개 입니다.")
print("위아래로 길쭉한 직사각혀의 개수는",count3,"개 입니다.")
print("일반적인 가로형 직사각형의 개수는",count4,"개 입니다.")
print("일반적인 세로형 직사각형의 개수는",count5,"개 입니다.") | [
1,
529,
276,
1112,
420,
29958,
29876,
388,
348,
29882,
11440,
29914,
17061,
29874,
7068,
29918,
11980,
29966,
9507,
29958,
29881,
29900,
29945,
29889,
2272,
13,
29937,
29883,
3689,
29901,
23616,
29899,
29947,
13,
13,
2798,
29896,
353,
29871,
29900,
13,
2798,
29906,
353,
29871,
29900,
13,
2798,
29941,
353,
29871,
29900,
13,
2798,
29946,
353,
29871,
29900,
13,
2798,
29945,
353,
29871,
29900,
13,
13,
8000,
29898,
5574,
1125,
13,
12,
29879,
353,
1881,
703,
239,
170,
132,
30791,
237,
179,
132,
240,
155,
152,
30708,
29871,
30903,
30906,
29871,
31578,
30906,
29871,
239,
161,
136,
238,
163,
168,
1159,
13,
12,
2103,
29892,
3171,
353,
269,
29889,
5451,
703,
16521,
13,
12,
2103,
353,
938,
29898,
2103,
29897,
13,
12,
3545,
353,
938,
29898,
3545,
29897,
13,
12,
361,
29898,
2103,
5277,
29871,
29900,
470,
3171,
5277,
29871,
29900,
1125,
13,
12,
12,
8690,
13,
12,
2870,
29901,
13,
12,
12,
361,
29898,
2103,
1275,
3171,
1125,
13,
12,
12,
12,
2798,
29896,
4619,
29871,
29896,
13,
12,
12,
23681,
29898,
2103,
6736,
29871,
29906,
29930,
3545,
1125,
13,
12,
12,
12,
2798,
29906,
4619,
29871,
29896,
13,
12,
12,
23681,
29898,
2103,
29930,
29906,
5277,
3171,
1125,
13,
12,
12,
12,
2798,
29941,
4619,
29871,
29896,
13,
12,
12,
23681,
29898,
2103,
6736,
3171,
1125,
13,
12,
12,
12,
2798,
29946,
4619,
29871,
29896,
13,
12,
12,
23681,
29898,
2103,
5277,
3171,
1125,
13,
12,
12,
12,
2798,
29945,
4619,
29871,
29896,
13,
13,
13,
2158,
703,
30852,
30791,
237,
179,
132,
240,
155,
152,
30708,
29871,
31789,
30970,
31081,
613,
2798,
29896,
1699,
31789,
29871,
239,
161,
136,
31063,
30709,
23157,
13,
2158,
703,
239,
165,
143,
31327,
30906,
29871,
237,
187,
187,
239,
176,
140,
30877,
29871,
239,
170,
132,
30791,
237,
179,
132,
240,
155,
152,
31354,
613,
2798,
29906,
1699,
31789,
29871,
239,
161,
136,
31063,
30709,
23157,
13,
2158,
703,
31724,
30860,
238,
161,
155,
30906,
29871,
237,
187,
187,
239,
176,
140,
30877,
29871,
239,
170,
132,
30791,
237,
179,
132,
240,
155,
131,
30708,
29871,
31789,
30970,
31081,
613,
2798,
29941,
1699,
31789,
29871,
239,
161,
136,
31063,
30709,
23157,
13,
2158,
703,
31153,
238,
179,
155,
239,
163,
132,
30918,
29871,
30903,
30906,
240,
155,
152,
29871,
239,
170,
132,
30791,
237,
179,
132,
240,
155,
152,
30708,
29871,
31789,
30970,
31081,
613,
2798,
29946,
1699,
31789,
29871,
239,
161,
136,
31063,
30709,
23157,
13,
2158,
703,
31153,
238,
179,
155,
239,
163,
132,
30918,
29871,
31578,
30906,
240,
155,
152,
29871,
239,
170,
132,
30791,
237,
179,
132,
240,
155,
152,
30708,
29871,
31789,
30970,
31081,
613,
2798,
29945,
1699,
31789,
29871,
239,
161,
136,
31063,
30709,
23157,
2
] |
tests/graph/utils.py | kvh/basis | 11 | 46611 | <filename>tests/graph/utils.py<gh_stars>10-100
import textwrap
from pathlib import Path
from dataclasses import dataclass, asdict
from typing import Any, Union, List, Dict, Collection, Set, Tuple
from basis.graph.builder import graph_manifest_from_yaml, GraphManifest
from basis.configuration.path import GraphEdge, NodeId, PortId
from basis.graph.configured_node import (
ParameterDefinition,
ParameterType,
OutputDefinition,
PortType,
InputDefinition,
ConfiguredNode,
NodeType,
NodeInterface,
GraphManifest,
GraphError,
StateDefinition,
ResolvedParameterValue,
)
class _IgnoreType:
def __eq__(self, other):
return isinstance(other, _IgnoreType)
def __repr__(self):
return "IGNORE"
IGNORE = _IgnoreType()
@dataclass
class NodeAssertion:
name: Union[str, _IgnoreType]
node_type: Union[NodeType, _IgnoreType]
id: Union[NodeId, _IgnoreType]
parent_node_id: Union[str, None]
interface: Union[NodeInterface, _IgnoreType]
description: Union[str, _IgnoreType]
file_path_to_node_script_relative_to_root: Union[str, _IgnoreType]
parameter_values: Union[Dict[str, Any], _IgnoreType]
schedule: Union[str, _IgnoreType]
local_edges: Union[List[str], _IgnoreType]
resolved_edges: Union[List[str], _IgnoreType]
resolved_parameter_values: Union[Dict[str, Tuple[Any, str]], _IgnoreType, None]
errors: List[str]
def _calculate_graph(nodes: List[ConfiguredNode]):
nodes_by_id = {n.id: n for n in nodes}
ids_by_path = {None: None}
for node in nodes:
parts = [node.name]
parent = node.parent_node_id
while parent:
n = nodes_by_id[parent]
parts.append(n.name)
parent = n.parent_node_id
ids_by_path[".".join(reversed(parts))] = node.id
return ids_by_path
def _assert_node(
node: ConfiguredNode, assertion: NodeAssertion, ids_by_path: dict, paths_by_id: dict
):
for k, v in asdict(assertion).items():
if k == "errors":
continue
actual = getattr(node, k)
if k == "id":
assert actual, "all ids must be defined"
if v == IGNORE:
continue
if k in ("local_edges", "resolved_edges"):
v = _unordered([_ge(s, ids_by_path) for s in v])
actual = _unordered(actual)
elif k == "parent_node_id" and v is not None:
actual = paths_by_id[actual]
elif k == "resolved_parameter_values":
if v is None:
if assertion.parameter_values == IGNORE:
continue
v = {
kk: ResolvedParameterValue(value=vv, source=node.id)
for kk, vv in assertion.parameter_values.items()
}
else:
v = {
kk: ResolvedParameterValue(value=vv[0], source=ids_by_path[vv[1]])
for kk, vv in v.items()
}
def check(k, ex, ac):
assert ac == ex, (
f"{assertion.name}: {k}:\n expected: {_tostr(ex, paths_by_id)}"
+ f"\n but was: {_tostr(ac, paths_by_id)}"
)
if k == "interface":
check("interface inputs", v.inputs, actual.inputs)
check("interface outputs", v.outputs, actual.outputs)
check("interface parameters", v.parameters, actual.parameters)
else:
check(k, v, actual)
def _tostr(it, paths_by_id: dict) -> str:
if isinstance(it, (list, set)):
return str(sorted(_tostr(i, paths_by_id) for i in it))
if isinstance(it, PortId):
return f"{paths_by_id[it.node_id]}:{it.port}"
if isinstance(it, GraphEdge):
return f"{_tostr(it.input, paths_by_id)} -> {_tostr(it.output, paths_by_id)}"
if isinstance(it, GraphError):
return f"{paths_by_id[it.node_id] if it.node_id else '<root>'}: {it.message}"
return repr(it)
def assert_nodes(
manifest: GraphManifest, *expected: NodeAssertion, assert_length: bool = True
):
nodes = manifest.nodes
assert len(nodes) == len({node.id for node in nodes}), "all ids must be unique"
if assert_length:
assert len(nodes) == len(
expected
), f"expected nodes {[n.name for n in expected]} , got {[n.name for n in nodes]}"
nodes_by_name_and_parent = {
(node.name, node.parent_node_id): node for node in nodes
}
ids_by_path = _calculate_graph(nodes)
paths_by_id = {v: k for (k, v) in ids_by_path.items()}
errors = []
for assertion in expected:
parent_id = ids_by_path[assertion.parent_node_id]
k = (assertion.name, parent_id)
assert (
k in nodes_by_name_and_parent
), f"no node {assertion.name} in {list(nodes_by_name_and_parent.keys())}"
node = nodes_by_name_and_parent[k]
errors.extend(GraphError(node_id=node.id, message=e) for e in assertion.errors)
ac = _unordered(manifest.errors)
ex = _unordered(errors)
assert (
ex == ac
), f"errors:\nexpected:\n{_tostr(ex, paths_by_id)}\nbut was:\n{_tostr(ac, paths_by_id)}"
for assertion in expected:
parent_id = ids_by_path[assertion.parent_node_id]
node = nodes_by_name_and_parent[assertion.name, parent_id]
_assert_node(node, assertion, ids_by_path, paths_by_id)
# noinspection PyDefaultArgument
def n(
name: str,
node_type: Union[NodeType, _IgnoreType] = NodeType.Node,
id: Union[str, _IgnoreType] = IGNORE,
parent: Union[str, None] = None,
interface: Union[
List[
Union[
InputDefinition, OutputDefinition, ParameterDefinition, StateDefinition
]
],
_IgnoreType,
] = IGNORE,
description: Union[str, None, _IgnoreType] = None,
file_path: Union[str, _IgnoreType] = IGNORE,
parameter_values: Union[Dict[str, Any], _IgnoreType] = {},
schedule: Union[str, None, _IgnoreType] = None,
local_edges: Union[List[str], _IgnoreType] = IGNORE,
resolved_edges: Union[List[str], None, _IgnoreType] = None,
resolved_params: Union[Dict[str, Tuple[Any, str]], _IgnoreType] = None,
errors: List[str] = [],
) -> NodeAssertion:
return NodeAssertion(
name=name,
node_type=node_type,
id=IGNORE if id == IGNORE else NodeId(id.lower()),
parent_node_id=parent,
interface=interface
if interface == IGNORE
else NodeInterface(
inputs=[i for i in interface if isinstance(i, InputDefinition)],
outputs=[i for i in interface if isinstance(i, OutputDefinition)],
parameters=[i for i in interface if isinstance(i, ParameterDefinition)],
state=next((i for i in interface if isinstance(i, StateDefinition)), None),
),
description=description,
file_path_to_node_script_relative_to_root=file_path,
parameter_values=parameter_values,
resolved_parameter_values=resolved_params,
schedule=schedule,
local_edges=local_edges,
resolved_edges=local_edges if resolved_edges is None else resolved_edges,
errors=errors,
)
def p(
name: str, parameter_type: str = None, description: str = None, default: Any = None,
) -> ParameterDefinition:
return ParameterDefinition(
name=name,
parameter_type=ParameterType(parameter_type) if parameter_type else None,
description=description,
default=default,
)
def ostream(
name: str, description: str = None, schema: str = None,
) -> OutputDefinition:
return OutputDefinition(
port_type=PortType.Stream,
name=name,
description=description,
schema_name=schema,
)
def istream(
name: str,
description: str = None,
schema: str = None,
required: bool = True,
) -> InputDefinition:
return InputDefinition(
port_type=PortType.Stream,
name=name,
description=description,
schema_name=schema,
required=required,
)
def itable(
name: str,
description: str = None,
schema: str = None,
required: bool = True,
) -> InputDefinition:
return InputDefinition(
port_type=PortType.Table,
name=name,
description=description,
schema_name=schema,
required=required,
)
def otable(
name: str, description: str = None, schema: str = None,
) -> OutputDefinition:
return OutputDefinition(
port_type=PortType.Table,
name=name,
description=description,
schema_name=schema,
)
def s(name: str):
return StateDefinition(name=name)
def _ge(s: str, ids_by_path: dict) -> GraphEdge:
l, r = s.split(" -> ")
ln, lp = l.split(":")
rn, rp = r.split(":")
return GraphEdge(
input=PortId(node_id=ids_by_path[ln], port=lp),
output=PortId(node_id=ids_by_path[rn], port=rp),
)
def _unordered(c: Collection) -> Set:
s = set(c)
assert len(c) == len(s)
return s
def read_manifest(name: str) -> GraphManifest:
pth = Path(__file__).parent / name / "graph.yml"
return graph_manifest_from_yaml(pth, allow_errors=True)
def setup_manifest(root: Path, files: Dict[str, str]) -> GraphManifest:
for path, content in files.items():
content = textwrap.dedent(content).strip()
if path.endswith(".py"):
if not content.startswith("@node"):
content = f"@node\ndef generated_node(\n{content}\n):\n pass"
content = "from basis import *\n\n" + content
abspath = root / path
if len(Path(path).parts) > 1:
abspath.parent.mkdir(parents=True, exist_ok=True)
abspath.write_text(content)
return graph_manifest_from_yaml(root / "graph.yml", allow_errors=True)
| [
1,
529,
9507,
29958,
21150,
29914,
4262,
29914,
13239,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
1426,
6312,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
848,
13203,
1053,
848,
1990,
29892,
408,
8977,
13,
3166,
19229,
1053,
3139,
29892,
7761,
29892,
2391,
29892,
360,
919,
29892,
14348,
29892,
3789,
29892,
12603,
552,
13,
3166,
8405,
29889,
4262,
29889,
16409,
1053,
3983,
29918,
29135,
29918,
3166,
29918,
25162,
29892,
12367,
2517,
7004,
13,
13,
3166,
8405,
29889,
13305,
29889,
2084,
1053,
12367,
23894,
29892,
9071,
1204,
29892,
3371,
1204,
13,
3166,
8405,
29889,
4262,
29889,
2917,
2955,
29918,
3177,
1053,
313,
13,
1678,
24953,
14683,
29892,
13,
1678,
24953,
1542,
29892,
13,
1678,
10604,
14683,
29892,
13,
1678,
3371,
1542,
29892,
13,
1678,
10567,
14683,
29892,
13,
1678,
12782,
2955,
4247,
29892,
13,
1678,
9071,
1542,
29892,
13,
1678,
9071,
10448,
29892,
13,
1678,
12367,
2517,
7004,
29892,
13,
1678,
12367,
2392,
29892,
13,
1678,
4306,
14683,
29892,
13,
1678,
24062,
1490,
9329,
1917,
29892,
13,
29897,
13,
13,
13,
1990,
903,
23805,
1542,
29901,
13,
1678,
822,
4770,
1837,
12035,
1311,
29892,
916,
1125,
13,
4706,
736,
338,
8758,
29898,
1228,
29892,
903,
23805,
1542,
29897,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
376,
6259,
6632,
1525,
29908,
13,
13,
13,
6259,
6632,
1525,
353,
903,
23805,
1542,
580,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
9071,
14697,
291,
29901,
13,
1678,
1024,
29901,
7761,
29961,
710,
29892,
903,
23805,
1542,
29962,
13,
1678,
2943,
29918,
1853,
29901,
7761,
29961,
4247,
1542,
29892,
903,
23805,
1542,
29962,
13,
1678,
1178,
29901,
7761,
29961,
4247,
1204,
29892,
903,
23805,
1542,
29962,
13,
1678,
3847,
29918,
3177,
29918,
333,
29901,
7761,
29961,
710,
29892,
6213,
29962,
13,
1678,
5067,
29901,
7761,
29961,
4247,
10448,
29892,
903,
23805,
1542,
29962,
13,
1678,
6139,
29901,
7761,
29961,
710,
29892,
903,
23805,
1542,
29962,
13,
1678,
934,
29918,
2084,
29918,
517,
29918,
3177,
29918,
2154,
29918,
22925,
29918,
517,
29918,
4632,
29901,
7761,
29961,
710,
29892,
903,
23805,
1542,
29962,
13,
1678,
3443,
29918,
5975,
29901,
7761,
29961,
21533,
29961,
710,
29892,
3139,
1402,
903,
23805,
1542,
29962,
13,
1678,
20410,
29901,
7761,
29961,
710,
29892,
903,
23805,
1542,
29962,
13,
1678,
1887,
29918,
287,
2710,
29901,
7761,
29961,
1293,
29961,
710,
1402,
903,
23805,
1542,
29962,
13,
1678,
11527,
29918,
287,
2710,
29901,
7761,
29961,
1293,
29961,
710,
1402,
903,
23805,
1542,
29962,
13,
1678,
11527,
29918,
15501,
29918,
5975,
29901,
7761,
29961,
21533,
29961,
710,
29892,
12603,
552,
29961,
10773,
29892,
851,
20526,
903,
23805,
1542,
29892,
6213,
29962,
13,
1678,
4436,
29901,
2391,
29961,
710,
29962,
13,
13,
13,
1753,
903,
15807,
403,
29918,
4262,
29898,
18010,
29901,
2391,
29961,
3991,
2955,
4247,
29962,
1125,
13,
1678,
7573,
29918,
1609,
29918,
333,
353,
426,
29876,
29889,
333,
29901,
302,
363,
302,
297,
7573,
29913,
13,
1678,
18999,
29918,
1609,
29918,
2084,
353,
426,
8516,
29901,
6213,
29913,
13,
13,
1678,
363,
2943,
297,
7573,
29901,
13,
4706,
5633,
353,
518,
3177,
29889,
978,
29962,
13,
4706,
3847,
353,
2943,
29889,
3560,
29918,
3177,
29918,
333,
13,
4706,
1550,
3847,
29901,
13,
9651,
302,
353,
7573,
29918,
1609,
29918,
333,
29961,
3560,
29962,
13,
9651,
5633,
29889,
4397,
29898,
29876,
29889,
978,
29897,
13,
9651,
3847,
353,
302,
29889,
3560,
29918,
3177,
29918,
333,
13,
4706,
18999,
29918,
1609,
29918,
2084,
3366,
1213,
29889,
7122,
29898,
276,
874,
287,
29898,
20895,
28166,
353,
2943,
29889,
333,
13,
13,
1678,
736,
18999,
29918,
1609,
29918,
2084,
13,
13,
13,
1753,
903,
9294,
29918,
3177,
29898,
13,
1678,
2943,
29901,
12782,
2955,
4247,
29892,
28306,
29901,
9071,
14697,
291,
29892,
18999,
29918,
1609,
29918,
2084,
29901,
9657,
29892,
10898,
29918,
1609,
29918,
333,
29901,
9657,
13,
1125,
13,
1678,
363,
413,
29892,
325,
297,
408,
8977,
29898,
9294,
291,
467,
7076,
7295,
13,
4706,
565,
413,
1275,
376,
12523,
1115,
13,
9651,
6773,
13,
4706,
3935,
353,
679,
5552,
29898,
3177,
29892,
413,
29897,
13,
4706,
565,
413,
1275,
376,
333,
1115,
13,
9651,
4974,
3935,
29892,
376,
497,
18999,
1818,
367,
3342,
29908,
13,
4706,
565,
325,
1275,
306,
29954,
6632,
1525,
29901,
13,
9651,
6773,
13,
13,
4706,
565,
413,
297,
4852,
2997,
29918,
287,
2710,
613,
376,
9778,
1490,
29918,
287,
2710,
29908,
1125,
13,
9651,
325,
353,
903,
348,
21693,
4197,
29918,
479,
29898,
29879,
29892,
18999,
29918,
1609,
29918,
2084,
29897,
363,
269,
297,
325,
2314,
13,
9651,
3935,
353,
903,
348,
21693,
29898,
19304,
29897,
13,
4706,
25342,
413,
1275,
376,
3560,
29918,
3177,
29918,
333,
29908,
322,
325,
338,
451,
6213,
29901,
13,
9651,
3935,
353,
10898,
29918,
1609,
29918,
333,
29961,
19304,
29962,
13,
4706,
25342,
413,
1275,
376,
9778,
1490,
29918,
15501,
29918,
5975,
1115,
13,
9651,
565,
325,
338,
6213,
29901,
13,
18884,
565,
28306,
29889,
15501,
29918,
5975,
1275,
306,
29954,
6632,
1525,
29901,
13,
462,
1678,
6773,
13,
18884,
325,
353,
426,
13,
462,
1678,
413,
29895,
29901,
24062,
1490,
9329,
1917,
29898,
1767,
29922,
29894,
29894,
29892,
2752,
29922,
3177,
29889,
333,
29897,
13,
462,
1678,
363,
413,
29895,
29892,
325,
29894,
297,
28306,
29889,
15501,
29918,
5975,
29889,
7076,
580,
13,
18884,
500,
13,
9651,
1683,
29901,
13,
18884,
325,
353,
426,
13,
462,
1678,
413,
29895,
29901,
24062,
1490,
9329,
1917,
29898,
1767,
29922,
29894,
29894,
29961,
29900,
1402,
2752,
29922,
4841,
29918,
1609,
29918,
2084,
29961,
29894,
29894,
29961,
29896,
24960,
13,
462,
1678,
363,
413,
29895,
29892,
325,
29894,
297,
325,
29889,
7076,
580,
13,
18884,
500,
13,
13,
4706,
822,
1423,
29898,
29895,
29892,
429,
29892,
1274,
1125,
13,
9651,
4974,
1274,
1275,
429,
29892,
313,
13,
18884,
285,
29908,
29912,
9294,
291,
29889,
978,
6177,
426,
29895,
29913,
3583,
29876,
29871,
3806,
29901,
426,
29918,
517,
710,
29898,
735,
29892,
10898,
29918,
1609,
29918,
333,
2915,
29908,
13,
18884,
718,
285,
26732,
29876,
259,
541,
471,
29901,
426,
29918,
517,
710,
29898,
562,
29892,
10898,
29918,
1609,
29918,
333,
2915,
29908,
13,
9651,
1723,
13,
13,
4706,
565,
413,
1275,
376,
13248,
1115,
13,
9651,
1423,
703,
13248,
10970,
613,
325,
29889,
2080,
29879,
29892,
3935,
29889,
2080,
29879,
29897,
13,
9651,
1423,
703,
13248,
14391,
613,
325,
29889,
4905,
29879,
29892,
3935,
29889,
4905,
29879,
29897,
13,
9651,
1423,
703,
13248,
4128,
613,
325,
29889,
16744,
29892,
3935,
29889,
16744,
29897,
13,
4706,
1683,
29901,
13,
9651,
1423,
29898,
29895,
29892,
325,
29892,
3935,
29897,
13,
13,
13,
1753,
903,
517,
710,
29898,
277,
29892,
10898,
29918,
1609,
29918,
333,
29901,
9657,
29897,
1599,
851,
29901,
13,
1678,
565,
338,
8758,
29898,
277,
29892,
313,
1761,
29892,
731,
22164,
13,
4706,
736,
851,
29898,
24582,
7373,
517,
710,
29898,
29875,
29892,
10898,
29918,
1609,
29918,
333,
29897,
363,
474,
297,
372,
876,
13,
1678,
565,
338,
8758,
29898,
277,
29892,
3371,
1204,
1125,
13,
4706,
736,
285,
29908,
29912,
24772,
29918,
1609,
29918,
333,
29961,
277,
29889,
3177,
29918,
333,
29962,
6177,
29912,
277,
29889,
637,
5038,
13,
1678,
565,
338,
8758,
29898,
277,
29892,
12367,
23894,
1125,
13,
4706,
736,
285,
29908,
29912,
29918,
517,
710,
29898,
277,
29889,
2080,
29892,
10898,
29918,
1609,
29918,
333,
2915,
1599,
426,
29918,
517,
710,
29898,
277,
29889,
4905,
29892,
10898,
29918,
1609,
29918,
333,
2915,
29908,
13,
1678,
565,
338,
8758,
29898,
277,
29892,
12367,
2392,
1125,
13,
4706,
736,
285,
29908,
29912,
24772,
29918,
1609,
29918,
333,
29961,
277,
29889,
3177,
29918,
333,
29962,
565,
372,
29889,
3177,
29918,
333,
1683,
12801,
4632,
16299,
6177,
426,
277,
29889,
4906,
5038,
13,
1678,
736,
2062,
29898,
277,
29897,
13,
13,
13,
1753,
4974,
29918,
18010,
29898,
13,
1678,
10419,
29901,
12367,
2517,
7004,
29892,
334,
9684,
29901,
9071,
14697,
291,
29892,
4974,
29918,
2848,
29901,
6120,
353,
5852,
13,
1125,
13,
1678,
7573,
353,
10419,
29889,
18010,
13,
1678,
4974,
7431,
29898,
18010,
29897,
1275,
7431,
3319,
3177,
29889,
333,
363,
2943,
297,
7573,
9594,
376,
497,
18999,
1818,
367,
5412,
29908,
13,
13,
1678,
565,
4974,
29918,
2848,
29901,
13,
4706,
4974,
7431,
29898,
18010,
29897,
1275,
7431,
29898,
13,
9651,
3806,
13,
4706,
10353,
285,
29908,
9684,
7573,
426,
29961,
29876,
29889,
978,
363,
302,
297,
3806,
12258,
1919,
2355,
426,
29961,
29876,
29889,
978,
363,
302,
297,
7573,
29962,
5038,
13,
13,
1678,
7573,
29918,
1609,
29918,
978,
29918,
392,
29918,
3560,
353,
426,
13,
4706,
313,
3177,
29889,
978,
29892,
2943,
29889,
3560,
29918,
3177,
29918,
333,
1125,
2943,
363,
2943,
297,
7573,
13,
1678,
500,
13,
1678,
18999,
29918,
1609,
29918,
2084,
353,
903,
15807,
403,
29918,
4262,
29898,
18010,
29897,
13,
1678,
10898,
29918,
1609,
29918,
333,
353,
426,
29894,
29901,
413,
363,
313,
29895,
29892,
325,
29897,
297,
18999,
29918,
1609,
29918,
2084,
29889,
7076,
28296,
13,
1678,
4436,
353,
5159,
13,
1678,
363,
28306,
297,
3806,
29901,
13,
4706,
3847,
29918,
333,
353,
18999,
29918,
1609,
29918,
2084,
29961,
9294,
291,
29889,
3560,
29918,
3177,
29918,
333,
29962,
13,
4706,
413,
353,
313,
9294,
291,
29889,
978,
29892,
3847,
29918,
333,
29897,
13,
4706,
4974,
313,
13,
9651,
413,
297,
7573,
29918,
1609,
29918,
978,
29918,
392,
29918,
3560,
13,
4706,
10353,
285,
29908,
1217,
2943,
426,
9294,
291,
29889,
978,
29913,
297,
426,
1761,
29898,
18010,
29918,
1609,
29918,
978,
29918,
392,
29918,
3560,
29889,
8149,
580,
2915,
29908,
13,
4706,
2943,
353,
7573,
29918,
1609,
29918,
978,
29918,
392,
29918,
3560,
29961,
29895,
29962,
13,
4706,
4436,
29889,
21843,
29898,
9527,
2392,
29898,
3177,
29918,
333,
29922,
3177,
29889,
333,
29892,
2643,
29922,
29872,
29897,
363,
321,
297,
28306,
29889,
12523,
29897,
13,
13,
1678,
1274,
353,
903,
348,
21693,
29898,
29135,
29889,
12523,
29897,
13,
1678,
429,
353,
903,
348,
21693,
29898,
12523,
29897,
13,
1678,
4974,
313,
13,
4706,
429,
1275,
1274,
13,
1678,
10353,
285,
29908,
12523,
3583,
13996,
6021,
3583,
29876,
29912,
29918,
517,
710,
29898,
735,
29892,
10898,
29918,
1609,
29918,
333,
11383,
29876,
4187,
471,
3583,
29876,
29912,
29918,
517,
710,
29898,
562,
29892,
10898,
29918,
1609,
29918,
333,
2915,
29908,
13,
13,
1678,
363,
28306,
297,
3806,
29901,
13,
4706,
3847,
29918,
333,
353,
18999,
29918,
1609,
29918,
2084,
29961,
9294,
291,
29889,
3560,
29918,
3177,
29918,
333,
29962,
13,
4706,
2943,
353,
7573,
29918,
1609,
29918,
978,
29918,
392,
29918,
3560,
29961,
9294,
291,
29889,
978,
29892,
3847,
29918,
333,
29962,
13,
4706,
903,
9294,
29918,
3177,
29898,
3177,
29892,
28306,
29892,
18999,
29918,
1609,
29918,
2084,
29892,
10898,
29918,
1609,
29918,
333,
29897,
13,
13,
13,
29937,
694,
1144,
27988,
10772,
4592,
15730,
13,
1753,
302,
29898,
13,
1678,
1024,
29901,
851,
29892,
13,
1678,
2943,
29918,
1853,
29901,
7761,
29961,
4247,
1542,
29892,
903,
23805,
1542,
29962,
353,
9071,
1542,
29889,
4247,
29892,
13,
1678,
1178,
29901,
7761,
29961,
710,
29892,
903,
23805,
1542,
29962,
353,
306,
29954,
6632,
1525,
29892,
13,
1678,
3847,
29901,
7761,
29961,
710,
29892,
6213,
29962,
353,
6213,
29892,
13,
1678,
5067,
29901,
7761,
29961,
13,
4706,
2391,
29961,
13,
9651,
7761,
29961,
13,
18884,
10567,
14683,
29892,
10604,
14683,
29892,
24953,
14683,
29892,
4306,
14683,
13,
9651,
4514,
13,
4706,
21251,
13,
4706,
903,
23805,
1542,
29892,
13,
1678,
4514,
353,
306,
29954,
6632,
1525,
29892,
13,
1678,
6139,
29901,
7761,
29961,
710,
29892,
6213,
29892,
903,
23805,
1542,
29962,
353,
6213,
29892,
13,
1678,
934,
29918,
2084,
29901,
7761,
29961,
710,
29892,
903,
23805,
1542,
29962,
353,
306,
29954,
6632,
1525,
29892,
13,
1678,
3443,
29918,
5975,
29901,
7761,
29961,
21533,
29961,
710,
29892,
3139,
1402,
903,
23805,
1542,
29962,
353,
24335,
13,
1678,
20410,
29901,
7761,
29961,
710,
29892,
6213,
29892,
903,
23805,
1542,
29962,
353,
6213,
29892,
13,
1678,
1887,
29918,
287,
2710,
29901,
7761,
29961,
1293,
29961,
710,
1402,
903,
23805,
1542,
29962,
353,
306,
29954,
6632,
1525,
29892,
13,
1678,
11527,
29918,
287,
2710,
29901,
7761,
29961,
1293,
29961,
710,
1402,
6213,
29892,
903,
23805,
1542,
29962,
353,
6213,
29892,
13,
1678,
11527,
29918,
7529,
29901,
7761,
29961,
21533,
29961,
710,
29892,
12603,
552,
29961,
10773,
29892,
851,
20526,
903,
23805,
1542,
29962,
353,
6213,
29892,
13,
1678,
4436,
29901,
2391,
29961,
710,
29962,
353,
19997,
13,
29897,
1599,
9071,
14697,
291,
29901,
13,
1678,
736,
9071,
14697,
291,
29898,
13,
4706,
1024,
29922,
978,
29892,
13,
4706,
2943,
29918,
1853,
29922,
3177,
29918,
1853,
29892,
13,
4706,
1178,
29922,
6259,
6632,
1525,
565,
1178,
1275,
306,
29954,
6632,
1525,
1683,
9071,
1204,
29898,
333,
29889,
13609,
25739,
13,
4706,
3847,
29918,
3177,
29918,
333,
29922,
3560,
29892,
13,
4706,
5067,
29922,
13248,
13,
4706,
565,
5067,
1275,
306,
29954,
6632,
1525,
13,
4706,
1683,
9071,
10448,
29898,
13,
9651,
10970,
11759,
29875,
363,
474,
297,
5067,
565,
338,
8758,
29898,
29875,
29892,
10567,
14683,
29897,
1402,
13,
9651,
14391,
11759,
29875,
363,
474,
297,
5067,
565,
338,
8758,
29898,
29875,
29892,
10604,
14683,
29897,
1402,
13,
9651,
4128,
11759,
29875,
363,
474,
297,
5067,
565,
338,
8758,
29898,
29875,
29892,
24953,
14683,
29897,
1402,
13,
9651,
2106,
29922,
4622,
3552,
29875,
363,
474,
297,
5067,
565,
338,
8758,
29898,
29875,
29892,
4306,
14683,
8243,
6213,
511,
13,
4706,
10353,
13,
4706,
6139,
29922,
8216,
29892,
13,
4706,
934,
29918,
2084,
29918,
517,
29918,
3177,
29918,
2154,
29918,
22925,
29918,
517,
29918,
4632,
29922,
1445,
29918,
2084,
29892,
13,
4706,
3443,
29918,
5975,
29922,
15501,
29918,
5975,
29892,
13,
4706,
11527,
29918,
15501,
29918,
5975,
29922,
9778,
1490,
29918,
7529,
29892,
13,
4706,
20410,
29922,
816,
11272,
29892,
13,
4706,
1887,
29918,
287,
2710,
29922,
2997,
29918,
287,
2710,
29892,
13,
4706,
11527,
29918,
287,
2710,
29922,
2997,
29918,
287,
2710,
565,
11527,
29918,
287,
2710,
338,
6213,
1683,
11527,
29918,
287,
2710,
29892,
13,
4706,
4436,
29922,
12523,
29892,
13,
1678,
1723,
13,
13,
13,
1753,
282,
29898,
13,
1678,
1024,
29901,
851,
29892,
3443,
29918,
1853,
29901,
851,
353,
6213,
29892,
6139,
29901,
851,
353,
6213,
29892,
2322,
29901,
3139,
353,
6213,
29892,
13,
29897,
1599,
24953,
14683,
29901,
13,
1678,
736,
24953,
14683,
29898,
13,
4706,
1024,
29922,
978,
29892,
13,
4706,
3443,
29918,
1853,
29922,
9329,
1542,
29898,
15501,
29918,
1853,
29897,
565,
3443,
29918,
1853,
1683,
6213,
29892,
13,
4706,
6139,
29922,
8216,
29892,
13,
4706,
2322,
29922,
4381,
29892,
13,
1678,
1723,
13,
13,
13,
1753,
288,
5461,
29898,
13,
1678,
1024,
29901,
851,
29892,
6139,
29901,
851,
353,
6213,
29892,
10938,
29901,
851,
353,
6213,
29892,
13,
29897,
1599,
10604,
14683,
29901,
13,
1678,
736,
10604,
14683,
29898,
13,
4706,
2011,
29918,
1853,
29922,
2290,
1542,
29889,
3835,
29892,
13,
4706,
1024,
29922,
978,
29892,
13,
4706,
6139,
29922,
8216,
29892,
13,
4706,
10938,
29918,
978,
29922,
11010,
29892,
13,
1678,
1723,
13,
13,
13,
1753,
1752,
1633,
29898,
13,
1678,
1024,
29901,
851,
29892,
13,
1678,
6139,
29901,
851,
353,
6213,
29892,
13,
1678,
10938,
29901,
851,
353,
6213,
29892,
13,
1678,
3734,
29901,
6120,
353,
5852,
29892,
13,
29897,
1599,
10567,
14683,
29901,
13,
1678,
736,
10567,
14683,
29898,
13,
4706,
2011,
29918,
1853,
29922,
2290,
1542,
29889,
3835,
29892,
13,
4706,
1024,
29922,
978,
29892,
13,
4706,
6139,
29922,
8216,
29892,
13,
4706,
10938,
29918,
978,
29922,
11010,
29892,
13,
4706,
3734,
29922,
12403,
29892,
13,
1678,
1723,
13,
13,
13,
1753,
372,
519,
29898,
13,
1678,
1024,
29901,
851,
29892,
13,
1678,
6139,
29901,
851,
353,
6213,
29892,
13,
1678,
10938,
29901,
851,
353,
6213,
29892,
13,
1678,
3734,
29901,
6120,
353,
5852,
29892,
13,
29897,
1599,
10567,
14683,
29901,
13,
1678,
736,
10567,
14683,
29898,
13,
4706,
2011,
29918,
1853,
29922,
2290,
1542,
29889,
3562,
29892,
13,
4706,
1024,
29922,
978,
29892,
13,
4706,
6139,
29922,
8216,
29892,
13,
4706,
10938,
29918,
978,
29922,
11010,
29892,
13,
4706,
3734,
29922,
12403,
29892,
13,
1678,
1723,
13,
13,
13,
1753,
288,
2371,
29898,
13,
1678,
1024,
29901,
851,
29892,
6139,
29901,
851,
353,
6213,
29892,
10938,
29901,
851,
353,
6213,
29892,
13,
29897,
1599,
10604,
14683,
29901,
13,
1678,
736,
10604,
14683,
29898,
13,
4706,
2011,
29918,
1853,
29922,
2290,
1542,
29889,
3562,
29892,
13,
4706,
1024,
29922,
978,
29892,
13,
4706,
6139,
29922,
8216,
29892,
13,
4706,
10938,
29918,
978,
29922,
11010,
29892,
13,
1678,
1723,
13,
13,
13,
1753,
269,
29898,
978,
29901,
851,
1125,
13,
1678,
736,
4306,
14683,
29898,
978,
29922,
978,
29897,
13,
13,
13,
1753,
903,
479,
29898,
29879,
29901,
851,
29892,
18999,
29918,
1609,
29918,
2084,
29901,
9657,
29897,
1599,
12367,
23894,
29901,
13,
1678,
301,
29892,
364,
353,
269,
29889,
5451,
703,
1599,
16521,
13,
1678,
301,
29876,
29892,
301,
29886,
353,
301,
29889,
5451,
703,
29901,
1159,
13,
1678,
364,
29876,
29892,
364,
29886,
353,
364,
29889,
5451,
703,
29901,
1159,
13,
1678,
736,
12367,
23894,
29898,
13,
4706,
1881,
29922,
2290,
1204,
29898,
3177,
29918,
333,
29922,
4841,
29918,
1609,
29918,
2084,
29961,
3083,
1402,
2011,
29922,
22833,
511,
13,
4706,
1962,
29922,
2290,
1204,
29898,
3177,
29918,
333,
29922,
4841,
29918,
1609,
29918,
2084,
29961,
27539,
1402,
2011,
29922,
19080,
511,
13,
1678,
1723,
13,
13,
13,
1753,
903,
348,
21693,
29898,
29883,
29901,
14348,
29897,
1599,
3789,
29901,
13,
1678,
269,
353,
731,
29898,
29883,
29897,
13,
1678,
4974,
7431,
29898,
29883,
29897,
1275,
7431,
29898,
29879,
29897,
13,
1678,
736,
269,
13,
13,
13,
1753,
1303,
29918,
29135,
29898,
978,
29901,
851,
29897,
1599,
12367,
2517,
7004,
29901,
13,
1678,
282,
386,
353,
10802,
22168,
1445,
1649,
467,
3560,
847,
1024,
847,
376,
4262,
29889,
21053,
29908,
13,
1678,
736,
3983,
29918,
29135,
29918,
3166,
29918,
25162,
29898,
29886,
386,
29892,
2758,
29918,
12523,
29922,
5574,
29897,
13,
13,
13,
1753,
6230,
29918,
29135,
29898,
4632,
29901,
10802,
29892,
2066,
29901,
360,
919,
29961,
710,
29892,
851,
2314,
1599,
12367,
2517,
7004,
29901,
13,
1678,
363,
2224,
29892,
2793,
297,
2066,
29889,
7076,
7295,
13,
4706,
2793,
353,
1426,
6312,
29889,
7176,
296,
29898,
3051,
467,
17010,
580,
13,
4706,
565,
2224,
29889,
1975,
2541,
17350,
2272,
29908,
1125,
13,
9651,
565,
451,
2793,
29889,
27382,
2541,
29475,
3177,
29908,
1125,
13,
18884,
2793,
353,
285,
29908,
29992,
3177,
29905,
299,
1389,
5759,
29918,
3177,
1194,
29876,
29912,
3051,
1012,
29876,
1125,
29905,
29876,
1678,
1209,
29908,
13,
9651,
2793,
353,
376,
3166,
8405,
1053,
334,
29905,
29876,
29905,
29876,
29908,
718,
2793,
13,
4706,
633,
1028,
493,
353,
3876,
847,
2224,
13,
4706,
565,
7431,
29898,
2605,
29898,
2084,
467,
20895,
29897,
1405,
29871,
29896,
29901,
13,
9651,
633,
1028,
493,
29889,
3560,
29889,
11256,
3972,
29898,
862,
1237,
29922,
5574,
29892,
1863,
29918,
554,
29922,
5574,
29897,
13,
4706,
633,
1028,
493,
29889,
3539,
29918,
726,
29898,
3051,
29897,
13,
1678,
736,
3983,
29918,
29135,
29918,
3166,
29918,
25162,
29898,
4632,
847,
376,
4262,
29889,
21053,
613,
2758,
29918,
12523,
29922,
5574,
29897,
13,
2
] |
angeline_yu/SARS.py | homologus/2020-intermediate-class | 3 | 50431 | <filename>angeline_yu/SARS.py
from Bio import SeqIO
from Bio.Seq import Seq
#Accessing SARS Genome and storing it in reads
reads = list(SeqIO.parse("/share/SARS/SARS-2020.fasta", "fasta"))
#translating the 3 reading frames
translation1 = reads[0].seq.translate()
translation2 = reads[0].seq.translate()
translation3 = reads[0].seq.translate()
for i in reads:
#reading frame 1
translation1 = i.seq[0:].translate()
#reading frame 2
translation2 = i.seq[1:].translate()
#reading frame 3
translation3 = i.seq[2:].translate()
#total genes
total = 0
#count variable acts as place holder to check if sequence is 100 long
count = 0
#toReturn variable keeps track of how many 100 amino acid sequences there are
toReturn = 0
#saves previous i location
prev_i = 0
#For loops checks for end codens ("*")
#reading frame 1
for i in range(len(translation1)):
if(str(translation1[i]) != "*"):
count += 1
continue
else:
if(count >= 100):
toReturn += 1
print("\n>Amino Acid Sequence " +str(toReturn))
print("Start Location = " +str(prev_i))
print("End Location = " +str(i+1))
print("Length = " +str((i+1)-prev_i))
print(translation1[prev_i+1:i]+"\n")
prev_i = i
count = 0
print("\nThere are " + str(toReturn) + " 100 amino acid sequences in the SARS-CoV2 Genome in reading frame 1. \n")
total += toReturn
count = 0
toReturn = 0
prev_i = 0
for i in range(len(translation2)):
if(str(translation2[i]) != "*"):
count += 1
continue
else:
if(count >= 100):
toReturn += 1
print("\n>Amino Acid Sequence " +str(toReturn))
print("Start Location = " +str(prev_i))
print("End Location = " +str(i+1))
print("Length = " +str((i+1)-prev_i))
print(translation2[prev_i+1:i]+"\n")
prev_i = i
count = 0
print("There are " + str(toReturn) + " 100 amino acid sequences in the SARS-CoV2 Genome in reading frame 2. \n")
total += toReturn
count = 0
toReturn = 0
prev_i = 0
for i in range(len(translation3)):
if(str(translation3[i]) != "*"):
count += 1
continue
else:
if(count >= 100):
toReturn += 1
print("\n>Amino Acid Sequence " +str(toReturn))
print("Start Location = " +str(prev_i))
print("End Location = " +str(i+1))
print("Length = " +str((i+1)-prev_i))
print(translation3[prev_i+1:i]+"\n")
prev_i = i
count = 0
print("There are " + str(toReturn) + " 100 amino acid sequences in the SARS-CoV2 Genome in reading frame 3. \n")
total += toReturn
print("There are " +str(total) + " total 100 amino acid sequences in the SARS-CoV2 Genome. \n")
| [
1,
529,
9507,
29958,
574,
5570,
29918,
29891,
29884,
29914,
29903,
1718,
29903,
29889,
2272,
13,
3166,
21184,
1053,
25981,
5971,
13,
3166,
21184,
29889,
23718,
1053,
25981,
13,
13,
29937,
6638,
292,
317,
1718,
29903,
5739,
608,
322,
15446,
372,
297,
13623,
13,
949,
29879,
353,
1051,
29898,
23718,
5971,
29889,
5510,
11974,
13653,
29914,
29903,
1718,
29903,
29914,
29903,
1718,
29903,
29899,
29906,
29900,
29906,
29900,
29889,
29888,
5427,
613,
376,
29888,
5427,
5783,
13,
13,
29937,
3286,
29880,
1218,
278,
29871,
29941,
5183,
16608,
13,
3286,
18411,
29896,
353,
13623,
29961,
29900,
1822,
11762,
29889,
21652,
580,
13,
3286,
18411,
29906,
353,
13623,
29961,
29900,
1822,
11762,
29889,
21652,
580,
13,
3286,
18411,
29941,
353,
13623,
29961,
29900,
1822,
11762,
29889,
21652,
580,
13,
1454,
474,
297,
13623,
29901,
13,
4706,
396,
19715,
3515,
29871,
29896,
13,
4706,
13962,
29896,
353,
474,
29889,
11762,
29961,
29900,
29901,
1822,
21652,
580,
13,
4706,
396,
19715,
3515,
29871,
29906,
13,
4706,
13962,
29906,
353,
474,
29889,
11762,
29961,
29896,
29901,
1822,
21652,
580,
13,
4706,
396,
19715,
3515,
29871,
29941,
13,
4706,
13962,
29941,
353,
474,
29889,
11762,
29961,
29906,
29901,
1822,
21652,
580,
13,
13,
29937,
7827,
2531,
267,
13,
7827,
353,
29871,
29900,
13,
29937,
2798,
2286,
14741,
408,
2058,
19464,
304,
1423,
565,
5665,
338,
29871,
29896,
29900,
29900,
1472,
13,
2798,
353,
29871,
29900,
13,
29937,
517,
11609,
2286,
14874,
5702,
310,
920,
1784,
29871,
29896,
29900,
29900,
626,
1789,
22193,
15602,
727,
526,
13,
517,
11609,
353,
29871,
29900,
13,
29937,
29879,
5989,
3517,
474,
4423,
13,
16304,
29918,
29875,
353,
29871,
29900,
13,
29937,
2831,
12104,
12747,
363,
1095,
15234,
575,
4852,
29930,
1159,
13,
29937,
19715,
3515,
29871,
29896,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
3286,
18411,
29896,
22164,
13,
4706,
565,
29898,
710,
29898,
3286,
18411,
29896,
29961,
29875,
2314,
2804,
376,
20605,
1125,
13,
18884,
2302,
4619,
29871,
29896,
13,
18884,
6773,
13,
4706,
1683,
29901,
13,
18884,
565,
29898,
2798,
6736,
29871,
29896,
29900,
29900,
1125,
13,
462,
4706,
304,
11609,
4619,
29871,
29896,
13,
462,
4706,
1596,
14182,
29876,
29958,
29909,
1195,
29877,
7255,
333,
922,
3910,
376,
718,
710,
29898,
517,
11609,
876,
13,
462,
4706,
1596,
703,
4763,
17015,
353,
376,
718,
710,
29898,
16304,
29918,
29875,
876,
13,
462,
4706,
1596,
703,
5044,
17015,
353,
376,
718,
710,
29898,
29875,
29974,
29896,
876,
13,
462,
4706,
1596,
703,
6513,
353,
376,
718,
710,
3552,
29875,
29974,
29896,
6817,
16304,
29918,
29875,
876,
13,
462,
4706,
1596,
29898,
3286,
18411,
29896,
29961,
16304,
29918,
29875,
29974,
29896,
29901,
29875,
10062,
26732,
29876,
1159,
13,
18884,
12379,
29918,
29875,
353,
474,
13,
18884,
2302,
353,
29871,
29900,
13,
13,
2158,
14182,
29876,
8439,
526,
376,
718,
851,
29898,
517,
11609,
29897,
718,
376,
29871,
29896,
29900,
29900,
626,
1789,
22193,
15602,
297,
278,
317,
1718,
29903,
29899,
7967,
29963,
29906,
5739,
608,
297,
5183,
3515,
29871,
29896,
29889,
320,
29876,
1159,
13,
7827,
4619,
304,
11609,
13,
13,
2798,
353,
29871,
29900,
13,
517,
11609,
353,
29871,
29900,
13,
16304,
29918,
29875,
353,
29871,
29900,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
3286,
18411,
29906,
22164,
13,
4706,
565,
29898,
710,
29898,
3286,
18411,
29906,
29961,
29875,
2314,
2804,
376,
20605,
1125,
13,
18884,
2302,
4619,
29871,
29896,
13,
18884,
6773,
13,
4706,
1683,
29901,
13,
18884,
565,
29898,
2798,
6736,
29871,
29896,
29900,
29900,
1125,
13,
462,
4706,
304,
11609,
4619,
29871,
29896,
13,
462,
4706,
1596,
14182,
29876,
29958,
29909,
1195,
29877,
7255,
333,
922,
3910,
376,
718,
710,
29898,
517,
11609,
876,
13,
462,
4706,
1596,
703,
4763,
17015,
353,
376,
718,
710,
29898,
16304,
29918,
29875,
876,
13,
462,
4706,
1596,
703,
5044,
17015,
353,
376,
718,
710,
29898,
29875,
29974,
29896,
876,
13,
462,
4706,
1596,
703,
6513,
353,
376,
718,
710,
3552,
29875,
29974,
29896,
6817,
16304,
29918,
29875,
876,
13,
462,
4706,
1596,
29898,
3286,
18411,
29906,
29961,
16304,
29918,
29875,
29974,
29896,
29901,
29875,
10062,
26732,
29876,
1159,
13,
18884,
12379,
29918,
29875,
353,
474,
13,
18884,
2302,
353,
29871,
29900,
13,
13,
2158,
703,
8439,
526,
376,
718,
851,
29898,
517,
11609,
29897,
718,
376,
29871,
29896,
29900,
29900,
626,
1789,
22193,
15602,
297,
278,
317,
1718,
29903,
29899,
7967,
29963,
29906,
5739,
608,
297,
5183,
3515,
29871,
29906,
29889,
320,
29876,
1159,
13,
7827,
4619,
304,
11609,
13,
13,
2798,
353,
29871,
29900,
13,
517,
11609,
353,
29871,
29900,
13,
16304,
29918,
29875,
353,
29871,
29900,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
3286,
18411,
29941,
22164,
13,
4706,
565,
29898,
710,
29898,
3286,
18411,
29941,
29961,
29875,
2314,
2804,
376,
20605,
1125,
13,
18884,
2302,
4619,
29871,
29896,
13,
18884,
6773,
13,
4706,
1683,
29901,
13,
18884,
565,
29898,
2798,
6736,
29871,
29896,
29900,
29900,
1125,
13,
462,
4706,
304,
11609,
4619,
29871,
29896,
13,
462,
4706,
1596,
14182,
29876,
29958,
29909,
1195,
29877,
7255,
333,
922,
3910,
376,
718,
710,
29898,
517,
11609,
876,
13,
462,
4706,
1596,
703,
4763,
17015,
353,
376,
718,
710,
29898,
16304,
29918,
29875,
876,
13,
462,
4706,
1596,
703,
5044,
17015,
353,
376,
718,
710,
29898,
29875,
29974,
29896,
876,
13,
462,
4706,
1596,
703,
6513,
353,
376,
718,
710,
3552,
29875,
29974,
29896,
6817,
16304,
29918,
29875,
876,
13,
462,
4706,
1596,
29898,
3286,
18411,
29941,
29961,
16304,
29918,
29875,
29974,
29896,
29901,
29875,
10062,
26732,
29876,
1159,
13,
18884,
12379,
29918,
29875,
353,
474,
13,
18884,
2302,
353,
29871,
29900,
13,
13,
2158,
703,
8439,
526,
376,
718,
851,
29898,
517,
11609,
29897,
718,
376,
29871,
29896,
29900,
29900,
626,
1789,
22193,
15602,
297,
278,
317,
1718,
29903,
29899,
7967,
29963,
29906,
5739,
608,
297,
5183,
3515,
29871,
29941,
29889,
320,
29876,
1159,
13,
7827,
4619,
304,
11609,
13,
13,
2158,
703,
8439,
526,
376,
718,
710,
29898,
7827,
29897,
718,
376,
3001,
29871,
29896,
29900,
29900,
626,
1789,
22193,
15602,
297,
278,
317,
1718,
29903,
29899,
7967,
29963,
29906,
5739,
608,
29889,
320,
29876,
1159,
13,
13,
2
] |
2020/day_16/day_16.py | viddrobnic/adventofcode | 0 | 36732 | <gh_stars>0
def read_data():
rules = dict()
your_ticket = None
nearby_tickets = []
state = 0
with open('in') as f:
for line in map(lambda x: x.strip(), f.readlines()):
if line == '':
state += 1
continue
if line == 'your ticket:':
continue
if line == 'nearby tickets:':
continue
if state == 0:
parts = line.split(':')
ranges = parts[1].split('or')
rules[parts[0]] = []
for r in ranges:
nums = r.split('-')
rules[parts[0]].append((int(nums[0]), int(nums[1])))
if state == 1:
your_ticket = list(map(int, line.split(',')))
if state == 2:
nearby_tickets.append(list(map(int, line.split(','))))
return rules, your_ticket, nearby_tickets
def part_one(rules, tickets):
error_rate = 0
invalid_tickets = []
for i, ticket in enumerate(tickets):
for val in ticket:
valid_val = False
for rule in rules.keys():
valid = False
for m, M in rules[rule]:
if val >= m and val <= M:
valid = True
break
if valid:
valid_val = True
break
if not valid_val:
error_rate += val
invalid_tickets.append(i)
return invalid_tickets, error_rate
def part_two(rules, your_ticket, tickets):
possible_values = [set(rules.keys()) for i in range(len(rules.keys()))]
for ticket in tickets:
for i, val in enumerate(ticket):
for rule in rules.keys():
valid = False
for m, M in rules[rule]:
if val >= m and val <= M:
valid = True
break
if not valid and rule in possible_values[i]:
possible_values[i].remove(rule)
while True:
to_filter = False
for v in map(len, possible_values):
if v > 1:
to_filter = True
if not to_filter:
break
for i in range(len(possible_values)):
if len(possible_values[i]) == 1:
for j in range(len(possible_values)):
if i != j:
possible_values[j] -= possible_values[i]
res = 1
for i in range(len(possible_values)):
if 'departure' in list(possible_values[i])[0]:
res *= your_ticket[i]
return res
def main():
rules, your_ticket, nearby_tickets = read_data()
invalid_tickets, error_rate = part_one(rules, nearby_tickets)
p_two = part_two(rules, your_ticket, [t for i, t in enumerate(nearby_tickets) if i not in invalid_tickets])
print(f'Part One: {error_rate}')
print(f'Part Two: {p_two}')
if __name__ == '__main__':
main()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
1753,
1303,
29918,
1272,
7295,
13,
1678,
6865,
353,
9657,
580,
13,
1678,
596,
29918,
29873,
8522,
353,
6213,
13,
1678,
20810,
29918,
24667,
1691,
353,
5159,
13,
1678,
2106,
353,
29871,
29900,
13,
1678,
411,
1722,
877,
262,
1495,
408,
285,
29901,
13,
4706,
363,
1196,
297,
2910,
29898,
2892,
921,
29901,
921,
29889,
17010,
3285,
285,
29889,
949,
9012,
580,
1125,
13,
9651,
565,
1196,
1275,
525,
2396,
13,
18884,
2106,
4619,
29871,
29896,
13,
18884,
6773,
13,
9651,
565,
1196,
1275,
525,
8066,
23381,
29901,
2396,
13,
18884,
6773,
13,
9651,
565,
1196,
1275,
525,
28502,
1609,
16892,
1691,
29901,
2396,
13,
18884,
6773,
13,
13,
9651,
565,
2106,
1275,
29871,
29900,
29901,
13,
18884,
5633,
353,
1196,
29889,
5451,
877,
29901,
1495,
13,
18884,
20238,
353,
5633,
29961,
29896,
1822,
5451,
877,
272,
1495,
13,
18884,
6865,
29961,
20895,
29961,
29900,
5262,
353,
5159,
13,
18884,
363,
364,
297,
20238,
29901,
13,
462,
1678,
954,
29879,
353,
364,
29889,
5451,
877,
29899,
1495,
13,
462,
1678,
6865,
29961,
20895,
29961,
29900,
29962,
1822,
4397,
3552,
524,
29898,
1949,
29879,
29961,
29900,
11724,
938,
29898,
1949,
29879,
29961,
29896,
29962,
4961,
13,
9651,
565,
2106,
1275,
29871,
29896,
29901,
13,
18884,
596,
29918,
29873,
8522,
353,
1051,
29898,
1958,
29898,
524,
29892,
1196,
29889,
5451,
29898,
3788,
4961,
13,
13,
9651,
565,
2106,
1275,
29871,
29906,
29901,
13,
18884,
20810,
29918,
24667,
1691,
29889,
4397,
29898,
1761,
29898,
1958,
29898,
524,
29892,
1196,
29889,
5451,
29898,
3788,
13697,
13,
13,
1678,
736,
6865,
29892,
596,
29918,
29873,
8522,
29892,
20810,
29918,
24667,
1691,
13,
13,
13,
1753,
760,
29918,
650,
29898,
19238,
29892,
16892,
1691,
1125,
13,
1678,
1059,
29918,
10492,
353,
29871,
29900,
13,
1678,
8340,
29918,
24667,
1691,
353,
5159,
13,
13,
1678,
363,
474,
29892,
23381,
297,
26985,
29898,
24667,
1691,
1125,
13,
4706,
363,
659,
297,
23381,
29901,
13,
9651,
2854,
29918,
791,
353,
7700,
13,
9651,
363,
5751,
297,
6865,
29889,
8149,
7295,
13,
18884,
2854,
353,
7700,
13,
18884,
363,
286,
29892,
341,
297,
6865,
29961,
7491,
5387,
13,
462,
1678,
565,
659,
6736,
286,
322,
659,
5277,
341,
29901,
13,
462,
4706,
2854,
353,
5852,
13,
462,
4706,
2867,
13,
13,
18884,
565,
2854,
29901,
13,
462,
1678,
2854,
29918,
791,
353,
5852,
13,
462,
1678,
2867,
13,
13,
9651,
565,
451,
2854,
29918,
791,
29901,
13,
18884,
1059,
29918,
10492,
4619,
659,
13,
18884,
8340,
29918,
24667,
1691,
29889,
4397,
29898,
29875,
29897,
13,
13,
1678,
736,
8340,
29918,
24667,
1691,
29892,
1059,
29918,
10492,
13,
13,
13,
1753,
760,
29918,
10184,
29898,
19238,
29892,
596,
29918,
29873,
8522,
29892,
16892,
1691,
1125,
13,
1678,
1950,
29918,
5975,
353,
518,
842,
29898,
19238,
29889,
8149,
3101,
363,
474,
297,
3464,
29898,
2435,
29898,
19238,
29889,
8149,
22130,
29962,
13,
13,
1678,
363,
23381,
297,
16892,
1691,
29901,
13,
4706,
363,
474,
29892,
659,
297,
26985,
29898,
29873,
8522,
1125,
13,
9651,
363,
5751,
297,
6865,
29889,
8149,
7295,
13,
18884,
2854,
353,
7700,
13,
18884,
363,
286,
29892,
341,
297,
6865,
29961,
7491,
5387,
13,
462,
1678,
565,
659,
6736,
286,
322,
659,
5277,
341,
29901,
13,
462,
4706,
2854,
353,
5852,
13,
462,
4706,
2867,
13,
13,
18884,
565,
451,
2854,
322,
5751,
297,
1950,
29918,
5975,
29961,
29875,
5387,
13,
462,
1678,
1950,
29918,
5975,
29961,
29875,
1822,
5992,
29898,
7491,
29897,
13,
13,
1678,
1550,
5852,
29901,
13,
4706,
304,
29918,
4572,
353,
7700,
13,
4706,
363,
325,
297,
2910,
29898,
2435,
29892,
1950,
29918,
5975,
1125,
13,
9651,
565,
325,
1405,
29871,
29896,
29901,
13,
18884,
304,
29918,
4572,
353,
5852,
13,
4706,
565,
451,
304,
29918,
4572,
29901,
13,
9651,
2867,
13,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
27338,
29918,
5975,
22164,
13,
9651,
565,
7431,
29898,
27338,
29918,
5975,
29961,
29875,
2314,
1275,
29871,
29896,
29901,
13,
18884,
363,
432,
297,
3464,
29898,
2435,
29898,
27338,
29918,
5975,
22164,
13,
462,
1678,
565,
474,
2804,
432,
29901,
13,
462,
4706,
1950,
29918,
5975,
29961,
29926,
29962,
22361,
1950,
29918,
5975,
29961,
29875,
29962,
13,
13,
1678,
620,
353,
29871,
29896,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
27338,
29918,
5975,
22164,
13,
4706,
565,
525,
311,
1595,
545,
29915,
297,
1051,
29898,
27338,
29918,
5975,
29961,
29875,
2314,
29961,
29900,
5387,
13,
9651,
620,
334,
29922,
596,
29918,
29873,
8522,
29961,
29875,
29962,
13,
13,
1678,
736,
620,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
6865,
29892,
596,
29918,
29873,
8522,
29892,
20810,
29918,
24667,
1691,
353,
1303,
29918,
1272,
580,
13,
13,
1678,
8340,
29918,
24667,
1691,
29892,
1059,
29918,
10492,
353,
760,
29918,
650,
29898,
19238,
29892,
20810,
29918,
24667,
1691,
29897,
13,
1678,
282,
29918,
10184,
353,
760,
29918,
10184,
29898,
19238,
29892,
596,
29918,
29873,
8522,
29892,
518,
29873,
363,
474,
29892,
260,
297,
26985,
29898,
28502,
1609,
29918,
24667,
1691,
29897,
565,
474,
451,
297,
8340,
29918,
24667,
1691,
2314,
13,
13,
1678,
1596,
29898,
29888,
29915,
7439,
3118,
29901,
426,
2704,
29918,
10492,
29913,
1495,
13,
1678,
1596,
29898,
29888,
29915,
7439,
7803,
29901,
426,
29886,
29918,
10184,
29913,
1495,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
vae-dpc/vae_main.py | lovish1234/TPC | 0 | 1609206 | <filename>vae-dpc/vae_main.py<gh_stars>0
# Self-supervised pretraining using DPC with VAE
import os
import random
import sys
import time
import re
import argparse
import ntpath
import numpy as np
import pickle
from tqdm import tqdm
import copy
# visualization
from tensorboardX import SummaryWriter
import matplotlib.pyplot as plt
plt.switch_backend('agg')
sys.path.append('../tpc') # use same dataset file as TPC
sys.path.append('../utils')
sys.path.append('../utils/diversity_meas')
from div_vae import *
from cvae_model import *
from vrnn_model import *
from dataset_epic import *
from dataset_synthepic import *
from dataset_other import *
from dataset_toy import *
# backbone
from resnet_2d3d import neq_load_customized
# data augmentation methods
from augmentation import *
# collect results
from utils import AverageMeter, save_checkpoint, denorm, calc_topk_accuracy, single_action, get_action_from_frame
import torch
import torch.optim as optim
from torch.utils import data
from torchvision import datasets, models, transforms
from torch import autograd # anomaly detection
from present_matching import *
import copy
# saving log, calculating accuracy etc.
import torchvision.utils as vutils
from train_util import *
torch.backends.cudnn.benchmark = True
parser = argparse.ArgumentParser()
parser.add_argument('--net', default='resnet18', type=str)
parser.add_argument('--dataset', default='k400', type=str, help='k400 / ucf / epic_unlabeled / epic_before / epic_end')
# frame preprocessing
parser.add_argument('--seq_len', default=5, type=int,
help='number of frames in each video block')
parser.add_argument('--num_seq', default=8, type=int,
help='number of video blocks')
parser.add_argument('--pred_step', default=3, type=int)
parser.add_argument('--ds', default=6, type=int,
help='frame downsampling rate')
# optimizer learning rate and decay
parser.add_argument('--batch_size', default=64, type=int)
parser.add_argument('--lr', default=1e-3, type=float, help='learning rate')
parser.add_argument('--wd', default=1e-5, type=float, help='weight decay')
# resume training
parser.add_argument('--resume', default='', type=str,
help='path of model to resume')
parser.add_argument('--pretrain', default='', type=str,
help='path of pretrained model')
parser.add_argument('--epochs', default=300, type=int,
help='number of total epochs to run')
# help in re-setting the lr to appropriate value
parser.add_argument('--start-epoch', default=0, type=int,
help='manual epoch number (useful on restarts)')
# gpu setting
parser.add_argument('--gpu', default='0,1', type=str)
parser.add_argument('--print_freq', default=1, type=int,
help='frequency of printing output during training')
parser.add_argument('--reset_lr', action='store_true',
help='Reset learning rate when resume training?')
parser.add_argument('--prefix', default='conv', type=str,
help='prefix of checkpoint filename')
# which layers to train [ use for fine-tuning ]
parser.add_argument('--train_what', default='all', type=str)
parser.add_argument('--img_dim', default=128, type=int)
# number of sequences sampled from one video in epic and block_toy dataset
parser.add_argument('--num_clips', default=10000, type=int,
help='Number of sequences to sample in total from train_split')
parser.add_argument('--drive', default='ssd', type=str,
help='Type of disk drive training data is located at')
parser.add_argument('--new_augment', action='store_true',
help='Use data augmentation with consistent train-test distortion')
# CVAE / diversity specific parameters
parser.add_argument('--model', default='vrnn', type=str, help='cvae / vrnn / vrnn-i')
parser.add_argument('--cvae_arch', default='conv_e', type=str,
help='Architecture of the CVAE mapping present to future (fc / conv_a / conv_b / conv_c / conv_d / conv_e) (default: conv_e)')
parser.add_argument('--vrnn_latent_size', default=16, type=int,
help='Dimensionality of the VRNN probabilistic latent space')
parser.add_argument('--vrnn_kernel_size', default=1, type=int,
help='Kernel size of all VRNN convolutional layers (prior, enc, dec, rnn)')
parser.add_argument('--vrnn_dropout', default=0.1, type=float,
help='Dropout in RNN for aggregation (GRU cell) (default: 0.1)')
parser.add_argument('--vae_kl_weight', default=1.0, type=float,
help='Base weight factor of KL divergence term in VAE-DPC loss (default: 1.0)')
parser.add_argument('--vae_no_kl_norm', default=False, action='store_true',
help='If True, disable KL loss weight normalization')
parser.add_argument('--vae_encoderless_epochs', default=25, type=int,
help='Number of epochs to train the prediction network deterministically (DPC-like) before enabling the encoder and beta warmup (default: 100)')
parser.add_argument('--vae_inter_kl_epochs', default=25, type=int,
help='Number of epochs to wait after starting the encoder (and training with zero KL loss) before starting beta warmup (default: 50)')
parser.add_argument('--vae_kl_beta_warmup', default=150, type=int,
help='Number of epochs during which to warmup the KL loss term weight from 0% to 100% according to a cosine curve (default: 100)')
parser.add_argument('--pred_divers_wt', default=0.001, type=float,
help='Importance of variance (diversity) in predictions as measured by cosine distance in loss (default: 0.1)')
parser.add_argument('--pred_divers_formula', default='inv',
type=str, help='Use -var (neg) or 1/var (inv) (default: inv)')
parser.add_argument('--test_diversity', default=False, action='store_true',
help='If True, evaluate model by measuring diversity of multiple generated samples. Note: specify pretrained model path as well.')
parser.add_argument('--paths', default=20, type=int,
help='Future paths generated by VAE (default: 20)')
# parser.add_argument('--vrnn_context_noise', default=0.0, type=float,
# help='Add Gaussian noise to input of VRNN decoder for regularization (default: 0)')
# parser.add_argument('--vrnn_time_indep', default=False, action='store_true',
# help='If True, z does not see or influence context (i.e. VRNN becomes CVAE)')
parser.add_argument('--select_best_among', default=1, type=int,
help='[do not use for now] During validation and when the encoder is disabled, generate the specified number of futures in a holistic way, and judge the best performing path only (default = 1).')
parser.add_argument('--force_context_dropout', default=False, action='store_true',
help='If True, use different dropout mask (p = 0.1) on c_t for every path during uncertainty measurements.')
# Present matching parameters
parser.add_argument('--pm_start', default=1000, type=int,
help='Number of epochs present matching kicks in')
parser.add_argument('--pm_freq', default=10, type=int,
help='Frequency of present matching (every 10 epochs by default)')
parser.add_argument('--pm_num_samples', default=100000, type=int,
help='Number of videos sequences to sample during present matching')
parser.add_argument('--pm_num_ngbrs', default=4, type=int,
help='Number of nearest neighbors to put in one batch')
parser.add_argument('--pm_gap_thres', default=30, type=int,
help='Minimum pair-wise frame gap between two sequences in the same batch')
# Action classification custom arguments
# parser.add_argument('--diverse_actions', default=False, action='store_true', help='If True, evaluate model by measuring diversity of multiple generated future samples (labels in action space). Note: specify TEST model path as well.')
# parser.add_argument('--test_path', default='', type=str, help='Path of finetuned model for multimodal action classification')
# parser.add_argument('--class_type', default='verb', type=str) # TODO: support 'both' as well
def main():
# Set constant random state for consistent results
torch.manual_seed(704)
np.random.seed(704)
random.seed(704)
global args
args = parser.parse_args()
os.environ["CUDA_VISIBLE_DEVICES"] = str(args.gpu)
global cuda
cuda = torch.device('cuda')
args.cuda = cuda
### dpc model ###
if args.model == 'cvae':
model = DPC_CVAE(img_dim=args.img_dim,
num_seq=args.num_seq,
seq_len=args.seq_len,
pred_step=args.pred_step,
network=args.net,
cvae_arch=args.cvae_arch)
elif 'vrnn' in args.model:
model = DPC_VRNN(img_dim=args.img_dim,
num_seq=args.num_seq,
seq_len=args.seq_len,
pred_step=args.pred_step,
network=args.net,
latent_size=args.vrnn_latent_size,
kernel_size=args.vrnn_kernel_size,
rnn_dropout=args.vrnn_dropout,
time_indep='-i' in args.model)
else:
raise ValueError('Unknown / wrong model: ' + args.model)
# parallelize the model
model = nn.DataParallel(model)
model = model.to(cuda)
# loss function (change this)
# why cross-entropy, we can take a direct cosine distance instead
criterion = nn.CrossEntropyLoss()
### optimizer ###
# dont' think we need to use 'last' keyword during pre-training anywhere
if args.train_what == 'last':
for name, param in model.module.resnet.named_parameters():
param.requires_grad = False
else:
pass # train all layers
# check if gradient flowing to appropriate layers
print('\n===========Check Grad============')
for name, param in model.named_parameters():
print(name, param.requires_grad)
print('=================================\n')
params = model.parameters()
optimizer = optim.Adam(params, lr=args.lr, weight_decay=args.wd)
args.old_lr = None
best_acc = 0
global iteration
iteration = 0
### restart training ###
if args.resume:
if os.path.isfile(args.resume):
# load the old model and set the learning rate accordingly
# get the old learning rate
args.old_lr = float(re.search('_lr(.+?)_', args.resume).group(1))
print("=> loading resumed checkpoint '{}'".format(args.resume))
#
checkpoint = torch.load(
args.resume, map_location=torch.device('cpu'))
args.start_epoch = checkpoint['epoch']
iteration = checkpoint['iteration']
best_acc = checkpoint['best_acc']
model.load_state_dict(checkpoint['state_dict'])
# load old optimizer, start with the corresponding learning rate
if not args.reset_lr: # if didn't reset lr, load old optimizer
optimizer.load_state_dict(checkpoint['optimizer'])
else:
# reset to new learning rate
print('==== Change lr from %f to %f ====' %
(args.old_lr, args.lr))
print("=> loaded resumed checkpoint '{}' (epoch {})".format(
args.resume, checkpoint['epoch']))
else:
print("[Warning] no checkpoint found at '{}'".format(args.resume))
if args.pretrain:
if os.path.isfile(args.pretrain):
print("=> loading pretrained checkpoint '{}'".format(args.pretrain))
checkpoint = torch.load(
args.pretrain, map_location=torch.device('cpu'))
# neq_load_customized
model = neq_load_customized(model, checkpoint['state_dict'])
print("=> loaded pretrained checkpoint '{}' (epoch {})"
.format(args.pretrain, checkpoint['epoch']))
else:
print("=> no checkpoint found at '{}'".format(args.pretrain))
### load transform & dataset ###
transform_train = get_transform(args, mode = 'train')
transform_val = get_transform(args, mode = 'val')
train_loader = get_data(args, transform_train, 'train')
val_loader = get_data(args, transform_val, 'val')
# setup tools
# Initialize denormalize transform to display input images via tensorboard
de_normalize = denorm()
# Get paths
global img_path
img_path, model_path, divers_path, pm_cache = set_path(args)
global writer_train
if not(args.test_diversity):
# Train & validate for multiple epochs
# book-keeping
writer_val_enc = SummaryWriter(os.path.join(img_path, 'val_enc'))
writer_val_noenc = SummaryWriter(os.path.join(img_path, 'val_noenc'))
writer_val_pm_enc = SummaryWriter(os.path.join(img_path, 'val_pm_enc'))
writer_val_pm_noenc = SummaryWriter(os.path.join(img_path, 'val_pm_noenc'))
writer_train = SummaryWriter(os.path.join(img_path, 'train'))
global cur_vae_kl_weight, cur_pred_divers_wt
### main loop ###
for epoch in range(args.start_epoch, args.epochs):
# Initially train without latent space if specified
if epoch < args.vae_encoderless_epochs:
train_with_latent = False
cur_pred_divers_wt = 0.0 # encouraging diversity doesn't apply right now
else:
train_with_latent = True
cur_pred_divers_wt = args.pred_divers_wt # hard transition
print('Encoder enabled for training this epoch:', train_with_latent)
# Then train for a while with beta = 0 (not explicitly coded)
# Beta warmup = VAE KL loss weight adjustment over time
if train_with_latent:
epoch_post = epoch - (args.vae_encoderless_epochs + args.vae_inter_kl_epochs)
if epoch_post < 0:
cur_vae_kl_weight = 0.0
elif 0 <= epoch_post and epoch_post < args.vae_kl_beta_warmup:
cur_vae_kl_weight = args.vae_kl_weight * \
(1.0 - np.cos(epoch_post / args.vae_kl_beta_warmup * np.pi)) / 2
else:
cur_vae_kl_weight = args.vae_kl_weight
else:
cur_vae_kl_weight = 0.0
print('Current VAE KL loss term weight:', cur_vae_kl_weight)
if epoch < args.pm_start:
print('\n\nTraining with randomly sampled sequences from %s' %
args.dataset)
train_loss_dpc, train_loss_kl, train_loss_divers, train_loss, train_acc, train_accuracy_list = train(
train_loader, model, optimizer, epoch, criterion, writer_train, args, de_normalize,
cur_vae_kl_weight, cur_pred_divers_wt, do_encode=train_with_latent)
else:
# change torch multithreading setting to circumvent 'open files' limit
torch.multiprocessing.set_sharing_strategy('file_system')
print('\n\nTraining with matched sequences (nearest neighbours) from %s\n\n' % args.dataset)
if epoch % args.pm_freq == 0:
print(' ######################################## \n Matching sequences in embedding space... \n ########################################\n\n')
# present matching and save results for future training
present_matching(args, model, pm_cache, epoch, 'train')
present_matching(args, model, pm_cache, epoch, 'val')
args_pm = copy.copy(args)
args_pm.dataset = 'epic_present_matching'
pm_path = os.path.join(pm_cache, 'epoch_train_%d' % (
epoch - epoch % args_pm.pm_freq)) # retrieve last present matching results
train_loader_pm = get_data(
args_pm, transform_train, mode='train', pm_path=pm_path, epoch=epoch)
train_loss_dpc, train_loss_kl, train_loss_divers, train_loss, train_acc, train_accuracy_list = train(
train_loader_pm, model, optimizer, epoch, criterion, writer_train, args, de_normalize,
cur_vae_kl_weight, cur_pred_divers_wt, do_encode=train_with_latent)
del train_loader_pm
pm_path = os.path.join(pm_cache, 'epoch_val_%d' % (
epoch - epoch % args_pm.pm_freq)) # retrieve last present matching results
val_loader_pm = get_data(
args_pm, transform_val, mode='val', pm_path=pm_path, epoch=epoch)
val_loss_dpc_pm_enc, val_loss_kl_pm_enc, val_loss_divers_pm_enc, \
val_loss_pm_enc, val_acc_pm_enc, val_acc_pm_enc_list = validate(
val_loader_pm, model, epoch, args, criterion, cur_vae_kl_weight,
cur_pred_divers_wt, do_encode=train_with_latent,
select_best_among=1 if train_with_latent else args.select_best_among) # only one path when encoding
val_loss_dpc_pm_noenc, val_loss_kl_pm_noenc, val_loss_divers_pm_noenc, \
val_loss_pm_noenc, val_acc_pm_noenc, val_acc_pm_noenc_list = validate(
val_loader_pm, model, epoch, args, criterion, cur_vae_kl_weight,
cur_pred_divers_wt, do_encode=False, select_best_among=args.select_best_among)
del val_loader_pm
val_loss_dpc_enc, val_loss_kl_enc, val_loss_divers_enc, \
val_loss_enc, val_acc_enc, val_acc_enc_list = validate(
val_loader, model, epoch, args, criterion, cur_vae_kl_weight,
cur_pred_divers_wt, do_encode=train_with_latent,
select_best_among=1 if train_with_latent else args.select_best_among) # only one path when encoding
val_loss_dpc_noenc, val_loss_kl_noenc, val_loss_divers_noenc, \
val_loss_noenc, val_acc_noenc, val_acc_noenc_list = validate(
val_loader, model, epoch, args, criterion, cur_vae_kl_weight,
cur_pred_divers_wt, do_encode=False, select_best_among=args.select_best_among)
# Train curves
writer_train.add_scalar('global/loss_dpc', train_loss_dpc, epoch)
writer_train.add_scalar('global/loss_vae_kl', train_loss_kl, epoch)
writer_train.add_scalar('global/loss_vae_divers', train_loss_divers, epoch)
writer_train.add_scalar('global/loss', train_loss, epoch)
writer_train.add_scalar('global/vae_kl_weight', cur_vae_kl_weight, epoch)
writer_train.add_scalar('global/accuracy', train_acc, epoch)
# Val curves
writer_val_enc.add_scalar('global/loss_dpc', val_loss_dpc_enc, epoch)
writer_val_enc.add_scalar('global/loss_vae_kl', val_loss_kl_enc, epoch)
writer_val_enc.add_scalar('global/loss_vae_divers', val_loss_divers_enc, epoch)
writer_val_enc.add_scalar('global/loss', val_loss_enc, epoch)
writer_val_enc.add_scalar('global/accuracy', val_acc_enc, epoch)
writer_val_noenc.add_scalar('global/loss_dpc', val_loss_dpc_noenc, epoch)
writer_val_noenc.add_scalar('global/loss_vae_kl', val_loss_kl_noenc, epoch)
writer_val_noenc.add_scalar('global/loss_vae_divers', val_loss_divers_noenc, epoch)
writer_val_noenc.add_scalar('global/loss', val_loss_noenc, epoch)
writer_val_noenc.add_scalar('global/accuracy', val_acc_noenc, epoch)
if epoch >= args.pm_start:
# Add present matching curves
writer_val_pm_enc.add_scalar('global/loss_dpc', val_loss_dpc_pm_enc, epoch)
writer_val_pm_enc.add_scalar('global/loss_vae_kl', val_loss_kl_pm_enc, epoch)
writer_val_pm_enc.add_scalar('global/loss_vae_divers', val_loss_divers_pm_enc, epoch)
writer_val_pm_enc.add_scalar('global/loss', val_loss_pm_enc, epoch)
writer_val_pm_enc.add_scalar('global/accuracy', val_acc_pm_enc, epoch)
writer_val_pm_noenc.add_scalar('global/loss_dpc', val_loss_dpc_pm_noenc, epoch)
writer_val_pm_noenc.add_scalar('global/loss_vae_kl', val_loss_kl_pm_noenc, epoch)
writer_val_pm_noenc.add_scalar('global/loss_vae_divers', val_loss_divers_pm_noenc, epoch)
writer_val_pm_noenc.add_scalar('global/loss', val_loss_pm_noenc, epoch)
writer_val_pm_noenc.add_scalar('global/accuracy', val_acc_pm_noenc, epoch)
# Train accuracies
writer_train.add_scalar('accuracy/top1', train_accuracy_list[0], epoch)
writer_train.add_scalar('accuracy/top3', train_accuracy_list[1], epoch)
writer_train.add_scalar('accuracy/top5', train_accuracy_list[2], epoch)
# Val accuracies
writer_val_noenc.add_scalar('accuracy/top1', val_acc_noenc_list[0], epoch)
writer_val_noenc.add_scalar('accuracy/top3', val_acc_noenc_list[1], epoch)
writer_val_noenc.add_scalar('accuracy/top5', val_acc_noenc_list[2], epoch)
writer_val_enc.add_scalar('accuracy/top1', val_acc_enc_list[0], epoch)
writer_val_enc.add_scalar('accuracy/top3', val_acc_enc_list[1], epoch)
writer_val_enc.add_scalar('accuracy/top5', val_acc_enc_list[2], epoch)
if epoch >= args.pm_start:
# Add present matching curves
writer_val_pm_noenc.add_scalar('accuracy/top1', val_acc_pm_noenc_list[0], epoch)
writer_val_pm_noenc.add_scalar('accuracy/top3', val_acc_pm_noenc_list[1], epoch)
writer_val_pm_noenc.add_scalar('accuracy/top5', val_acc_pm_noenc_list[2], epoch)
writer_val_pm_enc.add_scalar('accuracy/top1', val_acc_pm_enc_list[0], epoch)
writer_val_pm_enc.add_scalar('accuracy/top3', val_acc_pm_enc_list[1], epoch)
writer_val_pm_enc.add_scalar('accuracy/top5', val_acc_pm_enc_list[2], epoch)
# save check_point (best accuracy measured without encoder)
is_best = val_acc_noenc > best_acc
best_acc = max(val_acc_noenc, best_acc)
save_checkpoint({'epoch': epoch + 1,
'net': args.net,
'state_dict': model.state_dict(),
'best_acc': best_acc,
'optimizer': optimizer.state_dict(),
'iteration': iteration},
is_best, filename=os.path.join(model_path, 'epoch%s.pth.tar' % str(epoch + 1)), save_every=10)
print('Training from ep %d to ep %d finished' %
(args.start_epoch, args.epochs))
else:
# Uncertainty evaluation: full video & no color adjustments
# NOTE: be careful with training augmentation to prevent train-test resolution / scaling discrepancy
tf_diversity = transforms.Compose([
RandomHorizontalFlip(consistent=True),
CenterCrop(224),
Scale(size=(args.img_dim, args.img_dim)),
ToTensor(),
Normalize()
])
print('Measuring diversity of generated samples...')
val_divers_loader = get_data(args, tf_diversity, 'val')
results = measure_vae_uncertainty_loader(val_divers_loader, model, args.paths,
print_freq=args.print_freq, collect_actions=False,
force_context_dropout=args.force_context_dropout)
cur_path = os.path.join(divers_path, 'epoch' + str(checkpoint['epoch']) + \
'_paths' + str(args.paths) + \
('_ctdrop' if args.force_context_dropout else '') + '.p')
with open(cur_path, 'wb') as f:
pickle.dump(results, f)
print('For future use, uncertainty evaluation results stored to ' + cur_path)
def process_output(mask):
'''task mask as input, compute the target for contrastive loss'''
# dot product is computed in parallel gpus, so get less easy neg, bounded by batch size in each gpu'''
# mask meaning: -2: omit, -1: temporal neg (hard), 0: easy neg, 1: pos, -3: spatial neg
# [4, 3, 16, 4, 3, 16]
# B and B2 must be same always ??
(B, NP, SQ, B2, NS, _) = mask.size() # [B, P, SQ, B, N, SQ]
#print (B,B2,NS,NP,SQ)
# mark out the positives
# not using temporal negatives and spatial negatives differently
target = mask == 1
target.requires_grad = False
return target, (B, B2, NS, NP, SQ)
def loss_kl_divergence(mu, logvar, normalization=True):
'''
Calculates KL divergence loss term for CVAE.
mu, logvar: from one item within minibatch, same size as latent space.
NOTE: normalization enabled by default as of 05/27, divides by batch_size * pred_step.
'''
# mu and logvar are probably many-dimensional, but this code is agnostic of that
loss = -0.5 * torch.sum(1 + logvar - mu.pow(2) - logvar.exp())
if normalization:
loss /= (mu.shape[0] * mu.shape[1])
return loss
def loss_kl_divergence_prior(mu_prio, mu_post, logvar_prio, logvar_post, normalization=True):
'''
Calculates KL divergence loss term for VRNN.
all arguments: from one item within minibatch, same size as latent space.
NOTE: normalization enabled by default as of 05/27, divides by batch_size * pred_step.
'''
std_prio = logvar_prio.mul(0.5).exp()
std_post = logvar_post.mul(0.5).exp()
loss = -0.5 * torch.sum(1 + logvar_post - logvar_prio - (std_post.pow(2) + (mu_post - mu_prio).pow(2)) / std_prio.pow(2))
if normalization:
loss /= (mu_prio.shape[0] * mu_prio.shape[1])
return loss
def loss_pred_variance(pred_cos_sim, latent_dist, pred_divers_formula):
'''
Calculates diversity loss term for CVAE and VRNN.
pred_cos_sim: cosine similarity of one pair, from one item within minibatch and one time step.
latent_dist: L2 distance between latent vectors that generated the pair.
As of 05/20, multiply by latent_dist.
'''
# pred_cos_sim is tensor with a cosine distance from a random pair
# lower is better; typical variance range was [0.999990, 0.999998] if not encouraged (old model)
# mean_cos_sim = pred_cos_sim.mean() # across time steps
# TODO: normalize by latent_dist? what about mode collapse in prior?
delta = 1.0 - pred_cos_sim
if pred_divers_formula == 'neg':
loss = -delta
elif pred_divers_formula in ['div', 'inv']:
# causes diminishing returns for larger variance
loss = 1.0 / (delta + 1e-6)
else:
raise Exception('Unknown diversity loss formula: ', pred_divers_formula)
loss *= latent_dist.detach() / 5.0 # typical L2 between 8/16-dim randn x, y
return loss
if __name__ == '__main__':
main()
| [
1,
529,
9507,
29958,
1564,
29872,
29899,
6099,
29883,
29914,
1564,
29872,
29918,
3396,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
21782,
29899,
9136,
11292,
758,
26495,
773,
360,
9026,
411,
478,
16036,
13,
13,
5215,
2897,
13,
5215,
4036,
13,
5215,
10876,
13,
5215,
931,
13,
5215,
337,
13,
5215,
1852,
5510,
13,
5215,
302,
29873,
2084,
13,
5215,
12655,
408,
7442,
13,
5215,
5839,
280,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
5215,
3509,
13,
13,
29937,
7604,
2133,
13,
3166,
12489,
3377,
29990,
1053,
6991,
5219,
10507,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
572,
29873,
29889,
15123,
29918,
27852,
877,
16170,
1495,
13,
13,
9675,
29889,
2084,
29889,
4397,
877,
6995,
29873,
6739,
1495,
29871,
396,
671,
1021,
8783,
934,
408,
323,
9026,
13,
9675,
29889,
2084,
29889,
4397,
877,
6995,
13239,
1495,
13,
9675,
29889,
2084,
29889,
4397,
877,
6995,
13239,
29914,
29881,
24974,
29918,
1004,
294,
1495,
13,
3166,
1933,
29918,
1564,
29872,
1053,
334,
13,
3166,
274,
1564,
29872,
29918,
4299,
1053,
334,
13,
3166,
11723,
15755,
29918,
4299,
1053,
334,
13,
3166,
8783,
29918,
1022,
293,
1053,
334,
13,
3166,
8783,
29918,
29879,
3903,
354,
16447,
1053,
334,
13,
3166,
8783,
29918,
1228,
1053,
334,
13,
3166,
8783,
29918,
517,
29891,
1053,
334,
13,
13,
29937,
1250,
15933,
13,
3166,
620,
1212,
29918,
29906,
29881,
29941,
29881,
1053,
452,
29939,
29918,
1359,
29918,
6341,
1891,
13,
13,
29937,
848,
18765,
362,
3519,
13,
3166,
18765,
362,
1053,
334,
13,
13,
29937,
6314,
2582,
13,
3166,
3667,
29879,
1053,
319,
19698,
29924,
1308,
29892,
4078,
29918,
3198,
3149,
29892,
972,
555,
29892,
22235,
29918,
3332,
29895,
29918,
562,
2764,
4135,
29892,
2323,
29918,
2467,
29892,
679,
29918,
2467,
29918,
3166,
29918,
2557,
13,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
20640,
408,
5994,
13,
3166,
4842,
305,
29889,
13239,
1053,
848,
13,
3166,
4842,
305,
4924,
1053,
20035,
29892,
4733,
29892,
4327,
29879,
13,
3166,
4842,
305,
1053,
1120,
468,
3665,
29871,
396,
29342,
14997,
15326,
13,
3166,
2198,
29918,
4352,
292,
1053,
334,
13,
5215,
3509,
13,
13,
29937,
14238,
1480,
29892,
25202,
13600,
2992,
29889,
13,
5215,
4842,
305,
4924,
29889,
13239,
408,
325,
13239,
13,
13,
3166,
7945,
29918,
4422,
1053,
334,
13,
13,
7345,
305,
29889,
1627,
1975,
29889,
29883,
566,
15755,
29889,
1785,
16580,
353,
5852,
13,
13,
16680,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1212,
742,
2322,
2433,
690,
1212,
29896,
29947,
742,
1134,
29922,
710,
29897,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
24713,
742,
2322,
2433,
29895,
29946,
29900,
29900,
742,
1134,
29922,
710,
29892,
1371,
2433,
29895,
29946,
29900,
29900,
847,
318,
6854,
847,
9358,
293,
29918,
348,
29880,
24025,
847,
9358,
293,
29918,
11083,
847,
9358,
293,
29918,
355,
1495,
13,
13,
29937,
3515,
758,
19170,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
11762,
29918,
2435,
742,
2322,
29922,
29945,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
4537,
310,
16608,
297,
1269,
4863,
2908,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1949,
29918,
11762,
742,
2322,
29922,
29947,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
4537,
310,
4863,
10930,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
11965,
29918,
10568,
742,
2322,
29922,
29941,
29892,
1134,
29922,
524,
29897,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
6289,
742,
2322,
29922,
29953,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
2557,
1623,
13445,
10335,
6554,
1495,
13,
13,
29937,
5994,
3950,
6509,
6554,
322,
20228,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
16175,
29918,
2311,
742,
2322,
29922,
29953,
29946,
29892,
1134,
29922,
524,
29897,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
29212,
742,
2322,
29922,
29896,
29872,
29899,
29941,
29892,
1134,
29922,
7411,
29892,
1371,
2433,
21891,
6554,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
9970,
742,
2322,
29922,
29896,
29872,
29899,
29945,
29892,
1134,
29922,
7411,
29892,
1371,
2433,
7915,
20228,
1495,
13,
13,
29937,
620,
2017,
6694,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
690,
2017,
742,
2322,
2433,
742,
1134,
29922,
710,
29892,
13,
462,
1678,
1371,
2433,
2084,
310,
1904,
304,
620,
2017,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1457,
14968,
742,
2322,
2433,
742,
1134,
29922,
710,
29892,
13,
462,
1678,
1371,
2433,
2084,
310,
758,
3018,
1312,
1904,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1022,
2878,
29879,
742,
2322,
29922,
29941,
29900,
29900,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
4537,
310,
3001,
21502,
12168,
304,
1065,
1495,
13,
13,
29937,
1371,
297,
337,
29899,
26740,
278,
301,
29878,
304,
8210,
995,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
2962,
29899,
1022,
2878,
742,
2322,
29922,
29900,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
11288,
21502,
305,
1353,
313,
1509,
1319,
373,
1791,
5708,
29897,
1495,
13,
13,
29937,
330,
3746,
4444,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
29887,
3746,
742,
2322,
2433,
29900,
29892,
29896,
742,
1134,
29922,
710,
29897,
13,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
2158,
29918,
29888,
7971,
742,
2322,
29922,
29896,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
10745,
23860,
310,
14010,
1962,
2645,
6694,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
12071,
29918,
29212,
742,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
1678,
1371,
2433,
27175,
6509,
6554,
746,
620,
2017,
6694,
29973,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
13506,
742,
2322,
2433,
20580,
742,
1134,
29922,
710,
29892,
13,
462,
1678,
1371,
2433,
13506,
310,
1423,
3149,
10422,
1495,
13,
13,
29937,
607,
15359,
304,
7945,
518,
671,
363,
2691,
29899,
29873,
27964,
4514,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
14968,
29918,
5816,
742,
2322,
2433,
497,
742,
1134,
29922,
710,
29897,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
2492,
29918,
6229,
742,
2322,
29922,
29896,
29906,
29947,
29892,
1134,
29922,
524,
29897,
13,
13,
29937,
1353,
310,
15602,
4559,
29881,
515,
697,
4863,
297,
9358,
293,
322,
2908,
29918,
517,
29891,
8783,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1949,
29918,
11303,
567,
742,
2322,
29922,
29896,
29900,
29900,
29900,
29900,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
4557,
310,
15602,
304,
4559,
297,
3001,
515,
7945,
29918,
5451,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
21594,
742,
2322,
2433,
893,
29881,
742,
1134,
29922,
710,
29892,
13,
462,
1678,
1371,
2433,
1542,
310,
8086,
7899,
6694,
848,
338,
5982,
472,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1482,
29918,
2987,
358,
742,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
1678,
1371,
2433,
11403,
848,
18765,
362,
411,
13747,
7945,
29899,
1688,
1320,
441,
291,
1495,
13,
13,
29937,
25778,
16036,
847,
6894,
537,
2702,
4128,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
4299,
742,
2322,
2433,
13416,
15755,
742,
1134,
29922,
710,
29892,
1371,
2433,
29883,
1564,
29872,
847,
11723,
15755,
847,
11723,
15755,
29899,
29875,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
29883,
1564,
29872,
29918,
1279,
742,
2322,
2433,
20580,
29918,
29872,
742,
1134,
29922,
710,
29892,
13,
462,
1678,
1371,
2433,
13197,
14819,
310,
278,
25778,
16036,
10417,
2198,
304,
5434,
313,
13801,
847,
7602,
29918,
29874,
847,
7602,
29918,
29890,
847,
7602,
29918,
29883,
847,
7602,
29918,
29881,
847,
7602,
29918,
29872,
29897,
313,
4381,
29901,
7602,
29918,
29872,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
13416,
15755,
29918,
5066,
296,
29918,
2311,
742,
2322,
29922,
29896,
29953,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
16142,
8180,
537,
310,
278,
478,
29934,
10262,
23950,
4695,
3405,
296,
2913,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
13416,
15755,
29918,
17460,
29918,
2311,
742,
2322,
29922,
29896,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
29968,
5851,
2159,
310,
599,
478,
29934,
10262,
26851,
284,
15359,
313,
29886,
13479,
29892,
2094,
29892,
1602,
29892,
364,
15755,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
13416,
15755,
29918,
8865,
449,
742,
2322,
29922,
29900,
29889,
29896,
29892,
1134,
29922,
7411,
29892,
13,
462,
1678,
1371,
2433,
15063,
449,
297,
390,
10262,
363,
11404,
362,
313,
14345,
29965,
3038,
29897,
313,
4381,
29901,
29871,
29900,
29889,
29896,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1564,
29872,
29918,
6321,
29918,
7915,
742,
2322,
29922,
29896,
29889,
29900,
29892,
1134,
29922,
7411,
29892,
13,
462,
1678,
1371,
2433,
5160,
7688,
7329,
310,
476,
29931,
17089,
10238,
1840,
297,
478,
16036,
29899,
29928,
9026,
6410,
313,
4381,
29901,
29871,
29896,
29889,
29900,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1564,
29872,
29918,
1217,
29918,
6321,
29918,
12324,
742,
2322,
29922,
8824,
29892,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
1678,
1371,
2433,
3644,
5852,
29892,
11262,
476,
29931,
6410,
7688,
4226,
2133,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1564,
29872,
29918,
3977,
6119,
2222,
29918,
1022,
2878,
29879,
742,
2322,
29922,
29906,
29945,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
4557,
310,
21502,
12168,
304,
7945,
278,
18988,
3564,
11806,
391,
1711,
313,
29928,
9026,
29899,
4561,
29897,
1434,
427,
17961,
278,
2094,
6119,
322,
21762,
14294,
786,
313,
4381,
29901,
29871,
29896,
29900,
29900,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1564,
29872,
29918,
1639,
29918,
6321,
29918,
1022,
2878,
29879,
742,
2322,
29922,
29906,
29945,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
4557,
310,
21502,
12168,
304,
4480,
1156,
6257,
278,
2094,
6119,
313,
392,
6694,
411,
5225,
476,
29931,
6410,
29897,
1434,
6257,
21762,
14294,
786,
313,
4381,
29901,
29871,
29945,
29900,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1564,
29872,
29918,
6321,
29918,
3571,
29918,
29893,
2817,
786,
742,
2322,
29922,
29896,
29945,
29900,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
4557,
310,
21502,
12168,
2645,
607,
304,
14294,
786,
278,
476,
29931,
6410,
1840,
7688,
515,
29871,
29900,
29995,
304,
29871,
29896,
29900,
29900,
29995,
5034,
304,
263,
6776,
457,
11672,
313,
4381,
29901,
29871,
29896,
29900,
29900,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
11965,
29918,
29881,
1536,
29918,
14554,
742,
2322,
29922,
29900,
29889,
29900,
29900,
29896,
29892,
1134,
29922,
7411,
29892,
13,
462,
1678,
1371,
2433,
17518,
749,
310,
20162,
313,
29881,
24974,
29897,
297,
27303,
408,
17005,
491,
6776,
457,
5418,
297,
6410,
313,
4381,
29901,
29871,
29900,
29889,
29896,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
11965,
29918,
29881,
1536,
29918,
689,
2497,
742,
2322,
2433,
11569,
742,
13,
462,
1678,
1134,
29922,
710,
29892,
1371,
2433,
11403,
448,
1707,
313,
10052,
29897,
470,
29871,
29896,
29914,
1707,
313,
11569,
29897,
313,
4381,
29901,
2437,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1688,
29918,
29881,
24974,
742,
2322,
29922,
8824,
29892,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
1678,
1371,
2433,
3644,
5852,
29892,
14707,
1904,
491,
7540,
3864,
6894,
537,
310,
2999,
5759,
11916,
29889,
3940,
29901,
6084,
758,
3018,
1312,
1904,
2224,
408,
1532,
29889,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
24772,
742,
2322,
29922,
29906,
29900,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
20154,
10898,
5759,
491,
478,
16036,
313,
4381,
29901,
29871,
29906,
29900,
29897,
1495,
13,
29937,
13812,
29889,
1202,
29918,
23516,
877,
489,
13416,
15755,
29918,
4703,
29918,
1217,
895,
742,
2322,
29922,
29900,
29889,
29900,
29892,
1134,
29922,
7411,
29892,
13,
29937,
462,
268,
1371,
2433,
2528,
22477,
11462,
304,
1881,
310,
478,
29934,
10262,
1602,
6119,
363,
4943,
2133,
313,
4381,
29901,
29871,
29900,
29897,
1495,
13,
29937,
13812,
29889,
1202,
29918,
23516,
877,
489,
13416,
15755,
29918,
2230,
29918,
262,
2716,
742,
2322,
29922,
8824,
29892,
3158,
2433,
8899,
29918,
3009,
742,
13,
29937,
462,
268,
1371,
2433,
3644,
5852,
29892,
503,
947,
451,
1074,
470,
9949,
3030,
313,
29875,
29889,
29872,
29889,
478,
29934,
10262,
7415,
25778,
16036,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
2622,
29918,
13318,
29918,
314,
549,
742,
2322,
29922,
29896,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
29961,
1867,
451,
671,
363,
1286,
29962,
7133,
8845,
322,
746,
278,
2094,
6119,
338,
12708,
29892,
5706,
278,
6790,
1353,
310,
3105,
1973,
297,
263,
8753,
4695,
982,
29892,
322,
16833,
278,
1900,
15859,
2224,
871,
313,
4381,
353,
29871,
29896,
467,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
10118,
29918,
4703,
29918,
8865,
449,
742,
2322,
29922,
8824,
29892,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
1678,
1371,
2433,
3644,
5852,
29892,
671,
1422,
5768,
449,
11105,
313,
29886,
353,
29871,
29900,
29889,
29896,
29897,
373,
274,
29918,
29873,
363,
1432,
2224,
2645,
25812,
20398,
29889,
1495,
13,
13,
29937,
4360,
296,
9686,
4128,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
3358,
29918,
2962,
742,
2322,
29922,
29896,
29900,
29900,
29900,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
4557,
310,
21502,
12168,
2198,
9686,
413,
7358,
297,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
3358,
29918,
29888,
7971,
742,
2322,
29922,
29896,
29900,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
23923,
23860,
310,
2198,
9686,
313,
17991,
29871,
29896,
29900,
21502,
12168,
491,
2322,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
3358,
29918,
1949,
29918,
27736,
742,
2322,
29922,
29896,
29900,
29900,
29900,
29900,
29900,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
4557,
310,
19707,
15602,
304,
4559,
2645,
2198,
9686,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
3358,
29918,
1949,
29918,
865,
1182,
29879,
742,
2322,
29922,
29946,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
4557,
310,
20471,
22092,
943,
304,
1925,
297,
697,
9853,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
3358,
29918,
29887,
481,
29918,
386,
690,
742,
2322,
29922,
29941,
29900,
29892,
1134,
29922,
524,
29892,
13,
462,
1678,
1371,
2433,
8140,
12539,
5101,
29899,
3538,
3515,
17261,
1546,
1023,
15602,
297,
278,
1021,
9853,
1495,
13,
13,
29937,
9123,
12965,
2888,
6273,
13,
29937,
13812,
29889,
1202,
29918,
23516,
877,
489,
29881,
12193,
29918,
7387,
742,
2322,
29922,
8824,
29892,
3158,
2433,
8899,
29918,
3009,
742,
1371,
2433,
3644,
5852,
29892,
14707,
1904,
491,
7540,
3864,
6894,
537,
310,
2999,
5759,
5434,
11916,
313,
21134,
297,
3158,
2913,
467,
3940,
29901,
6084,
17067,
1254,
1904,
2224,
408,
1532,
29889,
1495,
13,
29937,
13812,
29889,
1202,
29918,
23516,
877,
489,
1688,
29918,
2084,
742,
2322,
2433,
742,
1134,
29922,
710,
29892,
1371,
2433,
2605,
310,
1436,
300,
348,
287,
1904,
363,
1773,
326,
397,
284,
3158,
12965,
1495,
13,
29937,
13812,
29889,
1202,
29918,
23516,
877,
489,
1990,
29918,
1853,
742,
2322,
2433,
18248,
742,
1134,
29922,
710,
29897,
396,
14402,
29901,
2304,
525,
20313,
29915,
408,
1532,
13,
13,
13,
1753,
1667,
7295,
13,
13,
1678,
396,
3789,
4868,
4036,
2106,
363,
13747,
2582,
13,
1678,
4842,
305,
29889,
11288,
29918,
26776,
29898,
29955,
29900,
29946,
29897,
13,
1678,
7442,
29889,
8172,
29889,
26776,
29898,
29955,
29900,
29946,
29897,
13,
1678,
4036,
29889,
26776,
29898,
29955,
29900,
29946,
29897,
13,
13,
1678,
5534,
6389,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
2897,
29889,
21813,
3366,
29907,
29965,
7698,
29918,
28607,
8979,
1307,
29918,
2287,
29963,
2965,
2890,
3108,
353,
851,
29898,
5085,
29889,
29887,
3746,
29897,
13,
1678,
5534,
274,
6191,
13,
1678,
274,
6191,
353,
4842,
305,
29889,
10141,
877,
29883,
6191,
1495,
13,
1678,
6389,
29889,
29883,
6191,
353,
274,
6191,
13,
13,
1678,
835,
270,
6739,
1904,
835,
13,
1678,
565,
6389,
29889,
4299,
1275,
525,
29883,
1564,
29872,
2396,
13,
4706,
1904,
353,
360,
9026,
29918,
15633,
16036,
29898,
2492,
29918,
6229,
29922,
5085,
29889,
2492,
29918,
6229,
29892,
13,
462,
308,
954,
29918,
11762,
29922,
5085,
29889,
1949,
29918,
11762,
29892,
13,
462,
308,
19359,
29918,
2435,
29922,
5085,
29889,
11762,
29918,
2435,
29892,
13,
462,
308,
4450,
29918,
10568,
29922,
5085,
29889,
11965,
29918,
10568,
29892,
13,
462,
308,
3564,
29922,
5085,
29889,
1212,
29892,
13,
462,
308,
274,
1564,
29872,
29918,
1279,
29922,
5085,
29889,
29883,
1564,
29872,
29918,
1279,
29897,
13,
1678,
25342,
525,
13416,
15755,
29915,
297,
6389,
29889,
4299,
29901,
13,
4706,
1904,
353,
360,
9026,
29918,
29963,
29934,
10262,
29898,
2492,
29918,
6229,
29922,
5085,
29889,
2492,
29918,
6229,
29892,
13,
462,
308,
954,
29918,
11762,
29922,
5085,
29889,
1949,
29918,
11762,
29892,
13,
462,
308,
19359,
29918,
2435,
29922,
5085,
29889,
11762,
29918,
2435,
29892,
13,
462,
308,
4450,
29918,
10568,
29922,
5085,
29889,
11965,
29918,
10568,
29892,
13,
462,
308,
3564,
29922,
5085,
29889,
1212,
29892,
13,
462,
308,
3405,
296,
29918,
2311,
29922,
5085,
29889,
13416,
15755,
29918,
5066,
296,
29918,
2311,
29892,
13,
462,
308,
8466,
29918,
2311,
29922,
5085,
29889,
13416,
15755,
29918,
17460,
29918,
2311,
29892,
13,
462,
308,
364,
15755,
29918,
8865,
449,
29922,
5085,
29889,
13416,
15755,
29918,
8865,
449,
29892,
13,
462,
308,
931,
29918,
262,
2716,
2433,
29899,
29875,
29915,
297,
6389,
29889,
4299,
29897,
13,
1678,
1683,
29901,
13,
4706,
12020,
7865,
2392,
877,
14148,
847,
2743,
1904,
29901,
525,
718,
6389,
29889,
4299,
29897,
13,
13,
1678,
396,
8943,
675,
278,
1904,
13,
1678,
1904,
353,
302,
29876,
29889,
1469,
2177,
6553,
29898,
4299,
29897,
13,
1678,
1904,
353,
1904,
29889,
517,
29898,
29883,
6191,
29897,
13,
13,
1678,
396,
6410,
740,
313,
3167,
445,
29897,
13,
1678,
396,
2020,
4891,
29899,
296,
14441,
29892,
591,
508,
2125,
263,
1513,
6776,
457,
5418,
2012,
13,
1678,
28770,
291,
353,
302,
29876,
29889,
29907,
2124,
5292,
14441,
29931,
2209,
580,
13,
13,
1678,
835,
5994,
3950,
835,
13,
1678,
396,
4555,
29915,
1348,
591,
817,
304,
671,
525,
4230,
29915,
13553,
2645,
758,
29899,
26495,
12214,
13,
1678,
565,
6389,
29889,
14968,
29918,
5816,
1275,
525,
4230,
2396,
13,
4706,
363,
1024,
29892,
1828,
297,
1904,
29889,
5453,
29889,
690,
1212,
29889,
17514,
29918,
16744,
7295,
13,
9651,
1828,
29889,
276,
339,
2658,
29918,
5105,
353,
7700,
13,
1678,
1683,
29901,
13,
4706,
1209,
29871,
396,
7945,
599,
15359,
13,
13,
1678,
396,
1423,
565,
16030,
4972,
292,
304,
8210,
15359,
13,
1678,
1596,
28909,
29876,
4936,
25512,
5596,
19295,
4936,
2751,
1495,
13,
1678,
363,
1024,
29892,
1828,
297,
1904,
29889,
17514,
29918,
16744,
7295,
13,
4706,
1596,
29898,
978,
29892,
1828,
29889,
276,
339,
2658,
29918,
5105,
29897,
13,
1678,
1596,
877,
9166,
9166,
2013,
29876,
1495,
13,
13,
1678,
8636,
353,
1904,
29889,
16744,
580,
13,
1678,
5994,
3950,
353,
5994,
29889,
3253,
314,
29898,
7529,
29892,
301,
29878,
29922,
5085,
29889,
29212,
29892,
7688,
29918,
7099,
388,
29922,
5085,
29889,
9970,
29897,
13,
1678,
6389,
29889,
1025,
29918,
29212,
353,
6213,
13,
13,
1678,
1900,
29918,
5753,
353,
29871,
29900,
13,
1678,
5534,
12541,
13,
1678,
12541,
353,
29871,
29900,
13,
13,
1678,
835,
10715,
6694,
835,
13,
1678,
565,
6389,
29889,
690,
2017,
29901,
13,
4706,
565,
2897,
29889,
2084,
29889,
275,
1445,
29898,
5085,
29889,
690,
2017,
1125,
13,
9651,
396,
2254,
278,
2030,
1904,
322,
731,
278,
6509,
6554,
16205,
13,
13,
9651,
396,
679,
278,
2030,
6509,
6554,
13,
9651,
6389,
29889,
1025,
29918,
29212,
353,
5785,
29898,
276,
29889,
4478,
877,
29918,
29212,
11891,
29974,
7897,
29918,
742,
6389,
29889,
690,
2017,
467,
2972,
29898,
29896,
876,
13,
9651,
1596,
703,
4261,
8363,
620,
21571,
1423,
3149,
525,
8875,
29915,
1642,
4830,
29898,
5085,
29889,
690,
2017,
876,
13,
13,
9651,
396,
13,
9651,
1423,
3149,
353,
4842,
305,
29889,
1359,
29898,
13,
18884,
6389,
29889,
690,
2017,
29892,
2910,
29918,
5479,
29922,
7345,
305,
29889,
10141,
877,
21970,
8785,
13,
9651,
6389,
29889,
2962,
29918,
1022,
2878,
353,
1423,
3149,
1839,
1022,
2878,
2033,
13,
9651,
12541,
353,
1423,
3149,
1839,
1524,
362,
2033,
13,
9651,
1900,
29918,
5753,
353,
1423,
3149,
1839,
13318,
29918,
5753,
2033,
13,
9651,
1904,
29889,
1359,
29918,
3859,
29918,
8977,
29898,
3198,
3149,
1839,
3859,
29918,
8977,
11287,
13,
13,
9651,
396,
2254,
2030,
5994,
3950,
29892,
1369,
411,
278,
6590,
6509,
6554,
13,
9651,
565,
451,
6389,
29889,
12071,
29918,
29212,
29901,
29871,
396,
565,
3282,
29915,
29873,
10092,
301,
29878,
29892,
2254,
2030,
5994,
3950,
13,
18884,
5994,
3950,
29889,
1359,
29918,
3859,
29918,
8977,
29898,
3198,
3149,
1839,
20640,
3950,
11287,
13,
9651,
1683,
29901,
13,
18884,
396,
10092,
304,
716,
6509,
6554,
13,
18884,
1596,
877,
2751,
10726,
301,
29878,
515,
1273,
29888,
304,
1273,
29888,
1275,
1360,
29915,
1273,
13,
462,
418,
313,
5085,
29889,
1025,
29918,
29212,
29892,
6389,
29889,
29212,
876,
13,
9651,
1596,
703,
4261,
7500,
620,
21571,
1423,
3149,
525,
8875,
29915,
313,
1022,
2878,
426,
1800,
1642,
4830,
29898,
13,
18884,
6389,
29889,
690,
2017,
29892,
1423,
3149,
1839,
1022,
2878,
25901,
13,
4706,
1683,
29901,
13,
9651,
1596,
703,
29961,
22709,
29962,
694,
1423,
3149,
1476,
472,
525,
8875,
29915,
1642,
4830,
29898,
5085,
29889,
690,
2017,
876,
13,
13,
1678,
565,
6389,
29889,
1457,
14968,
29901,
13,
4706,
565,
2897,
29889,
2084,
29889,
275,
1445,
29898,
5085,
29889,
1457,
14968,
1125,
13,
9651,
1596,
703,
4261,
8363,
758,
3018,
1312,
1423,
3149,
525,
8875,
29915,
1642,
4830,
29898,
5085,
29889,
1457,
14968,
876,
13,
9651,
1423,
3149,
353,
4842,
305,
29889,
1359,
29898,
13,
18884,
6389,
29889,
1457,
14968,
29892,
2910,
29918,
5479,
29922,
7345,
305,
29889,
10141,
877,
21970,
8785,
13,
13,
9651,
396,
452,
29939,
29918,
1359,
29918,
6341,
1891,
13,
9651,
1904,
353,
452,
29939,
29918,
1359,
29918,
6341,
1891,
29898,
4299,
29892,
1423,
3149,
1839,
3859,
29918,
8977,
11287,
13,
9651,
1596,
703,
4261,
7500,
758,
3018,
1312,
1423,
3149,
525,
8875,
29915,
313,
1022,
2878,
426,
1800,
29908,
13,
462,
29871,
869,
4830,
29898,
5085,
29889,
1457,
14968,
29892,
1423,
3149,
1839,
1022,
2878,
25901,
13,
4706,
1683,
29901,
13,
9651,
1596,
703,
4261,
694,
1423,
3149,
1476,
472,
525,
8875,
29915,
1642,
4830,
29898,
5085,
29889,
1457,
14968,
876,
13,
13,
1678,
835,
2254,
4327,
669,
8783,
835,
13,
1678,
4327,
29918,
14968,
353,
679,
29918,
9067,
29898,
5085,
29892,
4464,
353,
525,
14968,
1495,
13,
1678,
4327,
29918,
791,
353,
679,
29918,
9067,
29898,
5085,
29892,
4464,
353,
525,
791,
1495,
13,
13,
1678,
7945,
29918,
12657,
353,
679,
29918,
1272,
29898,
5085,
29892,
4327,
29918,
14968,
29892,
525,
14968,
1495,
13,
1678,
659,
29918,
12657,
353,
679,
29918,
1272,
29898,
5085,
29892,
4327,
29918,
791,
29892,
525,
791,
1495,
13,
13,
1678,
396,
6230,
8492,
13,
13,
1678,
396,
25455,
972,
2759,
675,
4327,
304,
2479,
1881,
4558,
3025,
12489,
3377,
13,
1678,
316,
29918,
8945,
675,
353,
972,
555,
580,
13,
13,
1678,
396,
3617,
10898,
13,
1678,
5534,
10153,
29918,
2084,
13,
1678,
10153,
29918,
2084,
29892,
1904,
29918,
2084,
29892,
6894,
29918,
2084,
29892,
26354,
29918,
8173,
353,
731,
29918,
2084,
29898,
5085,
29897,
13,
13,
1678,
5534,
9227,
29918,
14968,
13,
13,
1678,
565,
451,
29898,
5085,
29889,
1688,
29918,
29881,
24974,
1125,
13,
13,
4706,
396,
28186,
669,
12725,
363,
2999,
21502,
12168,
13,
4706,
396,
3143,
29899,
17462,
292,
13,
4706,
9227,
29918,
791,
29918,
3977,
353,
6991,
5219,
10507,
29898,
359,
29889,
2084,
29889,
7122,
29898,
2492,
29918,
2084,
29892,
525,
791,
29918,
3977,
8785,
13,
4706,
9227,
29918,
791,
29918,
1217,
3977,
353,
6991,
5219,
10507,
29898,
359,
29889,
2084,
29889,
7122,
29898,
2492,
29918,
2084,
29892,
525,
791,
29918,
1217,
3977,
8785,
13,
4706,
9227,
29918,
791,
29918,
3358,
29918,
3977,
353,
6991,
5219,
10507,
29898,
359,
29889,
2084,
29889,
7122,
29898,
2492,
29918,
2084,
29892,
525,
791,
29918,
3358,
29918,
3977,
8785,
13,
4706,
9227,
29918,
791,
29918,
3358,
29918,
1217,
3977,
353,
6991,
5219,
10507,
29898,
359,
29889,
2084,
29889,
7122,
29898,
2492,
29918,
2084,
29892,
525,
791,
29918,
3358,
29918,
1217,
3977,
8785,
13,
4706,
9227,
29918,
14968,
353,
6991,
5219,
10507,
29898,
359,
29889,
2084,
29889,
7122,
29898,
2492,
29918,
2084,
29892,
525,
14968,
8785,
13,
4706,
5534,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
29892,
3151,
29918,
11965,
29918,
29881,
1536,
29918,
14554,
13,
13,
4706,
835,
1667,
2425,
835,
13,
4706,
363,
21502,
305,
297,
3464,
29898,
5085,
29889,
2962,
29918,
1022,
2878,
29892,
6389,
29889,
1022,
2878,
29879,
1125,
13,
9651,
396,
17250,
368,
7945,
1728,
3405,
296,
2913,
565,
6790,
13,
9651,
565,
21502,
305,
529,
6389,
29889,
1564,
29872,
29918,
3977,
6119,
2222,
29918,
1022,
2878,
29879,
29901,
13,
18884,
7945,
29918,
2541,
29918,
5066,
296,
353,
7700,
13,
18884,
3151,
29918,
11965,
29918,
29881,
1536,
29918,
14554,
353,
29871,
29900,
29889,
29900,
396,
18443,
292,
6894,
537,
1838,
29915,
29873,
3394,
1492,
1286,
13,
9651,
1683,
29901,
13,
18884,
7945,
29918,
2541,
29918,
5066,
296,
353,
5852,
13,
18884,
3151,
29918,
11965,
29918,
29881,
1536,
29918,
14554,
353,
6389,
29889,
11965,
29918,
29881,
1536,
29918,
14554,
396,
2898,
9558,
13,
9651,
1596,
877,
8566,
6119,
9615,
363,
6694,
445,
21502,
305,
29901,
742,
7945,
29918,
2541,
29918,
5066,
296,
29897,
13,
13,
9651,
396,
1987,
7945,
363,
263,
1550,
411,
21762,
353,
29871,
29900,
313,
1333,
9479,
274,
6797,
29897,
13,
13,
9651,
396,
350,
1187,
14294,
786,
353,
478,
16036,
476,
29931,
6410,
7688,
10365,
358,
975,
931,
13,
9651,
565,
7945,
29918,
2541,
29918,
5066,
296,
29901,
13,
18884,
21502,
305,
29918,
2490,
353,
21502,
305,
448,
313,
5085,
29889,
1564,
29872,
29918,
3977,
6119,
2222,
29918,
1022,
2878,
29879,
718,
6389,
29889,
1564,
29872,
29918,
1639,
29918,
6321,
29918,
1022,
2878,
29879,
29897,
13,
18884,
565,
21502,
305,
29918,
2490,
529,
29871,
29900,
29901,
13,
462,
1678,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
353,
29871,
29900,
29889,
29900,
13,
18884,
25342,
29871,
29900,
5277,
21502,
305,
29918,
2490,
322,
21502,
305,
29918,
2490,
529,
6389,
29889,
1564,
29872,
29918,
6321,
29918,
3571,
29918,
29893,
2817,
786,
29901,
13,
462,
1678,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
353,
6389,
29889,
1564,
29872,
29918,
6321,
29918,
7915,
334,
320,
13,
462,
4706,
313,
29896,
29889,
29900,
448,
7442,
29889,
3944,
29898,
1022,
2878,
29918,
2490,
847,
6389,
29889,
1564,
29872,
29918,
6321,
29918,
3571,
29918,
29893,
2817,
786,
334,
7442,
29889,
1631,
876,
847,
29871,
29906,
13,
18884,
1683,
29901,
13,
462,
1678,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
353,
6389,
29889,
1564,
29872,
29918,
6321,
29918,
7915,
13,
9651,
1683,
29901,
13,
18884,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
353,
29871,
29900,
29889,
29900,
13,
9651,
1596,
877,
7583,
478,
16036,
476,
29931,
6410,
1840,
7688,
29901,
742,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
29897,
13,
13,
9651,
565,
21502,
305,
529,
6389,
29889,
3358,
29918,
2962,
29901,
13,
18884,
1596,
28909,
29876,
29905,
29876,
5323,
2827,
411,
20459,
4559,
29881,
15602,
515,
1273,
29879,
29915,
1273,
13,
462,
418,
6389,
29889,
24713,
29897,
13,
18884,
7945,
29918,
6758,
29918,
6099,
29883,
29892,
7945,
29918,
6758,
29918,
6321,
29892,
7945,
29918,
6758,
29918,
29881,
1536,
29892,
7945,
29918,
6758,
29892,
7945,
29918,
5753,
29892,
7945,
29918,
562,
2764,
4135,
29918,
1761,
353,
7945,
29898,
13,
462,
1678,
7945,
29918,
12657,
29892,
1904,
29892,
5994,
3950,
29892,
21502,
305,
29892,
28770,
291,
29892,
9227,
29918,
14968,
29892,
6389,
29892,
316,
29918,
8945,
675,
29892,
13,
462,
1678,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
29892,
3151,
29918,
11965,
29918,
29881,
1536,
29918,
14554,
29892,
437,
29918,
12508,
29922,
14968,
29918,
2541,
29918,
5066,
296,
29897,
13,
13,
9651,
1683,
29901,
13,
13,
18884,
396,
1735,
4842,
305,
1773,
389,
19715,
4444,
304,
9942,
794,
525,
3150,
2066,
29915,
4046,
13,
18884,
4842,
305,
29889,
18056,
307,
985,
292,
29889,
842,
29918,
845,
4362,
29918,
710,
8963,
877,
1445,
29918,
5205,
1495,
13,
462,
13,
18884,
1596,
28909,
29876,
29905,
29876,
5323,
2827,
411,
19228,
15602,
313,
28502,
342,
22092,
2470,
29897,
515,
1273,
29879,
29905,
29876,
29905,
29876,
29915,
1273,
6389,
29889,
24713,
29897,
13,
18884,
565,
21502,
305,
1273,
6389,
29889,
3358,
29918,
29888,
7971,
1275,
29871,
29900,
29901,
13,
462,
1678,
1596,
877,
835,
13383,
13383,
4136,
29937,
320,
29876,
14514,
292,
15602,
297,
23655,
2913,
856,
320,
29876,
835,
13383,
13383,
4136,
29937,
29905,
29876,
29905,
29876,
1495,
13,
462,
268,
13,
462,
1678,
396,
2198,
9686,
322,
4078,
2582,
363,
5434,
6694,
13,
462,
1678,
2198,
29918,
4352,
292,
29898,
5085,
29892,
1904,
29892,
26354,
29918,
8173,
29892,
21502,
305,
29892,
525,
14968,
1495,
13,
462,
1678,
2198,
29918,
4352,
292,
29898,
5085,
29892,
1904,
29892,
26354,
29918,
8173,
29892,
21502,
305,
29892,
525,
791,
1495,
13,
268,
13,
462,
13,
18884,
6389,
29918,
3358,
353,
3509,
29889,
8552,
29898,
5085,
29897,
13,
18884,
6389,
29918,
3358,
29889,
24713,
353,
525,
1022,
293,
29918,
6338,
29918,
4352,
292,
29915,
13,
632,
13,
18884,
26354,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3358,
29918,
8173,
29892,
525,
1022,
2878,
29918,
14968,
29918,
29995,
29881,
29915,
1273,
313,
13,
462,
1678,
21502,
305,
448,
21502,
305,
1273,
6389,
29918,
3358,
29889,
3358,
29918,
29888,
7971,
876,
29871,
396,
10563,
1833,
2198,
9686,
2582,
13,
18884,
7945,
29918,
12657,
29918,
3358,
353,
679,
29918,
1272,
29898,
13,
462,
1678,
6389,
29918,
3358,
29892,
4327,
29918,
14968,
29892,
4464,
2433,
14968,
742,
26354,
29918,
2084,
29922,
3358,
29918,
2084,
29892,
21502,
305,
29922,
1022,
2878,
29897,
13,
18884,
7945,
29918,
6758,
29918,
6099,
29883,
29892,
7945,
29918,
6758,
29918,
6321,
29892,
7945,
29918,
6758,
29918,
29881,
1536,
29892,
7945,
29918,
6758,
29892,
7945,
29918,
5753,
29892,
7945,
29918,
562,
2764,
4135,
29918,
1761,
353,
7945,
29898,
13,
462,
1678,
7945,
29918,
12657,
29918,
3358,
29892,
1904,
29892,
5994,
3950,
29892,
21502,
305,
29892,
28770,
291,
29892,
9227,
29918,
14968,
29892,
6389,
29892,
316,
29918,
8945,
675,
29892,
13,
462,
1678,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
29892,
3151,
29918,
11965,
29918,
29881,
1536,
29918,
14554,
29892,
437,
29918,
12508,
29922,
14968,
29918,
2541,
29918,
5066,
296,
29897,
13,
18884,
628,
7945,
29918,
12657,
29918,
3358,
13,
13,
18884,
26354,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3358,
29918,
8173,
29892,
525,
1022,
2878,
29918,
791,
29918,
29995,
29881,
29915,
1273,
313,
13,
462,
1678,
21502,
305,
448,
21502,
305,
1273,
6389,
29918,
3358,
29889,
3358,
29918,
29888,
7971,
876,
29871,
396,
10563,
1833,
2198,
9686,
2582,
13,
18884,
659,
29918,
12657,
29918,
3358,
353,
679,
29918,
1272,
29898,
13,
462,
1678,
6389,
29918,
3358,
29892,
4327,
29918,
791,
29892,
4464,
2433,
791,
742,
26354,
29918,
2084,
29922,
3358,
29918,
2084,
29892,
21502,
305,
29922,
1022,
2878,
29897,
13,
462,
13,
18884,
659,
29918,
6758,
29918,
6099,
29883,
29918,
3358,
29918,
3977,
29892,
659,
29918,
6758,
29918,
6321,
29918,
3358,
29918,
3977,
29892,
659,
29918,
6758,
29918,
29881,
1536,
29918,
3358,
29918,
3977,
29892,
320,
13,
462,
1678,
659,
29918,
6758,
29918,
3358,
29918,
3977,
29892,
659,
29918,
5753,
29918,
3358,
29918,
3977,
29892,
659,
29918,
5753,
29918,
3358,
29918,
3977,
29918,
1761,
353,
12725,
29898,
13,
462,
1678,
659,
29918,
12657,
29918,
3358,
29892,
1904,
29892,
21502,
305,
29892,
6389,
29892,
28770,
291,
29892,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
29892,
13,
462,
1678,
3151,
29918,
11965,
29918,
29881,
1536,
29918,
14554,
29892,
437,
29918,
12508,
29922,
14968,
29918,
2541,
29918,
5066,
296,
29892,
13,
462,
1678,
1831,
29918,
13318,
29918,
314,
549,
29922,
29896,
565,
7945,
29918,
2541,
29918,
5066,
296,
1683,
6389,
29889,
2622,
29918,
13318,
29918,
314,
549,
29897,
396,
871,
697,
2224,
746,
8025,
13,
462,
13,
18884,
659,
29918,
6758,
29918,
6099,
29883,
29918,
3358,
29918,
1217,
3977,
29892,
659,
29918,
6758,
29918,
6321,
29918,
3358,
29918,
1217,
3977,
29892,
659,
29918,
6758,
29918,
29881,
1536,
29918,
3358,
29918,
1217,
3977,
29892,
320,
13,
462,
1678,
659,
29918,
6758,
29918,
3358,
29918,
1217,
3977,
29892,
659,
29918,
5753,
29918,
3358,
29918,
1217,
3977,
29892,
659,
29918,
5753,
29918,
3358,
29918,
1217,
3977,
29918,
1761,
353,
12725,
29898,
13,
462,
1678,
659,
29918,
12657,
29918,
3358,
29892,
1904,
29892,
21502,
305,
29892,
6389,
29892,
28770,
291,
29892,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
29892,
13,
462,
1678,
3151,
29918,
11965,
29918,
29881,
1536,
29918,
14554,
29892,
437,
29918,
12508,
29922,
8824,
29892,
1831,
29918,
13318,
29918,
314,
549,
29922,
5085,
29889,
2622,
29918,
13318,
29918,
314,
549,
29897,
13,
18884,
628,
659,
29918,
12657,
29918,
3358,
13,
13,
9651,
659,
29918,
6758,
29918,
6099,
29883,
29918,
3977,
29892,
659,
29918,
6758,
29918,
6321,
29918,
3977,
29892,
659,
29918,
6758,
29918,
29881,
1536,
29918,
3977,
29892,
320,
13,
18884,
659,
29918,
6758,
29918,
3977,
29892,
659,
29918,
5753,
29918,
3977,
29892,
659,
29918,
5753,
29918,
3977,
29918,
1761,
353,
12725,
29898,
13,
18884,
659,
29918,
12657,
29892,
1904,
29892,
21502,
305,
29892,
6389,
29892,
28770,
291,
29892,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
29892,
13,
18884,
3151,
29918,
11965,
29918,
29881,
1536,
29918,
14554,
29892,
437,
29918,
12508,
29922,
14968,
29918,
2541,
29918,
5066,
296,
29892,
13,
18884,
1831,
29918,
13318,
29918,
314,
549,
29922,
29896,
565,
7945,
29918,
2541,
29918,
5066,
296,
1683,
6389,
29889,
2622,
29918,
13318,
29918,
314,
549,
29897,
396,
871,
697,
2224,
746,
8025,
13,
13,
9651,
659,
29918,
6758,
29918,
6099,
29883,
29918,
1217,
3977,
29892,
659,
29918,
6758,
29918,
6321,
29918,
1217,
3977,
29892,
659,
29918,
6758,
29918,
29881,
1536,
29918,
1217,
3977,
29892,
320,
13,
18884,
659,
29918,
6758,
29918,
1217,
3977,
29892,
659,
29918,
5753,
29918,
1217,
3977,
29892,
659,
29918,
5753,
29918,
1217,
3977,
29918,
1761,
353,
12725,
29898,
13,
18884,
659,
29918,
12657,
29892,
1904,
29892,
21502,
305,
29892,
6389,
29892,
28770,
291,
29892,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
29892,
13,
18884,
3151,
29918,
11965,
29918,
29881,
1536,
29918,
14554,
29892,
437,
29918,
12508,
29922,
8824,
29892,
1831,
29918,
13318,
29918,
314,
549,
29922,
5085,
29889,
2622,
29918,
13318,
29918,
314,
549,
29897,
13,
632,
13,
9651,
396,
28186,
19684,
13,
9651,
9227,
29918,
14968,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
6099,
29883,
742,
7945,
29918,
6758,
29918,
6099,
29883,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
14968,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
1564,
29872,
29918,
6321,
742,
7945,
29918,
6758,
29918,
6321,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
14968,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
1564,
29872,
29918,
29881,
1536,
742,
7945,
29918,
6758,
29918,
29881,
1536,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
14968,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
742,
7945,
29918,
6758,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
14968,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
1564,
29872,
29918,
6321,
29918,
7915,
742,
3151,
29918,
1564,
29872,
29918,
6321,
29918,
7915,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
14968,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
562,
2764,
4135,
742,
7945,
29918,
5753,
29892,
21502,
305,
29897,
13,
13,
9651,
396,
2630,
19684,
13,
9651,
9227,
29918,
791,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
6099,
29883,
742,
659,
29918,
6758,
29918,
6099,
29883,
29918,
3977,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
1564,
29872,
29918,
6321,
742,
659,
29918,
6758,
29918,
6321,
29918,
3977,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
1564,
29872,
29918,
29881,
1536,
742,
659,
29918,
6758,
29918,
29881,
1536,
29918,
3977,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
742,
659,
29918,
6758,
29918,
3977,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
562,
2764,
4135,
742,
659,
29918,
5753,
29918,
3977,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
6099,
29883,
742,
659,
29918,
6758,
29918,
6099,
29883,
29918,
1217,
3977,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
1564,
29872,
29918,
6321,
742,
659,
29918,
6758,
29918,
6321,
29918,
1217,
3977,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
1564,
29872,
29918,
29881,
1536,
742,
659,
29918,
6758,
29918,
29881,
1536,
29918,
1217,
3977,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
742,
659,
29918,
6758,
29918,
1217,
3977,
29892,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
562,
2764,
4135,
742,
659,
29918,
5753,
29918,
1217,
3977,
29892,
21502,
305,
29897,
13,
13,
9651,
565,
21502,
305,
6736,
6389,
29889,
3358,
29918,
2962,
29901,
13,
18884,
396,
3462,
2198,
9686,
19684,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
6099,
29883,
742,
659,
29918,
6758,
29918,
6099,
29883,
29918,
3358,
29918,
3977,
29892,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
1564,
29872,
29918,
6321,
742,
659,
29918,
6758,
29918,
6321,
29918,
3358,
29918,
3977,
29892,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
1564,
29872,
29918,
29881,
1536,
742,
659,
29918,
6758,
29918,
29881,
1536,
29918,
3358,
29918,
3977,
29892,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
742,
659,
29918,
6758,
29918,
3358,
29918,
3977,
29892,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
562,
2764,
4135,
742,
659,
29918,
5753,
29918,
3358,
29918,
3977,
29892,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
6099,
29883,
742,
659,
29918,
6758,
29918,
6099,
29883,
29918,
3358,
29918,
1217,
3977,
29892,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
1564,
29872,
29918,
6321,
742,
659,
29918,
6758,
29918,
6321,
29918,
3358,
29918,
1217,
3977,
29892,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
29918,
1564,
29872,
29918,
29881,
1536,
742,
659,
29918,
6758,
29918,
29881,
1536,
29918,
3358,
29918,
1217,
3977,
29892,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
6758,
742,
659,
29918,
6758,
29918,
3358,
29918,
1217,
3977,
29892,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
10945,
29914,
562,
2764,
4135,
742,
659,
29918,
5753,
29918,
3358,
29918,
1217,
3977,
29892,
21502,
305,
29897,
13,
13,
9651,
396,
28186,
1035,
2002,
2478,
13,
9651,
9227,
29918,
14968,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29896,
742,
7945,
29918,
562,
2764,
4135,
29918,
1761,
29961,
29900,
1402,
21502,
305,
29897,
13,
9651,
9227,
29918,
14968,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29941,
742,
7945,
29918,
562,
2764,
4135,
29918,
1761,
29961,
29896,
1402,
21502,
305,
29897,
13,
9651,
9227,
29918,
14968,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29945,
742,
7945,
29918,
562,
2764,
4135,
29918,
1761,
29961,
29906,
1402,
21502,
305,
29897,
13,
13,
9651,
396,
2630,
1035,
2002,
2478,
13,
9651,
9227,
29918,
791,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29896,
742,
659,
29918,
5753,
29918,
1217,
3977,
29918,
1761,
29961,
29900,
1402,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29941,
742,
659,
29918,
5753,
29918,
1217,
3977,
29918,
1761,
29961,
29896,
1402,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29945,
742,
659,
29918,
5753,
29918,
1217,
3977,
29918,
1761,
29961,
29906,
1402,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29896,
742,
659,
29918,
5753,
29918,
3977,
29918,
1761,
29961,
29900,
1402,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29941,
742,
659,
29918,
5753,
29918,
3977,
29918,
1761,
29961,
29896,
1402,
21502,
305,
29897,
13,
9651,
9227,
29918,
791,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29945,
742,
659,
29918,
5753,
29918,
3977,
29918,
1761,
29961,
29906,
1402,
21502,
305,
29897,
13,
632,
13,
9651,
565,
21502,
305,
6736,
6389,
29889,
3358,
29918,
2962,
29901,
13,
18884,
396,
3462,
2198,
9686,
19684,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29896,
742,
659,
29918,
5753,
29918,
3358,
29918,
1217,
3977,
29918,
1761,
29961,
29900,
1402,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29941,
742,
659,
29918,
5753,
29918,
3358,
29918,
1217,
3977,
29918,
1761,
29961,
29896,
1402,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
1217,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29945,
742,
659,
29918,
5753,
29918,
3358,
29918,
1217,
3977,
29918,
1761,
29961,
29906,
1402,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29896,
742,
659,
29918,
5753,
29918,
3358,
29918,
3977,
29918,
1761,
29961,
29900,
1402,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29941,
742,
659,
29918,
5753,
29918,
3358,
29918,
3977,
29918,
1761,
29961,
29896,
1402,
21502,
305,
29897,
13,
18884,
9227,
29918,
791,
29918,
3358,
29918,
3977,
29889,
1202,
29918,
19529,
279,
877,
562,
2764,
4135,
29914,
3332,
29945,
742,
659,
29918,
5753,
29918,
3358,
29918,
3977,
29918,
1761,
29961,
29906,
1402,
21502,
305,
29897,
13,
13,
9651,
396,
4078,
1423,
29918,
3149,
313,
13318,
13600,
17005,
1728,
2094,
6119,
29897,
13,
9651,
338,
29918,
13318,
353,
659,
29918,
5753,
29918,
1217,
3977,
1405,
1900,
29918,
5753,
13,
9651,
1900,
29918,
5753,
353,
4236,
29898,
791,
29918,
5753,
29918,
1217,
3977,
29892,
1900,
29918,
5753,
29897,
13,
9651,
4078,
29918,
3198,
3149,
3319,
29915,
1022,
2878,
2396,
21502,
305,
718,
29871,
29896,
29892,
13,
462,
632,
525,
1212,
2396,
6389,
29889,
1212,
29892,
13,
462,
632,
525,
3859,
29918,
8977,
2396,
1904,
29889,
3859,
29918,
8977,
3285,
13,
462,
632,
525,
13318,
29918,
5753,
2396,
1900,
29918,
5753,
29892,
13,
462,
632,
525,
20640,
3950,
2396,
5994,
3950,
29889,
3859,
29918,
8977,
3285,
13,
462,
632,
525,
1524,
362,
2396,
12541,
1118,
13,
462,
9651,
338,
29918,
13318,
29892,
10422,
29922,
359,
29889,
2084,
29889,
7122,
29898,
4299,
29918,
2084,
29892,
525,
1022,
2878,
29995,
29879,
29889,
29886,
386,
29889,
12637,
29915,
1273,
851,
29898,
1022,
2878,
718,
29871,
29896,
8243,
4078,
29918,
17991,
29922,
29896,
29900,
29897,
13,
13,
4706,
1596,
877,
5323,
2827,
515,
9358,
1273,
29881,
304,
9358,
1273,
29881,
7743,
29915,
1273,
13,
795,
313,
5085,
29889,
2962,
29918,
1022,
2878,
29892,
6389,
29889,
1022,
2878,
29879,
876,
13,
13,
1678,
1683,
29901,
13,
13,
4706,
396,
853,
14082,
1017,
17983,
29901,
2989,
4863,
669,
694,
2927,
10365,
1860,
13,
4706,
396,
6058,
29923,
29901,
367,
16010,
411,
6694,
18765,
362,
304,
5557,
7945,
29899,
1688,
10104,
847,
21640,
766,
1037,
29886,
6906,
13,
4706,
15886,
29918,
29881,
24974,
353,
4327,
29879,
29889,
1523,
4220,
4197,
13,
9651,
16968,
24932,
29943,
3466,
29898,
3200,
9696,
29922,
5574,
511,
13,
9651,
7817,
29907,
1336,
29898,
29906,
29906,
29946,
511,
13,
9651,
2522,
744,
29898,
2311,
7607,
5085,
29889,
2492,
29918,
6229,
29892,
6389,
29889,
2492,
29918,
6229,
8243,
13,
9651,
1763,
29911,
6073,
3285,
13,
9651,
21981,
675,
580,
13,
308,
2314,
13,
13,
4706,
1596,
877,
6816,
294,
3864,
6894,
537,
310,
5759,
11916,
856,
1495,
13,
4706,
659,
29918,
29881,
1536,
29918,
12657,
353,
679,
29918,
1272,
29898,
5085,
29892,
15886,
29918,
29881,
24974,
29892,
525,
791,
1495,
13,
4706,
2582,
353,
5645,
29918,
1564,
29872,
29918,
4661,
13946,
1017,
29918,
12657,
29898,
791,
29918,
29881,
1536,
29918,
12657,
29892,
1904,
29892,
6389,
29889,
24772,
29892,
13,
462,
462,
462,
1596,
29918,
29888,
7971,
29922,
5085,
29889,
2158,
29918,
29888,
7971,
29892,
6314,
29918,
7387,
29922,
8824,
29892,
13,
462,
462,
462,
4889,
29918,
4703,
29918,
8865,
449,
29922,
5085,
29889,
10118,
29918,
4703,
29918,
8865,
449,
29897,
13,
4706,
3151,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
29881,
1536,
29918,
2084,
29892,
525,
1022,
2878,
29915,
718,
851,
29898,
3198,
3149,
1839,
1022,
2878,
11287,
718,
320,
13,
462,
259,
22868,
24772,
29915,
718,
851,
29898,
5085,
29889,
24772,
29897,
718,
320,
13,
462,
259,
6702,
29918,
312,
8865,
29915,
565,
6389,
29889,
10118,
29918,
4703,
29918,
8865,
449,
1683,
27255,
718,
15300,
29886,
1495,
13,
4706,
411,
1722,
29898,
2764,
29918,
2084,
29892,
525,
29893,
29890,
1495,
408,
285,
29901,
13,
9651,
5839,
280,
29889,
15070,
29898,
9902,
29892,
285,
29897,
13,
4706,
1596,
877,
2831,
5434,
671,
29892,
25812,
17983,
2582,
6087,
304,
525,
718,
3151,
29918,
2084,
29897,
13,
13,
13,
1753,
1889,
29918,
4905,
29898,
13168,
1125,
13,
1678,
14550,
7662,
11105,
408,
1881,
29892,
10272,
278,
3646,
363,
12814,
573,
6410,
12008,
13,
1678,
396,
8329,
3234,
338,
15712,
297,
8943,
330,
13364,
29892,
577,
679,
3109,
4780,
3480,
29892,
12635,
491,
9853,
2159,
297,
1269,
330,
3746,
12008,
13,
1678,
396,
11105,
6593,
29901,
448,
29906,
29901,
288,
2415,
29892,
448,
29896,
29901,
25406,
3480,
313,
6800,
511,
29871,
29900,
29901,
4780,
3480,
29892,
29871,
29896,
29901,
926,
29892,
448,
29941,
29901,
18652,
3480,
13,
13,
1678,
396,
518,
29946,
29892,
29871,
29941,
29892,
29871,
29896,
29953,
29892,
29871,
29946,
29892,
29871,
29941,
29892,
29871,
29896,
29953,
29962,
13,
1678,
396,
350,
322,
350,
29906,
1818,
367,
1021,
2337,
13626,
13,
1678,
313,
29933,
29892,
405,
29925,
29892,
317,
29984,
29892,
350,
29906,
29892,
3865,
29892,
24459,
353,
11105,
29889,
2311,
580,
29871,
396,
518,
29933,
29892,
349,
29892,
317,
29984,
29892,
350,
29892,
405,
29892,
317,
29984,
29962,
13,
1678,
396,
2158,
313,
29933,
29892,
29933,
29906,
29892,
3059,
29892,
25500,
29892,
29903,
29984,
29897,
13,
13,
1678,
396,
2791,
714,
278,
13686,
3145,
13,
13,
1678,
396,
451,
773,
25406,
3480,
5056,
322,
18652,
3480,
5056,
17587,
13,
1678,
3646,
353,
11105,
1275,
29871,
29896,
13,
1678,
3646,
29889,
276,
339,
2658,
29918,
5105,
353,
7700,
13,
1678,
736,
3646,
29892,
313,
29933,
29892,
350,
29906,
29892,
3865,
29892,
405,
29925,
29892,
317,
29984,
29897,
13,
13,
13,
1753,
6410,
29918,
6321,
29918,
29881,
2147,
10238,
29898,
2589,
29892,
1480,
1707,
29892,
4226,
2133,
29922,
5574,
1125,
13,
1678,
14550,
13,
1678,
20535,
1078,
476,
29931,
17089,
10238,
6410,
1840,
363,
25778,
16036,
29889,
13,
1678,
3887,
29892,
1480,
1707,
29901,
515,
697,
2944,
2629,
1375,
747,
905,
29892,
1021,
2159,
408,
3405,
296,
2913,
29889,
13,
1678,
6058,
29923,
29901,
4226,
2133,
9615,
491,
2322,
408,
310,
29871,
29900,
29945,
29914,
29906,
29955,
29892,
1933,
2247,
491,
9853,
29918,
2311,
334,
4450,
29918,
10568,
29889,
13,
1678,
14550,
13,
1678,
396,
3887,
322,
1480,
1707,
526,
3117,
1784,
29899,
12531,
29892,
541,
445,
775,
338,
946,
6582,
293,
310,
393,
13,
1678,
6410,
353,
448,
29900,
29889,
29945,
334,
4842,
305,
29889,
2083,
29898,
29896,
718,
1480,
1707,
448,
3887,
29889,
12248,
29898,
29906,
29897,
448,
1480,
1707,
29889,
4548,
3101,
13,
1678,
565,
4226,
2133,
29901,
13,
4706,
6410,
847,
29922,
313,
2589,
29889,
12181,
29961,
29900,
29962,
334,
3887,
29889,
12181,
29961,
29896,
2314,
13,
1678,
736,
6410,
13,
13,
13,
1753,
6410,
29918,
6321,
29918,
29881,
2147,
10238,
29918,
29886,
13479,
29898,
2589,
29918,
29886,
5378,
29892,
3887,
29918,
2490,
29892,
1480,
1707,
29918,
29886,
5378,
29892,
1480,
1707,
29918,
2490,
29892,
4226,
2133,
29922,
5574,
1125,
13,
1678,
14550,
13,
1678,
20535,
1078,
476,
29931,
17089,
10238,
6410,
1840,
363,
478,
29934,
10262,
29889,
13,
1678,
599,
6273,
29901,
515,
697,
2944,
2629,
1375,
747,
905,
29892,
1021,
2159,
408,
3405,
296,
2913,
29889,
13,
1678,
6058,
29923,
29901,
4226,
2133,
9615,
491,
2322,
408,
310,
29871,
29900,
29945,
29914,
29906,
29955,
29892,
1933,
2247,
491,
9853,
29918,
2311,
334,
4450,
29918,
10568,
29889,
13,
1678,
14550,
13,
1678,
3659,
29918,
29886,
5378,
353,
1480,
1707,
29918,
29886,
5378,
29889,
16109,
29898,
29900,
29889,
29945,
467,
4548,
580,
13,
1678,
3659,
29918,
2490,
353,
1480,
1707,
29918,
2490,
29889,
16109,
29898,
29900,
29889,
29945,
467,
4548,
580,
13,
1678,
6410,
353,
448,
29900,
29889,
29945,
334,
4842,
305,
29889,
2083,
29898,
29896,
718,
1480,
1707,
29918,
2490,
448,
1480,
1707,
29918,
29886,
5378,
448,
313,
4172,
29918,
2490,
29889,
12248,
29898,
29906,
29897,
718,
313,
2589,
29918,
2490,
448,
3887,
29918,
29886,
5378,
467,
12248,
29898,
29906,
876,
847,
3659,
29918,
29886,
5378,
29889,
12248,
29898,
29906,
876,
13,
1678,
565,
4226,
2133,
29901,
13,
4706,
6410,
847,
29922,
313,
2589,
29918,
29886,
5378,
29889,
12181,
29961,
29900,
29962,
334,
3887,
29918,
29886,
5378,
29889,
12181,
29961,
29896,
2314,
13,
1678,
736,
6410,
13,
13,
13,
1753,
6410,
29918,
11965,
29918,
1707,
8837,
29898,
11965,
29918,
3944,
29918,
3601,
29892,
3405,
296,
29918,
5721,
29892,
4450,
29918,
29881,
1536,
29918,
689,
2497,
1125,
13,
1678,
14550,
13,
1678,
20535,
1078,
6894,
537,
6410,
1840,
363,
25778,
16036,
322,
478,
29934,
10262,
29889,
13,
1678,
4450,
29918,
3944,
29918,
3601,
29901,
6776,
457,
29501,
310,
697,
5101,
29892,
515,
697,
2944,
2629,
1375,
747,
905,
322,
697,
931,
4331,
29889,
13,
1678,
3405,
296,
29918,
5721,
29901,
365,
29906,
5418,
1546,
3405,
296,
12047,
393,
5759,
278,
5101,
29889,
13,
1678,
1094,
310,
29871,
29900,
29945,
29914,
29906,
29900,
29892,
22932,
491,
3405,
296,
29918,
5721,
29889,
13,
1678,
14550,
13,
1678,
396,
4450,
29918,
3944,
29918,
3601,
338,
12489,
411,
263,
6776,
457,
5418,
515,
263,
4036,
5101,
13,
1678,
396,
5224,
338,
2253,
29936,
15662,
20162,
3464,
471,
518,
29900,
29889,
29929,
29929,
29929,
29929,
29929,
29900,
29892,
29871,
29900,
29889,
29929,
29929,
29929,
29929,
29929,
29947,
29962,
565,
451,
18443,
287,
313,
1025,
1904,
29897,
13,
1678,
396,
2099,
29918,
3944,
29918,
3601,
353,
4450,
29918,
3944,
29918,
3601,
29889,
12676,
580,
396,
4822,
931,
6576,
13,
13,
1678,
396,
14402,
29901,
4226,
675,
491,
3405,
296,
29918,
5721,
29973,
825,
1048,
4464,
24382,
297,
7536,
29973,
13,
13,
1678,
19471,
353,
29871,
29896,
29889,
29900,
448,
4450,
29918,
3944,
29918,
3601,
13,
1678,
565,
4450,
29918,
29881,
1536,
29918,
689,
2497,
1275,
525,
10052,
2396,
13,
4706,
6410,
353,
448,
4181,
13,
1678,
25342,
4450,
29918,
29881,
1536,
29918,
689,
2497,
297,
6024,
4563,
742,
525,
11569,
2033,
29901,
13,
4706,
396,
9946,
22964,
14424,
3639,
363,
7200,
20162,
13,
4706,
6410,
353,
29871,
29896,
29889,
29900,
847,
313,
4181,
718,
29871,
29896,
29872,
29899,
29953,
29897,
13,
1678,
1683,
29901,
13,
4706,
12020,
8960,
877,
14148,
6894,
537,
6410,
7063,
29901,
13420,
4450,
29918,
29881,
1536,
29918,
689,
2497,
29897,
13,
13,
1678,
6410,
334,
29922,
3405,
296,
29918,
5721,
29889,
4801,
496,
580,
847,
29871,
29945,
29889,
29900,
396,
15662,
365,
29906,
1546,
29871,
29947,
29914,
29896,
29953,
29899,
6229,
20088,
29876,
921,
29892,
343,
13,
13,
1678,
736,
6410,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
tests/py_tests/test_faint/test_linear_gradient.py | lukas-ke/faint-graphics-editor | 10 | 156861 | <reponame>lukas-ke/faint-graphics-editor<gh_stars>1-10
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
from faint import LinearGradient
class TestLinearGradient(unittest.TestCase):
def test_init_types(self):
# Arguments required
ar = self.assertRaises(ValueError)
with ar: LinearGradient();
with ar: LinearGradient(42.0);
with ar: LinearGradient(0.0, (255,0,255));
# Integer and float offset (was broken once!)
LinearGradient((0, (255,0,255)))
LinearGradient((0.0, (255,0,255)))
LinearGradient((1, (255,0,255)))
# Angle
LinearGradient(42, (0.0, (255,0,255)))
LinearGradient(42.0, (0.0, (255,0,255)))
# Multiple color stops
LinearGradient(42.0, (0.0, (255,0,255)), (1.0, (255,255,255)))
def test_angle(self):
lg1 = LinearGradient((42, (255,0,255)))
# Fixme: Replace set, get_angle with property
self.assertEqual(lg1.get_angle(), 0, "Default angle is 0")
lg2 = LinearGradient(42, (0.0, (255, 0, 255)))
self.assertAlmostEqual(lg2.get_angle(), 42.0)
lg1.set_angle(20.0)
self.assertEqual(lg1.get_angle(), 20.0)
def test_color_stops(self):
lg = LinearGradient((0.0, (255,254,253)), (0.5, (0, 1, 2, 3)))
self.assertEqual(lg.get_num_stops(), 2)
s0, s1 = lg.get_stops()
self.assertEqual(s0, (0.0, (255, 254, 253, 255)))
self.assertEqual(s1, (0.5, (0, 1, 2, 3)))
lg.add_stop(0.6, (50, 60, 70))
stops = lg.get_stops()
self.assertEqual(len(stops), 3)
s2 = stops[2]
self.assertEqual(s2, (0.6, (50, 60, 70, 255)))
self.assertEqual(s2, lg.get_stop(2))
with self.assertRaises(IndexError):
lg.get_stop(3)
with self.assertRaises(ValueError):
lg.get_stop(-1)
| [
1,
529,
276,
1112,
420,
29958,
29880,
2679,
294,
29899,
446,
29914,
29888,
2365,
29899,
6420,
29899,
15204,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
30004,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
30004,
13,
5215,
443,
27958,
30004,
13,
3166,
24732,
1053,
22985,
25584,
993,
30004,
13,
30004,
13,
1990,
4321,
12697,
25584,
993,
29898,
348,
27958,
29889,
3057,
8259,
1125,
30004,
13,
30004,
13,
1678,
822,
1243,
29918,
2344,
29918,
8768,
29898,
1311,
1125,
30004,
13,
4706,
396,
11842,
9331,
3734,
30004,
13,
4706,
564,
353,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1917,
2392,
8443,
13,
4706,
411,
564,
29901,
22985,
25584,
993,
14078,
13,
4706,
411,
564,
29901,
22985,
25584,
993,
29898,
29946,
29906,
29889,
29900,
6075,
13,
4706,
411,
564,
29901,
22985,
25584,
993,
29898,
29900,
29889,
29900,
29892,
313,
29906,
29945,
29945,
29892,
29900,
29892,
29906,
29945,
29945,
2483,
30004,
13,
30004,
13,
4706,
396,
8102,
322,
5785,
9210,
313,
11102,
9391,
2748,
29991,
8443,
13,
4706,
22985,
25584,
993,
3552,
29900,
29892,
313,
29906,
29945,
29945,
29892,
29900,
29892,
29906,
29945,
29945,
4961,
30004,
13,
4706,
22985,
25584,
993,
3552,
29900,
29889,
29900,
29892,
313,
29906,
29945,
29945,
29892,
29900,
29892,
29906,
29945,
29945,
4961,
30004,
13,
4706,
22985,
25584,
993,
3552,
29896,
29892,
313,
29906,
29945,
29945,
29892,
29900,
29892,
29906,
29945,
29945,
4961,
30004,
13,
30004,
13,
4706,
396,
3218,
280,
30004,
13,
4706,
22985,
25584,
993,
29898,
29946,
29906,
29892,
313,
29900,
29889,
29900,
29892,
313,
29906,
29945,
29945,
29892,
29900,
29892,
29906,
29945,
29945,
4961,
30004,
13,
4706,
22985,
25584,
993,
29898,
29946,
29906,
29889,
29900,
29892,
313,
29900,
29889,
29900,
29892,
313,
29906,
29945,
29945,
29892,
29900,
29892,
29906,
29945,
29945,
4961,
30004,
13,
30004,
13,
4706,
396,
26905,
2927,
17726,
30004,
13,
4706,
22985,
25584,
993,
29898,
29946,
29906,
29889,
29900,
29892,
313,
29900,
29889,
29900,
29892,
313,
29906,
29945,
29945,
29892,
29900,
29892,
29906,
29945,
29945,
8243,
313,
29896,
29889,
29900,
29892,
313,
29906,
29945,
29945,
29892,
29906,
29945,
29945,
29892,
29906,
29945,
29945,
4961,
30004,
13,
30004,
13,
30004,
13,
1678,
822,
1243,
29918,
2521,
29898,
1311,
1125,
30004,
13,
4706,
301,
29887,
29896,
353,
29871,
22985,
25584,
993,
3552,
29946,
29906,
29892,
313,
29906,
29945,
29945,
29892,
29900,
29892,
29906,
29945,
29945,
4961,
30004,
13,
4706,
396,
24778,
1004,
29901,
22108,
731,
29892,
679,
29918,
2521,
411,
2875,
30004,
13,
4706,
1583,
29889,
9294,
9843,
29898,
19920,
29896,
29889,
657,
29918,
2521,
3285,
29871,
29900,
29892,
376,
4592,
10696,
338,
29871,
29900,
1159,
30004,
13,
30004,
13,
4706,
301,
29887,
29906,
353,
22985,
25584,
993,
29898,
29946,
29906,
29892,
313,
29900,
29889,
29900,
29892,
313,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
4961,
30004,
13,
4706,
1583,
29889,
9294,
2499,
3242,
9843,
29898,
19920,
29906,
29889,
657,
29918,
2521,
3285,
29871,
29946,
29906,
29889,
29900,
8443,
13,
30004,
13,
4706,
301,
29887,
29896,
29889,
842,
29918,
2521,
29898,
29906,
29900,
29889,
29900,
8443,
13,
4706,
1583,
29889,
9294,
9843,
29898,
19920,
29896,
29889,
657,
29918,
2521,
3285,
29871,
29906,
29900,
29889,
29900,
8443,
13,
30004,
13,
30004,
13,
1678,
822,
1243,
29918,
2780,
29918,
303,
3554,
29898,
1311,
1125,
30004,
13,
4706,
301,
29887,
353,
29871,
22985,
25584,
993,
3552,
29900,
29889,
29900,
29892,
313,
29906,
29945,
29945,
29892,
29906,
29945,
29946,
29892,
29906,
29945,
29941,
8243,
313,
29900,
29889,
29945,
29892,
313,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
4961,
30004,
13,
4706,
1583,
29889,
9294,
9843,
29898,
19920,
29889,
657,
29918,
1949,
29918,
303,
3554,
3285,
29871,
29906,
8443,
13,
4706,
269,
29900,
29892,
269,
29896,
353,
301,
29887,
29889,
657,
29918,
303,
3554,
26471,
13,
30004,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29879,
29900,
29892,
313,
29900,
29889,
29900,
29892,
313,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29946,
29892,
29871,
29906,
29945,
29941,
29892,
29871,
29906,
29945,
29945,
4961,
30004,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29879,
29896,
29892,
313,
29900,
29889,
29945,
29892,
313,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
4961,
30004,
13,
30004,
13,
4706,
301,
29887,
29889,
1202,
29918,
9847,
29898,
29900,
29889,
29953,
29892,
313,
29945,
29900,
29892,
29871,
29953,
29900,
29892,
29871,
29955,
29900,
876,
30004,
13,
4706,
17726,
353,
301,
29887,
29889,
657,
29918,
303,
3554,
26471,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
303,
3554,
511,
29871,
29941,
8443,
13,
30004,
13,
4706,
269,
29906,
353,
17726,
29961,
29906,
29962,
30004,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29879,
29906,
29892,
313,
29900,
29889,
29953,
29892,
313,
29945,
29900,
29892,
29871,
29953,
29900,
29892,
29871,
29955,
29900,
29892,
29871,
29906,
29945,
29945,
4961,
30004,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29879,
29906,
29892,
301,
29887,
29889,
657,
29918,
9847,
29898,
29906,
876,
30004,
13,
30004,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
3220,
2392,
1125,
30004,
13,
9651,
301,
29887,
29889,
657,
29918,
9847,
29898,
29941,
8443,
13,
30004,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1917,
2392,
1125,
30004,
13,
9651,
301,
29887,
29889,
657,
29918,
9847,
6278,
29896,
8443,
13,
2
] |
nitmis_admin/controllers/register.py | kalesh13/nitmis | 0 | 15832 | from rest_framework.views import APIView
from rest_framework.response import Response
from django.shortcuts import render
from django.http.response import JsonResponse
from nitmis_admin.serializers.UserSerializer import UserSerializer
def create_user(role="Guest"):
"""
"""
def fun_wrapper(func):
def wrapper(*args, **kwargs):
serializer = UserSerializer(data=args[1].data)
#
# If the data is valid, create a new user
# and return the access token details.
if serializer.is_valid():
serializer.save(role=role)
return JsonResponse(serializer.data)
return JsonResponse({"errors": serializer.errors}, status=422)
return wrapper
return fun_wrapper
class Register(APIView):
'''
Parent register controller. Post requests create
a general Guest account
'''
def get(self, request):
'''
Renders the base layout on GET request. Frontend
handles the rendering of forms
'''
return render(request, 'base.html')
@create_user()
def post(self, request):
'''
Registers a new user and assigns the user
a Guest role.
'''
class AdminRegister(Register):
'''
Register controller for administrators.
'''
@create_user(role="Administrator")
def post(self, request):
'''
Overriden post function. Registers the user as
an administrator
'''
| [
1,
515,
1791,
29918,
4468,
29889,
7406,
1053,
3450,
1043,
13,
3166,
1791,
29918,
4468,
29889,
5327,
1053,
13291,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
13,
3166,
9557,
29889,
1124,
29889,
5327,
1053,
14355,
5103,
13,
3166,
21767,
26737,
29918,
6406,
29889,
15550,
19427,
29889,
2659,
17679,
1053,
4911,
17679,
13,
13,
13,
1753,
1653,
29918,
1792,
29898,
12154,
543,
9485,
342,
29908,
1125,
13,
1678,
9995,
13,
1678,
9995,
13,
1678,
822,
2090,
29918,
17699,
29898,
9891,
1125,
13,
4706,
822,
14476,
10456,
5085,
29892,
3579,
19290,
1125,
13,
9651,
7797,
3950,
353,
4911,
17679,
29898,
1272,
29922,
5085,
29961,
29896,
1822,
1272,
29897,
13,
9651,
396,
13,
9651,
396,
960,
278,
848,
338,
2854,
29892,
1653,
263,
716,
1404,
13,
9651,
396,
322,
736,
278,
2130,
5993,
4902,
29889,
13,
9651,
565,
7797,
3950,
29889,
275,
29918,
3084,
7295,
13,
18884,
7797,
3950,
29889,
7620,
29898,
12154,
29922,
12154,
29897,
13,
18884,
736,
14355,
5103,
29898,
15550,
3950,
29889,
1272,
29897,
13,
9651,
736,
14355,
5103,
3319,
29908,
12523,
1115,
7797,
3950,
29889,
12523,
1118,
4660,
29922,
29946,
29906,
29906,
29897,
13,
4706,
736,
14476,
13,
1678,
736,
2090,
29918,
17699,
13,
13,
13,
1990,
12577,
29898,
8787,
1043,
1125,
13,
1678,
14550,
13,
1678,
22280,
6036,
4701,
29889,
4918,
7274,
1653,
13,
1678,
263,
2498,
2088,
342,
3633,
13,
1678,
14550,
13,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
1125,
13,
4706,
14550,
13,
4706,
390,
21043,
278,
2967,
5912,
373,
12354,
2009,
29889,
13960,
355,
13,
4706,
17766,
278,
15061,
310,
7190,
13,
4706,
14550,
13,
4706,
736,
4050,
29898,
3827,
29892,
525,
3188,
29889,
1420,
1495,
13,
13,
1678,
732,
3258,
29918,
1792,
580,
13,
1678,
822,
1400,
29898,
1311,
29892,
2009,
1125,
13,
4706,
14550,
13,
4706,
12577,
29879,
263,
716,
1404,
322,
3566,
29879,
278,
1404,
13,
4706,
263,
2088,
342,
6297,
29889,
13,
4706,
14550,
13,
13,
13,
1990,
10229,
15213,
29898,
15213,
1125,
13,
1678,
14550,
13,
1678,
12577,
4701,
363,
6343,
4097,
29889,
13,
1678,
14550,
13,
13,
1678,
732,
3258,
29918,
1792,
29898,
12154,
543,
12754,
2132,
1061,
1159,
13,
1678,
822,
1400,
29898,
1311,
29892,
2009,
1125,
13,
4706,
14550,
13,
4706,
6811,
2429,
264,
1400,
740,
29889,
12577,
29879,
278,
1404,
408,
13,
4706,
385,
27443,
13,
4706,
14550,
13,
2
] |
src/rreil/variable.py | tizmd/python-gdsl | 0 | 127256 |
class Variable(object):
def __init__(self, _id , offset):
self._id = _id
self.offset = offset
def __str__(self):
s = str(self._id)
if self.offset:
s = s + "/%d" % self.offset
return s
class VariableLimited(object):
def __init__(self, _id , offset, size):
self._id = _id
self.offset = offset
self.size = size
def __str__(self):
s = str(self._id)
if self.offset:
s = s + "/%d" % self.offset
return s + ":%d" % self.size
def VariableLimitedListInit():
return list()
def VariableLimitedListNext(a, l):
l.append(a)
return l
| [
1,
29871,
13,
1990,
28736,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
903,
333,
1919,
9210,
1125,
13,
4706,
1583,
3032,
333,
353,
903,
333,
13,
4706,
1583,
29889,
10289,
353,
9210,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
269,
353,
851,
29898,
1311,
3032,
333,
29897,
13,
4706,
565,
1583,
29889,
10289,
29901,
13,
9651,
269,
353,
269,
718,
5591,
29995,
29881,
29908,
1273,
1583,
29889,
10289,
13,
4706,
736,
269,
13,
13,
1990,
28736,
29931,
326,
1573,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
903,
333,
1919,
9210,
29892,
2159,
1125,
13,
4706,
1583,
3032,
333,
353,
903,
333,
13,
4706,
1583,
29889,
10289,
353,
9210,
13,
4706,
1583,
29889,
2311,
353,
2159,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
269,
353,
851,
29898,
1311,
3032,
333,
29897,
13,
4706,
565,
1583,
29889,
10289,
29901,
13,
9651,
269,
353,
269,
718,
5591,
29995,
29881,
29908,
1273,
1583,
29889,
10289,
13,
4706,
736,
269,
718,
376,
16664,
29881,
29908,
1273,
1583,
29889,
2311,
13,
13,
1753,
28736,
29931,
326,
1573,
1293,
6644,
7295,
13,
1678,
736,
1051,
580,
13,
13,
1753,
28736,
29931,
326,
1573,
1293,
9190,
29898,
29874,
29892,
301,
1125,
13,
1678,
301,
29889,
4397,
29898,
29874,
29897,
13,
1678,
736,
301,
13,
308,
13,
308,
13,
2
] |
ShapeFlow/deform_3_obj.py | vikasTmz/SP-GAN | 46 | 1600756 | <reponame>vikasTmz/SP-GAN<filename>ShapeFlow/deform_3_obj.py
import torch.optim as optim
from shapeflow.layers.chamfer_layer import ChamferDistKDTree
from shapeflow.layers.deformation_layer import NeuralFlowDeformer
from shapeflow.layers.pointnet_layer import PointNetEncoder
import torch
import numpy as np
from time import time
import trimesh
from glob import glob
files = sorted(glob("data/shapenet_watertight/val/03001627/*/*.ply"))
m1 = trimesh.load(files[1])
m2 = trimesh.load(files[6])
m3 = trimesh.load(files[7])
device = torch.device("cuda:0")
chamfer_dist = ChamferDistKDTree(reduction="mean", njobs=1).to(device)
criterion = torch.nn.MSELoss()
latent_size = 3
deformer = NeuralFlowDeformer(
latent_size=latent_size,
f_nlayers=6,
f_width=100,
s_nlayers=2,
s_width=5,
method="dopri5",
nonlinearity="elu",
arch="imnet",
adjoint=True,
atol=1e-4,
rtol=1e-4,
).to(device)
encoder = PointNetEncoder(
nf=16, out_features=latent_size, dropout_prob=0.0
).to(device)
# this is an awkward workaround to get gradients for encoder via adjoint solver
deformer.add_encoder(encoder)
deformer.to(device)
encoder = deformer.net.encoder
optimizer = optim.Adam(list(deformer.parameters()), lr=1e-3)
niter = 1000
npts = 5000
V1 = torch.tensor(m1.vertices.astype(np.float32)).to(device) # .unsqueeze(0)
V2 = torch.tensor(m2.vertices.astype(np.float32)).to(device) # .unsqueeze(0)
V3 = torch.tensor(m3.vertices.astype(np.float32)).to(device) # .unsqueeze(0)
loss_min = 1e30
tic = time()
encoder.train()
for it in range(0, niter):
optimizer.zero_grad()
seq1 = torch.randperm(V1.shape[0], device=device)[:npts]
seq2 = torch.randperm(V2.shape[0], device=device)[:npts]
seq3 = torch.randperm(V3.shape[0], device=device)[:npts]
V1_samp = V1[seq1]
V2_samp = V2[seq2]
V3_samp = V3[seq3]
V_src = torch.stack(
[V1_samp, V1_samp, V2_samp], dim=0
) # [batch, npoints, 3]
V_tar = torch.stack(
[V2_samp, V3_samp, V3_samp], dim=0
) # [batch, npoints, 3]
V_src_tar = torch.cat([V_src, V_tar], dim=0)
V_tar_src = torch.cat([V_tar, V_src], dim=0)
batch_latent_src_tar = encoder(V_src_tar)
batch_latent_tar_src = torch.cat(
[batch_latent_src_tar[3:], batch_latent_src_tar[:3]]
)
V_deform = deformer(V_src_tar, batch_latent_src_tar, batch_latent_tar_src)
_, _, dist = chamfer_dist(V_deform, V_tar_src)
loss = criterion(dist, torch.zeros_like(dist))
loss.backward()
optimizer.step()
if it % 100 == 0 or True:
print(f"iter={it}, loss={np.sqrt(loss.item())}")
toc = time()
print("Time for {} iters: {:.4f} s".format(niter, toc - tic))
# save deformed mesh
encoder.eval()
with torch.no_grad():
V1_latent = encoder(V1.unsqueeze(0))
V2_latent = encoder(V2.unsqueeze(0))
V3_latent = encoder(V3.unsqueeze(0))
V1_2 = (
deformer(V1.unsqueeze(0), V1_latent, V2_latent)
.detach()
.cpu()
.numpy()[0]
)
V2_1 = (
deformer(V2.unsqueeze(0), V2_latent, V1_latent)
.detach()
.cpu()
.numpy()[0]
)
V1_3 = (
deformer(V1.unsqueeze(0), V1_latent, V3_latent)
.detach()
.cpu()
.numpy()[0]
)
V3_1 = (
deformer(V3.unsqueeze(0), V3_latent, V1_latent)
.detach()
.cpu()
.numpy()[0]
)
V2_3 = (
deformer(V2.unsqueeze(0), V2_latent, V3_latent)
.detach()
.cpu()
.numpy()[0]
)
V3_2 = (
deformer(V3.unsqueeze(0), V3_latent, V2_latent)
.detach()
.cpu()
.numpy()[0]
)
trimesh.Trimesh(V1_2, m1.faces).export("demo/output_1_2.obj")
trimesh.Trimesh(V2_1, m2.faces).export("demo/output_2_1.obj")
trimesh.Trimesh(V1_3, m1.faces).export("demo/output_1_3.obj")
trimesh.Trimesh(V3_1, m3.faces).export("demo/output_3_1.obj")
trimesh.Trimesh(V2_3, m2.faces).export("demo/output_2_3.obj")
trimesh.Trimesh(V3_2, m3.faces).export("demo/output_3_2.obj")
m1.export("demo/output_1.obj")
m2.export("demo/output_2.obj")
m3.export("demo/output_3.obj")
| [
1,
529,
276,
1112,
420,
29958,
17064,
294,
29911,
29885,
29920,
29914,
5550,
29899,
29954,
2190,
29966,
9507,
29958,
24111,
17907,
29914,
311,
689,
29918,
29941,
29918,
5415,
29889,
2272,
13,
5215,
4842,
305,
29889,
20640,
408,
5994,
13,
13,
3166,
8267,
1731,
29889,
29277,
29889,
305,
314,
571,
29918,
13148,
1053,
13749,
571,
13398,
29968,
29928,
9643,
13,
3166,
8267,
1731,
29889,
29277,
29889,
311,
5404,
29918,
13148,
1053,
2448,
3631,
17907,
2772,
24784,
13,
3166,
8267,
1731,
29889,
29277,
29889,
3149,
1212,
29918,
13148,
1053,
8984,
6779,
8566,
6119,
13,
13,
5215,
4842,
305,
13,
5215,
12655,
408,
7442,
13,
3166,
931,
1053,
931,
13,
5215,
534,
1355,
29882,
13,
3166,
13149,
1053,
13149,
13,
13,
13,
5325,
353,
12705,
29898,
23705,
703,
1272,
29914,
845,
481,
264,
300,
29918,
29893,
271,
814,
523,
29914,
791,
29914,
29900,
29941,
29900,
29900,
29896,
29953,
29906,
29955,
29914,
3877,
10521,
17632,
5783,
13,
29885,
29896,
353,
534,
1355,
29882,
29889,
1359,
29898,
5325,
29961,
29896,
2314,
13,
29885,
29906,
353,
534,
1355,
29882,
29889,
1359,
29898,
5325,
29961,
29953,
2314,
13,
29885,
29941,
353,
534,
1355,
29882,
29889,
1359,
29898,
5325,
29961,
29955,
2314,
13,
10141,
353,
4842,
305,
29889,
10141,
703,
29883,
6191,
29901,
29900,
1159,
13,
13,
305,
314,
571,
29918,
5721,
353,
13749,
571,
13398,
29968,
29928,
9643,
29898,
9313,
428,
543,
12676,
613,
302,
9057,
29879,
29922,
29896,
467,
517,
29898,
10141,
29897,
13,
29883,
5385,
291,
353,
4842,
305,
29889,
15755,
29889,
29924,
1660,
29931,
2209,
580,
13,
13,
5066,
296,
29918,
2311,
353,
29871,
29941,
13,
13,
311,
24784,
353,
2448,
3631,
17907,
2772,
24784,
29898,
13,
1678,
3405,
296,
29918,
2311,
29922,
5066,
296,
29918,
2311,
29892,
13,
1678,
285,
29918,
29876,
29277,
29922,
29953,
29892,
13,
1678,
285,
29918,
2103,
29922,
29896,
29900,
29900,
29892,
13,
1678,
269,
29918,
29876,
29277,
29922,
29906,
29892,
13,
1678,
269,
29918,
2103,
29922,
29945,
29892,
13,
1678,
1158,
543,
29881,
459,
374,
29945,
613,
13,
1678,
1661,
10660,
537,
543,
295,
29884,
613,
13,
1678,
3190,
543,
326,
1212,
613,
13,
1678,
594,
12090,
29922,
5574,
29892,
13,
1678,
472,
324,
29922,
29896,
29872,
29899,
29946,
29892,
13,
1678,
364,
25027,
29922,
29896,
29872,
29899,
29946,
29892,
13,
467,
517,
29898,
10141,
29897,
13,
3977,
6119,
353,
8984,
6779,
8566,
6119,
29898,
13,
1678,
302,
29888,
29922,
29896,
29953,
29892,
714,
29918,
22100,
29922,
5066,
296,
29918,
2311,
29892,
5768,
449,
29918,
22795,
29922,
29900,
29889,
29900,
13,
467,
517,
29898,
10141,
29897,
13,
13,
29937,
445,
338,
385,
13689,
1328,
14725,
304,
679,
4656,
10070,
363,
2094,
6119,
3025,
594,
12090,
899,
369,
13,
311,
24784,
29889,
1202,
29918,
3977,
6119,
29898,
3977,
6119,
29897,
13,
311,
24784,
29889,
517,
29898,
10141,
29897,
13,
3977,
6119,
353,
316,
24784,
29889,
1212,
29889,
3977,
6119,
13,
13,
20640,
3950,
353,
5994,
29889,
3253,
314,
29898,
1761,
29898,
311,
24784,
29889,
16744,
25739,
301,
29878,
29922,
29896,
29872,
29899,
29941,
29897,
13,
13,
29876,
1524,
353,
29871,
29896,
29900,
29900,
29900,
13,
29876,
16485,
353,
29871,
29945,
29900,
29900,
29900,
13,
13,
29963,
29896,
353,
4842,
305,
29889,
20158,
29898,
29885,
29896,
29889,
1765,
1575,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8106,
517,
29898,
10141,
29897,
29871,
396,
869,
6948,
802,
29872,
911,
29898,
29900,
29897,
13,
29963,
29906,
353,
4842,
305,
29889,
20158,
29898,
29885,
29906,
29889,
1765,
1575,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8106,
517,
29898,
10141,
29897,
29871,
396,
869,
6948,
802,
29872,
911,
29898,
29900,
29897,
13,
29963,
29941,
353,
4842,
305,
29889,
20158,
29898,
29885,
29941,
29889,
1765,
1575,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8106,
517,
29898,
10141,
29897,
29871,
396,
869,
6948,
802,
29872,
911,
29898,
29900,
29897,
13,
13,
6758,
29918,
1195,
353,
29871,
29896,
29872,
29941,
29900,
13,
29873,
293,
353,
931,
580,
13,
3977,
6119,
29889,
14968,
580,
13,
13,
1454,
372,
297,
3464,
29898,
29900,
29892,
302,
1524,
1125,
13,
1678,
5994,
3950,
29889,
9171,
29918,
5105,
580,
13,
13,
1678,
19359,
29896,
353,
4842,
305,
29889,
9502,
17858,
29898,
29963,
29896,
29889,
12181,
29961,
29900,
1402,
4742,
29922,
10141,
29897,
7503,
29876,
16485,
29962,
13,
1678,
19359,
29906,
353,
4842,
305,
29889,
9502,
17858,
29898,
29963,
29906,
29889,
12181,
29961,
29900,
1402,
4742,
29922,
10141,
29897,
7503,
29876,
16485,
29962,
13,
1678,
19359,
29941,
353,
4842,
305,
29889,
9502,
17858,
29898,
29963,
29941,
29889,
12181,
29961,
29900,
1402,
4742,
29922,
10141,
29897,
7503,
29876,
16485,
29962,
13,
1678,
478,
29896,
29918,
29879,
1160,
353,
478,
29896,
29961,
11762,
29896,
29962,
13,
1678,
478,
29906,
29918,
29879,
1160,
353,
478,
29906,
29961,
11762,
29906,
29962,
13,
1678,
478,
29941,
29918,
29879,
1160,
353,
478,
29941,
29961,
11762,
29941,
29962,
13,
13,
1678,
478,
29918,
4351,
353,
4842,
305,
29889,
1429,
29898,
13,
4706,
518,
29963,
29896,
29918,
29879,
1160,
29892,
478,
29896,
29918,
29879,
1160,
29892,
478,
29906,
29918,
29879,
1160,
1402,
3964,
29922,
29900,
13,
1678,
1723,
29871,
396,
518,
16175,
29892,
302,
9748,
29892,
29871,
29941,
29962,
13,
1678,
478,
29918,
12637,
353,
4842,
305,
29889,
1429,
29898,
13,
4706,
518,
29963,
29906,
29918,
29879,
1160,
29892,
478,
29941,
29918,
29879,
1160,
29892,
478,
29941,
29918,
29879,
1160,
1402,
3964,
29922,
29900,
13,
1678,
1723,
29871,
396,
518,
16175,
29892,
302,
9748,
29892,
29871,
29941,
29962,
13,
13,
1678,
478,
29918,
4351,
29918,
12637,
353,
4842,
305,
29889,
4117,
4197,
29963,
29918,
4351,
29892,
478,
29918,
12637,
1402,
3964,
29922,
29900,
29897,
13,
1678,
478,
29918,
12637,
29918,
4351,
353,
4842,
305,
29889,
4117,
4197,
29963,
29918,
12637,
29892,
478,
29918,
4351,
1402,
3964,
29922,
29900,
29897,
13,
13,
1678,
9853,
29918,
5066,
296,
29918,
4351,
29918,
12637,
353,
2094,
6119,
29898,
29963,
29918,
4351,
29918,
12637,
29897,
13,
1678,
9853,
29918,
5066,
296,
29918,
12637,
29918,
4351,
353,
4842,
305,
29889,
4117,
29898,
13,
4706,
518,
16175,
29918,
5066,
296,
29918,
4351,
29918,
12637,
29961,
29941,
29901,
1402,
9853,
29918,
5066,
296,
29918,
4351,
29918,
12637,
7503,
29941,
5262,
13,
1678,
1723,
13,
13,
1678,
478,
29918,
311,
689,
353,
316,
24784,
29898,
29963,
29918,
4351,
29918,
12637,
29892,
9853,
29918,
5066,
296,
29918,
4351,
29918,
12637,
29892,
9853,
29918,
5066,
296,
29918,
12637,
29918,
4351,
29897,
13,
13,
1678,
17117,
17117,
1320,
353,
11179,
571,
29918,
5721,
29898,
29963,
29918,
311,
689,
29892,
478,
29918,
12637,
29918,
4351,
29897,
13,
13,
1678,
6410,
353,
28770,
291,
29898,
5721,
29892,
4842,
305,
29889,
3298,
359,
29918,
4561,
29898,
5721,
876,
13,
13,
1678,
6410,
29889,
1627,
1328,
580,
13,
1678,
5994,
3950,
29889,
10568,
580,
13,
13,
1678,
565,
372,
1273,
29871,
29896,
29900,
29900,
1275,
29871,
29900,
470,
5852,
29901,
13,
4706,
1596,
29898,
29888,
29908,
1524,
3790,
277,
1118,
6410,
3790,
9302,
29889,
3676,
29898,
6758,
29889,
667,
580,
2915,
1159,
13,
13,
517,
29883,
353,
931,
580,
13,
2158,
703,
2481,
363,
6571,
372,
414,
29901,
12365,
29889,
29946,
29888,
29913,
269,
1642,
4830,
29898,
29876,
1524,
29892,
304,
29883,
448,
260,
293,
876,
13,
13,
29937,
4078,
316,
15628,
27716,
13,
3977,
6119,
29889,
14513,
580,
13,
2541,
4842,
305,
29889,
1217,
29918,
5105,
7295,
13,
1678,
478,
29896,
29918,
5066,
296,
353,
2094,
6119,
29898,
29963,
29896,
29889,
6948,
802,
29872,
911,
29898,
29900,
876,
13,
1678,
478,
29906,
29918,
5066,
296,
353,
2094,
6119,
29898,
29963,
29906,
29889,
6948,
802,
29872,
911,
29898,
29900,
876,
13,
1678,
478,
29941,
29918,
5066,
296,
353,
2094,
6119,
29898,
29963,
29941,
29889,
6948,
802,
29872,
911,
29898,
29900,
876,
13,
13,
1678,
478,
29896,
29918,
29906,
353,
313,
13,
4706,
316,
24784,
29898,
29963,
29896,
29889,
6948,
802,
29872,
911,
29898,
29900,
511,
478,
29896,
29918,
5066,
296,
29892,
478,
29906,
29918,
5066,
296,
29897,
13,
4706,
869,
4801,
496,
580,
13,
4706,
869,
21970,
580,
13,
4706,
869,
23749,
580,
29961,
29900,
29962,
13,
1678,
1723,
13,
1678,
478,
29906,
29918,
29896,
353,
313,
13,
4706,
316,
24784,
29898,
29963,
29906,
29889,
6948,
802,
29872,
911,
29898,
29900,
511,
478,
29906,
29918,
5066,
296,
29892,
478,
29896,
29918,
5066,
296,
29897,
13,
4706,
869,
4801,
496,
580,
13,
4706,
869,
21970,
580,
13,
4706,
869,
23749,
580,
29961,
29900,
29962,
13,
1678,
1723,
13,
1678,
478,
29896,
29918,
29941,
353,
313,
13,
4706,
316,
24784,
29898,
29963,
29896,
29889,
6948,
802,
29872,
911,
29898,
29900,
511,
478,
29896,
29918,
5066,
296,
29892,
478,
29941,
29918,
5066,
296,
29897,
13,
4706,
869,
4801,
496,
580,
13,
4706,
869,
21970,
580,
13,
4706,
869,
23749,
580,
29961,
29900,
29962,
13,
1678,
1723,
13,
1678,
478,
29941,
29918,
29896,
353,
313,
13,
4706,
316,
24784,
29898,
29963,
29941,
29889,
6948,
802,
29872,
911,
29898,
29900,
511,
478,
29941,
29918,
5066,
296,
29892,
478,
29896,
29918,
5066,
296,
29897,
13,
4706,
869,
4801,
496,
580,
13,
4706,
869,
21970,
580,
13,
4706,
869,
23749,
580,
29961,
29900,
29962,
13,
1678,
1723,
13,
1678,
478,
29906,
29918,
29941,
353,
313,
13,
4706,
316,
24784,
29898,
29963,
29906,
29889,
6948,
802,
29872,
911,
29898,
29900,
511,
478,
29906,
29918,
5066,
296,
29892,
478,
29941,
29918,
5066,
296,
29897,
13,
4706,
869,
4801,
496,
580,
13,
4706,
869,
21970,
580,
13,
4706,
869,
23749,
580,
29961,
29900,
29962,
13,
1678,
1723,
13,
1678,
478,
29941,
29918,
29906,
353,
313,
13,
4706,
316,
24784,
29898,
29963,
29941,
29889,
6948,
802,
29872,
911,
29898,
29900,
511,
478,
29941,
29918,
5066,
296,
29892,
478,
29906,
29918,
5066,
296,
29897,
13,
4706,
869,
4801,
496,
580,
13,
4706,
869,
21970,
580,
13,
4706,
869,
23749,
580,
29961,
29900,
29962,
13,
1678,
1723,
13,
509,
1355,
29882,
29889,
2308,
1355,
29882,
29898,
29963,
29896,
29918,
29906,
29892,
286,
29896,
29889,
8726,
467,
15843,
703,
17482,
29914,
4905,
29918,
29896,
29918,
29906,
29889,
5415,
1159,
13,
509,
1355,
29882,
29889,
2308,
1355,
29882,
29898,
29963,
29906,
29918,
29896,
29892,
286,
29906,
29889,
8726,
467,
15843,
703,
17482,
29914,
4905,
29918,
29906,
29918,
29896,
29889,
5415,
1159,
13,
509,
1355,
29882,
29889,
2308,
1355,
29882,
29898,
29963,
29896,
29918,
29941,
29892,
286,
29896,
29889,
8726,
467,
15843,
703,
17482,
29914,
4905,
29918,
29896,
29918,
29941,
29889,
5415,
1159,
13,
509,
1355,
29882,
29889,
2308,
1355,
29882,
29898,
29963,
29941,
29918,
29896,
29892,
286,
29941,
29889,
8726,
467,
15843,
703,
17482,
29914,
4905,
29918,
29941,
29918,
29896,
29889,
5415,
1159,
13,
509,
1355,
29882,
29889,
2308,
1355,
29882,
29898,
29963,
29906,
29918,
29941,
29892,
286,
29906,
29889,
8726,
467,
15843,
703,
17482,
29914,
4905,
29918,
29906,
29918,
29941,
29889,
5415,
1159,
13,
509,
1355,
29882,
29889,
2308,
1355,
29882,
29898,
29963,
29941,
29918,
29906,
29892,
286,
29941,
29889,
8726,
467,
15843,
703,
17482,
29914,
4905,
29918,
29941,
29918,
29906,
29889,
5415,
1159,
13,
13,
29885,
29896,
29889,
15843,
703,
17482,
29914,
4905,
29918,
29896,
29889,
5415,
1159,
13,
29885,
29906,
29889,
15843,
703,
17482,
29914,
4905,
29918,
29906,
29889,
5415,
1159,
13,
29885,
29941,
29889,
15843,
703,
17482,
29914,
4905,
29918,
29941,
29889,
5415,
1159,
13,
2
] |
shadow4/syned/absorbers/absorber.py | srio/minishadow | 1 | 189031 |
from syned.beamline.optical_element import OpticalElement
from syned.beamline.shape import BoundaryShape
class Absorber(OpticalElement):
def __init__(self, name="Undefined", boundary_shape=None):
if boundary_shape is None:
boundary_shape = BoundaryShape()
OpticalElement.__init__(self, name=name, boundary_shape=boundary_shape) | [
1,
29871,
13,
3166,
5222,
287,
29889,
915,
314,
1220,
29889,
3670,
936,
29918,
5029,
1053,
20693,
936,
2642,
13,
3166,
5222,
287,
29889,
915,
314,
1220,
29889,
12181,
1053,
350,
618,
653,
24111,
13,
13,
1990,
24650,
272,
495,
29898,
20624,
936,
2642,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
543,
25263,
5598,
613,
10452,
29918,
12181,
29922,
8516,
1125,
13,
4706,
565,
10452,
29918,
12181,
338,
6213,
29901,
13,
9651,
10452,
29918,
12181,
353,
350,
618,
653,
24111,
580,
13,
4706,
20693,
936,
2642,
17255,
2344,
12035,
1311,
29892,
1024,
29922,
978,
29892,
10452,
29918,
12181,
29922,
9917,
653,
29918,
12181,
29897,
2
] |
climpred/tests/__init__.py | aaronspring/climpred | 0 | 151058 | import importlib
from distutils import version
import pytest
def _importorskip(modname, minversion=None):
try:
mod = importlib.import_module(modname)
has = True
if minversion is not None:
if LooseVersion(mod.__version__) < LooseVersion(minversion):
raise ImportError("Minimum version not satisfied")
except ImportError:
has = False
func = pytest.mark.skipif(not has, reason=f"requires {modname}")
return has, func
def LooseVersion(vstring):
# Our development version is something like '0.10.9+aac7bfc'
# This function just ignored the git commit id.
vstring = vstring.split("+")[0]
return version.LooseVersion(vstring)
has_matplotlib, requires_matplotlib = _importorskip("matplotlib")
has_nc_time_axis, requires_nc_time_axis = _importorskip("nc_time_axis", "1.4.0")
has_xclim, requires_xclim = _importorskip("xclim", "0.31")
has_bias_correction, requires_bias_correction = _importorskip("bias_correction")
has_xesmf, requires_xesmf = _importorskip("xesmf")
has_xrft, requires_xrft = _importorskip("xrft")
has_eofs, requires_eofs = _importorskip("eofs")
| [
1,
1053,
1053,
1982,
13,
3166,
1320,
13239,
1053,
1873,
13,
13,
5215,
11451,
1688,
13,
13,
13,
1753,
903,
5215,
272,
11014,
29898,
1545,
978,
29892,
1375,
3259,
29922,
8516,
1125,
13,
1678,
1018,
29901,
13,
4706,
878,
353,
1053,
1982,
29889,
5215,
29918,
5453,
29898,
1545,
978,
29897,
13,
4706,
756,
353,
5852,
13,
4706,
565,
1375,
3259,
338,
451,
6213,
29901,
13,
9651,
565,
4309,
852,
6594,
29898,
1545,
17255,
3259,
1649,
29897,
529,
4309,
852,
6594,
29898,
1195,
3259,
1125,
13,
18884,
12020,
16032,
2392,
703,
8140,
12539,
1873,
451,
15787,
1159,
13,
1678,
5174,
16032,
2392,
29901,
13,
4706,
756,
353,
7700,
13,
1678,
3653,
353,
11451,
1688,
29889,
3502,
29889,
11014,
361,
29898,
1333,
756,
29892,
2769,
29922,
29888,
29908,
276,
339,
2658,
426,
1545,
978,
27195,
13,
1678,
736,
756,
29892,
3653,
13,
13,
13,
1753,
4309,
852,
6594,
29898,
29894,
1807,
1125,
13,
1678,
396,
8680,
5849,
1873,
338,
1554,
763,
525,
29900,
29889,
29896,
29900,
29889,
29929,
29974,
29874,
562,
29955,
1635,
29883,
29915,
13,
1678,
396,
910,
740,
925,
17262,
278,
6315,
9063,
1178,
29889,
13,
1678,
325,
1807,
353,
325,
1807,
29889,
5451,
703,
29974,
1159,
29961,
29900,
29962,
13,
1678,
736,
1873,
29889,
3410,
852,
6594,
29898,
29894,
1807,
29897,
13,
13,
13,
5349,
29918,
2922,
17357,
29892,
6858,
29918,
2922,
17357,
353,
903,
5215,
272,
11014,
703,
2922,
17357,
1159,
13,
5349,
29918,
17608,
29918,
2230,
29918,
8990,
29892,
6858,
29918,
17608,
29918,
2230,
29918,
8990,
353,
903,
5215,
272,
11014,
703,
17608,
29918,
2230,
29918,
8990,
613,
376,
29896,
29889,
29946,
29889,
29900,
1159,
13,
5349,
29918,
29916,
695,
326,
29892,
6858,
29918,
29916,
695,
326,
353,
903,
5215,
272,
11014,
703,
29916,
695,
326,
613,
376,
29900,
29889,
29941,
29896,
1159,
13,
5349,
29918,
29890,
3173,
29918,
2616,
276,
428,
29892,
6858,
29918,
29890,
3173,
29918,
2616,
276,
428,
353,
903,
5215,
272,
11014,
703,
29890,
3173,
29918,
2616,
276,
428,
1159,
13,
5349,
29918,
9100,
29885,
29888,
29892,
6858,
29918,
9100,
29885,
29888,
353,
903,
5215,
272,
11014,
703,
9100,
29885,
29888,
1159,
13,
5349,
29918,
29916,
29878,
615,
29892,
6858,
29918,
29916,
29878,
615,
353,
903,
5215,
272,
11014,
703,
29916,
29878,
615,
1159,
13,
5349,
29918,
29872,
974,
29879,
29892,
6858,
29918,
29872,
974,
29879,
353,
903,
5215,
272,
11014,
703,
29872,
974,
29879,
1159,
13,
2
] |
Intermediate/main.py | fredtheninja/100-Days-of-Code | 0 | 65389 | <reponame>fredtheninja/100-Days-of-Code
from turtle import Screen
from snake import Snake
import time
screen = Screen()
screen.setup(width=600, height=600)
screen.bgcolor("black")
screen.title("Snake")
screen.tracer(0)
# -----------------------------Angela-----------------------------------#
snake = Snake()
screen.listen()
screen.onkey(snake.up, "Up")
screen.onkey(snake.down, "Down")
screen.onkey(snake.left, "Left")
screen.onkey(snake.right, "Right")
game_is_on = True
while game_is_on:
screen.update()
time.sleep(0.1)
snake.move()
# -----------------------------FredTheNinja-----------------------------------#
# # my solution to challenge 1
# bodies = 3
# x = 0
# y = 0
# for i in range(0, bodies):
# snake = Turtle(shape="square")
# snake.color("white")
# snake.shapesize(1)
# snake.pu()
# snake.goto(x, y)
# x -= 20
screen.exitonclick()
| [
1,
529,
276,
1112,
420,
29958,
18447,
6098,
262,
1764,
29914,
29896,
29900,
29900,
29899,
25991,
29899,
974,
29899,
3399,
13,
3166,
260,
4227,
280,
1053,
22666,
13,
3166,
269,
21040,
1053,
317,
21040,
13,
5215,
931,
13,
13,
10525,
353,
22666,
580,
13,
10525,
29889,
14669,
29898,
2103,
29922,
29953,
29900,
29900,
29892,
3171,
29922,
29953,
29900,
29900,
29897,
13,
10525,
29889,
16264,
2780,
703,
8517,
1159,
13,
10525,
29889,
3257,
703,
29903,
21040,
1159,
13,
10525,
29889,
29873,
945,
261,
29898,
29900,
29897,
13,
13,
29937,
448,
2683,
9072,
9928,
3100,
2683,
2683,
5634,
29937,
13,
13,
29879,
21040,
353,
317,
21040,
580,
13,
10525,
29889,
20631,
580,
13,
10525,
29889,
265,
1989,
29898,
29879,
21040,
29889,
786,
29892,
376,
3373,
1159,
13,
10525,
29889,
265,
1989,
29898,
29879,
21040,
29889,
3204,
29892,
376,
6767,
1159,
13,
10525,
29889,
265,
1989,
29898,
29879,
21040,
29889,
1563,
29892,
376,
8091,
1159,
13,
10525,
29889,
265,
1989,
29898,
29879,
21040,
29889,
1266,
29892,
376,
7341,
1159,
13,
13,
11802,
29918,
275,
29918,
265,
353,
5852,
13,
13,
8000,
3748,
29918,
275,
29918,
265,
29901,
13,
1678,
4315,
29889,
5504,
580,
13,
1678,
931,
29889,
17059,
29898,
29900,
29889,
29896,
29897,
13,
1678,
269,
21040,
29889,
11631,
580,
13,
13,
13,
29937,
448,
2683,
9072,
29943,
1127,
1576,
29940,
262,
1764,
2683,
2683,
5634,
29937,
13,
13,
29937,
396,
590,
1650,
304,
18766,
29871,
29896,
13,
29937,
17873,
353,
29871,
29941,
13,
29937,
921,
353,
29871,
29900,
13,
29937,
343,
353,
29871,
29900,
13,
13,
29937,
363,
474,
297,
3464,
29898,
29900,
29892,
17873,
1125,
13,
29937,
268,
269,
21040,
353,
323,
4227,
280,
29898,
12181,
543,
17619,
1159,
13,
29937,
268,
269,
21040,
29889,
2780,
703,
10921,
1159,
13,
29937,
268,
269,
21040,
29889,
845,
11603,
675,
29898,
29896,
29897,
13,
29937,
268,
269,
21040,
29889,
3746,
580,
13,
29937,
268,
269,
21040,
29889,
27102,
29898,
29916,
29892,
343,
29897,
13,
29937,
268,
921,
22361,
29871,
29906,
29900,
13,
13,
13,
10525,
29889,
13322,
265,
3808,
580,
13,
2
] |
sample.py | leeamen/threadpool | 3 | 166982 | #!/usr/bin/python
#coding:utf-8
import mylog
import mythreadpool as tp
import logging
if __name__ == '__main__':
logger = logging.getLogger(__name__)
def process(args):
logger.info('task %d is finished!', args['taskid'])
threadpool = tp.MyThreadPool(2)
for i in range(1,10):
threadpool.DispatchTask(process, {'taskid':i})
threadpool.Destroy()
| [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
29937,
29883,
3689,
29901,
9420,
29899,
29947,
13,
13,
5215,
590,
1188,
13,
5215,
590,
7097,
10109,
408,
260,
29886,
13,
5215,
12183,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
29871,
17927,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
259,
13,
29871,
822,
1889,
29898,
5085,
1125,
13,
1678,
17927,
29889,
3888,
877,
7662,
1273,
29881,
338,
7743,
29991,
742,
6389,
1839,
7662,
333,
11287,
13,
259,
13,
29871,
3244,
10109,
353,
260,
29886,
29889,
3421,
23574,
29898,
29906,
29897,
13,
29871,
363,
474,
297,
3464,
29898,
29896,
29892,
29896,
29900,
1125,
13,
1678,
3244,
10109,
29889,
14777,
5398,
29898,
5014,
29892,
11117,
7662,
333,
2396,
29875,
1800,
13,
29871,
3244,
10109,
29889,
14994,
4727,
580,
13,
13,
2
] |
hatch/structures.py | kapb14/hatch | 1 | 92496 | <gh_stars>1-10
import os
from urllib.parse import urlencode
class File:
def __init__(self, file_name, contents, binary=False):
self.file_name = file_name
self.contents = contents
self.write_mode = 'wb' if binary else 'w'
def write(self, d):
if not os.path.exists(d):
os.makedirs(d)
with open(os.path.join(d, self.file_name), self.write_mode) as f:
f.write(self.contents)
class Badge:
def __init__(self, image, target, alt, params=None):
self.image = image
self.target = target
self.alt = alt
if params:
self.image += '?' + urlencode(params)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
2897,
13,
3166,
3142,
1982,
29889,
5510,
1053,
3142,
12508,
13,
13,
13,
1990,
3497,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
934,
29918,
978,
29892,
8118,
29892,
7581,
29922,
8824,
1125,
13,
4706,
1583,
29889,
1445,
29918,
978,
353,
934,
29918,
978,
13,
4706,
1583,
29889,
10853,
353,
8118,
13,
4706,
1583,
29889,
3539,
29918,
8513,
353,
525,
29893,
29890,
29915,
565,
7581,
1683,
525,
29893,
29915,
13,
13,
1678,
822,
2436,
29898,
1311,
29892,
270,
1125,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
29881,
1125,
13,
9651,
2897,
29889,
29885,
12535,
12935,
29898,
29881,
29897,
13,
13,
4706,
411,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
29881,
29892,
1583,
29889,
1445,
29918,
978,
511,
1583,
29889,
3539,
29918,
8513,
29897,
408,
285,
29901,
13,
9651,
285,
29889,
3539,
29898,
1311,
29889,
10853,
29897,
13,
13,
13,
1990,
9178,
479,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1967,
29892,
3646,
29892,
5272,
29892,
8636,
29922,
8516,
1125,
13,
4706,
1583,
29889,
3027,
353,
1967,
13,
4706,
1583,
29889,
5182,
353,
3646,
13,
4706,
1583,
29889,
1997,
353,
5272,
13,
13,
4706,
565,
8636,
29901,
13,
9651,
1583,
29889,
3027,
4619,
525,
17901,
718,
3142,
12508,
29898,
7529,
29897,
13,
2
] |
ansible/venv/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_policy_import.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 17 | 11250 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'certified'}
DOCUMENTATION = r'''
---
module: bigip_asm_policy_import
short_description: Manage BIG-IP ASM policy imports
description:
- Manage BIG-IP ASM policies policy imports.
version_added: 2.8
options:
name:
description:
- The ASM policy to create or override.
type: str
required: True
inline:
description:
- When specified the ASM policy is created from a provided string.
- Content needs to be provided in a valid XML format otherwise the operation will fail.
type: str
source:
description:
- Full path to a policy file to be imported into the BIG-IP ASM.
- Policy files exported from newer versions of BIG-IP cannot be imported into older
versions of BIG-IP. The opposite, however, is true; you can import older into
newer.
- The file format can be binary of XML.
type: path
force:
description:
- When set to C(yes) any existing policy with the same name will be overwritten by the new import.
- Works for both inline and file imports, if the policy does not exist this setting is ignored.
default: no
type: bool
partition:
description:
- Device partition to create policy on.
type: str
default: Common
extends_documentation_fragment: f5
author:
- <NAME> (@wojtek0806)
'''
EXAMPLES = r'''
- name: Import ASM policy
bigip_asm_policy_import:
name: new_asm_policy
file: /root/asm_policy.xml
provider:
server: lb.mydomain.com
user: admin
password: <PASSWORD>
delegate_to: localhost
- name: Import ASM policy inline
bigip_asm_policy_import:
name: foo-policy4
inline: <xml>content</xml>
provider:
server: lb.mydomain.com
user: admin
password: <PASSWORD>
delegate_to: localhost
- name: Override existing ASM policy
bigip_asm_policy:
name: new_asm_policy
file: /root/asm_policy_new.xml
force: yes
provider:
server: lb.mydomain.com
user: admin
password: <PASSWORD>
delegate_to: localhost
'''
RETURN = r'''
source:
description: Local path to an ASM policy file.
returned: changed
type: str
sample: /root/some_policy.xml
inline:
description: Contents of policy as an inline string
returned: changed
type: str
sample: <xml>foobar contents</xml>
name:
description: Name of the ASM policy to be created/overwritten
returned: changed
type: str
sample: Asm_APP1_Transparent
force:
description: Set when overwriting an existing policy
returned: changed
type: bool
sample: yes
'''
import os
import time
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.basic import env_fallback
try:
from library.module_utils.network.f5.bigip import F5RestClient
from library.module_utils.network.f5.common import F5ModuleError
from library.module_utils.network.f5.common import AnsibleF5Parameters
from library.module_utils.network.f5.common import fq_name
from library.module_utils.network.f5.common import transform_name
from library.module_utils.network.f5.common import f5_argument_spec
from library.module_utils.network.f5.icontrol import upload_file
from library.module_utils.network.f5.icontrol import module_provisioned
except ImportError:
from ansible.module_utils.network.f5.bigip import F5RestClient
from ansible.module_utils.network.f5.common import F5ModuleError
from ansible.module_utils.network.f5.common import AnsibleF5Parameters
from ansible.module_utils.network.f5.common import fq_name
from ansible.module_utils.network.f5.common import transform_name
from ansible.module_utils.network.f5.common import f5_argument_spec
from ansible.module_utils.network.f5.icontrol import upload_file
from ansible.module_utils.network.f5.icontrol import module_provisioned
class Parameters(AnsibleF5Parameters):
updatables = []
returnables = [
'name',
'inline',
'source',
'force'
]
api_attributes = [
'file',
'name',
]
api_map = {
'file': 'inline',
'filename': 'source',
}
class ApiParameters(Parameters):
pass
class ModuleParameters(Parameters):
pass
class Changes(Parameters):
def to_return(self):
result = {}
try:
for returnable in self.returnables:
result[returnable] = getattr(self, returnable)
result = self._filter_params(result)
except Exception:
pass
return result
class UsableChanges(Changes):
pass
class ReportableChanges(Changes):
pass
class Difference(object):
def __init__(self, want, have=None):
self.want = want
self.have = have
def compare(self, param):
try:
result = getattr(self, param)
return result
except AttributeError:
return self.__default(param)
def __default(self, param):
attr1 = getattr(self.want, param)
try:
attr2 = getattr(self.have, param)
if attr1 != attr2:
return attr1
except AttributeError:
return attr1
class ModuleManager(object):
def __init__(self, *args, **kwargs):
self.module = kwargs.get('module', None)
self.client = F5RestClient(**self.module.params)
self.want = ModuleParameters(params=self.module.params)
self.changes = UsableChanges()
def _set_changed_options(self):
changed = {}
for key in Parameters.returnables:
if getattr(self.want, key) is not None:
changed[key] = getattr(self.want, key)
if changed:
self.changes = UsableChanges(params=changed)
def _announce_deprecations(self, result):
warnings = result.pop('__warnings', [])
for warning in warnings:
self.client.module.deprecate(
msg=warning['msg'],
version=warning['version']
)
def exec_module(self):
if not module_provisioned(self.client, 'asm'):
raise F5ModuleError(
"ASM must be provisioned to use this module."
)
result = dict()
changed = self.policy_import()
reportable = ReportableChanges(params=self.changes.to_return())
changes = reportable.to_return()
result.update(**changes)
result.update(dict(changed=changed))
self._announce_deprecations(result)
return result
def policy_import(self):
self._set_changed_options()
if self.module.check_mode:
return True
if self.exists():
if self.want.force is False:
return False
if self.want.inline:
task = self.inline_import()
self.wait_for_task(task)
return True
self.import_file_to_device()
self.remove_temp_policy_from_device()
return True
def exists(self):
uri = 'https://{0}:{1}/mgmt/tm/asm/policies/'.format(
self.client.provider['server'],
self.client.provider['server_port'],
)
query = "?$filter=contains(name,'{0}')+and+contains(partition,'{1}')&$select=name,partition".format(
self.want.name, self.want.partition
)
resp = self.client.api.get(uri + query)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'items' in response and response['items'] != []:
return True
return False
def upload_file_to_device(self, content, name):
url = 'https://{0}:{1}/mgmt/shared/file-transfer/uploads'.format(
self.client.provider['server'],
self.client.provider['server_port']
)
try:
upload_file(self.client, url, content, name)
except F5ModuleError:
raise F5ModuleError(
"Failed to upload the file."
)
def _get_policy_link(self):
uri = 'https://{0}:{1}/mgmt/tm/asm/policies/'.format(
self.client.provider['server'],
self.client.provider['server_port'],
)
query = "?$filter=contains(name,'{0}')+and+contains(partition,'{1}')&$select=name,partition".format(
self.want.name, self.want.partition
)
resp = self.client.api.get(uri + query)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
policy_link = response['items'][0]['selfLink']
return policy_link
def inline_import(self):
params = self.changes.api_params()
uri = "https://{0}:{1}/mgmt/tm/asm/tasks/import-policy/".format(
self.client.provider['server'],
self.client.provider['server_port'],
)
if self.want.force:
params.update(dict(policyReference={'link': self._get_policy_link()}))
params.pop('name')
resp = self.client.api.post(uri, json=params)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] in [400, 403]:
if 'message' in response:
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content)
return response['id']
def wait_for_task(self, task_id):
uri = "https://{0}:{1}/mgmt/tm/asm/tasks/import-policy/{2}".format(
self.client.provider['server'],
self.client.provider['server_port'],
task_id
)
while True:
resp = self.client.api.get(uri)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] == 400:
if 'message' in response:
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content)
if response['status'] in ['COMPLETED', 'FAILURE']:
break
time.sleep(1)
if response['status'] == 'FAILURE':
raise F5ModuleError(
'Failed to import ASM policy.'
)
if response['status'] == 'COMPLETED':
return True
def import_file_to_device(self):
name = os.path.split(self.want.source)[1]
self.upload_file_to_device(self.want.source, name)
time.sleep(2)
full_name = fq_name(self.want.partition, self.want.name)
if self.want.force:
cmd = 'tmsh load asm policy {0} file /var/config/rest/downloads/{1} overwrite'.format(full_name, name)
else:
cmd = 'tmsh load asm policy {0} file /var/config/rest/downloads/{1}'.format(full_name, name)
uri = "https://{0}:{1}/mgmt/tm/util/bash/".format(
self.client.provider['server'],
self.client.provider['server_port'],
)
args = dict(
command='run',
utilCmdArgs='-c "{0}"'.format(cmd)
)
resp = self.client.api.post(uri, json=args)
try:
response = resp.json()
if 'commandResult' in response:
if 'Unexpected Error' in response['commandResult']:
raise F5ModuleError(response['commandResult'])
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] == 400:
if 'message' in response:
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content)
return True
def remove_temp_policy_from_device(self):
name = os.path.split(self.want.source)[1]
tpath_name = '/var/config/rest/downloads/{0}'.format(name)
uri = "https://{0}:{1}/mgmt/tm/util/unix-rm/".format(
self.client.provider['server'],
self.client.provider['server_port'],
)
args = dict(
command='run',
utilCmdArgs=tpath_name
)
resp = self.client.api.post(uri, json=args)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] == 400:
if 'message' in response:
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content)
class ArgumentSpec(object):
def __init__(self):
self.supports_check_mode = True
argument_spec = dict(
name=dict(
required=True,
),
source=dict(type='path'),
inline=dict(),
force=dict(
type='bool',
default='no'
),
partition=dict(
default='Common',
fallback=(env_fallback, ['F5_PARTITION'])
)
)
self.argument_spec = {}
self.argument_spec.update(f5_argument_spec)
self.argument_spec.update(argument_spec)
self.mutually_exclusive = [
['source', 'inline']
]
def main():
spec = ArgumentSpec()
module = AnsibleModule(
argument_spec=spec.argument_spec,
supports_check_mode=spec.supports_check_mode,
mutually_exclusive=spec.mutually_exclusive
)
try:
mm = ModuleManager(module=module)
results = mm.exec_module()
module.exit_json(**results)
except F5ModuleError as ex:
module.fail_json(msg=str(ex))
if __name__ == '__main__':
main()
| [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
13,
29937,
14187,
1266,
29901,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29947,
29892,
383,
29945,
8527,
29879,
9266,
29889,
13,
29937,
15143,
4593,
5236,
19245,
325,
29941,
29889,
29900,
313,
4149,
315,
4590,
29979,
4214,
470,
2045,
597,
1636,
29889,
18713,
29889,
990,
29914,
506,
11259,
29914,
29887,
572,
29899,
29941,
29889,
29900,
29889,
3945,
29897,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
13,
1649,
2527,
562,
605,
1649,
353,
1134,
13,
13,
13,
2190,
5425,
29933,
1307,
29918,
2303,
29911,
3035,
8254,
353,
11117,
19635,
29918,
3259,
2396,
525,
29896,
29889,
29896,
742,
13,
462,
1678,
525,
4882,
2396,
6024,
25347,
7464,
13,
462,
1678,
525,
23765,
29918,
1609,
2396,
525,
6327,
2164,
10827,
13,
13,
28665,
5005,
3919,
8098,
353,
364,
12008,
13,
5634,
13,
5453,
29901,
4802,
666,
29918,
11625,
29918,
22197,
29918,
5215,
13,
12759,
29918,
8216,
29901,
2315,
482,
350,
6259,
29899,
5690,
3339,
29924,
8898,
24802,
13,
8216,
29901,
13,
259,
448,
2315,
482,
350,
6259,
29899,
5690,
3339,
29924,
24833,
8898,
24802,
29889,
13,
3259,
29918,
23959,
29901,
29871,
29906,
29889,
29947,
13,
6768,
29901,
13,
29871,
1024,
29901,
13,
1678,
6139,
29901,
13,
418,
448,
450,
3339,
29924,
8898,
304,
1653,
470,
5712,
29889,
13,
1678,
1134,
29901,
851,
13,
1678,
3734,
29901,
5852,
13,
29871,
10583,
29901,
13,
1678,
6139,
29901,
13,
418,
448,
1932,
6790,
278,
3339,
29924,
8898,
338,
2825,
515,
263,
4944,
1347,
29889,
13,
418,
448,
10576,
4225,
304,
367,
4944,
297,
263,
2854,
6560,
3402,
6467,
278,
5858,
674,
4418,
29889,
13,
1678,
1134,
29901,
851,
13,
29871,
2752,
29901,
13,
1678,
6139,
29901,
13,
418,
448,
14846,
2224,
304,
263,
8898,
934,
304,
367,
19673,
964,
278,
350,
6259,
29899,
5690,
3339,
29924,
29889,
13,
418,
448,
25219,
2066,
5609,
287,
515,
20687,
6910,
310,
350,
6259,
29899,
5690,
2609,
367,
19673,
964,
9642,
13,
4706,
6910,
310,
350,
6259,
29899,
5690,
29889,
450,
11564,
29892,
3138,
29892,
338,
1565,
29936,
366,
508,
1053,
9642,
964,
13,
4706,
20687,
29889,
13,
418,
448,
450,
934,
3402,
508,
367,
7581,
310,
6560,
29889,
13,
1678,
1134,
29901,
2224,
13,
29871,
4889,
29901,
13,
1678,
6139,
29901,
13,
418,
448,
1932,
731,
304,
315,
29898,
3582,
29897,
738,
5923,
8898,
411,
278,
1021,
1024,
674,
367,
975,
17625,
491,
278,
716,
1053,
29889,
13,
418,
448,
13976,
363,
1716,
10583,
322,
934,
24802,
29892,
565,
278,
8898,
947,
451,
1863,
445,
4444,
338,
17262,
29889,
13,
1678,
2322,
29901,
694,
13,
1678,
1134,
29901,
6120,
13,
29871,
8877,
29901,
13,
1678,
6139,
29901,
13,
418,
448,
21830,
8877,
304,
1653,
8898,
373,
29889,
13,
1678,
1134,
29901,
851,
13,
1678,
2322,
29901,
13103,
13,
1062,
1975,
29918,
12663,
29918,
20777,
29901,
285,
29945,
13,
8921,
29901,
13,
29871,
448,
529,
5813,
29958,
20164,
827,
29926,
12681,
29900,
29947,
29900,
29953,
29897,
13,
12008,
13,
13,
5746,
19297,
17101,
353,
364,
12008,
13,
29899,
1024,
29901,
16032,
3339,
29924,
8898,
13,
29871,
4802,
666,
29918,
11625,
29918,
22197,
29918,
5215,
29901,
13,
1678,
1024,
29901,
716,
29918,
11625,
29918,
22197,
13,
1678,
934,
29901,
847,
4632,
29914,
11625,
29918,
22197,
29889,
3134,
13,
1678,
13113,
29901,
13,
418,
1923,
29901,
27981,
29889,
1357,
7247,
29889,
510,
13,
418,
1404,
29901,
4113,
13,
418,
4800,
29901,
529,
25711,
17013,
29958,
13,
29871,
13341,
29918,
517,
29901,
15683,
13,
13,
29899,
1024,
29901,
16032,
3339,
29924,
8898,
10583,
13,
29871,
4802,
666,
29918,
11625,
29918,
22197,
29918,
5215,
29901,
13,
1678,
1024,
29901,
7953,
29899,
22197,
29946,
13,
1678,
10583,
29901,
529,
3134,
29958,
3051,
829,
3134,
29958,
13,
1678,
13113,
29901,
13,
418,
1923,
29901,
27981,
29889,
1357,
7247,
29889,
510,
13,
418,
1404,
29901,
4113,
13,
418,
4800,
29901,
529,
25711,
17013,
29958,
13,
29871,
13341,
29918,
517,
29901,
15683,
13,
13,
29899,
1024,
29901,
6811,
2426,
5923,
3339,
29924,
8898,
13,
29871,
4802,
666,
29918,
11625,
29918,
22197,
29901,
13,
1678,
1024,
29901,
716,
29918,
11625,
29918,
22197,
13,
1678,
934,
29901,
847,
4632,
29914,
11625,
29918,
22197,
29918,
1482,
29889,
3134,
13,
1678,
4889,
29901,
4874,
13,
1678,
13113,
29901,
13,
418,
1923,
29901,
27981,
29889,
1357,
7247,
29889,
510,
13,
418,
1404,
29901,
4113,
13,
418,
4800,
29901,
529,
25711,
17013,
29958,
13,
29871,
13341,
29918,
517,
29901,
15683,
13,
12008,
13,
13,
1525,
29911,
24015,
353,
364,
12008,
13,
4993,
29901,
13,
29871,
6139,
29901,
9959,
2224,
304,
385,
3339,
29924,
8898,
934,
29889,
13,
29871,
4133,
29901,
3939,
13,
29871,
1134,
29901,
851,
13,
29871,
4559,
29901,
847,
4632,
29914,
5372,
29918,
22197,
29889,
3134,
13,
14764,
29901,
13,
29871,
6139,
29901,
2866,
1237,
310,
8898,
408,
385,
10583,
1347,
13,
29871,
4133,
29901,
3939,
13,
29871,
1134,
29901,
851,
13,
29871,
4559,
29901,
529,
3134,
29958,
1181,
22872,
8118,
829,
3134,
29958,
13,
978,
29901,
13,
29871,
6139,
29901,
4408,
310,
278,
3339,
29924,
8898,
304,
367,
2825,
29914,
957,
17625,
13,
29871,
4133,
29901,
3939,
13,
29871,
1134,
29901,
851,
13,
29871,
4559,
29901,
1094,
29885,
29918,
20576,
29896,
29918,
4300,
3560,
13,
10118,
29901,
13,
29871,
6139,
29901,
3789,
746,
975,
16554,
385,
5923,
8898,
13,
29871,
4133,
29901,
3939,
13,
29871,
1134,
29901,
6120,
13,
29871,
4559,
29901,
4874,
13,
12008,
13,
13,
5215,
2897,
13,
5215,
931,
13,
3166,
385,
1687,
29889,
5453,
29918,
13239,
29889,
16121,
1053,
530,
1687,
7355,
13,
3166,
385,
1687,
29889,
5453,
29918,
13239,
29889,
16121,
1053,
8829,
29918,
11950,
1627,
13,
13,
2202,
29901,
13,
1678,
515,
3489,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
3752,
666,
1053,
383,
29945,
15078,
4032,
13,
1678,
515,
3489,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
9435,
1053,
383,
29945,
7355,
2392,
13,
1678,
515,
3489,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
9435,
1053,
530,
1687,
29943,
29945,
11507,
13,
1678,
515,
3489,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
9435,
1053,
285,
29939,
29918,
978,
13,
1678,
515,
3489,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
9435,
1053,
4327,
29918,
978,
13,
1678,
515,
3489,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
9435,
1053,
285,
29945,
29918,
23516,
29918,
6550,
13,
1678,
515,
3489,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
293,
609,
1467,
1053,
6441,
29918,
1445,
13,
1678,
515,
3489,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
293,
609,
1467,
1053,
3883,
29918,
771,
4924,
287,
13,
19499,
16032,
2392,
29901,
13,
1678,
515,
385,
1687,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
3752,
666,
1053,
383,
29945,
15078,
4032,
13,
1678,
515,
385,
1687,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
9435,
1053,
383,
29945,
7355,
2392,
13,
1678,
515,
385,
1687,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
9435,
1053,
530,
1687,
29943,
29945,
11507,
13,
1678,
515,
385,
1687,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
9435,
1053,
285,
29939,
29918,
978,
13,
1678,
515,
385,
1687,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
9435,
1053,
4327,
29918,
978,
13,
1678,
515,
385,
1687,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
9435,
1053,
285,
29945,
29918,
23516,
29918,
6550,
13,
1678,
515,
385,
1687,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
293,
609,
1467,
1053,
6441,
29918,
1445,
13,
1678,
515,
385,
1687,
29889,
5453,
29918,
13239,
29889,
11618,
29889,
29888,
29945,
29889,
293,
609,
1467,
1053,
3883,
29918,
771,
4924,
287,
13,
13,
13,
1990,
12662,
2699,
29898,
2744,
1687,
29943,
29945,
11507,
1125,
13,
1678,
3329,
271,
1849,
353,
5159,
13,
13,
1678,
736,
1849,
353,
518,
13,
4706,
525,
978,
742,
13,
4706,
525,
14764,
742,
13,
4706,
525,
4993,
742,
13,
4706,
525,
10118,
29915,
13,
1678,
4514,
13,
13,
1678,
7882,
29918,
15697,
353,
518,
13,
4706,
525,
1445,
742,
13,
4706,
525,
978,
742,
13,
1678,
4514,
13,
13,
1678,
7882,
29918,
1958,
353,
426,
13,
4706,
525,
1445,
2396,
525,
14764,
742,
13,
4706,
525,
9507,
2396,
525,
4993,
742,
13,
1678,
500,
13,
13,
13,
1990,
29749,
11507,
29898,
11507,
1125,
13,
1678,
1209,
13,
13,
13,
1990,
15591,
11507,
29898,
11507,
1125,
13,
1678,
1209,
13,
13,
13,
1990,
678,
6916,
29898,
11507,
1125,
13,
1678,
822,
304,
29918,
2457,
29898,
1311,
1125,
13,
4706,
1121,
353,
6571,
13,
4706,
1018,
29901,
13,
9651,
363,
736,
519,
297,
1583,
29889,
2457,
1849,
29901,
13,
18884,
1121,
29961,
2457,
519,
29962,
353,
679,
5552,
29898,
1311,
29892,
736,
519,
29897,
13,
9651,
1121,
353,
1583,
3032,
4572,
29918,
7529,
29898,
2914,
29897,
13,
4706,
5174,
8960,
29901,
13,
9651,
1209,
13,
4706,
736,
1121,
13,
13,
13,
1990,
10783,
519,
21459,
29898,
21459,
1125,
13,
1678,
1209,
13,
13,
13,
1990,
13969,
519,
21459,
29898,
21459,
1125,
13,
1678,
1209,
13,
13,
13,
1990,
360,
17678,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
864,
29892,
505,
29922,
8516,
1125,
13,
4706,
1583,
29889,
29893,
424,
353,
864,
13,
4706,
1583,
29889,
17532,
353,
505,
13,
13,
1678,
822,
7252,
29898,
1311,
29892,
1828,
1125,
13,
4706,
1018,
29901,
13,
9651,
1121,
353,
679,
5552,
29898,
1311,
29892,
1828,
29897,
13,
9651,
736,
1121,
13,
4706,
5174,
23833,
2392,
29901,
13,
9651,
736,
1583,
17255,
4381,
29898,
3207,
29897,
13,
13,
1678,
822,
4770,
4381,
29898,
1311,
29892,
1828,
1125,
13,
4706,
12421,
29896,
353,
679,
5552,
29898,
1311,
29889,
29893,
424,
29892,
1828,
29897,
13,
4706,
1018,
29901,
13,
9651,
12421,
29906,
353,
679,
5552,
29898,
1311,
29889,
17532,
29892,
1828,
29897,
13,
9651,
565,
12421,
29896,
2804,
12421,
29906,
29901,
13,
18884,
736,
12421,
29896,
13,
4706,
5174,
23833,
2392,
29901,
13,
9651,
736,
12421,
29896,
13,
13,
13,
1990,
15591,
3260,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
1583,
29889,
5453,
353,
9049,
5085,
29889,
657,
877,
5453,
742,
6213,
29897,
13,
4706,
1583,
29889,
4645,
353,
383,
29945,
15078,
4032,
29898,
1068,
1311,
29889,
5453,
29889,
7529,
29897,
13,
4706,
1583,
29889,
29893,
424,
353,
15591,
11507,
29898,
7529,
29922,
1311,
29889,
5453,
29889,
7529,
29897,
13,
4706,
1583,
29889,
25990,
353,
10783,
519,
21459,
580,
13,
13,
1678,
822,
903,
842,
29918,
15033,
29918,
6768,
29898,
1311,
1125,
13,
4706,
3939,
353,
6571,
13,
4706,
363,
1820,
297,
12662,
2699,
29889,
2457,
1849,
29901,
13,
9651,
565,
679,
5552,
29898,
1311,
29889,
29893,
424,
29892,
1820,
29897,
338,
451,
6213,
29901,
13,
18884,
3939,
29961,
1989,
29962,
353,
679,
5552,
29898,
1311,
29889,
29893,
424,
29892,
1820,
29897,
13,
4706,
565,
3939,
29901,
13,
9651,
1583,
29889,
25990,
353,
10783,
519,
21459,
29898,
7529,
29922,
15033,
29897,
13,
13,
1678,
822,
903,
812,
21543,
29918,
311,
17990,
800,
29898,
1311,
29892,
1121,
1125,
13,
4706,
18116,
353,
1121,
29889,
7323,
877,
1649,
25442,
886,
742,
518,
2314,
13,
4706,
363,
9177,
297,
18116,
29901,
13,
9651,
1583,
29889,
4645,
29889,
5453,
29889,
311,
17990,
403,
29898,
13,
18884,
10191,
29922,
27392,
1839,
7645,
7464,
13,
18884,
1873,
29922,
27392,
1839,
3259,
2033,
13,
9651,
1723,
13,
13,
1678,
822,
2279,
29918,
5453,
29898,
1311,
1125,
13,
4706,
565,
451,
3883,
29918,
771,
4924,
287,
29898,
1311,
29889,
4645,
29892,
525,
11625,
29374,
13,
9651,
12020,
383,
29945,
7355,
2392,
29898,
13,
18884,
376,
3289,
29924,
1818,
367,
25161,
287,
304,
671,
445,
3883,
1213,
13,
9651,
1723,
13,
13,
4706,
1121,
353,
9657,
580,
13,
13,
4706,
3939,
353,
1583,
29889,
22197,
29918,
5215,
580,
13,
13,
4706,
3461,
519,
353,
13969,
519,
21459,
29898,
7529,
29922,
1311,
29889,
25990,
29889,
517,
29918,
2457,
3101,
13,
4706,
3620,
353,
3461,
519,
29889,
517,
29918,
2457,
580,
13,
4706,
1121,
29889,
5504,
29898,
1068,
25990,
29897,
13,
4706,
1121,
29889,
5504,
29898,
8977,
29898,
15033,
29922,
15033,
876,
13,
4706,
1583,
3032,
812,
21543,
29918,
311,
17990,
800,
29898,
2914,
29897,
13,
4706,
736,
1121,
13,
13,
1678,
822,
8898,
29918,
5215,
29898,
1311,
1125,
13,
4706,
1583,
3032,
842,
29918,
15033,
29918,
6768,
580,
13,
4706,
565,
1583,
29889,
5453,
29889,
3198,
29918,
8513,
29901,
13,
9651,
736,
5852,
13,
4706,
565,
1583,
29889,
9933,
7295,
13,
9651,
565,
1583,
29889,
29893,
424,
29889,
10118,
338,
7700,
29901,
13,
18884,
736,
7700,
13,
4706,
565,
1583,
29889,
29893,
424,
29889,
14764,
29901,
13,
9651,
3414,
353,
1583,
29889,
14764,
29918,
5215,
580,
13,
9651,
1583,
29889,
10685,
29918,
1454,
29918,
7662,
29898,
7662,
29897,
13,
9651,
736,
5852,
13,
13,
4706,
1583,
29889,
5215,
29918,
1445,
29918,
517,
29918,
10141,
580,
13,
4706,
1583,
29889,
5992,
29918,
7382,
29918,
22197,
29918,
3166,
29918,
10141,
580,
13,
4706,
736,
5852,
13,
13,
1678,
822,
4864,
29898,
1311,
1125,
13,
4706,
21333,
353,
525,
991,
597,
29912,
29900,
6177,
29912,
29896,
6822,
29885,
29887,
4378,
29914,
18276,
29914,
11625,
29914,
3733,
293,
583,
29914,
4286,
4830,
29898,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
7464,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
29918,
637,
7464,
13,
4706,
1723,
13,
13,
4706,
2346,
353,
376,
29973,
29938,
4572,
29922,
11516,
29898,
978,
5501,
29912,
29900,
29913,
1495,
29974,
392,
29974,
11516,
29898,
16707,
5501,
29912,
29896,
29913,
1495,
29987,
29938,
2622,
29922,
978,
29892,
16707,
1642,
4830,
29898,
13,
9651,
1583,
29889,
29893,
424,
29889,
978,
29892,
1583,
29889,
29893,
424,
29889,
16707,
13,
4706,
1723,
13,
4706,
4613,
353,
1583,
29889,
4645,
29889,
2754,
29889,
657,
29898,
5338,
718,
2346,
29897,
13,
13,
4706,
1018,
29901,
13,
9651,
2933,
353,
4613,
29889,
3126,
580,
13,
4706,
5174,
7865,
2392,
408,
429,
29901,
13,
9651,
12020,
383,
29945,
7355,
2392,
29898,
710,
29898,
735,
876,
13,
4706,
565,
525,
7076,
29915,
297,
2933,
322,
2933,
1839,
7076,
2033,
2804,
5159,
29901,
13,
9651,
736,
5852,
13,
4706,
736,
7700,
13,
13,
1678,
822,
6441,
29918,
1445,
29918,
517,
29918,
10141,
29898,
1311,
29892,
2793,
29892,
1024,
1125,
13,
4706,
3142,
353,
525,
991,
597,
29912,
29900,
6177,
29912,
29896,
6822,
29885,
29887,
4378,
29914,
12366,
29914,
1445,
29899,
3286,
571,
29914,
9009,
29879,
4286,
4830,
29898,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
7464,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
29918,
637,
2033,
13,
4706,
1723,
13,
4706,
1018,
29901,
13,
9651,
6441,
29918,
1445,
29898,
1311,
29889,
4645,
29892,
3142,
29892,
2793,
29892,
1024,
29897,
13,
4706,
5174,
383,
29945,
7355,
2392,
29901,
13,
9651,
12020,
383,
29945,
7355,
2392,
29898,
13,
18884,
376,
17776,
304,
6441,
278,
934,
1213,
13,
9651,
1723,
13,
13,
1678,
822,
903,
657,
29918,
22197,
29918,
2324,
29898,
1311,
1125,
13,
4706,
21333,
353,
525,
991,
597,
29912,
29900,
6177,
29912,
29896,
6822,
29885,
29887,
4378,
29914,
18276,
29914,
11625,
29914,
3733,
293,
583,
29914,
4286,
4830,
29898,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
7464,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
29918,
637,
7464,
13,
4706,
1723,
13,
13,
4706,
2346,
353,
376,
29973,
29938,
4572,
29922,
11516,
29898,
978,
5501,
29912,
29900,
29913,
1495,
29974,
392,
29974,
11516,
29898,
16707,
5501,
29912,
29896,
29913,
1495,
29987,
29938,
2622,
29922,
978,
29892,
16707,
1642,
4830,
29898,
13,
9651,
1583,
29889,
29893,
424,
29889,
978,
29892,
1583,
29889,
29893,
424,
29889,
16707,
13,
4706,
1723,
13,
4706,
4613,
353,
1583,
29889,
4645,
29889,
2754,
29889,
657,
29898,
5338,
718,
2346,
29897,
13,
13,
4706,
1018,
29901,
13,
9651,
2933,
353,
4613,
29889,
3126,
580,
13,
4706,
5174,
7865,
2392,
408,
429,
29901,
13,
9651,
12020,
383,
29945,
7355,
2392,
29898,
710,
29898,
735,
876,
13,
13,
4706,
8898,
29918,
2324,
353,
2933,
1839,
7076,
2033,
29961,
29900,
22322,
1311,
6595,
2033,
13,
4706,
736,
8898,
29918,
2324,
13,
13,
1678,
822,
10583,
29918,
5215,
29898,
1311,
1125,
13,
4706,
8636,
353,
1583,
29889,
25990,
29889,
2754,
29918,
7529,
580,
13,
4706,
21333,
353,
376,
991,
597,
29912,
29900,
6177,
29912,
29896,
6822,
29885,
29887,
4378,
29914,
18276,
29914,
11625,
29914,
20673,
29914,
5215,
29899,
22197,
29914,
1642,
4830,
29898,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
7464,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
29918,
637,
7464,
13,
4706,
1723,
13,
13,
4706,
565,
1583,
29889,
29893,
424,
29889,
10118,
29901,
13,
9651,
8636,
29889,
5504,
29898,
8977,
29898,
22197,
7422,
3790,
29915,
2324,
2396,
1583,
3032,
657,
29918,
22197,
29918,
2324,
580,
20073,
13,
9651,
8636,
29889,
7323,
877,
978,
1495,
13,
13,
4706,
4613,
353,
1583,
29889,
4645,
29889,
2754,
29889,
2490,
29898,
5338,
29892,
4390,
29922,
7529,
29897,
13,
13,
4706,
1018,
29901,
13,
9651,
2933,
353,
4613,
29889,
3126,
580,
13,
4706,
5174,
7865,
2392,
408,
429,
29901,
13,
9651,
12020,
383,
29945,
7355,
2392,
29898,
710,
29898,
735,
876,
13,
13,
4706,
565,
525,
401,
29915,
297,
2933,
322,
2933,
1839,
401,
2033,
297,
518,
29946,
29900,
29900,
29892,
29871,
29946,
29900,
29941,
5387,
13,
9651,
565,
525,
4906,
29915,
297,
2933,
29901,
13,
18884,
12020,
383,
29945,
7355,
2392,
29898,
5327,
1839,
4906,
11287,
13,
9651,
1683,
29901,
13,
18884,
12020,
383,
29945,
7355,
2392,
29898,
13713,
29889,
3051,
29897,
13,
4706,
736,
2933,
1839,
333,
2033,
13,
13,
1678,
822,
4480,
29918,
1454,
29918,
7662,
29898,
1311,
29892,
3414,
29918,
333,
1125,
13,
4706,
21333,
353,
376,
991,
597,
29912,
29900,
6177,
29912,
29896,
6822,
29885,
29887,
4378,
29914,
18276,
29914,
11625,
29914,
20673,
29914,
5215,
29899,
22197,
19248,
29906,
29913,
1642,
4830,
29898,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
7464,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
29918,
637,
7464,
13,
9651,
3414,
29918,
333,
13,
4706,
1723,
13,
4706,
1550,
5852,
29901,
13,
9651,
4613,
353,
1583,
29889,
4645,
29889,
2754,
29889,
657,
29898,
5338,
29897,
13,
13,
9651,
1018,
29901,
13,
18884,
2933,
353,
4613,
29889,
3126,
580,
13,
9651,
5174,
7865,
2392,
408,
429,
29901,
13,
18884,
12020,
383,
29945,
7355,
2392,
29898,
710,
29898,
735,
876,
13,
13,
9651,
565,
525,
401,
29915,
297,
2933,
322,
2933,
1839,
401,
2033,
1275,
29871,
29946,
29900,
29900,
29901,
13,
18884,
565,
525,
4906,
29915,
297,
2933,
29901,
13,
462,
1678,
12020,
383,
29945,
7355,
2392,
29898,
5327,
1839,
4906,
11287,
13,
18884,
1683,
29901,
13,
462,
1678,
12020,
383,
29945,
7355,
2392,
29898,
13713,
29889,
3051,
29897,
13,
13,
9651,
565,
2933,
1839,
4882,
2033,
297,
6024,
21514,
1307,
29911,
3352,
742,
525,
4519,
6227,
11499,
2033,
29901,
13,
18884,
2867,
13,
9651,
931,
29889,
17059,
29898,
29896,
29897,
13,
13,
4706,
565,
2933,
1839,
4882,
2033,
1275,
525,
4519,
6227,
11499,
2396,
13,
9651,
12020,
383,
29945,
7355,
2392,
29898,
13,
18884,
525,
17776,
304,
1053,
3339,
29924,
8898,
6169,
13,
9651,
1723,
13,
4706,
565,
2933,
1839,
4882,
2033,
1275,
525,
21514,
1307,
29911,
3352,
2396,
13,
9651,
736,
5852,
13,
13,
1678,
822,
1053,
29918,
1445,
29918,
517,
29918,
10141,
29898,
1311,
1125,
13,
4706,
1024,
353,
2897,
29889,
2084,
29889,
5451,
29898,
1311,
29889,
29893,
424,
29889,
4993,
9601,
29896,
29962,
13,
4706,
1583,
29889,
9009,
29918,
1445,
29918,
517,
29918,
10141,
29898,
1311,
29889,
29893,
424,
29889,
4993,
29892,
1024,
29897,
13,
4706,
931,
29889,
17059,
29898,
29906,
29897,
13,
13,
4706,
2989,
29918,
978,
353,
285,
29939,
29918,
978,
29898,
1311,
29889,
29893,
424,
29889,
16707,
29892,
1583,
29889,
29893,
424,
29889,
978,
29897,
13,
13,
4706,
565,
1583,
29889,
29893,
424,
29889,
10118,
29901,
13,
9651,
9920,
353,
525,
18276,
845,
2254,
408,
29885,
8898,
426,
29900,
29913,
934,
847,
1707,
29914,
2917,
29914,
5060,
29914,
10382,
29879,
19248,
29896,
29913,
26556,
4286,
4830,
29898,
8159,
29918,
978,
29892,
1024,
29897,
13,
4706,
1683,
29901,
13,
9651,
9920,
353,
525,
18276,
845,
2254,
408,
29885,
8898,
426,
29900,
29913,
934,
847,
1707,
29914,
2917,
29914,
5060,
29914,
10382,
29879,
19248,
29896,
29913,
4286,
4830,
29898,
8159,
29918,
978,
29892,
1024,
29897,
13,
13,
4706,
21333,
353,
376,
991,
597,
29912,
29900,
6177,
29912,
29896,
6822,
29885,
29887,
4378,
29914,
18276,
29914,
4422,
29914,
13067,
29914,
1642,
4830,
29898,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
7464,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
29918,
637,
7464,
13,
4706,
1723,
13,
4706,
6389,
353,
9657,
29898,
13,
9651,
1899,
2433,
3389,
742,
13,
9651,
3667,
23651,
7883,
2433,
29899,
29883,
29850,
29900,
5038,
4286,
4830,
29898,
9006,
29897,
13,
4706,
1723,
13,
4706,
4613,
353,
1583,
29889,
4645,
29889,
2754,
29889,
2490,
29898,
5338,
29892,
4390,
29922,
5085,
29897,
13,
13,
4706,
1018,
29901,
13,
9651,
2933,
353,
4613,
29889,
3126,
580,
13,
9651,
565,
525,
6519,
3591,
29915,
297,
2933,
29901,
13,
18884,
565,
525,
29965,
13996,
6021,
4829,
29915,
297,
2933,
1839,
6519,
3591,
2033,
29901,
13,
462,
1678,
12020,
383,
29945,
7355,
2392,
29898,
5327,
1839,
6519,
3591,
11287,
13,
4706,
5174,
7865,
2392,
408,
429,
29901,
13,
9651,
12020,
383,
29945,
7355,
2392,
29898,
710,
29898,
735,
876,
13,
13,
4706,
565,
525,
401,
29915,
297,
2933,
322,
2933,
1839,
401,
2033,
1275,
29871,
29946,
29900,
29900,
29901,
13,
9651,
565,
525,
4906,
29915,
297,
2933,
29901,
13,
18884,
12020,
383,
29945,
7355,
2392,
29898,
5327,
1839,
4906,
11287,
13,
9651,
1683,
29901,
13,
18884,
12020,
383,
29945,
7355,
2392,
29898,
13713,
29889,
3051,
29897,
13,
4706,
736,
5852,
13,
13,
1678,
822,
3349,
29918,
7382,
29918,
22197,
29918,
3166,
29918,
10141,
29898,
1311,
1125,
13,
4706,
1024,
353,
2897,
29889,
2084,
29889,
5451,
29898,
1311,
29889,
29893,
424,
29889,
4993,
9601,
29896,
29962,
13,
4706,
260,
2084,
29918,
978,
353,
8207,
1707,
29914,
2917,
29914,
5060,
29914,
10382,
29879,
19248,
29900,
29913,
4286,
4830,
29898,
978,
29897,
13,
4706,
21333,
353,
376,
991,
597,
29912,
29900,
6177,
29912,
29896,
6822,
29885,
29887,
4378,
29914,
18276,
29914,
4422,
29914,
24538,
29899,
1758,
29914,
1642,
4830,
29898,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
7464,
13,
9651,
1583,
29889,
4645,
29889,
18121,
1839,
2974,
29918,
637,
7464,
13,
4706,
1723,
13,
4706,
6389,
353,
9657,
29898,
13,
9651,
1899,
2433,
3389,
742,
13,
9651,
3667,
23651,
7883,
29922,
29873,
2084,
29918,
978,
13,
4706,
1723,
13,
4706,
4613,
353,
1583,
29889,
4645,
29889,
2754,
29889,
2490,
29898,
5338,
29892,
4390,
29922,
5085,
29897,
13,
4706,
1018,
29901,
13,
9651,
2933,
353,
4613,
29889,
3126,
580,
13,
4706,
5174,
7865,
2392,
408,
429,
29901,
13,
9651,
12020,
383,
29945,
7355,
2392,
29898,
710,
29898,
735,
876,
13,
4706,
565,
525,
401,
29915,
297,
2933,
322,
2933,
1839,
401,
2033,
1275,
29871,
29946,
29900,
29900,
29901,
13,
9651,
565,
525,
4906,
29915,
297,
2933,
29901,
13,
18884,
12020,
383,
29945,
7355,
2392,
29898,
5327,
1839,
4906,
11287,
13,
9651,
1683,
29901,
13,
18884,
12020,
383,
29945,
7355,
2392,
29898,
13713,
29889,
3051,
29897,
13,
13,
13,
1990,
23125,
10299,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
5924,
29879,
29918,
3198,
29918,
8513,
353,
5852,
13,
4706,
2980,
29918,
6550,
353,
9657,
29898,
13,
9651,
1024,
29922,
8977,
29898,
13,
18884,
3734,
29922,
5574,
29892,
13,
9651,
10353,
13,
9651,
2752,
29922,
8977,
29898,
1853,
2433,
2084,
5477,
13,
9651,
10583,
29922,
8977,
3285,
13,
9651,
4889,
29922,
8977,
29898,
13,
18884,
1134,
2433,
11227,
742,
13,
18884,
2322,
2433,
1217,
29915,
13,
9651,
10353,
13,
9651,
8877,
29922,
8977,
29898,
13,
18884,
2322,
2433,
18877,
742,
13,
18884,
6416,
1627,
7607,
6272,
29918,
11950,
1627,
29892,
6024,
29943,
29945,
29918,
26092,
22122,
11287,
13,
9651,
1723,
13,
4706,
1723,
13,
4706,
1583,
29889,
23516,
29918,
6550,
353,
6571,
13,
4706,
1583,
29889,
23516,
29918,
6550,
29889,
5504,
29898,
29888,
29945,
29918,
23516,
29918,
6550,
29897,
13,
4706,
1583,
29889,
23516,
29918,
6550,
29889,
5504,
29898,
23516,
29918,
6550,
29897,
13,
4706,
1583,
29889,
6149,
1474,
29918,
735,
7009,
573,
353,
518,
13,
9651,
6024,
4993,
742,
525,
14764,
2033,
13,
4706,
4514,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
1580,
353,
23125,
10299,
580,
13,
13,
1678,
3883,
353,
530,
1687,
7355,
29898,
13,
4706,
2980,
29918,
6550,
29922,
6550,
29889,
23516,
29918,
6550,
29892,
13,
4706,
11286,
29918,
3198,
29918,
8513,
29922,
6550,
29889,
5924,
29879,
29918,
3198,
29918,
8513,
29892,
13,
4706,
5478,
1474,
29918,
735,
7009,
573,
29922,
6550,
29889,
6149,
1474,
29918,
735,
7009,
573,
13,
1678,
1723,
13,
13,
1678,
1018,
29901,
13,
4706,
5654,
353,
15591,
3260,
29898,
5453,
29922,
5453,
29897,
13,
4706,
2582,
353,
5654,
29889,
4258,
29918,
5453,
580,
13,
4706,
3883,
29889,
13322,
29918,
3126,
29898,
1068,
9902,
29897,
13,
1678,
5174,
383,
29945,
7355,
2392,
408,
429,
29901,
13,
4706,
3883,
29889,
14057,
29918,
3126,
29898,
7645,
29922,
710,
29898,
735,
876,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
12_module_release/message/__init__.py | DeveloperLY/Python-practice | 0 | 1334 | <filename>12_module_release/message/__init__.py
from . import send_message
from . import receive_message | [
1,
529,
9507,
29958,
29896,
29906,
29918,
5453,
29918,
14096,
29914,
4906,
29914,
1649,
2344,
26914,
2272,
13,
3166,
869,
1053,
3638,
29918,
4906,
13,
3166,
869,
1053,
7150,
29918,
4906,
2
] |
file_util.py | d4yvie/advent_of_code_2021 | 0 | 184525 | from functools import reduce
import numpy as np
def read_all(file_name="measurements") -> str:
with open(file_name) as f:
return reduce(lambda a, b: a + b, f, "")
def read_lines(file_name="measurements") -> list[str]:
with open(file_name) as f:
return [line.strip() for line in f]
def read_first_line(file_name="measurements") -> str:
return read_lines(file_name)[0]
def line_to_integers(line: str) -> list[int]:
return list(map(int, line.split(",")))
def read_first_line_as_integers(file_name="measurements") -> list[int]:
return line_to_integers(read_first_line(file_name))
def read_line_seperated_data_sets(file_name="measurements") -> list[str]:
with open(file_name) as f:
return f.read().rstrip().split('\n\n')
def read_lines_as_int(file_name="measurements") -> list[list[int]]:
lines = read_lines(file_name)
return [[int(char) for char in x] for x in lines]
def read_lines_as_np_matrix(file_name="measurements") -> np.ndarray:
lines = read_lines(file_name)
return np.array([[float(char) for char in line] for line in lines])
| [
1,
515,
2090,
312,
8789,
1053,
10032,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
1303,
29918,
497,
29898,
1445,
29918,
978,
543,
26658,
1860,
1159,
1599,
851,
29901,
13,
1678,
411,
1722,
29898,
1445,
29918,
978,
29897,
408,
285,
29901,
13,
4706,
736,
10032,
29898,
2892,
263,
29892,
289,
29901,
263,
718,
289,
29892,
285,
29892,
20569,
13,
13,
13,
1753,
1303,
29918,
9012,
29898,
1445,
29918,
978,
543,
26658,
1860,
1159,
1599,
1051,
29961,
710,
5387,
13,
1678,
411,
1722,
29898,
1445,
29918,
978,
29897,
408,
285,
29901,
13,
4706,
736,
518,
1220,
29889,
17010,
580,
363,
1196,
297,
285,
29962,
13,
13,
13,
1753,
1303,
29918,
4102,
29918,
1220,
29898,
1445,
29918,
978,
543,
26658,
1860,
1159,
1599,
851,
29901,
13,
1678,
736,
1303,
29918,
9012,
29898,
1445,
29918,
978,
9601,
29900,
29962,
13,
13,
13,
1753,
1196,
29918,
517,
29918,
6693,
5743,
29898,
1220,
29901,
851,
29897,
1599,
1051,
29961,
524,
5387,
13,
1678,
736,
1051,
29898,
1958,
29898,
524,
29892,
1196,
29889,
5451,
29898,
3284,
4961,
13,
13,
13,
1753,
1303,
29918,
4102,
29918,
1220,
29918,
294,
29918,
6693,
5743,
29898,
1445,
29918,
978,
543,
26658,
1860,
1159,
1599,
1051,
29961,
524,
5387,
13,
1678,
736,
1196,
29918,
517,
29918,
6693,
5743,
29898,
949,
29918,
4102,
29918,
1220,
29898,
1445,
29918,
978,
876,
13,
13,
13,
1753,
1303,
29918,
1220,
29918,
344,
546,
630,
29918,
1272,
29918,
7224,
29898,
1445,
29918,
978,
543,
26658,
1860,
1159,
1599,
1051,
29961,
710,
5387,
13,
1678,
411,
1722,
29898,
1445,
29918,
978,
29897,
408,
285,
29901,
13,
4706,
736,
285,
29889,
949,
2141,
29878,
17010,
2141,
5451,
28909,
29876,
29905,
29876,
1495,
13,
13,
13,
1753,
1303,
29918,
9012,
29918,
294,
29918,
524,
29898,
1445,
29918,
978,
543,
26658,
1860,
1159,
1599,
1051,
29961,
1761,
29961,
524,
5262,
29901,
13,
1678,
3454,
353,
1303,
29918,
9012,
29898,
1445,
29918,
978,
29897,
13,
1678,
736,
5519,
524,
29898,
3090,
29897,
363,
1373,
297,
921,
29962,
363,
921,
297,
3454,
29962,
13,
13,
13,
1753,
1303,
29918,
9012,
29918,
294,
29918,
9302,
29918,
5344,
29898,
1445,
29918,
978,
543,
26658,
1860,
1159,
1599,
7442,
29889,
299,
2378,
29901,
13,
1678,
3454,
353,
1303,
29918,
9012,
29898,
1445,
29918,
978,
29897,
13,
1678,
736,
7442,
29889,
2378,
4197,
29961,
7411,
29898,
3090,
29897,
363,
1373,
297,
1196,
29962,
363,
1196,
297,
3454,
2314,
13,
2
] |
ffttest.py | teslaworksumn/Reactor | 0 | 14333 | # From http://julip.co/2012/05/arduino-python-soundlight-spectrum/
# Python 2.7 code to analyze sound and interface with Arduino
import pyaudio # from http://people.csail.mit.edu/hubert/pyaudio/
import serial # from http://pyserial.sourceforge.net/
import numpy # from http://numpy.scipy.org/
import audioop
import sys
import math
import struct
'''
Sources
http://www.swharden.com/blog/2010-03-05-realtime-fft-graph-of-audio-wav-file-or-microphone-input-with-python-scipy-and-wckgraph/
http://macdevcenter.com/pub/a/python/2001/01/31/numerically.html?page=2
'''
MAX = 0
NUM = 20
def list_devices():
# List all audio input devices
p = pyaudio.PyAudio()
i = 0
n = p.get_device_count()
while i < n:
dev = p.get_device_info_by_index(i)
if dev['maxInputChannels'] > 0:
print str(i)+'. '+dev['name']
i += 1
def fft():
chunk = 2**11 # Change if too fast/slow, never less than 2**11
scale = 25 # Change if too dim/bright
exponent = 3 # Change if too little/too much difference between loud and quiet sounds
samplerate = 44100
# CHANGE THIS TO CORRECT INPUT DEVICE
# Enable stereo mixing in your sound card
# to make you sound output an input
# Use list_devices() to list all your input devices
device = 1 # Mic
#device = 4 # SF2
p = pyaudio.PyAudio()
stream = p.open(format = pyaudio.paInt16,
channels = 1,
rate = 44100,
input = True,
frames_per_buffer = chunk,
input_device_index = device)
print "Starting, use Ctrl+C to stop"
try:
ser = serial.Serial(
port='/dev/ttyS0',
timeout=1
)
while True:
data = stream.read(chunk)
# Do FFT
levels = calculate_levels(data, chunk, samplerate)
# Make it look better and send to serial
for level in levels:
level = max(min(level / scale, 1.0), 0.0)
level = level**exponent
level = int(level * 255)
#ser.write(chr(level))
#sys.stdout.write(str(level)+' ')
#sys.stdout.write('\n')
#s = ser.read(6)
except KeyboardInterrupt:
pass
finally:
print "\nStopping"
stream.close()
p.terminate()
#ser.close()
def calculate_levels(data, chunk, samplerate):
# Use FFT to calculate volume for each frequency
global MAX
# Convert raw sound data to Numpy array
fmt = "%dH"%(len(data)/2)
data2 = struct.unpack(fmt, data)
data2 = numpy.array(data2, dtype='h')
# Apply FFT
fourier = numpy.fft.fft(data2)
ffty = numpy.abs(fourier[0:len(fourier)/2])/1000
ffty1=ffty[:len(ffty)/2]
ffty2=ffty[len(ffty)/2::]+2
ffty2=ffty2[::-1]
ffty=ffty1+ffty2
ffty=numpy.log(ffty)-2
fourier = list(ffty)[4:-4]
fourier = fourier[:len(fourier)/2]
size = len(fourier)
# Add up for 6 lights
levels = [sum(fourier[i:(i+size/NUM)]) for i in xrange(0, size, size/NUM)][:NUM]
return levels
if __name__ == '__main__':
#list_devices()
fft()
| [
1,
396,
3645,
1732,
597,
29926,
352,
666,
29889,
1111,
29914,
29906,
29900,
29896,
29906,
29914,
29900,
29945,
29914,
538,
29884,
1789,
29899,
4691,
29899,
29802,
4366,
29899,
21494,
5848,
29914,
13,
29937,
5132,
29871,
29906,
29889,
29955,
775,
304,
27599,
6047,
322,
5067,
411,
826,
28955,
13,
29871,
13,
5215,
282,
3761,
2881,
396,
515,
1732,
597,
25719,
29889,
2395,
737,
29889,
2415,
29889,
6085,
29914,
29882,
431,
814,
29914,
2272,
18494,
29914,
13,
5215,
7797,
29871,
396,
515,
1732,
597,
2272,
15550,
29889,
28315,
29889,
1212,
29914,
13,
5215,
12655,
259,
396,
515,
1732,
597,
23749,
29889,
26167,
2272,
29889,
990,
29914,
13,
5215,
10348,
459,
13,
5215,
10876,
13,
5215,
5844,
13,
5215,
2281,
13,
29871,
13,
12008,
13,
29903,
2863,
13,
13,
1124,
597,
1636,
29889,
29879,
1332,
7879,
29889,
510,
29914,
7312,
29914,
29906,
29900,
29896,
29900,
29899,
29900,
29941,
29899,
29900,
29945,
29899,
276,
1997,
603,
29899,
600,
29873,
29899,
4262,
29899,
974,
29899,
18494,
29899,
29893,
485,
29899,
1445,
29899,
272,
29899,
29885,
2357,
6710,
29899,
2080,
29899,
2541,
29899,
4691,
29899,
26167,
2272,
29899,
392,
29899,
29893,
384,
4262,
29914,
13,
1124,
597,
8628,
3359,
5064,
29889,
510,
29914,
5467,
29914,
29874,
29914,
4691,
29914,
29906,
29900,
29900,
29896,
29914,
29900,
29896,
29914,
29941,
29896,
29914,
8058,
1711,
29889,
1420,
29973,
3488,
29922,
29906,
13,
13,
12008,
13,
29871,
13,
12648,
353,
29871,
29900,
13,
13967,
353,
29871,
29906,
29900,
13,
29871,
13,
1753,
1051,
29918,
3359,
1575,
7295,
13,
1678,
396,
2391,
599,
10348,
1881,
9224,
13,
1678,
282,
353,
282,
3761,
2881,
29889,
19737,
17111,
580,
13,
1678,
474,
353,
29871,
29900,
13,
1678,
302,
353,
282,
29889,
657,
29918,
10141,
29918,
2798,
580,
13,
1678,
1550,
474,
529,
302,
29901,
13,
4706,
2906,
353,
282,
29889,
657,
29918,
10141,
29918,
3888,
29918,
1609,
29918,
2248,
29898,
29875,
29897,
13,
4706,
565,
2906,
1839,
3317,
4290,
1451,
12629,
2033,
1405,
29871,
29900,
29901,
13,
9651,
1596,
851,
29898,
29875,
7240,
4286,
525,
29974,
3359,
1839,
978,
2033,
13,
4706,
474,
4619,
29871,
29896,
13,
29871,
13,
1753,
285,
615,
7295,
29871,
13,
1678,
19875,
418,
353,
29871,
29906,
1068,
29896,
29896,
396,
10726,
565,
2086,
5172,
29914,
28544,
29892,
2360,
3109,
1135,
29871,
29906,
1068,
29896,
29896,
13,
1678,
6287,
418,
353,
29871,
29906,
29945,
1678,
396,
10726,
565,
2086,
3964,
29914,
1182,
523,
13,
1678,
28869,
259,
353,
29871,
29941,
268,
396,
10726,
565,
2086,
2217,
29914,
517,
29877,
1568,
4328,
1546,
22526,
322,
11813,
10083,
13,
1678,
3514,
20069,
403,
353,
29871,
29946,
29946,
29896,
29900,
29900,
29871,
13,
29871,
13,
1678,
396,
5868,
24336,
3446,
3235,
7495,
315,
1955,
26282,
2672,
12336,
5012,
19059,
13,
1678,
396,
1174,
519,
269,
12358,
29877,
24907,
297,
596,
6047,
5881,
13,
1678,
396,
304,
1207,
366,
6047,
1962,
385,
1881,
13,
1678,
396,
4803,
1051,
29918,
3359,
1575,
580,
304,
1051,
599,
596,
1881,
9224,
13,
1678,
4742,
259,
353,
29871,
29896,
396,
20279,
13,
1678,
396,
10141,
259,
353,
29871,
29946,
396,
28768,
29906,
13,
268,
13,
1678,
282,
353,
282,
3761,
2881,
29889,
19737,
17111,
580,
13,
1678,
4840,
353,
282,
29889,
3150,
29898,
4830,
353,
282,
3761,
2881,
29889,
3274,
2928,
29896,
29953,
29892,
13,
462,
1678,
18196,
353,
29871,
29896,
29892,
13,
462,
1678,
6554,
353,
29871,
29946,
29946,
29896,
29900,
29900,
29892,
13,
462,
1678,
1881,
353,
5852,
29892,
13,
462,
1678,
16608,
29918,
546,
29918,
9040,
353,
19875,
29892,
13,
462,
1678,
1881,
29918,
10141,
29918,
2248,
353,
4742,
29897,
13,
268,
13,
1678,
1596,
376,
4763,
292,
29892,
671,
315,
11742,
29974,
29907,
304,
5040,
29908,
13,
1678,
1018,
29901,
13,
308,
13,
4706,
724,
353,
7797,
29889,
9125,
29898,
13,
9651,
2011,
2433,
29914,
3359,
29914,
4349,
29903,
29900,
742,
13,
9651,
11815,
29922,
29896,
13,
4706,
1723,
13,
308,
13,
4706,
1550,
5852,
29901,
13,
9651,
848,
29871,
353,
4840,
29889,
949,
29898,
29812,
29897,
13,
9651,
396,
1938,
383,
7818,
13,
9651,
11174,
353,
8147,
29918,
5563,
29879,
29898,
1272,
29892,
19875,
29892,
3514,
20069,
403,
29897,
13,
29871,
13,
9651,
396,
8561,
372,
1106,
2253,
322,
3638,
304,
7797,
13,
9651,
363,
3233,
297,
11174,
29901,
13,
18884,
3233,
353,
4236,
29898,
1195,
29898,
5563,
847,
6287,
29892,
29871,
29896,
29889,
29900,
511,
29871,
29900,
29889,
29900,
29897,
13,
18884,
3233,
353,
3233,
1068,
735,
3296,
29871,
13,
18884,
3233,
353,
938,
29898,
5563,
334,
29871,
29906,
29945,
29945,
29897,
13,
18884,
396,
643,
29889,
3539,
29898,
22495,
29898,
5563,
876,
13,
18884,
396,
9675,
29889,
25393,
29889,
3539,
29898,
710,
29898,
5563,
7240,
29915,
25710,
13,
9651,
396,
9675,
29889,
25393,
29889,
3539,
28909,
29876,
1495,
13,
9651,
396,
29879,
353,
724,
29889,
949,
29898,
29953,
29897,
13,
29871,
13,
1678,
5174,
7670,
3377,
4074,
6685,
29901,
13,
4706,
1209,
13,
1678,
7146,
29901,
13,
4706,
1596,
6634,
29876,
20754,
3262,
29908,
13,
4706,
4840,
29889,
5358,
580,
13,
4706,
282,
29889,
18821,
403,
580,
13,
4706,
396,
643,
29889,
5358,
580,
13,
29871,
13,
1753,
8147,
29918,
5563,
29879,
29898,
1272,
29892,
19875,
29892,
3514,
20069,
403,
1125,
13,
1678,
396,
4803,
383,
7818,
304,
8147,
7977,
363,
1269,
10868,
13,
1678,
5534,
18134,
13,
268,
13,
1678,
396,
14806,
10650,
6047,
848,
304,
11848,
2272,
1409,
13,
1678,
19200,
353,
11860,
29881,
29950,
29908,
29995,
29898,
2435,
29898,
1272,
6802,
29906,
29897,
13,
1678,
848,
29906,
353,
2281,
29889,
348,
4058,
29898,
23479,
29892,
848,
29897,
13,
1678,
848,
29906,
353,
12655,
29889,
2378,
29898,
1272,
29906,
29892,
26688,
2433,
29882,
1495,
13,
13,
1678,
396,
2401,
368,
383,
7818,
13,
1678,
12584,
4336,
353,
12655,
29889,
600,
29873,
29889,
600,
29873,
29898,
1272,
29906,
29897,
13,
1678,
285,
3312,
353,
12655,
29889,
6897,
29898,
29888,
283,
4336,
29961,
29900,
29901,
2435,
29898,
29888,
283,
4336,
6802,
29906,
2314,
29914,
29896,
29900,
29900,
29900,
13,
1678,
285,
3312,
29896,
29922,
600,
1017,
7503,
2435,
29898,
600,
1017,
6802,
29906,
29962,
13,
1678,
285,
3312,
29906,
29922,
600,
1017,
29961,
2435,
29898,
600,
1017,
6802,
29906,
1057,
10062,
29906,
13,
1678,
285,
3312,
29906,
29922,
600,
1017,
29906,
29961,
1057,
29899,
29896,
29962,
13,
1678,
285,
3312,
29922,
600,
1017,
29896,
29974,
600,
1017,
29906,
13,
1678,
285,
3312,
29922,
23749,
29889,
1188,
29898,
600,
1017,
6817,
29906,
13,
268,
13,
1678,
12584,
4336,
353,
1051,
29898,
600,
1017,
9601,
29946,
13018,
29946,
29962,
13,
1678,
12584,
4336,
353,
12584,
4336,
7503,
2435,
29898,
29888,
283,
4336,
6802,
29906,
29962,
13,
268,
13,
1678,
2159,
353,
7431,
29898,
29888,
283,
4336,
29897,
13,
29871,
13,
1678,
396,
3462,
701,
363,
29871,
29953,
26068,
13,
1678,
11174,
353,
518,
2083,
29898,
29888,
283,
4336,
29961,
29875,
5919,
29875,
29974,
2311,
29914,
13967,
29897,
2314,
363,
474,
297,
921,
3881,
29898,
29900,
29892,
2159,
29892,
2159,
29914,
13967,
29897,
3816,
29901,
13967,
29962,
13,
268,
13,
1678,
736,
11174,
13,
29871,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
396,
1761,
29918,
3359,
1575,
580,
13,
1678,
285,
615,
580,
13,
2
] |
src/knn.py | zhangxyz/MLFSdel | 0 | 133802 | #!usr/bin/env python
#-*- coding: utf-8 -*-
import logging
import numpy as np
import sklearn
from sklearn import metrics
from sklearn import neighbors
from sklearn import cross_validation
from sklearn.datasets import load_svmlight_file
from sklearn.cross_validation import cross_val_score
import math
import sys
import os
from subprocess import *
from sklearn.feature_selection import SelectPercentile, f_classif, SelectKBest
from sklearn.pipeline import Pipeline
from sklearn import metrics
from sklearn.neighbors import DistanceMetric
from sklearn.neighbors import KNeighborsClassifier
def calculate_result(actual,pred):
m_precision = metrics.precision_score(actual,pred);
m_recall = metrics.recall_score(actual,pred);
print 'predict info:'
print 'accuracy:{0:.3f}'.format(metrics.accuracy_score(actual,pred))
print 'precision:{0:.3f}'.format(m_precision)
print 'recall:{0:0.3f}'.format(m_recall);
print 'f1-score:{0:.3f}'.format(metrics.f1_score(actual,pred));
def calculate_k(x,y):
clf = KNeighborsClassifier(n_neighbors=3)
max_metric=cross_val_score(clf,x,y,cv=10,scoring='f1').mean()
k=3
for i in range(4,100):
clf = KNeighborsClassifier(n_neighbors=i)#default with k=5
metric = cross_val_score(clf,x,y,cv=10,scoring='f1').mean()
if max_metric < metric :
max_metric=metric
k=i
return k
def knn_result(train_x,train_y,test_x,test_y,out_file):
print '*************************\nKNN\n*************************'
#c= calculate_k(train_x,train_y)
clf = KNeighborsClassifier(n_neighbors=10)
#clf = KNeighborsClassifier(n_neighbors=c)
clf.fit(train_x,train_y)
pred = clf.predict(test_x);
calculate_result(test_y,pred);
np.savetxt(out_file,pred,fmt='%d')
#print(c)
def knn_select(train_x,train_y,test_x,test_y):
#c= calculate_k(train_x,train_y)
clf = KNeighborsClassifier(n_neighbors=10)
#clf = KNeighborsClassifier(n_neighbors=c)
clf.fit(train_x,train_y)
pred = clf.predict(test_x);
return metrics.precision_score(test_y,pred)
#print(c)
| [
1,
396,
29991,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
29899,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
12183,
13,
5215,
12655,
408,
7442,
13,
5215,
2071,
19668,
13,
3166,
2071,
19668,
1053,
21556,
29871,
13,
3166,
2071,
19668,
1053,
22092,
943,
13,
3166,
2071,
19668,
1053,
4891,
29918,
18157,
13,
3166,
2071,
19668,
29889,
14538,
1691,
1053,
2254,
29918,
4501,
828,
523,
29918,
1445,
13,
3166,
2071,
19668,
29889,
19128,
29918,
18157,
1053,
4891,
29918,
791,
29918,
13628,
13,
5215,
5844,
13,
5215,
10876,
13,
5215,
2897,
13,
3166,
1014,
5014,
1053,
334,
13,
3166,
2071,
19668,
29889,
14394,
29918,
21731,
1053,
7605,
27933,
488,
29892,
285,
29918,
1990,
361,
29892,
7605,
29968,
25353,
13,
3166,
2071,
19668,
29889,
13096,
5570,
1053,
349,
23828,
13,
3166,
2071,
19668,
1053,
21556,
13,
3166,
2071,
19668,
29889,
484,
1141,
29890,
943,
1053,
6652,
749,
10095,
2200,
13,
3166,
2071,
19668,
29889,
484,
1141,
29890,
943,
1053,
476,
8139,
1141,
29890,
943,
2385,
3709,
13,
13,
1753,
8147,
29918,
2914,
29898,
19304,
29892,
11965,
1125,
259,
13,
1678,
286,
29918,
17990,
2459,
353,
21556,
29889,
17990,
2459,
29918,
13628,
29898,
19304,
29892,
11965,
416,
259,
13,
1678,
286,
29918,
3757,
497,
353,
21556,
29889,
3757,
497,
29918,
13628,
29898,
19304,
29892,
11965,
416,
259,
13,
1678,
1596,
525,
27711,
5235,
11283,
259,
13,
1678,
1596,
525,
562,
2764,
4135,
26254,
29900,
29901,
29889,
29941,
29888,
29913,
4286,
4830,
29898,
2527,
10817,
29889,
562,
2764,
4135,
29918,
13628,
29898,
19304,
29892,
11965,
876,
259,
13,
1678,
1596,
525,
17990,
2459,
26254,
29900,
29901,
29889,
29941,
29888,
29913,
4286,
4830,
29898,
29885,
29918,
17990,
2459,
29897,
259,
13,
1678,
1596,
525,
3757,
497,
26254,
29900,
29901,
29900,
29889,
29941,
29888,
29913,
4286,
4830,
29898,
29885,
29918,
3757,
497,
416,
259,
13,
1678,
1596,
525,
29888,
29896,
29899,
13628,
26254,
29900,
29901,
29889,
29941,
29888,
29913,
4286,
4830,
29898,
2527,
10817,
29889,
29888,
29896,
29918,
13628,
29898,
19304,
29892,
11965,
2483,
1678,
13,
13,
1753,
8147,
29918,
29895,
29898,
29916,
29892,
29891,
1125,
13,
1678,
1067,
29888,
353,
476,
8139,
1141,
29890,
943,
2385,
3709,
29898,
29876,
29918,
484,
1141,
29890,
943,
29922,
29941,
29897,
13,
1678,
4236,
29918,
16414,
29922,
19128,
29918,
791,
29918,
13628,
29898,
695,
29888,
29892,
29916,
29892,
29891,
29892,
11023,
29922,
29896,
29900,
29892,
1557,
8253,
2433,
29888,
29896,
2824,
12676,
580,
13,
1678,
413,
29922,
29941,
13,
1678,
363,
474,
297,
3464,
29898,
29946,
29892,
29896,
29900,
29900,
1125,
13,
418,
1067,
29888,
353,
476,
8139,
1141,
29890,
943,
2385,
3709,
29898,
29876,
29918,
484,
1141,
29890,
943,
29922,
29875,
29897,
29937,
4381,
411,
413,
29922,
29945,
13,
418,
12714,
353,
4891,
29918,
791,
29918,
13628,
29898,
695,
29888,
29892,
29916,
29892,
29891,
29892,
11023,
29922,
29896,
29900,
29892,
1557,
8253,
2433,
29888,
29896,
2824,
12676,
580,
1678,
13,
418,
565,
4236,
29918,
16414,
529,
12714,
584,
13,
4706,
4236,
29918,
16414,
29922,
16414,
13,
4706,
413,
29922,
29875,
13,
1678,
736,
413,
13,
13,
1753,
889,
29876,
29918,
2914,
29898,
14968,
29918,
29916,
29892,
14968,
29918,
29891,
29892,
1688,
29918,
29916,
29892,
1688,
29918,
29891,
29892,
449,
29918,
1445,
1125,
259,
13,
1678,
1596,
525,
7775,
4189,
17710,
29876,
29968,
10262,
29905,
29876,
7775,
4189,
29930,
29915,
29871,
13,
1678,
396,
29883,
29922,
8147,
29918,
29895,
29898,
14968,
29918,
29916,
29892,
14968,
29918,
29891,
29897,
13,
1678,
1067,
29888,
353,
476,
8139,
1141,
29890,
943,
2385,
3709,
29898,
29876,
29918,
484,
1141,
29890,
943,
29922,
29896,
29900,
29897,
13,
1678,
396,
695,
29888,
353,
476,
8139,
1141,
29890,
943,
2385,
3709,
29898,
29876,
29918,
484,
1141,
29890,
943,
29922,
29883,
29897,
13,
1678,
1067,
29888,
29889,
9202,
29898,
14968,
29918,
29916,
29892,
14968,
29918,
29891,
29897,
259,
13,
1678,
4450,
353,
1067,
29888,
29889,
27711,
29898,
1688,
29918,
29916,
416,
13,
1678,
8147,
29918,
2914,
29898,
1688,
29918,
29891,
29892,
11965,
416,
13,
1678,
7442,
29889,
29879,
485,
300,
486,
29898,
449,
29918,
1445,
29892,
11965,
29892,
23479,
2433,
29995,
29881,
1495,
13,
1678,
396,
2158,
29898,
29883,
29897,
13,
268,
13,
1753,
889,
29876,
29918,
2622,
29898,
14968,
29918,
29916,
29892,
14968,
29918,
29891,
29892,
1688,
29918,
29916,
29892,
1688,
29918,
29891,
1125,
259,
13,
1678,
396,
29883,
29922,
8147,
29918,
29895,
29898,
14968,
29918,
29916,
29892,
14968,
29918,
29891,
29897,
13,
1678,
1067,
29888,
353,
476,
8139,
1141,
29890,
943,
2385,
3709,
29898,
29876,
29918,
484,
1141,
29890,
943,
29922,
29896,
29900,
29897,
13,
1678,
396,
695,
29888,
353,
476,
8139,
1141,
29890,
943,
2385,
3709,
29898,
29876,
29918,
484,
1141,
29890,
943,
29922,
29883,
29897,
13,
1678,
1067,
29888,
29889,
9202,
29898,
14968,
29918,
29916,
29892,
14968,
29918,
29891,
29897,
259,
13,
1678,
4450,
353,
1067,
29888,
29889,
27711,
29898,
1688,
29918,
29916,
416,
13,
1678,
736,
21556,
29889,
17990,
2459,
29918,
13628,
29898,
1688,
29918,
29891,
29892,
11965,
29897,
13,
1678,
396,
2158,
29898,
29883,
29897,
13,
13,
13,
13,
13,
29871,
13,
2
] |
ext_modules/_maix_nn/example/yolo2_camera.py | sipeed/python3-maix | 93 | 6851 | <gh_stars>10-100
from maix import nn
from PIL import Image, ImageDraw, ImageFont
from maix import display, camera
import time
from maix.nn import decoder
def draw_rectangle_with_title(draw, box, disp_str, bg_color=(255, 0, 0, 255), font_color=(255, 255, 255, 255)):
# draw = ImageDraw.Draw(img)
font = ImageFont.load_default()
font_w, font_h = font.getsize(disp_str)
draw.rectangle((box[0], box[1], box[0] + box[2], box[1] + box[3]), fill=None, outline=bg_color, width=2)
draw.rectangle((box[0], box[1] - font_h, box[0] + font_w, box[1]), fill=bg_color)
draw.text((box[0], box[1] - font_h), disp_str, fill=font_color, font=font)
camera.config(size=(224, 224))
model = {
"param": "/root/models/yolo2_face_awnn.param",
"bin": "/root/models/yolo2_face_awnn.bin"
}
options = {
"model_type": "awnn",
"inputs": {
"input0": (224, 224, 3)
},
"outputs": {
"output0": (7, 7, (1+4+1)*5)
},
"mean": [127.5, 127.5, 127.5],
"norm": [0.0078125, 0.0078125, 0.0078125],
}
print("-- load model:", model)
m = nn.load(model, opt=options)
print("-- load ok")
print("-- read image")
w = options["inputs"]["input0"][1]
h = options["inputs"]["input0"][0]
# # img.show()
print("-- read image ok")
labels = ["person"]
anchors = [1.19, 1.98, 2.79, 4.59, 4.53, 8.92, 8.06, 5.29, 10.32, 10.65]
yolo2_decoder = decoder.Yolo2(len(labels), anchors, net_in_size=(w, h), net_out_size=(7, 7))
while 1:
img = camera.capture()
if not img:
time.sleep(0.01)
continue
t = time.time()
out = m.forward(img, quantize=True, layout="hwc")
print("-- forward: ", time.time() - t )
t = time.time()
boxes, probs = yolo2_decoder.run(out, nms=0.3, threshold=0.5, img_size=(240, 240))
print("-- decode: ", time.time() - t )
t = time.time()
for i, box in enumerate(boxes):
class_id = probs[i][0]
prob = probs[i][1][class_id]
disp_str = "{}:{:.2f}%".format(labels[class_id], prob*100)
draw_rectangle_with_title(display.get_draw(), box, disp_str)
print("-- draw: ", time.time() - t )
t = time.time()
display.show()
print("-- show: ", time.time() - t )
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
13,
13,
13,
13,
3166,
611,
861,
1053,
302,
29876,
13,
3166,
349,
6227,
1053,
7084,
29892,
7084,
8537,
29892,
7084,
9824,
13,
3166,
611,
861,
1053,
29871,
2479,
29892,
10656,
13,
5215,
931,
13,
3166,
611,
861,
29889,
15755,
1053,
1602,
6119,
13,
13,
1753,
4216,
29918,
1621,
2521,
29918,
2541,
29918,
3257,
29898,
4012,
29892,
3800,
29892,
12272,
29918,
710,
29892,
25989,
29918,
2780,
7607,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
4079,
29918,
2780,
7607,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
22164,
13,
1678,
396,
4216,
353,
7084,
8537,
29889,
8537,
29898,
2492,
29897,
13,
1678,
4079,
353,
7084,
9824,
29889,
1359,
29918,
4381,
580,
13,
13,
1678,
4079,
29918,
29893,
29892,
4079,
29918,
29882,
353,
4079,
29889,
657,
2311,
29898,
2218,
29886,
29918,
710,
29897,
13,
1678,
4216,
29889,
1621,
2521,
3552,
1884,
29961,
29900,
1402,
3800,
29961,
29896,
1402,
3800,
29961,
29900,
29962,
718,
3800,
29961,
29906,
1402,
3800,
29961,
29896,
29962,
718,
3800,
29961,
29941,
11724,
5445,
29922,
8516,
29892,
27887,
29922,
16264,
29918,
2780,
29892,
2920,
29922,
29906,
29897,
13,
1678,
4216,
29889,
1621,
2521,
3552,
1884,
29961,
29900,
1402,
3800,
29961,
29896,
29962,
448,
4079,
29918,
29882,
29892,
3800,
29961,
29900,
29962,
718,
4079,
29918,
29893,
29892,
3800,
29961,
29896,
11724,
5445,
29922,
16264,
29918,
2780,
29897,
13,
1678,
4216,
29889,
726,
3552,
1884,
29961,
29900,
1402,
3800,
29961,
29896,
29962,
448,
4079,
29918,
29882,
511,
12272,
29918,
710,
29892,
5445,
29922,
5657,
29918,
2780,
29892,
4079,
29922,
5657,
29897,
13,
13,
13,
26065,
29889,
2917,
29898,
2311,
7607,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
876,
13,
13,
4299,
353,
426,
13,
1678,
376,
3207,
1115,
5591,
4632,
29914,
9794,
29914,
29891,
3543,
29906,
29918,
2161,
29918,
18101,
29876,
29889,
3207,
613,
13,
1678,
376,
2109,
1115,
5591,
4632,
29914,
9794,
29914,
29891,
3543,
29906,
29918,
2161,
29918,
18101,
29876,
29889,
2109,
29908,
13,
29913,
13,
13,
6768,
353,
426,
13,
1678,
376,
4299,
29918,
1853,
1115,
29871,
376,
18101,
29876,
613,
13,
1678,
376,
2080,
29879,
1115,
426,
13,
4706,
376,
2080,
29900,
1115,
313,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29941,
29897,
13,
1678,
2981,
13,
1678,
376,
4905,
29879,
1115,
426,
13,
4706,
376,
4905,
29900,
1115,
313,
29955,
29892,
29871,
29955,
29892,
313,
29896,
29974,
29946,
29974,
29896,
11877,
29945,
29897,
13,
1678,
2981,
13,
1678,
376,
12676,
1115,
518,
29896,
29906,
29955,
29889,
29945,
29892,
29871,
29896,
29906,
29955,
29889,
29945,
29892,
29871,
29896,
29906,
29955,
29889,
29945,
1402,
13,
1678,
376,
12324,
1115,
518,
29900,
29889,
29900,
29900,
29955,
29947,
29896,
29906,
29945,
29892,
29871,
29900,
29889,
29900,
29900,
29955,
29947,
29896,
29906,
29945,
29892,
29871,
29900,
29889,
29900,
29900,
29955,
29947,
29896,
29906,
29945,
1402,
13,
29913,
13,
2158,
703,
489,
2254,
1904,
29901,
613,
1904,
29897,
13,
29885,
353,
302,
29876,
29889,
1359,
29898,
4299,
29892,
3523,
29922,
6768,
29897,
13,
2158,
703,
489,
2254,
3431,
1159,
13,
13,
2158,
703,
489,
1303,
1967,
1159,
13,
29893,
353,
3987,
3366,
2080,
29879,
3108,
3366,
2080,
29900,
3108,
29961,
29896,
29962,
13,
29882,
353,
3987,
3366,
2080,
29879,
3108,
3366,
2080,
29900,
3108,
29961,
29900,
29962,
13,
29937,
396,
10153,
29889,
4294,
580,
13,
2158,
703,
489,
1303,
1967,
3431,
1159,
13,
13,
13,
21134,
353,
6796,
10532,
3108,
13,
14588,
943,
353,
518,
29896,
29889,
29896,
29929,
29892,
29871,
29896,
29889,
29929,
29947,
29892,
29871,
29906,
29889,
29955,
29929,
29892,
29871,
29946,
29889,
29945,
29929,
29892,
29871,
29946,
29889,
29945,
29941,
29892,
29871,
29947,
29889,
29929,
29906,
29892,
29871,
29947,
29889,
29900,
29953,
29892,
29871,
29945,
29889,
29906,
29929,
29892,
29871,
29896,
29900,
29889,
29941,
29906,
29892,
29871,
29896,
29900,
29889,
29953,
29945,
29962,
13,
29891,
3543,
29906,
29918,
7099,
6119,
353,
1602,
6119,
29889,
29979,
3543,
29906,
29898,
2435,
29898,
21134,
511,
23791,
943,
29892,
7787,
29918,
262,
29918,
2311,
7607,
29893,
29892,
298,
511,
7787,
29918,
449,
29918,
2311,
7607,
29955,
29892,
29871,
29955,
876,
13,
13,
8000,
29871,
29896,
29901,
13,
1678,
10153,
353,
10656,
29889,
17885,
545,
580,
13,
1678,
565,
451,
10153,
29901,
13,
4706,
931,
29889,
17059,
29898,
29900,
29889,
29900,
29896,
29897,
13,
4706,
6773,
13,
1678,
260,
353,
931,
29889,
2230,
580,
13,
1678,
714,
353,
286,
29889,
11333,
29898,
2492,
29892,
4323,
675,
29922,
5574,
29892,
5912,
543,
26828,
29883,
1159,
13,
1678,
1596,
703,
489,
6375,
29901,
9162,
931,
29889,
2230,
580,
448,
260,
1723,
13,
13,
1678,
260,
353,
931,
29889,
2230,
580,
13,
1678,
16273,
29892,
2070,
29879,
353,
343,
3543,
29906,
29918,
7099,
6119,
29889,
3389,
29898,
449,
29892,
302,
1516,
29922,
29900,
29889,
29941,
29892,
16897,
29922,
29900,
29889,
29945,
29892,
10153,
29918,
2311,
7607,
29906,
29946,
29900,
29892,
29871,
29906,
29946,
29900,
876,
13,
1678,
1596,
703,
489,
21822,
29901,
9162,
931,
29889,
2230,
580,
448,
260,
1723,
13,
13,
1678,
260,
353,
931,
29889,
2230,
580,
13,
1678,
363,
474,
29892,
3800,
297,
26985,
29898,
1884,
267,
1125,
13,
4706,
770,
29918,
333,
353,
2070,
29879,
29961,
29875,
3816,
29900,
29962,
13,
4706,
2070,
353,
2070,
29879,
29961,
29875,
3816,
29896,
3816,
1990,
29918,
333,
29962,
13,
4706,
12272,
29918,
710,
353,
29850,
6177,
25641,
29889,
29906,
29888,
10560,
1642,
4830,
29898,
21134,
29961,
1990,
29918,
333,
1402,
2070,
29930,
29896,
29900,
29900,
29897,
13,
4706,
4216,
29918,
1621,
2521,
29918,
2541,
29918,
3257,
29898,
4990,
29889,
657,
29918,
4012,
3285,
3800,
29892,
12272,
29918,
710,
29897,
13,
1678,
1596,
703,
489,
4216,
29901,
9162,
931,
29889,
2230,
580,
448,
260,
1723,
13,
13,
1678,
260,
353,
931,
29889,
2230,
580,
13,
1678,
2479,
29889,
4294,
580,
13,
1678,
1596,
703,
489,
1510,
29901,
9162,
931,
29889,
2230,
580,
448,
260,
1723,
13,
13,
13,
2
] |
python/6kyu/playing_with_digits.py | momchilantonov/codewars | 0 | 128589 | <reponame>momchilantonov/codewars
def dig_pow(n, p):
"""
Some numbers have funny properties. For example:
89 --> 8¹ + 9² = 89 * 1
695 --> 6² + 9³ + 5⁴= 1390 = 695 * 2
46288 --> 4³ + 6⁴+ 2⁵ + 8⁶ + 8⁷ = 2360688 = 46288 * 51
Given a positive integer n written as abcd... (a, b, c, d... being digits) and a positive integer p
we want to find a positive integer k, if it exists, such that the sum of the digits of n taken to the successive powers of p is equal to k * n.
In other words:
Is there an integer k such as : (a ^ p + b ^ (p+1) + c ^(p+2) + d ^ (p+3) + ...) = n * k
If it is the case we will return k, if not return -1.
Note: n and p will always be given as strictly positive integers.
"""
num = 0
n = str(n)
for i in range(len(n)):
num += int(n[i]) ** p
p += 1
k = num / int(n)
if k.is_integer():
return k
else:
return -1
# TESTS
dig_pow(89, 1, 1)
dig_pow(92, 1, -1)
dig_pow(46288, 3, 51)
dig_pow(114, 3, 9)
| [
1,
529,
276,
1112,
420,
29958,
29885,
290,
305,
309,
11960,
586,
29914,
401,
29893,
1503,
13,
1753,
4697,
29918,
12248,
29898,
29876,
29892,
282,
1125,
13,
1678,
9995,
13,
1678,
3834,
3694,
505,
2090,
1460,
4426,
29889,
1152,
1342,
29901,
13,
268,
29947,
29929,
6660,
29871,
29947,
30193,
718,
29871,
29929,
30088,
353,
29871,
29947,
29929,
334,
29871,
29896,
13,
268,
29953,
29929,
29945,
6660,
29871,
29953,
30088,
718,
29871,
29929,
30168,
718,
29871,
29945,
30379,
29922,
29871,
29896,
29941,
29929,
29900,
353,
29871,
29953,
29929,
29945,
334,
29871,
29906,
13,
268,
29946,
29953,
29906,
29947,
29947,
6660,
29871,
29946,
30168,
718,
29871,
29953,
30379,
29974,
29871,
29906,
30509,
718,
29871,
29947,
30522,
718,
29871,
29947,
30749,
353,
29871,
29906,
29941,
29953,
29900,
29953,
29947,
29947,
353,
29871,
29946,
29953,
29906,
29947,
29947,
334,
29871,
29945,
29896,
13,
1678,
11221,
263,
6374,
6043,
302,
3971,
408,
633,
2252,
856,
313,
29874,
29892,
289,
29892,
274,
29892,
270,
856,
1641,
13340,
29897,
322,
263,
6374,
6043,
282,
13,
1678,
591,
864,
304,
1284,
263,
6374,
6043,
413,
29892,
565,
372,
4864,
29892,
1316,
393,
278,
2533,
310,
278,
13340,
310,
302,
4586,
304,
278,
2551,
573,
10801,
310,
282,
338,
5186,
304,
413,
334,
302,
29889,
13,
1678,
512,
916,
3838,
29901,
13,
1678,
1317,
727,
385,
6043,
413,
1316,
408,
584,
313,
29874,
6228,
282,
718,
289,
6228,
313,
29886,
29974,
29896,
29897,
718,
274,
6228,
29898,
29886,
29974,
29906,
29897,
718,
270,
6228,
313,
29886,
29974,
29941,
29897,
718,
29757,
353,
302,
334,
413,
13,
1678,
960,
372,
338,
278,
1206,
591,
674,
736,
413,
29892,
565,
451,
736,
448,
29896,
29889,
13,
1678,
3940,
29901,
302,
322,
282,
674,
2337,
367,
2183,
408,
18719,
6374,
11920,
29889,
13,
1678,
9995,
13,
13,
1678,
954,
353,
29871,
29900,
13,
1678,
302,
353,
851,
29898,
29876,
29897,
13,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
29876,
22164,
13,
4706,
954,
4619,
938,
29898,
29876,
29961,
29875,
2314,
3579,
282,
13,
4706,
282,
4619,
29871,
29896,
13,
13,
1678,
413,
353,
954,
847,
938,
29898,
29876,
29897,
13,
13,
1678,
565,
413,
29889,
275,
29918,
16031,
7295,
13,
4706,
736,
413,
13,
1678,
1683,
29901,
13,
4706,
736,
448,
29896,
13,
13,
13,
29937,
17067,
1254,
29903,
13,
7501,
29918,
12248,
29898,
29947,
29929,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
7501,
29918,
12248,
29898,
29929,
29906,
29892,
29871,
29896,
29892,
448,
29896,
29897,
13,
7501,
29918,
12248,
29898,
29946,
29953,
29906,
29947,
29947,
29892,
29871,
29941,
29892,
29871,
29945,
29896,
29897,
13,
7501,
29918,
12248,
29898,
29896,
29896,
29946,
29892,
29871,
29941,
29892,
29871,
29929,
29897,
13,
2
] |
ensemble/management/commands/seeddata.py | evanlouie/activelearning | 0 | 49525 | """
Test data scaffolding.
Read: https://docs.djangoproject.com/en/dev/howto/custom-management-commands/
"""
import json
from random import randint
from django.core.management.base import BaseCommand, CommandError
from ensemble.models import (
Classification,
Model,
ModelVersion,
MediaFile,
VideoPrediction,
AudioPrediction,
)
class Command(BaseCommand):
help = "Scaffold some test data for ensemble"
def handle(self, *args, **options):
gunshot = Classification(name="GUNSHOT")
gunshot.save()
audioset_model = Model(name="audioset")
audioset_model.save()
audioset_model.classifications.add(gunshot)
audioset_model_trained = ModelVersion(
model=audioset_model, version="0.01alpha2"
)
audioset_model_trained.save()
for movie in json.loads(self.__movie_json, strict=False):
media_file = MediaFile(
name=movie["title"],
url=movie["sources"][0],
description=movie["description"],
)
media_file.save()
video_predictions = [
self.__generate_random_video_prediction(
media_file, gunshot, audioset_model_trained
)
for _ in range(1000)
]
audio_predictions = [
self.__generate_random_audio_prediction(
media_file, gunshot, audioset_model_trained
)
for _ in range(1000)
]
# VideoPrediction.objects.bulk_create(video_predictions)
# AudioPrediction.objects.bulk_create(audio_predictions)
for prediction in video_predictions + audio_predictions:
prediction.save()
def __generate_random_video_prediction(self, media_file, classification, model):
"""
Generate a random gunshot video prediction for the video
"""
x = randint(0, 1280)
y = randint(0, 720)
width = randint(1, 1280 - x + 1)
height = randint(1, 720 - y + 1)
return VideoPrediction(
media_file=media_file,
classification=classification,
confidence=randint(0, 100),
model_version=model,
time=randint(0, 600000),
x=x,
y=y,
width=width,
height=height,
)
def __generate_random_audio_prediction(self, media_file, classification, model):
"""
Generate a random 10 second audio prediction for a gunshot
"""
return AudioPrediction(
media_file=media_file,
classification=classification,
confidence=randint(0, 100),
model_version=model,
time=randint(0, 600000),
duration="10000",
)
__movie_json = """
[
{
"description": "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
],
"subtitle": "By Blender Foundation",
"thumb": "images/BigBuckBunny.jpg",
"title": "Big Buck Bunny"
},
{
"description": "The first Blender Open Movie from 2006",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4"
],
"subtitle": "By Blender Foundation",
"thumb": "images/ElephantsDream.jpg",
"title": "Elephant Dream"
},
{
"description": "HBO GO now works with Chromecast -- the easiest way to enjoy online video on your TV. For when you want to settle into your Iron Throne to watch the latest episodes. For $35.\nLearn how to use Chromecast with HBO GO and more at google.com/chromecast.",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4"
],
"subtitle": "By Google",
"thumb": "images/ForBiggerBlazes.jpg",
"title": "For Bigger Blazes"
},
{
"description": "Introducing Chromecast. The easiest way to enjoy online video and music on your TV—for when Batman's escapes aren't quite big enough. For $35. Learn how to use Chromecast with Google Play Movies and more at google.com/chromecast.",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4"
],
"subtitle": "By Google",
"thumb": "images/ForBiggerEscapes.jpg",
"title": "For Bigger Escape"
},
{
"description": "Introducing Chromecast. The easiest way to enjoy online video and music on your TV. For $35. Find out more at google.com/chromecast.",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4"
],
"subtitle": "By Google",
"thumb": "images/ForBiggerFun.jpg",
"title": "For Bigger Fun"
},
{
"description": "Introducing Chromecast. The easiest way to enjoy online video and music on your TV—for the times that call for bigger joyrides. For $35. Learn how to use Chromecast with YouTube and more at google.com/chromecast.",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4"
],
"subtitle": "By Google",
"thumb": "images/ForBiggerJoyrides.jpg",
"title": "For Bigger Joyrides"
},
{
"description": "Introducing Chromecast. The easiest way to enjoy online video and music on your TV—for when you want to make Buster's big meltdowns even bigger. For $35. Learn how to use Chromecast with Netflix and more at google.com/chromecast.",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4"
],
"subtitle": "By Google",
"thumb": "images/ForBiggerMeltdowns.jpg",
"title": "For Bigger Meltdowns"
},
{
"description": "Sintel is an independently produced short film, initiated by the Blender Foundation as a means to further improve and validate the free/open source 3D creation suite Blender. With initial funding provided by 1000s of donations via the internet community, it has again proven to be a viable development model for both open 3D technology as for independent animation film.\nThis 15 minute film has been realized in the studio of the Amsterdam Blender Institute, by an international team of artists and developers. In addition to that, several crucial technical and creative targets have been realized online, by developers and artists and teams all over the world.\nwww.sintel.org",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4"
],
"subtitle": "By Blender Foundation",
"thumb": "images/Sintel.jpg",
"title": "Sintel"
},
{
"description": "Smoking Tire takes the all-new Subaru Outback to the highest point we can find in hopes our customer-appreciation Balloon Launch will get some free T-shirts into the hands of our viewers.",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4"
],
"subtitle": "By Garage419",
"thumb": "images/SubaruOutbackOnStreetAndDirt.jpg",
"title": "Subaru Outback On Street And Dirt"
},
{
"description": "Tears of Steel was realized with crowd-funding by users of the open source 3D creation tool Blender. Target was to improve and test a complete open and free pipeline for visual effects in film - and to make a compelling sci-fi film in Amsterdam, the Netherlands. The film itself, and all raw material used for making it, have been released under the Creatieve Commons 3.0 Attribution license. Visit the tearsofsteel.org website to find out more about this, or to purchase the 4-DVD box with a lot of extras. (CC) Blender Foundation - http://www.tearsofsteel.org",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4"
],
"subtitle": "By Blender Foundation",
"thumb": "images/TearsOfSteel.jpg",
"title": "Tears of Steel"
},
{
"description": "The Smoking Tire heads out to Adams Motorsports Park in Riverside, CA to test the most requested car of 2010, the Volkswagen GTI. Will it beat the Mazdaspeed3's standard-setting lap time? Watch and see...",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/VolkswagenGTIReview.mp4"
],
"subtitle": "By Garage419",
"thumb": "images/VolkswagenGTIReview.jpg",
"title": "Volkswagen GTI Review"
},
{
"description": "The Smoking Tire is going on the 2010 Bullrun Live Rally in a 2011 Shelby GT500, and posting a video from the road every single day! The only place to watch them is by subscribing to The Smoking Tire or watching at BlackMagicShine.com",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/WeAreGoingOnBullrun.mp4"
],
"subtitle": "By Garage419",
"thumb": "images/WeAreGoingOnBullrun.jpg",
"title": "We Are Going On Bullrun"
},
{
"description": "The Smoking Tire meets up with Chris and Jorge from CarsForAGrand.com to see just how far $1,000 can go when looking for a car.The Smoking Tire meets up with Chris and Jorge from CarsForAGrand.com to see just how far $1,000 can go when looking for a car.",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/WhatCarCanYouGetForAGrand.mp4"
],
"subtitle": "By Garage419",
"thumb": "images/WhatCarCanYouGetForAGrand.jpg",
"title": "What care can you get for a grand?"
}
]
"""
| [
1,
9995,
13,
3057,
848,
885,
3470,
1025,
292,
29889,
13,
6359,
29901,
2045,
597,
2640,
29889,
19776,
574,
26555,
622,
29889,
510,
29914,
264,
29914,
3359,
29914,
3525,
517,
29914,
6341,
29899,
21895,
29899,
26381,
29914,
13,
15945,
29908,
13,
5215,
4390,
13,
3166,
4036,
1053,
20088,
524,
13,
3166,
9557,
29889,
3221,
29889,
21895,
29889,
3188,
1053,
7399,
6255,
29892,
10516,
2392,
13,
3166,
21285,
29889,
9794,
1053,
313,
13,
1678,
23236,
29892,
13,
1678,
8125,
29892,
13,
1678,
8125,
6594,
29892,
13,
1678,
8213,
2283,
29892,
13,
1678,
13987,
23084,
2463,
29892,
13,
1678,
21764,
23084,
2463,
29892,
13,
29897,
13,
13,
13,
1990,
10516,
29898,
5160,
6255,
1125,
13,
1678,
1371,
353,
376,
29903,
1113,
600,
1025,
777,
1243,
848,
363,
21285,
29908,
13,
13,
1678,
822,
4386,
29898,
1311,
29892,
334,
5085,
29892,
3579,
6768,
1125,
13,
4706,
13736,
8962,
353,
23236,
29898,
978,
543,
29954,
29965,
3059,
29950,
2891,
1159,
13,
4706,
13736,
8962,
29889,
7620,
580,
13,
4706,
12990,
2363,
300,
29918,
4299,
353,
8125,
29898,
978,
543,
15052,
2363,
300,
1159,
13,
4706,
12990,
2363,
300,
29918,
4299,
29889,
7620,
580,
13,
4706,
12990,
2363,
300,
29918,
4299,
29889,
1990,
8232,
29889,
1202,
29898,
28798,
8962,
29897,
13,
4706,
12990,
2363,
300,
29918,
4299,
29918,
3018,
1312,
353,
8125,
6594,
29898,
13,
9651,
1904,
29922,
15052,
2363,
300,
29918,
4299,
29892,
1873,
543,
29900,
29889,
29900,
29896,
2312,
29906,
29908,
13,
4706,
1723,
13,
4706,
12990,
2363,
300,
29918,
4299,
29918,
3018,
1312,
29889,
7620,
580,
13,
13,
4706,
363,
14064,
297,
4390,
29889,
18132,
29898,
1311,
17255,
27362,
29918,
3126,
29892,
9406,
29922,
8824,
1125,
13,
9651,
5745,
29918,
1445,
353,
8213,
2283,
29898,
13,
18884,
1024,
29922,
27362,
3366,
3257,
12436,
13,
18884,
3142,
29922,
27362,
3366,
29879,
2863,
3108,
29961,
29900,
1402,
13,
18884,
6139,
29922,
27362,
3366,
8216,
12436,
13,
9651,
1723,
13,
9651,
5745,
29918,
1445,
29889,
7620,
580,
13,
13,
9651,
4863,
29918,
27711,
1080,
353,
518,
13,
18884,
1583,
17255,
17158,
29918,
8172,
29918,
9641,
29918,
11965,
2463,
29898,
13,
462,
1678,
5745,
29918,
1445,
29892,
13736,
8962,
29892,
12990,
2363,
300,
29918,
4299,
29918,
3018,
1312,
13,
18884,
1723,
13,
18884,
363,
903,
297,
3464,
29898,
29896,
29900,
29900,
29900,
29897,
13,
9651,
4514,
13,
9651,
10348,
29918,
27711,
1080,
353,
518,
13,
18884,
1583,
17255,
17158,
29918,
8172,
29918,
18494,
29918,
11965,
2463,
29898,
13,
462,
1678,
5745,
29918,
1445,
29892,
13736,
8962,
29892,
12990,
2363,
300,
29918,
4299,
29918,
3018,
1312,
13,
18884,
1723,
13,
18884,
363,
903,
297,
3464,
29898,
29896,
29900,
29900,
29900,
29897,
13,
9651,
4514,
13,
13,
9651,
396,
13987,
23084,
2463,
29889,
12650,
29889,
8645,
29895,
29918,
3258,
29898,
9641,
29918,
27711,
1080,
29897,
13,
9651,
396,
21764,
23084,
2463,
29889,
12650,
29889,
8645,
29895,
29918,
3258,
29898,
18494,
29918,
27711,
1080,
29897,
13,
9651,
363,
18988,
297,
4863,
29918,
27711,
1080,
718,
10348,
29918,
27711,
1080,
29901,
13,
18884,
18988,
29889,
7620,
580,
13,
13,
1678,
822,
4770,
17158,
29918,
8172,
29918,
9641,
29918,
11965,
2463,
29898,
1311,
29892,
5745,
29918,
1445,
29892,
12965,
29892,
1904,
1125,
13,
4706,
9995,
13,
4706,
3251,
403,
263,
4036,
13736,
8962,
4863,
18988,
363,
278,
4863,
13,
4706,
9995,
13,
4706,
921,
353,
20088,
524,
29898,
29900,
29892,
29871,
29896,
29906,
29947,
29900,
29897,
13,
4706,
343,
353,
20088,
524,
29898,
29900,
29892,
29871,
29955,
29906,
29900,
29897,
13,
4706,
2920,
353,
20088,
524,
29898,
29896,
29892,
29871,
29896,
29906,
29947,
29900,
448,
921,
718,
29871,
29896,
29897,
13,
4706,
3171,
353,
20088,
524,
29898,
29896,
29892,
29871,
29955,
29906,
29900,
448,
343,
718,
29871,
29896,
29897,
13,
4706,
736,
13987,
23084,
2463,
29898,
13,
9651,
5745,
29918,
1445,
29922,
9799,
29918,
1445,
29892,
13,
9651,
12965,
29922,
1990,
2450,
29892,
13,
9651,
16420,
29922,
9502,
524,
29898,
29900,
29892,
29871,
29896,
29900,
29900,
511,
13,
9651,
1904,
29918,
3259,
29922,
4299,
29892,
13,
9651,
931,
29922,
9502,
524,
29898,
29900,
29892,
29871,
29953,
29900,
29900,
29900,
29900,
29900,
511,
13,
9651,
921,
29922,
29916,
29892,
13,
9651,
343,
29922,
29891,
29892,
13,
9651,
2920,
29922,
2103,
29892,
13,
9651,
3171,
29922,
3545,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
4770,
17158,
29918,
8172,
29918,
18494,
29918,
11965,
2463,
29898,
1311,
29892,
5745,
29918,
1445,
29892,
12965,
29892,
1904,
1125,
13,
4706,
9995,
13,
4706,
3251,
403,
263,
4036,
29871,
29896,
29900,
1473,
10348,
18988,
363,
263,
13736,
8962,
13,
4706,
9995,
13,
4706,
736,
21764,
23084,
2463,
29898,
13,
9651,
5745,
29918,
1445,
29922,
9799,
29918,
1445,
29892,
13,
9651,
12965,
29922,
1990,
2450,
29892,
13,
9651,
16420,
29922,
9502,
524,
29898,
29900,
29892,
29871,
29896,
29900,
29900,
511,
13,
9651,
1904,
29918,
3259,
29922,
4299,
29892,
13,
9651,
931,
29922,
9502,
524,
29898,
29900,
29892,
29871,
29953,
29900,
29900,
29900,
29900,
29900,
511,
13,
9651,
14385,
543,
29896,
29900,
29900,
29900,
29900,
613,
13,
4706,
1723,
13,
13,
1678,
4770,
27362,
29918,
3126,
353,
9995,
13,
1678,
518,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
6970,
16281,
27105,
1460,
10603,
278,
5828,
310,
263,
28396,
27127,
277,
411,
263,
5192,
16600,
1135,
3654,
29889,
1932,
697,
6575,
1460,
2462,
2211,
15382,
1237,
29051,
873,
4023,
465,
1075,
29892,
1554,
5807,
2547,
856,
322,
278,
27127,
277,
7216,
29915,
29873,
694,
289,
348,
1460,
15128,
29991,
512,
278,
15662,
7774,
6150,
11399,
540,
10223,
267,
278,
11777,
29891,
15382,
1237,
263,
419,
936,
20957,
479,
7790,
29876,
29905,
29876,
29931,
293,
21144,
1090,
278,
26635,
3468,
6212,
3224,
19405,
29905,
29876,
1124,
597,
1636,
29889,
3752,
2423,
384,
29890,
348,
1460,
29889,
990,
613,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
6970,
29933,
2707,
29933,
348,
1460,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
3164,
1581,
10606,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
6970,
29933,
2707,
29933,
348,
1460,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
6970,
16281,
27105,
1460,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
1576,
937,
3164,
1581,
4673,
7871,
515,
29871,
29906,
29900,
29900,
29953,
613,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
29923,
280,
561,
1934,
29928,
1633,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
3164,
1581,
10606,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
29923,
280,
561,
1934,
29928,
1633,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
29923,
280,
561,
424,
16814,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
29950,
8456,
21947,
1286,
1736,
411,
678,
456,
687,
579,
1192,
278,
19075,
982,
304,
13389,
7395,
4863,
373,
596,
5648,
29889,
1152,
746,
366,
864,
304,
3604,
280,
964,
596,
20492,
498,
29878,
650,
304,
6505,
278,
9281,
23238,
29889,
1152,
395,
29941,
29945,
7790,
29876,
29931,
799,
29876,
920,
304,
671,
678,
456,
687,
579,
411,
379,
8456,
21947,
322,
901,
472,
5386,
29889,
510,
29914,
27433,
687,
579,
19602,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
2831,
29933,
3567,
29933,
433,
10947,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
5087,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
2831,
29933,
3567,
29933,
433,
10947,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
2831,
350,
3567,
10465,
10947,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
2928,
3518,
3277,
678,
456,
687,
579,
29889,
450,
19075,
982,
304,
13389,
7395,
4863,
322,
4696,
373,
596,
5648,
30003,
1454,
746,
12579,
1171,
29915,
29879,
3966,
11603,
9455,
29915,
29873,
3755,
4802,
3307,
29889,
1152,
395,
29941,
29945,
29889,
19530,
29876,
920,
304,
671,
678,
456,
687,
579,
411,
5087,
7412,
14104,
583,
322,
901,
472,
5386,
29889,
510,
29914,
27433,
687,
579,
19602,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
2831,
29933,
3567,
29923,
1557,
11603,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
5087,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
2831,
29933,
3567,
29923,
1557,
11603,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
2831,
350,
3567,
3423,
5738,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
2928,
3518,
3277,
678,
456,
687,
579,
29889,
450,
19075,
982,
304,
13389,
7395,
4863,
322,
4696,
373,
596,
5648,
29889,
1152,
395,
29941,
29945,
29889,
29871,
10987,
714,
901,
472,
5386,
29889,
510,
29914,
27433,
687,
579,
19602,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
2831,
29933,
3567,
25394,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
5087,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
2831,
29933,
3567,
25394,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
2831,
350,
3567,
13811,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
2928,
3518,
3277,
678,
456,
687,
579,
29889,
450,
19075,
982,
304,
13389,
7395,
4863,
322,
4696,
373,
596,
5648,
30003,
1454,
278,
3064,
393,
1246,
363,
16600,
2958,
4316,
2247,
29889,
1152,
395,
29941,
29945,
29889,
19530,
29876,
920,
304,
671,
678,
456,
687,
579,
411,
14711,
322,
901,
472,
5386,
29889,
510,
29914,
27433,
687,
579,
19602,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
2831,
29933,
3567,
10844,
4316,
2247,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
5087,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
2831,
29933,
3567,
10844,
4316,
2247,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
2831,
350,
3567,
3650,
4316,
2247,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
2928,
3518,
3277,
678,
456,
687,
579,
29889,
450,
19075,
982,
304,
13389,
7395,
4863,
322,
4696,
373,
596,
5648,
30003,
1454,
746,
366,
864,
304,
1207,
350,
5402,
29915,
29879,
4802,
9232,
1594,
776,
29879,
1584,
16600,
29889,
1152,
395,
29941,
29945,
29889,
19530,
29876,
920,
304,
671,
678,
456,
687,
579,
411,
12670,
20157,
29916,
322,
901,
472,
5386,
29889,
510,
29914,
27433,
687,
579,
19602,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
2831,
29933,
3567,
29924,
295,
1594,
776,
29879,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
5087,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
2831,
29933,
3567,
29924,
295,
1594,
776,
29879,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
2831,
350,
3567,
6286,
1594,
776,
29879,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
29903,
524,
295,
338,
385,
25499,
7371,
3273,
2706,
29892,
14511,
630,
491,
278,
3164,
1581,
10606,
408,
263,
2794,
304,
4340,
11157,
322,
12725,
278,
3889,
29914,
3150,
2752,
29871,
29941,
29928,
11265,
9460,
3164,
1581,
29889,
2973,
2847,
5220,
292,
4944,
491,
29871,
29896,
29900,
29900,
29900,
29879,
310,
1016,
800,
3025,
278,
8986,
7881,
29892,
372,
756,
1449,
16413,
304,
367,
263,
3516,
519,
5849,
1904,
363,
1716,
1722,
29871,
29941,
29928,
15483,
408,
363,
7417,
9612,
2706,
7790,
29876,
4013,
29871,
29896,
29945,
11015,
2706,
756,
1063,
16387,
297,
278,
8693,
310,
278,
17399,
3164,
1581,
8907,
29892,
491,
385,
6121,
3815,
310,
17906,
322,
18777,
29889,
512,
6124,
304,
393,
29892,
3196,
7618,
1455,
16905,
322,
907,
1230,
22525,
505,
1063,
16387,
7395,
29892,
491,
18777,
322,
17906,
322,
10907,
599,
975,
278,
3186,
7790,
29876,
1636,
29889,
29879,
524,
295,
29889,
990,
613,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
29903,
524,
295,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
3164,
1581,
10606,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
29903,
524,
295,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
29903,
524,
295,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
12636,
17223,
323,
533,
4893,
278,
599,
29899,
1482,
3323,
18071,
4451,
1627,
304,
278,
9939,
1298,
591,
508,
1284,
297,
26926,
1749,
11962,
29899,
932,
4361,
362,
7392,
417,
265,
997,
3322,
674,
679,
777,
3889,
323,
29899,
845,
381,
1372,
964,
278,
6567,
310,
1749,
1776,
414,
19602,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
4035,
18071,
3744,
1627,
2951,
855,
4521,
2855,
29928,
2728,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
7455,
482,
29946,
29896,
29929,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
4035,
18071,
3744,
1627,
2951,
855,
4521,
2855,
29928,
2728,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
4035,
18071,
4451,
1627,
1551,
7103,
1126,
360,
2728,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
29911,
15451,
310,
2443,
295,
471,
16387,
411,
19174,
29899,
27159,
292,
491,
4160,
310,
278,
1722,
2752,
29871,
29941,
29928,
11265,
5780,
3164,
1581,
29889,
17157,
471,
304,
11157,
322,
1243,
263,
4866,
1722,
322,
3889,
16439,
363,
7604,
9545,
297,
2706,
448,
322,
304,
1207,
263,
752,
7807,
4560,
29899,
7241,
2706,
297,
17399,
29892,
278,
24553,
29889,
29871,
450,
2706,
3528,
29892,
322,
599,
10650,
5518,
1304,
363,
3907,
372,
29892,
505,
1063,
5492,
1090,
278,
6760,
271,
2418,
3468,
29871,
29941,
29889,
29900,
6212,
3224,
19405,
29889,
5741,
277,
278,
734,
279,
578,
29888,
1655,
295,
29889,
990,
4700,
304,
1284,
714,
901,
1048,
445,
29892,
470,
304,
20590,
278,
29871,
29946,
29899,
29928,
10699,
3800,
411,
263,
3287,
310,
429,
10678,
29889,
29871,
313,
4174,
29897,
3164,
1581,
10606,
448,
1732,
597,
1636,
29889,
371,
279,
578,
29888,
1655,
295,
29889,
990,
613,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
29911,
15451,
2776,
7789,
295,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
3164,
1581,
10606,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
29911,
15451,
2776,
7789,
295,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
29911,
15451,
310,
2443,
295,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
1576,
4116,
17223,
323,
533,
15883,
714,
304,
20359,
7142,
943,
4011,
4815,
297,
390,
1536,
680,
29892,
12766,
304,
1243,
278,
1556,
13877,
1559,
310,
29871,
29906,
29900,
29896,
29900,
29892,
278,
14639,
23702,
21342,
29902,
29889,
2811,
372,
16646,
278,
17326,
17370,
412,
287,
29941,
29915,
29879,
3918,
29899,
26740,
23012,
931,
29973,
24274,
322,
1074,
856,
613,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
13072,
2039,
23702,
23799,
29902,
1123,
1493,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
7455,
482,
29946,
29896,
29929,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
13072,
2039,
23702,
23799,
29902,
1123,
1493,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
13072,
2039,
23702,
21342,
29902,
13957,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
1576,
4116,
17223,
323,
533,
338,
2675,
373,
278,
29871,
29906,
29900,
29896,
29900,
20293,
3389,
10782,
390,
635,
297,
263,
29871,
29906,
29900,
29896,
29896,
1383,
295,
1609,
21342,
29945,
29900,
29900,
29892,
322,
16742,
263,
4863,
515,
278,
6520,
1432,
2323,
2462,
29991,
450,
871,
2058,
304,
6505,
963,
338,
491,
21696,
10549,
304,
450,
4116,
17223,
323,
533,
470,
21217,
472,
6054,
19095,
293,
2713,
457,
29889,
510,
613,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
4806,
17506,
8120,
292,
2951,
29933,
913,
3389,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
7455,
482,
29946,
29896,
29929,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
4806,
17506,
8120,
292,
2951,
29933,
913,
3389,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
4806,
4683,
2921,
292,
1551,
20293,
3389,
29908,
13,
1678,
2981,
13,
1678,
426,
13,
4706,
376,
8216,
1115,
376,
1576,
4116,
17223,
323,
533,
28103,
701,
411,
12821,
322,
21801,
515,
315,
1503,
2831,
29909,
3338,
392,
29889,
510,
304,
1074,
925,
920,
2215,
395,
29896,
29892,
29900,
29900,
29900,
508,
748,
746,
3063,
363,
263,
1559,
29889,
1576,
4116,
17223,
323,
533,
28103,
701,
411,
12821,
322,
21801,
515,
315,
1503,
2831,
29909,
3338,
392,
29889,
510,
304,
1074,
925,
920,
2215,
395,
29896,
29892,
29900,
29900,
29900,
508,
748,
746,
3063,
363,
263,
1559,
19602,
13,
4706,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
1124,
597,
2055,
898,
271,
579,
6022,
29889,
15947,
29889,
510,
29914,
4141,
29894,
29899,
29894,
7958,
29899,
21454,
29914,
11249,
29914,
5618,
8179,
6028,
3492,
2577,
2831,
29909,
3338,
392,
29889,
1526,
29946,
29908,
13,
4706,
21251,
13,
4706,
376,
1491,
3257,
1115,
376,
2059,
7455,
482,
29946,
29896,
29929,
613,
13,
4706,
376,
386,
3774,
1115,
376,
8346,
29914,
5618,
8179,
6028,
3492,
2577,
2831,
29909,
3338,
392,
29889,
6173,
613,
13,
4706,
376,
3257,
1115,
376,
5618,
2562,
508,
366,
679,
363,
263,
4595,
3026,
13,
1678,
500,
13,
1678,
4514,
13,
1678,
9995,
13,
2
] |
src/terra/contracts/levana.py | fentas/staketaxcsv | 0 | 22832 | # known contracts from protocol
CONTRACTS = [
# NFT - Meteor Dust
"<KEY>",
# NFT - Eggs
"<KEY>",
# NFT - Dragons
"<KEY>",
# NFT - Loot
"<KEY>",
]
def handle(exporter, elem, txinfo, contract):
print(f"Levana! {contract}")
#print(elem)
| [
1,
396,
2998,
8078,
29879,
515,
9608,
13,
22412,
4717,
1783,
29903,
353,
518,
13,
1678,
396,
405,
7818,
448,
29573,
360,
504,
13,
1678,
9872,
10818,
28341,
13,
1678,
396,
405,
7818,
448,
382,
1505,
29879,
13,
1678,
9872,
10818,
28341,
13,
1678,
396,
405,
7818,
448,
12225,
787,
13,
1678,
9872,
10818,
28341,
13,
1678,
396,
405,
7818,
448,
365,
3155,
13,
1678,
9872,
10818,
28341,
13,
29962,
13,
13,
1753,
4386,
29898,
735,
18505,
29892,
21268,
29892,
25568,
3888,
29892,
8078,
1125,
13,
1678,
1596,
29898,
29888,
29908,
3226,
29894,
1648,
29991,
426,
1285,
1461,
27195,
13,
1678,
396,
2158,
29898,
20461,
29897,
13,
2
] |
webdriver/applicationstate.py | jiteshmohite/Python-Page-Object-Model-Framework | 6 | 1601865 | class ApplicationState(object):
NOT_INSTALLED = 0
NOT_RUNNING = 1
RUNNING_IN_BACKGROUND_SUSPENDED = 2
RUNNING_IN_BACKGROUND = 3
RUNNING_IN_FOREGROUND = 4
| [
1,
770,
8427,
2792,
29898,
3318,
1125,
13,
1678,
6058,
29918,
25580,
1964,
20566,
353,
29871,
29900,
13,
1678,
6058,
29918,
29934,
3904,
29940,
4214,
353,
29871,
29896,
13,
1678,
27694,
29940,
4214,
29918,
1177,
29918,
29933,
11375,
29954,
1672,
18783,
29918,
29903,
3308,
29925,
1430,
2287,
29928,
353,
29871,
29906,
13,
1678,
27694,
29940,
4214,
29918,
1177,
29918,
29933,
11375,
29954,
1672,
18783,
353,
29871,
29941,
13,
1678,
27694,
29940,
4214,
29918,
1177,
29918,
5800,
18166,
1672,
18783,
353,
29871,
29946,
13,
2
] |
mummi_ras/online/aa/aa_get_tiltrot_z_state.py | mummi-framework/mummi-ras | 4 | 896 | ###############################################################################
# @todo add Pilot2-splash-app disclaimer
###############################################################################
""" Get's KRAS states """
import MDAnalysis as mda
from MDAnalysis.analysis import align
from MDAnalysis.lib.mdamath import make_whole
import os
import numpy as np
import math
############## Below section needs to be uncommented ############
import mummi_core
import mummi_ras
from mummi_core.utils import Naming
# # Logger has to be initialized the first thing in the script
from logging import getLogger
LOGGER = getLogger(__name__)
# # Innitilize MuMMI if it has not been done before
# MUMMI_ROOT = mummi.init(True)
# This is needed so the Naming works below
#@TODO fix this so we don't have these on import make them as an init
mummi_core.init()
dirKRASStates = Naming.dir_res('states')
dirKRASStructures = Naming.dir_res('structures')
# #RAS_ONLY_macrostate = np.loadtxt(os.path.join(dirKRASStates, "RAS-ONLY.microstates.txt"))
RAS_ONLY_macrostate = np.loadtxt(os.path.join(dirKRASStates, "ras-states.txt"),comments='#')
# #RAS_RAF_macrostate = np.loadtxt(os.path.join(dirKRASStates, "RAS-RAF.microstates.txt"))
RAS_RAF_macrostate = np.loadtxt(os.path.join(dirKRASStates, "ras-raf-states.txt"),comments='#') # Note diffrent number of columns so index change below
# TODO: CS, my edits to test
# RAS_ONLY_macrostate = np.loadtxt('ras-states.txt')
# RAS_RAF_macrostate = np.loadtxt('ras-raf-states.txt')
############## above section needs to be uncommented ############
# TODO: CS, my edits to test
# TODO: TSC, The reference structure has to currently be set as the 'RAS-ONLY-reference-structure.gro'
# TODO: TSC, path to the reference structure is: mummi_resources/structures/
kras_ref_universe = mda.Universe(os.path.join(dirKRASStructures, "RAS-ONLY-reference-structure.gro"))
# kras_ref_universe = mda.Universe("RAS-ONLY-reference-structure.gro")
# kras_ref_universe = mda.Universe('AA_pfpatch_000000004641_RAS_RAF2_411.gro')
# TODO: CS, not using these for x4 proteins; instead using protein_systems below to set num_res
######### Below hard codes the number of residues within RAS-only and RAS-RAF ##########
RAS_only_num_res = 184
RAS_RAF_num_res = 320
######### Above hard codes the number of residues within RAS-only and RAS-RAF ##########
####### This can be removed
# def get_kras(syst, kras_start):
# """Gets all atoms for a KRAS protein starting at 'kras_start'."""
# return syst.atoms[kras_start:kras_start+428]
####### This can be removed
def get_segids(u):
"""Identifies the list of segments within the system. Only needs to be called x1 time"""
segs = u.segments
segs = segs.segids
ras_segids = []
rasraf_segids = []
for i in range(len(segs)):
# print(segs[i])
if segs[i][-3:] == 'RAS':
ras_segids.append(segs[i])
if segs[i][-3:] == 'RAF':
rasraf_segids.append(segs[i])
return ras_segids, rasraf_segids
def get_protein_info(u,tag):
"""Uses the segments identified in get_segids to make a list of all proteins in the systems.\
Outputs a list of the first residue number of the protein, and whether it is 'RAS-ONLY', or 'RAS-RAF'.\
The 'tag' input defines what is used to identify the first residue of the protein. i.e. 'resname ACE1 and name BB'.\
Only needs to be called x1 time"""
ras_segids, rasraf_segids = get_segids(u)
if len(ras_segids) > 0:
RAS = u.select_atoms('segid '+ras_segids[0]+' and '+str(tag))
else:
RAS = []
if len(rasraf_segids) > 0:
RAF = u.select_atoms('segid '+rasraf_segids[0]+' and '+str(tag))
else:
RAF = []
protein_info = []#np.empty([len(RAS)+len(RAF),2])
for i in range(len(RAS)):
protein_info.append((RAS[i].resid,'RAS-ONLY'))
for i in range(len(RAF)):
protein_info.append((RAF[i].resid,'RAS-RAF'))
######## sort protein info
protein_info = sorted(protein_info)
######## sort protein info
return protein_info
def get_ref_kras():
"""Gets the reference KRAS struct. Only called x1 time when class is loaded"""
start_of_g_ref = kras_ref_universe.residues[0].resid
ref_selection = 'resid '+str(start_of_g_ref)+':'+str(start_of_g_ref+24)+' ' +\
str(start_of_g_ref+38)+':'+str(start_of_g_ref+54)+' ' +\
str(start_of_g_ref+67)+':'+str(start_of_g_ref+164)+' ' +\
'and (name CA or name BB)'
r2_26r40_56r69_166_ref = kras_ref_universe.select_atoms(str(ref_selection))
return kras_ref_universe.select_atoms(str(ref_selection)).positions - kras_ref_universe.select_atoms(str(ref_selection)).center_of_mass()
# Load inital ref frames (only need to do this once)
ref0 = get_ref_kras()
def getKRASstates(u,kras_indices):
"""Gets states for all KRAS proteins in path."""
# res_shift = 8
# all_glycine = u.select_atoms("resname GLY")
# kras_indices = []
# for i in range(0, len(all_glycine), 26):
# kras_indices.append(all_glycine[i].index)
########## Below is taken out of the function so it is only done once #########
# kras_indices = get_protein_info(u,'resname ACE1 and name BB')
########## Above is taken out of the function so it is only done once #########
# CS, for x4 cases:
# [{protein_x4: (protein_type, num_res)}]
protein_systems = [{'ras4a': ('RAS-ONLY', 185),
'ras4araf': ('RAS-RAF', 321),
'ras': ('RAS-ONLY', 184),
'rasraf': ('RAS-RAF', 320)}]
ALLOUT = []
for k in range(len(kras_indices)):
start_of_g = kras_indices[k][0]
protein_x4 = str(kras_indices[k][1])
try:
protein_type = [item[protein_x4] for item in protein_systems][0][0] # 'RAS-ONLY' OR 'RAS-RAF'
num_res = [item[protein_x4] for item in protein_systems][0][1]
except:
LOGGER.error('Check KRas naming between modules')
raise Exception('Error: unknown KRas name')
# TODO: CS, replacing this comment section with the above, to handle x4 protein types
# ---------------------------------------
# ALLOUT = []
# for k in range(len(kras_indices)):
# start_of_g = kras_indices[k][0]
# protein_type = str(kras_indices[k][1])
# ########## BELOW SECTION TO DETERMINE WHICH RESIDUES ARE PART OF THE PROTEIN GROUP - NEEDED FOR PBC REMOVAL ##############
# ########## POTENTIALLY REDO WITH A 'HARD-CODED' NUMBER OF RESIDUES PER PROTEIN GROUP (WHETHER RAS-ONLY OR RAS-RAF) #######
# ########## HAS BEEN REDONE WITH A 'HARD-CODED' NUMBER OF RESIDUES PER PROTEIN GROUP (WHETHER RAS-ONLY OR RAS-RAF) ########
# # if len(kras_indices) == 1:
# # krases0_BB = u.select_atoms('resid '+str(start_of_g)+':'+str(len(u.residues))+' and name BB') ####### HAS TO BE FIXED FOR BACKBONE ATOMS FOR SPECIFIC PROTEIN
# # elif len(kras_indices) > 1:
# # if k == len(kras_indices)-1:
# # krases0_BB = u.select_atoms('resid '+str(start_of_g)+':'+str(len(u.residues))+' and name BB')
# # else:
# # krases0_BB = u.select_atoms('resid '+str(start_of_g)+':'+str(kras_indices[k+1][0])+' and name BB')
# ########## ABOVE SECTION TO DETERMINE WHICH RESIDUES ARE PART OF THE PROTEIN GROUP - NEEDED FOR PBC REMOVAL ##############
#
# ########## Below hard codes the number of residues/beads in the RAS-ONLY and RAS-RAF simulations #########################
# if protein_type == 'RAS-ONLY':
# num_res = RAS_only_num_res
# elif protein_type == 'RAS-RAF':
# num_res = RAS_RAF_num_res
# ########## Above hard codes the number of residues/beads in the RAS-ONLY and RAS-RAF simulations #########################
# ---------------------------------------
# TODO: TSC, I changed the selection below, which can be used for the make_whole...
# krases0_BB = u.select_atoms('resid '+str(start_of_g)+':'+str(start_of_g+num_res)+' and (name CA or name BB)')
krases0_BB = u.select_atoms('resid '+str(start_of_g)+':'+str(start_of_g+num_res))
krases0_BB.guess_bonds()
r2_26r40_56r69_166 = u.select_atoms('resid '+str(start_of_g)+':'+str(start_of_g+24)+' ' +\
str(start_of_g+38)+':'+str(start_of_g+54)+' ' +\
str(start_of_g+67)+':'+str(start_of_g+164)+\
' and (name CA or name BB)')
u_selection = \
'resid '+str(start_of_g)+':'+str(start_of_g+24)+' '+str(start_of_g+38)+':'+str(start_of_g+54)+' ' +\
str(start_of_g+67)+':'+str(start_of_g+164)+' and (name CA or name BB)'
mobile0 = u.select_atoms(str(u_selection)).positions - u.select_atoms(str(u_selection)).center_of_mass()
# TODO: CS, something wrong with ref0 from get_kras_ref()
# just making ref0 = mobile0 to test for now
# ref0 = mobile0
# TSC removed this
R, RMSD_junk = align.rotation_matrix(mobile0, ref0)
######## TODO: TSC, Adjusted for AA lipid names ########
# lipids = u.select_atoms('resname POPX POPC PAPC POPE DIPE DPSM PAPS PAP6 CHOL')
lipids = u.select_atoms('resname POPC PAPC POPE DIPE SSM PAPS SAPI CHL1')
coords = ref0
RotMat = []
OS = []
r152_165 = krases0_BB.select_atoms('resid '+str(start_of_g+150)+':'+str(start_of_g+163)+' and (name CA or name BB)')
r65_74 = krases0_BB.select_atoms('resid '+str(start_of_g+63)+':'+str(start_of_g+72)+' and (name CA or name BB)')
timeframes = []
# TODO: CS, for AA need bonds to run make_whole()
# krases0_BB.guess_bonds()
# TODO: CS, turn off for now to test beyond this point
''' *** for AA, need to bring that back on once all else runs ***
'''
# @Tim and <NAME>. this was commented out - please check.
#make_whole(krases0_BB)
j, rmsd_junk = mda.analysis.align.rotation_matrix((r2_26r40_56r69_166.positions-r2_26r40_56r69_166.center_of_mass()), coords)
RotMat.append(j)
OS.append(r65_74.center_of_mass()-r152_165.center_of_mass())
timeframes.append(u.trajectory.time)
if protein_type == 'RAS-RAF':
z_pos = []
############### NEED TO CONFIRM THE SELECTION OF THE RAF LOOP RESIDUES BELOW ####################
############### TODO: TSC, zshifting is set to -1 (instead of -2), as there are ACE caps that are separate residues in AA
#zshifting=-1
if protein_x4 == 'rasraf':
zshifting = -1
elif protein_x4 == 'ras4araf':
zshifting = 0
else:
zshifting = 0
LOGGER.error('Found unsupported protein_x4 type')
raf_loops_selection = u.select_atoms('resid '+str(start_of_g+zshifting+291)+':'+str(start_of_g+zshifting+294)+' ' +\
str(start_of_g+zshifting+278)+':'+str(start_of_g+zshifting+281)+' ' +\
' and (name CA or name BB)')
############### NEED TO CONFIRM THE SELECTION OF THE RAF LOOP RESIDUES ABOVE ####################
diff = (lipids.center_of_mass()[2]-raf_loops_selection.center_of_mass(unwrap=True)[2])/10
if diff < 0:
diff = diff+(u.dimensions[2]/10)
z_pos.append(diff)
z_pos = np.array(z_pos)
RotMatNP = np.array(RotMat)
OS = np.array(OS)
OA = RotMatNP[:, 2, :]/(((RotMatNP[:, 2, 0]**2)+(RotMatNP[:, 2, 1]**2)+(RotMatNP[:, 2, 2]**2))**0.5)[:, None]
OWAS = np.arccos(RotMatNP[:, 2, 2])*180/math.pi
OC_temp = np.concatenate((OA, OS), axis=1)
t = ((OC_temp[:, 0]*OC_temp[:, 3])+(OC_temp[:, 1]*OC_temp[:, 4]) +
(OC_temp[:, 2]*OC_temp[:, 5]))/((OC_temp[:, 0]**2)+(OC_temp[:, 1]**2)+(OC_temp[:, 2]**2))
OC = OA*t[:, None]
ORS_tp = np.concatenate((OC, OS), axis=1)
ORS_norm = (((ORS_tp[:, 3]-ORS_tp[:, 0])**2)+((ORS_tp[:, 4]-ORS_tp[:, 1])**2)+((ORS_tp[:, 5]-ORS_tp[:, 2])**2))**0.5
ORS = (OS - OC)/ORS_norm[:, None]
OACRS = np.cross(OA, ORS)
OZCA = OA * OA[:, 2][:, None]
Z_unit = np.full([len(OZCA), 3], 1)
Z_adjust = np.array([0, 0, 1])
Z_unit = Z_unit*Z_adjust
Z_OZCA = Z_unit-OZCA
OZPACB = Z_OZCA/((Z_OZCA[:, 0]**2+Z_OZCA[:, 1]**2+Z_OZCA[:, 2]**2)**0.5)[:, None]
OROTNOTSIGNED = np.zeros([len(ORS)])
for i in range(len(ORS)):
OROTNOTSIGNED[i] = np.arccos(np.dot(OZPACB[i, :], ORS[i, :]) /
(np.sqrt(np.dot(OZPACB[i, :], OZPACB[i, :]))) *
(np.sqrt(np.dot(ORS[i, :], ORS[i, :]))))*180/math.pi
OZPACBCRS_cross = np.cross(OZPACB, ORS)
OZPACBCRS = OZPACBCRS_cross/((OZPACBCRS_cross[:, 0]**2+OZPACBCRS_cross[:, 1]**2+OZPACBCRS_cross[:, 2]**2)**0.5)[:, None]
OFORSIGN_temp = (OA - OZPACBCRS)**2
OFORSIGN = OFORSIGN_temp[:, 0]+OFORSIGN_temp[:, 1]+OFORSIGN_temp[:, 2]
OROT = OROTNOTSIGNED
for i in range(len(OROT)):
if OROT[i] < 0:
OROT[i] = -(OROT[i])
for i in range(len(OROT)):
if OFORSIGN[i] < 0.25:
OROT[i] = -(OROT[i])
###### Below introduces new shift to account for upper vs. lower leaflet #####
for i in range(len(OWAS)):
OWAS[i] = abs(-(OWAS[i])+180) # made this an absolute value so that the tilt remains positive
for i in range(len(OROT)):
if OROT[i] < 0:
OROT[i] = OROT[i]+180
elif OROT[i] > 0:
OROT[i] = OROT[i]-180
###### Above introduces new shift to account for upper vs. lower leaflet #####
###### Below might have to be updated to take into account the periodic nature of the rotation ######
if protein_type == 'RAS-ONLY':
states = np.zeros(len(OROT))
for j in range(len(OROT)):
diff0 = []
for i in range(len(RAS_ONLY_macrostate)):
#diff0.append([((RAS_ONLY_macrostate[i,0]-OWAS[j])**2+(RAS_ONLY_macrostate[i,1]-OROT[j])**2)**0.5, RAS_ONLY_macrostate[i,6]])
diff0.append([((RAS_ONLY_macrostate[i,1]-OWAS[j])**2+(RAS_ONLY_macrostate[i,0]-OROT[j])**2)**0.5, RAS_ONLY_macrostate[i,5]])
diff0.sort()
states[j] = diff0[0][1]
elif protein_type == 'RAS-RAF':
states = np.zeros(len(OROT))
for j in range(len(OROT)):
### below: adding in the requirements for the 'high-z' state ###
if (OROT[j] < -45 or OROT[j] > 140) and z_pos[j] > 4.8:
states[j] = 3
else:
### above: adding in the requirements for the 'high-z' state ###
diff0 = []
for i in range(len(RAS_RAF_macrostate)):
#diff0.append([((RAS_RAF_macrostate[i,0]-OWAS[j])**2+(RAS_RAF_macrostate[i,1]-OROT[j])**2)**0.5, RAS_RAF_macrostate[i,6]])
diff0.append([((RAS_RAF_macrostate[i,1]-OWAS[j])**2+(RAS_RAF_macrostate[i,0]-OROT[j])**2)**0.5, RAS_RAF_macrostate[i,4]])
diff0.sort()
states[j] = diff0[0][1]
###### Above might have to be updated to take into account the periodic nature of the rotation ######
###### Assume we want to remove this? Where is the code that reads this information? i.e. will there be knock-on effects? ######
###### If feedback code needs index 5 (two_states) from the output, deleting this four_states will shift that to index 4 #######
# four_states = np.zeros(len(OROT))
# for j in range(len(OROT)):
# diff0 = []
# for i in range(len(macrostate4)):
# diff0.append([((macrostate4[i,0]-OWAS[j])**2+(macrostate4[i,1]-OROT[j])**2)**0.5, macrostate4[i,6]])
# diff0.sort()
# four_states[j] = diff0[0][1]+1
###### below: old output details.... ######################################
###### Updated - RAS-only to NOT HAVE the Z-distance ######################
###### Updated - Added in the protein 'tag', i.e. RAS-ONLY or RAS-RAF #####
# OUTPUT = np.zeros([len(OROT), 6])
# for i in range(len(OROT)):
# OUTPUT[i] = timeframes[i], OWAS[i], OROT[i], z_pos[i], four_states[i], two_states[i]
###### above: old output details.... ######################################
###### below: NEW output details.... ######################################
if protein_type == 'RAS-ONLY':
OUTPUT = np.zeros([len(OROT), 6]).astype(object)
for i in range(len(OROT)):
OUTPUT[i] = str(protein_type), timeframes[i], OWAS[i], OROT[i], 'n/a', int(states[i])
elif protein_type == 'RAS-RAF':
OUTPUT = np.zeros([len(OROT), 6]).astype(object)
for i in range(len(OROT)):
OUTPUT[i] = str(protein_type), timeframes[i], OWAS[i], OROT[i], z_pos[i], int(states[i])
ALLOUT.append(OUTPUT)
return np.asarray(ALLOUT)
#np.savetxt(str(tpr)+"_tilt_rot_z_state.KRAS_"+str(k+1)+".txt", OUTPUT, fmt=['%i','%10.3f','%10.3f','%10.3f','%i','%i'], delimiter=' ')
| [
1,
835,
13383,
13383,
13383,
13383,
7346,
4136,
13,
29937,
732,
29873,
8144,
788,
14970,
327,
29906,
29899,
23579,
1161,
29899,
932,
2313,
433,
4193,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
13,
15945,
29908,
3617,
29915,
29879,
476,
29934,
3289,
5922,
9995,
13,
13,
5215,
20672,
21067,
4848,
408,
286,
1388,
13,
3166,
20672,
21067,
4848,
29889,
15916,
1053,
7595,
13,
3166,
20672,
21067,
4848,
29889,
1982,
29889,
3487,
314,
493,
1053,
1207,
29918,
15970,
280,
13,
5215,
2897,
13,
5215,
12655,
408,
7442,
13,
5215,
5844,
13,
13,
13,
7346,
4136,
2277,
13866,
4004,
4225,
304,
367,
443,
9342,
287,
835,
7346,
29937,
13,
5215,
286,
398,
2460,
29918,
3221,
13,
5215,
286,
398,
2460,
29918,
3417,
13,
3166,
286,
398,
2460,
29918,
3221,
29889,
13239,
1053,
405,
11500,
13,
13,
29937,
396,
28468,
756,
304,
367,
16601,
278,
937,
2655,
297,
278,
2471,
13,
3166,
12183,
1053,
679,
16363,
13,
14480,
17070,
353,
679,
16363,
22168,
978,
1649,
29897,
13,
13,
29937,
396,
25408,
277,
309,
675,
8229,
7428,
29902,
565,
372,
756,
451,
1063,
2309,
1434,
13,
29937,
341,
5005,
10403,
29918,
21289,
353,
286,
398,
2460,
29889,
2344,
29898,
5574,
29897,
13,
13,
29937,
910,
338,
4312,
577,
278,
405,
11500,
1736,
2400,
13,
29937,
29992,
4986,
3970,
2329,
445,
577,
591,
1016,
29915,
29873,
505,
1438,
373,
1053,
1207,
963,
408,
385,
2069,
13,
29885,
398,
2460,
29918,
3221,
29889,
2344,
580,
13,
13,
3972,
29968,
29934,
3289,
855,
1078,
353,
405,
11500,
29889,
3972,
29918,
690,
877,
28631,
1495,
13,
3972,
29968,
4717,
1799,
509,
5313,
1973,
353,
405,
11500,
29889,
3972,
29918,
690,
877,
4984,
1973,
1495,
13,
29937,
396,
29934,
3289,
29918,
1164,
16786,
29918,
25254,
3859,
353,
7442,
29889,
1359,
3945,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3972,
29968,
29934,
3289,
855,
1078,
29892,
376,
29934,
3289,
29899,
1164,
16786,
29889,
29885,
2357,
28631,
29889,
3945,
5783,
13,
29934,
3289,
29918,
1164,
16786,
29918,
25254,
3859,
353,
7442,
29889,
1359,
3945,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3972,
29968,
29934,
3289,
855,
1078,
29892,
376,
3417,
29899,
28631,
29889,
3945,
4968,
21032,
2433,
29937,
1495,
13,
13,
29937,
396,
29934,
3289,
29918,
4717,
29943,
29918,
25254,
3859,
353,
7442,
29889,
1359,
3945,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3972,
29968,
29934,
3289,
855,
1078,
29892,
376,
29934,
3289,
29899,
4717,
29943,
29889,
29885,
2357,
28631,
29889,
3945,
5783,
13,
29934,
3289,
29918,
4717,
29943,
29918,
25254,
3859,
353,
7442,
29889,
1359,
3945,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3972,
29968,
29934,
3289,
855,
1078,
29892,
376,
3417,
29899,
1929,
29899,
28631,
29889,
3945,
4968,
21032,
2433,
29937,
1495,
29871,
396,
3940,
958,
27380,
1353,
310,
4341,
577,
2380,
1735,
2400,
13,
13,
29937,
14402,
29901,
21107,
29892,
590,
1226,
1169,
304,
1243,
13,
29937,
390,
3289,
29918,
1164,
16786,
29918,
25254,
3859,
353,
7442,
29889,
1359,
3945,
877,
3417,
29899,
28631,
29889,
3945,
1495,
13,
29937,
390,
3289,
29918,
4717,
29943,
29918,
25254,
3859,
353,
7442,
29889,
1359,
3945,
877,
3417,
29899,
1929,
29899,
28631,
29889,
3945,
1495,
13,
13,
13,
7346,
4136,
2277,
2038,
4004,
4225,
304,
367,
443,
9342,
287,
835,
7346,
29937,
13,
13,
29937,
14402,
29901,
21107,
29892,
590,
1226,
1169,
304,
1243,
13,
29937,
14402,
29901,
323,
7187,
29892,
450,
3407,
3829,
756,
304,
5279,
367,
731,
408,
278,
525,
29934,
3289,
29899,
1164,
16786,
29899,
5679,
29899,
23905,
29889,
17170,
29915,
13,
29937,
14402,
29901,
323,
7187,
29892,
2224,
304,
278,
3407,
3829,
338,
29901,
286,
398,
2460,
29918,
13237,
29914,
4984,
1973,
29914,
13,
29895,
3417,
29918,
999,
29918,
348,
12193,
353,
286,
1388,
29889,
8110,
3901,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3972,
29968,
4717,
1799,
509,
5313,
1973,
29892,
376,
29934,
3289,
29899,
1164,
16786,
29899,
5679,
29899,
23905,
29889,
17170,
5783,
13,
29937,
413,
3417,
29918,
999,
29918,
348,
12193,
353,
286,
1388,
29889,
8110,
3901,
703,
29934,
3289,
29899,
1164,
16786,
29899,
5679,
29899,
23905,
29889,
17170,
1159,
13,
29937,
413,
3417,
29918,
999,
29918,
348,
12193,
353,
286,
1388,
29889,
8110,
3901,
877,
6344,
29918,
7810,
5041,
29918,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29946,
29953,
29946,
29896,
29918,
29934,
3289,
29918,
4717,
29943,
29906,
29918,
29946,
29896,
29896,
29889,
17170,
1495,
13,
13,
13,
13,
29937,
14402,
29901,
21107,
29892,
451,
773,
1438,
363,
921,
29946,
3279,
1144,
29936,
2012,
773,
26823,
29918,
5205,
29879,
2400,
304,
731,
954,
29918,
690,
13,
7346,
29937,
13866,
2898,
11561,
278,
1353,
310,
10995,
1041,
2629,
390,
3289,
29899,
6194,
322,
390,
3289,
29899,
4717,
29943,
835,
4136,
2277,
29937,
13,
29934,
3289,
29918,
6194,
29918,
1949,
29918,
690,
353,
29871,
29896,
29947,
29946,
13,
29934,
3289,
29918,
4717,
29943,
29918,
1949,
29918,
690,
353,
29871,
29941,
29906,
29900,
13,
7346,
29937,
319,
29205,
2898,
11561,
278,
1353,
310,
10995,
1041,
2629,
390,
3289,
29899,
6194,
322,
390,
3289,
29899,
4717,
29943,
835,
4136,
2277,
29937,
13,
13,
4136,
2277,
29937,
910,
508,
367,
6206,
13,
29937,
822,
679,
29918,
29895,
3417,
29898,
29879,
858,
29892,
413,
3417,
29918,
2962,
1125,
13,
29937,
268,
9995,
29954,
1691,
599,
28422,
363,
263,
476,
29934,
3289,
26823,
6257,
472,
525,
29895,
3417,
29918,
2962,
29915,
1213,
15945,
13,
29937,
268,
736,
13107,
29889,
271,
4835,
29961,
29895,
3417,
29918,
2962,
29901,
29895,
3417,
29918,
2962,
29974,
29946,
29906,
29947,
29962,
13,
4136,
2277,
29937,
910,
508,
367,
6206,
13,
13,
13,
1753,
679,
29918,
10199,
4841,
29898,
29884,
1125,
13,
1678,
9995,
7648,
11057,
278,
1051,
310,
24611,
2629,
278,
1788,
29889,
9333,
4225,
304,
367,
2000,
921,
29896,
931,
15945,
29908,
13,
1678,
2377,
29879,
353,
318,
29889,
10199,
1860,
13,
1678,
2377,
29879,
353,
2377,
29879,
29889,
10199,
4841,
13,
1678,
22641,
29918,
10199,
4841,
353,
5159,
13,
1678,
22641,
1929,
29918,
10199,
4841,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
344,
3174,
22164,
13,
1678,
396,
268,
1596,
29898,
344,
3174,
29961,
29875,
2314,
13,
4706,
565,
2377,
29879,
29961,
29875,
3816,
29899,
29941,
17531,
1275,
525,
29934,
3289,
2396,
13,
9651,
22641,
29918,
10199,
4841,
29889,
4397,
29898,
344,
3174,
29961,
29875,
2314,
13,
4706,
565,
2377,
29879,
29961,
29875,
3816,
29899,
29941,
17531,
1275,
525,
4717,
29943,
2396,
13,
9651,
22641,
1929,
29918,
10199,
4841,
29889,
4397,
29898,
344,
3174,
29961,
29875,
2314,
13,
1678,
736,
22641,
29918,
10199,
4841,
29892,
22641,
1929,
29918,
10199,
4841,
13,
13,
1753,
679,
29918,
14676,
262,
29918,
3888,
29898,
29884,
29892,
4039,
1125,
13,
1678,
9995,
15922,
267,
278,
24611,
15659,
297,
679,
29918,
10199,
4841,
304,
1207,
263,
1051,
310,
599,
3279,
1144,
297,
278,
6757,
7790,
13,
1678,
10604,
29879,
263,
1051,
310,
278,
937,
10995,
434,
1353,
310,
278,
26823,
29892,
322,
3692,
372,
338,
525,
29934,
3289,
29899,
1164,
16786,
742,
470,
525,
29934,
3289,
29899,
4717,
29943,
4286,
29905,
13,
1678,
450,
525,
4039,
29915,
1881,
17645,
825,
338,
1304,
304,
12439,
278,
937,
10995,
434,
310,
278,
26823,
29889,
474,
29889,
29872,
29889,
525,
690,
978,
319,
4741,
29896,
322,
1024,
29449,
4286,
29905,
13,
1678,
9333,
4225,
304,
367,
2000,
921,
29896,
931,
15945,
29908,
13,
1678,
22641,
29918,
10199,
4841,
29892,
22641,
1929,
29918,
10199,
4841,
353,
679,
29918,
10199,
4841,
29898,
29884,
29897,
13,
1678,
565,
7431,
29898,
3417,
29918,
10199,
4841,
29897,
1405,
29871,
29900,
29901,
13,
4706,
390,
3289,
353,
318,
29889,
2622,
29918,
271,
4835,
877,
10199,
333,
525,
29974,
3417,
29918,
10199,
4841,
29961,
29900,
10062,
29915,
322,
525,
29974,
710,
29898,
4039,
876,
13,
1678,
1683,
29901,
13,
4706,
390,
3289,
353,
5159,
13,
1678,
565,
7431,
29898,
3417,
1929,
29918,
10199,
4841,
29897,
1405,
29871,
29900,
29901,
13,
4706,
390,
5098,
353,
318,
29889,
2622,
29918,
271,
4835,
877,
10199,
333,
525,
29974,
3417,
1929,
29918,
10199,
4841,
29961,
29900,
10062,
29915,
322,
525,
29974,
710,
29898,
4039,
876,
13,
1678,
1683,
29901,
13,
4706,
390,
5098,
353,
5159,
13,
1678,
26823,
29918,
3888,
353,
5159,
29937,
9302,
29889,
6310,
4197,
2435,
29898,
29934,
3289,
7240,
2435,
29898,
4717,
29943,
511,
29906,
2314,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
29934,
3289,
22164,
13,
4706,
26823,
29918,
3888,
29889,
4397,
3552,
29934,
3289,
29961,
29875,
1822,
690,
333,
5501,
29934,
3289,
29899,
1164,
16786,
8785,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
4717,
29943,
22164,
13,
4706,
26823,
29918,
3888,
29889,
4397,
3552,
4717,
29943,
29961,
29875,
1822,
690,
333,
5501,
29934,
3289,
29899,
4717,
29943,
8785,
13,
13,
1678,
835,
4136,
29937,
2656,
26823,
5235,
13,
1678,
26823,
29918,
3888,
353,
12705,
29898,
14676,
262,
29918,
3888,
29897,
13,
1678,
835,
4136,
29937,
2656,
26823,
5235,
13,
1678,
736,
26823,
29918,
3888,
13,
13,
1753,
679,
29918,
999,
29918,
29895,
3417,
7295,
13,
1678,
9995,
29954,
1691,
278,
3407,
476,
29934,
3289,
2281,
29889,
9333,
2000,
921,
29896,
931,
746,
770,
338,
7500,
15945,
29908,
13,
1678,
1369,
29918,
974,
29918,
29887,
29918,
999,
353,
413,
3417,
29918,
999,
29918,
348,
12193,
29889,
690,
333,
1041,
29961,
29900,
1822,
690,
333,
13,
1678,
2143,
29918,
21731,
353,
525,
690,
333,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
29918,
999,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29918,
999,
29974,
29906,
29946,
7240,
29915,
525,
17501,
13,
462,
632,
851,
29898,
2962,
29918,
974,
29918,
29887,
29918,
999,
29974,
29941,
29947,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29918,
999,
29974,
29945,
29946,
7240,
29915,
525,
17501,
13,
462,
632,
851,
29898,
2962,
29918,
974,
29918,
29887,
29918,
999,
29974,
29953,
29955,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29918,
999,
29974,
29896,
29953,
29946,
7240,
29915,
525,
17501,
13,
462,
632,
525,
392,
313,
978,
12766,
470,
1024,
29449,
16029,
13,
13,
1678,
364,
29906,
29918,
29906,
29953,
29878,
29946,
29900,
29918,
29945,
29953,
29878,
29953,
29929,
29918,
29896,
29953,
29953,
29918,
999,
353,
413,
3417,
29918,
999,
29918,
348,
12193,
29889,
2622,
29918,
271,
4835,
29898,
710,
29898,
999,
29918,
21731,
876,
13,
1678,
736,
413,
3417,
29918,
999,
29918,
348,
12193,
29889,
2622,
29918,
271,
4835,
29898,
710,
29898,
999,
29918,
21731,
8106,
1066,
2187,
448,
413,
3417,
29918,
999,
29918,
348,
12193,
29889,
2622,
29918,
271,
4835,
29898,
710,
29898,
999,
29918,
21731,
8106,
5064,
29918,
974,
29918,
25379,
580,
13,
13,
13,
29937,
16012,
2069,
284,
2143,
16608,
313,
6194,
817,
304,
437,
445,
2748,
29897,
13,
999,
29900,
353,
679,
29918,
999,
29918,
29895,
3417,
580,
13,
13,
1753,
679,
29968,
29934,
3289,
28631,
29898,
29884,
29892,
29895,
3417,
29918,
513,
1575,
1125,
13,
1678,
9995,
29954,
1691,
5922,
363,
599,
476,
29934,
3289,
3279,
1144,
297,
2224,
1213,
15945,
13,
13,
29937,
268,
620,
29918,
10889,
353,
29871,
29947,
13,
13,
29937,
268,
599,
29918,
16808,
29883,
457,
353,
318,
29889,
2622,
29918,
271,
4835,
703,
690,
978,
12729,
29979,
1159,
13,
13,
29937,
268,
413,
3417,
29918,
513,
1575,
353,
5159,
13,
29937,
268,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
497,
29918,
16808,
29883,
457,
511,
29871,
29906,
29953,
1125,
13,
29937,
308,
413,
3417,
29918,
513,
1575,
29889,
4397,
29898,
497,
29918,
16808,
29883,
457,
29961,
29875,
1822,
2248,
29897,
13,
13,
7346,
2277,
13866,
338,
4586,
714,
310,
278,
740,
577,
372,
338,
871,
2309,
2748,
835,
4136,
2277,
13,
29937,
268,
413,
3417,
29918,
513,
1575,
353,
679,
29918,
14676,
262,
29918,
3888,
29898,
29884,
5501,
690,
978,
319,
4741,
29896,
322,
1024,
29449,
1495,
13,
7346,
2277,
319,
29205,
338,
4586,
714,
310,
278,
740,
577,
372,
338,
871,
2309,
2748,
835,
4136,
2277,
13,
13,
1678,
396,
21107,
29892,
363,
921,
29946,
4251,
29901,
13,
1678,
396,
462,
15974,
14676,
262,
29918,
29916,
29946,
29901,
313,
14676,
262,
29918,
1853,
29892,
954,
29918,
690,
2915,
29962,
13,
1678,
26823,
29918,
5205,
29879,
353,
518,
10998,
3417,
29946,
29874,
2396,
1678,
6702,
29934,
3289,
29899,
1164,
16786,
742,
29871,
29896,
29947,
29945,
511,
13,
462,
4706,
525,
3417,
29946,
279,
2142,
2396,
6702,
29934,
3289,
29899,
4717,
29943,
742,
259,
29941,
29906,
29896,
511,
13,
462,
4706,
525,
3417,
2396,
418,
6702,
29934,
3289,
29899,
1164,
16786,
742,
29871,
29896,
29947,
29946,
511,
13,
462,
4706,
525,
3417,
1929,
2396,
259,
6702,
29934,
3289,
29899,
4717,
29943,
742,
259,
29941,
29906,
29900,
2915,
29962,
13,
13,
1678,
15149,
12015,
353,
5159,
13,
1678,
363,
413,
297,
3464,
29898,
2435,
29898,
29895,
3417,
29918,
513,
1575,
22164,
13,
4706,
1369,
29918,
974,
29918,
29887,
353,
413,
3417,
29918,
513,
1575,
29961,
29895,
3816,
29900,
29962,
13,
4706,
26823,
29918,
29916,
29946,
353,
851,
29898,
29895,
3417,
29918,
513,
1575,
29961,
29895,
3816,
29896,
2314,
13,
4706,
1018,
29901,
13,
9651,
26823,
29918,
1853,
353,
518,
667,
29961,
14676,
262,
29918,
29916,
29946,
29962,
363,
2944,
297,
26823,
29918,
5205,
29879,
3816,
29900,
3816,
29900,
29962,
29871,
396,
525,
29934,
3289,
29899,
1164,
16786,
29915,
6323,
525,
29934,
3289,
29899,
4717,
29943,
29915,
13,
9651,
954,
29918,
690,
353,
518,
667,
29961,
14676,
262,
29918,
29916,
29946,
29962,
363,
2944,
297,
26823,
29918,
5205,
29879,
3816,
29900,
3816,
29896,
29962,
13,
4706,
5174,
29901,
13,
9651,
25401,
17070,
29889,
2704,
877,
5596,
476,
29934,
294,
22006,
1546,
10585,
1495,
13,
9651,
12020,
8960,
877,
2392,
29901,
9815,
476,
29934,
294,
1024,
1495,
13,
13,
29937,
14402,
29901,
21107,
29892,
15270,
445,
3440,
4004,
411,
278,
2038,
29892,
304,
4386,
921,
29946,
26823,
4072,
13,
29937,
448,
2683,
2683,
22158,
13,
29937,
268,
15149,
12015,
353,
5159,
13,
29937,
268,
363,
413,
297,
3464,
29898,
2435,
29898,
29895,
3417,
29918,
513,
1575,
22164,
13,
29937,
308,
1369,
29918,
974,
29918,
29887,
353,
413,
3417,
29918,
513,
1575,
29961,
29895,
3816,
29900,
29962,
13,
29937,
308,
26823,
29918,
1853,
353,
851,
29898,
29895,
3417,
29918,
513,
1575,
29961,
29895,
3816,
29896,
2314,
13,
29937,
835,
4136,
2277,
29937,
20700,
27998,
3725,
9838,
7495,
360,
2544,
1001,
29924,
8895,
12317,
2965,
29950,
390,
2890,
1367,
12996,
319,
1525,
349,
8322,
8079,
6093,
13756,
4330,
1177,
15345,
448,
14693,
29923,
2287,
29928,
15842,
349,
5371,
5195,
6720,
8932,
835,
7346,
2277,
29937,
13,
29937,
835,
4136,
2277,
29937,
349,
2891,
3919,
29902,
9818,
29979,
390,
3352,
29949,
22659,
319,
525,
29950,
17011,
29899,
16524,
29928,
29915,
28019,
13635,
8079,
390,
2890,
1367,
12996,
349,
1001,
13756,
4330,
1177,
15345,
313,
25039,
2544,
4448,
390,
3289,
29899,
1164,
16786,
6323,
390,
3289,
29899,
4717,
29943,
29897,
835,
4136,
13,
29937,
835,
4136,
2277,
29937,
379,
3289,
20700,
1430,
390,
3352,
12413,
22659,
319,
525,
29950,
17011,
29899,
16524,
29928,
29915,
28019,
13635,
8079,
390,
2890,
1367,
12996,
349,
1001,
13756,
4330,
1177,
15345,
313,
25039,
2544,
4448,
390,
3289,
29899,
1164,
16786,
6323,
390,
3289,
29899,
4717,
29943,
29897,
835,
4136,
29937,
13,
29937,
396,
308,
565,
7431,
29898,
29895,
3417,
29918,
513,
1575,
29897,
1275,
29871,
29896,
29901,
13,
29937,
396,
632,
12920,
2129,
29900,
29918,
14388,
353,
318,
29889,
2622,
29918,
271,
4835,
877,
690,
333,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
7240,
2396,
18717,
710,
29898,
2435,
29898,
29884,
29889,
690,
333,
1041,
876,
23097,
322,
1024,
29449,
1495,
835,
4136,
379,
3289,
7495,
20700,
383,
6415,
3352,
15842,
350,
11375,
29933,
12413,
319,
4986,
4345,
15842,
317,
4162,
29907,
6545,
2965,
13756,
4330,
1177,
13,
29937,
396,
308,
25342,
7431,
29898,
29895,
3417,
29918,
513,
1575,
29897,
1405,
29871,
29896,
29901,
13,
29937,
396,
632,
565,
413,
1275,
7431,
29898,
29895,
3417,
29918,
513,
1575,
6817,
29896,
29901,
13,
29937,
396,
462,
12920,
2129,
29900,
29918,
14388,
353,
318,
29889,
2622,
29918,
271,
4835,
877,
690,
333,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
7240,
2396,
18717,
710,
29898,
2435,
29898,
29884,
29889,
690,
333,
1041,
876,
23097,
322,
1024,
29449,
1495,
13,
29937,
396,
632,
1683,
29901,
13,
29937,
396,
462,
12920,
2129,
29900,
29918,
14388,
353,
318,
29889,
2622,
29918,
271,
4835,
877,
690,
333,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
7240,
2396,
18717,
710,
29898,
29895,
3417,
29918,
513,
1575,
29961,
29895,
29974,
29896,
3816,
29900,
2314,
23097,
322,
1024,
29449,
1495,
13,
29937,
835,
4136,
2277,
29937,
319,
8456,
12064,
3725,
9838,
7495,
360,
2544,
1001,
29924,
8895,
12317,
2965,
29950,
390,
2890,
1367,
12996,
319,
1525,
349,
8322,
8079,
6093,
13756,
4330,
1177,
15345,
448,
14693,
29923,
2287,
29928,
15842,
349,
5371,
5195,
6720,
8932,
835,
7346,
2277,
29937,
13,
29937,
13,
29937,
835,
4136,
2277,
29937,
13866,
2898,
11561,
278,
1353,
310,
10995,
1041,
29914,
915,
7925,
297,
278,
390,
3289,
29899,
1164,
16786,
322,
390,
3289,
29899,
4717,
29943,
23876,
835,
13383,
4136,
2277,
13,
29937,
308,
565,
26823,
29918,
1853,
1275,
525,
29934,
3289,
29899,
1164,
16786,
2396,
13,
29937,
632,
954,
29918,
690,
353,
390,
3289,
29918,
6194,
29918,
1949,
29918,
690,
13,
29937,
308,
25342,
26823,
29918,
1853,
1275,
525,
29934,
3289,
29899,
4717,
29943,
2396,
13,
29937,
632,
954,
29918,
690,
353,
390,
3289,
29918,
4717,
29943,
29918,
1949,
29918,
690,
13,
29937,
835,
4136,
2277,
29937,
319,
29205,
2898,
11561,
278,
1353,
310,
10995,
1041,
29914,
915,
7925,
297,
278,
390,
3289,
29899,
1164,
16786,
322,
390,
3289,
29899,
4717,
29943,
23876,
835,
13383,
4136,
2277,
13,
29937,
448,
2683,
2683,
22158,
13,
13,
29937,
14402,
29901,
323,
7187,
29892,
306,
3939,
278,
9262,
2400,
29892,
607,
508,
367,
1304,
363,
278,
1207,
29918,
15970,
280,
856,
13,
29937,
4706,
12920,
2129,
29900,
29918,
14388,
353,
318,
29889,
2622,
29918,
271,
4835,
877,
690,
333,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
1949,
29918,
690,
7240,
29915,
322,
313,
978,
12766,
470,
1024,
29449,
29897,
1495,
13,
4706,
12920,
2129,
29900,
29918,
14388,
353,
318,
29889,
2622,
29918,
271,
4835,
877,
690,
333,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
1949,
29918,
690,
876,
13,
4706,
12920,
2129,
29900,
29918,
14388,
29889,
2543,
404,
29918,
29890,
13788,
580,
13,
13,
13,
13,
13,
4706,
364,
29906,
29918,
29906,
29953,
29878,
29946,
29900,
29918,
29945,
29953,
29878,
29953,
29929,
29918,
29896,
29953,
29953,
353,
318,
29889,
2622,
29918,
271,
4835,
877,
690,
333,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29906,
29946,
7240,
29915,
525,
17501,
13,
462,
462,
462,
29871,
851,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29941,
29947,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29945,
29946,
7240,
29915,
525,
17501,
13,
462,
462,
462,
29871,
851,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29953,
29955,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29896,
29953,
29946,
20843,
13,
462,
462,
462,
29871,
525,
322,
313,
978,
12766,
470,
1024,
29449,
29897,
1495,
13,
13,
4706,
318,
29918,
21731,
353,
320,
13,
9651,
525,
690,
333,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29906,
29946,
7240,
29915,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29941,
29947,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29945,
29946,
7240,
29915,
525,
17501,
13,
9651,
851,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29953,
29955,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29896,
29953,
29946,
7240,
29915,
322,
313,
978,
12766,
470,
1024,
29449,
16029,
13,
4706,
10426,
29900,
353,
318,
29889,
2622,
29918,
271,
4835,
29898,
710,
29898,
29884,
29918,
21731,
8106,
1066,
2187,
448,
318,
29889,
2622,
29918,
271,
4835,
29898,
710,
29898,
29884,
29918,
21731,
8106,
5064,
29918,
974,
29918,
25379,
580,
13,
13,
4706,
396,
14402,
29901,
21107,
29892,
1554,
2743,
411,
2143,
29900,
515,
679,
29918,
29895,
3417,
29918,
999,
580,
13,
4706,
396,
925,
3907,
2143,
29900,
353,
10426,
29900,
304,
1243,
363,
1286,
13,
4706,
396,
2143,
29900,
353,
10426,
29900,
13,
4706,
396,
323,
7187,
6206,
445,
13,
13,
4706,
390,
29892,
390,
4345,
29928,
29918,
29926,
2960,
353,
7595,
29889,
5450,
362,
29918,
5344,
29898,
16769,
29900,
29892,
2143,
29900,
29897,
13,
13,
4706,
835,
4136,
29937,
14402,
29901,
323,
7187,
29892,
2087,
5143,
287,
363,
22704,
619,
5935,
2983,
835,
4136,
29937,
13,
4706,
396,
308,
17441,
4841,
353,
318,
29889,
2622,
29918,
271,
4835,
877,
690,
978,
349,
4590,
29990,
349,
4590,
29907,
349,
3301,
29907,
21521,
4162,
22471,
4162,
360,
7024,
29924,
349,
3301,
29903,
349,
3301,
29953,
5868,
5607,
1495,
13,
4706,
17441,
4841,
353,
318,
29889,
2622,
29918,
271,
4835,
877,
690,
978,
349,
4590,
29907,
349,
3301,
29907,
21521,
4162,
22471,
4162,
5886,
29924,
349,
3301,
29903,
317,
8787,
5868,
29931,
29896,
1495,
13,
13,
13,
4706,
1302,
4339,
353,
2143,
29900,
13,
4706,
9664,
9782,
353,
5159,
13,
4706,
6570,
353,
5159,
13,
4706,
364,
29896,
29945,
29906,
29918,
29896,
29953,
29945,
353,
12920,
2129,
29900,
29918,
14388,
29889,
2622,
29918,
271,
4835,
877,
690,
333,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29896,
29945,
29900,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29896,
29953,
29941,
7240,
29915,
322,
313,
978,
12766,
470,
1024,
29449,
29897,
1495,
13,
4706,
364,
29953,
29945,
29918,
29955,
29946,
353,
12920,
2129,
29900,
29918,
14388,
29889,
2622,
29918,
271,
4835,
877,
690,
333,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29953,
29941,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29955,
29906,
7240,
29915,
322,
313,
978,
12766,
470,
1024,
29449,
29897,
1495,
13,
4706,
931,
19935,
353,
5159,
13,
13,
4706,
396,
14402,
29901,
21107,
29892,
363,
22704,
817,
289,
13788,
304,
1065,
1207,
29918,
15970,
280,
580,
13,
4706,
396,
12920,
2129,
29900,
29918,
14388,
29889,
2543,
404,
29918,
29890,
13788,
580,
13,
13,
4706,
396,
14402,
29901,
21107,
29892,
2507,
1283,
363,
1286,
304,
1243,
8724,
445,
1298,
13,
4706,
14550,
18610,
363,
22704,
29892,
817,
304,
6963,
393,
1250,
373,
2748,
599,
1683,
6057,
18610,
13,
4706,
14550,
13,
4706,
396,
732,
13711,
322,
529,
5813,
15513,
445,
471,
19952,
714,
448,
3113,
1423,
29889,
13,
4706,
396,
5675,
29918,
15970,
280,
29898,
12748,
2129,
29900,
29918,
14388,
29897,
13,
13,
4706,
432,
29892,
364,
1516,
29881,
29918,
29926,
2960,
353,
286,
1388,
29889,
15916,
29889,
2520,
29889,
5450,
362,
29918,
5344,
3552,
29878,
29906,
29918,
29906,
29953,
29878,
29946,
29900,
29918,
29945,
29953,
29878,
29953,
29929,
29918,
29896,
29953,
29953,
29889,
1066,
2187,
29899,
29878,
29906,
29918,
29906,
29953,
29878,
29946,
29900,
29918,
29945,
29953,
29878,
29953,
29929,
29918,
29896,
29953,
29953,
29889,
5064,
29918,
974,
29918,
25379,
25739,
1302,
4339,
29897,
13,
4706,
9664,
9782,
29889,
4397,
29898,
29926,
29897,
13,
4706,
6570,
29889,
4397,
29898,
29878,
29953,
29945,
29918,
29955,
29946,
29889,
5064,
29918,
974,
29918,
25379,
580,
29899,
29878,
29896,
29945,
29906,
29918,
29896,
29953,
29945,
29889,
5064,
29918,
974,
29918,
25379,
3101,
13,
4706,
931,
19935,
29889,
4397,
29898,
29884,
29889,
3018,
622,
706,
29889,
2230,
29897,
13,
13,
4706,
565,
26823,
29918,
1853,
1275,
525,
29934,
3289,
29899,
4717,
29943,
2396,
13,
9651,
503,
29918,
1066,
353,
5159,
13,
7346,
4136,
2277,
29937,
14693,
3352,
7495,
8707,
3738,
29934,
29924,
6093,
5097,
2725,
8079,
6093,
390,
5098,
11247,
4590,
390,
2890,
1367,
12996,
20700,
27998,
835,
13383,
29937,
13,
7346,
4136,
2277,
29937,
14402,
29901,
323,
7187,
29892,
503,
845,
24377,
338,
731,
304,
448,
29896,
313,
2611,
1479,
310,
448,
29906,
511,
408,
727,
526,
319,
4741,
26091,
393,
526,
5004,
10995,
1041,
297,
22704,
13,
9651,
396,
29920,
845,
24377,
10457,
29896,
13,
9651,
565,
26823,
29918,
29916,
29946,
1275,
525,
3417,
1929,
2396,
13,
18884,
503,
845,
24377,
353,
448,
29896,
13,
9651,
25342,
26823,
29918,
29916,
29946,
1275,
525,
3417,
29946,
279,
2142,
2396,
13,
18884,
503,
845,
24377,
353,
29871,
29900,
13,
9651,
1683,
29901,
13,
18884,
503,
845,
24377,
353,
29871,
29900,
13,
18884,
25401,
17070,
29889,
2704,
877,
9692,
443,
23765,
26823,
29918,
29916,
29946,
1134,
1495,
13,
9651,
1153,
29888,
29918,
417,
3554,
29918,
21731,
353,
318,
29889,
2622,
29918,
271,
4835,
877,
690,
333,
525,
29974,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29920,
845,
24377,
29974,
29906,
29929,
29896,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29920,
845,
24377,
29974,
29906,
29929,
29946,
7240,
29915,
525,
17501,
13,
462,
462,
462,
851,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29920,
845,
24377,
29974,
29906,
29955,
29947,
7240,
2396,
18717,
710,
29898,
2962,
29918,
974,
29918,
29887,
29974,
29920,
845,
24377,
29974,
29906,
29947,
29896,
7240,
29915,
525,
17501,
13,
462,
462,
462,
525,
322,
313,
978,
12766,
470,
1024,
29449,
29897,
1495,
13,
7346,
4136,
2277,
29937,
14693,
3352,
7495,
8707,
3738,
29934,
29924,
6093,
5097,
2725,
8079,
6093,
390,
5098,
11247,
4590,
390,
2890,
1367,
12996,
319,
8456,
12064,
835,
13383,
29937,
13,
9651,
2923,
353,
313,
3466,
4841,
29889,
5064,
29918,
974,
29918,
25379,
580,
29961,
29906,
29962,
29899,
1929,
29918,
417,
3554,
29918,
21731,
29889,
5064,
29918,
974,
29918,
25379,
29898,
26238,
29922,
5574,
9601,
29906,
2314,
29914,
29896,
29900,
13,
9651,
565,
2923,
529,
29871,
29900,
29901,
13,
18884,
2923,
353,
2923,
17108,
29884,
29889,
6229,
5580,
29961,
29906,
16261,
29896,
29900,
29897,
13,
9651,
503,
29918,
1066,
29889,
4397,
29898,
12765,
29897,
13,
9651,
503,
29918,
1066,
353,
7442,
29889,
2378,
29898,
29920,
29918,
1066,
29897,
13,
13,
4706,
9664,
9782,
25500,
353,
7442,
29889,
2378,
29898,
21281,
9782,
29897,
13,
13,
4706,
6570,
353,
7442,
29889,
2378,
29898,
3267,
29897,
13,
4706,
438,
29909,
353,
9664,
9782,
25500,
7503,
29892,
29871,
29906,
29892,
584,
16261,
3552,
29898,
21281,
9782,
25500,
7503,
29892,
29871,
29906,
29892,
29871,
29900,
29962,
1068,
29906,
7240,
29898,
21281,
9782,
25500,
7503,
29892,
29871,
29906,
29892,
29871,
29896,
29962,
1068,
29906,
7240,
29898,
21281,
9782,
25500,
7503,
29892,
29871,
29906,
29892,
29871,
29906,
29962,
1068,
29906,
876,
1068,
29900,
29889,
29945,
29897,
7503,
29892,
6213,
29962,
13,
4706,
438,
29956,
3289,
353,
7442,
29889,
279,
617,
359,
29898,
21281,
9782,
25500,
7503,
29892,
29871,
29906,
29892,
29871,
29906,
2314,
29930,
29896,
29947,
29900,
29914,
755,
29889,
1631,
13,
4706,
438,
29907,
29918,
7382,
353,
7442,
29889,
535,
29883,
2579,
403,
3552,
29949,
29909,
29892,
6570,
511,
9685,
29922,
29896,
29897,
13,
4706,
260,
353,
5135,
20166,
29918,
7382,
7503,
29892,
29871,
29900,
14178,
20166,
29918,
7382,
7503,
29892,
29871,
29941,
2314,
17108,
20166,
29918,
7382,
7503,
29892,
29871,
29896,
14178,
20166,
29918,
7382,
7503,
29892,
29871,
29946,
2314,
718,
13,
632,
313,
20166,
29918,
7382,
7503,
29892,
29871,
29906,
14178,
20166,
29918,
7382,
7503,
29892,
29871,
29945,
12622,
29914,
3552,
20166,
29918,
7382,
7503,
29892,
29871,
29900,
29962,
1068,
29906,
7240,
29898,
20166,
29918,
7382,
7503,
29892,
29871,
29896,
29962,
1068,
29906,
7240,
29898,
20166,
29918,
7382,
7503,
29892,
29871,
29906,
29962,
1068,
29906,
876,
13,
4706,
438,
29907,
353,
438,
29909,
29930,
29873,
7503,
29892,
6213,
29962,
13,
4706,
6323,
29903,
29918,
9392,
353,
7442,
29889,
535,
29883,
2579,
403,
3552,
20166,
29892,
6570,
511,
9685,
29922,
29896,
29897,
13,
4706,
6323,
29903,
29918,
12324,
353,
313,
3552,
24125,
29918,
9392,
7503,
29892,
29871,
29941,
29962,
29899,
24125,
29918,
9392,
7503,
29892,
29871,
29900,
2314,
1068,
29906,
7240,
3552,
24125,
29918,
9392,
7503,
29892,
29871,
29946,
29962,
29899,
24125,
29918,
9392,
7503,
29892,
29871,
29896,
2314,
1068,
29906,
7240,
3552,
24125,
29918,
9392,
7503,
29892,
29871,
29945,
29962,
29899,
24125,
29918,
9392,
7503,
29892,
29871,
29906,
2314,
1068,
29906,
876,
1068,
29900,
29889,
29945,
13,
4706,
6323,
29903,
353,
313,
3267,
448,
438,
29907,
6802,
24125,
29918,
12324,
7503,
29892,
6213,
29962,
13,
4706,
438,
2477,
12445,
353,
7442,
29889,
19128,
29898,
29949,
29909,
29892,
6323,
29903,
29897,
13,
4706,
438,
29999,
5454,
353,
438,
29909,
334,
438,
29909,
7503,
29892,
29871,
29906,
3816,
29901,
29892,
6213,
29962,
13,
4706,
796,
29918,
5441,
353,
7442,
29889,
8159,
4197,
2435,
29898,
29949,
29999,
5454,
511,
29871,
29941,
1402,
29871,
29896,
29897,
13,
4706,
796,
29918,
328,
5143,
353,
7442,
29889,
2378,
4197,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
2314,
13,
4706,
796,
29918,
5441,
353,
796,
29918,
5441,
29930,
29999,
29918,
328,
5143,
13,
4706,
796,
29918,
29949,
29999,
5454,
353,
796,
29918,
5441,
29899,
29949,
29999,
5454,
13,
4706,
438,
29999,
29925,
2477,
29933,
353,
796,
29918,
29949,
29999,
5454,
29914,
3552,
29999,
29918,
29949,
29999,
5454,
7503,
29892,
29871,
29900,
29962,
1068,
29906,
29974,
29999,
29918,
29949,
29999,
5454,
7503,
29892,
29871,
29896,
29962,
1068,
29906,
29974,
29999,
29918,
29949,
29999,
5454,
7503,
29892,
29871,
29906,
29962,
1068,
29906,
29897,
1068,
29900,
29889,
29945,
29897,
7503,
29892,
6213,
29962,
13,
4706,
438,
1672,
29911,
12256,
5425,
20728,
3352,
353,
7442,
29889,
3298,
359,
4197,
2435,
29898,
24125,
29897,
2314,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
24125,
22164,
13,
9651,
438,
1672,
29911,
12256,
5425,
20728,
3352,
29961,
29875,
29962,
353,
7442,
29889,
279,
617,
359,
29898,
9302,
29889,
6333,
29898,
29949,
29999,
29925,
2477,
29933,
29961,
29875,
29892,
584,
1402,
6323,
29903,
29961,
29875,
29892,
584,
2314,
847,
13,
462,
462,
308,
313,
9302,
29889,
3676,
29898,
9302,
29889,
6333,
29898,
29949,
29999,
29925,
2477,
29933,
29961,
29875,
29892,
584,
1402,
438,
29999,
29925,
2477,
29933,
29961,
29875,
29892,
584,
29962,
4961,
334,
13,
462,
462,
308,
313,
9302,
29889,
3676,
29898,
9302,
29889,
6333,
29898,
24125,
29961,
29875,
29892,
584,
1402,
6323,
29903,
29961,
29875,
29892,
584,
12622,
876,
29930,
29896,
29947,
29900,
29914,
755,
29889,
1631,
13,
13,
4706,
438,
29999,
29925,
2477,
5371,
12445,
29918,
19128,
353,
7442,
29889,
19128,
29898,
29949,
29999,
29925,
2477,
29933,
29892,
6323,
29903,
29897,
13,
4706,
438,
29999,
29925,
2477,
5371,
12445,
353,
438,
29999,
29925,
2477,
5371,
12445,
29918,
19128,
29914,
3552,
29949,
29999,
29925,
2477,
5371,
12445,
29918,
19128,
7503,
29892,
29871,
29900,
29962,
1068,
29906,
29974,
29949,
29999,
29925,
2477,
5371,
12445,
29918,
19128,
7503,
29892,
29871,
29896,
29962,
1068,
29906,
29974,
29949,
29999,
29925,
2477,
5371,
12445,
29918,
19128,
7503,
29892,
29871,
29906,
29962,
1068,
29906,
29897,
1068,
29900,
29889,
29945,
29897,
7503,
29892,
6213,
29962,
13,
4706,
8079,
1955,
5425,
20728,
29918,
7382,
353,
313,
29949,
29909,
448,
438,
29999,
29925,
2477,
5371,
12445,
29897,
1068,
29906,
13,
4706,
8079,
1955,
5425,
20728,
353,
8079,
1955,
5425,
20728,
29918,
7382,
7503,
29892,
29871,
29900,
10062,
9800,
1955,
5425,
20728,
29918,
7382,
7503,
29892,
29871,
29896,
10062,
9800,
1955,
5425,
20728,
29918,
7382,
7503,
29892,
29871,
29906,
29962,
13,
4706,
438,
1672,
29911,
353,
438,
1672,
29911,
12256,
5425,
20728,
3352,
13,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
29949,
1672,
29911,
22164,
13,
9651,
565,
438,
1672,
29911,
29961,
29875,
29962,
529,
29871,
29900,
29901,
13,
18884,
438,
1672,
29911,
29961,
29875,
29962,
353,
19691,
29949,
1672,
29911,
29961,
29875,
2314,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
29949,
1672,
29911,
22164,
13,
9651,
565,
8079,
1955,
5425,
20728,
29961,
29875,
29962,
529,
29871,
29900,
29889,
29906,
29945,
29901,
13,
18884,
438,
1672,
29911,
29961,
29875,
29962,
353,
19691,
29949,
1672,
29911,
29961,
29875,
2314,
13,
13,
4136,
2277,
13866,
4547,
778,
716,
9500,
304,
3633,
363,
7568,
7186,
29889,
5224,
20447,
1026,
16101,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
9806,
3289,
22164,
13,
9651,
438,
29956,
3289,
29961,
29875,
29962,
353,
6425,
6278,
29898,
9806,
3289,
29961,
29875,
2314,
29974,
29896,
29947,
29900,
29897,
396,
1754,
445,
385,
8380,
995,
577,
393,
278,
260,
2782,
9242,
6374,
13,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
29949,
1672,
29911,
22164,
13,
9651,
565,
438,
1672,
29911,
29961,
29875,
29962,
529,
29871,
29900,
29901,
13,
18884,
438,
1672,
29911,
29961,
29875,
29962,
353,
438,
1672,
29911,
29961,
29875,
10062,
29896,
29947,
29900,
13,
9651,
25342,
438,
1672,
29911,
29961,
29875,
29962,
1405,
29871,
29900,
29901,
13,
18884,
438,
1672,
29911,
29961,
29875,
29962,
353,
438,
1672,
29911,
29961,
29875,
29962,
29899,
29896,
29947,
29900,
13,
4136,
2277,
319,
29205,
4547,
778,
716,
9500,
304,
3633,
363,
7568,
7186,
29889,
5224,
20447,
1026,
16101,
13,
13,
13,
13,
4136,
2277,
13866,
1795,
505,
304,
367,
4784,
304,
2125,
964,
3633,
278,
29591,
5469,
310,
278,
13733,
16101,
29937,
13,
4706,
565,
26823,
29918,
1853,
1275,
525,
29934,
3289,
29899,
1164,
16786,
2396,
13,
9651,
5922,
353,
7442,
29889,
3298,
359,
29898,
2435,
29898,
29949,
1672,
29911,
876,
13,
9651,
363,
432,
297,
3464,
29898,
2435,
29898,
29949,
1672,
29911,
22164,
13,
18884,
2923,
29900,
353,
5159,
13,
18884,
363,
474,
297,
3464,
29898,
2435,
29898,
29934,
3289,
29918,
1164,
16786,
29918,
25254,
3859,
22164,
13,
462,
1678,
396,
12765,
29900,
29889,
4397,
4197,
3552,
29934,
3289,
29918,
1164,
16786,
29918,
25254,
3859,
29961,
29875,
29892,
29900,
29962,
29899,
9806,
3289,
29961,
29926,
2314,
1068,
29906,
17108,
29934,
3289,
29918,
1164,
16786,
29918,
25254,
3859,
29961,
29875,
29892,
29896,
29962,
29899,
29949,
1672,
29911,
29961,
29926,
2314,
1068,
29906,
29897,
1068,
29900,
29889,
29945,
29892,
390,
3289,
29918,
1164,
16786,
29918,
25254,
3859,
29961,
29875,
29892,
29953,
24960,
13,
462,
1678,
2923,
29900,
29889,
4397,
4197,
3552,
29934,
3289,
29918,
1164,
16786,
29918,
25254,
3859,
29961,
29875,
29892,
29896,
29962,
29899,
9806,
3289,
29961,
29926,
2314,
1068,
29906,
17108,
29934,
3289,
29918,
1164,
16786,
29918,
25254,
3859,
29961,
29875,
29892,
29900,
29962,
29899,
29949,
1672,
29911,
29961,
29926,
2314,
1068,
29906,
29897,
1068,
29900,
29889,
29945,
29892,
390,
3289,
29918,
1164,
16786,
29918,
25254,
3859,
29961,
29875,
29892,
29945,
24960,
13,
18884,
2923,
29900,
29889,
6605,
580,
13,
18884,
5922,
29961,
29926,
29962,
353,
2923,
29900,
29961,
29900,
3816,
29896,
29962,
13,
4706,
25342,
26823,
29918,
1853,
1275,
525,
29934,
3289,
29899,
4717,
29943,
2396,
13,
9651,
5922,
353,
7442,
29889,
3298,
359,
29898,
2435,
29898,
29949,
1672,
29911,
876,
13,
9651,
363,
432,
297,
3464,
29898,
2435,
29898,
29949,
1672,
29911,
22164,
13,
2277,
29937,
2400,
29901,
4417,
297,
278,
11780,
363,
278,
525,
9812,
29899,
29920,
29915,
2106,
835,
13,
18884,
565,
313,
29949,
1672,
29911,
29961,
29926,
29962,
529,
448,
29946,
29945,
470,
438,
1672,
29911,
29961,
29926,
29962,
1405,
29871,
29896,
29946,
29900,
29897,
322,
503,
29918,
1066,
29961,
29926,
29962,
1405,
29871,
29946,
29889,
29947,
29901,
13,
462,
1678,
5922,
29961,
29926,
29962,
353,
29871,
29941,
13,
18884,
1683,
29901,
13,
2277,
29937,
2038,
29901,
4417,
297,
278,
11780,
363,
278,
525,
9812,
29899,
29920,
29915,
2106,
835,
13,
462,
1678,
2923,
29900,
353,
5159,
13,
462,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
29934,
3289,
29918,
4717,
29943,
29918,
25254,
3859,
22164,
13,
462,
4706,
396,
12765,
29900,
29889,
4397,
4197,
3552,
29934,
3289,
29918,
4717,
29943,
29918,
25254,
3859,
29961,
29875,
29892,
29900,
29962,
29899,
9806,
3289,
29961,
29926,
2314,
1068,
29906,
17108,
29934,
3289,
29918,
4717,
29943,
29918,
25254,
3859,
29961,
29875,
29892,
29896,
29962,
29899,
29949,
1672,
29911,
29961,
29926,
2314,
1068,
29906,
29897,
1068,
29900,
29889,
29945,
29892,
390,
3289,
29918,
4717,
29943,
29918,
25254,
3859,
29961,
29875,
29892,
29953,
24960,
13,
462,
4706,
2923,
29900,
29889,
4397,
4197,
3552,
29934,
3289,
29918,
4717,
29943,
29918,
25254,
3859,
29961,
29875,
29892,
29896,
29962,
29899,
9806,
3289,
29961,
29926,
2314,
1068,
29906,
17108,
29934,
3289,
29918,
4717,
29943,
29918,
25254,
3859,
29961,
29875,
29892,
29900,
29962,
29899,
29949,
1672,
29911,
29961,
29926,
2314,
1068,
29906,
29897,
1068,
29900,
29889,
29945,
29892,
390,
3289,
29918,
4717,
29943,
29918,
25254,
3859,
29961,
29875,
29892,
29946,
24960,
13,
462,
1678,
2923,
29900,
29889,
6605,
580,
13,
462,
1678,
5922,
29961,
29926,
29962,
353,
2923,
29900,
29961,
29900,
3816,
29896,
29962,
13,
4136,
2277,
319,
29205,
1795,
505,
304,
367,
4784,
304,
2125,
964,
3633,
278,
29591,
5469,
310,
278,
13733,
16101,
29937,
13,
13,
13,
13,
4136,
2277,
22680,
591,
864,
304,
3349,
445,
29973,
6804,
338,
278,
775,
393,
13623,
445,
2472,
29973,
474,
29889,
29872,
29889,
674,
727,
367,
18232,
29899,
265,
9545,
29973,
16101,
29937,
13,
4136,
2277,
960,
16705,
775,
4225,
2380,
29871,
29945,
313,
10184,
29918,
28631,
29897,
515,
278,
1962,
29892,
21228,
445,
3023,
29918,
28631,
674,
9500,
393,
304,
2380,
29871,
29946,
835,
4136,
13,
29937,
308,
3023,
29918,
28631,
353,
7442,
29889,
3298,
359,
29898,
2435,
29898,
29949,
1672,
29911,
876,
13,
29937,
308,
363,
432,
297,
3464,
29898,
2435,
29898,
29949,
1672,
29911,
22164,
13,
29937,
632,
2923,
29900,
353,
5159,
13,
29937,
632,
363,
474,
297,
3464,
29898,
2435,
29898,
25254,
3859,
29946,
22164,
13,
29937,
462,
2923,
29900,
29889,
4397,
4197,
3552,
25254,
3859,
29946,
29961,
29875,
29892,
29900,
29962,
29899,
9806,
3289,
29961,
29926,
2314,
1068,
29906,
17108,
25254,
3859,
29946,
29961,
29875,
29892,
29896,
29962,
29899,
29949,
1672,
29911,
29961,
29926,
2314,
1068,
29906,
29897,
1068,
29900,
29889,
29945,
29892,
11758,
3859,
29946,
29961,
29875,
29892,
29953,
24960,
13,
29937,
632,
2923,
29900,
29889,
6605,
580,
13,
29937,
632,
3023,
29918,
28631,
29961,
29926,
29962,
353,
2923,
29900,
29961,
29900,
3816,
29896,
10062,
29896,
13,
13,
13,
4136,
2277,
2400,
29901,
2030,
1962,
4902,
3045,
835,
13383,
13383,
2277,
29937,
13,
4136,
2277,
25723,
448,
390,
3289,
29899,
6194,
304,
6058,
379,
7520,
29923,
278,
796,
29899,
19244,
835,
13383,
2277,
29937,
13,
4136,
2277,
25723,
448,
25601,
297,
278,
26823,
525,
4039,
742,
474,
29889,
29872,
29889,
390,
3289,
29899,
1164,
16786,
470,
390,
3289,
29899,
4717,
29943,
16101,
13,
29937,
308,
19474,
12336,
353,
7442,
29889,
3298,
359,
4197,
2435,
29898,
29949,
1672,
29911,
511,
29871,
29953,
2314,
13,
13,
29937,
308,
363,
474,
297,
3464,
29898,
2435,
29898,
29949,
1672,
29911,
22164,
13,
29937,
632,
19474,
12336,
29961,
29875,
29962,
353,
931,
19935,
29961,
29875,
1402,
438,
29956,
3289,
29961,
29875,
1402,
438,
1672,
29911,
29961,
29875,
1402,
503,
29918,
1066,
29961,
29875,
1402,
3023,
29918,
28631,
29961,
29875,
1402,
1023,
29918,
28631,
29961,
29875,
29962,
13,
4136,
2277,
2038,
29901,
2030,
1962,
4902,
3045,
835,
13383,
13383,
2277,
29937,
13,
13,
4136,
2277,
2400,
29901,
29091,
1962,
4902,
3045,
835,
13383,
13383,
2277,
29937,
13,
4706,
565,
26823,
29918,
1853,
1275,
525,
29934,
3289,
29899,
1164,
16786,
2396,
13,
9651,
19474,
12336,
353,
7442,
29889,
3298,
359,
4197,
2435,
29898,
29949,
1672,
29911,
511,
29871,
29953,
14664,
579,
668,
29898,
3318,
29897,
13,
13,
9651,
363,
474,
297,
3464,
29898,
2435,
29898,
29949,
1672,
29911,
22164,
13,
18884,
19474,
12336,
29961,
29875,
29962,
353,
851,
29898,
14676,
262,
29918,
1853,
511,
931,
19935,
29961,
29875,
1402,
438,
29956,
3289,
29961,
29875,
1402,
438,
1672,
29911,
29961,
29875,
1402,
525,
29876,
29914,
29874,
742,
938,
29898,
28631,
29961,
29875,
2314,
13,
4706,
25342,
26823,
29918,
1853,
1275,
525,
29934,
3289,
29899,
4717,
29943,
2396,
13,
9651,
19474,
12336,
353,
7442,
29889,
3298,
359,
4197,
2435,
29898,
29949,
1672,
29911,
511,
29871,
29953,
14664,
579,
668,
29898,
3318,
29897,
13,
13,
9651,
363,
474,
297,
3464,
29898,
2435,
29898,
29949,
1672,
29911,
22164,
13,
18884,
19474,
12336,
29961,
29875,
29962,
353,
851,
29898,
14676,
262,
29918,
1853,
511,
931,
19935,
29961,
29875,
1402,
438,
29956,
3289,
29961,
29875,
1402,
438,
1672,
29911,
29961,
29875,
1402,
503,
29918,
1066,
29961,
29875,
1402,
938,
29898,
28631,
29961,
29875,
2314,
13,
13,
13,
13,
13,
4706,
15149,
12015,
29889,
4397,
29898,
12015,
12336,
29897,
13,
1678,
736,
7442,
29889,
294,
2378,
29898,
1964,
3927,
2692,
29897,
13,
1678,
396,
9302,
29889,
29879,
485,
300,
486,
29898,
710,
29898,
29873,
558,
7240,
29908,
29918,
1376,
29873,
29918,
5450,
29918,
29920,
29918,
3859,
29889,
29968,
29934,
3289,
29918,
17969,
710,
29898,
29895,
29974,
29896,
7240,
1642,
3945,
613,
19474,
12336,
29892,
19200,
29922,
1839,
29995,
29875,
3788,
29995,
29896,
29900,
29889,
29941,
29888,
3788,
29995,
29896,
29900,
29889,
29941,
29888,
3788,
29995,
29896,
29900,
29889,
29941,
29888,
3788,
29995,
29875,
3788,
29995,
29875,
7464,
28552,
2433,
25710,
13,
2
] |
test/test_icap.py | antmicro/netv2 | 0 | 64553 | #!/usr/bin/env python3
from litex import RemoteClient
wb = RemoteClient()
wb.open()
# # #
def icap_send(addr, data):
wb.regs.icap_addr.write(addr)
wb.regs.icap_data.write(data)
wb.regs.icap_send.write(1)
while (wb.regs.icap_done.read() == 0):
pass
# iprog
icap_send(0x04, 0x0000000f)
# # #
wb.close()
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
3166,
301,
568,
29916,
1053,
5240,
866,
4032,
13,
13,
29893,
29890,
353,
5240,
866,
4032,
580,
13,
29893,
29890,
29889,
3150,
580,
13,
13,
29937,
396,
396,
13,
13,
1753,
16077,
481,
29918,
6717,
29898,
10030,
29892,
848,
1125,
13,
12,
29893,
29890,
29889,
1727,
29879,
29889,
293,
481,
29918,
10030,
29889,
3539,
29898,
10030,
29897,
13,
12,
29893,
29890,
29889,
1727,
29879,
29889,
293,
481,
29918,
1272,
29889,
3539,
29898,
1272,
29897,
13,
12,
29893,
29890,
29889,
1727,
29879,
29889,
293,
481,
29918,
6717,
29889,
3539,
29898,
29896,
29897,
13,
12,
8000,
313,
29893,
29890,
29889,
1727,
29879,
29889,
293,
481,
29918,
15091,
29889,
949,
580,
1275,
29871,
29900,
1125,
13,
12,
12,
3364,
13,
13,
29937,
474,
29097,
13,
293,
481,
29918,
6717,
29898,
29900,
29916,
29900,
29946,
29892,
29871,
29900,
29916,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29888,
29897,
13,
13,
29937,
396,
396,
13,
13,
29893,
29890,
29889,
5358,
580,
13,
2
] |
tests/test_linearalgebra.py | JHay0112/jmath | 7 | 91094 | <filename>tests/test_linearalgebra.py
"""
jmath/tests/test_linearalgebra.py
Runs tests on linear algebra component using pytest
Author: <NAME>
Date: 2021-06-25
"""
# - Imports
from ..jmath.linearalgebra import Vector, Point, Line
from .tools import random_integer, random_integers, repeat
from typing import Tuple, List
from math import sqrt
# - Functions
def vector_component_pair(len: int = random_integer()) -> Tuple[Vector, List[int]]:
"""
Generates a vector and component pair randomly.
Parameters
----------
len
The length vector/components to generate
"""
components = random_integers(len)
return (Vector(components), components)
@repeat
def test_vector_equality():
"""Tests that vectors are equal as expected."""
v, c = vector_component_pair()
assert v == v
assert v == Vector(c)
assert v.components == c
@repeat
def test_vector_addition():
"""Tests vector addition."""
len = random_integer()
v1, c1 = vector_component_pair(len)
v2, c2 = vector_component_pair(len)
expected = Vector([i + j for i, j in zip(c1, c2)])
assert (v1 + v2) == expected
@repeat
def test_vector_subtraction():
"""Tests vector subtraction."""
len = random_integer()
v1, c1 = vector_component_pair(len)
v2, c2 = vector_component_pair(len)
expected = Vector([i - j for i, j in zip(c1, c2)])
assert (v1 - v2) == expected
@repeat
def test_vector_scaling():
"""Tests vector multiplication and division"""
# Produce initial conditions
length = random_integer(min = 3, max = 10)
scalor = random_integer(min = 1, max = 10)
v, c = vector_component_pair(length)
# Mult/div vectors
mult = v * scalor
div = v / scalor
# Compute expected
mult_expected = Vector([scalor * i for i in c])
div_expected = Vector([round(i / scalor, 5) for i in c])
# Round division vector to factor out floating point error
div.components = [round(i, 5) for i in div.components]
# Test multiply
assert mult_expected == mult
# Test divide
assert div_expected == div
@repeat
def test_dot_product():
"""Tests the dot product"""
# Generate vectors and components
len = random_integer()
v1, c1 = vector_component_pair(len)
v2, c2 = vector_component_pair(len)
# Compute dot product
dot = v1 @ v2
# Predict dot product
predicted_dot = sum([i * j for i, j in zip(c1, c2)])
assert dot == predicted_dot
def test_projection():
"""Tests projecting vectors"""
# Test with vector
vec1 = Vector(3, 4)
vec2 = Vector(1, 1)
expected = Vector(7/2, 7/2)
assert vec1.projection(vec2) == expected
# Test with line
line = Line(Point(0, 0), vec2)
assert vec1.projection(line) == expected
@repeat
def test_magnitude():
"""Tests vector magnitude"""
v, c = vector_component_pair()
# Square components, sum, and sqrt
predicted_magnitude = sqrt(sum([i ** 2 for i in c]))
assert round(predicted_magnitude, 5) == round(v.magnitude(), 5)
@repeat
def test_vector_size():
"""Tests that a vector will return the correct size"""
v, c = vector_component_pair()
assert len(v) == len(c)
def test_point_in_line():
"""Tests whether a point is in a line"""
# Test point that should be on line
point = Point(3, 4)
line = Line(Point(0, 0), 2 * point)
assert point.on_line(line)
# Test point that shouldn't be
point = Point(8, 1)
assert not point.on_line(line)
# Testing in 3-space for certainty
point = Point(1, 2, 3)
d_vector = Vector(4, 5, 6)
known_point_on_line = Point(9, 12, 15)
line = Line(point, d_vector)
assert known_point_on_line.on_line(line)
def test_angle_between():
"""Tests that angle between vectors is correct"""
vec1 = Vector(1, 1)
vec2 = Vector(2, 2)
assert vec1.angle_between(vec2) == 0
@repeat
def test_negative():
"""Test that a negative vector does indeed give one with all the components reversed"""
# Generate vector component pair
v, c = vector_component_pair()
# Make negative vector
v = v.negative()
# Make components negative
c = Vector([-i for i in c])
assert v == c
def test_unit_vector():
"""Tests that a unit vector is produced correctly"""
vec = Vector(1, 2)
unit_vec = vec.unit()
assert round(unit_vec.magnitude(), 10) == 1
assert vec.magnitude() * unit_vec == vec
@repeat
def test_vector_subscripts():
"""Tests that a vector can be subscripted."""
# Generate vector component pair
v, c = vector_component_pair()
# Iterate through components and check they match
for i in range(len(c)):
assert v[i] == c[i]
| [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
10660,
15742,
29889,
2272,
13,
15945,
29908,
13,
1678,
432,
755,
29914,
21150,
29914,
1688,
29918,
10660,
15742,
29889,
2272,
13,
13,
1678,
390,
6948,
6987,
373,
5608,
9623,
4163,
773,
11451,
1688,
13,
13,
1678,
13361,
29901,
529,
5813,
29958,
13,
1678,
4712,
29901,
29871,
29906,
29900,
29906,
29896,
29899,
29900,
29953,
29899,
29906,
29945,
13,
15945,
29908,
13,
13,
29937,
448,
1954,
4011,
13,
13,
3166,
6317,
29926,
755,
29889,
10660,
15742,
1053,
16510,
29892,
8984,
29892,
7407,
13,
3166,
869,
8504,
1053,
4036,
29918,
16031,
29892,
4036,
29918,
6693,
5743,
29892,
12312,
13,
3166,
19229,
1053,
12603,
552,
29892,
2391,
13,
3166,
5844,
1053,
18074,
2273,
13,
13,
29937,
448,
6680,
29879,
13,
13,
1753,
4608,
29918,
9700,
29918,
18784,
29898,
2435,
29901,
938,
353,
4036,
29918,
16031,
3101,
1599,
12603,
552,
29961,
12877,
29892,
2391,
29961,
524,
5262,
29901,
13,
1678,
9995,
13,
4706,
3251,
1078,
263,
4608,
322,
4163,
5101,
20459,
29889,
13,
308,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
13,
4706,
7431,
13,
9651,
450,
3309,
4608,
29914,
14036,
304,
5706,
13,
1678,
9995,
13,
1678,
7117,
353,
4036,
29918,
6693,
5743,
29898,
2435,
29897,
13,
1678,
736,
313,
12877,
29898,
14036,
511,
7117,
29897,
13,
13,
29992,
14358,
13,
1753,
1243,
29918,
8111,
29918,
13895,
7295,
13,
1678,
9995,
24376,
393,
12047,
526,
5186,
408,
3806,
1213,
15945,
13,
1678,
325,
29892,
274,
353,
4608,
29918,
9700,
29918,
18784,
580,
13,
13,
1678,
4974,
325,
1275,
325,
13,
1678,
4974,
325,
1275,
16510,
29898,
29883,
29897,
13,
1678,
4974,
325,
29889,
14036,
1275,
274,
13,
13,
29992,
14358,
13,
1753,
1243,
29918,
8111,
29918,
1202,
654,
7295,
13,
1678,
9995,
24376,
4608,
6124,
1213,
15945,
13,
1678,
7431,
353,
4036,
29918,
16031,
580,
13,
1678,
325,
29896,
29892,
274,
29896,
353,
4608,
29918,
9700,
29918,
18784,
29898,
2435,
29897,
13,
1678,
325,
29906,
29892,
274,
29906,
353,
4608,
29918,
9700,
29918,
18784,
29898,
2435,
29897,
13,
13,
1678,
3806,
353,
16510,
4197,
29875,
718,
432,
363,
474,
29892,
432,
297,
14319,
29898,
29883,
29896,
29892,
274,
29906,
29897,
2314,
13,
13,
1678,
4974,
313,
29894,
29896,
718,
325,
29906,
29897,
1275,
3806,
13,
13,
29992,
14358,
13,
1753,
1243,
29918,
8111,
29918,
1491,
3018,
428,
7295,
13,
1678,
9995,
24376,
4608,
1014,
3018,
428,
1213,
15945,
13,
1678,
7431,
353,
4036,
29918,
16031,
580,
13,
1678,
325,
29896,
29892,
274,
29896,
353,
4608,
29918,
9700,
29918,
18784,
29898,
2435,
29897,
13,
1678,
325,
29906,
29892,
274,
29906,
353,
4608,
29918,
9700,
29918,
18784,
29898,
2435,
29897,
13,
13,
1678,
3806,
353,
16510,
4197,
29875,
448,
432,
363,
474,
29892,
432,
297,
14319,
29898,
29883,
29896,
29892,
274,
29906,
29897,
2314,
13,
13,
1678,
4974,
313,
29894,
29896,
448,
325,
29906,
29897,
1275,
3806,
13,
13,
29992,
14358,
13,
1753,
1243,
29918,
8111,
29918,
19529,
292,
7295,
13,
1678,
9995,
24376,
4608,
21666,
322,
8542,
15945,
29908,
13,
1678,
396,
7138,
346,
2847,
5855,
13,
1678,
3309,
353,
4036,
29918,
16031,
29898,
1195,
353,
29871,
29941,
29892,
4236,
353,
29871,
29896,
29900,
29897,
13,
1678,
8716,
272,
353,
4036,
29918,
16031,
29898,
1195,
353,
29871,
29896,
29892,
4236,
353,
29871,
29896,
29900,
29897,
13,
1678,
325,
29892,
274,
353,
4608,
29918,
9700,
29918,
18784,
29898,
2848,
29897,
13,
13,
1678,
396,
9683,
29914,
4563,
12047,
13,
1678,
1773,
353,
325,
334,
8716,
272,
13,
1678,
1933,
353,
325,
847,
8716,
272,
13,
13,
1678,
396,
11796,
29872,
3806,
13,
1678,
1773,
29918,
9684,
353,
16510,
4197,
19529,
272,
334,
474,
363,
474,
297,
274,
2314,
13,
1678,
1933,
29918,
9684,
353,
16510,
4197,
14486,
29898,
29875,
847,
8716,
272,
29892,
29871,
29945,
29897,
363,
474,
297,
274,
2314,
13,
13,
1678,
396,
21595,
8542,
4608,
304,
7329,
714,
16526,
1298,
1059,
13,
1678,
1933,
29889,
14036,
353,
518,
14486,
29898,
29875,
29892,
29871,
29945,
29897,
363,
474,
297,
1933,
29889,
14036,
29962,
13,
13,
1678,
396,
4321,
22932,
13,
1678,
4974,
1773,
29918,
9684,
1275,
1773,
13,
1678,
396,
4321,
16429,
13,
1678,
4974,
1933,
29918,
9684,
1275,
1933,
13,
13,
29992,
14358,
13,
1753,
1243,
29918,
6333,
29918,
4704,
7295,
13,
1678,
9995,
24376,
278,
8329,
3234,
15945,
29908,
13,
1678,
396,
3251,
403,
12047,
322,
7117,
13,
1678,
7431,
353,
4036,
29918,
16031,
580,
13,
1678,
325,
29896,
29892,
274,
29896,
353,
4608,
29918,
9700,
29918,
18784,
29898,
2435,
29897,
13,
1678,
325,
29906,
29892,
274,
29906,
353,
4608,
29918,
9700,
29918,
18784,
29898,
2435,
29897,
13,
13,
1678,
396,
11796,
29872,
8329,
3234,
13,
1678,
8329,
353,
325,
29896,
732,
325,
29906,
13,
13,
1678,
396,
21099,
919,
8329,
3234,
13,
1678,
25383,
29918,
6333,
353,
2533,
4197,
29875,
334,
432,
363,
474,
29892,
432,
297,
14319,
29898,
29883,
29896,
29892,
274,
29906,
29897,
2314,
13,
13,
1678,
4974,
8329,
1275,
25383,
29918,
6333,
13,
13,
1753,
1243,
29918,
771,
6929,
7295,
13,
1678,
9995,
24376,
2060,
292,
12047,
15945,
29908,
13,
1678,
396,
4321,
411,
4608,
13,
1678,
9649,
29896,
353,
16510,
29898,
29941,
29892,
29871,
29946,
29897,
13,
1678,
9649,
29906,
353,
16510,
29898,
29896,
29892,
29871,
29896,
29897,
13,
1678,
3806,
353,
16510,
29898,
29955,
29914,
29906,
29892,
29871,
29955,
29914,
29906,
29897,
13,
1678,
4974,
9649,
29896,
29889,
771,
6929,
29898,
2003,
29906,
29897,
1275,
3806,
13,
1678,
396,
4321,
411,
1196,
13,
1678,
1196,
353,
7407,
29898,
5228,
29898,
29900,
29892,
29871,
29900,
511,
9649,
29906,
29897,
13,
1678,
4974,
9649,
29896,
29889,
771,
6929,
29898,
1220,
29897,
1275,
3806,
13,
13,
29992,
14358,
13,
1753,
1243,
29918,
29885,
4211,
4279,
7295,
13,
1678,
9995,
24376,
4608,
18497,
15945,
29908,
13,
268,
13,
1678,
325,
29892,
274,
353,
4608,
29918,
9700,
29918,
18784,
580,
13,
13,
1678,
396,
19256,
7117,
29892,
2533,
29892,
322,
18074,
2273,
13,
1678,
25383,
29918,
29885,
4211,
4279,
353,
18074,
2273,
29898,
2083,
4197,
29875,
3579,
29871,
29906,
363,
474,
297,
274,
12622,
13,
13,
1678,
4974,
4513,
29898,
11965,
18186,
29918,
29885,
4211,
4279,
29892,
29871,
29945,
29897,
1275,
4513,
29898,
29894,
29889,
29885,
4211,
4279,
3285,
29871,
29945,
29897,
13,
13,
29992,
14358,
13,
1753,
1243,
29918,
8111,
29918,
2311,
7295,
13,
1678,
9995,
24376,
393,
263,
4608,
674,
736,
278,
1959,
2159,
15945,
29908,
13,
268,
13,
1678,
325,
29892,
274,
353,
4608,
29918,
9700,
29918,
18784,
580,
13,
13,
1678,
4974,
7431,
29898,
29894,
29897,
1275,
7431,
29898,
29883,
29897,
13,
13,
1753,
1243,
29918,
3149,
29918,
262,
29918,
1220,
7295,
13,
1678,
9995,
24376,
3692,
263,
1298,
338,
297,
263,
1196,
15945,
29908,
13,
1678,
396,
4321,
1298,
393,
881,
367,
373,
1196,
13,
1678,
1298,
353,
8984,
29898,
29941,
29892,
29871,
29946,
29897,
13,
1678,
1196,
353,
7407,
29898,
5228,
29898,
29900,
29892,
29871,
29900,
511,
29871,
29906,
334,
1298,
29897,
13,
1678,
4974,
1298,
29889,
265,
29918,
1220,
29898,
1220,
29897,
13,
1678,
396,
4321,
1298,
393,
9273,
29915,
29873,
367,
13,
1678,
1298,
353,
8984,
29898,
29947,
29892,
29871,
29896,
29897,
13,
1678,
4974,
451,
1298,
29889,
265,
29918,
1220,
29898,
1220,
29897,
13,
13,
1678,
396,
4321,
292,
297,
29871,
29941,
29899,
3493,
363,
3058,
1017,
13,
1678,
1298,
353,
8984,
29898,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29897,
13,
1678,
270,
29918,
8111,
353,
16510,
29898,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29897,
13,
1678,
2998,
29918,
3149,
29918,
265,
29918,
1220,
353,
8984,
29898,
29929,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29945,
29897,
13,
1678,
1196,
353,
7407,
29898,
3149,
29892,
270,
29918,
8111,
29897,
13,
1678,
4974,
2998,
29918,
3149,
29918,
265,
29918,
1220,
29889,
265,
29918,
1220,
29898,
1220,
29897,
13,
13,
1753,
1243,
29918,
2521,
29918,
14811,
7295,
13,
1678,
9995,
24376,
393,
10696,
1546,
12047,
338,
1959,
15945,
29908,
13,
1678,
9649,
29896,
353,
16510,
29898,
29896,
29892,
29871,
29896,
29897,
13,
1678,
9649,
29906,
353,
16510,
29898,
29906,
29892,
29871,
29906,
29897,
13,
13,
1678,
4974,
9649,
29896,
29889,
2521,
29918,
14811,
29898,
2003,
29906,
29897,
1275,
29871,
29900,
13,
13,
29992,
14358,
13,
1753,
1243,
29918,
22198,
7295,
13,
1678,
9995,
3057,
393,
263,
8178,
4608,
947,
6200,
2367,
697,
411,
599,
278,
7117,
18764,
287,
15945,
29908,
13,
13,
1678,
396,
3251,
403,
4608,
4163,
5101,
13,
1678,
325,
29892,
274,
353,
4608,
29918,
9700,
29918,
18784,
580,
13,
1678,
396,
8561,
8178,
4608,
13,
1678,
325,
353,
325,
29889,
22198,
580,
13,
1678,
396,
8561,
7117,
8178,
13,
1678,
274,
353,
16510,
4197,
29899,
29875,
363,
474,
297,
274,
2314,
13,
268,
13,
1678,
4974,
325,
1275,
274,
13,
13,
1753,
1243,
29918,
5441,
29918,
8111,
7295,
13,
1678,
9995,
24376,
393,
263,
5190,
4608,
338,
7371,
5149,
15945,
29908,
13,
1678,
9649,
353,
16510,
29898,
29896,
29892,
29871,
29906,
29897,
13,
1678,
5190,
29918,
2003,
353,
9649,
29889,
5441,
580,
13,
1678,
4974,
4513,
29898,
5441,
29918,
2003,
29889,
29885,
4211,
4279,
3285,
29871,
29896,
29900,
29897,
1275,
29871,
29896,
13,
1678,
4974,
9649,
29889,
29885,
4211,
4279,
580,
334,
5190,
29918,
2003,
1275,
9649,
13,
13,
29992,
14358,
13,
1753,
1243,
29918,
8111,
29918,
1491,
16713,
7295,
13,
1678,
9995,
24376,
393,
263,
4608,
508,
367,
1014,
2154,
287,
1213,
15945,
13,
1678,
396,
3251,
403,
4608,
4163,
5101,
13,
1678,
325,
29892,
274,
353,
4608,
29918,
9700,
29918,
18784,
580,
13,
1678,
396,
20504,
403,
1549,
7117,
322,
1423,
896,
1993,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
29883,
22164,
13,
4706,
4974,
325,
29961,
29875,
29962,
1275,
274,
29961,
29875,
29962,
13,
2
] |
towers/monkey_village.py | 56kyle/bloons_auto | 0 | 48319 | <filename>towers/monkey_village.py
from tower import Tower
from config import keybinds
class MonkeyVillage(Tower):
name = 'monkey_village'
range = 215
width = 119
height = 103
size = 'xl'
keybind = keybinds[name]
aquatic = False
def __init__(self, **kwargs):
super().__init__(**kwargs)
| [
1,
529,
9507,
29958,
29873,
340,
414,
29914,
3712,
1989,
29918,
29894,
453,
482,
29889,
2272,
13,
3166,
19372,
1053,
23615,
13,
3166,
2295,
1053,
1820,
5355,
29879,
13,
13,
13,
1990,
2598,
1989,
29963,
453,
482,
29898,
29911,
1680,
1125,
13,
1678,
1024,
353,
525,
3712,
1989,
29918,
29894,
453,
482,
29915,
13,
1678,
3464,
353,
29871,
29906,
29896,
29945,
13,
1678,
2920,
353,
29871,
29896,
29896,
29929,
13,
1678,
3171,
353,
29871,
29896,
29900,
29941,
13,
1678,
2159,
353,
525,
15524,
29915,
13,
1678,
1820,
5355,
353,
1820,
5355,
29879,
29961,
978,
29962,
13,
1678,
10592,
2454,
353,
7700,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
1068,
19290,
29897,
13,
2
] |
model.py | Jeffrey0Liao/2020-2021-Final-Year-Project-Joint-Sentimental-Analysis-Based-on-Tree-topology | 2 | 114274 | import torch as th
import torch.nn as nn
from torch.utils.data import DataLoader
from torch.utils.data import Dataset
import torch.nn.functional as F
import numpy as np
import dgl
import dgl.function as fn
class TreeLSTMCell(nn.Module):
def __init__(self, x_size, h_size):
super(TreeLSTMCell, self).__init__()
self.W_iou = nn.Linear(x_size, 3 * h_size, bias=False)
self.U_iou = nn.Linear(2 * h_size, 3 * h_size, bias=False)
self.b_iou = nn.Parameter(th.zeros(1, 3 * h_size))
self.U_f = nn.Linear(2 * h_size, 2 * h_size)
def message_func(self, edges):
return {'h': edges.src['h'], 'c': edges.src['c']}
def reduce_func(self, nodes):
# concatenate h_jl for equation (1), (2), (3), (4)
h_cat = nodes.mailbox['h'].view(nodes.mailbox['h'].size(0), -1)
# equation (2)
f = th.sigmoid(self.U_f(h_cat)).view(*nodes.mailbox['h'].size())
# second term of equation (5)
c = th.sum(f * nodes.mailbox['c'], 1)
return {'iou': self.U_iou(h_cat), 'c': c}
def apply_node_func(self, nodes):
# equation (1), (3), (4)
iou = nodes.data['iou'] + self.b_iou
i, o, u = th.chunk(iou, 3, 1)
i, o, u = th.sigmoid(i), th.sigmoid(o), th.tanh(u)
# equation (5)
c = i * u + nodes.data['c']
# equation (6)
h = o * th.tanh(c)
return {'h' : h, 'c' : c}
class Attention(nn.Module):
def __init__(self, embed_size, feature_size):
super(Attention, self).__init__()
self.embed_size = embed_size
self.feature_size = feature_size
self.linear_in = nn.Linear(feature_size, embed_size, bias=False)
self.linear_out = nn.Linear(embed_size+feature_size, embed_size)
def forward(self, sent, img, mask):
# sent: snetence_len * embed_size
# img: num_region * feature_size
snetence_len = sent.size(0)
num_region = img.size(0)
# img_in: num_region * embed_size
img_in = self.linear_in(img)
atten = th.mm(sent, img_in.transpose(0, 1))
#atten.data.masked_fill(mask, -1e6)
atten = F.softmax(atten, dim=1)
# atten: snetence_len * num_region
context = th.mm(atten, img)
# context: snetence_len * feature_size
output = th.cat((context, sent), dim=1) # output: snetence_len * (feature_size+embed_size)
output = th.tanh(self.linear_out(output))
# output: snetence_len * embed_size
return output
class TreeLSTM(nn.Module):
def __init__(self,
num_vocabs,
x_size,
h_size,
feature_size,
num_classes,
dropout,
pretrained_emb=None):
super(TreeLSTM, self).__init__()
self.x_size = x_size
self.embedding = nn.Embedding(num_vocabs, x_size)
self.attention = Attention(x_size, feature_size)
if pretrained_emb is not None:
print('Using glove')
self.embedding.from_pretrained(pretrained_emb)
self.embedding.weight.requires_grad = True
self.dropout = nn.Dropout(dropout)
self.linear = nn.Linear(h_size, num_classes)
self.cell = TreeLSTMCell(x_size, h_size)
def forward(self, batch, h, c):
"""Compute tree-lstm prediction given a batch.
Parameters
----------
batch : dgl.data.SSTBatch
The data batch.
h : Tensor
Initial hidden state.
c : Tensor
Initial cell state.
Returns
-------
logits : Tensor
The prediction of each node.
"""
g = batch.graph
# to heterogenous graph
g = dgl.graph(g.edges())
# feed embedding
embeds = self.embedding(batch.wordid * batch.mask)
attn_mask = batch.mask.expand(batch.image.shape[0], batch.wordid.shape[0]).T
attn_embeds = self.attention(embeds, batch.image, attn_mask)
g.ndata['iou'] = self.cell.W_iou(self.dropout(attn_embeds)) * batch.mask.float().unsqueeze(-1)
g.ndata['h'] = h
g.ndata['c'] = c
# propagate
dgl.prop_nodes_topo(g,
message_func=self.cell.message_func,
reduce_func=self.cell.reduce_func,
apply_node_func=self.cell.apply_node_func)
# compute logits
h = self.dropout(g.ndata.pop('h'))
logits = self.linear(h)
return logits
| [
1,
1053,
4842,
305,
408,
266,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
3166,
4842,
305,
29889,
13239,
29889,
1272,
1053,
3630,
10036,
13,
3166,
4842,
305,
29889,
13239,
29889,
1272,
1053,
13373,
24541,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383,
13,
5215,
12655,
408,
7442,
13,
13,
5215,
270,
3820,
13,
5215,
270,
3820,
29889,
2220,
408,
7876,
13,
13,
1990,
15472,
29931,
1254,
29924,
4617,
29898,
15755,
29889,
7355,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
921,
29918,
2311,
29892,
298,
29918,
2311,
1125,
13,
4706,
2428,
29898,
9643,
29931,
1254,
29924,
4617,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
29956,
29918,
29875,
283,
353,
302,
29876,
29889,
12697,
29898,
29916,
29918,
2311,
29892,
29871,
29941,
334,
298,
29918,
2311,
29892,
24003,
29922,
8824,
29897,
13,
4706,
1583,
29889,
29965,
29918,
29875,
283,
353,
302,
29876,
29889,
12697,
29898,
29906,
334,
298,
29918,
2311,
29892,
29871,
29941,
334,
298,
29918,
2311,
29892,
24003,
29922,
8824,
29897,
13,
4706,
1583,
29889,
29890,
29918,
29875,
283,
353,
302,
29876,
29889,
9329,
29898,
386,
29889,
3298,
359,
29898,
29896,
29892,
29871,
29941,
334,
298,
29918,
2311,
876,
13,
4706,
1583,
29889,
29965,
29918,
29888,
353,
302,
29876,
29889,
12697,
29898,
29906,
334,
298,
29918,
2311,
29892,
29871,
29906,
334,
298,
29918,
2311,
29897,
13,
13,
1678,
822,
2643,
29918,
9891,
29898,
1311,
29892,
12770,
1125,
13,
4706,
736,
11117,
29882,
2396,
12770,
29889,
4351,
1839,
29882,
7464,
525,
29883,
2396,
12770,
29889,
4351,
1839,
29883,
2033,
29913,
13,
13,
1678,
822,
10032,
29918,
9891,
29898,
1311,
29892,
7573,
1125,
13,
4706,
396,
16125,
403,
298,
29918,
29606,
363,
6306,
313,
29896,
511,
313,
29906,
511,
313,
29941,
511,
313,
29946,
29897,
13,
4706,
298,
29918,
4117,
353,
7573,
29889,
2549,
1884,
1839,
29882,
13359,
1493,
29898,
18010,
29889,
2549,
1884,
1839,
29882,
13359,
2311,
29898,
29900,
511,
448,
29896,
29897,
13,
4706,
396,
6306,
313,
29906,
29897,
13,
4706,
285,
353,
266,
29889,
18816,
29885,
3398,
29898,
1311,
29889,
29965,
29918,
29888,
29898,
29882,
29918,
4117,
8106,
1493,
10456,
18010,
29889,
2549,
1884,
1839,
29882,
13359,
2311,
3101,
13,
4706,
396,
1473,
1840,
310,
6306,
313,
29945,
29897,
13,
4706,
274,
353,
266,
29889,
2083,
29898,
29888,
334,
7573,
29889,
2549,
1884,
1839,
29883,
7464,
29871,
29896,
29897,
13,
4706,
736,
11117,
29875,
283,
2396,
1583,
29889,
29965,
29918,
29875,
283,
29898,
29882,
29918,
4117,
511,
525,
29883,
2396,
274,
29913,
13,
13,
1678,
822,
3394,
29918,
3177,
29918,
9891,
29898,
1311,
29892,
7573,
1125,
13,
4706,
396,
6306,
313,
29896,
511,
313,
29941,
511,
313,
29946,
29897,
13,
4706,
474,
283,
353,
7573,
29889,
1272,
1839,
29875,
283,
2033,
718,
1583,
29889,
29890,
29918,
29875,
283,
13,
4706,
474,
29892,
288,
29892,
318,
353,
266,
29889,
29812,
29898,
29875,
283,
29892,
29871,
29941,
29892,
29871,
29896,
29897,
13,
4706,
474,
29892,
288,
29892,
318,
353,
266,
29889,
18816,
29885,
3398,
29898,
29875,
511,
266,
29889,
18816,
29885,
3398,
29898,
29877,
511,
266,
29889,
13161,
29882,
29898,
29884,
29897,
13,
4706,
396,
6306,
313,
29945,
29897,
13,
4706,
274,
353,
474,
334,
318,
718,
7573,
29889,
1272,
1839,
29883,
2033,
13,
4706,
396,
6306,
313,
29953,
29897,
13,
4706,
298,
353,
288,
334,
266,
29889,
13161,
29882,
29898,
29883,
29897,
13,
4706,
736,
11117,
29882,
29915,
584,
298,
29892,
525,
29883,
29915,
584,
274,
29913,
13,
13,
1990,
6212,
2509,
29898,
15755,
29889,
7355,
1125,
13,
4706,
822,
4770,
2344,
12035,
1311,
29892,
8297,
29918,
2311,
29892,
4682,
29918,
2311,
1125,
13,
9651,
2428,
29898,
4165,
2509,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
632,
13,
9651,
1583,
29889,
17987,
29918,
2311,
353,
8297,
29918,
2311,
13,
9651,
1583,
29889,
14394,
29918,
2311,
353,
4682,
29918,
2311,
13,
632,
13,
9651,
1583,
29889,
10660,
29918,
262,
353,
302,
29876,
29889,
12697,
29898,
14394,
29918,
2311,
29892,
8297,
29918,
2311,
29892,
24003,
29922,
8824,
29897,
13,
9651,
1583,
29889,
10660,
29918,
449,
353,
302,
29876,
29889,
12697,
29898,
17987,
29918,
2311,
29974,
14394,
29918,
2311,
29892,
8297,
29918,
2311,
29897,
13,
632,
13,
4706,
822,
6375,
29898,
1311,
29892,
2665,
29892,
10153,
29892,
11105,
1125,
13,
9651,
396,
2665,
29901,
269,
1212,
663,
29918,
2435,
334,
8297,
29918,
2311,
13,
9651,
396,
10153,
29901,
954,
29918,
12803,
334,
4682,
29918,
2311,
13,
9651,
269,
1212,
663,
29918,
2435,
353,
2665,
29889,
2311,
29898,
29900,
29897,
13,
9651,
954,
29918,
12803,
353,
10153,
29889,
2311,
29898,
29900,
29897,
13,
632,
13,
9651,
396,
10153,
29918,
262,
29901,
954,
29918,
12803,
334,
8297,
29918,
2311,
13,
9651,
10153,
29918,
262,
353,
1583,
29889,
10660,
29918,
262,
29898,
2492,
29897,
13,
632,
13,
9651,
472,
841,
353,
266,
29889,
4317,
29898,
18616,
29892,
10153,
29918,
262,
29889,
3286,
4220,
29898,
29900,
29892,
29871,
29896,
876,
13,
9651,
396,
8606,
29889,
1272,
29889,
13168,
287,
29918,
5589,
29898,
13168,
29892,
448,
29896,
29872,
29953,
29897,
13,
9651,
472,
841,
353,
383,
29889,
2695,
3317,
29898,
8606,
29892,
3964,
29922,
29896,
29897,
13,
9651,
396,
472,
841,
29901,
269,
1212,
663,
29918,
2435,
334,
954,
29918,
12803,
13,
9651,
3030,
353,
266,
29889,
4317,
29898,
8606,
29892,
10153,
29897,
13,
9651,
396,
3030,
29901,
269,
1212,
663,
29918,
2435,
334,
4682,
29918,
2311,
13,
9651,
1962,
353,
266,
29889,
4117,
3552,
4703,
29892,
2665,
511,
3964,
29922,
29896,
29897,
396,
1962,
29901,
269,
1212,
663,
29918,
2435,
334,
313,
14394,
29918,
2311,
29974,
17987,
29918,
2311,
29897,
13,
9651,
1962,
353,
266,
29889,
13161,
29882,
29898,
1311,
29889,
10660,
29918,
449,
29898,
4905,
876,
13,
9651,
396,
1962,
29901,
269,
1212,
663,
29918,
2435,
334,
8297,
29918,
2311,
13,
9651,
736,
1962,
13,
13,
1990,
15472,
29931,
1254,
29924,
29898,
15755,
29889,
7355,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
954,
29918,
29894,
542,
6897,
29892,
13,
462,
921,
29918,
2311,
29892,
13,
462,
298,
29918,
2311,
29892,
13,
462,
4682,
29918,
2311,
29892,
29871,
13,
462,
954,
29918,
13203,
29892,
13,
462,
5768,
449,
29892,
13,
462,
758,
3018,
1312,
29918,
1590,
29922,
8516,
1125,
13,
4706,
2428,
29898,
9643,
29931,
1254,
29924,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
29916,
29918,
2311,
353,
921,
29918,
2311,
13,
4706,
1583,
29889,
17987,
8497,
353,
302,
29876,
29889,
6026,
2580,
8497,
29898,
1949,
29918,
29894,
542,
6897,
29892,
921,
29918,
2311,
29897,
13,
4706,
1583,
29889,
1131,
2509,
353,
6212,
2509,
29898,
29916,
29918,
2311,
29892,
4682,
29918,
2311,
29897,
13,
4706,
565,
758,
3018,
1312,
29918,
1590,
338,
451,
6213,
29901,
13,
9651,
1596,
877,
15156,
15482,
345,
1495,
13,
9651,
1583,
29889,
17987,
8497,
29889,
3166,
29918,
1457,
3018,
1312,
29898,
1457,
3018,
1312,
29918,
1590,
29897,
13,
9651,
1583,
29889,
17987,
8497,
29889,
7915,
29889,
276,
339,
2658,
29918,
5105,
353,
5852,
13,
4706,
1583,
29889,
8865,
449,
353,
302,
29876,
29889,
15063,
449,
29898,
8865,
449,
29897,
13,
4706,
1583,
29889,
10660,
353,
302,
29876,
29889,
12697,
29898,
29882,
29918,
2311,
29892,
954,
29918,
13203,
29897,
13,
4706,
1583,
29889,
3729,
353,
15472,
29931,
1254,
29924,
4617,
29898,
29916,
29918,
2311,
29892,
298,
29918,
2311,
29897,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
9853,
29892,
298,
29892,
274,
1125,
13,
4706,
9995,
20606,
29872,
5447,
29899,
20155,
29885,
18988,
2183,
263,
9853,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
9853,
584,
270,
3820,
29889,
1272,
29889,
29903,
1254,
23145,
13,
9651,
450,
848,
9853,
29889,
13,
4706,
298,
584,
323,
6073,
13,
9651,
17250,
7934,
2106,
29889,
13,
4706,
274,
584,
323,
6073,
13,
9651,
17250,
3038,
2106,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
1480,
1169,
584,
323,
6073,
13,
9651,
450,
18988,
310,
1269,
2943,
29889,
13,
4706,
9995,
13,
4706,
330,
353,
9853,
29889,
4262,
13,
4706,
396,
304,
25745,
6352,
681,
3983,
13,
4706,
330,
353,
270,
3820,
29889,
4262,
29898,
29887,
29889,
287,
2710,
3101,
13,
4706,
396,
8343,
23655,
13,
4706,
8297,
29879,
353,
1583,
29889,
17987,
8497,
29898,
16175,
29889,
1742,
333,
334,
9853,
29889,
13168,
29897,
13,
4706,
1098,
29876,
29918,
13168,
353,
9853,
29889,
13168,
29889,
18837,
29898,
16175,
29889,
3027,
29889,
12181,
29961,
29900,
1402,
9853,
29889,
1742,
333,
29889,
12181,
29961,
29900,
14664,
29911,
13,
4706,
1098,
29876,
29918,
1590,
5779,
353,
1583,
29889,
1131,
2509,
29898,
1590,
5779,
29892,
9853,
29889,
3027,
29892,
1098,
29876,
29918,
13168,
29897,
13,
4706,
330,
29889,
299,
532,
1839,
29875,
283,
2033,
353,
1583,
29889,
3729,
29889,
29956,
29918,
29875,
283,
29898,
1311,
29889,
8865,
449,
29898,
1131,
29876,
29918,
1590,
5779,
876,
334,
9853,
29889,
13168,
29889,
7411,
2141,
6948,
802,
29872,
911,
6278,
29896,
29897,
13,
4706,
330,
29889,
299,
532,
1839,
29882,
2033,
353,
298,
13,
4706,
330,
29889,
299,
532,
1839,
29883,
2033,
353,
274,
13,
4706,
396,
13089,
403,
13,
4706,
270,
3820,
29889,
7728,
29918,
18010,
29918,
3332,
29877,
29898,
29887,
29892,
13,
462,
9651,
2643,
29918,
9891,
29922,
1311,
29889,
3729,
29889,
4906,
29918,
9891,
29892,
13,
462,
9651,
10032,
29918,
9891,
29922,
1311,
29889,
3729,
29889,
17469,
29918,
9891,
29892,
13,
462,
9651,
3394,
29918,
3177,
29918,
9891,
29922,
1311,
29889,
3729,
29889,
7302,
29918,
3177,
29918,
9891,
29897,
13,
4706,
396,
10272,
1480,
1169,
13,
4706,
298,
353,
1583,
29889,
8865,
449,
29898,
29887,
29889,
299,
532,
29889,
7323,
877,
29882,
8785,
13,
4706,
1480,
1169,
353,
1583,
29889,
10660,
29898,
29882,
29897,
13,
4706,
736,
1480,
1169,
13,
2
] |
RepositoryStatusMonitor/repository_status_monitor_stack.py | awslabs/aws-repository-status-monitor | 8 | 156628 | <gh_stars>1-10
from sys import stderr
from aws_cdk import (
aws_apigateway as apigw,
aws_events as events,
aws_events_targets as targets,
aws_iam as iam,
aws_lambda as _lambda,
aws_lambda_event_sources as lambda_event_source,
aws_sqs as sqs,
core
)
from lambda_dir import http_handler as hh
class RepositoryStatusMonitorStack(core.Stack):
"""
A class used to represent an AWS CloudFormation stack.
...
Methods
-------
create_role_and_policy()
Creates an AWS IAM role, attaches a custom policy to it, and returns the role
create_event_with_permissions(lambda_function: _lambda.Function)
Creates an AWS EventBridge rule and attaches the AWS Lambda function parameter as a target
handle_parameters()
Retrieves all context variables, checks for valid input, performs all necessary processing, and returns a dictionary of the processed variables
validate_repo_names(repo_names: str)
Retrieves the list of GitHub repositories to which the user has access and validates that all repositories specified for the dashboard exist in that list
"""
def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
"""Initializes the stack
:param scope: parent of this stack, scope within which resources defined here are accessible
:type file_loc: Optional[aws_cdk.core.Construct]
:param id: the id of the stack
:type id: Optional[str]
:param **kwargs: additional optional arguments
``description``:
a description of the stack (`Optional[str]`).
``env``
AWS environment (account/region) where this stack will be deployed (`Optional[aws_cdk.core.Environment]`).
``stack_name``
name with which to deploy the stack (`Optional[str]`).
``synthesizer``
synthesis method to use while deploying this stack (`Optional[aws_cdk.core.IStackSynthesizer]`).
``tags``
stack tags that will be applied to all taggable resources as well as the stack (`Optional[Mapping[str, str]]`).
``termination_protection``
whether to enable termination protection for this stack (`Optional[bool]`).
"""
super().__init__(scope, id, **kwargs)
metric_handler_dict, webhook_creator_dict = self.handle_parameters()
# timeout used for lambda and sqs, in seconds
lambda_timeout = 300
if self.node.try_get_context('lambda_timeout'):
lambda_timeout = int(self.node.try_get_context('lambda_timeout'))
dead_letter_queue = sqs.Queue(
self, 'DeadLetterQueue',
queue_name='DeadLetterQueue'
)
webhook_queue = sqs.Queue(
self, 'WebhookQueue',
queue_name='WebhookQueue',
visibility_timeout=core.Duration.seconds(lambda_timeout),
dead_letter_queue=sqs.DeadLetterQueue(
max_receive_count=3,
queue=dead_letter_queue)
)
metric_handler_dict['queue_url'] = webhook_queue.queue_url
metric_handler_management_role = self.create_lambda_role_and_policy(
'MetricHandlerManagementRole',
[
'cloudwatch:GetDashboard',
'cloudwatch:GetMetricData',
'cloudwatch:ListDashboards',
'cloudwatch:PutDashboard',
'cloudwatch:PutMetricData',
'logs:CreateLogGroup',
'logs:CreateLogStream',
'logs:PutLogEvents',
'secretsmanager:GetSecretValue'
]
)
metric_handler_timeout = lambda_timeout
metric_handler_function = _lambda.Function(
self, 'MetricsHandler',
function_name='MetricsHandler',
runtime=_lambda.Runtime.PYTHON_3_7,
code=_lambda.Code.asset('lambda_dir'),
handler='cloudwatch_dashboard_handler.handler',
role=metric_handler_management_role,
environment=metric_handler_dict,
timeout=core.Duration.seconds(metric_handler_timeout)
)
self.create_event_with_permissions(metric_handler_function)
# Connect SQS to Lambda
sqs_event_source = lambda_event_source.SqsEventSource(webhook_queue)
metric_handler_function.add_event_source(sqs_event_source)
apigw_webhook_url = self.create_and_integrate_apigw(webhook_queue, metric_handler_dict['dashboard_name_prefix'])
webhook_creator_dict['apigw_endpoint'] = apigw_webhook_url
webhook_role = self.create_lambda_role_and_policy('WebhookCreatorRole', ['secretsmanager:GetSecretValue'])
_lambda.Function(
self, 'WebhookCreator',
function_name='WebhookCreator',
runtime=_lambda.Runtime.PYTHON_3_7,
code=_lambda.Code.asset('lambda_dir'),
handler='webhook_creator.handler',
role=webhook_role,
environment=webhook_creator_dict,
timeout=core.Duration.seconds(5)
)
def create_lambda_role_and_policy(self, name: str, actions: list) -> iam.Role:
"""Creates an AWS IAM role, attaches a managed and a custom policy to it, and returns the role
:param name: the name and ID of the role
:type name: str
:param actions: the actions that the Lambda role can execute
:type actions: list
:returns: a role with a custom and a managed policy attached
:rtype: aws_cdk.aws_iam.Role
"""
role = iam.Role(self, name,
role_name=name,
assumed_by=iam.ServicePrincipal(
'lambda.amazonaws.com'),
managed_policies=[iam.ManagedPolicy.from_aws_managed_policy_name(
'service-role/AWSLambdaBasicExecutionRole')]
)
role.add_to_policy(iam.PolicyStatement(
resources=['*'],
actions=actions
))
return role
def create_event_with_permissions(self, lambda_function: _lambda.Function) -> None:
"""Creates an AWS EventBridge rule and attaches the AWS Lambda function parameter as a target
:param lambda_function: the AWS Lambda function for which to create the rule
:type lambda_function: aws_cdk.aws_lambda.Function
"""
hourly_metric_retrieval_rule = events.Rule(
self, 'Rule',
rule_name='HourlyMetricRetrieval',
enabled=True,
schedule=events.Schedule.expression('rate(1 hour)')
)
hourly_metric_retrieval_rule.add_target(targets.LambdaFunction(lambda_function))
def handle_parameters(self) -> tuple:
"""Retrieves all context variables, checks for valid input, performs all necessary processing, and returns a dictionary of the processed variables
:returns: a tuple containing two dictionaries, each containing all the processed context variables for each Lambda function
:rtype: tuple
"""
repo_names_unvalidated = self.node.try_get_context('repo_names')
docker_bool = self.node.try_get_context('get_docker')
dashboard_name_prefix = self.node.try_get_context('dashboard_name_prefix')
owner = self.node.try_get_context('owner')
github_fields_paginated = self.node.try_get_context('github_fields_paginated') if self.node.try_get_context(
'github_fields_paginated') is not None else ""
github_fields_unpaginated = self.node.try_get_context('github_fields_unpaginated') if self.node.try_get_context(
'github_fields_unpaginated') is not None else ""
docker_fields = self.node.try_get_context('docker_fields') if self.node.try_get_context(
'docker_fields') is not None else ""
namespace = self.node.try_get_context('namespace')
user_agent_header = self.node.try_get_context('user_agent_header')
widgets = self.node.try_get_context('widgets') if self.node.try_get_context('widgets') is not None else ""
default_metric_widget_name = self.node.try_get_context('default_metric_widget_name')
default_text_widget_name = self.node.try_get_context('default_text_widget_name')
if not self.node.try_get_context('github_token'):
raise ValueError('Need to specify GitHub token.')
if not repo_names_unvalidated:
raise ValueError('Need to specify repository names.')
if not dashboard_name_prefix:
raise ValueError('Need to specify prefix for dashboard names.')
if not docker_bool:
raise ValueError('Need to specify whether to include docker metrics.')
if owner is None:
raise ValueError('Need to specify GitHub owner.')
if not namespace:
raise ValueError('Need to specify namespace for CloudWatch metrics.')
if not user_agent_header:
raise ValueError('Need to specify User-Agent header for GitHub requests.')
if not default_metric_widget_name:
raise ValueError('Need to specify default metric widget name.')
if not default_text_widget_name:
raise ValueError('Need to specify default text widget name.')
repo_names = self.validate_repo_names(repo_names_unvalidated, owner, user_agent_header)
metric_handler_dict = {
'repo_names': repo_names,
'docker_bool': docker_bool,
'dashboard_name_prefix': dashboard_name_prefix,
'github_fields_unpaginated': github_fields_unpaginated,
'github_fields_paginated': github_fields_paginated,
'docker_fields': docker_fields,
'owner': owner,
'namespace': namespace,
'user_agent_header': user_agent_header,
'widgets': widgets,
'default_metric_widget_name': default_metric_widget_name,
'default_text_widget_name': default_text_widget_name
}
webhook_creator_dict = {
'repo_names': repo_names,
'owner': owner,
'user_agent_header': user_agent_header
}
return metric_handler_dict, webhook_creator_dict
def validate_repo_names(self, repo_names: str, owner: str, user_agent_header: str) -> str:
"""Retrieves the list of GitHub repositories to which the user has access and validates that all repositories specified for the dashboard exist in that list
:param repo_names: the repository names passed in as context variables
:type repo_names: str
:param owner: the GitHub owner of the repositories
:type owner: str
:param user_agent_header: the User-Agent header for GitHub requests
:type user_agent_header: str
:returns: the repository names that exist for the user in GitHub
:rtype: str
"""
headers = {'Authorization': 'token ' + self.node.try_get_context('github_token'),
'Accept': 'application/vnd.github.nebula-preview+json',
'User-Agent': user_agent_header}
url = 'https://api.github.com/user/repos'
success, data, response_headers = hh.request_handler(url, headers=headers)
if not success:
raise RuntimeError(data['message'])
existing_repos = set()
for repo in data:
existing_repos.add(repo['full_name'])
valid_names = []
invalid_names = []
for repo_name in repo_names.split(','):
if '/' not in repo_name:
repo_name = owner + '/' + repo_name
if repo_name not in existing_repos:
invalid_names.append(repo_name)
else:
valid_names.append(repo_name)
if len(invalid_names) > 0:
invalid_repos = ', '.join(invalid_names)
valid_repos = "none" if not valid_names else ', '.join(valid_names)
print('Invalid repositories: ' + invalid_repos, file=stderr)
print('Valid repositories: ' + valid_repos, file=stderr)
raise RuntimeError("All repository names must be valid.")
return ','.join(valid_names)
def create_and_integrate_apigw(self, queue: sqs.Queue, dashboard_name_prefix: str) -> str:
"""Creates API Gateway and integrates with SQS queue
:param queue: the SQS queue to integrate with
:type queue: aws_cdk.aws_sqs.Queue
:param dashboard_name_prefix: the dashboard name to use as the API Gateway resource name
:type dashboard_name_prefix: str
:returns: the url that the webhooks will post to
:rtype: str
"""
webhook_apigw_role = iam.Role(
self,
'WebhookAPIRole',
role_name='WebhookAPIRole',
assumed_by=iam.ServicePrincipal('apigateway.amazonaws.com')
)
webhook_apigw_role.add_to_policy(iam.PolicyStatement(
resources=['*'],
actions=[
'sqs:SendMessage'
]
))
webhook_apigw = apigw.RestApi(self, 'RepositoryStatusMonitorAPI', rest_api_name='RepositoryStatusMonitorAPI')
webhook_apigw_resource = webhook_apigw.root.add_resource(dashboard_name_prefix)
apigw_integration_response = apigw.IntegrationResponse(
status_code='200',
response_templates={'application/json': ""}
)
apigw_integration_options = apigw.IntegrationOptions(
credentials_role=webhook_apigw_role,
integration_responses=[apigw_integration_response],
request_templates={'application/json': 'Action=SendMessage&MessageBody=$input.body'},
passthrough_behavior=apigw.PassthroughBehavior.NEVER,
request_parameters={'integration.request.header.Content-Type': "'application/x-www-form-urlencoded'"}
)
webhook_apigw_resource_sqs_integration = apigw.AwsIntegration(
service='sqs',
integration_http_method='POST',
path='{}/{}'.format(core.Aws.ACCOUNT_ID, queue.queue_name),
options=apigw_integration_options
)
webhook_apigw_resource.add_method(
'POST',
webhook_apigw_resource_sqs_integration,
method_responses=[apigw.MethodResponse(status_code='200')]
)
path = '/' + dashboard_name_prefix
return webhook_apigw.url_for_path(path)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
10876,
1053,
380,
20405,
13,
13,
3166,
25879,
29918,
2252,
29895,
1053,
313,
13,
1678,
25879,
29918,
481,
335,
403,
1582,
408,
3095,
335,
29893,
29892,
13,
1678,
25879,
29918,
13604,
408,
4959,
29892,
13,
1678,
25879,
29918,
13604,
29918,
5182,
29879,
408,
22525,
29892,
13,
1678,
25879,
29918,
2829,
408,
474,
314,
29892,
13,
1678,
25879,
29918,
2892,
408,
903,
2892,
29892,
13,
1678,
25879,
29918,
2892,
29918,
3696,
29918,
29879,
2863,
408,
14013,
29918,
3696,
29918,
4993,
29892,
13,
1678,
25879,
29918,
3044,
29879,
408,
18074,
29879,
29892,
13,
1678,
7136,
13,
29897,
13,
13,
3166,
14013,
29918,
3972,
1053,
1732,
29918,
13789,
408,
298,
29882,
13,
13,
13,
1990,
830,
7036,
5709,
7185,
2105,
7264,
29898,
3221,
29889,
7264,
1125,
13,
1678,
9995,
13,
1678,
319,
770,
1304,
304,
2755,
385,
15540,
14293,
2500,
362,
5096,
29889,
13,
1678,
2023,
13,
13,
1678,
8108,
29879,
13,
1678,
448,
22158,
13,
1678,
1653,
29918,
12154,
29918,
392,
29918,
22197,
580,
13,
4706,
6760,
1078,
385,
15540,
306,
5194,
6297,
29892,
10641,
267,
263,
2888,
8898,
304,
372,
29892,
322,
3639,
278,
6297,
13,
1678,
1653,
29918,
3696,
29918,
2541,
29918,
17858,
6847,
29898,
2892,
29918,
2220,
29901,
903,
2892,
29889,
6678,
29897,
13,
4706,
6760,
1078,
385,
15540,
6864,
29933,
8605,
5751,
322,
10641,
267,
278,
15540,
365,
2269,
740,
3443,
408,
263,
3646,
13,
1678,
4386,
29918,
16744,
580,
13,
4706,
19338,
1960,
599,
3030,
3651,
29892,
12747,
363,
2854,
1881,
29892,
23233,
599,
5181,
9068,
29892,
322,
3639,
263,
8600,
310,
278,
19356,
3651,
13,
1678,
12725,
29918,
20095,
29918,
7039,
29898,
20095,
29918,
7039,
29901,
851,
29897,
13,
4706,
19338,
1960,
278,
1051,
310,
25492,
28914,
304,
607,
278,
1404,
756,
2130,
322,
2854,
1078,
393,
599,
28914,
6790,
363,
278,
12569,
3377,
1863,
297,
393,
1051,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
6874,
29901,
7136,
29889,
1168,
4984,
29892,
1178,
29901,
851,
29892,
3579,
19290,
29897,
1599,
6213,
29901,
13,
4706,
9995,
15514,
7093,
278,
5096,
13,
13,
4706,
584,
3207,
6874,
29901,
3847,
310,
445,
5096,
29892,
6874,
2629,
607,
7788,
3342,
1244,
526,
15579,
13,
4706,
584,
1853,
934,
29918,
2029,
29901,
28379,
29961,
10467,
29918,
2252,
29895,
29889,
3221,
29889,
1168,
4984,
29962,
13,
4706,
584,
3207,
1178,
29901,
278,
1178,
310,
278,
5096,
13,
4706,
584,
1853,
1178,
29901,
28379,
29961,
710,
29962,
13,
4706,
584,
3207,
3579,
19290,
29901,
5684,
13136,
6273,
13,
9651,
4954,
8216,
29952,
6998,
13,
18884,
263,
6139,
310,
278,
5096,
6695,
27636,
29961,
710,
7961,
467,
13,
9651,
4954,
6272,
16159,
13,
18884,
15540,
5177,
313,
10149,
29914,
12803,
29897,
988,
445,
5096,
674,
367,
21168,
6695,
27636,
29961,
10467,
29918,
2252,
29895,
29889,
3221,
29889,
18649,
7961,
467,
13,
9651,
4954,
1429,
29918,
978,
16159,
13,
18884,
1024,
411,
607,
304,
7246,
278,
5096,
6695,
27636,
29961,
710,
7961,
467,
13,
9651,
4954,
19274,
26041,
3950,
16159,
13,
18884,
14710,
6656,
1158,
304,
671,
1550,
7246,
292,
445,
5096,
6695,
27636,
29961,
10467,
29918,
2252,
29895,
29889,
3221,
29889,
29902,
7264,
29216,
26041,
3950,
7961,
467,
13,
9651,
4954,
11338,
16159,
13,
18884,
5096,
8282,
393,
674,
367,
7436,
304,
599,
4055,
29531,
7788,
408,
1532,
408,
278,
5096,
6695,
27636,
29961,
15845,
29961,
710,
29892,
851,
5262,
12913,
13,
9651,
4954,
18821,
362,
29918,
14676,
428,
16159,
13,
18884,
3692,
304,
9025,
1840,
3381,
13047,
363,
445,
5096,
6695,
27636,
29961,
11227,
7961,
467,
13,
4706,
9995,
13,
4706,
2428,
2141,
1649,
2344,
12035,
6078,
29892,
1178,
29892,
3579,
19290,
29897,
13,
4706,
12714,
29918,
13789,
29918,
8977,
29892,
1856,
20849,
29918,
1037,
1061,
29918,
8977,
353,
1583,
29889,
8411,
29918,
16744,
580,
13,
4706,
396,
11815,
1304,
363,
14013,
322,
18074,
29879,
29892,
297,
6923,
13,
4706,
14013,
29918,
15619,
353,
29871,
29941,
29900,
29900,
13,
4706,
565,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
2892,
29918,
15619,
29374,
13,
9651,
14013,
29918,
15619,
353,
938,
29898,
1311,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
2892,
29918,
15619,
8785,
13,
13,
4706,
7123,
29918,
15670,
29918,
9990,
353,
18074,
29879,
29889,
10620,
29898,
13,
9651,
1583,
29892,
525,
29928,
1479,
12024,
357,
10620,
742,
13,
9651,
9521,
29918,
978,
2433,
29928,
1479,
12024,
357,
10620,
29915,
13,
4706,
1723,
13,
4706,
1856,
20849,
29918,
9990,
353,
18074,
29879,
29889,
10620,
29898,
13,
9651,
1583,
29892,
525,
3609,
20849,
10620,
742,
13,
9651,
9521,
29918,
978,
2433,
3609,
20849,
10620,
742,
13,
9651,
26401,
29918,
15619,
29922,
3221,
29889,
18984,
29889,
23128,
29898,
2892,
29918,
15619,
511,
13,
9651,
7123,
29918,
15670,
29918,
9990,
29922,
3044,
29879,
29889,
29928,
1479,
12024,
357,
10620,
29898,
13,
18884,
4236,
29918,
13556,
573,
29918,
2798,
29922,
29941,
29892,
13,
18884,
9521,
29922,
311,
328,
29918,
15670,
29918,
9990,
29897,
13,
4706,
1723,
13,
4706,
12714,
29918,
13789,
29918,
8977,
1839,
9990,
29918,
2271,
2033,
353,
1856,
20849,
29918,
9990,
29889,
9990,
29918,
2271,
13,
13,
4706,
12714,
29918,
13789,
29918,
21895,
29918,
12154,
353,
1583,
29889,
3258,
29918,
2892,
29918,
12154,
29918,
392,
29918,
22197,
29898,
13,
9651,
525,
10095,
2200,
4598,
27107,
16727,
742,
13,
9651,
518,
13,
18884,
525,
9274,
12344,
29901,
2577,
29928,
1161,
3377,
742,
13,
18884,
525,
9274,
12344,
29901,
2577,
10095,
2200,
1469,
742,
13,
18884,
525,
9274,
12344,
29901,
1293,
29928,
1161,
24691,
742,
13,
18884,
525,
9274,
12344,
29901,
22908,
29928,
1161,
3377,
742,
13,
18884,
525,
9274,
12344,
29901,
22908,
10095,
2200,
1469,
742,
13,
18884,
525,
20756,
29901,
4391,
3403,
4782,
742,
13,
18884,
525,
20756,
29901,
4391,
3403,
3835,
742,
13,
18884,
525,
20756,
29901,
22908,
3403,
13634,
742,
13,
18884,
525,
344,
1037,
1372,
12847,
29901,
2577,
28459,
1917,
29915,
13,
9651,
4514,
13,
4706,
1723,
13,
4706,
12714,
29918,
13789,
29918,
15619,
353,
14013,
29918,
15619,
13,
4706,
12714,
29918,
13789,
29918,
2220,
353,
903,
2892,
29889,
6678,
29898,
13,
9651,
1583,
29892,
525,
10095,
10817,
4598,
742,
13,
9651,
740,
29918,
978,
2433,
10095,
10817,
4598,
742,
13,
9651,
10073,
29922,
29918,
2892,
29889,
7944,
29889,
20055,
4690,
1164,
29918,
29941,
29918,
29955,
29892,
13,
9651,
775,
29922,
29918,
2892,
29889,
3399,
29889,
24129,
877,
2892,
29918,
3972,
5477,
13,
9651,
7834,
2433,
9274,
12344,
29918,
14592,
3377,
29918,
13789,
29889,
13789,
742,
13,
9651,
6297,
29922,
16414,
29918,
13789,
29918,
21895,
29918,
12154,
29892,
13,
9651,
5177,
29922,
16414,
29918,
13789,
29918,
8977,
29892,
13,
9651,
11815,
29922,
3221,
29889,
18984,
29889,
23128,
29898,
16414,
29918,
13789,
29918,
15619,
29897,
13,
4706,
1723,
13,
4706,
1583,
29889,
3258,
29918,
3696,
29918,
2541,
29918,
17858,
6847,
29898,
16414,
29918,
13789,
29918,
2220,
29897,
13,
13,
4706,
396,
14971,
317,
29984,
29903,
304,
365,
2269,
13,
4706,
18074,
29879,
29918,
3696,
29918,
4993,
353,
14013,
29918,
3696,
29918,
4993,
29889,
29903,
29939,
29879,
2624,
4435,
29898,
2676,
20849,
29918,
9990,
29897,
13,
4706,
12714,
29918,
13789,
29918,
2220,
29889,
1202,
29918,
3696,
29918,
4993,
29898,
3044,
29879,
29918,
3696,
29918,
4993,
29897,
13,
13,
4706,
3095,
335,
29893,
29918,
2676,
20849,
29918,
2271,
353,
1583,
29889,
3258,
29918,
392,
29918,
14146,
403,
29918,
481,
335,
29893,
29898,
2676,
20849,
29918,
9990,
29892,
12714,
29918,
13789,
29918,
8977,
1839,
14592,
3377,
29918,
978,
29918,
13506,
11287,
13,
4706,
1856,
20849,
29918,
1037,
1061,
29918,
8977,
1839,
481,
335,
29893,
29918,
29734,
2033,
353,
3095,
335,
29893,
29918,
2676,
20849,
29918,
2271,
13,
13,
4706,
1856,
20849,
29918,
12154,
353,
1583,
29889,
3258,
29918,
2892,
29918,
12154,
29918,
392,
29918,
22197,
877,
3609,
20849,
9832,
1061,
16727,
742,
6024,
344,
1037,
1372,
12847,
29901,
2577,
28459,
1917,
11287,
13,
4706,
903,
2892,
29889,
6678,
29898,
13,
9651,
1583,
29892,
525,
3609,
20849,
9832,
1061,
742,
13,
9651,
740,
29918,
978,
2433,
3609,
20849,
9832,
1061,
742,
13,
9651,
10073,
29922,
29918,
2892,
29889,
7944,
29889,
20055,
4690,
1164,
29918,
29941,
29918,
29955,
29892,
13,
9651,
775,
29922,
29918,
2892,
29889,
3399,
29889,
24129,
877,
2892,
29918,
3972,
5477,
13,
9651,
7834,
2433,
2676,
20849,
29918,
1037,
1061,
29889,
13789,
742,
13,
9651,
6297,
29922,
2676,
20849,
29918,
12154,
29892,
13,
9651,
5177,
29922,
2676,
20849,
29918,
1037,
1061,
29918,
8977,
29892,
13,
9651,
11815,
29922,
3221,
29889,
18984,
29889,
23128,
29898,
29945,
29897,
13,
4706,
1723,
13,
13,
1678,
822,
1653,
29918,
2892,
29918,
12154,
29918,
392,
29918,
22197,
29898,
1311,
29892,
1024,
29901,
851,
29892,
8820,
29901,
1051,
29897,
1599,
474,
314,
29889,
16727,
29901,
13,
4706,
9995,
9832,
1078,
385,
15540,
306,
5194,
6297,
29892,
10641,
267,
263,
8745,
322,
263,
2888,
8898,
304,
372,
29892,
322,
3639,
278,
6297,
29871,
13,
13,
4706,
584,
3207,
1024,
29901,
278,
1024,
322,
3553,
310,
278,
6297,
13,
4706,
584,
1853,
1024,
29901,
851,
13,
4706,
584,
3207,
8820,
29901,
278,
8820,
393,
278,
365,
2269,
6297,
508,
6222,
13,
4706,
584,
1853,
8820,
29901,
1051,
13,
4706,
584,
18280,
29901,
263,
6297,
411,
263,
2888,
322,
263,
8745,
8898,
10959,
13,
4706,
584,
29878,
1853,
29901,
25879,
29918,
2252,
29895,
29889,
10467,
29918,
2829,
29889,
16727,
13,
4706,
9995,
13,
4706,
6297,
353,
474,
314,
29889,
16727,
29898,
1311,
29892,
1024,
29892,
13,
462,
4706,
6297,
29918,
978,
29922,
978,
29892,
13,
462,
4706,
12023,
29918,
1609,
29922,
2829,
29889,
3170,
4040,
26706,
29898,
13,
462,
9651,
525,
2892,
29889,
17260,
10467,
29889,
510,
5477,
13,
462,
4706,
8745,
29918,
3733,
293,
583,
11759,
2829,
29889,
26542,
15644,
29889,
3166,
29918,
10467,
29918,
25240,
29918,
22197,
29918,
978,
29898,
13,
462,
9651,
525,
5509,
29899,
12154,
29914,
29909,
7811,
9099,
16616,
20418,
16727,
1495,
29962,
13,
462,
4706,
1723,
13,
13,
4706,
6297,
29889,
1202,
29918,
517,
29918,
22197,
29898,
2829,
29889,
15644,
14473,
29898,
13,
9651,
7788,
29922,
1839,
29930,
7464,
13,
9651,
8820,
29922,
7387,
13,
308,
876,
13,
4706,
736,
6297,
13,
13,
1678,
822,
1653,
29918,
3696,
29918,
2541,
29918,
17858,
6847,
29898,
1311,
29892,
14013,
29918,
2220,
29901,
903,
2892,
29889,
6678,
29897,
1599,
6213,
29901,
13,
4706,
9995,
9832,
1078,
385,
15540,
6864,
29933,
8605,
5751,
322,
10641,
267,
278,
15540,
365,
2269,
740,
3443,
408,
263,
3646,
13,
13,
4706,
584,
3207,
14013,
29918,
2220,
29901,
278,
15540,
365,
2269,
740,
363,
607,
304,
1653,
278,
5751,
13,
4706,
584,
1853,
14013,
29918,
2220,
29901,
25879,
29918,
2252,
29895,
29889,
10467,
29918,
2892,
29889,
6678,
13,
4706,
9995,
13,
4706,
7234,
368,
29918,
16414,
29918,
276,
509,
16837,
29918,
7491,
353,
4959,
29889,
10740,
29898,
13,
9651,
1583,
29892,
525,
10740,
742,
13,
9651,
5751,
29918,
978,
2433,
29950,
473,
368,
10095,
2200,
8015,
2546,
791,
742,
13,
9651,
9615,
29922,
5574,
29892,
13,
9651,
20410,
29922,
13604,
29889,
4504,
11272,
29889,
17471,
877,
10492,
29898,
29896,
7234,
29897,
1495,
13,
4706,
1723,
13,
4706,
7234,
368,
29918,
16414,
29918,
276,
509,
16837,
29918,
7491,
29889,
1202,
29918,
5182,
29898,
5182,
29879,
29889,
9099,
6678,
29898,
2892,
29918,
2220,
876,
13,
13,
1678,
822,
4386,
29918,
16744,
29898,
1311,
29897,
1599,
18761,
29901,
13,
4706,
9995,
8015,
2546,
1960,
599,
3030,
3651,
29892,
12747,
363,
2854,
1881,
29892,
23233,
599,
5181,
9068,
29892,
322,
3639,
263,
8600,
310,
278,
19356,
3651,
13,
13,
4706,
584,
18280,
29901,
263,
18761,
6943,
1023,
21503,
4314,
29892,
1269,
6943,
599,
278,
19356,
3030,
3651,
363,
1269,
365,
2269,
740,
13,
4706,
584,
29878,
1853,
29901,
18761,
13,
4706,
9995,
13,
4706,
13761,
29918,
7039,
29918,
348,
3084,
630,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
20095,
29918,
7039,
1495,
13,
4706,
10346,
29918,
11227,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
657,
29918,
14695,
1495,
13,
4706,
12569,
3377,
29918,
978,
29918,
13506,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
14592,
3377,
29918,
978,
29918,
13506,
1495,
13,
4706,
12271,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
20348,
1495,
13,
4706,
18546,
29918,
9621,
29918,
13573,
262,
630,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
3292,
29918,
9621,
29918,
13573,
262,
630,
1495,
565,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
29898,
13,
9651,
525,
3292,
29918,
9621,
29918,
13573,
262,
630,
1495,
338,
451,
6213,
1683,
5124,
13,
4706,
18546,
29918,
9621,
29918,
348,
13573,
262,
630,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
3292,
29918,
9621,
29918,
348,
13573,
262,
630,
1495,
565,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
29898,
13,
9651,
525,
3292,
29918,
9621,
29918,
348,
13573,
262,
630,
1495,
338,
451,
6213,
1683,
5124,
13,
4706,
10346,
29918,
9621,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
14695,
29918,
9621,
1495,
565,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
29898,
13,
9651,
525,
14695,
29918,
9621,
1495,
338,
451,
6213,
1683,
5124,
13,
4706,
7397,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
22377,
1495,
13,
4706,
1404,
29918,
14748,
29918,
6672,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
1792,
29918,
14748,
29918,
6672,
1495,
13,
4706,
11109,
29879,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
8030,
29879,
1495,
565,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
8030,
29879,
1495,
338,
451,
6213,
1683,
5124,
13,
4706,
2322,
29918,
16414,
29918,
8030,
29918,
978,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
4381,
29918,
16414,
29918,
8030,
29918,
978,
1495,
13,
4706,
2322,
29918,
726,
29918,
8030,
29918,
978,
353,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
4381,
29918,
726,
29918,
8030,
29918,
978,
1495,
13,
13,
4706,
565,
451,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
3292,
29918,
6979,
29374,
13,
9651,
12020,
7865,
2392,
877,
8139,
287,
304,
6084,
25492,
5993,
29889,
1495,
13,
4706,
565,
451,
13761,
29918,
7039,
29918,
348,
3084,
630,
29901,
13,
9651,
12020,
7865,
2392,
877,
8139,
287,
304,
6084,
9810,
2983,
29889,
1495,
13,
4706,
565,
451,
12569,
3377,
29918,
978,
29918,
13506,
29901,
13,
9651,
12020,
7865,
2392,
877,
8139,
287,
304,
6084,
10944,
363,
12569,
3377,
2983,
29889,
1495,
13,
4706,
565,
451,
10346,
29918,
11227,
29901,
13,
9651,
12020,
7865,
2392,
877,
8139,
287,
304,
6084,
3692,
304,
3160,
10346,
21556,
29889,
1495,
13,
4706,
565,
12271,
338,
6213,
29901,
13,
9651,
12020,
7865,
2392,
877,
8139,
287,
304,
6084,
25492,
12271,
29889,
1495,
13,
4706,
565,
451,
7397,
29901,
13,
9651,
12020,
7865,
2392,
877,
8139,
287,
304,
6084,
7397,
363,
14293,
24709,
21556,
29889,
1495,
13,
4706,
565,
451,
1404,
29918,
14748,
29918,
6672,
29901,
13,
9651,
12020,
7865,
2392,
877,
8139,
287,
304,
6084,
4911,
29899,
19661,
4839,
363,
25492,
7274,
29889,
1495,
13,
4706,
565,
451,
2322,
29918,
16414,
29918,
8030,
29918,
978,
29901,
13,
9651,
12020,
7865,
2392,
877,
8139,
287,
304,
6084,
2322,
12714,
11109,
1024,
29889,
1495,
13,
4706,
565,
451,
2322,
29918,
726,
29918,
8030,
29918,
978,
29901,
13,
9651,
12020,
7865,
2392,
877,
8139,
287,
304,
6084,
2322,
1426,
11109,
1024,
29889,
1495,
13,
13,
4706,
13761,
29918,
7039,
353,
1583,
29889,
15480,
29918,
20095,
29918,
7039,
29898,
20095,
29918,
7039,
29918,
348,
3084,
630,
29892,
12271,
29892,
1404,
29918,
14748,
29918,
6672,
29897,
13,
13,
4706,
12714,
29918,
13789,
29918,
8977,
353,
426,
13,
9651,
525,
20095,
29918,
7039,
2396,
13761,
29918,
7039,
29892,
13,
9651,
525,
14695,
29918,
11227,
2396,
10346,
29918,
11227,
29892,
13,
9651,
525,
14592,
3377,
29918,
978,
29918,
13506,
2396,
12569,
3377,
29918,
978,
29918,
13506,
29892,
13,
9651,
525,
3292,
29918,
9621,
29918,
348,
13573,
262,
630,
2396,
18546,
29918,
9621,
29918,
348,
13573,
262,
630,
29892,
13,
9651,
525,
3292,
29918,
9621,
29918,
13573,
262,
630,
2396,
18546,
29918,
9621,
29918,
13573,
262,
630,
29892,
13,
9651,
525,
14695,
29918,
9621,
2396,
10346,
29918,
9621,
29892,
13,
9651,
525,
20348,
2396,
12271,
29892,
13,
9651,
525,
22377,
2396,
7397,
29892,
13,
9651,
525,
1792,
29918,
14748,
29918,
6672,
2396,
1404,
29918,
14748,
29918,
6672,
29892,
13,
9651,
525,
8030,
29879,
2396,
11109,
29879,
29892,
13,
9651,
525,
4381,
29918,
16414,
29918,
8030,
29918,
978,
2396,
2322,
29918,
16414,
29918,
8030,
29918,
978,
29892,
13,
9651,
525,
4381,
29918,
726,
29918,
8030,
29918,
978,
2396,
2322,
29918,
726,
29918,
8030,
29918,
978,
13,
4706,
500,
13,
13,
4706,
1856,
20849,
29918,
1037,
1061,
29918,
8977,
353,
426,
13,
9651,
525,
20095,
29918,
7039,
2396,
13761,
29918,
7039,
29892,
13,
9651,
525,
20348,
2396,
12271,
29892,
13,
9651,
525,
1792,
29918,
14748,
29918,
6672,
2396,
1404,
29918,
14748,
29918,
6672,
13,
4706,
500,
13,
13,
4706,
736,
12714,
29918,
13789,
29918,
8977,
29892,
1856,
20849,
29918,
1037,
1061,
29918,
8977,
13,
13,
1678,
822,
12725,
29918,
20095,
29918,
7039,
29898,
1311,
29892,
13761,
29918,
7039,
29901,
851,
29892,
12271,
29901,
851,
29892,
1404,
29918,
14748,
29918,
6672,
29901,
851,
29897,
1599,
851,
29901,
13,
4706,
9995,
8015,
2546,
1960,
278,
1051,
310,
25492,
28914,
304,
607,
278,
1404,
756,
2130,
322,
2854,
1078,
393,
599,
28914,
6790,
363,
278,
12569,
3377,
1863,
297,
393,
1051,
13,
13,
4706,
584,
3207,
13761,
29918,
7039,
29901,
278,
9810,
2983,
4502,
297,
408,
3030,
3651,
13,
4706,
584,
1853,
13761,
29918,
7039,
29901,
851,
13,
4706,
584,
3207,
12271,
29901,
278,
25492,
12271,
310,
278,
28914,
13,
4706,
584,
1853,
12271,
29901,
851,
13,
4706,
584,
3207,
1404,
29918,
14748,
29918,
6672,
29901,
278,
4911,
29899,
19661,
4839,
363,
25492,
7274,
13,
4706,
584,
1853,
1404,
29918,
14748,
29918,
6672,
29901,
851,
13,
4706,
584,
18280,
29901,
278,
9810,
2983,
393,
1863,
363,
278,
1404,
297,
25492,
13,
4706,
584,
29878,
1853,
29901,
851,
13,
4706,
9995,
13,
4706,
9066,
353,
11117,
25471,
2396,
525,
6979,
525,
718,
1583,
29889,
3177,
29889,
2202,
29918,
657,
29918,
4703,
877,
3292,
29918,
6979,
5477,
13,
462,
259,
525,
23965,
2396,
525,
6214,
29914,
29894,
299,
29889,
3292,
29889,
484,
29890,
2497,
29899,
25347,
29974,
3126,
742,
13,
462,
259,
525,
2659,
29899,
19661,
2396,
1404,
29918,
14748,
29918,
6672,
29913,
13,
4706,
3142,
353,
525,
991,
597,
2754,
29889,
3292,
29889,
510,
29914,
1792,
29914,
276,
1066,
29915,
13,
4706,
2551,
29892,
848,
29892,
2933,
29918,
13662,
353,
298,
29882,
29889,
3827,
29918,
13789,
29898,
2271,
29892,
9066,
29922,
13662,
29897,
13,
4706,
565,
451,
2551,
29901,
13,
9651,
12020,
24875,
2392,
29898,
1272,
1839,
4906,
11287,
13,
13,
4706,
5923,
29918,
276,
1066,
353,
731,
580,
13,
4706,
363,
13761,
297,
848,
29901,
13,
9651,
5923,
29918,
276,
1066,
29889,
1202,
29898,
20095,
1839,
8159,
29918,
978,
11287,
13,
13,
4706,
2854,
29918,
7039,
353,
5159,
13,
4706,
8340,
29918,
7039,
353,
5159,
13,
4706,
363,
13761,
29918,
978,
297,
13761,
29918,
7039,
29889,
5451,
29898,
3788,
1125,
13,
9651,
565,
8207,
29915,
451,
297,
13761,
29918,
978,
29901,
13,
18884,
13761,
29918,
978,
353,
12271,
718,
8207,
29915,
718,
13761,
29918,
978,
13,
13,
9651,
565,
13761,
29918,
978,
451,
297,
5923,
29918,
276,
1066,
29901,
13,
18884,
8340,
29918,
7039,
29889,
4397,
29898,
20095,
29918,
978,
29897,
13,
9651,
1683,
29901,
13,
18884,
2854,
29918,
7039,
29889,
4397,
29898,
20095,
29918,
978,
29897,
13,
13,
4706,
565,
7431,
29898,
20965,
29918,
7039,
29897,
1405,
29871,
29900,
29901,
13,
9651,
8340,
29918,
276,
1066,
353,
13420,
15300,
7122,
29898,
20965,
29918,
7039,
29897,
13,
9651,
2854,
29918,
276,
1066,
353,
376,
9290,
29908,
565,
451,
2854,
29918,
7039,
1683,
13420,
15300,
7122,
29898,
3084,
29918,
7039,
29897,
13,
9651,
1596,
877,
13919,
28914,
29901,
525,
718,
8340,
29918,
276,
1066,
29892,
934,
29922,
303,
20405,
29897,
13,
9651,
1596,
877,
7211,
28914,
29901,
525,
718,
2854,
29918,
276,
1066,
29892,
934,
29922,
303,
20405,
29897,
13,
9651,
12020,
24875,
2392,
703,
3596,
9810,
2983,
1818,
367,
2854,
23157,
13,
13,
4706,
736,
13420,
4286,
7122,
29898,
3084,
29918,
7039,
29897,
13,
13,
1678,
822,
1653,
29918,
392,
29918,
14146,
403,
29918,
481,
335,
29893,
29898,
1311,
29892,
9521,
29901,
18074,
29879,
29889,
10620,
29892,
12569,
3377,
29918,
978,
29918,
13506,
29901,
851,
29897,
1599,
851,
29901,
13,
4706,
9995,
9832,
1078,
3450,
22510,
1582,
322,
3990,
1078,
411,
317,
29984,
29903,
9521,
13,
13,
4706,
584,
3207,
9521,
29901,
278,
317,
29984,
29903,
9521,
304,
22782,
411,
13,
4706,
584,
1853,
9521,
29901,
25879,
29918,
2252,
29895,
29889,
10467,
29918,
3044,
29879,
29889,
10620,
13,
4706,
584,
3207,
12569,
3377,
29918,
978,
29918,
13506,
29901,
278,
12569,
3377,
1024,
304,
671,
408,
278,
3450,
22510,
1582,
6503,
1024,
13,
4706,
584,
1853,
12569,
3377,
29918,
978,
29918,
13506,
29901,
851,
13,
4706,
584,
18280,
29901,
278,
3142,
393,
278,
1856,
1251,
12117,
674,
1400,
304,
13,
4706,
584,
29878,
1853,
29901,
851,
13,
4706,
9995,
13,
4706,
1856,
20849,
29918,
481,
335,
29893,
29918,
12154,
353,
474,
314,
29889,
16727,
29898,
13,
9651,
1583,
29892,
13,
9651,
525,
3609,
20849,
8787,
16727,
742,
13,
9651,
6297,
29918,
978,
2433,
3609,
20849,
8787,
16727,
742,
13,
9651,
12023,
29918,
1609,
29922,
2829,
29889,
3170,
4040,
26706,
877,
481,
335,
403,
1582,
29889,
17260,
10467,
29889,
510,
1495,
13,
4706,
1723,
13,
4706,
1856,
20849,
29918,
481,
335,
29893,
29918,
12154,
29889,
1202,
29918,
517,
29918,
22197,
29898,
2829,
29889,
15644,
14473,
29898,
13,
9651,
7788,
29922,
1839,
29930,
7464,
13,
9651,
8820,
11759,
13,
18884,
525,
3044,
29879,
29901,
12600,
3728,
29915,
13,
9651,
4514,
13,
308,
876,
13,
13,
4706,
1856,
20849,
29918,
481,
335,
29893,
353,
3095,
335,
29893,
29889,
15078,
11713,
29898,
1311,
29892,
525,
11481,
5709,
7185,
2105,
8787,
742,
1791,
29918,
2754,
29918,
978,
2433,
11481,
5709,
7185,
2105,
8787,
1495,
13,
4706,
1856,
20849,
29918,
481,
335,
29893,
29918,
10314,
353,
1856,
20849,
29918,
481,
335,
29893,
29889,
4632,
29889,
1202,
29918,
10314,
29898,
14592,
3377,
29918,
978,
29918,
13506,
29897,
13,
13,
4706,
3095,
335,
29893,
29918,
27925,
29918,
5327,
353,
3095,
335,
29893,
29889,
23573,
362,
5103,
29898,
13,
9651,
4660,
29918,
401,
2433,
29906,
29900,
29900,
742,
13,
9651,
2933,
29918,
20943,
3790,
29915,
6214,
29914,
3126,
2396,
5124,
29913,
13,
4706,
1723,
13,
4706,
3095,
335,
29893,
29918,
27925,
29918,
6768,
353,
3095,
335,
29893,
29889,
23573,
362,
5856,
29898,
13,
9651,
16140,
29918,
12154,
29922,
2676,
20849,
29918,
481,
335,
29893,
29918,
12154,
29892,
13,
9651,
13465,
29918,
26679,
267,
11759,
481,
335,
29893,
29918,
27925,
29918,
5327,
1402,
13,
9651,
2009,
29918,
20943,
3790,
29915,
6214,
29914,
3126,
2396,
525,
4276,
29922,
12600,
3728,
29987,
3728,
8434,
6080,
2080,
29889,
2587,
16675,
13,
9651,
2331,
303,
1092,
820,
29918,
915,
16300,
29922,
481,
335,
29893,
29889,
29925,
294,
303,
1092,
820,
28100,
29889,
8186,
5348,
29892,
13,
9651,
2009,
29918,
16744,
3790,
29915,
27925,
29889,
3827,
29889,
6672,
29889,
3916,
29899,
1542,
2396,
13577,
6214,
29914,
29916,
29899,
1636,
29899,
689,
29899,
2271,
26716,
29915,
9092,
13,
4706,
1723,
13,
4706,
1856,
20849,
29918,
481,
335,
29893,
29918,
10314,
29918,
3044,
29879,
29918,
27925,
353,
3095,
335,
29893,
29889,
29909,
5652,
23573,
362,
29898,
13,
9651,
2669,
2433,
3044,
29879,
742,
13,
9651,
13465,
29918,
1124,
29918,
5696,
2433,
5438,
742,
13,
9651,
2224,
2433,
29912,
6822,
8875,
4286,
4830,
29898,
3221,
29889,
29909,
5652,
29889,
2477,
18736,
29918,
1367,
29892,
9521,
29889,
9990,
29918,
978,
511,
13,
9651,
3987,
29922,
481,
335,
29893,
29918,
27925,
29918,
6768,
13,
4706,
1723,
13,
13,
4706,
1856,
20849,
29918,
481,
335,
29893,
29918,
10314,
29889,
1202,
29918,
5696,
29898,
13,
9651,
525,
5438,
742,
13,
9651,
1856,
20849,
29918,
481,
335,
29893,
29918,
10314,
29918,
3044,
29879,
29918,
27925,
29892,
13,
9651,
1158,
29918,
26679,
267,
11759,
481,
335,
29893,
29889,
4062,
5103,
29898,
4882,
29918,
401,
2433,
29906,
29900,
29900,
1495,
29962,
13,
4706,
1723,
13,
13,
4706,
2224,
353,
8207,
29915,
718,
12569,
3377,
29918,
978,
29918,
13506,
13,
4706,
736,
1856,
20849,
29918,
481,
335,
29893,
29889,
2271,
29918,
1454,
29918,
2084,
29898,
2084,
29897,
13,
2
] |
corefacility/authorizations/ihna/test/account_set_object.py | serik1987/corefacility | 0 | 122176 | from core.test.entity_set.entity_set_objects.external_account_set_object import ExternalAccountSetObject
from authorizations.ihna.entity import Account
class AccountSetObject(ExternalAccountSetObject):
_entity_class = Account
_alias_field = "email"
def data_provider(self):
return [
dict(email="<EMAIL>", user=self._user_set_object[0]),
dict(email="<EMAIL>", user=self._user_set_object[2]),
dict(email="<EMAIL>", user=self._user_set_object[4]),
dict(email="<EMAIL>", user=self._user_set_object[6]),
dict(email="<EMAIL>", user=self._user_set_object[8]),
]
| [
1,
515,
7136,
29889,
1688,
29889,
10041,
29918,
842,
29889,
10041,
29918,
842,
29918,
12650,
29889,
23176,
29918,
10149,
29918,
842,
29918,
3318,
1053,
3985,
10601,
2697,
2061,
13,
3166,
4148,
17063,
29889,
4861,
1056,
29889,
10041,
1053,
16535,
13,
13,
13,
1990,
16535,
2697,
2061,
29898,
25865,
10601,
2697,
2061,
1125,
13,
268,
13,
1678,
903,
10041,
29918,
1990,
353,
16535,
13,
13,
1678,
903,
19973,
29918,
2671,
353,
376,
5269,
29908,
13,
13,
1678,
822,
848,
29918,
18121,
29898,
1311,
1125,
13,
4706,
736,
518,
13,
9651,
9657,
29898,
5269,
543,
29966,
26862,
6227,
28341,
1404,
29922,
1311,
3032,
1792,
29918,
842,
29918,
3318,
29961,
29900,
11724,
13,
9651,
9657,
29898,
5269,
543,
29966,
26862,
6227,
28341,
1404,
29922,
1311,
3032,
1792,
29918,
842,
29918,
3318,
29961,
29906,
11724,
13,
9651,
9657,
29898,
5269,
543,
29966,
26862,
6227,
28341,
1404,
29922,
1311,
3032,
1792,
29918,
842,
29918,
3318,
29961,
29946,
11724,
13,
9651,
9657,
29898,
5269,
543,
29966,
26862,
6227,
28341,
1404,
29922,
1311,
3032,
1792,
29918,
842,
29918,
3318,
29961,
29953,
11724,
13,
9651,
9657,
29898,
5269,
543,
29966,
26862,
6227,
28341,
1404,
29922,
1311,
3032,
1792,
29918,
842,
29918,
3318,
29961,
29947,
11724,
13,
4706,
4514,
13,
2
] |
download/Cost-Function-Of-ML/costFunctionExam.py | chenjian158978/chenjian.github.io | 3 | 52700 | <reponame>chenjian158978/chenjian.github.io
# -*- coding:utf8 -*-
"""
@author: <EMAIL>
@date: Tue, May 23 2017
@time: 19:05:20 GMT+8
"""
import matplotlib.pyplot as plt
import numpy as np
# 都转换成列向量
X = np.array([[0, 1, 2, 4]]).T
Y = np.array([[0, 1, 2, 4]]).T
# 三个不同的theta_1值
theta1 = np.array([[0, 0]]).T
theta2 = np.array([[0, 0.5]]).T
theta3 = np.array([[0, 1]]).T
# 矩阵X的行列(m,n)
X_size = X.shape
# 创建一个(4,1)的单位矩阵
X_0 = np.ones((X_size[0], 1))
# 形成点的坐标
X_with_x0 = np.concatenate((X_0, X), axis=1)
# 两个数组点积
h1 = np.dot(X_with_x0, theta1)
h2 = np.dot(X_with_x0, theta2)
h3 = np.dot(X_with_x0, theta3)
# r:red x: x marker
plt.plot(X, Y, 'rx', label='y')
plt.title("Cost Function Example")
plt.grid(True)
plt.plot(X, h1, color='b', label='h1, theta_1=0')
plt.plot(X, h2, color='m', label='h2, theta_1=0.5')
plt.plot(X, h3, color='g', label='h3, theta_1=1')
# 坐标轴名称
plt.xlabel('X')
plt.ylabel('y/h')
# 坐标轴范围
plt.axis([-0.1, 4.5, -0.1, 4.5])
# plt.legend(loc='upper left')
plt.legend(loc='best')
plt.savefig('liner_gression_error.png', dpi=200)
plt.show()
| [
1,
529,
276,
1112,
420,
29958,
2724,
29926,
713,
29896,
29945,
29947,
29929,
29955,
29947,
29914,
2724,
29926,
713,
29889,
3292,
29889,
601,
13,
29937,
448,
29930,
29899,
14137,
29901,
9420,
29947,
448,
29930,
29899,
13,
13,
15945,
29908,
13,
29992,
8921,
29901,
529,
26862,
6227,
29958,
13,
13,
29992,
1256,
29901,
323,
434,
29892,
2610,
29871,
29906,
29941,
29871,
29906,
29900,
29896,
29955,
13,
13,
29992,
2230,
29901,
29871,
29896,
29929,
29901,
29900,
29945,
29901,
29906,
29900,
402,
11490,
29974,
29947,
13,
15945,
29908,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
13,
29937,
29871,
30769,
31415,
31640,
30494,
31025,
31331,
31180,
13,
29990,
353,
7442,
29889,
2378,
4197,
29961,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
5262,
467,
29911,
13,
29979,
353,
7442,
29889,
2378,
4197,
29961,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
5262,
467,
29911,
13,
13,
29937,
29871,
30457,
30502,
30413,
30980,
30210,
3416,
29918,
29896,
30959,
13,
3416,
29896,
353,
7442,
29889,
2378,
4197,
29961,
29900,
29892,
29871,
29900,
5262,
467,
29911,
13,
3416,
29906,
353,
7442,
29889,
2378,
4197,
29961,
29900,
29892,
29871,
29900,
29889,
29945,
5262,
467,
29911,
13,
3416,
29941,
353,
7442,
29889,
2378,
4197,
29961,
29900,
29892,
29871,
29896,
5262,
467,
29911,
13,
13,
29937,
29871,
234,
162,
172,
236,
155,
184,
29990,
30210,
30448,
31025,
29898,
29885,
29892,
29876,
29897,
13,
29990,
29918,
2311,
353,
1060,
29889,
12181,
13,
13,
29937,
29871,
31441,
30886,
30287,
30502,
29898,
29946,
29892,
29896,
29897,
30210,
31166,
30956,
234,
162,
172,
236,
155,
184,
13,
29990,
29918,
29900,
353,
7442,
29889,
2873,
3552,
29990,
29918,
2311,
29961,
29900,
1402,
29871,
29896,
876,
13,
13,
29937,
29871,
31305,
30494,
30940,
30210,
232,
160,
147,
31062,
13,
29990,
29918,
2541,
29918,
29916,
29900,
353,
7442,
29889,
535,
29883,
2579,
403,
3552,
29990,
29918,
29900,
29892,
1060,
511,
9685,
29922,
29896,
29897,
13,
13,
29937,
29871,
31977,
30502,
30354,
31263,
30940,
234,
170,
178,
13,
29882,
29896,
353,
7442,
29889,
6333,
29898,
29990,
29918,
2541,
29918,
29916,
29900,
29892,
278,
941,
29896,
29897,
13,
29882,
29906,
353,
7442,
29889,
6333,
29898,
29990,
29918,
2541,
29918,
29916,
29900,
29892,
278,
941,
29906,
29897,
13,
29882,
29941,
353,
7442,
29889,
6333,
29898,
29990,
29918,
2541,
29918,
29916,
29900,
29892,
278,
941,
29941,
29897,
13,
13,
29937,
364,
29901,
1127,
921,
29901,
921,
17456,
13,
572,
29873,
29889,
5317,
29898,
29990,
29892,
612,
29892,
525,
17697,
742,
3858,
2433,
29891,
1495,
13,
572,
29873,
29889,
3257,
703,
25733,
6680,
8741,
1159,
13,
572,
29873,
29889,
7720,
29898,
5574,
29897,
13,
572,
29873,
29889,
5317,
29898,
29990,
29892,
298,
29896,
29892,
2927,
2433,
29890,
742,
3858,
2433,
29882,
29896,
29892,
278,
941,
29918,
29896,
29922,
29900,
1495,
13,
572,
29873,
29889,
5317,
29898,
29990,
29892,
298,
29906,
29892,
2927,
2433,
29885,
742,
3858,
2433,
29882,
29906,
29892,
278,
941,
29918,
29896,
29922,
29900,
29889,
29945,
1495,
13,
572,
29873,
29889,
5317,
29898,
29990,
29892,
298,
29941,
29892,
2927,
2433,
29887,
742,
3858,
2433,
29882,
29941,
29892,
278,
941,
29918,
29896,
29922,
29896,
1495,
13,
13,
29937,
29871,
232,
160,
147,
31062,
235,
192,
183,
30548,
31685,
13,
572,
29873,
29889,
29916,
1643,
877,
29990,
1495,
13,
572,
29873,
29889,
29891,
1643,
877,
29891,
29914,
29882,
1495,
13,
13,
29937,
29871,
232,
160,
147,
31062,
235,
192,
183,
235,
143,
134,
232,
158,
183,
13,
572,
29873,
29889,
8990,
4197,
29899,
29900,
29889,
29896,
29892,
29871,
29946,
29889,
29945,
29892,
448,
29900,
29889,
29896,
29892,
29871,
29946,
29889,
29945,
2314,
13,
29937,
14770,
29889,
26172,
29898,
2029,
2433,
21064,
2175,
1495,
13,
572,
29873,
29889,
26172,
29898,
2029,
2433,
13318,
1495,
13,
572,
29873,
29889,
7620,
1003,
877,
1915,
261,
29918,
11476,
29918,
2704,
29889,
2732,
742,
270,
1631,
29922,
29906,
29900,
29900,
29897,
13,
572,
29873,
29889,
4294,
580,
13,
2
] |
Aprendizaje-Guia/Talleres-Python/ejemplo.py | JuanCamilo9915/Learning-Python | 0 | 1611766 | print=("nombre completo")
nombrecompleto=input()
print("cedula de ciudadania")
cedula=input()
cedulah=int(cedula)
print("fecha de nacimiento")
fecha=input()
fecha6=int(fecha)
print("edad:")
edad=input()
edadnum=int(edad)
if(edadnum>=18):
print("Mayor de edad")
else:
print("menor de edad")
| [
1,
1596,
29922,
703,
11522,
1030,
1614,
517,
1159,
13,
11522,
1030,
5729,
517,
29922,
2080,
580,
13,
2158,
703,
1133,
2497,
316,
9866,
4807,
1159,
13,
1133,
2497,
29922,
2080,
580,
13,
1133,
352,
801,
29922,
524,
29898,
1133,
2497,
29897,
13,
2158,
703,
1725,
5815,
316,
22227,
9043,
1159,
13,
1725,
5815,
29922,
2080,
580,
13,
1725,
5815,
29953,
29922,
524,
29898,
1725,
5815,
29897,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
2158,
703,
20483,
29901,
1159,
13,
20483,
29922,
2080,
580,
13,
20483,
1949,
29922,
524,
29898,
20483,
29897,
13,
13,
361,
29898,
20483,
1949,
18572,
29896,
29947,
1125,
13,
1678,
1596,
703,
12703,
272,
316,
1226,
328,
1159,
13,
2870,
29901,
13,
1678,
1596,
703,
1527,
272,
316,
1226,
328,
1159,
13,
2
] |
{{cookiecutter.project_slug}}/backend/app/app/api/api_v1/endpoints/utils.py | scil/full-stack-fastapi-postgresql-for-uper | 0 | 68632 | <gh_stars>0
from fastapi import APIRouter, Depends
from pydantic import EmailStr
from app.api.utils.security import get_current_active_superuser
from app.core.celery_app import celery_app
from app.models.msg import Msg
from app.models.user import UserInDB
from app.utils import send_test_email
router = APIRouter()
@router.post("/test-celery/", response_model=Msg, status_code=201)
def test_celery(
msg: Msg, current_user: UserInDB = Depends(get_current_active_superuser)
):
"""
Test Celery worker.
"""
celery_app.send_task("app.worker.test_celery", args=[msg.msg])
return {"msg": "Word received"}
@router.post("/test-email/", response_model=Msg, status_code=201)
def test_email(
email_to: EmailStr, current_user: UserInDB = Depends(get_current_active_superuser)
):
"""
Test emails.
"""
send_test_email(email_to=email_to)
return {"msg": "Test email sent"}
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
5172,
2754,
1053,
3450,
23971,
29892,
10034,
1975,
13,
3166,
282,
2941,
7716,
1053,
22608,
5015,
13,
13,
3166,
623,
29889,
2754,
29889,
13239,
29889,
8926,
1053,
679,
29918,
3784,
29918,
4925,
29918,
9136,
1792,
13,
3166,
623,
29889,
3221,
29889,
2242,
708,
29918,
932,
1053,
6432,
708,
29918,
932,
13,
3166,
623,
29889,
9794,
29889,
7645,
1053,
28264,
13,
3166,
623,
29889,
9794,
29889,
1792,
1053,
4911,
797,
4051,
13,
3166,
623,
29889,
13239,
1053,
3638,
29918,
1688,
29918,
5269,
13,
13,
15140,
353,
3450,
23971,
580,
13,
13,
13,
29992,
15140,
29889,
2490,
11974,
1688,
29899,
2242,
708,
29914,
613,
2933,
29918,
4299,
29922,
16190,
29892,
4660,
29918,
401,
29922,
29906,
29900,
29896,
29897,
13,
1753,
1243,
29918,
2242,
708,
29898,
13,
1678,
10191,
29901,
28264,
29892,
1857,
29918,
1792,
29901,
4911,
797,
4051,
353,
10034,
1975,
29898,
657,
29918,
3784,
29918,
4925,
29918,
9136,
1792,
29897,
13,
1125,
13,
1678,
9995,
13,
1678,
4321,
14227,
708,
15645,
29889,
13,
1678,
9995,
13,
1678,
6432,
708,
29918,
932,
29889,
6717,
29918,
7662,
703,
932,
29889,
24602,
29889,
1688,
29918,
2242,
708,
613,
6389,
11759,
7645,
29889,
7645,
2314,
13,
1678,
736,
8853,
7645,
1115,
376,
14463,
4520,
9092,
13,
13,
13,
29992,
15140,
29889,
2490,
11974,
1688,
29899,
5269,
29914,
613,
2933,
29918,
4299,
29922,
16190,
29892,
4660,
29918,
401,
29922,
29906,
29900,
29896,
29897,
13,
1753,
1243,
29918,
5269,
29898,
13,
1678,
4876,
29918,
517,
29901,
22608,
5015,
29892,
1857,
29918,
1792,
29901,
4911,
797,
4051,
353,
10034,
1975,
29898,
657,
29918,
3784,
29918,
4925,
29918,
9136,
1792,
29897,
13,
1125,
13,
1678,
9995,
13,
1678,
4321,
24609,
29889,
13,
1678,
9995,
13,
1678,
3638,
29918,
1688,
29918,
5269,
29898,
5269,
29918,
517,
29922,
5269,
29918,
517,
29897,
13,
1678,
736,
8853,
7645,
1115,
376,
3057,
4876,
2665,
9092,
13,
2
] |
src/tests/test.py | ThomazDiniz/Projeto-TC | 1 | 179722 | <reponame>ThomazDiniz/Projeto-TC
execfile("../main.py")
readInputFile()
simulate() | [
1,
529,
276,
1112,
420,
29958,
1349,
290,
834,
29928,
262,
466,
29914,
1184,
4026,
29877,
29899,
9472,
13,
4258,
1445,
703,
6995,
3396,
29889,
2272,
1159,
13,
13,
949,
4290,
2283,
580,
13,
3601,
5987,
580,
2
] |
src/pdf/plugins/_pdf/external.py | ChakshuGautam/PDF-Package | 0 | 114106 | import json
import os
import traceback
from celery import shared_task
from interface import implements
import pdfkit
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from ...base.interfaces.plugin import Plugin
from ...models import GenericConfig
from ...shorteners.yaus import YausShortner
from ...uploaders.minio import MinioUploader
from ...utils import publish_to_url, build_pdf
import requests
from dotenv import load_dotenv
load_dotenv("../../.env")
class PDFPlugin(implements(Plugin)):
def __init__(self, data, token):
"""
To do authentication
"""
# generate path
try:
self.config = GenericConfig.objects.get(pk=data['config_id'])
except KeyError:
self.config = GenericConfig.objects.get(pk=1)
self.user_config = json.loads(self.config.data)
self._data = data['data']
self.template_id = data['template_id']
self.token = token
self.settings_file_loc = f"pdf/creds/{self.user_config['APPLICATION_SETTINGS_FILE']}"
self.creds_file_location = f"pdf/creds/{self.user_config['CREDENTIAL_SETTINGS_FILE']}"
self.uploader = self.config.uploader_ref
self.shortener = self.config.shortener_ref
def get_client(self):
gauth = GoogleAuth(settings_file=self.settings_file_loc)
gauth.LoadCredentialsFile(self.creds_file_location)
if gauth.credentials is None:
# Authenticate if they're not there
gauth.CommandLineAuth()
elif gauth.access_token_expired:
# Refresh them if expired
gauth.Refresh()
else:
# Initialize the saved creds
gauth.Authorize()
# Save the current credentials to a file
gauth.SaveCredentialsFile(self.creds_file_location)
drive = GoogleDrive(gauth)
self.drive = drive
return self.drive
def fetch_data(self):
"""
Fetches "new" data from the database/server/websocket
whatever and provides it in the form of dictionary, one PDF at a time
"""
pass
def fetch_template(self):
"""
Fetches template and returns it in the form of string
"""
try:
template_string = error_code = error_msg = None
data = json.dumps({
"id": self.template_id,
"data": self._data
})
headers = {
'Content-Type': 'application/json'
}
response = requests.post(f"{os.getenv('TEMPLATOR_URL')}/process", data=data, headers=headers)
if response.status_code == 201:
template_string = response.json()['processed'] if "processed" in response.json() else None
else:
error = response.text
except Exception as e:
traceback.print_exc()
error_msg = f"Failed to fetch template: {e}"
error_code = 801
return error_code, error_msg, template_string
def build_file(self, template):
"""
Function to build PDF and return a file (fetch template and build pdf)
"""
is_successful = error_code = error_msg = None
drive_file_loc = f'pdf/drivefiles/{self.token}.pdf'
try:
# path_wkhtmltopdf = r'C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe'
# config = pdfkit.configuration(wkhtmltopdf=path_wkhtmltopdf)
# pdfkit.from_string(template, drive_file_loc, configuration=config)
pdfkit.from_string(template, drive_file_loc)
is_successful = True
except Exception as e:
traceback.print_exc()
error_msg = f"Failed to generate doc: {e}"
error_code = 803
return error_code, error_msg, is_successful
def upload_file(self):
"""
Function to save PDF
"""
error_code = error_msg = final_data = None
try:
drive_file_loc = f'pdf/drivefiles/{self.token}.pdf'
if self.uploader == "minio":
host = self.user_config["MINIO_HOST"]
access_key = self.user_config["MINIO_ACCESS_KEY"]
secret_key = self.user_config["MINIO_SECRET_KEY"]
bucket_name = self.user_config["MINIO_BUCKET_NAME"]
uploader = MinioUploader(host, access_key, secret_key, bucket_name)
error_code, error_msg, final_data = uploader.put(f'{self.token}.pdf', f'{self.token}.pdf', None)
if error_code is None:
if os.path.exists(drive_file_loc):
os.remove(drive_file_loc)
else:
raise Exception("Failed to build the pdf")
return error_code, error_msg, final_data
else:
raise Exception("Uploader plugin not supported")
except Exception as e:
traceback.print_exc()
error_code = 805
error_msg = f"Something went wrong: {e}"
finally:
return error_code, error_msg, final_data
def retrieve_file(self, object_name):
"""
Function to get the previously saved PDF from the key
"""
def shorten_url(self, url):
"""
Function to generate short url for the uploaded doc
"""
error_code = error_msg = final_data = None
try:
if self.shortener == "yaus":
host = self.user_config["SHORTENER_URL"]
shortener = YausShortner(host)
error_code, error_msg, final_data = shortener.apply(url, self.token)
if error_code is None:
final_data = final_data['shortUrl']
else:
raise Exception("Shortener plugin not available")
except Exception as e:
traceback.print_exc()
error_code = 806
error_msg = f"Something went wrong: {e}"
finally:
return error_code, error_msg, final_data
def publish(self, id, url, headers):
"""
Function to publish response on external url/webhook
"""
publish_to_url(id, url, headers=headers)
| [
1,
1053,
4390,
13,
5215,
2897,
13,
5215,
9637,
1627,
13,
13,
3166,
6432,
708,
1053,
7258,
29918,
7662,
13,
3166,
5067,
1053,
10703,
13,
5215,
13552,
7354,
13,
3166,
282,
2941,
4401,
29889,
5150,
1053,
5087,
6444,
13,
3166,
282,
2941,
4401,
29889,
21594,
1053,
5087,
29928,
4401,
13,
13,
3166,
2023,
3188,
29889,
1639,
8726,
29889,
8582,
1053,
1858,
3851,
13,
3166,
2023,
9794,
1053,
3251,
293,
3991,
13,
3166,
2023,
12759,
264,
414,
29889,
29891,
1485,
1053,
612,
1485,
21322,
1089,
13,
3166,
2023,
9009,
414,
29889,
1195,
601,
1053,
3080,
601,
3373,
12657,
13,
3166,
2023,
13239,
1053,
9805,
29918,
517,
29918,
2271,
29892,
2048,
29918,
5140,
13,
5215,
7274,
13,
3166,
8329,
6272,
1053,
2254,
29918,
6333,
6272,
13,
13,
1359,
29918,
6333,
6272,
703,
6995,
636,
6294,
6272,
1159,
13,
13,
13,
1990,
11328,
16288,
29898,
326,
9711,
29898,
16288,
22164,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
848,
29892,
5993,
1125,
13,
4706,
9995,
13,
4706,
1763,
437,
10760,
13,
4706,
9995,
13,
4706,
396,
5706,
2224,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
2917,
353,
3251,
293,
3991,
29889,
12650,
29889,
657,
29898,
20571,
29922,
1272,
1839,
2917,
29918,
333,
11287,
13,
4706,
5174,
7670,
2392,
29901,
13,
9651,
1583,
29889,
2917,
353,
3251,
293,
3991,
29889,
12650,
29889,
657,
29898,
20571,
29922,
29896,
29897,
13,
4706,
1583,
29889,
1792,
29918,
2917,
353,
4390,
29889,
18132,
29898,
1311,
29889,
2917,
29889,
1272,
29897,
13,
4706,
1583,
3032,
1272,
353,
848,
1839,
1272,
2033,
13,
4706,
1583,
29889,
6886,
29918,
333,
353,
848,
1839,
6886,
29918,
333,
2033,
13,
4706,
1583,
29889,
6979,
353,
5993,
13,
4706,
1583,
29889,
11027,
29918,
1445,
29918,
2029,
353,
285,
29908,
5140,
29914,
1037,
6289,
19248,
1311,
29889,
1792,
29918,
2917,
1839,
3301,
7390,
28541,
29918,
10490,
29911,
4214,
29903,
29918,
7724,
2033,
5038,
13,
4706,
1583,
29889,
1037,
6289,
29918,
1445,
29918,
5479,
353,
285,
29908,
5140,
29914,
1037,
6289,
19248,
1311,
29889,
1792,
29918,
2917,
1839,
29907,
19386,
3919,
25758,
29918,
10490,
29911,
4214,
29903,
29918,
7724,
2033,
5038,
13,
4706,
1583,
29889,
9009,
261,
353,
1583,
29889,
2917,
29889,
9009,
261,
29918,
999,
13,
4706,
1583,
29889,
12759,
759,
353,
1583,
29889,
2917,
29889,
12759,
759,
29918,
999,
13,
13,
1678,
822,
679,
29918,
4645,
29898,
1311,
1125,
13,
4706,
330,
5150,
353,
5087,
6444,
29898,
11027,
29918,
1445,
29922,
1311,
29889,
11027,
29918,
1445,
29918,
2029,
29897,
13,
4706,
330,
5150,
29889,
5896,
28037,
2283,
29898,
1311,
29889,
1037,
6289,
29918,
1445,
29918,
5479,
29897,
13,
4706,
565,
330,
5150,
29889,
11944,
9409,
338,
6213,
29901,
13,
9651,
396,
13189,
4173,
403,
565,
896,
29915,
276,
451,
727,
13,
9651,
330,
5150,
29889,
6255,
3542,
6444,
580,
13,
4706,
25342,
330,
5150,
29889,
5943,
29918,
6979,
29918,
4548,
2859,
29901,
13,
9651,
396,
9897,
3781,
963,
565,
1518,
2859,
13,
9651,
330,
5150,
29889,
27132,
580,
13,
4706,
1683,
29901,
13,
9651,
396,
25455,
278,
7160,
907,
6289,
13,
9651,
330,
5150,
29889,
13720,
675,
580,
13,
4706,
396,
16913,
278,
1857,
16140,
304,
263,
934,
13,
4706,
330,
5150,
29889,
11371,
28037,
2283,
29898,
1311,
29889,
1037,
6289,
29918,
1445,
29918,
5479,
29897,
13,
4706,
7899,
353,
5087,
29928,
4401,
29898,
29887,
5150,
29897,
13,
4706,
1583,
29889,
21594,
353,
7899,
13,
4706,
736,
1583,
29889,
21594,
13,
13,
1678,
822,
6699,
29918,
1272,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
383,
3486,
267,
376,
1482,
29908,
848,
515,
278,
2566,
29914,
2974,
29914,
2676,
11514,
13,
4706,
6514,
322,
8128,
372,
297,
278,
883,
310,
8600,
29892,
697,
11328,
472,
263,
931,
13,
4706,
9995,
13,
4706,
1209,
13,
13,
1678,
822,
6699,
29918,
6886,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
383,
3486,
267,
4472,
322,
3639,
372,
297,
278,
883,
310,
1347,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
4472,
29918,
1807,
353,
1059,
29918,
401,
353,
1059,
29918,
7645,
353,
6213,
13,
9651,
848,
353,
4390,
29889,
29881,
17204,
3319,
13,
18884,
376,
333,
1115,
1583,
29889,
6886,
29918,
333,
29892,
13,
18884,
376,
1272,
1115,
1583,
3032,
1272,
13,
9651,
5615,
13,
9651,
9066,
353,
426,
13,
18884,
525,
3916,
29899,
1542,
2396,
525,
6214,
29914,
3126,
29915,
13,
9651,
500,
13,
9651,
2933,
353,
7274,
29889,
2490,
29898,
29888,
29908,
29912,
359,
29889,
657,
6272,
877,
4330,
3580,
29931,
1299,
1955,
29918,
4219,
1495,
6822,
5014,
613,
848,
29922,
1272,
29892,
9066,
29922,
13662,
29897,
13,
9651,
565,
2933,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29896,
29901,
13,
18884,
4472,
29918,
1807,
353,
2933,
29889,
3126,
580,
1839,
5014,
287,
2033,
565,
376,
5014,
287,
29908,
297,
2933,
29889,
3126,
580,
1683,
6213,
13,
9651,
1683,
29901,
13,
18884,
1059,
353,
2933,
29889,
726,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
9637,
1627,
29889,
2158,
29918,
735,
29883,
580,
13,
9651,
1059,
29918,
7645,
353,
285,
29908,
17776,
304,
6699,
4472,
29901,
426,
29872,
5038,
13,
9651,
1059,
29918,
401,
353,
29871,
29947,
29900,
29896,
13,
4706,
736,
1059,
29918,
401,
29892,
1059,
29918,
7645,
29892,
4472,
29918,
1807,
13,
13,
1678,
822,
2048,
29918,
1445,
29898,
1311,
29892,
4472,
1125,
13,
4706,
9995,
13,
4706,
6680,
304,
2048,
11328,
322,
736,
263,
934,
313,
9155,
4472,
322,
2048,
13552,
29897,
13,
4706,
9995,
13,
4706,
338,
29918,
8698,
1319,
353,
1059,
29918,
401,
353,
1059,
29918,
7645,
353,
6213,
13,
4706,
7899,
29918,
1445,
29918,
2029,
353,
285,
29915,
5140,
29914,
21594,
5325,
19248,
1311,
29889,
6979,
1836,
5140,
29915,
13,
4706,
1018,
29901,
13,
9651,
396,
2224,
29918,
29893,
29895,
1420,
3332,
2176,
353,
364,
29915,
29907,
3583,
9283,
12745,
29905,
29893,
29895,
1420,
3332,
2176,
29905,
2109,
29905,
29893,
29895,
1420,
3332,
2176,
29889,
8097,
29915,
13,
9651,
396,
2295,
353,
13552,
7354,
29889,
13305,
29898,
29893,
29895,
1420,
3332,
2176,
29922,
2084,
29918,
29893,
29895,
1420,
3332,
2176,
29897,
13,
9651,
396,
13552,
7354,
29889,
3166,
29918,
1807,
29898,
6886,
29892,
7899,
29918,
1445,
29918,
2029,
29892,
5285,
29922,
2917,
29897,
13,
9651,
13552,
7354,
29889,
3166,
29918,
1807,
29898,
6886,
29892,
7899,
29918,
1445,
29918,
2029,
29897,
13,
9651,
338,
29918,
8698,
1319,
353,
5852,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
9637,
1627,
29889,
2158,
29918,
735,
29883,
580,
13,
9651,
1059,
29918,
7645,
353,
285,
29908,
17776,
304,
5706,
1574,
29901,
426,
29872,
5038,
13,
9651,
1059,
29918,
401,
353,
29871,
29947,
29900,
29941,
13,
4706,
736,
1059,
29918,
401,
29892,
1059,
29918,
7645,
29892,
338,
29918,
8698,
1319,
13,
13,
1678,
822,
6441,
29918,
1445,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
6680,
304,
4078,
11328,
13,
4706,
9995,
13,
4706,
1059,
29918,
401,
353,
1059,
29918,
7645,
353,
2186,
29918,
1272,
353,
6213,
13,
4706,
1018,
29901,
13,
9651,
7899,
29918,
1445,
29918,
2029,
353,
285,
29915,
5140,
29914,
21594,
5325,
19248,
1311,
29889,
6979,
1836,
5140,
29915,
13,
9651,
565,
1583,
29889,
9009,
261,
1275,
376,
1195,
601,
1115,
13,
18884,
3495,
353,
1583,
29889,
1792,
29918,
2917,
3366,
16173,
5971,
29918,
20832,
3108,
13,
18884,
2130,
29918,
1989,
353,
1583,
29889,
1792,
29918,
2917,
3366,
16173,
5971,
29918,
2477,
23524,
29918,
10818,
3108,
13,
18884,
7035,
29918,
1989,
353,
1583,
29889,
1792,
29918,
2917,
3366,
16173,
5971,
29918,
1660,
22245,
29911,
29918,
10818,
3108,
13,
18884,
20968,
29918,
978,
353,
1583,
29889,
1792,
29918,
2917,
3366,
16173,
5971,
29918,
7838,
7077,
2544,
29918,
5813,
3108,
13,
18884,
6441,
261,
353,
3080,
601,
3373,
12657,
29898,
3069,
29892,
2130,
29918,
1989,
29892,
7035,
29918,
1989,
29892,
20968,
29918,
978,
29897,
13,
18884,
1059,
29918,
401,
29892,
1059,
29918,
7645,
29892,
2186,
29918,
1272,
353,
6441,
261,
29889,
649,
29898,
29888,
29915,
29912,
1311,
29889,
6979,
1836,
5140,
742,
285,
29915,
29912,
1311,
29889,
6979,
1836,
5140,
742,
6213,
29897,
13,
18884,
565,
1059,
29918,
401,
338,
6213,
29901,
13,
462,
1678,
565,
2897,
29889,
2084,
29889,
9933,
29898,
21594,
29918,
1445,
29918,
2029,
1125,
13,
462,
4706,
2897,
29889,
5992,
29898,
21594,
29918,
1445,
29918,
2029,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
12020,
8960,
703,
17776,
304,
2048,
278,
13552,
1159,
13,
18884,
736,
1059,
29918,
401,
29892,
1059,
29918,
7645,
29892,
2186,
29918,
1272,
13,
9651,
1683,
29901,
13,
18884,
12020,
8960,
703,
3373,
12657,
7079,
451,
6969,
1159,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
9637,
1627,
29889,
2158,
29918,
735,
29883,
580,
13,
9651,
1059,
29918,
401,
353,
29871,
29947,
29900,
29945,
13,
9651,
1059,
29918,
7645,
353,
285,
29908,
16804,
3512,
2743,
29901,
426,
29872,
5038,
13,
4706,
7146,
29901,
13,
9651,
736,
1059,
29918,
401,
29892,
1059,
29918,
7645,
29892,
2186,
29918,
1272,
13,
13,
1678,
822,
10563,
29918,
1445,
29898,
1311,
29892,
1203,
29918,
978,
1125,
13,
4706,
9995,
13,
4706,
6680,
304,
679,
278,
9251,
7160,
11328,
515,
278,
1820,
13,
4706,
9995,
13,
13,
1678,
822,
3273,
264,
29918,
2271,
29898,
1311,
29892,
3142,
1125,
13,
4706,
9995,
13,
4706,
6680,
304,
5706,
3273,
3142,
363,
278,
20373,
1574,
13,
4706,
9995,
13,
4706,
1059,
29918,
401,
353,
1059,
29918,
7645,
353,
2186,
29918,
1272,
353,
6213,
13,
4706,
1018,
29901,
13,
9651,
565,
1583,
29889,
12759,
759,
1275,
376,
29891,
1485,
1115,
13,
18884,
3495,
353,
1583,
29889,
1792,
29918,
2917,
3366,
7068,
8476,
1430,
1001,
29918,
4219,
3108,
13,
18884,
3273,
759,
353,
612,
1485,
21322,
1089,
29898,
3069,
29897,
13,
18884,
1059,
29918,
401,
29892,
1059,
29918,
7645,
29892,
2186,
29918,
1272,
353,
3273,
759,
29889,
7302,
29898,
2271,
29892,
1583,
29889,
6979,
29897,
13,
18884,
565,
1059,
29918,
401,
338,
6213,
29901,
13,
462,
1678,
2186,
29918,
1272,
353,
2186,
29918,
1272,
1839,
12759,
5983,
2033,
13,
9651,
1683,
29901,
13,
18884,
12020,
8960,
703,
21322,
759,
7079,
451,
3625,
1159,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
9637,
1627,
29889,
2158,
29918,
735,
29883,
580,
13,
9651,
1059,
29918,
401,
353,
29871,
29947,
29900,
29953,
13,
9651,
1059,
29918,
7645,
353,
285,
29908,
16804,
3512,
2743,
29901,
426,
29872,
5038,
13,
4706,
7146,
29901,
13,
9651,
736,
1059,
29918,
401,
29892,
1059,
29918,
7645,
29892,
2186,
29918,
1272,
13,
13,
1678,
822,
9805,
29898,
1311,
29892,
1178,
29892,
3142,
29892,
9066,
1125,
13,
4706,
9995,
13,
4706,
6680,
304,
9805,
2933,
373,
7029,
3142,
29914,
2676,
20849,
13,
4706,
9995,
13,
4706,
9805,
29918,
517,
29918,
2271,
29898,
333,
29892,
3142,
29892,
9066,
29922,
13662,
29897,
13,
2
] |
suspects.py | ht21992/Online-Board-Game | 0 | 161709 | import random
import pickle
with open("run_number", 'rb') as f:
run_number = pickle.load(f)
def sus_info():
global run_number
suspects = {0: {"Name": "<NAME>", "Blood Type": "AB+", "Occupation": "actor", "Hair Color": "brown", "Age": 64,
"Sex": "man"},
1: {"Name": "<NAME>", "Blood Type": "A+", "Occupation": "painter", "Hair Color": "black",
"Age": 32, "Sex": "man"},
2: {"Name": "<NAME>", "Blood Type": "B+", "Occupation": "surgeon", "Hair Color": "black",
"Age": 28, "Sex": "woman"},
3: {"Name": "<NAME>", "Blood Type": "A+", "Occupation": "tailor", "Hair Color": "blonde",
"Age": 41, "Sex": "woman"},
4: {"Name": "<NAME>", "Blood Type": "O+", "Occupation": "surgeon", "Hair Color": "blonde",
"Age": 29, "Sex": "man"},
5: {"Name": "<NAME>", "Blood Type": "AB+", "Occupation": "nurse", "Hair Color": "brown",
"Age": 52, "Sex": "woman"},
6: {"Name": "<NAME>", "Blood Type": "O+", "Occupation": "painter", "Hair Color": "black",
"Age": 27, "Sex": "woman"},
7: {"Name": "<NAME>", "Blood Type": "O-", "Occupation": "actor", "Hair Color": "blonde",
"Age": 31, "Sex": "woman"},
8: {"Name": "<NAME>", "Blood Type": "B+", "Occupation": "tailor", "Hair Color": "black",
"Age": 35, "Sex": "man"},
9: {"Name": "<NAME>", "Blood Type": "O-", "Occupation": "nurse", "Hair Color": "blonde",
"Age": 47, "Sex": "man"},
}
with open("used_positions", 'rb') as f:
used_positions = pickle.load(f)
if run_number == 0:
main_sus = random.choice(suspects)
with open("main_sus", 'wb') as f:
pickle.dump(main_sus, f)
# question_numbers = pickle.load(f)
with open("run_number", 'wb') as f:
pickle.dump(run_number, f)
else:
with open("main_sus", 'rb') as f:
main_sus = pickle.load(f)
run_number+=1
with open("run_number", 'wb') as f:
pickle.dump(run_number, f)
# print(main_sus)
hints = [f"It was {random.choice(['Sunday', 'Monday', 'Tuesday', 'Thursday', 'Wednesday', 'Friday', 'Saturday'])}",
f"The hair color was {main_sus['Hair Color']}",
f"The guy had a mask in the elevator",
f"The guy looked to be around {random.randint(main_sus['Age'] - 3, main_sus['Age'] + 5)}",
f"I might put you off the scent :)",
f"Not sure but {random.choice([main_sus['Hair Color'], 'black', 'blonde'])} hair color",
f"maybe a scissor",
f"When I was coming into the building I saw a {main_sus['Sex']}",
f"He had strange cloths but I guess he was a man",
f"Maybe she was a woman",
f"They were fighting and suddenly they became silent",
f"I know this neighbourhood very well",
f"I'm not sure about hair color",
f"it was around {random.randrange(1, 13)} {random.choice(['a.m', 'p.m'])}",
f"the assassin had a knife or sth like that",
f"I also heard {main_sus['Name'].split(' ')[0]} multiple times",
f"I also heard {random.choice(['John', 'Elizabeth', 'Eric', 'Stephanie', 'Randall', 'Norma', 'Kathleen', 'Christina', 'Nicholas', 'David'])} multiple times",
f"I heard the name {random.choice(['John', 'Elizabeth', 'Eric', 'Stephanie', 'Randall', 'Norma', 'Kathleen', 'Christina', 'Nicholas', 'David'])}",
f"The test shows the blood type is {main_sus['Blood Type']}",
f"I took a look at the corpse",
f"You must believe me",
f"The assassin is {main_sus['Occupation']}",
f"The assassin is {random.choice(['tailor', 'butcher', 'nurse', 'actor', 'painter', 'surgeon', 'goldsmith', 'cook'])}",
f"I think I have no more information",
]
if main_sus['Occupation'] == 'surgeon':
hints.append('The assassin knew how to use a knife ')
elif main_sus['Occupation'] == 'tailor':
hints.append('The assassin knew how to use a scissor ')
elif main_sus['Occupation'] == "actor":
hints.append('The assassin must like the art ')
else:
hints.append('The assassin was a noob')
run_number
return suspects, main_sus, hints, used_positions
| [
1,
1053,
4036,
30004,
13,
5215,
5839,
280,
30004,
13,
30004,
13,
2541,
1722,
703,
3389,
29918,
4537,
613,
525,
6050,
1495,
408,
285,
29901,
30004,
13,
1678,
1065,
29918,
4537,
353,
5839,
280,
29889,
1359,
29898,
29888,
8443,
13,
30004,
13,
30004,
13,
30004,
13,
30004,
13,
1753,
2858,
29918,
3888,
7295,
30004,
13,
1678,
5534,
1065,
29918,
4537,
30004,
13,
1678,
12326,
29879,
353,
426,
29900,
29901,
8853,
1170,
1115,
9872,
5813,
28341,
376,
29933,
417,
397,
5167,
1115,
376,
2882,
29974,
613,
376,
22034,
786,
362,
1115,
376,
7168,
613,
376,
29950,
1466,
9159,
1115,
376,
29890,
4708,
613,
376,
22406,
1115,
29871,
29953,
29946,
11167,
13,
462,
1678,
376,
29903,
735,
1115,
376,
1171,
10758,
30004,
13,
462,
29896,
29901,
8853,
1170,
1115,
9872,
5813,
28341,
376,
29933,
417,
397,
5167,
1115,
376,
29909,
29974,
613,
376,
22034,
786,
362,
1115,
376,
29886,
475,
357,
613,
376,
29950,
1466,
9159,
1115,
376,
8517,
15231,
13,
462,
1678,
376,
22406,
1115,
29871,
29941,
29906,
29892,
376,
29903,
735,
1115,
376,
1171,
10758,
30004,
13,
462,
29906,
29901,
8853,
1170,
1115,
9872,
5813,
28341,
376,
29933,
417,
397,
5167,
1115,
376,
29933,
29974,
613,
376,
22034,
786,
362,
1115,
376,
7610,
25339,
613,
376,
29950,
1466,
9159,
1115,
376,
8517,
15231,
13,
462,
1678,
376,
22406,
1115,
29871,
29906,
29947,
29892,
376,
29903,
735,
1115,
376,
29893,
2480,
10758,
30004,
13,
462,
29941,
29901,
8853,
1170,
1115,
9872,
5813,
28341,
376,
29933,
417,
397,
5167,
1115,
376,
29909,
29974,
613,
376,
22034,
786,
362,
1115,
376,
18237,
272,
613,
376,
29950,
1466,
9159,
1115,
376,
2204,
13469,
15231,
13,
462,
1678,
376,
22406,
1115,
29871,
29946,
29896,
29892,
376,
29903,
735,
1115,
376,
29893,
2480,
10758,
30004,
13,
462,
29946,
29901,
8853,
1170,
1115,
9872,
5813,
28341,
376,
29933,
417,
397,
5167,
1115,
376,
29949,
29974,
613,
376,
22034,
786,
362,
1115,
376,
7610,
25339,
613,
376,
29950,
1466,
9159,
1115,
376,
2204,
13469,
15231,
13,
462,
1678,
376,
22406,
1115,
29871,
29906,
29929,
29892,
376,
29903,
735,
1115,
376,
1171,
10758,
30004,
13,
462,
29945,
29901,
8853,
1170,
1115,
9872,
5813,
28341,
376,
29933,
417,
397,
5167,
1115,
376,
2882,
29974,
613,
376,
22034,
786,
362,
1115,
376,
29876,
332,
344,
613,
376,
29950,
1466,
9159,
1115,
376,
29890,
4708,
15231,
13,
462,
1678,
376,
22406,
1115,
29871,
29945,
29906,
29892,
376,
29903,
735,
1115,
376,
29893,
2480,
10758,
30004,
13,
462,
29953,
29901,
8853,
1170,
1115,
9872,
5813,
28341,
376,
29933,
417,
397,
5167,
1115,
376,
29949,
29974,
613,
376,
22034,
786,
362,
1115,
376,
29886,
475,
357,
613,
376,
29950,
1466,
9159,
1115,
376,
8517,
15231,
13,
462,
1678,
376,
22406,
1115,
29871,
29906,
29955,
29892,
376,
29903,
735,
1115,
376,
29893,
2480,
10758,
30004,
13,
462,
29955,
29901,
8853,
1170,
1115,
9872,
5813,
28341,
376,
29933,
417,
397,
5167,
1115,
376,
29949,
29899,
613,
376,
22034,
786,
362,
1115,
376,
7168,
613,
376,
29950,
1466,
9159,
1115,
376,
2204,
13469,
15231,
13,
462,
1678,
376,
22406,
1115,
29871,
29941,
29896,
29892,
376,
29903,
735,
1115,
376,
29893,
2480,
10758,
30004,
13,
462,
29947,
29901,
8853,
1170,
1115,
9872,
5813,
28341,
376,
29933,
417,
397,
5167,
1115,
376,
29933,
29974,
613,
376,
22034,
786,
362,
1115,
376,
18237,
272,
613,
376,
29950,
1466,
9159,
1115,
376,
8517,
15231,
13,
462,
1678,
376,
22406,
1115,
29871,
29941,
29945,
29892,
376,
29903,
735,
1115,
376,
1171,
10758,
30004,
13,
462,
29929,
29901,
8853,
1170,
1115,
9872,
5813,
28341,
376,
29933,
417,
397,
5167,
1115,
376,
29949,
29899,
613,
376,
22034,
786,
362,
1115,
376,
29876,
332,
344,
613,
376,
29950,
1466,
9159,
1115,
376,
2204,
13469,
15231,
13,
462,
1678,
376,
22406,
1115,
29871,
29946,
29955,
29892,
376,
29903,
735,
1115,
376,
1171,
10758,
30004,
13,
18884,
4970,
13,
30004,
13,
1678,
411,
1722,
703,
3880,
29918,
1066,
2187,
613,
525,
6050,
1495,
408,
285,
29901,
30004,
13,
4706,
1304,
29918,
1066,
2187,
353,
5839,
280,
29889,
1359,
29898,
29888,
8443,
13,
30004,
13,
30004,
13,
30004,
13,
1678,
565,
1065,
29918,
4537,
1275,
29871,
29900,
29901,
30004,
13,
4706,
1667,
29918,
29879,
375,
353,
4036,
29889,
16957,
29898,
29879,
375,
1103,
29879,
8443,
13,
4706,
411,
1722,
703,
3396,
29918,
29879,
375,
613,
525,
29893,
29890,
1495,
408,
285,
29901,
30004,
13,
9651,
5839,
280,
29889,
15070,
29898,
3396,
29918,
29879,
375,
29892,
285,
8443,
13,
9651,
396,
1139,
29918,
20326,
353,
5839,
280,
29889,
1359,
29898,
29888,
8443,
13,
30004,
13,
30004,
13,
4706,
411,
1722,
703,
3389,
29918,
4537,
613,
525,
29893,
29890,
1495,
408,
285,
29901,
30004,
13,
9651,
5839,
280,
29889,
15070,
29898,
3389,
29918,
4537,
29892,
285,
8443,
13,
1678,
1683,
29901,
30004,
13,
4706,
411,
1722,
703,
3396,
29918,
29879,
375,
613,
525,
6050,
1495,
408,
285,
29901,
30004,
13,
9651,
1667,
29918,
29879,
375,
353,
5839,
280,
29889,
1359,
29898,
29888,
8443,
13,
4706,
1065,
29918,
4537,
23661,
29896,
30004,
13,
4706,
411,
1722,
703,
3389,
29918,
4537,
613,
525,
29893,
29890,
1495,
408,
285,
29901,
30004,
13,
9651,
5839,
280,
29889,
15070,
29898,
3389,
29918,
4537,
29892,
285,
8443,
13,
30004,
13,
1678,
396,
1596,
29898,
3396,
29918,
29879,
375,
8443,
13,
1678,
26085,
353,
518,
29888,
29908,
3112,
471,
426,
8172,
29889,
16957,
18959,
29903,
870,
388,
742,
525,
29924,
898,
388,
742,
525,
29911,
1041,
3250,
742,
525,
1349,
1295,
3250,
742,
525,
29956,
287,
4515,
3250,
742,
525,
29943,
2429,
388,
742,
525,
29903,
20510,
2033,
2915,
15231,
13,
632,
285,
29908,
1576,
11315,
2927,
471,
426,
3396,
29918,
29879,
375,
1839,
29950,
1466,
9159,
2033,
29913,
15231,
13,
632,
285,
29908,
1576,
1410,
29891,
750,
263,
11105,
297,
278,
11858,
1061,
15231,
13,
632,
285,
29908,
1576,
1410,
29891,
5148,
304,
367,
2820,
426,
8172,
29889,
9502,
524,
29898,
3396,
29918,
29879,
375,
1839,
22406,
2033,
448,
29871,
29941,
29892,
1667,
29918,
29879,
375,
1839,
22406,
2033,
718,
29871,
29945,
2915,
15231,
13,
632,
285,
29908,
29902,
1795,
1925,
366,
1283,
278,
885,
296,
4248,
15231,
13,
632,
285,
29908,
3664,
1854,
541,
426,
8172,
29889,
16957,
4197,
3396,
29918,
29879,
375,
1839,
29950,
1466,
9159,
7464,
525,
8517,
742,
525,
2204,
13469,
2033,
2915,
11315,
2927,
15231,
13,
632,
285,
29908,
26026,
263,
885,
790,
272,
15231,
13,
632,
285,
29908,
10401,
306,
471,
6421,
964,
278,
5214,
306,
4446,
263,
426,
3396,
29918,
29879,
375,
1839,
29903,
735,
2033,
29913,
15231,
13,
632,
285,
29908,
3868,
750,
8515,
13950,
29879,
541,
306,
4140,
540,
471,
263,
767,
15231,
13,
632,
285,
29908,
22762,
1183,
471,
263,
6114,
15231,
13,
632,
285,
29908,
15597,
892,
17770,
322,
11584,
896,
3897,
17436,
15231,
13,
632,
285,
29908,
29902,
1073,
445,
29643,
1407,
1532,
15231,
13,
632,
285,
29908,
29902,
29915,
29885,
451,
1854,
1048,
11315,
2927,
15231,
13,
632,
285,
29908,
277,
471,
2820,
426,
8172,
29889,
9502,
3881,
29898,
29896,
29892,
29871,
29896,
29941,
2915,
426,
8172,
29889,
16957,
18959,
29874,
29889,
29885,
742,
525,
29886,
29889,
29885,
2033,
2915,
15231,
13,
632,
285,
29908,
1552,
20105,
262,
750,
263,
889,
1607,
470,
380,
29882,
763,
393,
15231,
13,
632,
285,
29908,
29902,
884,
6091,
426,
3396,
29918,
29879,
375,
1839,
1170,
13359,
5451,
877,
525,
9601,
29900,
12258,
2999,
3064,
15231,
13,
632,
285,
29908,
29902,
884,
6091,
426,
8172,
29889,
16957,
18959,
11639,
742,
525,
6489,
466,
9394,
742,
525,
2110,
293,
742,
525,
7789,
561,
6067,
742,
525,
29934,
392,
497,
742,
525,
29940,
555,
29874,
742,
525,
29968,
493,
280,
264,
742,
525,
18687,
1099,
742,
525,
29940,
436,
16118,
742,
525,
19504,
2033,
2915,
2999,
3064,
15231,
13,
632,
285,
29908,
29902,
6091,
278,
1024,
426,
8172,
29889,
16957,
18959,
11639,
742,
525,
6489,
466,
9394,
742,
525,
2110,
293,
742,
525,
7789,
561,
6067,
742,
525,
29934,
392,
497,
742,
525,
29940,
555,
29874,
742,
525,
29968,
493,
280,
264,
742,
525,
18687,
1099,
742,
525,
29940,
436,
16118,
742,
525,
19504,
2033,
2915,
15231,
13,
632,
285,
29908,
1576,
1243,
3697,
278,
10416,
1134,
338,
426,
3396,
29918,
29879,
375,
1839,
29933,
417,
397,
5167,
2033,
29913,
15231,
13,
632,
285,
29908,
29902,
3614,
263,
1106,
472,
278,
1034,
27358,
15231,
13,
632,
285,
29908,
3492,
1818,
4658,
592,
15231,
13,
632,
285,
29908,
1576,
20105,
262,
338,
426,
3396,
29918,
29879,
375,
1839,
22034,
786,
362,
2033,
29913,
15231,
13,
632,
285,
29908,
1576,
20105,
262,
338,
426,
8172,
29889,
16957,
18959,
18237,
272,
742,
525,
4187,
4630,
742,
525,
29876,
332,
344,
742,
525,
7168,
742,
525,
29886,
475,
357,
742,
525,
7610,
25339,
742,
525,
29887,
3361,
29885,
389,
742,
525,
15108,
2033,
2915,
15231,
13,
632,
285,
29908,
29902,
1348,
306,
505,
694,
901,
2472,
15231,
13,
632,
4514,
30004,
13,
30004,
13,
1678,
565,
1667,
29918,
29879,
375,
1839,
22034,
786,
362,
2033,
1275,
525,
7610,
25339,
2396,
30004,
13,
4706,
26085,
29889,
4397,
877,
1576,
20105,
262,
6363,
920,
304,
671,
263,
889,
1607,
525,
8443,
13,
1678,
25342,
1667,
29918,
29879,
375,
1839,
22034,
786,
362,
2033,
1275,
525,
18237,
272,
2396,
30004,
13,
4706,
26085,
29889,
4397,
877,
1576,
20105,
262,
6363,
920,
304,
671,
263,
885,
790,
272,
525,
8443,
13,
1678,
25342,
1667,
29918,
29879,
375,
1839,
22034,
786,
362,
2033,
1275,
376,
7168,
1115,
30004,
13,
4706,
26085,
29889,
4397,
877,
1576,
20105,
262,
1818,
763,
278,
1616,
525,
8443,
13,
1678,
1683,
29901,
30004,
13,
4706,
26085,
29889,
4397,
877,
1576,
20105,
262,
471,
263,
694,
711,
1495,
30004,
13,
1678,
1065,
29918,
4537,
30004,
13,
1678,
736,
12326,
29879,
29892,
1667,
29918,
29879,
375,
29892,
26085,
29892,
1304,
29918,
1066,
2187,
30004,
13,
2
] |
utils/config_import.py | pyoor/distiller | 30 | 73435 | <reponame>pyoor/distiller
import yaml
import os
import shutil
import sqlite3
import sys
class DistillerConfig:
def __init__(self, config_file, section):
self.config = read_config(config_file, section)
try:
self.project_name = self.config['name']
except KeyError:
raise Exception(" Project name not defined.")
self.trace_queue = "%s-trace-queue" % self.project_name
self.trace_results = "%s-trace-results" % self.project_name
self.min_queue = "%s-min-queue" % self.project_name
self.min_results = "%s-min-results" % self.project_name
try:
self.operations = self.config['operations']
if len(self.operations) == 0:
raise Exception("You must select atleast one mode of operation.")
except:
raise Exception("You must select atleast one mode of operation.")
try:
self.mode = self.config['filter']['mode']
self.modules = self.config['modules']
except KeyError:
# Optional arguments
self.mode = None
self.modules = None
if section == "server":
try:
self.seed_dir = self.config['seed_dir']
except KeyError:
raise Exception("No working path defined.")
try:
self.working_dir = self.config['working_dir']
except KeyError:
raise Exception("No working path defined.")
self.project_dir = os.path.join(self.working_dir, self.project_name)
self.db_path = os.path.join(self.project_dir, "backup.db")
self.min_dir = os.path.join(self.project_dir, "minimized")
self.trace_dir = os.path.join(self.project_dir, "traces")
self.results_dir = os.path.join(self.project_dir, "results")
if os.path.isdir(self.project_dir):
action = None
while action != "R" and action != "A":
action = raw_input("Project Exists! Replace or Append? [R/A]: ").upper()
if action == "R":
confirm = None
while confirm != "Y" and confirm != "N":
confirm = raw_input("Are you sure? All data will be deleted! [Y/N]: ").upper()
if confirm == "Y":
shutil.rmtree(self.project_dir)
os.makedirs(self.project_dir)
os.makedirs(self.min_dir)
os.makedirs(self.trace_dir)
os.makedirs(self.results_dir)
sql = sqlite3.connect(self.db_path)
c = sql.cursor()
c.execute('BEGIN TRANSACTION')
c.execute('''CREATE TABLE IF NOT EXISTS modules
(num INTEGER PRIMARY KEY, name TEXT, UNIQUE (name))''')
c.execute('''CREATE TABLE IF NOT EXISTS seeds
(num INTEGER PRIMARY KEY, seed_name TEXT, trace_name TEXT, ublock_cnt INT, UNIQUE (seed_name))''')
c.execute('''CREATE TABLE IF NOT EXISTS master_lookup
(bblock TEXT PRIMARY KEY)''')
# Results are calculated using the full data set - Wipe if they exist!
c.execute('''DROP TABLE IF EXISTS results''')
c.execute('''CREATE TABLE results (name TEXT PRIMARY KEY, ublock_cnt INT)''')
sql.commit()
else:
sys.exit()
elif section == "client":
try:
self.host = self.config['host']
except KeyError:
raise Exception("No host defined.")
try:
self.drio_path = self.config['drio_path']
if not os.path.isfile(self.drio_path):
raise Exception("Can not find DynamoRio - %s" % self.drio_path)
except KeyError:
raise Exception("No DynamoRio path defined.")
try:
self.target_path = self.config['target_path']
if not os.path.isfile(self.target_path):
raise Exception("Can not find target - %s" % self.target_path)
except KeyError:
raise Exception("No target path defined.")
try:
self.w_time = self.config['wait_time']
except KeyError:
raise Exception("No wait time defined.")
try:
self.m_time = self.config['max_timeout']
except KeyError:
raise Exception("No max timeout defined.")
# Optional args
try:
self.target_args = self.config['target_args']
if self.target_args is None:
self.target_args = ''
except KeyError:
self.target_args = None
try:
self.pre_cmd = self.config['pre_cmd']
except KeyError:
self.pre_cmd = None
try:
self.post_cmd = self.config['post_cmd']
except KeyError:
self.post_cmd = None
def read_config(config_file, section):
sections = ['project', section]
with open(config_file, 'r') as stream:
data = yaml.load(stream)
config = {}
try:
for section in sections:
for k, v in data[section].iteritems():
config[k] = v
except KeyError:
raise Exception(" Unable to find section %s" % section)
return config
| [
1,
529,
276,
1112,
420,
29958,
2272,
16946,
29914,
5721,
5495,
13,
5215,
343,
8807,
13,
5215,
2897,
13,
5215,
528,
4422,
13,
5215,
21120,
29941,
13,
5215,
10876,
13,
13,
13,
1990,
6652,
5495,
3991,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2295,
29918,
1445,
29892,
4004,
1125,
13,
4706,
1583,
29889,
2917,
353,
1303,
29918,
2917,
29898,
2917,
29918,
1445,
29892,
4004,
29897,
13,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
4836,
29918,
978,
353,
1583,
29889,
2917,
1839,
978,
2033,
13,
4706,
5174,
7670,
2392,
29901,
13,
9651,
12020,
8960,
703,
8010,
1024,
451,
3342,
23157,
13,
13,
4706,
1583,
29889,
15003,
29918,
9990,
353,
11860,
29879,
29899,
15003,
29899,
9990,
29908,
1273,
1583,
29889,
4836,
29918,
978,
13,
4706,
1583,
29889,
15003,
29918,
9902,
353,
11860,
29879,
29899,
15003,
29899,
9902,
29908,
1273,
1583,
29889,
4836,
29918,
978,
13,
4706,
1583,
29889,
1195,
29918,
9990,
353,
11860,
29879,
29899,
1195,
29899,
9990,
29908,
1273,
1583,
29889,
4836,
29918,
978,
13,
4706,
1583,
29889,
1195,
29918,
9902,
353,
11860,
29879,
29899,
1195,
29899,
9902,
29908,
1273,
1583,
29889,
4836,
29918,
978,
13,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
3372,
800,
353,
1583,
29889,
2917,
1839,
3372,
800,
2033,
13,
9651,
565,
7431,
29898,
1311,
29889,
3372,
800,
29897,
1275,
29871,
29900,
29901,
13,
18884,
12020,
8960,
703,
3492,
1818,
1831,
472,
280,
579,
697,
4464,
310,
5858,
23157,
13,
4706,
5174,
29901,
13,
9651,
12020,
8960,
703,
3492,
1818,
1831,
472,
280,
579,
697,
4464,
310,
5858,
23157,
13,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
8513,
353,
1583,
29889,
2917,
1839,
4572,
16215,
8513,
2033,
13,
9651,
1583,
29889,
7576,
353,
1583,
29889,
2917,
1839,
7576,
2033,
13,
4706,
5174,
7670,
2392,
29901,
13,
9651,
396,
28379,
6273,
13,
9651,
1583,
29889,
8513,
353,
6213,
13,
9651,
1583,
29889,
7576,
353,
6213,
13,
13,
4706,
565,
4004,
1275,
376,
2974,
1115,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
26776,
29918,
3972,
353,
1583,
29889,
2917,
1839,
26776,
29918,
3972,
2033,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
12020,
8960,
703,
3782,
1985,
2224,
3342,
23157,
13,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
22899,
29918,
3972,
353,
1583,
29889,
2917,
1839,
22899,
29918,
3972,
2033,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
12020,
8960,
703,
3782,
1985,
2224,
3342,
23157,
13,
13,
9651,
1583,
29889,
4836,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
22899,
29918,
3972,
29892,
1583,
29889,
4836,
29918,
978,
29897,
13,
9651,
1583,
29889,
2585,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
4836,
29918,
3972,
29892,
376,
1627,
786,
29889,
2585,
1159,
13,
9651,
1583,
29889,
1195,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
4836,
29918,
3972,
29892,
376,
1195,
326,
1891,
1159,
13,
9651,
1583,
29889,
15003,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
4836,
29918,
3972,
29892,
376,
3018,
778,
1159,
13,
9651,
1583,
29889,
9902,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
4836,
29918,
3972,
29892,
376,
9902,
1159,
13,
13,
9651,
565,
2897,
29889,
2084,
29889,
275,
3972,
29898,
1311,
29889,
4836,
29918,
3972,
1125,
13,
18884,
3158,
353,
6213,
13,
18884,
1550,
3158,
2804,
376,
29934,
29908,
322,
3158,
2804,
376,
29909,
1115,
13,
462,
1678,
3158,
353,
10650,
29918,
2080,
703,
7653,
1222,
2879,
29991,
22108,
470,
22871,
29973,
518,
29934,
29914,
29909,
5387,
376,
467,
21064,
580,
13,
13,
18884,
565,
3158,
1275,
376,
29934,
1115,
13,
462,
1678,
9659,
353,
6213,
13,
462,
1678,
1550,
9659,
2804,
376,
29979,
29908,
322,
9659,
2804,
376,
29940,
1115,
13,
462,
4706,
9659,
353,
10650,
29918,
2080,
703,
17506,
366,
1854,
29973,
29871,
2178,
848,
674,
367,
11132,
29991,
518,
29979,
29914,
29940,
5387,
376,
467,
21064,
580,
13,
13,
462,
1678,
565,
9659,
1275,
376,
29979,
1115,
13,
462,
4706,
528,
4422,
29889,
1758,
8336,
29898,
1311,
29889,
4836,
29918,
3972,
29897,
13,
462,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
1311,
29889,
4836,
29918,
3972,
29897,
13,
462,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
1311,
29889,
1195,
29918,
3972,
29897,
13,
462,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
1311,
29889,
15003,
29918,
3972,
29897,
13,
462,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
1311,
29889,
9902,
29918,
3972,
29897,
13,
13,
462,
4706,
4576,
353,
21120,
29941,
29889,
6915,
29898,
1311,
29889,
2585,
29918,
2084,
29897,
13,
462,
4706,
274,
353,
4576,
29889,
18127,
580,
13,
462,
4706,
274,
29889,
7978,
877,
29933,
17958,
10014,
2190,
8132,
9838,
1495,
13,
462,
4706,
274,
29889,
7978,
877,
4907,
27045,
10911,
10762,
6058,
28731,
10585,
13,
462,
9651,
313,
1949,
2672,
4330,
17070,
29778,
14636,
29892,
1024,
323,
12194,
29892,
8291,
29902,
11144,
313,
978,
876,
4907,
1495,
13,
462,
4706,
274,
29889,
7978,
877,
4907,
27045,
10911,
10762,
6058,
28731,
409,
5779,
13,
462,
9651,
313,
1949,
2672,
4330,
17070,
29778,
14636,
29892,
16717,
29918,
978,
323,
12194,
29892,
9637,
29918,
978,
323,
12194,
29892,
318,
1271,
29918,
20047,
19578,
29892,
8291,
29902,
11144,
313,
26776,
29918,
978,
876,
4907,
1495,
13,
462,
4706,
274,
29889,
7978,
877,
4907,
27045,
10911,
10762,
6058,
28731,
5835,
29918,
20401,
13,
462,
9651,
313,
29890,
1271,
323,
12194,
29778,
14636,
29897,
4907,
1495,
13,
13,
462,
4706,
396,
17212,
526,
12833,
773,
278,
2989,
848,
731,
448,
14570,
412,
565,
896,
1863,
29991,
13,
462,
4706,
274,
29889,
7978,
877,
4907,
29928,
29366,
10911,
10762,
28731,
2582,
4907,
1495,
13,
462,
4706,
274,
29889,
7978,
877,
4907,
27045,
10911,
2582,
313,
978,
323,
12194,
29778,
14636,
29892,
318,
1271,
29918,
20047,
19578,
29897,
4907,
1495,
13,
462,
4706,
4576,
29889,
15060,
580,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
10876,
29889,
13322,
580,
13,
13,
4706,
25342,
4004,
1275,
376,
4645,
1115,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
3069,
353,
1583,
29889,
2917,
1839,
3069,
2033,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
12020,
8960,
703,
3782,
3495,
3342,
23157,
13,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
29881,
5378,
29918,
2084,
353,
1583,
29889,
2917,
1839,
29881,
5378,
29918,
2084,
2033,
13,
18884,
565,
451,
2897,
29889,
2084,
29889,
275,
1445,
29898,
1311,
29889,
29881,
5378,
29918,
2084,
1125,
13,
462,
1678,
12020,
8960,
703,
6028,
451,
1284,
22554,
29877,
29934,
601,
448,
1273,
29879,
29908,
1273,
1583,
29889,
29881,
5378,
29918,
2084,
29897,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
12020,
8960,
703,
3782,
22554,
29877,
29934,
601,
2224,
3342,
23157,
13,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
5182,
29918,
2084,
353,
1583,
29889,
2917,
1839,
5182,
29918,
2084,
2033,
13,
18884,
565,
451,
2897,
29889,
2084,
29889,
275,
1445,
29898,
1311,
29889,
5182,
29918,
2084,
1125,
13,
462,
1678,
12020,
8960,
703,
6028,
451,
1284,
3646,
448,
1273,
29879,
29908,
1273,
1583,
29889,
5182,
29918,
2084,
29897,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
12020,
8960,
703,
3782,
3646,
2224,
3342,
23157,
13,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
29893,
29918,
2230,
353,
1583,
29889,
2917,
1839,
10685,
29918,
2230,
2033,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
12020,
8960,
703,
3782,
4480,
931,
3342,
23157,
13,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
29885,
29918,
2230,
353,
1583,
29889,
2917,
1839,
3317,
29918,
15619,
2033,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
12020,
8960,
703,
3782,
4236,
11815,
3342,
23157,
13,
13,
9651,
396,
28379,
6389,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
5182,
29918,
5085,
353,
1583,
29889,
2917,
1839,
5182,
29918,
5085,
2033,
13,
18884,
565,
1583,
29889,
5182,
29918,
5085,
338,
6213,
29901,
13,
462,
1678,
1583,
29889,
5182,
29918,
5085,
353,
6629,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
1583,
29889,
5182,
29918,
5085,
353,
6213,
13,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
1457,
29918,
9006,
353,
1583,
29889,
2917,
1839,
1457,
29918,
9006,
2033,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
1583,
29889,
1457,
29918,
9006,
353,
6213,
13,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
2490,
29918,
9006,
353,
1583,
29889,
2917,
1839,
2490,
29918,
9006,
2033,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
1583,
29889,
2490,
29918,
9006,
353,
6213,
13,
13,
13,
1753,
1303,
29918,
2917,
29898,
2917,
29918,
1445,
29892,
4004,
1125,
13,
1678,
13926,
353,
6024,
4836,
742,
4004,
29962,
13,
13,
1678,
411,
1722,
29898,
2917,
29918,
1445,
29892,
525,
29878,
1495,
408,
4840,
29901,
13,
4706,
848,
353,
343,
8807,
29889,
1359,
29898,
5461,
29897,
13,
13,
1678,
2295,
353,
6571,
13,
13,
1678,
1018,
29901,
13,
4706,
363,
4004,
297,
13926,
29901,
13,
9651,
363,
413,
29892,
325,
297,
848,
29961,
2042,
1822,
1524,
7076,
7295,
13,
18884,
2295,
29961,
29895,
29962,
353,
325,
13,
1678,
5174,
7670,
2392,
29901,
13,
4706,
12020,
8960,
703,
20065,
304,
1284,
4004,
1273,
29879,
29908,
1273,
4004,
29897,
13,
13,
1678,
736,
2295,
13,
2
] |
constants.py | jlduhaime/combatTest | 0 | 1600898 | SCREEN_WIDTH = 640
SCREEN_HEIGHT = 480
FPS = 60
BLACK = (0, 0, 0) | [
1,
12314,
1525,
1430,
29918,
22574,
353,
29871,
29953,
29946,
29900,
13,
7187,
1525,
1430,
29918,
9606,
22530,
353,
29871,
29946,
29947,
29900,
13,
29943,
7024,
353,
29871,
29953,
29900,
13,
13,
13367,
11375,
353,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29897,
2
] |
problems/algoexpert/list/shift_linked_list.py | JayMonari/py-personal | 0 | 79779 | <filename>problems/algoexpert/list/shift_linked_list.py<gh_stars>0
from typing import Optional
class ListNode:
def __init__(self, value: int, _next=None):
self.value: int = value
self.next: Optional[ListNode] = _next
def shift_linked_list(
head: Optional[ListNode],
k: int) -> Optional[ListNode]:
list_length: int = 1
list_tail: Optional[ListNode] = head
while list_tail.next is not None:
list_tail = list_tail.next
list_length += 1
offset: int = abs(k) % list_length
if offset == 0:
return head
new_tail_position: int = list_length - offset if k > 0 else offset
new_tail: Optional[ListNode] = head
for _ in range(1, new_tail_position):
new_tail = new_tail.next
new_head: Optional[ListNode] = new_tail.next
new_tail.next = None
list_tail.next = head
return new_head
| [
1,
529,
9507,
29958,
17199,
29879,
29914,
284,
1484,
735,
10700,
29914,
1761,
29914,
10889,
29918,
2324,
287,
29918,
1761,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
19229,
1053,
28379,
13,
13,
13,
1990,
2391,
4247,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
995,
29901,
938,
29892,
903,
4622,
29922,
8516,
1125,
13,
4706,
1583,
29889,
1767,
29901,
938,
353,
995,
13,
4706,
1583,
29889,
4622,
29901,
28379,
29961,
1293,
4247,
29962,
353,
903,
4622,
13,
13,
13,
1753,
9500,
29918,
2324,
287,
29918,
1761,
29898,
13,
4706,
2343,
29901,
28379,
29961,
1293,
4247,
1402,
13,
4706,
413,
29901,
938,
29897,
1599,
28379,
29961,
1293,
4247,
5387,
13,
1678,
1051,
29918,
2848,
29901,
938,
353,
29871,
29896,
13,
1678,
1051,
29918,
18237,
29901,
28379,
29961,
1293,
4247,
29962,
353,
2343,
13,
1678,
1550,
1051,
29918,
18237,
29889,
4622,
338,
451,
6213,
29901,
13,
4706,
1051,
29918,
18237,
353,
1051,
29918,
18237,
29889,
4622,
13,
4706,
1051,
29918,
2848,
4619,
29871,
29896,
13,
13,
1678,
9210,
29901,
938,
353,
6425,
29898,
29895,
29897,
1273,
1051,
29918,
2848,
13,
1678,
565,
9210,
1275,
29871,
29900,
29901,
13,
4706,
736,
2343,
13,
1678,
716,
29918,
18237,
29918,
3283,
29901,
938,
353,
1051,
29918,
2848,
448,
9210,
565,
413,
1405,
29871,
29900,
1683,
9210,
13,
1678,
716,
29918,
18237,
29901,
28379,
29961,
1293,
4247,
29962,
353,
2343,
13,
1678,
363,
903,
297,
3464,
29898,
29896,
29892,
716,
29918,
18237,
29918,
3283,
1125,
13,
4706,
716,
29918,
18237,
353,
716,
29918,
18237,
29889,
4622,
13,
1678,
716,
29918,
2813,
29901,
28379,
29961,
1293,
4247,
29962,
353,
716,
29918,
18237,
29889,
4622,
13,
1678,
716,
29918,
18237,
29889,
4622,
353,
6213,
13,
1678,
1051,
29918,
18237,
29889,
4622,
353,
2343,
13,
1678,
736,
716,
29918,
2813,
13,
2
] |
scrapytest/spiders/ScrapyDemo.py | liang1024/Scrapy | 0 | 100429 | import scrapy
class QuotesSpider(scrapy.Spider):
name = "demo1"
def start_requests(self):
urls = [
'http://quotes.toscrape.com/page/1/',
'http://quotes.toscrape.com/page/2/',
]
for url in urls:
yield scrapy.Request(url=url, callback=self.parse)
def parse(self, response):
page = response.url.split("/")[-2]
filename = 'demo1-%s.html' % page
with open(filename, 'wb') as f:
f.write(response.body)
self.log('Saved file %s' % filename)
'''
name:识别蜘蛛。它在项目中必须是唯一的,也就是说,您不能为不同的Spiders设置相同的名称。
start_requests():必须返回一个可迭代的请求(您可以返回一个请求列表或写一个生成器函数),Spider将开始爬行。随后的请求将从这些初始请求连续生成。
parse():一种将被调用来处理为每个请求下载的响应的方法。response参数是一个TextResponse保存页面内容的实例,并且还有其他有用的方法来处理它。
该parse()方法通常解析响应,将刮取的数据提取为示例,并且还可以查找新的URL以从中创建新的请求(Request)。
'''
'''
要使我们的蜘蛛工作,请转到项目的顶级目录并运行:
scrapy crawl demo1
现在,检查当前目录下的文件。
您应该注意到,已经创建了两个新文件:quotes-1.html和quotes-2.html,
其中包含各个URL的内容,正如我们的parse方法指示。
''' | [
1,
1053,
24559,
2272,
13,
13,
13,
1990,
751,
4769,
5592,
1241,
29898,
1557,
336,
2272,
29889,
5592,
1241,
1125,
13,
1678,
1024,
353,
376,
17482,
29896,
29908,
13,
13,
1678,
822,
1369,
29918,
24830,
29898,
1311,
1125,
13,
4706,
23942,
353,
518,
13,
9651,
525,
1124,
597,
339,
4769,
29889,
29873,
14174,
336,
412,
29889,
510,
29914,
3488,
29914,
29896,
29914,
742,
13,
9651,
525,
1124,
597,
339,
4769,
29889,
29873,
14174,
336,
412,
29889,
510,
29914,
3488,
29914,
29906,
29914,
742,
13,
4706,
4514,
13,
4706,
363,
3142,
297,
23942,
29901,
13,
9651,
7709,
24559,
2272,
29889,
3089,
29898,
2271,
29922,
2271,
29892,
6939,
29922,
1311,
29889,
5510,
29897,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
2933,
1125,
13,
4706,
1813,
353,
2933,
29889,
2271,
29889,
5451,
11974,
1159,
14352,
29906,
29962,
13,
4706,
10422,
353,
525,
17482,
29896,
19222,
29879,
29889,
1420,
29915,
1273,
1813,
13,
4706,
411,
1722,
29898,
9507,
29892,
525,
29893,
29890,
1495,
408,
285,
29901,
13,
9651,
285,
29889,
3539,
29898,
5327,
29889,
2587,
29897,
13,
4706,
1583,
29889,
1188,
877,
29903,
10511,
934,
1273,
29879,
29915,
1273,
10422,
29897,
13,
13,
12008,
13,
978,
30383,
235,
178,
137,
232,
139,
174,
235,
159,
155,
235,
158,
158,
30267,
232,
177,
134,
30505,
31888,
30895,
30275,
31641,
236,
164,
190,
30392,
232,
151,
178,
30287,
30210,
30214,
30953,
31238,
30392,
31639,
30214,
233,
133,
171,
30413,
30815,
30573,
30413,
30980,
30210,
5592,
11376,
30872,
30669,
30990,
30980,
30210,
30548,
31685,
30267,
13,
2962,
29918,
24830,
580,
30383,
31641,
236,
164,
190,
31086,
30742,
30287,
30502,
30682,
235,
194,
176,
30690,
30210,
31088,
31376,
30419,
233,
133,
171,
30682,
30651,
31086,
30742,
30287,
30502,
31088,
31376,
31025,
30746,
31391,
31479,
30287,
30502,
30486,
30494,
30943,
31629,
30354,
30409,
30214,
5592,
1241,
30998,
31026,
31020,
234,
139,
175,
30448,
30267,
236,
157,
146,
30822,
30210,
31088,
31376,
30998,
31594,
30810,
31959,
31120,
31020,
31088,
31376,
31903,
234,
190,
176,
30486,
30494,
30267,
13,
5510,
580,
30383,
30287,
31893,
30998,
31407,
31268,
30406,
30805,
31548,
30687,
30573,
31951,
30502,
31088,
31376,
30557,
31526,
30210,
232,
150,
144,
31370,
30210,
30525,
30545,
30267,
5327,
31125,
30354,
30392,
30287,
30502,
1626,
5103,
30982,
30946,
31610,
30806,
30728,
31294,
30210,
31195,
31507,
30214,
31666,
231,
187,
151,
31994,
30417,
31149,
31221,
30417,
30406,
30210,
30525,
30545,
30805,
31548,
30687,
232,
177,
134,
30267,
13,
31751,
5510,
580,
30525,
30545,
30768,
31190,
31201,
233,
161,
147,
232,
150,
144,
31370,
30214,
30998,
232,
139,
177,
30683,
30210,
30354,
30763,
31302,
30683,
30573,
30858,
31507,
30214,
31666,
231,
187,
151,
31994,
30682,
30651,
31213,
233,
140,
193,
30374,
30210,
4219,
30651,
31594,
30275,
31441,
30886,
30374,
30210,
31088,
31376,
30419,
3089,
30409,
30267,
13,
13,
12008,
13,
13,
13,
13,
12008,
13,
30698,
30785,
30672,
31381,
30210,
235,
159,
155,
235,
158,
158,
31041,
30732,
30214,
31088,
31415,
30780,
31888,
30895,
30210,
236,
164,
185,
234,
189,
170,
30895,
31283,
31666,
31894,
30448,
30383,
13,
1557,
336,
2272,
29349,
29880,
13455,
29896,
13,
13,
31424,
30505,
30214,
233,
166,
131,
31213,
30948,
30658,
30895,
31283,
30557,
30210,
30333,
30631,
30267,
13,
233,
133,
171,
31370,
31751,
31368,
31474,
30780,
30214,
31290,
31412,
31441,
30886,
30743,
31977,
30502,
30374,
30333,
30631,
30383,
339,
4769,
29899,
29896,
29889,
1420,
30503,
339,
4769,
29899,
29906,
29889,
1420,
30214,
13,
31149,
30275,
31473,
232,
147,
174,
232,
147,
135,
30502,
4219,
30210,
30728,
31294,
30214,
30724,
30847,
30672,
31381,
30210,
5510,
30525,
30545,
31084,
30858,
30267,
13,
12008,
2
] |
old/core/migrations/0005_client.py | rngallen/django_ninja | 0 | 76665 | <filename>old/core/migrations/0005_client.py
# Generated by Django 3.1.7 on 2021-03-21 15:06
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("core", "0004_department_employee"),
]
operations = [
migrations.CreateModel(
name="Client",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("api_key", models.CharField(max_length=50, verbose_name="api_key")),
(
"client",
models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
related_name="client",
to=settings.AUTH_USER_MODEL,
verbose_name="user",
),
),
],
),
]
| [
1,
529,
9507,
29958,
1025,
29914,
3221,
29914,
26983,
800,
29914,
29900,
29900,
29900,
29945,
29918,
4645,
29889,
2272,
13,
29937,
3251,
630,
491,
15337,
29871,
29941,
29889,
29896,
29889,
29955,
373,
29871,
29906,
29900,
29906,
29896,
29899,
29900,
29941,
29899,
29906,
29896,
29871,
29896,
29945,
29901,
29900,
29953,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
29892,
4733,
13,
5215,
9557,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
13,
13,
13,
1990,
341,
16783,
29898,
26983,
800,
29889,
29924,
16783,
1125,
13,
13,
1678,
9962,
353,
518,
13,
4706,
9725,
800,
29889,
2774,
932,
519,
29918,
10836,
29898,
11027,
29889,
20656,
29950,
29918,
11889,
29918,
20387,
29931,
511,
13,
4706,
4852,
3221,
613,
376,
29900,
29900,
29900,
29946,
29918,
311,
8076,
29918,
26143,
4968,
13,
1678,
4514,
13,
13,
1678,
6931,
353,
518,
13,
4706,
9725,
800,
29889,
4391,
3195,
29898,
13,
9651,
1024,
543,
4032,
613,
13,
9651,
4235,
11759,
13,
18884,
313,
13,
462,
1678,
376,
333,
613,
13,
462,
1678,
4733,
29889,
12300,
3073,
29898,
13,
462,
4706,
4469,
29918,
11600,
29922,
5574,
29892,
13,
462,
4706,
7601,
29918,
1989,
29922,
5574,
29892,
13,
462,
4706,
28755,
29922,
8824,
29892,
13,
462,
4706,
26952,
29918,
978,
543,
1367,
613,
13,
462,
1678,
10353,
13,
18884,
10353,
13,
18884,
4852,
2754,
29918,
1989,
613,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29945,
29900,
29892,
26952,
29918,
978,
543,
2754,
29918,
1989,
1159,
511,
13,
18884,
313,
13,
462,
1678,
376,
4645,
613,
13,
462,
1678,
4733,
29889,
6716,
1762,
6716,
3073,
29898,
13,
462,
4706,
373,
29918,
8143,
29922,
14095,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
29889,
29907,
3289,
5454,
2287,
29892,
13,
462,
4706,
4475,
29918,
978,
543,
4645,
613,
13,
462,
4706,
304,
29922,
11027,
29889,
20656,
29950,
29918,
11889,
29918,
20387,
29931,
29892,
13,
462,
4706,
26952,
29918,
978,
543,
1792,
613,
13,
462,
1678,
10353,
13,
18884,
10353,
13,
9651,
21251,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
ptrack/templatetags/ptrack.py | unformatt/django-ptrack | 0 | 139338 | """Ptrack Template Tag"""
import logging
from django import template
from django.utils.html import mark_safe
logger = logging.getLogger(__name__)
register = template.Library()
@register.simple_tag
def ptrack(*args, **kwargs):
"""Generate a tracking pixel html img element."""
from ptrack import create_img
img = create_img(*args, **kwargs)
return mark_safe(img)
| [
1,
9995,
29925,
11294,
25663,
10522,
15945,
29908,
13,
5215,
12183,
13,
13,
3166,
9557,
1053,
4472,
13,
3166,
9557,
29889,
13239,
29889,
1420,
1053,
2791,
29918,
11177,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
9573,
353,
4472,
29889,
12284,
580,
13,
13,
13,
29992,
9573,
29889,
12857,
29918,
4039,
13,
1753,
282,
11294,
10456,
5085,
29892,
3579,
19290,
1125,
13,
1678,
9995,
5631,
403,
263,
23110,
15526,
3472,
10153,
1543,
1213,
15945,
13,
1678,
515,
282,
11294,
1053,
1653,
29918,
2492,
13,
1678,
10153,
353,
1653,
29918,
2492,
10456,
5085,
29892,
3579,
19290,
29897,
13,
1678,
736,
2791,
29918,
11177,
29898,
2492,
29897,
13,
2
] |
hwm3/venv/Lib/site-packages/pymorphy2/opencorpora_dict/parse.py | liubov-volkova/pythondev | 0 | 145514 | # -*- coding: utf-8 -*-
"""
:mod:`pymorphy2.opencorpora_dict.parse` is a
module for OpenCorpora XML dictionaries parsing.
"""
from __future__ import absolute_import, unicode_literals, division
import logging
import collections
try:
from lxml.etree import iterparse
def xml_clear_elem(elem):
elem.clear()
while elem.getprevious() is not None:
del elem.getparent()[0]
except ImportError:
try:
from xml.etree.cElementTree import iterparse
except ImportError:
from xml.etree.ElementTree import iterparse
def xml_clear_elem(elem):
elem.clear()
logger = logging.getLogger(__name__)
ParsedDictionary = collections.namedtuple('ParsedDictionary', 'lexemes links grammemes version revision')
def parse_opencorpora_xml(filename):
"""
Parse OpenCorpora dict XML and return a ``ParsedDictionary`` namedtuple.
"""
links = []
lexemes = {}
grammemes = []
version, revision = None, None
_lexemes_len = 0
for ev, elem in iterparse(filename, events=(str('start'), str('end'))):
if ev == 'start':
if elem.tag == 'dictionary':
version = elem.get('version')
revision = elem.get('revision')
logger.info("dictionary v%s, rev%s", version, revision)
xml_clear_elem(elem)
continue
if elem.tag == 'grammeme':
name = elem.find('name').text
parent = elem.get('parent')
alias = elem.find('alias').text
description = elem.find('description').text
grammeme = (name, parent, alias, description)
grammemes.append(grammeme)
xml_clear_elem(elem)
if elem.tag == 'lemma':
if not lexemes:
logger.info('parsing xml:lemmas...')
lex_id, word_forms = _word_forms_from_xml_elem(elem)
lexemes[lex_id] = word_forms
xml_clear_elem(elem)
elif elem.tag == 'link':
if not links:
logger.info('parsing xml:links...')
link_tuple = (
elem.get('from'),
elem.get('to'),
elem.get('type'),
)
links.append(link_tuple)
xml_clear_elem(elem)
if len(lexemes) != _lexemes_len and not (len(lexemes) % 50000):
logger.debug("%d lexemes parsed" % len(lexemes))
_lexemes_len = len(lexemes)
return ParsedDictionary(lexemes, links, grammemes, version, revision)
def _grammemes_from_elem(elem):
return ",".join(g.get('v') for g in elem.findall('g'))
def _word_forms_from_xml_elem(elem):
"""
Return a list of (word, tag) pairs given "lemma" XML element.
"""
lexeme = []
lex_id = elem.get('id')
if len(elem) == 0: # deleted lexeme?
return lex_id, lexeme
base_info = elem.findall('l')
assert len(base_info) == 1
base_grammemes = _grammemes_from_elem(base_info[0])
for form_elem in elem.findall('f'):
grammemes = _grammemes_from_elem(form_elem)
form = form_elem.get('t').lower()
lexeme.append(
(form, " ".join([base_grammemes, grammemes]).strip())
)
return lex_id, lexeme
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
29901,
1545,
18078,
29886,
962,
5676,
29891,
29906,
29889,
3150,
2616,
1971,
29874,
29918,
8977,
29889,
5510,
29952,
338,
263,
13,
5453,
363,
4673,
12521,
1971,
29874,
6560,
21503,
4314,
13755,
29889,
13,
15945,
29908,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
29104,
29918,
20889,
1338,
29892,
8542,
13,
13,
5215,
12183,
13,
5215,
16250,
13,
13,
2202,
29901,
13,
1678,
515,
301,
3134,
29889,
300,
929,
1053,
4256,
5510,
13,
13,
1678,
822,
4903,
29918,
8551,
29918,
20461,
29898,
20461,
1125,
13,
4706,
21268,
29889,
8551,
580,
13,
4706,
1550,
21268,
29889,
657,
24957,
580,
338,
451,
6213,
29901,
13,
9651,
628,
21268,
29889,
657,
3560,
580,
29961,
29900,
29962,
13,
13,
19499,
16032,
2392,
29901,
13,
1678,
1018,
29901,
13,
4706,
515,
4903,
29889,
300,
929,
29889,
29883,
2642,
9643,
1053,
4256,
5510,
13,
1678,
5174,
16032,
2392,
29901,
13,
4706,
515,
4903,
29889,
300,
929,
29889,
2642,
9643,
1053,
4256,
5510,
13,
13,
1678,
822,
4903,
29918,
8551,
29918,
20461,
29898,
20461,
1125,
13,
4706,
21268,
29889,
8551,
580,
13,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
29925,
1503,
287,
11513,
353,
16250,
29889,
17514,
23583,
877,
29925,
1503,
287,
11513,
742,
525,
2506,
13826,
2988,
867,
4850,
13826,
1873,
26554,
1495,
13,
13,
13,
1753,
6088,
29918,
3150,
2616,
1971,
29874,
29918,
3134,
29898,
9507,
1125,
13,
1678,
9995,
13,
1678,
20969,
4673,
12521,
1971,
29874,
9657,
6560,
322,
736,
263,
4954,
29925,
1503,
287,
11513,
16159,
4257,
23583,
29889,
13,
1678,
9995,
13,
13,
1678,
2988,
353,
5159,
13,
1678,
19566,
13826,
353,
6571,
13,
1678,
867,
4850,
13826,
353,
5159,
13,
1678,
1873,
29892,
26554,
353,
6213,
29892,
6213,
13,
1678,
903,
2506,
13826,
29918,
2435,
353,
29871,
29900,
13,
13,
1678,
363,
3415,
29892,
21268,
297,
4256,
5510,
29898,
9507,
29892,
4959,
7607,
710,
877,
2962,
5477,
851,
877,
355,
8785,
1125,
13,
13,
4706,
565,
3415,
1275,
525,
2962,
2396,
13,
9651,
565,
21268,
29889,
4039,
1275,
525,
27126,
2396,
13,
18884,
1873,
353,
21268,
29889,
657,
877,
3259,
1495,
13,
18884,
26554,
353,
21268,
29889,
657,
877,
276,
4924,
1495,
13,
18884,
17927,
29889,
3888,
703,
27126,
325,
29995,
29879,
29892,
6664,
29995,
29879,
613,
1873,
29892,
26554,
29897,
13,
18884,
4903,
29918,
8551,
29918,
20461,
29898,
20461,
29897,
13,
9651,
6773,
13,
13,
4706,
565,
21268,
29889,
4039,
1275,
525,
1393,
29885,
2004,
2396,
13,
9651,
1024,
353,
21268,
29889,
2886,
877,
978,
2824,
726,
13,
9651,
3847,
353,
21268,
29889,
657,
877,
3560,
1495,
13,
9651,
13995,
353,
21268,
29889,
2886,
877,
19973,
2824,
726,
13,
9651,
6139,
353,
21268,
29889,
2886,
877,
8216,
2824,
726,
13,
13,
9651,
867,
4850,
2004,
353,
313,
978,
29892,
3847,
29892,
13995,
29892,
6139,
29897,
13,
9651,
867,
4850,
13826,
29889,
4397,
29898,
1393,
29885,
2004,
29897,
13,
9651,
4903,
29918,
8551,
29918,
20461,
29898,
20461,
29897,
13,
13,
4706,
565,
21268,
29889,
4039,
1275,
525,
13846,
2396,
13,
9651,
565,
451,
19566,
13826,
29901,
13,
18884,
17927,
29889,
3888,
877,
862,
2976,
4903,
29901,
2409,
8247,
856,
1495,
13,
13,
9651,
19566,
29918,
333,
29892,
1734,
29918,
9514,
353,
903,
1742,
29918,
9514,
29918,
3166,
29918,
3134,
29918,
20461,
29898,
20461,
29897,
13,
9651,
19566,
13826,
29961,
2506,
29918,
333,
29962,
353,
1734,
29918,
9514,
13,
9651,
4903,
29918,
8551,
29918,
20461,
29898,
20461,
29897,
13,
13,
4706,
25342,
21268,
29889,
4039,
1275,
525,
2324,
2396,
13,
9651,
565,
451,
2988,
29901,
13,
18884,
17927,
29889,
3888,
877,
862,
2976,
4903,
29901,
4965,
856,
1495,
13,
13,
9651,
1544,
29918,
23583,
353,
313,
13,
18884,
21268,
29889,
657,
877,
3166,
5477,
13,
18884,
21268,
29889,
657,
877,
517,
5477,
13,
18884,
21268,
29889,
657,
877,
1853,
5477,
13,
9651,
1723,
13,
9651,
2988,
29889,
4397,
29898,
2324,
29918,
23583,
29897,
13,
9651,
4903,
29918,
8551,
29918,
20461,
29898,
20461,
29897,
13,
13,
4706,
565,
7431,
29898,
2506,
13826,
29897,
2804,
903,
2506,
13826,
29918,
2435,
322,
451,
313,
2435,
29898,
2506,
13826,
29897,
1273,
29871,
29945,
29900,
29900,
29900,
29900,
1125,
13,
9651,
17927,
29889,
8382,
11702,
29881,
19566,
13826,
21213,
29908,
1273,
7431,
29898,
2506,
13826,
876,
13,
9651,
903,
2506,
13826,
29918,
2435,
353,
7431,
29898,
2506,
13826,
29897,
13,
13,
1678,
736,
1459,
8485,
11513,
29898,
2506,
13826,
29892,
2988,
29892,
867,
4850,
13826,
29892,
1873,
29892,
26554,
29897,
13,
13,
13,
1753,
903,
1393,
6954,
267,
29918,
3166,
29918,
20461,
29898,
20461,
1125,
13,
1678,
736,
9162,
1642,
7122,
29898,
29887,
29889,
657,
877,
29894,
1495,
363,
330,
297,
21268,
29889,
2886,
497,
877,
29887,
8785,
13,
13,
13,
1753,
903,
1742,
29918,
9514,
29918,
3166,
29918,
3134,
29918,
20461,
29898,
20461,
1125,
13,
1678,
9995,
13,
1678,
7106,
263,
1051,
310,
313,
1742,
29892,
4055,
29897,
11000,
2183,
376,
13846,
29908,
6560,
1543,
29889,
13,
1678,
9995,
13,
1678,
19566,
2004,
353,
5159,
13,
1678,
19566,
29918,
333,
353,
21268,
29889,
657,
877,
333,
1495,
13,
13,
1678,
565,
7431,
29898,
20461,
29897,
1275,
29871,
29900,
29901,
29871,
396,
11132,
19566,
2004,
29973,
13,
4706,
736,
19566,
29918,
333,
29892,
19566,
2004,
13,
13,
1678,
2967,
29918,
3888,
353,
21268,
29889,
2886,
497,
877,
29880,
1495,
13,
13,
1678,
4974,
7431,
29898,
3188,
29918,
3888,
29897,
1275,
29871,
29896,
13,
1678,
2967,
29918,
1393,
6954,
267,
353,
903,
1393,
6954,
267,
29918,
3166,
29918,
20461,
29898,
3188,
29918,
3888,
29961,
29900,
2314,
13,
13,
1678,
363,
883,
29918,
20461,
297,
21268,
29889,
2886,
497,
877,
29888,
29374,
13,
4706,
867,
4850,
13826,
353,
903,
1393,
6954,
267,
29918,
3166,
29918,
20461,
29898,
689,
29918,
20461,
29897,
13,
4706,
883,
353,
883,
29918,
20461,
29889,
657,
877,
29873,
2824,
13609,
580,
13,
4706,
19566,
2004,
29889,
4397,
29898,
13,
9651,
313,
689,
29892,
376,
11393,
7122,
4197,
3188,
29918,
1393,
6954,
267,
29892,
867,
4850,
13826,
14664,
17010,
3101,
13,
4706,
1723,
13,
13,
1678,
736,
19566,
29918,
333,
29892,
19566,
2004,
13,
2
] |
uppergeodesic.py | drewitz/VIPer | 0 | 65703 | #!/usr/bin/env python3
# class file uppergeodesic.py
# started as a script to visualize what happens to hyperbolic plane
# if different isometries act on it
import geodesic as gd
import numpy as np
import numpy.linalg as lina
import matplotlib.pyplot as plt
# upper half space as the basic model
class UpperGeodesic(gd.Geodesic):
"""UpperGeodesic line in upper half space
takes endpoints on boundary as arguments
stores x and y data as points in x and y
string "inf" is point at infinity, i.e. y=inf
"""
xmin = 0
xmax = 0
ymin = 0 # just for consistency, shouldn't change
ymax = 0
inf = "inf"
def __init__(self, a, b, color="b", label=''):
"""initialize UpperGeodesic by endpoints
a, b - x values of the endpoints or "inf" if infinity
res is resolution
"""
super().__init__(a, b, color, label)
# adjust the boundaries of hyperbolic space
if self.start != UpperGeodesic.inf:
if self.start < UpperGeodesic.xmin:
UpperGeodesic.xmin = self.start
if self.end > UpperGeodesic.xmax:
UpperGeodesic.xmax = self.end
UpperGeodesic.ymax = (UpperGeodesic.xmax - UpperGeodesic.xmin)/2
@classmethod
def vertical(cls, real):
return cls(cls.inf, real)
@classmethod
def from_midpoint_and_radius(cls, m, r):
"""
m is only the real part of the circle thing
"""
return cls(m-r, m+r)
def sort_se(self):
"""sort start and end"""
if self.end == self.inf:
# just want to assume that the first value is inf if any
self.end = self.start
self.start = self.inf
if self.start != self.inf and self.end < self.start:
# swap a and self.end such that a < self.end
c = self.start
self.start = self.end
self.end = c
def get_data(self):
if self.start == UpperGeodesic.inf:
# vertical line
xs = [self.end, self.end]
ys = [self.ymin, self.ymax]
else:
# calculate semicircle
t = np.linspace(0, np.pi, self.res)
r = (self.end - self.start)/2
xs = r*(1 + np.cos(t)) + self.start
ys = r*np.sin(t)
return(xs, ys)
## the next two functions create new geodesics from existing ones
def new_geod(self, a, b, c, d):
"""return new geodesic by received by moebius trafo
apply the matrix
| a b |
| c d |
on the geodesic self and return the resulting geodesic
"""
start = self.apply_moebius(a, b, c, d, self.start)
end = self.apply_moebius(a, b, c, d, self.end)
return(UpperGeodesic(start, end))
def new_from_matrix(self, M):
return self.new_geod(M[0,0], M[0,1], M[1,0], M[1,1])
## apply transformations to ONE geodesic
def apply_matrix(self, M):
self.start = self.apply_moebius(M[0,0], M[0,1], M[1, 0], M[1,1],
self.start)
self.end = self.apply_moebius(M[0,0], M[0,1], M[1, 0], M[1,1],
self.end)
self.sort_se()
def translate_one_geod(self, dx):
if self.start != UpperGeodesic.inf:
self.start += dx
if self.end != UpperGeodesic.inf:
self.end += dx
def translate_one_at_zero(self, dx):
"""inverts at unit sphere, translates and inverts again"""
a = self.inversion_on_unit_circle(self.start)
b = self.inversion_on_unit_circle(self.end)
if a != UpperGeodesic.inf:
a += dx
if b != UpperGeodesic.inf:
b += dx
self.start = self.inversion_on_unit_circle(a)
self.end = self.inversion_on_unit_circle(b)
self.sort_se()
def rotate_one_geod(self, phi):
"""rotates the geodesic on upper half space
conjugate to a rotation around origin in the disc model
"""
if self.start == UpperGeodesic.inf:
alpha = -np.pi/2
else:
alpha = self.from_upper_to_disc(self.start)
beta = self.from_upper_to_disc(self.end)
alpha += phi
beta += phi
self.start = self.from_disc_to_upper(alpha)
self.end = self.from_disc_to_upper(beta)
self.sort_se()
def hyperbolic_translate_one(self, dmult=1.001):
"""translates one geodesic along UpperGeodesic(-1,1)"""
diag = (dmult + 1.0/dmult)/2.0
off = (1.0/dmult - dmult)/2.0
matrix = np.matrix([[diag, off], [off, diag]])
self.apply_matrix(matrix)
# tesselate hyperbolic space
@classmethod
def tesselate(self, depth=10):
"""Tesselates according to SL(2,Z)"""
g0 = UpperGeodesic(-1,1, "r")
g1 = UpperGeodesic(-0.5,self.inf, "r")
g2 = UpperGeodesic(0.5,self.inf, "r")
first = [g0,g1,g2]
for k in range(1, depth):
for g in first:
g.new_geod(1, k, 0, 1)
g.new_geod(1, -k, 0, 1)
kmax = len(UpperGeodesic.all_geods)
for geod in UpperGeodesic.all_geods[:kmax]:
temp = [geod.new_geod(0, -1, 1, 0)]
for k in range(1, 2*depth):
temp.append(geod.new_geod(1, 0, k, 1))
temp.append(geod.new_geod(1, 0, -k, 1))
for k in range(1, depth//2):
for t in temp:
t.new_geod(1, k, 0, 1)
t.new_geod(1, -k, 0, 1)
UpperGeodesic.xmin= -3
UpperGeodesic.xmax= 3
UpperGeodesic.ymax= 3
## plot commands
@classmethod
def set_plot_limits(cls):
highest = max(abs(i)
for i in [cls.ymin, cls.ymax, cls.xmax, cls.xmin])
cls.ax.axis([-highest, highest, 0, highest])
@classmethod
def plot_all(cls):
if UpperGeodesic.ymax <= UpperGeodesic.ymin:
UpperGeodesic.ymax = UpperGeodesic.ymin + 1 # else nothing to plot
super().plot_all()
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
29937,
770,
934,
7568,
479,
2631,
293,
29889,
2272,
13,
13,
29937,
4687,
408,
263,
2471,
304,
7604,
675,
825,
5930,
304,
11266,
2095,
293,
10694,
13,
29937,
565,
1422,
338,
3297,
2722,
1044,
373,
372,
13,
13,
5215,
1737,
2631,
293,
408,
330,
29881,
13,
5215,
12655,
408,
7442,
13,
5215,
12655,
29889,
29880,
979,
29887,
408,
301,
1099,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
29937,
7568,
4203,
2913,
408,
278,
6996,
1904,
13,
13,
1990,
24929,
7999,
2631,
293,
29898,
29887,
29881,
29889,
7999,
2631,
293,
1125,
13,
1678,
9995,
26214,
7999,
2631,
293,
1196,
297,
7568,
4203,
2913,
13,
13,
1678,
4893,
1095,
9748,
373,
10452,
408,
6273,
13,
1678,
14422,
921,
322,
343,
848,
408,
3291,
297,
921,
322,
343,
13,
1678,
1347,
376,
7192,
29908,
338,
1298,
472,
27971,
29892,
474,
29889,
29872,
29889,
343,
29922,
7192,
13,
1678,
9995,
13,
268,
13,
1678,
921,
1195,
353,
29871,
29900,
13,
1678,
921,
3317,
353,
29871,
29900,
13,
1678,
343,
1195,
353,
29871,
29900,
396,
925,
363,
5718,
3819,
29892,
9273,
29915,
29873,
1735,
13,
1678,
343,
3317,
353,
29871,
29900,
13,
1678,
3041,
353,
376,
7192,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
263,
29892,
289,
29892,
2927,
543,
29890,
613,
3858,
2433,
29374,
13,
4706,
9995,
24926,
24929,
7999,
2631,
293,
491,
1095,
9748,
13,
13,
4706,
263,
29892,
289,
448,
921,
1819,
310,
278,
1095,
9748,
470,
376,
7192,
29908,
565,
27971,
13,
4706,
620,
338,
10104,
13,
4706,
9995,
13,
13,
4706,
2428,
2141,
1649,
2344,
12035,
29874,
29892,
289,
29892,
2927,
29892,
3858,
29897,
13,
4706,
396,
10365,
278,
24371,
310,
11266,
2095,
293,
2913,
13,
4706,
565,
1583,
29889,
2962,
2804,
24929,
7999,
2631,
293,
29889,
7192,
29901,
13,
9651,
565,
1583,
29889,
2962,
529,
24929,
7999,
2631,
293,
29889,
29916,
1195,
29901,
13,
18884,
24929,
7999,
2631,
293,
29889,
29916,
1195,
353,
1583,
29889,
2962,
13,
4706,
565,
1583,
29889,
355,
1405,
24929,
7999,
2631,
293,
29889,
29916,
3317,
29901,
13,
9651,
24929,
7999,
2631,
293,
29889,
29916,
3317,
353,
1583,
29889,
355,
13,
4706,
24929,
7999,
2631,
293,
29889,
29891,
3317,
353,
313,
26214,
7999,
2631,
293,
29889,
29916,
3317,
448,
24929,
7999,
2631,
293,
29889,
29916,
1195,
6802,
29906,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
11408,
29898,
25932,
29892,
1855,
1125,
13,
4706,
736,
1067,
29879,
29898,
25932,
29889,
7192,
29892,
1855,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
515,
29918,
6563,
3149,
29918,
392,
29918,
13471,
29898,
25932,
29892,
286,
29892,
364,
1125,
13,
4706,
9995,
13,
4706,
286,
338,
871,
278,
1855,
760,
310,
278,
8607,
2655,
13,
4706,
9995,
13,
4706,
736,
1067,
29879,
29898,
29885,
29899,
29878,
29892,
286,
29974,
29878,
29897,
13,
13,
1678,
822,
2656,
29918,
344,
29898,
1311,
1125,
13,
4706,
9995,
6605,
1369,
322,
1095,
15945,
29908,
13,
4706,
565,
1583,
29889,
355,
1275,
1583,
29889,
7192,
29901,
13,
9651,
396,
925,
864,
304,
5251,
393,
278,
937,
995,
338,
3041,
565,
738,
13,
9651,
1583,
29889,
355,
353,
1583,
29889,
2962,
13,
9651,
1583,
29889,
2962,
353,
1583,
29889,
7192,
13,
4706,
565,
1583,
29889,
2962,
2804,
1583,
29889,
7192,
322,
1583,
29889,
355,
529,
1583,
29889,
2962,
29901,
13,
9651,
396,
17945,
263,
322,
1583,
29889,
355,
1316,
393,
263,
529,
1583,
29889,
355,
13,
9651,
274,
353,
1583,
29889,
2962,
13,
9651,
1583,
29889,
2962,
353,
1583,
29889,
355,
13,
9651,
1583,
29889,
355,
353,
274,
13,
13,
1678,
822,
679,
29918,
1272,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
2962,
1275,
24929,
7999,
2631,
293,
29889,
7192,
29901,
13,
9651,
396,
11408,
1196,
13,
9651,
14492,
353,
518,
1311,
29889,
355,
29892,
1583,
29889,
355,
29962,
13,
9651,
343,
29879,
353,
518,
1311,
29889,
962,
262,
29892,
1583,
29889,
29891,
3317,
29962,
13,
4706,
1683,
29901,
13,
9651,
396,
8147,
3031,
293,
2076,
280,
13,
9651,
260,
353,
7442,
29889,
1915,
3493,
29898,
29900,
29892,
7442,
29889,
1631,
29892,
1583,
29889,
690,
29897,
13,
9651,
364,
353,
313,
1311,
29889,
355,
448,
1583,
29889,
2962,
6802,
29906,
13,
9651,
14492,
353,
364,
16395,
29896,
718,
7442,
29889,
3944,
29898,
29873,
876,
718,
1583,
29889,
2962,
13,
9651,
343,
29879,
353,
364,
29930,
9302,
29889,
5223,
29898,
29873,
29897,
13,
4706,
736,
29898,
10351,
29892,
343,
29879,
29897,
13,
13,
1678,
444,
278,
2446,
1023,
3168,
1653,
716,
1737,
2631,
1199,
515,
5923,
6743,
13,
1678,
822,
716,
29918,
479,
397,
29898,
1311,
29892,
263,
29892,
289,
29892,
274,
29892,
270,
1125,
13,
4706,
9995,
2457,
716,
1737,
2631,
293,
491,
4520,
491,
2730,
774,
2482,
1020,
1181,
13,
13,
4706,
3394,
278,
4636,
13,
4706,
891,
263,
289,
891,
13,
4706,
891,
274,
270,
891,
13,
4706,
373,
278,
1737,
2631,
293,
1583,
322,
736,
278,
9819,
1737,
2631,
293,
13,
4706,
9995,
13,
13,
4706,
1369,
353,
1583,
29889,
7302,
29918,
4346,
774,
2482,
29898,
29874,
29892,
289,
29892,
274,
29892,
270,
29892,
1583,
29889,
2962,
29897,
13,
4706,
1095,
353,
1583,
29889,
7302,
29918,
4346,
774,
2482,
29898,
29874,
29892,
289,
29892,
274,
29892,
270,
29892,
1583,
29889,
355,
29897,
13,
13,
4706,
736,
29898,
26214,
7999,
2631,
293,
29898,
2962,
29892,
1095,
876,
13,
13,
1678,
822,
716,
29918,
3166,
29918,
5344,
29898,
1311,
29892,
341,
1125,
13,
4706,
736,
1583,
29889,
1482,
29918,
479,
397,
29898,
29924,
29961,
29900,
29892,
29900,
1402,
341,
29961,
29900,
29892,
29896,
1402,
341,
29961,
29896,
29892,
29900,
1402,
341,
29961,
29896,
29892,
29896,
2314,
13,
13,
1678,
444,
3394,
29304,
304,
6732,
29923,
1737,
2631,
293,
13,
1678,
822,
3394,
29918,
5344,
29898,
1311,
29892,
341,
1125,
13,
4706,
1583,
29889,
2962,
353,
1583,
29889,
7302,
29918,
4346,
774,
2482,
29898,
29924,
29961,
29900,
29892,
29900,
1402,
341,
29961,
29900,
29892,
29896,
1402,
341,
29961,
29896,
29892,
29871,
29900,
1402,
341,
29961,
29896,
29892,
29896,
1402,
13,
462,
462,
4706,
1583,
29889,
2962,
29897,
13,
4706,
1583,
29889,
355,
353,
1583,
29889,
7302,
29918,
4346,
774,
2482,
29898,
29924,
29961,
29900,
29892,
29900,
1402,
341,
29961,
29900,
29892,
29896,
1402,
341,
29961,
29896,
29892,
29871,
29900,
1402,
341,
29961,
29896,
29892,
29896,
1402,
13,
462,
462,
418,
1583,
29889,
355,
29897,
13,
4706,
1583,
29889,
6605,
29918,
344,
580,
13,
13,
1678,
822,
14240,
29918,
650,
29918,
479,
397,
29898,
1311,
29892,
15414,
1125,
13,
4706,
565,
1583,
29889,
2962,
2804,
24929,
7999,
2631,
293,
29889,
7192,
29901,
13,
9651,
1583,
29889,
2962,
4619,
15414,
13,
4706,
565,
1583,
29889,
355,
2804,
24929,
7999,
2631,
293,
29889,
7192,
29901,
13,
9651,
1583,
29889,
355,
4619,
15414,
13,
13,
1678,
822,
14240,
29918,
650,
29918,
271,
29918,
9171,
29898,
1311,
29892,
15414,
1125,
13,
4706,
9995,
262,
369,
1372,
472,
5190,
20745,
29892,
5578,
1078,
322,
297,
369,
1372,
1449,
15945,
29908,
13,
4706,
263,
353,
1583,
29889,
262,
3259,
29918,
265,
29918,
5441,
29918,
16622,
29898,
1311,
29889,
2962,
29897,
13,
4706,
289,
353,
1583,
29889,
262,
3259,
29918,
265,
29918,
5441,
29918,
16622,
29898,
1311,
29889,
355,
29897,
13,
4706,
565,
263,
2804,
24929,
7999,
2631,
293,
29889,
7192,
29901,
13,
9651,
263,
4619,
15414,
13,
4706,
565,
289,
2804,
24929,
7999,
2631,
293,
29889,
7192,
29901,
13,
9651,
289,
4619,
15414,
13,
4706,
1583,
29889,
2962,
353,
1583,
29889,
262,
3259,
29918,
265,
29918,
5441,
29918,
16622,
29898,
29874,
29897,
13,
4706,
1583,
29889,
355,
353,
1583,
29889,
262,
3259,
29918,
265,
29918,
5441,
29918,
16622,
29898,
29890,
29897,
13,
4706,
1583,
29889,
6605,
29918,
344,
580,
13,
13,
1678,
822,
16734,
29918,
650,
29918,
479,
397,
29898,
1311,
29892,
1374,
29875,
1125,
13,
4706,
9995,
5450,
1078,
278,
1737,
2631,
293,
373,
7568,
4203,
2913,
13,
308,
13,
4706,
25482,
403,
304,
263,
13733,
2820,
3978,
297,
278,
2313,
1904,
13,
4706,
9995,
13,
4706,
565,
1583,
29889,
2962,
1275,
24929,
7999,
2631,
293,
29889,
7192,
29901,
13,
9651,
15595,
353,
448,
9302,
29889,
1631,
29914,
29906,
13,
4706,
1683,
29901,
13,
9651,
15595,
353,
1583,
29889,
3166,
29918,
21064,
29918,
517,
29918,
2218,
29883,
29898,
1311,
29889,
2962,
29897,
13,
4706,
21762,
353,
1583,
29889,
3166,
29918,
21064,
29918,
517,
29918,
2218,
29883,
29898,
1311,
29889,
355,
29897,
13,
13,
4706,
15595,
4619,
1374,
29875,
13,
4706,
21762,
4619,
1374,
29875,
13,
13,
4706,
1583,
29889,
2962,
353,
1583,
29889,
3166,
29918,
2218,
29883,
29918,
517,
29918,
21064,
29898,
2312,
29897,
13,
4706,
1583,
29889,
355,
353,
1583,
29889,
3166,
29918,
2218,
29883,
29918,
517,
29918,
21064,
29898,
3571,
29897,
13,
4706,
1583,
29889,
6605,
29918,
344,
580,
13,
13,
1678,
822,
11266,
2095,
293,
29918,
21652,
29918,
650,
29898,
1311,
29892,
270,
4713,
29922,
29896,
29889,
29900,
29900,
29896,
1125,
13,
4706,
9995,
3286,
29880,
1078,
697,
1737,
2631,
293,
3412,
24929,
7999,
2631,
293,
6278,
29896,
29892,
29896,
5513,
15945,
13,
4706,
7936,
353,
313,
29881,
4713,
718,
29871,
29896,
29889,
29900,
29914,
29881,
4713,
6802,
29906,
29889,
29900,
13,
4706,
1283,
353,
313,
29896,
29889,
29900,
29914,
29881,
4713,
448,
270,
4713,
6802,
29906,
29889,
29900,
13,
4706,
4636,
353,
7442,
29889,
5344,
4197,
29961,
6051,
351,
29892,
1283,
1402,
518,
2696,
29892,
7936,
24960,
13,
4706,
1583,
29889,
7302,
29918,
5344,
29898,
5344,
29897,
13,
13,
1678,
396,
260,
25583,
403,
11266,
2095,
293,
2913,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
260,
25583,
403,
29898,
1311,
29892,
10809,
29922,
29896,
29900,
1125,
13,
4706,
9995,
29911,
25583,
1078,
5034,
304,
27146,
29898,
29906,
29892,
29999,
5513,
15945,
13,
4706,
330,
29900,
353,
24929,
7999,
2631,
293,
6278,
29896,
29892,
29896,
29892,
376,
29878,
1159,
13,
4706,
330,
29896,
353,
24929,
7999,
2631,
293,
6278,
29900,
29889,
29945,
29892,
1311,
29889,
7192,
29892,
376,
29878,
1159,
13,
4706,
330,
29906,
353,
24929,
7999,
2631,
293,
29898,
29900,
29889,
29945,
29892,
1311,
29889,
7192,
29892,
376,
29878,
1159,
13,
4706,
937,
353,
518,
29887,
29900,
29892,
29887,
29896,
29892,
29887,
29906,
29962,
13,
4706,
363,
413,
297,
3464,
29898,
29896,
29892,
10809,
1125,
13,
9651,
363,
330,
297,
937,
29901,
13,
18884,
330,
29889,
1482,
29918,
479,
397,
29898,
29896,
29892,
413,
29892,
29871,
29900,
29892,
29871,
29896,
29897,
13,
18884,
330,
29889,
1482,
29918,
479,
397,
29898,
29896,
29892,
448,
29895,
29892,
29871,
29900,
29892,
29871,
29896,
29897,
13,
4706,
413,
3317,
353,
7431,
29898,
26214,
7999,
2631,
293,
29889,
497,
29918,
479,
19653,
29897,
13,
4706,
363,
1737,
397,
297,
24929,
7999,
2631,
293,
29889,
497,
29918,
479,
19653,
7503,
29895,
3317,
5387,
13,
9651,
5694,
353,
518,
479,
397,
29889,
1482,
29918,
479,
397,
29898,
29900,
29892,
448,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
4638,
13,
9651,
363,
413,
297,
3464,
29898,
29896,
29892,
29871,
29906,
29930,
19488,
1125,
13,
18884,
5694,
29889,
4397,
29898,
479,
397,
29889,
1482,
29918,
479,
397,
29898,
29896,
29892,
29871,
29900,
29892,
413,
29892,
29871,
29896,
876,
13,
18884,
5694,
29889,
4397,
29898,
479,
397,
29889,
1482,
29918,
479,
397,
29898,
29896,
29892,
29871,
29900,
29892,
448,
29895,
29892,
29871,
29896,
876,
13,
9651,
363,
413,
297,
3464,
29898,
29896,
29892,
10809,
458,
29906,
1125,
13,
18884,
363,
260,
297,
5694,
29901,
13,
462,
1678,
260,
29889,
1482,
29918,
479,
397,
29898,
29896,
29892,
413,
29892,
29871,
29900,
29892,
29871,
29896,
29897,
13,
462,
1678,
260,
29889,
1482,
29918,
479,
397,
29898,
29896,
29892,
448,
29895,
29892,
29871,
29900,
29892,
29871,
29896,
29897,
13,
13,
4706,
24929,
7999,
2631,
293,
29889,
29916,
1195,
29922,
448,
29941,
13,
4706,
24929,
7999,
2631,
293,
29889,
29916,
3317,
29922,
29871,
29941,
13,
4706,
24929,
7999,
2631,
293,
29889,
29891,
3317,
29922,
29871,
29941,
13,
13,
1678,
444,
6492,
8260,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
731,
29918,
5317,
29918,
12514,
29898,
25932,
1125,
13,
4706,
9939,
353,
4236,
29898,
6897,
29898,
29875,
29897,
13,
462,
418,
363,
474,
297,
518,
25932,
29889,
962,
262,
29892,
1067,
29879,
29889,
29891,
3317,
29892,
1067,
29879,
29889,
29916,
3317,
29892,
1067,
29879,
29889,
29916,
1195,
2314,
13,
4706,
1067,
29879,
29889,
1165,
29889,
8990,
4197,
29899,
9812,
342,
29892,
9939,
29892,
29871,
29900,
29892,
9939,
2314,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6492,
29918,
497,
29898,
25932,
1125,
13,
4706,
565,
24929,
7999,
2631,
293,
29889,
29891,
3317,
5277,
24929,
7999,
2631,
293,
29889,
962,
262,
29901,
13,
9651,
24929,
7999,
2631,
293,
29889,
29891,
3317,
353,
24929,
7999,
2631,
293,
29889,
962,
262,
718,
29871,
29896,
396,
1683,
3078,
304,
6492,
13,
4706,
2428,
2141,
5317,
29918,
497,
580,
13,
2
] |
grodddroid/BranchExplorer/branchexp/explo/tags.py | demirdagemir/thesis | 0 | 1614795 | <gh_stars>0
""" Functions to work with tags and tag files. """
import logging
log = logging.getLogger("branchexp")
def is_method_tag(tag):
return tag.startswith("BEG")
def is_branch_tag(tag):
return tag.startswith("BRA") and not "/" in tag
def is_cond_tag(tag):
return tag.startswith("BRA") and "/" in tag
class TagSet(object):
""" Container for tags, as used by ForceCFI.
A TagSet can contain different types of tags, depending on who computed it:
* method tags, which look like "BEGINN1"
* branch tags, which look like "BRANCHN2"
* cond tags, which look like "BRANCHN3/BRANCHN4"
Method tags can be written by ForceCFI or during the logcat monitoring.
Branches alone are usually only written by logcat or when we compute a set
of branches to force. Cond tags are written exclusively by ForceCFI, to keep
paired together two branches of a same conditional jump. I'm not sure if
it's useful right now but it may be in the future. Beware of not mixing them
with branch tags though!
Attributes:
tags: set of tags (strings)
"""
def __init__(self, tag_filepath = None):
self.reset()
if tag_filepath is not None:
self.load_file(tag_filepath)
def reset(self):
self.tags = set()
def load_file(self, tag_filepath):
self.reset()
with open(tag_filepath, "r") as tag_file:
for line in tag_file.readlines():
self.tags.add(line.strip("\n"))
def write_file(self, tag_filepath):
with open(tag_filepath, "w") as tag_file:
for tag in self.tags:
tag_file.write(tag + "\n")
def get_method_tags(self):
return set([tag for tag in self.tags if is_method_tag(tag)])
def get_branch_tags(self):
return set([tag for tag in self.tags if is_branch_tag(tag)])
def get_cond_tags(self):
return set([tag for tag in self.tags if is_cond_tag(tag)])
def split_cond_in_branches(self, cond):
""" Removes a cond BRANCH1/BRANCH2 from the tags
and adds BRANCH1 and BRANCH2. """
if cond in self.tags:
left_branch, right_branch = cond.split("/")
self.tags.remove(cond)
self.tags.add(left_branch)
self.tags.add(right_branch)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
6680,
29879,
304,
664,
411,
8282,
322,
4055,
2066,
29889,
9995,
13,
13,
5215,
12183,
13,
13,
1188,
353,
12183,
29889,
657,
16363,
703,
17519,
4548,
1159,
13,
13,
13,
1753,
338,
29918,
5696,
29918,
4039,
29898,
4039,
1125,
13,
1678,
736,
4055,
29889,
27382,
2541,
703,
29933,
11787,
1159,
13,
13,
1753,
338,
29918,
17519,
29918,
4039,
29898,
4039,
1125,
13,
1678,
736,
4055,
29889,
27382,
2541,
703,
29933,
4717,
1159,
322,
451,
5591,
29908,
297,
4055,
13,
13,
1753,
338,
29918,
1116,
29918,
4039,
29898,
4039,
1125,
13,
1678,
736,
4055,
29889,
27382,
2541,
703,
29933,
4717,
1159,
322,
5591,
29908,
297,
4055,
13,
13,
13,
1990,
10522,
2697,
29898,
3318,
1125,
13,
1678,
9995,
21679,
363,
8282,
29892,
408,
1304,
491,
11004,
29907,
3738,
29889,
13,
13,
1678,
319,
10522,
2697,
508,
1712,
1422,
4072,
310,
8282,
29892,
8679,
373,
1058,
15712,
372,
29901,
13,
13,
1678,
334,
1158,
8282,
29892,
607,
1106,
763,
376,
29933,
17958,
29940,
29896,
29908,
13,
1678,
334,
5443,
8282,
29892,
607,
1106,
763,
376,
15176,
2190,
3210,
29940,
29906,
29908,
13,
1678,
334,
2148,
8282,
29892,
607,
1106,
763,
376,
15176,
2190,
3210,
29940,
29941,
29914,
15176,
2190,
3210,
29940,
29946,
29908,
13,
13,
1678,
8108,
8282,
508,
367,
3971,
491,
11004,
29907,
3738,
470,
2645,
278,
1480,
4117,
29652,
29889,
13,
1678,
25889,
267,
7432,
526,
5491,
871,
3971,
491,
1480,
4117,
470,
746,
591,
10272,
263,
731,
13,
1678,
310,
14202,
304,
4889,
29889,
11790,
8282,
526,
3971,
13489,
3598,
491,
11004,
29907,
3738,
29892,
304,
3013,
13,
1678,
3300,
2859,
4208,
1023,
14202,
310,
263,
1021,
15047,
12500,
29889,
306,
29915,
29885,
451,
1854,
565,
13,
1678,
372,
29915,
29879,
5407,
1492,
1286,
541,
372,
1122,
367,
297,
278,
5434,
29889,
17446,
598,
310,
451,
24907,
963,
13,
1678,
411,
5443,
8282,
2466,
29991,
13,
13,
1678,
6212,
5026,
29901,
13,
4706,
8282,
29901,
731,
310,
8282,
313,
19651,
29897,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4055,
29918,
1445,
2084,
353,
6213,
1125,
13,
4706,
1583,
29889,
12071,
580,
13,
4706,
565,
4055,
29918,
1445,
2084,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
1359,
29918,
1445,
29898,
4039,
29918,
1445,
2084,
29897,
13,
13,
1678,
822,
10092,
29898,
1311,
1125,
13,
4706,
1583,
29889,
11338,
353,
731,
580,
13,
13,
1678,
822,
2254,
29918,
1445,
29898,
1311,
29892,
4055,
29918,
1445,
2084,
1125,
13,
4706,
1583,
29889,
12071,
580,
13,
4706,
411,
1722,
29898,
4039,
29918,
1445,
2084,
29892,
376,
29878,
1159,
408,
4055,
29918,
1445,
29901,
13,
9651,
363,
1196,
297,
4055,
29918,
1445,
29889,
949,
9012,
7295,
13,
18884,
1583,
29889,
11338,
29889,
1202,
29898,
1220,
29889,
17010,
14182,
29876,
5783,
13,
13,
1678,
822,
2436,
29918,
1445,
29898,
1311,
29892,
4055,
29918,
1445,
2084,
1125,
13,
4706,
411,
1722,
29898,
4039,
29918,
1445,
2084,
29892,
376,
29893,
1159,
408,
4055,
29918,
1445,
29901,
13,
9651,
363,
4055,
297,
1583,
29889,
11338,
29901,
13,
18884,
4055,
29918,
1445,
29889,
3539,
29898,
4039,
718,
6634,
29876,
1159,
13,
13,
1678,
822,
679,
29918,
5696,
29918,
11338,
29898,
1311,
1125,
13,
4706,
736,
731,
4197,
4039,
363,
4055,
297,
1583,
29889,
11338,
565,
338,
29918,
5696,
29918,
4039,
29898,
4039,
29897,
2314,
13,
13,
1678,
822,
679,
29918,
17519,
29918,
11338,
29898,
1311,
1125,
13,
4706,
736,
731,
4197,
4039,
363,
4055,
297,
1583,
29889,
11338,
565,
338,
29918,
17519,
29918,
4039,
29898,
4039,
29897,
2314,
13,
13,
1678,
822,
679,
29918,
1116,
29918,
11338,
29898,
1311,
1125,
13,
4706,
736,
731,
4197,
4039,
363,
4055,
297,
1583,
29889,
11338,
565,
338,
29918,
1116,
29918,
4039,
29898,
4039,
29897,
2314,
13,
13,
1678,
822,
6219,
29918,
1116,
29918,
262,
29918,
17519,
267,
29898,
1311,
29892,
2148,
1125,
13,
4706,
9995,
5240,
586,
267,
263,
2148,
25185,
2190,
3210,
29896,
29914,
15176,
2190,
3210,
29906,
515,
278,
8282,
13,
4706,
322,
12778,
25185,
2190,
3210,
29896,
322,
25185,
2190,
3210,
29906,
29889,
9995,
13,
4706,
565,
2148,
297,
1583,
29889,
11338,
29901,
13,
9651,
2175,
29918,
17519,
29892,
1492,
29918,
17519,
353,
2148,
29889,
5451,
11974,
1159,
13,
9651,
1583,
29889,
11338,
29889,
5992,
29898,
1116,
29897,
13,
9651,
1583,
29889,
11338,
29889,
1202,
29898,
1563,
29918,
17519,
29897,
13,
9651,
1583,
29889,
11338,
29889,
1202,
29898,
1266,
29918,
17519,
29897,
13,
2
] |
facility_management/facility_management/web_form/new_maintenance/new_maintenance.py | pazari/facility_management | 13 | 86853 | <filename>facility_management/facility_management/web_form/new_maintenance/new_maintenance.py
from __future__ import unicode_literals
from toolz import first
import frappe
def get_context(context):
tenant = _get_tenant(_get_customer(frappe.session.user))
context.properties = _get_properties(tenant)
def _get_properties(tenant):
properties = frappe.get_all(
"Rental Contract",
fields=["property"],
filters={"status": "Active", "tenant": tenant}
)
return list(map(lambda x: x.get("property"), properties))
def _get_customer(user):
customer = frappe.db.sql(
"""
SELECT dl.link_name
FROM `tabContact` c
INNER JOIN `tabDynamic Link` dl ON dl.parent = c.name
WHERE dl.link_doctype = "Customer" AND c.user = %s
""",
user,
as_dict=1,
)
return first(customer).get("link_name") if customer else None
def _get_tenant(customer):
tenant = frappe.get_all("Tenant Master", filters={"customer": customer})
return first(tenant).get("name") if tenant else None
| [
1,
529,
9507,
29958,
17470,
1793,
29918,
21895,
29914,
17470,
1793,
29918,
21895,
29914,
2676,
29918,
689,
29914,
1482,
29918,
3396,
841,
749,
29914,
1482,
29918,
3396,
841,
749,
29889,
2272,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
3166,
5780,
29920,
1053,
937,
13,
5215,
5227,
4798,
13,
13,
13,
1753,
679,
29918,
4703,
29898,
4703,
1125,
13,
1678,
3006,
424,
353,
903,
657,
29918,
841,
424,
7373,
657,
29918,
15539,
29898,
20910,
4798,
29889,
7924,
29889,
1792,
876,
13,
1678,
3030,
29889,
11330,
353,
903,
657,
29918,
11330,
29898,
841,
424,
29897,
13,
13,
13,
1753,
903,
657,
29918,
11330,
29898,
841,
424,
1125,
13,
1678,
4426,
353,
5227,
4798,
29889,
657,
29918,
497,
29898,
13,
4706,
376,
29934,
13703,
2866,
1461,
613,
13,
4706,
4235,
29922,
3366,
6799,
12436,
13,
4706,
18094,
3790,
29908,
4882,
1115,
376,
9966,
613,
376,
841,
424,
1115,
3006,
424,
29913,
13,
1678,
1723,
13,
1678,
736,
1051,
29898,
1958,
29898,
2892,
921,
29901,
921,
29889,
657,
703,
6799,
4968,
4426,
876,
13,
13,
13,
1753,
903,
657,
29918,
15539,
29898,
1792,
1125,
13,
1678,
11962,
353,
5227,
4798,
29889,
2585,
29889,
2850,
29898,
13,
4706,
9995,
13,
9651,
5097,
270,
29880,
29889,
2324,
29918,
978,
13,
9651,
3895,
421,
3891,
13443,
29952,
274,
13,
9651,
20735,
8780,
421,
3891,
24001,
6645,
29952,
270,
29880,
6732,
270,
29880,
29889,
3560,
353,
274,
29889,
978,
13,
9651,
5754,
270,
29880,
29889,
2324,
29918,
1867,
312,
668,
353,
376,
15122,
29908,
5300,
274,
29889,
1792,
353,
1273,
29879,
13,
4706,
5124,
613,
13,
4706,
1404,
29892,
13,
4706,
408,
29918,
8977,
29922,
29896,
29892,
13,
1678,
1723,
13,
1678,
736,
937,
29898,
15539,
467,
657,
703,
2324,
29918,
978,
1159,
565,
11962,
1683,
6213,
13,
13,
13,
1753,
903,
657,
29918,
841,
424,
29898,
15539,
1125,
13,
1678,
3006,
424,
353,
5227,
4798,
29889,
657,
29918,
497,
703,
29911,
27153,
9082,
613,
18094,
3790,
29908,
15539,
1115,
11962,
1800,
13,
1678,
736,
937,
29898,
841,
424,
467,
657,
703,
978,
1159,
565,
3006,
424,
1683,
6213,
13,
2
] |
license_plate_images_generator.py | aboerzel/ANPR-keras | 6 | 36046 | import argparse
import json
import os.path
import random
import re
import time
import cv2
import numpy as np
import requests
from PIL import Image
from config import config
class GermanLicensePlateImagesGenerator:
def __init__(self, output):
self.output = output
self.COUNTRY_MARKS = np.asarray([d['CM'] for d in json.loads(open(config.GERMAN_COUNTY_MARKS, encoding='utf-8').read())])
self.LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ"
self.DIGITS = "0123456789"
self.COUNTRIES = ['BW', 'BY', 'BE', 'BB', 'HB', 'HH', 'HE', 'MV', 'NI', 'NW', 'RP', 'SL', 'SN', 'ST', 'SH', 'TH']
self.MONTHS = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']
self.YEARS = ['06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17']
random.seed()
@staticmethod
def get_image_url(license_number, country, month, year):
license_number = license_number.replace("-", "%3A").replace("Ä", "%C4").replace("Ö", "%D6").replace("Ü", "%DC")
return "http://nummernschild.heisnbrg.net/fe/task?action=startTask&kennzeichen={0}&kennzeichenZeile2=&engschrift=false&pixelHoehe=32&breiteInMM=520&breiteInMMFest=true&sonder=FE&dd=01&mm=01&yy=00&kreis={1}&kreisName=&humm={2}&huyy={3}&sonderKreis=LEER&mm1=01&mm2=01&farbe=SCHWARZ&effekt=KEIN&tgaDownload=false".format(
license_number, country, month, year)
def __generate_license_number(self):
country = random.choice(self.COUNTRY_MARKS)
letter_count = random.randint(1, 2)
letters = "{}".format(random.choice(self.LETTERS)) if letter_count == 1 else "{}{}".format(
random.choice(self.LETTERS), random.choice(self.LETTERS))
min = 1 if letter_count == 2 else 1
digit_count = random.randint(min, max((8 - len(country) - letter_count), 4))
digits = ""
for i in range(digit_count):
digits += random.choice(self.DIGITS)
return "{}-{}{}".format(country, letters, digits)
def __create_license_plate_picture(self, n, license_number, country, front):
file_path = self.output + '/{0}#{1}.png'.format("F" if front else "R", license_number)
if os.path.exists(file_path):
return False
month = random.choice(self.MONTHS) if front else ''
year = random.choice(self.YEARS) if front else ''
create_image_url = GermanLicensePlateImagesGenerator.get_image_url(license_number, country, month, year)
r = requests.get(create_image_url)
if r.status_code != 200:
return False
id = re.compile('<id>(.*?)</id>', re.DOTALL | re.IGNORECASE).findall(
r.content.decode("utf-8"))[0]
status_url = 'http://nummernschild.heisnbrg.net/fe/task?action=status&id=%s' % id
time.sleep(.200)
r = requests.get(status_url)
if r.status_code != 200:
return False
show_image_url = 'http://nummernschild.heisnbrg.net/fe/task?action=showInPage&id=%s'
show_image_url = show_image_url % id
time.sleep(.200)
r = requests.get(show_image_url)
if r.status_code != 200:
return False
# sometimes the web service returns a corrupted image, check the image by getting the size and skip if corrupted
try:
numpyarray = np.fromstring(r.content, np.uint8)
image = cv2.imdecode(numpyarray, cv2.IMREAD_COLOR)
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
im = Image.fromarray(image) # don't use cv2.imwrite() because there is a bug with utf-8 encoded filepaths
im.save(file_path)
print("{0:06d} : {1}".format(n, file_path))
return True
except:
return False
def generate(self, items):
for n in range(items):
while True:
license_number = self.__generate_license_number()
country = random.choice(self.COUNTRIES)
if not self.__create_license_plate_picture(n, license_number, country, True):
break
time.sleep(.200)
self.__create_license_plate_picture(n, license_number, country, False)
time.sleep(.200)
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--items", default="60000", help="Number of items to generate")
ap.add_argument("-o", "--output", default=config.PLATE_IMAGES, help="Output path")
args = vars(ap.parse_args())
lpdg = GermanLicensePlateImagesGenerator(os.path.abspath(args["output"]))
lpdg.generate(int(args["items"]))
| [
1,
1053,
1852,
5510,
13,
5215,
4390,
13,
5215,
2897,
29889,
2084,
13,
5215,
4036,
13,
5215,
337,
13,
5215,
931,
13,
13,
5215,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
5215,
7274,
13,
3166,
349,
6227,
1053,
7084,
13,
13,
3166,
2295,
1053,
2295,
13,
13,
13,
1990,
5332,
29931,
293,
1947,
3247,
403,
20163,
21575,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1962,
1125,
13,
4706,
1583,
29889,
4905,
353,
1962,
13,
4706,
1583,
29889,
3217,
3904,
5659,
29979,
29918,
1529,
29934,
17557,
353,
7442,
29889,
294,
2378,
4197,
29881,
1839,
24494,
2033,
363,
270,
297,
4390,
29889,
18132,
29898,
3150,
29898,
2917,
29889,
17070,
27616,
29918,
18736,
29979,
29918,
1529,
29934,
17557,
29892,
8025,
2433,
9420,
29899,
29947,
2824,
949,
3101,
2314,
13,
4706,
1583,
29889,
1307,
29911,
4945,
29903,
353,
376,
19658,
24405,
29954,
17628,
29967,
29968,
26369,
29940,
4590,
29984,
29934,
1254,
29965,
29963,
29956,
18454,
29999,
30125,
30094,
30104,
29908,
13,
4706,
1583,
29889,
4571,
29954,
1806,
29903,
353,
376,
29900,
29896,
29906,
29941,
29946,
29945,
29953,
29955,
29947,
29929,
29908,
13,
4706,
1583,
29889,
18736,
3960,
2890,
353,
6024,
29933,
29956,
742,
525,
22716,
742,
525,
15349,
742,
525,
14388,
742,
525,
29950,
29933,
742,
525,
27590,
742,
525,
9606,
742,
525,
29924,
29963,
742,
525,
12916,
742,
525,
29940,
29956,
742,
525,
29934,
29925,
742,
525,
12750,
742,
525,
19296,
742,
525,
1254,
742,
525,
7068,
742,
525,
4690,
2033,
13,
4706,
1583,
29889,
22877,
4690,
29903,
353,
6024,
29900,
29896,
742,
525,
29900,
29906,
742,
525,
29900,
29941,
742,
525,
29900,
29946,
742,
525,
29900,
29945,
742,
525,
29900,
29953,
742,
525,
29900,
29955,
742,
525,
29900,
29947,
742,
525,
29900,
29929,
742,
525,
29896,
29900,
742,
525,
29896,
29896,
742,
525,
29896,
29906,
2033,
13,
4706,
1583,
29889,
29979,
26441,
29903,
353,
6024,
29900,
29953,
742,
525,
29900,
29955,
742,
525,
29900,
29947,
742,
525,
29900,
29929,
742,
525,
29896,
29900,
742,
525,
29896,
29896,
742,
525,
29896,
29906,
742,
525,
29896,
29941,
742,
525,
29896,
29946,
742,
525,
29896,
29945,
742,
525,
29896,
29953,
742,
525,
29896,
29955,
2033,
13,
13,
4706,
4036,
29889,
26776,
580,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
679,
29918,
3027,
29918,
2271,
29898,
506,
1947,
29918,
4537,
29892,
4234,
29892,
4098,
29892,
1629,
1125,
13,
4706,
19405,
29918,
4537,
353,
19405,
29918,
4537,
29889,
6506,
703,
29899,
613,
11860,
29941,
29909,
2564,
6506,
703,
30125,
613,
11860,
29907,
29946,
2564,
6506,
703,
30094,
613,
11860,
29928,
29953,
2564,
6506,
703,
30104,
613,
11860,
12696,
1159,
13,
4706,
736,
376,
1124,
597,
1949,
29885,
824,
816,
789,
29889,
354,
275,
29876,
1182,
29887,
29889,
1212,
29914,
1725,
29914,
7662,
29973,
2467,
29922,
2962,
5398,
29987,
1717,
29876,
5185,
264,
3790,
29900,
15704,
1717,
29876,
5185,
264,
24625,
488,
29906,
29332,
996,
13827,
29922,
4541,
29987,
29886,
15711,
29950,
7297,
354,
29922,
29941,
29906,
29987,
1030,
568,
797,
7428,
29922,
29945,
29906,
29900,
29987,
1030,
568,
797,
7428,
29943,
342,
29922,
3009,
29987,
1100,
672,
29922,
16359,
29987,
1289,
29922,
29900,
29896,
29987,
4317,
29922,
29900,
29896,
29987,
8071,
29922,
29900,
29900,
29987,
12364,
3790,
29896,
15704,
12364,
1170,
29332,
16063,
29885,
3790,
29906,
15704,
6905,
8071,
3790,
29941,
15704,
1100,
672,
29968,
276,
275,
29922,
1307,
1001,
29987,
4317,
29896,
29922,
29900,
29896,
29987,
4317,
29906,
29922,
29900,
29896,
29987,
15641,
915,
29922,
29903,
3210,
29956,
1718,
29999,
29987,
12352,
29872,
1193,
29922,
6059,
1177,
29987,
29873,
3249,
22954,
29922,
4541,
1642,
4830,
29898,
13,
9651,
19405,
29918,
4537,
29892,
4234,
29892,
4098,
29892,
1629,
29897,
13,
13,
1678,
822,
4770,
17158,
29918,
506,
1947,
29918,
4537,
29898,
1311,
1125,
13,
4706,
4234,
353,
4036,
29889,
16957,
29898,
1311,
29889,
3217,
3904,
5659,
29979,
29918,
1529,
29934,
17557,
29897,
13,
13,
4706,
5497,
29918,
2798,
353,
4036,
29889,
9502,
524,
29898,
29896,
29892,
29871,
29906,
29897,
13,
4706,
8721,
353,
376,
8875,
1642,
4830,
29898,
8172,
29889,
16957,
29898,
1311,
29889,
1307,
29911,
4945,
29903,
876,
565,
5497,
29918,
2798,
1275,
29871,
29896,
1683,
29850,
1157,
29913,
1642,
4830,
29898,
13,
9651,
4036,
29889,
16957,
29898,
1311,
29889,
1307,
29911,
4945,
29903,
511,
4036,
29889,
16957,
29898,
1311,
29889,
1307,
29911,
4945,
29903,
876,
13,
13,
4706,
1375,
353,
29871,
29896,
565,
5497,
29918,
2798,
1275,
29871,
29906,
1683,
29871,
29896,
13,
4706,
13615,
29918,
2798,
353,
4036,
29889,
9502,
524,
29898,
1195,
29892,
4236,
3552,
29947,
448,
7431,
29898,
13509,
29897,
448,
5497,
29918,
2798,
511,
29871,
29946,
876,
13,
4706,
13340,
353,
5124,
13,
4706,
363,
474,
297,
3464,
29898,
26204,
29918,
2798,
1125,
13,
9651,
13340,
4619,
4036,
29889,
16957,
29898,
1311,
29889,
4571,
29954,
1806,
29903,
29897,
13,
13,
4706,
736,
29850,
7402,
29912,
1157,
29913,
1642,
4830,
29898,
13509,
29892,
8721,
29892,
13340,
29897,
13,
13,
1678,
822,
4770,
3258,
29918,
506,
1947,
29918,
2341,
29918,
12095,
29898,
1311,
29892,
302,
29892,
19405,
29918,
4537,
29892,
4234,
29892,
4565,
1125,
13,
4706,
934,
29918,
2084,
353,
1583,
29889,
4905,
718,
8207,
29912,
29900,
29913,
26660,
29896,
1836,
2732,
4286,
4830,
703,
29943,
29908,
565,
4565,
1683,
376,
29934,
613,
19405,
29918,
4537,
29897,
13,
4706,
565,
2897,
29889,
2084,
29889,
9933,
29898,
1445,
29918,
2084,
1125,
13,
9651,
736,
7700,
13,
13,
4706,
4098,
353,
4036,
29889,
16957,
29898,
1311,
29889,
22877,
4690,
29903,
29897,
565,
4565,
1683,
6629,
13,
4706,
1629,
353,
4036,
29889,
16957,
29898,
1311,
29889,
29979,
26441,
29903,
29897,
565,
4565,
1683,
6629,
13,
13,
4706,
1653,
29918,
3027,
29918,
2271,
353,
5332,
29931,
293,
1947,
3247,
403,
20163,
21575,
29889,
657,
29918,
3027,
29918,
2271,
29898,
506,
1947,
29918,
4537,
29892,
4234,
29892,
4098,
29892,
1629,
29897,
13,
4706,
364,
353,
7274,
29889,
657,
29898,
3258,
29918,
3027,
29918,
2271,
29897,
13,
4706,
565,
364,
29889,
4882,
29918,
401,
2804,
29871,
29906,
29900,
29900,
29901,
13,
9651,
736,
7700,
13,
13,
4706,
1178,
353,
337,
29889,
12198,
877,
29966,
333,
5961,
5575,
7897,
829,
333,
29958,
742,
337,
29889,
29928,
2891,
9818,
891,
337,
29889,
6259,
6632,
1525,
23487,
467,
2886,
497,
29898,
13,
9651,
364,
29889,
3051,
29889,
13808,
703,
9420,
29899,
29947,
5783,
29961,
29900,
29962,
13,
13,
4706,
4660,
29918,
2271,
353,
525,
1124,
597,
1949,
29885,
824,
816,
789,
29889,
354,
275,
29876,
1182,
29887,
29889,
1212,
29914,
1725,
29914,
7662,
29973,
2467,
29922,
4882,
29987,
333,
16328,
29879,
29915,
1273,
1178,
13,
4706,
931,
29889,
17059,
11891,
29906,
29900,
29900,
29897,
13,
4706,
364,
353,
7274,
29889,
657,
29898,
4882,
29918,
2271,
29897,
13,
4706,
565,
364,
29889,
4882,
29918,
401,
2804,
29871,
29906,
29900,
29900,
29901,
13,
9651,
736,
7700,
13,
13,
4706,
1510,
29918,
3027,
29918,
2271,
353,
525,
1124,
597,
1949,
29885,
824,
816,
789,
29889,
354,
275,
29876,
1182,
29887,
29889,
1212,
29914,
1725,
29914,
7662,
29973,
2467,
29922,
4294,
797,
5074,
29987,
333,
16328,
29879,
29915,
13,
4706,
1510,
29918,
3027,
29918,
2271,
353,
1510,
29918,
3027,
29918,
2271,
1273,
1178,
13,
4706,
931,
29889,
17059,
11891,
29906,
29900,
29900,
29897,
13,
4706,
364,
353,
7274,
29889,
657,
29898,
4294,
29918,
3027,
29918,
2271,
29897,
13,
4706,
565,
364,
29889,
4882,
29918,
401,
2804,
29871,
29906,
29900,
29900,
29901,
13,
9651,
736,
7700,
13,
13,
4706,
396,
6041,
278,
1856,
2669,
3639,
263,
1034,
14214,
1967,
29892,
1423,
278,
1967,
491,
2805,
278,
2159,
322,
14383,
565,
1034,
14214,
13,
4706,
1018,
29901,
13,
9651,
12655,
2378,
353,
7442,
29889,
3166,
1807,
29898,
29878,
29889,
3051,
29892,
7442,
29889,
13470,
29947,
29897,
13,
9651,
1967,
353,
13850,
29906,
29889,
326,
13808,
29898,
23749,
2378,
29892,
13850,
29906,
29889,
7833,
16310,
29918,
15032,
1955,
29897,
13,
9651,
1967,
353,
13850,
29906,
29889,
11023,
29873,
3306,
29898,
3027,
29892,
13850,
29906,
29889,
15032,
1955,
29918,
29933,
14345,
29906,
29954,
22800,
29897,
13,
9651,
527,
353,
7084,
29889,
3166,
2378,
29898,
3027,
29897,
29871,
396,
1016,
29915,
29873,
671,
13850,
29906,
29889,
326,
3539,
580,
1363,
727,
338,
263,
6494,
411,
23616,
29899,
29947,
18511,
934,
24772,
13,
9651,
527,
29889,
7620,
29898,
1445,
29918,
2084,
29897,
13,
9651,
1596,
703,
29912,
29900,
29901,
29900,
29953,
29881,
29913,
584,
426,
29896,
29913,
1642,
4830,
29898,
29876,
29892,
934,
29918,
2084,
876,
13,
9651,
736,
5852,
13,
4706,
5174,
29901,
13,
9651,
736,
7700,
13,
13,
1678,
822,
5706,
29898,
1311,
29892,
4452,
1125,
13,
4706,
363,
302,
297,
3464,
29898,
7076,
1125,
13,
9651,
1550,
5852,
29901,
13,
18884,
19405,
29918,
4537,
353,
1583,
17255,
17158,
29918,
506,
1947,
29918,
4537,
580,
13,
13,
18884,
4234,
353,
4036,
29889,
16957,
29898,
1311,
29889,
18736,
3960,
2890,
29897,
13,
18884,
565,
451,
1583,
17255,
3258,
29918,
506,
1947,
29918,
2341,
29918,
12095,
29898,
29876,
29892,
19405,
29918,
4537,
29892,
4234,
29892,
5852,
1125,
13,
462,
1678,
2867,
13,
13,
18884,
931,
29889,
17059,
11891,
29906,
29900,
29900,
29897,
13,
18884,
1583,
17255,
3258,
29918,
506,
1947,
29918,
2341,
29918,
12095,
29898,
29876,
29892,
19405,
29918,
4537,
29892,
4234,
29892,
7700,
29897,
13,
18884,
931,
29889,
17059,
11891,
29906,
29900,
29900,
29897,
13,
13,
13,
481,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
481,
29889,
1202,
29918,
23516,
703,
29899,
29875,
613,
376,
489,
7076,
613,
2322,
543,
29953,
29900,
29900,
29900,
29900,
613,
1371,
543,
4557,
310,
4452,
304,
5706,
1159,
13,
481,
29889,
1202,
29918,
23516,
703,
29899,
29877,
613,
376,
489,
4905,
613,
2322,
29922,
2917,
29889,
7390,
3040,
29918,
2382,
29903,
29892,
1371,
543,
6466,
2224,
1159,
13,
5085,
353,
24987,
29898,
481,
29889,
5510,
29918,
5085,
3101,
13,
13,
29880,
15926,
29887,
353,
5332,
29931,
293,
1947,
3247,
403,
20163,
21575,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
29898,
5085,
3366,
4905,
3108,
876,
13,
29880,
15926,
29887,
29889,
17158,
29898,
524,
29898,
5085,
3366,
7076,
3108,
876,
13,
2
] |
lib/googlecloudsdk/api_lib/compute/daisy_utils.py | bopopescu/Google-Cloud-SDK-1 | 0 | 132131 | <reponame>bopopescu/Google-Cloud-SDK-1
# Copyright 2017 Google Inc. 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.
"""Utilities for running Daisy builds on Google Container Builder."""
from apitools.base.py import encoding
from googlecloudsdk.api_lib.cloudbuild import cloudbuild_util
from googlecloudsdk.api_lib.cloudbuild import logs as cb_logs
from googlecloudsdk.api_lib.cloudresourcemanager import projects_api
from googlecloudsdk.api_lib.storage import storage_api
from googlecloudsdk.calliope import arg_parsers
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.cloudbuild import execution
from googlecloudsdk.command_lib.projects import util as projects_util
from googlecloudsdk.core import exceptions as core_exceptions
from googlecloudsdk.core import execution_utils
from googlecloudsdk.core import log
from googlecloudsdk.core import properties
from googlecloudsdk.core import resources
from googlecloudsdk.core.console import console_io
_BUILDER = 'gcr.io/compute-image-tools/daisy:release'
class FailedBuildException(core_exceptions.Error):
"""Exception for builds that did not succeed."""
def __init__(self, build):
super(FailedBuildException, self).__init__(
'build {id} completed with status "{status}"'.format(
id=build.id, status=build.status))
def AddCommonDaisyArgs(parser):
"""Common arguments for Daisy builds."""
parser.add_argument(
'--log-location',
help='Directory in Google Cloud Storage to hold build logs. If not '
'set, ```gs://<project num>.cloudbuild-logs.googleusercontent.com/``` '
'will be created and used.',
)
parser.add_argument(
'--timeout',
type=arg_parsers.Duration(),
default='2h',
help="""\
Maximum time a build can last before it is failed as "TIMEOUT".
For example, specifying ``2h'' will fail the process after 2 hours.
See $ gcloud topic datetimes for information on duration formats.
"""
)
base.ASYNC_FLAG.AddToParser(parser)
def CheckIamPermissions(project_id):
"""Check for needed IAM permissions and prompt to add if missing.
Args:
project_id: A string with the name of the project.
"""
project = projects_api.Get(project_id)
service_account = 'serviceAccount:{0}@cloudbuild.gserviceaccount.com'.format(
project.projectNumber)
expected_permissions = {'roles/compute.admin': service_account,
'roles/iam.serviceAccountActor': service_account}
permissions = projects_api.GetIamPolicy(project_id)
for binding in permissions.bindings:
if expected_permissions.get(binding.role) in binding.members:
del expected_permissions[binding.role]
if expected_permissions:
ep_table = ['{0} {1}'.format(role, account) for role, account
in expected_permissions.items()]
prompt_message = (
'The following IAM permissions are needed for this operation:\n'
'[{0}]\n'.format('\n'.join(ep_table)))
console_io.PromptContinue(
message=prompt_message,
prompt_string='Would you like to add the permissions',
throw_if_unattended=True,
cancel_on_no=True)
for role, account in expected_permissions.items():
log.info('Adding [{0}] to [{1}]'.format(account, role))
projects_api.AddIamPolicyBinding(project_id, account, role)
def _CreateCloudBuild(build_config, client, messages):
"""Create a build in cloud build.
Args:
build_config: A cloud build Build message.
client: The cloud build api client.
messages: The cloud build api messages module.
Returns:
Tuple containing a cloud build build object and the resource reference
for that build.
"""
log.debug('submitting build: {0}'.format(repr(build_config)))
op = client.projects_builds.Create(
messages.CloudbuildProjectsBuildsCreateRequest(
build=build_config,
projectId=properties.VALUES.core.project.Get()))
json = encoding.MessageToJson(op.metadata)
build = encoding.JsonToMessage(messages.BuildOperationMetadata, json).build
build_ref = resources.REGISTRY.Create(
collection='cloudbuild.projects.builds',
projectId=build.projectId,
id=build.id)
log.CreatedResource(build_ref)
if build.logUrl:
log.status.Print('Logs are available at [{0}].'.format(build.logUrl))
else:
log.status.Print('Logs are available in the Cloud Console.')
return build, build_ref
def GetAndCreateDaisyBucket(bucket_name=None, storage_client=None):
"""Determine the name of the GCS bucket to use and create if necessary.
Args:
bucket_name: A string containing a bucket name to use, otherwise the
bucket will be named based on the project id.
storage_client: The storage_api client object.
Returns:
A string containing the name of the GCS bucket to use.
"""
project = properties.VALUES.core.project.GetOrFail()
safe_project = project.replace(':', '-')
safe_project = safe_project.replace('.', '-')
bucket_name = bucket_name or '{0}-daisy-bkt'.format(safe_project)
safe_bucket_name = bucket_name.replace('google', 'elgoog')
if not storage_client:
storage_client = storage_api.StorageClient()
storage_client.CreateBucketIfNotExists(safe_bucket_name)
return safe_bucket_name
def RunDaisyBuild(args, workflow, variables, daisy_bucket=None, tags=None):
"""Run a build with Daisy on Google Cloud Builder.
Args:
args: an argparse namespace. All the arguments that were provided to this
command invocation.
workflow: The path to the Daisy workflow to run.
variables: A string of key-value pairs to pass to Daisy.
daisy_bucket: A string containing the name of the GCS bucket that daisy
should use.
tags: A list of strings for adding tags to the Argo build.
Returns:
A build object that either streams the output or is displayed as a
link to the build.
Raises:
FailedBuildException: If the build is completed and not 'SUCCESS'.
"""
client = cloudbuild_util.GetClientInstance()
messages = cloudbuild_util.GetMessagesModule()
project_id = projects_util.ParseProject(
properties.VALUES.core.project.GetOrFail())
CheckIamPermissions(project_id)
timeout_str = '{0}s'.format(args.timeout)
daisy_bucket = daisy_bucket or GetAndCreateDaisyBucket()
daisy_args = ['-gcs_path=gs://{0}/'.format(daisy_bucket),
'-variables={0}'.format(variables),
workflow,
]
build_tags = ['gce-daisy']
if tags:
build_tags.extend(tags)
# First, create the build request.
build_config = messages.Build(
steps=[
messages.BuildStep(
name=_BUILDER,
args=daisy_args,
),
],
tags=build_tags,
timeout=timeout_str,
)
if args.log_location:
gcs_log_dir = resources.REGISTRY.Parse(
args.log_location, collection='storage.objects')
build_config.logsBucket = (
'gs://{0}/{1}'.format(gcs_log_dir.bucket, gcs_log_dir.object))
# Start the build.
build, build_ref = _CreateCloudBuild(build_config, client, messages)
# If the command is run --async, we just print out a reference to the build.
if args.async:
return build
mash_handler = execution.MashHandler(
execution.GetCancelBuildHandler(client, messages, build_ref))
# Otherwise, logs are streamed from GCS.
with execution_utils.CtrlCSection(mash_handler):
build = cb_logs.CloudBuildClient(client, messages).Stream(build_ref)
if build.status == messages.Build.StatusValueValuesEnum.TIMEOUT:
log.status.Print(
'Your build timed out. Use the [--timeout=DURATION] flag to change '
'the timeout threshold.')
if build.status != messages.Build.StatusValueValuesEnum.SUCCESS:
raise FailedBuildException(build)
return build
| [
1,
529,
276,
1112,
420,
29958,
29890,
459,
459,
267,
4979,
29914,
14207,
29899,
20442,
29899,
26912,
29899,
29896,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
5087,
9266,
29889,
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,
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,
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,
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,
15945,
29908,
7270,
1907,
363,
2734,
360,
1759,
29891,
23315,
373,
5087,
21679,
5373,
2700,
1213,
15945,
13,
13,
3166,
3095,
277,
8789,
29889,
3188,
29889,
2272,
1053,
8025,
13,
13,
3166,
5386,
9274,
15348,
29889,
2754,
29918,
1982,
29889,
9274,
4282,
1053,
9570,
4282,
29918,
4422,
13,
3166,
5386,
9274,
15348,
29889,
2754,
29918,
1982,
29889,
9274,
4282,
1053,
10748,
408,
26324,
29918,
20756,
13,
3166,
5386,
9274,
15348,
29889,
2754,
29918,
1982,
29889,
9274,
690,
473,
29883,
11422,
1875,
1053,
9279,
29918,
2754,
13,
3166,
5386,
9274,
15348,
29889,
2754,
29918,
1982,
29889,
12925,
1053,
8635,
29918,
2754,
13,
3166,
5386,
9274,
15348,
29889,
1052,
492,
2300,
1053,
1852,
29918,
862,
4253,
13,
3166,
5386,
9274,
15348,
29889,
1052,
492,
2300,
1053,
2967,
13,
3166,
5386,
9274,
15348,
29889,
6519,
29918,
1982,
29889,
9274,
4282,
1053,
8225,
13,
3166,
5386,
9274,
15348,
29889,
6519,
29918,
1982,
29889,
16418,
1053,
3667,
408,
9279,
29918,
4422,
13,
3166,
5386,
9274,
15348,
29889,
3221,
1053,
15283,
408,
7136,
29918,
11739,
29879,
13,
3166,
5386,
9274,
15348,
29889,
3221,
1053,
8225,
29918,
13239,
13,
3166,
5386,
9274,
15348,
29889,
3221,
1053,
1480,
13,
3166,
5386,
9274,
15348,
29889,
3221,
1053,
4426,
13,
3166,
5386,
9274,
15348,
29889,
3221,
1053,
7788,
13,
3166,
5386,
9274,
15348,
29889,
3221,
29889,
11058,
1053,
2991,
29918,
601,
13,
13,
13,
29918,
29933,
3120,
29931,
8032,
353,
525,
29887,
7283,
29889,
601,
29914,
26017,
29899,
3027,
29899,
8504,
29914,
1388,
13344,
29901,
14096,
29915,
13,
13,
13,
1990,
18390,
8893,
2451,
29898,
3221,
29918,
11739,
29879,
29889,
2392,
1125,
13,
29871,
9995,
2451,
363,
23315,
393,
1258,
451,
9269,
1213,
15945,
13,
13,
29871,
822,
4770,
2344,
12035,
1311,
29892,
2048,
1125,
13,
1678,
2428,
29898,
17776,
8893,
2451,
29892,
1583,
467,
1649,
2344,
12035,
13,
4706,
525,
4282,
426,
333,
29913,
8676,
411,
4660,
29850,
4882,
5038,
4286,
4830,
29898,
13,
9651,
1178,
29922,
4282,
29889,
333,
29892,
4660,
29922,
4282,
29889,
4882,
876,
13,
13,
13,
1753,
3462,
18877,
29928,
1759,
29891,
7883,
29898,
16680,
1125,
13,
29871,
9995,
18877,
6273,
363,
360,
1759,
29891,
23315,
1213,
15945,
13,
29871,
13812,
29889,
1202,
29918,
23516,
29898,
13,
418,
525,
489,
1188,
29899,
5479,
742,
13,
418,
1371,
2433,
9882,
297,
5087,
14293,
26162,
304,
4808,
2048,
10748,
29889,
960,
451,
525,
13,
418,
525,
842,
29892,
7521,
3174,
597,
29966,
4836,
954,
15513,
9274,
4282,
29899,
20756,
29889,
3608,
1792,
3051,
29889,
510,
29914,
28956,
525,
13,
418,
525,
14043,
367,
2825,
322,
1304,
29889,
742,
13,
29871,
1723,
13,
29871,
13812,
29889,
1202,
29918,
23516,
29898,
13,
418,
525,
489,
15619,
742,
13,
418,
1134,
29922,
1191,
29918,
862,
4253,
29889,
18984,
3285,
13,
418,
2322,
2433,
29906,
29882,
742,
13,
418,
1371,
13776,
26732,
13,
3986,
5918,
12539,
931,
263,
2048,
508,
1833,
1434,
372,
338,
5229,
408,
376,
15307,
12015,
1642,
13,
3986,
1152,
1342,
29892,
22146,
4954,
29906,
29882,
4907,
674,
4418,
278,
1889,
1156,
259,
29906,
6199,
29889,
13,
3986,
2823,
395,
330,
9274,
11261,
1418,
300,
1355,
363,
2472,
373,
14385,
21971,
29889,
13,
3986,
9995,
13,
29871,
1723,
13,
29871,
2967,
29889,
3289,
29979,
15868,
29918,
26516,
29889,
2528,
1762,
11726,
29898,
16680,
29897,
13,
13,
13,
1753,
5399,
29902,
314,
15737,
6847,
29898,
4836,
29918,
333,
1125,
13,
29871,
9995,
5596,
363,
4312,
306,
5194,
11239,
322,
9508,
304,
788,
565,
4567,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
2060,
29918,
333,
29901,
319,
1347,
411,
278,
1024,
310,
278,
2060,
29889,
13,
29871,
9995,
13,
29871,
2060,
353,
9279,
29918,
2754,
29889,
2577,
29898,
4836,
29918,
333,
29897,
13,
29871,
2669,
29918,
10149,
353,
525,
5509,
10601,
26254,
29900,
29913,
29992,
9274,
4282,
29889,
29887,
5509,
10149,
29889,
510,
4286,
4830,
29898,
13,
418,
2060,
29889,
4836,
4557,
29897,
13,
29871,
3806,
29918,
17858,
6847,
353,
11117,
307,
793,
29914,
26017,
29889,
6406,
2396,
2669,
29918,
10149,
29892,
13,
462,
3986,
525,
307,
793,
29914,
2829,
29889,
5509,
10601,
29909,
2801,
2396,
2669,
29918,
10149,
29913,
13,
29871,
11239,
353,
9279,
29918,
2754,
29889,
2577,
29902,
314,
15644,
29898,
4836,
29918,
333,
29897,
13,
29871,
363,
9956,
297,
11239,
29889,
5355,
886,
29901,
13,
1678,
565,
3806,
29918,
17858,
6847,
29889,
657,
29898,
19672,
29889,
12154,
29897,
297,
9956,
29889,
28109,
29901,
13,
418,
628,
3806,
29918,
17858,
6847,
29961,
19672,
29889,
12154,
29962,
13,
13,
29871,
565,
3806,
29918,
17858,
6847,
29901,
13,
1678,
9358,
29918,
2371,
353,
6024,
29912,
29900,
29913,
426,
29896,
29913,
4286,
4830,
29898,
12154,
29892,
3633,
29897,
363,
6297,
29892,
3633,
13,
18884,
297,
3806,
29918,
17858,
6847,
29889,
7076,
580,
29962,
13,
1678,
9508,
29918,
4906,
353,
313,
13,
4706,
525,
1576,
1494,
306,
5194,
11239,
526,
4312,
363,
445,
5858,
3583,
29876,
29915,
13,
4706,
525,
19660,
29900,
6525,
29905,
29876,
4286,
4830,
28909,
29876,
4286,
7122,
29898,
1022,
29918,
2371,
4961,
13,
1678,
2991,
29918,
601,
29889,
18571,
415,
1323,
14150,
29898,
13,
4706,
2643,
29922,
14032,
415,
29918,
4906,
29892,
13,
4706,
9508,
29918,
1807,
2433,
29956,
483,
366,
763,
304,
788,
278,
11239,
742,
13,
4706,
3183,
29918,
361,
29918,
348,
1131,
2760,
29922,
5574,
29892,
13,
4706,
12611,
29918,
265,
29918,
1217,
29922,
5574,
29897,
13,
13,
1678,
363,
6297,
29892,
3633,
297,
3806,
29918,
17858,
6847,
29889,
7076,
7295,
13,
418,
1480,
29889,
3888,
877,
2528,
292,
15974,
29900,
6525,
304,
15974,
29896,
6525,
4286,
4830,
29898,
10149,
29892,
6297,
876,
13,
418,
9279,
29918,
2754,
29889,
2528,
29902,
314,
15644,
9270,
29898,
4836,
29918,
333,
29892,
3633,
29892,
6297,
29897,
13,
13,
13,
1753,
903,
4391,
20442,
8893,
29898,
4282,
29918,
2917,
29892,
3132,
29892,
7191,
1125,
13,
29871,
9995,
4391,
263,
2048,
297,
9570,
2048,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
2048,
29918,
2917,
29901,
319,
9570,
2048,
8878,
2643,
29889,
13,
1678,
3132,
29901,
450,
9570,
2048,
7882,
3132,
29889,
13,
1678,
7191,
29901,
450,
9570,
2048,
7882,
7191,
3883,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
12603,
552,
6943,
263,
9570,
2048,
2048,
1203,
322,
278,
6503,
3407,
13,
1678,
363,
393,
2048,
29889,
13,
29871,
9995,
13,
29871,
1480,
29889,
8382,
877,
1491,
29885,
5367,
2048,
29901,
426,
29900,
29913,
4286,
4830,
29898,
276,
558,
29898,
4282,
29918,
2917,
4961,
13,
29871,
1015,
353,
3132,
29889,
16418,
29918,
4282,
29879,
29889,
4391,
29898,
13,
418,
7191,
29889,
20442,
4282,
25119,
8893,
29879,
4391,
3089,
29898,
13,
3986,
2048,
29922,
4282,
29918,
2917,
29892,
13,
3986,
2060,
1204,
29922,
11330,
29889,
8932,
12996,
29889,
3221,
29889,
4836,
29889,
2577,
22130,
13,
29871,
4390,
353,
8025,
29889,
3728,
1762,
8148,
29898,
459,
29889,
19635,
29897,
13,
29871,
2048,
353,
8025,
29889,
8148,
1762,
3728,
29898,
19158,
29889,
8893,
10925,
18417,
29892,
4390,
467,
4282,
13,
13,
29871,
2048,
29918,
999,
353,
7788,
29889,
18166,
9047,
13207,
29889,
4391,
29898,
13,
418,
4333,
2433,
9274,
4282,
29889,
16418,
29889,
4282,
29879,
742,
13,
418,
2060,
1204,
29922,
4282,
29889,
4836,
1204,
29892,
13,
418,
1178,
29922,
4282,
29889,
333,
29897,
13,
13,
29871,
1480,
29889,
20399,
6848,
29898,
4282,
29918,
999,
29897,
13,
13,
29871,
565,
2048,
29889,
1188,
5983,
29901,
13,
1678,
1480,
29889,
4882,
29889,
11816,
877,
3403,
29879,
526,
3625,
472,
15974,
29900,
29913,
1822,
4286,
4830,
29898,
4282,
29889,
1188,
5983,
876,
13,
29871,
1683,
29901,
13,
1678,
1480,
29889,
4882,
29889,
11816,
877,
3403,
29879,
526,
3625,
297,
278,
14293,
9405,
29889,
1495,
13,
13,
29871,
736,
2048,
29892,
2048,
29918,
999,
13,
13,
13,
1753,
3617,
2855,
4391,
29928,
1759,
29891,
29933,
2707,
300,
29898,
21454,
29918,
978,
29922,
8516,
29892,
8635,
29918,
4645,
29922,
8516,
1125,
13,
29871,
9995,
6362,
837,
457,
278,
1024,
310,
278,
402,
9295,
20968,
304,
671,
322,
1653,
565,
5181,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
20968,
29918,
978,
29901,
319,
1347,
6943,
263,
20968,
1024,
304,
671,
29892,
6467,
278,
13,
418,
20968,
674,
367,
4257,
2729,
373,
278,
2060,
1178,
29889,
13,
1678,
8635,
29918,
4645,
29901,
450,
8635,
29918,
2754,
3132,
1203,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
319,
1347,
6943,
278,
1024,
310,
278,
402,
9295,
20968,
304,
671,
29889,
13,
29871,
9995,
13,
29871,
2060,
353,
4426,
29889,
8932,
12996,
29889,
3221,
29889,
4836,
29889,
2577,
2816,
16243,
580,
13,
29871,
9109,
29918,
4836,
353,
2060,
29889,
6506,
877,
29901,
742,
17411,
1495,
13,
29871,
9109,
29918,
4836,
353,
9109,
29918,
4836,
29889,
6506,
12839,
742,
17411,
1495,
13,
29871,
20968,
29918,
978,
353,
20968,
29918,
978,
470,
22372,
29900,
7402,
1388,
13344,
29899,
29890,
1193,
4286,
4830,
29898,
11177,
29918,
4836,
29897,
13,
29871,
9109,
29918,
21454,
29918,
978,
353,
20968,
29918,
978,
29889,
6506,
877,
3608,
742,
525,
295,
1484,
468,
1495,
13,
13,
29871,
565,
451,
8635,
29918,
4645,
29901,
13,
1678,
8635,
29918,
4645,
353,
8635,
29918,
2754,
29889,
10486,
4032,
580,
13,
13,
29871,
8635,
29918,
4645,
29889,
4391,
29933,
2707,
300,
3644,
3664,
24217,
29898,
11177,
29918,
21454,
29918,
978,
29897,
13,
13,
29871,
736,
9109,
29918,
21454,
29918,
978,
13,
13,
13,
1753,
7525,
29928,
1759,
29891,
8893,
29898,
5085,
29892,
27321,
29892,
3651,
29892,
1146,
13344,
29918,
21454,
29922,
8516,
29892,
8282,
29922,
8516,
1125,
13,
29871,
9995,
6558,
263,
2048,
411,
360,
1759,
29891,
373,
5087,
14293,
5373,
2700,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
6389,
29901,
385,
1852,
5510,
7397,
29889,
2178,
278,
6273,
393,
892,
4944,
304,
445,
13,
418,
1899,
2437,
10610,
29889,
13,
1678,
27321,
29901,
450,
2224,
304,
278,
360,
1759,
29891,
27321,
304,
1065,
29889,
13,
1678,
3651,
29901,
319,
1347,
310,
1820,
29899,
1767,
11000,
304,
1209,
304,
360,
1759,
29891,
29889,
13,
1678,
1146,
13344,
29918,
21454,
29901,
319,
1347,
6943,
278,
1024,
310,
278,
402,
9295,
20968,
393,
1146,
13344,
13,
418,
881,
671,
29889,
13,
1678,
8282,
29901,
319,
1051,
310,
6031,
363,
4417,
8282,
304,
278,
826,
1484,
2048,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
319,
2048,
1203,
393,
2845,
20873,
278,
1962,
470,
338,
8833,
408,
263,
13,
1678,
1544,
304,
278,
2048,
29889,
13,
13,
29871,
390,
1759,
267,
29901,
13,
1678,
18390,
8893,
2451,
29901,
960,
278,
2048,
338,
8676,
322,
451,
525,
14605,
26925,
4286,
13,
29871,
9995,
13,
29871,
3132,
353,
9570,
4282,
29918,
4422,
29889,
2577,
4032,
4998,
580,
13,
29871,
7191,
353,
9570,
4282,
29918,
4422,
29889,
2577,
25510,
7355,
580,
13,
29871,
2060,
29918,
333,
353,
9279,
29918,
4422,
29889,
12914,
7653,
29898,
13,
418,
4426,
29889,
8932,
12996,
29889,
3221,
29889,
4836,
29889,
2577,
2816,
16243,
3101,
13,
13,
29871,
5399,
29902,
314,
15737,
6847,
29898,
4836,
29918,
333,
29897,
13,
13,
29871,
11815,
29918,
710,
353,
22372,
29900,
29913,
29879,
4286,
4830,
29898,
5085,
29889,
15619,
29897,
13,
13,
29871,
1146,
13344,
29918,
21454,
353,
1146,
13344,
29918,
21454,
470,
3617,
2855,
4391,
29928,
1759,
29891,
29933,
2707,
300,
580,
13,
13,
29871,
1146,
13344,
29918,
5085,
353,
6024,
29899,
29887,
2395,
29918,
2084,
29922,
3174,
597,
29912,
29900,
6822,
4286,
4830,
29898,
1388,
13344,
29918,
21454,
511,
13,
18884,
17411,
20897,
3790,
29900,
29913,
4286,
4830,
29898,
20897,
511,
13,
18884,
27321,
29892,
13,
1669,
4514,
13,
13,
29871,
2048,
29918,
11338,
353,
6024,
29887,
346,
29899,
1388,
13344,
2033,
13,
29871,
565,
8282,
29901,
13,
1678,
2048,
29918,
11338,
29889,
21843,
29898,
11338,
29897,
13,
13,
29871,
396,
3824,
29892,
1653,
278,
2048,
2009,
29889,
13,
29871,
2048,
29918,
2917,
353,
7191,
29889,
8893,
29898,
13,
418,
6576,
11759,
13,
3986,
7191,
29889,
8893,
14448,
29898,
13,
795,
1024,
29922,
29918,
29933,
3120,
29931,
8032,
29892,
13,
795,
6389,
29922,
1388,
13344,
29918,
5085,
29892,
13,
3986,
10353,
13,
418,
21251,
13,
418,
8282,
29922,
4282,
29918,
11338,
29892,
13,
418,
11815,
29922,
15619,
29918,
710,
29892,
13,
29871,
1723,
13,
29871,
565,
6389,
29889,
1188,
29918,
5479,
29901,
13,
1678,
330,
2395,
29918,
1188,
29918,
3972,
353,
7788,
29889,
18166,
9047,
13207,
29889,
12914,
29898,
13,
4706,
6389,
29889,
1188,
29918,
5479,
29892,
4333,
2433,
12925,
29889,
12650,
1495,
13,
13,
1678,
2048,
29918,
2917,
29889,
20756,
29933,
2707,
300,
353,
313,
13,
4706,
525,
3174,
597,
29912,
29900,
6822,
29912,
29896,
29913,
4286,
4830,
29898,
29887,
2395,
29918,
1188,
29918,
3972,
29889,
21454,
29892,
330,
2395,
29918,
1188,
29918,
3972,
29889,
3318,
876,
13,
13,
29871,
396,
7370,
278,
2048,
29889,
13,
29871,
2048,
29892,
2048,
29918,
999,
353,
903,
4391,
20442,
8893,
29898,
4282,
29918,
2917,
29892,
3132,
29892,
7191,
29897,
13,
13,
29871,
396,
960,
278,
1899,
338,
1065,
1192,
12674,
29892,
591,
925,
1596,
714,
263,
3407,
304,
278,
2048,
29889,
13,
29871,
565,
6389,
29889,
12674,
29901,
13,
1678,
736,
2048,
13,
13,
29871,
286,
1161,
29918,
13789,
353,
8225,
29889,
29924,
1161,
4598,
29898,
13,
418,
8225,
29889,
2577,
19420,
8893,
4598,
29898,
4645,
29892,
7191,
29892,
2048,
29918,
999,
876,
13,
13,
29871,
396,
13466,
29892,
10748,
526,
4840,
287,
515,
402,
9295,
29889,
13,
29871,
411,
8225,
29918,
13239,
29889,
18069,
29907,
13438,
29898,
29885,
1161,
29918,
13789,
1125,
13,
1678,
2048,
353,
26324,
29918,
20756,
29889,
20442,
8893,
4032,
29898,
4645,
29892,
7191,
467,
3835,
29898,
4282,
29918,
999,
29897,
13,
13,
29871,
565,
2048,
29889,
4882,
1275,
7191,
29889,
8893,
29889,
5709,
1917,
9065,
16854,
29889,
15307,
12015,
29901,
13,
1678,
1480,
29889,
4882,
29889,
11816,
29898,
13,
4706,
525,
10858,
2048,
5335,
287,
714,
29889,
4803,
278,
518,
489,
15619,
29922,
29928,
4574,
8098,
29962,
7353,
304,
1735,
525,
13,
4706,
525,
1552,
11815,
16897,
29889,
1495,
13,
13,
29871,
565,
2048,
29889,
4882,
2804,
7191,
29889,
8893,
29889,
5709,
1917,
9065,
16854,
29889,
14605,
26925,
29901,
13,
1678,
12020,
18390,
8893,
2451,
29898,
4282,
29897,
13,
13,
29871,
736,
2048,
13,
2
] |
source/blog/migrations/0004_postcomments.py | JakubGutowski/PersonalBlog | 0 | 9743 | <filename>source/blog/migrations/0004_postcomments.py
# Generated by Django 2.0.5 on 2018-07-02 19:46
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('blog', '0003_blogpost_author'),
]
operations = [
migrations.CreateModel(
name='PostComments',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('nick', models.CharField(max_length=20)),
('comment', models.CharField(max_length=140)),
('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.BlogPost')),
],
),
]
| [
1,
529,
9507,
29958,
4993,
29914,
7312,
29914,
26983,
800,
29914,
29900,
29900,
29900,
29946,
29918,
2490,
21032,
29889,
2272,
13,
29937,
3251,
630,
491,
15337,
29871,
29906,
29889,
29900,
29889,
29945,
373,
29871,
29906,
29900,
29896,
29947,
29899,
29900,
29955,
29899,
29900,
29906,
29871,
29896,
29929,
29901,
29946,
29953,
30004,
13,
30004,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
29892,
4733,
30004,
13,
5215,
9557,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
30004,
13,
30004,
13,
30004,
13,
1990,
341,
16783,
29898,
26983,
800,
29889,
29924,
16783,
1125,
30004,
13,
30004,
13,
1678,
9962,
353,
518,
30004,
13,
4706,
6702,
7312,
742,
525,
29900,
29900,
29900,
29941,
29918,
7312,
2490,
29918,
8921,
5477,
30004,
13,
1678,
4514,
30004,
13,
30004,
13,
1678,
6931,
353,
518,
30004,
13,
4706,
9725,
800,
29889,
4391,
3195,
29898,
30004,
13,
9651,
1024,
2433,
6747,
1523,
1860,
23592,
13,
9651,
4235,
11759,
30004,
13,
18884,
6702,
333,
742,
4733,
29889,
12300,
3073,
29898,
6921,
29918,
11600,
29922,
5574,
29892,
7601,
29918,
1989,
29922,
5574,
29892,
28755,
29922,
8824,
29892,
26952,
29918,
978,
2433,
1367,
1495,
511,
30004,
13,
18884,
6702,
19254,
742,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29900,
8243,
30004,
13,
18884,
6702,
9342,
742,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29946,
29900,
8243,
30004,
13,
18884,
6702,
2490,
742,
4733,
29889,
27755,
2558,
29898,
265,
29918,
8143,
29922,
14095,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
29889,
29907,
3289,
5454,
2287,
29892,
304,
2433,
7312,
29889,
29933,
1188,
6747,
1495,
511,
30004,
13,
9651,
21251,
30004,
13,
4706,
10353,
30004,
13,
1678,
4514,
30004,
13,
2
] |
01_strings_interpolacao/04_strings_metodos.py | smartao/estudos_python | 0 | 187075 | #!/usr/bin/python3
import pyperclip
'''
String puras
Podemos inserir um r antes das pastas de inicio em uma string para
transofrmá-la em uma string pura (raw string), com isso a string
ignorará todos os caracteres de scape
'''
print('Exemplo de um string pura:')
print(r'\n\t That is Carlos \'s cat.')
'''
Strings em multiplas linhas
'''
print('''\nTeste
de
'String'
de
Multiplas
linhas
''')
'''
Indexacao e Slices
As String usam indices e slices (Fatias) do mesmo modo que as listas
'''
print('\nTeste de slice string')
spam = 'Hello World!'
print(spam[0]) # Primeiro caractere
print(spam[4]) # Quinta caractere
print(spam[-1]) # Ultimo caractere
print(spam[0:5]) # do 0 ao 5
print(spam[:5]) # do 0 ao 5
print(spam[6:]) # do 6 até o final
'''
Operadores in e not in com strings
Os operadora in e not in podem ser usados com strings
assim como em valores de listas
'''
print('\nTeste de strings:')
print('Hello' in 'Hello World') # True
print('Hello' in 'Hello') # True
print('HELLO' in 'Hello World') # False
print('' in 'spam') # True
print('cats' not in 'cats and dogs') # False
'''
upper(), lower(), title()
Retornam um nova string em que todas as letras da string original foram
convertidas para maiusculas ou minusculas.
Os métodos não alteram a string em si, mas retornam novos valores de strings
Os métodos upper() e lower() serão úteis caso seja necessário fazer uma
comparação sen kevar en cibta a diferença de maisculas e minusculas
'''
print('\nTeste dos métodos upper e lower')
spam = 'Hello World'
spam = spam.upper()
print(spam)
spam = spam.lower()
print(spam)
spam = spam.title() # Primeira letra maisuculas
print(spam)
print('\nComparando strings:')
print('How are you?')
feeling = 'GREATE'
if feeling.lower() == 'greate':
print('I feel greate too')
# Como os métodos retornam string,
# podemos chamar os métodos de string nesses valores
print('\nTeste de aninhamento de métodos')
print('Hello'.upper())
print('Hello'.upper().lower())
print('Hello'.upper().lower().upper())
print('Hello'.upper().lower().upper().lower())
'''
isupper(), islower()
Retornarão um valor booleano True se a string tiver pelo menos uma letra
e todas as letras forem maiusculas ou minusculas, respectivalmente.
'''
print('\nTeste dos métodos isupper() e islower()')
spam = 'Hello World'
print(spam.islower()) # False
print(spam.isupper()) # False
print('HELLO'.isupper()) # True
print('abc12345'.islower()) # True
print('12345'.islower()) # False
print('12345'.isupper()) # False
'''
Métodos de string isXa
isalpha() retornará True se a string for constituida somente de letras
e não estiver vazia
isalnum() retornará True se a string for constituida somente de letas e
numeros e não estiver vazia
isdeciamal() retornará True se a string for constituida somente de caracteres
numéricos e não estiver vazia
isspace() retornará True se a string for constituida somente de espaços,
tabulações e quebras de linhas e não estiver vazia
istitle() retornará True se a string for constituida somente de palavras que
comecer com uma letras maiuscula seguida de letas minusculas
Esse métodos são úteis para validar dados de entrada de usuúario, exemplo
'''
while True:
print('\nEnter you age:')
age = input()
if age.isdecimal():
break
print('Please enter a number for your age.')
print('tks')
'''
startswith() endswith()
Retornarão True se o valor de string com o qual forem chamados comeceçar ou
terminar (respectivamente) com a string passada para o método
'''
print('\nTeste dos metodos startswith e endswith')
print('Hello world!'.endswith('world!')) # True
print('abc123'.startswith('abcdef')) # False
print('abc123'.endswith('12')) # False
print('Hello world!'.startswith('Hello world!')) # True
print('Hello world!'.endswith('Hello world!')) # True
'''
join()
O método join() é útil quando temos uma lista de strings que devem ser unidas
em um único valor de string.
Esse método é interessante pois podemos usar uma separador dos itens
'''
listanimals = ['cats', 'dogs', 'bears']
stringanimals = ', '.join(listanimals)
print('\nTeste1 do metodo join:')
print(stringanimals)
stringanimals = ' '.join(listanimals)
print('Teste2 do metodo join, usando um separador')
print(stringanimals)
'''
split()
O método split faz o inverso do join.
É chamado em um valor de string e retorna uma lista de strings.
Um uso comum esta em dividir uma string de multiplas linhas nos caracteres
de quebra de linha
'''
frase = 'My name is Simon'
print('\nTeste1 do método split:')
print(frase.split())
print('\nTeste2 do método split, usando um separador')
print(frase.split('is'))
spam = '''Dear Alice,
How have you been? I am fine.
There is a container in the fridge
that is labeled "Milk Experiment".
Please do not drink it.
Sincerely
Bob'''
print('\nTeste2 do método split, usando um separador\n')
print(spam.split('\n'))
'''
Justificando texto rjust(), ljust(), center()
Os métodos de string retornam uma versão preenchida da string em que
são chamadas com espeços inseridos para justificar o texto
1 - Argumemto é um inteiro referente ao tamanho da string justificada
Perceba que se o inteiro for menor que o tamanho da string, nada acontecera!
2 - Argumento opcional, especifica o caractere de preenchimento
'''
print('\nTeste dos métodos rsjust e ljust:')
hello = 'Hello world'
print(hello.rjust(20))
print(hello.ljust(30))
print(hello.rjust(15, '*'))
print(hello.ljust(25, '-'))
print(hello.center(15))
print(hello.center(25, '='))
'''
Esse métodos serão especialmente úteis quando for necessário exibir
dados tabulares que tiverem o espacámento correto, Exemplo:
'''
print('\nExemplo mais complexo do ljust, rjust e center:\n')
def printPicnic(ItemDict, leftWidth, rightWidth):
print('PICNIC ITEMS'.center(leftWidth + rightWidth, '-'))
for k, v in ItemDict.items():
print(k.ljust(leftWidth, '.') + str(v).rjust(rightWidth))
picnicItems = {'sandwiches': 4, 'apples': 12, 'cups': 4, 'cookies': 8000}
printPicnic(picnicItems, 12, 5) # Executando uma vez
printPicnic(picnicItems, 20, 7) # Executando segunda vez
'''
strip(), rstrip(), lstrip() removendo espaços em brancos
strip()
retornará uma nova string sem caracteres de espacos em branco no inicio ou fim
lstrip() rstrip()s
Removerao caracteres de espacoes em branco das extremidades
da esquerda e direita respectivamente
Opcionalmente, um argumento do tipo string especifica quais caracteres
deverao ser removidos, nao importando a ordem
'''
print('\nTestando metodos para remover os espacos:')
spam = ' Hello World '
print(spam.strip())
print(spam.lstrip())
print(spam.rstrip())
spam = 'SpamSpamBaconSpamEggsSpamSpamSpam'
print(spam.strip('ampS'))
'''
Copiando e colando strings com módulo pyperclip
O modulo pyperclip tem as funcoes de copy() e paste() capazes de
enviar e receber textos do clipboard (area de tranferencia) do seu computador
Enviar a saída de seu programa para o clipboard facilitará colá em um email,
um processador de texto uo em outro software
Necessario usar o import pyperclip para funcionar
pip3 install pyperclip
'''
print('\nExemplo de pyperclip:')
pyperclip.copy('The text to be copied to the clipboard.')
print(pyperclip.paste())
# Fontes
# Livro Automatiando tarefas maçantes com python
# Capitulo 6, Manipulação de strings
| [
1,
18787,
4855,
29914,
2109,
29914,
4691,
29941,
13,
5215,
11451,
546,
24049,
13,
12008,
13,
1231,
3708,
294,
13,
29925,
356,
7681,
13534,
381,
1922,
364,
12971,
1697,
4940,
294,
316,
29871,
297,
11088,
953,
3672,
1347,
1702,
13,
3286,
974,
1758,
29976,
29899,
433,
953,
3672,
1347,
282,
2002,
313,
1610,
1347,
511,
419,
338,
578,
263,
1347,
13,
647,
272,
20484,
10843,
2897,
15215,
267,
316,
885,
4085,
13,
12008,
13,
2158,
877,
1252,
13141,
316,
1922,
1347,
282,
2002,
29901,
1495,
13,
2158,
29898,
29878,
12764,
29876,
29905,
29873,
2193,
338,
10815,
320,
29915,
29879,
6635,
29889,
1495,
13,
13,
12008,
13,
26545,
953,
2473,
572,
294,
6276,
5349,
13,
12008,
13,
13,
2158,
877,
4907,
29905,
29876,
3057,
29872,
13,
311,
13,
29915,
1231,
29915,
13,
311,
13,
1678,
14974,
572,
294,
13,
1915,
5349,
13,
4907,
1495,
13,
13,
13,
12008,
13,
3220,
562,
6241,
321,
317,
29399,
13,
2887,
1714,
502,
314,
16285,
321,
269,
29399,
313,
29943,
2219,
294,
29897,
437,
20661,
13963,
712,
408,
1051,
294,
13,
12008,
13,
13,
2158,
28909,
29876,
3057,
29872,
316,
22780,
1347,
1495,
13,
1028,
314,
353,
525,
10994,
2787,
20714,
13,
2158,
29898,
1028,
314,
29961,
29900,
2314,
29871,
396,
15512,
3350,
1559,
627,
406,
13,
2158,
29898,
1028,
314,
29961,
29946,
2314,
29871,
396,
751,
15073,
1559,
627,
406,
13,
2158,
29898,
1028,
314,
14352,
29896,
2314,
29871,
396,
18514,
4200,
1559,
627,
406,
13,
2158,
29898,
1028,
314,
29961,
29900,
29901,
29945,
2314,
29871,
396,
437,
29871,
29900,
5017,
29871,
29945,
13,
2158,
29898,
1028,
314,
7503,
29945,
2314,
29871,
396,
437,
29871,
29900,
5017,
29871,
29945,
13,
2158,
29898,
1028,
314,
29961,
29953,
29901,
2314,
29871,
396,
437,
29871,
29953,
16659,
288,
2186,
13,
13,
12008,
13,
7094,
7447,
297,
321,
451,
297,
419,
6031,
13,
24768,
1751,
15441,
297,
321,
451,
297,
13279,
29885,
724,
502,
2255,
419,
6031,
13,
465,
326,
1986,
953,
659,
2361,
316,
1051,
294,
13,
12008,
13,
2158,
28909,
29876,
3057,
29872,
316,
6031,
29901,
1495,
13,
2158,
877,
10994,
29915,
297,
525,
10994,
2787,
1495,
29871,
396,
5852,
13,
2158,
877,
10994,
29915,
297,
525,
10994,
1495,
29871,
396,
5852,
13,
2158,
877,
9606,
2208,
29949,
29915,
297,
525,
10994,
2787,
1495,
29871,
396,
7700,
13,
2158,
877,
29915,
297,
525,
1028,
314,
1495,
29871,
396,
5852,
13,
2158,
877,
29883,
1446,
29915,
451,
297,
525,
29883,
1446,
322,
26361,
1495,
29871,
396,
7700,
13,
13,
12008,
13,
21064,
3285,
5224,
3285,
3611,
580,
13,
8015,
1398,
314,
1922,
26121,
1347,
953,
712,
17824,
408,
454,
10678,
1146,
1347,
2441,
15305,
13,
13441,
8817,
1702,
611,
2482,
1810,
294,
2123,
26134,
1810,
294,
29889,
13,
24768,
11510,
24463,
8145,
10551,
314,
263,
1347,
953,
1354,
29892,
5516,
3240,
1398,
314,
2420,
359,
659,
2361,
316,
6031,
13,
13,
24768,
11510,
24463,
7568,
580,
321,
5224,
580,
724,
1368,
3720,
371,
275,
11986,
409,
1764,
3520,
12288,
16928,
261,
3672,
13,
510,
862,
8298,
6940,
1589,
1707,
427,
274,
747,
941,
263,
22732,
4277,
316,
3503,
1810,
294,
321,
26134,
1810,
294,
13,
12008,
13,
13,
2158,
28909,
29876,
3057,
29872,
3248,
11510,
24463,
7568,
321,
5224,
1495,
13,
1028,
314,
353,
525,
10994,
2787,
29915,
13,
1028,
314,
353,
805,
314,
29889,
21064,
580,
13,
2158,
29898,
1028,
314,
29897,
13,
1028,
314,
353,
805,
314,
29889,
13609,
580,
13,
2158,
29898,
1028,
314,
29897,
13,
1028,
314,
353,
805,
314,
29889,
3257,
580,
29871,
396,
15512,
3055,
1235,
336,
3503,
1682,
15173,
13,
2158,
29898,
1028,
314,
29897,
13,
13,
2158,
28909,
29876,
1523,
862,
1743,
6031,
29901,
1495,
13,
2158,
877,
5328,
526,
366,
29973,
1495,
13,
1725,
14067,
353,
525,
29954,
11110,
29915,
13,
361,
11223,
29889,
13609,
580,
1275,
525,
29887,
3015,
2396,
13,
1678,
1596,
877,
29902,
4459,
1395,
403,
2086,
1495,
13,
13,
29937,
17295,
2897,
11510,
24463,
3240,
1398,
314,
1347,
29892,
13,
29937,
13279,
7681,
521,
8715,
2897,
11510,
24463,
316,
1347,
302,
15322,
659,
2361,
13,
2158,
28909,
29876,
3057,
29872,
316,
385,
262,
29882,
4487,
316,
11510,
24463,
1495,
13,
2158,
877,
10994,
4286,
21064,
3101,
13,
2158,
877,
10994,
4286,
21064,
2141,
13609,
3101,
13,
2158,
877,
10994,
4286,
21064,
2141,
13609,
2141,
21064,
3101,
13,
2158,
877,
10994,
4286,
21064,
2141,
13609,
2141,
21064,
2141,
13609,
3101,
13,
13,
13,
12008,
13,
275,
21064,
3285,
338,
13609,
580,
13,
8015,
1398,
279,
1368,
1922,
16497,
1045,
1772,
1562,
5852,
409,
263,
1347,
260,
2147,
10845,
17275,
3672,
1235,
336,
13,
29872,
17824,
408,
454,
10678,
363,
331,
611,
2482,
1810,
294,
2123,
26134,
1810,
294,
29892,
3390,
2561,
2689,
29889,
13,
12008,
13,
13,
2158,
28909,
29876,
3057,
29872,
3248,
11510,
24463,
338,
21064,
580,
321,
338,
13609,
580,
1495,
13,
1028,
314,
353,
525,
10994,
2787,
29915,
13,
2158,
29898,
1028,
314,
29889,
275,
13609,
3101,
29871,
396,
7700,
13,
2158,
29898,
1028,
314,
29889,
275,
21064,
3101,
29871,
396,
7700,
13,
2158,
877,
9606,
2208,
29949,
4286,
275,
21064,
3101,
29871,
396,
5852,
13,
2158,
877,
10736,
29896,
29906,
29941,
29946,
29945,
4286,
275,
13609,
3101,
29871,
396,
5852,
13,
2158,
877,
29896,
29906,
29941,
29946,
29945,
4286,
275,
13609,
3101,
29871,
396,
7700,
13,
2158,
877,
29896,
29906,
29941,
29946,
29945,
4286,
275,
21064,
3101,
29871,
396,
7700,
13,
13,
12008,
13,
29924,
1893,
24463,
316,
1347,
338,
29990,
29874,
13,
275,
2312,
580,
3240,
1398,
20484,
5852,
409,
263,
1347,
363,
10719,
1458,
1047,
2016,
316,
454,
10678,
13,
1678,
321,
8145,
707,
2147,
325,
834,
423,
13,
275,
284,
1949,
580,
3240,
1398,
20484,
5852,
409,
263,
1347,
363,
10719,
1458,
1047,
2016,
316,
1235,
294,
321,
13,
1678,
4825,
359,
321,
8145,
707,
2147,
325,
834,
423,
13,
275,
311,
455,
314,
284,
580,
3240,
1398,
20484,
5852,
409,
263,
1347,
363,
10719,
1458,
1047,
2016,
316,
15215,
267,
13,
1678,
954,
1064,
4869,
321,
8145,
707,
2147,
325,
834,
423,
13,
790,
3535,
580,
3240,
1398,
20484,
5852,
409,
263,
1347,
363,
10719,
1458,
1047,
2016,
316,
9015,
16152,
29892,
13,
1678,
4434,
2497,
5616,
321,
712,
15863,
316,
6276,
5349,
321,
8145,
707,
2147,
325,
834,
423,
13,
391,
1740,
580,
3240,
1398,
20484,
5852,
409,
263,
1347,
363,
10719,
1458,
1047,
2016,
316,
5112,
485,
3417,
712,
13,
1678,
419,
687,
261,
419,
3672,
454,
10678,
611,
2482,
1810,
29874,
7025,
1458,
316,
1235,
294,
26134,
1810,
294,
13,
13,
13,
14190,
344,
11510,
24463,
12777,
3720,
371,
275,
1702,
2854,
279,
270,
2255,
316,
9953,
1114,
316,
502,
29884,
30030,
2628,
29892,
429,
13141,
13,
12008,
13,
13,
8000,
5852,
29901,
13,
1678,
1596,
28909,
29876,
10399,
366,
5046,
29901,
1495,
13,
1678,
5046,
353,
1881,
580,
13,
1678,
565,
5046,
29889,
275,
7099,
3039,
7295,
13,
4706,
2867,
13,
1678,
1596,
877,
12148,
3896,
263,
1353,
363,
596,
5046,
29889,
1495,
13,
2158,
877,
29873,
2039,
1495,
13,
13,
12008,
13,
27382,
2541,
580,
10614,
2541,
580,
13,
8015,
1398,
279,
1368,
5852,
409,
288,
16497,
316,
1347,
419,
288,
4021,
363,
331,
11179,
2255,
2041,
346,
30019,
279,
2123,
13,
18821,
279,
313,
690,
1103,
11778,
29897,
419,
263,
1347,
1209,
1114,
1702,
288,
11510,
8144,
13,
12008,
13,
13,
2158,
28909,
29876,
3057,
29872,
3248,
1539,
24463,
8665,
2541,
321,
10614,
2541,
1495,
13,
2158,
877,
10994,
3186,
29991,
4286,
1975,
2541,
877,
11526,
29991,
8785,
29871,
396,
5852,
13,
2158,
877,
10736,
29896,
29906,
29941,
4286,
27382,
2541,
877,
10736,
1753,
8785,
29871,
396,
7700,
13,
2158,
877,
10736,
29896,
29906,
29941,
4286,
1975,
2541,
877,
29896,
29906,
8785,
29871,
396,
7700,
13,
2158,
877,
10994,
3186,
29991,
4286,
27382,
2541,
877,
10994,
3186,
29991,
8785,
29871,
396,
5852,
13,
2158,
877,
10994,
3186,
29991,
4286,
1975,
2541,
877,
10994,
3186,
29991,
8785,
29871,
396,
5852,
13,
13,
12008,
13,
7122,
580,
13,
29949,
11510,
8144,
5988,
580,
904,
3720,
1376,
9836,
1350,
359,
3672,
15023,
316,
6031,
712,
2906,
331,
724,
443,
8817,
13,
331,
1922,
27794,
16497,
316,
1347,
29889,
13,
14190,
344,
11510,
8144,
904,
26636,
1647,
772,
275,
13279,
7681,
28336,
3672,
2903,
3136,
3248,
372,
575,
13,
13,
12008,
13,
13,
1761,
11576,
1338,
353,
6024,
29883,
1446,
742,
525,
29881,
12099,
742,
525,
29890,
15451,
2033,
13,
1807,
11576,
1338,
353,
13420,
15300,
7122,
29898,
1761,
11576,
1338,
29897,
13,
2158,
28909,
29876,
3057,
29872,
29896,
437,
1539,
8144,
5988,
29901,
1495,
13,
2158,
29898,
1807,
11576,
1338,
29897,
13,
13,
1807,
11576,
1338,
353,
525,
15300,
7122,
29898,
1761,
11576,
1338,
29897,
13,
2158,
877,
3057,
29872,
29906,
437,
1539,
8144,
5988,
29892,
502,
1743,
1922,
2903,
3136,
1495,
13,
2158,
29898,
1807,
11576,
1338,
29897,
13,
13,
12008,
13,
5451,
580,
13,
29949,
11510,
8144,
6219,
16928,
288,
297,
25175,
437,
5988,
29889,
13,
30062,
11179,
912,
953,
1922,
16497,
316,
1347,
321,
3240,
272,
1056,
3672,
15023,
316,
6031,
29889,
13,
13,
29965,
29885,
17448,
419,
398,
7444,
953,
25227,
381,
3672,
1347,
316,
2473,
572,
294,
6276,
5349,
7814,
15215,
267,
13,
311,
712,
2634,
316,
6276,
2350,
13,
12008,
13,
13,
1341,
559,
353,
525,
3421,
1024,
338,
11254,
29915,
13,
2158,
28909,
29876,
3057,
29872,
29896,
437,
11510,
8144,
6219,
29901,
1495,
13,
2158,
29898,
1341,
559,
29889,
5451,
3101,
13,
2158,
28909,
29876,
3057,
29872,
29906,
437,
11510,
8144,
6219,
29892,
502,
1743,
1922,
2903,
3136,
1495,
13,
2158,
29898,
1341,
559,
29889,
5451,
877,
275,
8785,
13,
13,
1028,
314,
353,
14550,
29928,
799,
16308,
29892,
13,
5328,
505,
366,
1063,
29973,
306,
626,
2691,
29889,
13,
8439,
338,
263,
5639,
297,
278,
1424,
5525,
13,
5747,
338,
301,
24025,
376,
29316,
29895,
1222,
15362,
1642,
13,
12148,
437,
451,
13748,
372,
29889,
13,
29903,
262,
2265,
873,
13,
29362,
12008,
13,
2158,
28909,
29876,
3057,
29872,
29906,
437,
11510,
8144,
6219,
29892,
502,
1743,
1922,
2903,
3136,
29905,
29876,
1495,
13,
2158,
29898,
1028,
314,
29889,
5451,
28909,
29876,
8785,
13,
13,
12008,
13,
14084,
928,
1743,
1426,
29877,
364,
5143,
3285,
301,
5143,
3285,
4818,
580,
13,
24768,
11510,
24463,
316,
1347,
3240,
1398,
314,
3672,
1224,
1368,
758,
264,
305,
1458,
1146,
1347,
953,
712,
13,
29879,
1368,
11179,
3922,
419,
4740,
16152,
13534,
4396,
1702,
925,
928,
279,
288,
1426,
29877,
13,
13,
29896,
448,
11842,
398,
331,
517,
904,
1922,
2293,
3350,
2737,
2016,
5017,
260,
13533,
1251,
1146,
1347,
925,
928,
1114,
13,
5894,
346,
2291,
712,
409,
288,
2293,
3350,
363,
26764,
712,
288,
260,
13533,
1251,
1146,
1347,
29892,
25801,
23789,
371,
23322,
29991,
13,
13,
29906,
448,
23125,
29877,
1015,
29883,
1848,
29892,
13894,
15039,
288,
1559,
627,
406,
316,
758,
264,
305,
6174,
13,
12008,
13,
13,
2158,
28909,
29876,
3057,
29872,
3248,
11510,
24463,
20371,
5143,
321,
301,
5143,
29901,
1495,
13,
13,
12199,
353,
525,
10994,
3186,
29915,
13,
2158,
29898,
12199,
29889,
29878,
5143,
29898,
29906,
29900,
876,
13,
2158,
29898,
12199,
29889,
29880,
5143,
29898,
29941,
29900,
876,
13,
2158,
29898,
12199,
29889,
29878,
5143,
29898,
29896,
29945,
29892,
525,
29930,
8785,
13,
2158,
29898,
12199,
29889,
29880,
5143,
29898,
29906,
29945,
29892,
17411,
8785,
13,
2158,
29898,
12199,
29889,
5064,
29898,
29896,
29945,
876,
13,
2158,
29898,
12199,
29889,
5064,
29898,
29906,
29945,
29892,
525,
2433,
876,
13,
13,
12008,
13,
14190,
344,
11510,
24463,
724,
1368,
11605,
2689,
3720,
371,
275,
9836,
363,
3520,
12288,
429,
747,
381,
13,
29881,
2255,
4434,
1070,
267,
712,
260,
2147,
331,
288,
5152,
562,
29976,
358,
29877,
14515,
517,
29892,
1222,
13141,
29901,
13,
12008,
13,
13,
2158,
28909,
29876,
1252,
13141,
3503,
4280,
29877,
437,
301,
5143,
29892,
364,
5143,
321,
4818,
3583,
29876,
1495,
13,
13,
13,
1753,
1596,
29925,
293,
7823,
29898,
2001,
21533,
29892,
2175,
6110,
29892,
1492,
6110,
1125,
13,
1678,
1596,
877,
2227,
13778,
2965,
306,
4330,
4345,
4286,
5064,
29898,
1563,
6110,
718,
1492,
6110,
29892,
17411,
8785,
13,
1678,
363,
413,
29892,
325,
297,
10976,
21533,
29889,
7076,
7295,
13,
4706,
1596,
29898,
29895,
29889,
29880,
5143,
29898,
1563,
6110,
29892,
15300,
1495,
718,
851,
29898,
29894,
467,
29878,
5143,
29898,
1266,
6110,
876,
13,
13,
13,
16447,
7823,
6913,
353,
11117,
29879,
392,
16416,
267,
2396,
29871,
29946,
29892,
525,
932,
793,
2396,
29871,
29896,
29906,
29892,
525,
4979,
567,
2396,
29871,
29946,
29892,
525,
15108,
583,
2396,
29871,
29947,
29900,
29900,
29900,
29913,
13,
2158,
29925,
293,
7823,
29898,
16447,
7823,
6913,
29892,
29871,
29896,
29906,
29892,
29871,
29945,
29897,
29871,
396,
11080,
329,
1743,
3672,
7763,
13,
2158,
29925,
293,
7823,
29898,
16447,
7823,
6913,
29892,
29871,
29906,
29900,
29892,
29871,
29955,
29897,
29871,
396,
11080,
329,
1743,
17329,
7763,
13,
13,
12008,
13,
17010,
3285,
364,
17010,
3285,
301,
17010,
580,
4030,
2765,
9015,
16152,
953,
20531,
3944,
13,
13,
17010,
580,
13,
2267,
1398,
20484,
3672,
26121,
1347,
3031,
15215,
267,
316,
5152,
562,
359,
953,
20531,
1111,
694,
297,
11088,
2123,
285,
326,
13,
29880,
17010,
580,
364,
17010,
580,
29879,
13,
7301,
957,
6241,
15215,
267,
316,
5152,
11216,
267,
953,
20531,
1111,
1697,
9413,
7305,
13,
1388,
831,
7808,
1388,
321,
2970,
2028,
3390,
11778,
13,
13,
29949,
6739,
1848,
2689,
29892,
1922,
2980,
29877,
437,
13306,
1347,
13894,
15039,
439,
1759,
15215,
267,
13,
311,
369,
6241,
724,
4030,
4396,
29892,
1055,
29877,
1053,
1743,
263,
470,
2310,
13,
12008,
13,
13,
2158,
28909,
29876,
3057,
1743,
1539,
24463,
1702,
1083,
957,
2897,
5152,
562,
359,
29901,
1495,
13,
1028,
314,
353,
525,
259,
15043,
2787,
1678,
525,
13,
2158,
29898,
1028,
314,
29889,
17010,
3101,
13,
2158,
29898,
1028,
314,
29889,
29880,
17010,
3101,
13,
2158,
29898,
1028,
314,
29889,
29878,
17010,
3101,
13,
13,
1028,
314,
353,
525,
5592,
314,
5592,
314,
29933,
23074,
5592,
314,
29923,
1505,
29879,
5592,
314,
5592,
314,
5592,
314,
29915,
13,
2158,
29898,
1028,
314,
29889,
17010,
877,
1160,
29903,
8785,
13,
13,
12008,
13,
29907,
459,
29875,
1743,
321,
784,
1743,
6031,
419,
286,
4431,
7207,
11451,
546,
24049,
13,
13,
29949,
878,
7207,
11451,
546,
24049,
1350,
408,
2090,
1111,
267,
316,
3509,
580,
321,
11417,
580,
2117,
834,
267,
316,
13,
264,
1403,
279,
321,
2414,
495,
1426,
359,
437,
20102,
3377,
313,
6203,
316,
22024,
571,
5760,
29897,
437,
5078,
2912,
3136,
13,
2369,
1403,
279,
263,
872,
28815,
316,
5078,
16914,
1702,
288,
20102,
3377,
16089,
3673,
29976,
784,
29976,
953,
1922,
4876,
29892,
13,
398,
1889,
3136,
316,
1426,
29877,
318,
29877,
953,
714,
307,
7047,
13,
13,
29940,
687,
404,
2628,
28336,
288,
1053,
11451,
546,
24049,
1702,
21802,
279,
13,
13096,
29941,
2601,
11451,
546,
24049,
13,
12008,
13,
13,
2158,
28909,
29876,
1252,
13141,
316,
11451,
546,
24049,
29901,
1495,
13,
2272,
546,
24049,
29889,
8552,
877,
1576,
1426,
304,
367,
13746,
304,
278,
20102,
3377,
29889,
1495,
13,
2158,
29898,
2272,
546,
24049,
29889,
16179,
3101,
13,
13,
13,
29937,
10928,
267,
13,
29937,
16238,
307,
15854,
2219,
1743,
260,
598,
13629,
611,
30019,
3794,
419,
3017,
13,
29937,
22009,
7207,
29871,
29953,
29892,
2315,
666,
2497,
2340,
316,
6031,
13,
2
] |
conanfile.py | bincrafters/conan-boost_timer | 0 | 114497 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import python_requires
base = python_requires("boost_base/2.0.0@bincrafters/testing")
class BoostTimerConan(base.BoostBaseConan):
name = "boost_timer"
version = "1.70.0"
@property
def boost_build_requires(self):
return ["io"]
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
378,
550,
1053,
3017,
29918,
276,
339,
2658,
13,
13,
13,
3188,
353,
3017,
29918,
276,
339,
2658,
703,
17079,
29918,
3188,
29914,
29906,
29889,
29900,
29889,
29900,
29992,
2109,
26844,
906,
29879,
29914,
13424,
1159,
13,
13,
13,
1990,
1952,
520,
14745,
1168,
273,
29898,
3188,
29889,
8431,
520,
5160,
1168,
273,
1125,
13,
1678,
1024,
353,
376,
17079,
29918,
20404,
29908,
13,
1678,
1873,
353,
376,
29896,
29889,
29955,
29900,
29889,
29900,
29908,
13,
13,
1678,
732,
6799,
13,
1678,
822,
14505,
29918,
4282,
29918,
276,
339,
2658,
29898,
1311,
1125,
13,
4706,
736,
6796,
601,
3108,
13,
2
] |
tests/sentinel2/test_metadata.py | jamesvrt/stactools | 0 | 172612 | import unittest
from stactools.sentinel2.safe_manifest import SafeManifest
from stactools.sentinel2.product_metadata import ProductMetadata
from stactools.sentinel2.granule_metadata import GranuleMetadata
from tests.utils import TestData
class Sentinel2MetadataTest(unittest.TestCase):
def test_parses_product_metadata_properties(self):
manifest_path = TestData.get_path(
'data-files/sentinel2/S2A_MSIL2A_20190212T192651_N0212_R013_T07HFE_20201007T160857.SAFE'
)
manifest = SafeManifest(manifest_path)
product_metadata = ProductMetadata(manifest.product_metadata_href)
granulemetadata = GranuleMetadata(manifest.granule_metadata_href)
s2_props = product_metadata.metadata_dict
s2_props.update(granulemetadata.metadata_dict)
expected = {
# From product metadata
's2:product_uri':
'S2A_MSIL2A_20190212T192651_N0212_R013_T07HFE_20201007T160857.SAFE',
's2:generation_time': '2020-10-07T16:08:57.135Z',
's2:processing_baseline': '02.12',
's2:product_type': 'S2MSI2A',
's2:datatake_id': 'GS2A_20190212T192651_019029_N02.12',
's2:datatake_type': 'INS-NOBS',
's2:datastrip_id':
'S2A_OPER_MSI_L2A_DS_ESRI_20201007T160858_S20190212T192646_N02.12',
's2:granule_id':
'S2A_OPER_MSI_L2A_TL_ESRI_20201007T160858_A019029_T07HFE_N02.12',
's2:mgrs_tile': '07HFE',
's2:reflectance_conversion_factor': 1.02763689829235,
# From granule metadata
's2:degraded_msi_data_percentage': 0.0,
's2:nodata_pixel_percentage': 96.769553,
's2:saturated_defective_pixel_percentage': 0.0,
's2:dark_features_percentage': 0.0,
's2:cloud_shadow_percentage': 0.0,
's2:vegetation_percentage': 0.000308,
's2:not_vegetated_percentage': 0.069531,
's2:water_percentage': 48.349833,
's2:unclassified_percentage': 0.0,
's2:medium_proba_clouds_percentage': 14.61311,
's2:high_proba_clouds_percentage': 24.183494,
's2:thin_sirrus_percentage': 12.783723,
's2:snow_ice_percentage': 0.0,
's2:mean_solar_zenith': 32.707073851362,
's2:mean_solar_azimuth': 62.3286549448294
}
for k, v in expected.items():
self.assertIn(k, s2_props)
self.assertEqual(s2_props[k], v)
self.assertEqual(granulemetadata.cloudiness_percentage, 51.580326)
| [
1,
1053,
443,
27958,
13,
13,
3166,
380,
627,
8789,
29889,
29879,
15440,
295,
29906,
29889,
11177,
29918,
29135,
1053,
5701,
1725,
2517,
7004,
13,
3166,
380,
627,
8789,
29889,
29879,
15440,
295,
29906,
29889,
4704,
29918,
19635,
1053,
10969,
18417,
13,
3166,
380,
627,
8789,
29889,
29879,
15440,
295,
29906,
29889,
629,
273,
1297,
29918,
19635,
1053,
6274,
1297,
18417,
13,
13,
3166,
6987,
29889,
13239,
1053,
4321,
1469,
13,
13,
13,
1990,
317,
15440,
295,
29906,
18417,
3057,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
822,
1243,
29918,
862,
29879,
267,
29918,
4704,
29918,
19635,
29918,
11330,
29898,
1311,
1125,
13,
4706,
10419,
29918,
2084,
353,
4321,
1469,
29889,
657,
29918,
2084,
29898,
13,
9651,
525,
1272,
29899,
5325,
29914,
29879,
15440,
295,
29906,
29914,
29903,
29906,
29909,
29918,
4345,
6227,
29906,
29909,
29918,
29906,
29900,
29896,
29929,
29900,
29906,
29896,
29906,
29911,
29896,
29929,
29906,
29953,
29945,
29896,
29918,
29940,
29900,
29906,
29896,
29906,
29918,
29934,
29900,
29896,
29941,
29918,
29911,
29900,
29955,
29950,
16359,
29918,
29906,
29900,
29906,
29900,
29896,
29900,
29900,
29955,
29911,
29896,
29953,
29900,
29947,
29945,
29955,
29889,
29903,
5098,
29923,
29915,
13,
4706,
1723,
13,
13,
4706,
10419,
353,
5701,
1725,
2517,
7004,
29898,
29135,
29918,
2084,
29897,
13,
13,
4706,
3234,
29918,
19635,
353,
10969,
18417,
29898,
29135,
29889,
4704,
29918,
19635,
29918,
12653,
29897,
13,
4706,
3803,
1297,
19635,
353,
6274,
1297,
18417,
29898,
29135,
29889,
629,
273,
1297,
29918,
19635,
29918,
12653,
29897,
13,
13,
4706,
269,
29906,
29918,
11030,
353,
3234,
29918,
19635,
29889,
19635,
29918,
8977,
13,
4706,
269,
29906,
29918,
11030,
29889,
5504,
29898,
629,
273,
1297,
19635,
29889,
19635,
29918,
8977,
29897,
13,
13,
4706,
3806,
353,
426,
13,
9651,
396,
3645,
3234,
15562,
13,
9651,
525,
29879,
29906,
29901,
4704,
29918,
5338,
2396,
13,
9651,
525,
29903,
29906,
29909,
29918,
4345,
6227,
29906,
29909,
29918,
29906,
29900,
29896,
29929,
29900,
29906,
29896,
29906,
29911,
29896,
29929,
29906,
29953,
29945,
29896,
29918,
29940,
29900,
29906,
29896,
29906,
29918,
29934,
29900,
29896,
29941,
29918,
29911,
29900,
29955,
29950,
16359,
29918,
29906,
29900,
29906,
29900,
29896,
29900,
29900,
29955,
29911,
29896,
29953,
29900,
29947,
29945,
29955,
29889,
29903,
5098,
29923,
742,
13,
9651,
525,
29879,
29906,
29901,
4738,
362,
29918,
2230,
2396,
525,
29906,
29900,
29906,
29900,
29899,
29896,
29900,
29899,
29900,
29955,
29911,
29896,
29953,
29901,
29900,
29947,
29901,
29945,
29955,
29889,
29896,
29941,
29945,
29999,
742,
13,
9651,
525,
29879,
29906,
29901,
19170,
29918,
6500,
5570,
2396,
525,
29900,
29906,
29889,
29896,
29906,
742,
13,
9651,
525,
29879,
29906,
29901,
4704,
29918,
1853,
2396,
525,
29903,
29906,
4345,
29902,
29906,
29909,
742,
13,
9651,
525,
29879,
29906,
29901,
4130,
532,
446,
29918,
333,
2396,
525,
10749,
29906,
29909,
29918,
29906,
29900,
29896,
29929,
29900,
29906,
29896,
29906,
29911,
29896,
29929,
29906,
29953,
29945,
29896,
29918,
29900,
29896,
29929,
29900,
29906,
29929,
29918,
29940,
29900,
29906,
29889,
29896,
29906,
742,
13,
9651,
525,
29879,
29906,
29901,
4130,
532,
446,
29918,
1853,
2396,
525,
1177,
29903,
29899,
6632,
9851,
742,
13,
9651,
525,
29879,
29906,
29901,
4130,
579,
6472,
29918,
333,
2396,
13,
9651,
525,
29903,
29906,
29909,
29918,
4590,
1001,
29918,
4345,
29902,
29918,
29931,
29906,
29909,
29918,
8452,
29918,
2890,
3960,
29918,
29906,
29900,
29906,
29900,
29896,
29900,
29900,
29955,
29911,
29896,
29953,
29900,
29947,
29945,
29947,
29918,
29903,
29906,
29900,
29896,
29929,
29900,
29906,
29896,
29906,
29911,
29896,
29929,
29906,
29953,
29946,
29953,
29918,
29940,
29900,
29906,
29889,
29896,
29906,
742,
13,
9651,
525,
29879,
29906,
29901,
629,
273,
1297,
29918,
333,
2396,
13,
9651,
525,
29903,
29906,
29909,
29918,
4590,
1001,
29918,
4345,
29902,
29918,
29931,
29906,
29909,
29918,
14632,
29918,
2890,
3960,
29918,
29906,
29900,
29906,
29900,
29896,
29900,
29900,
29955,
29911,
29896,
29953,
29900,
29947,
29945,
29947,
29918,
29909,
29900,
29896,
29929,
29900,
29906,
29929,
29918,
29911,
29900,
29955,
29950,
16359,
29918,
29940,
29900,
29906,
29889,
29896,
29906,
742,
13,
9651,
525,
29879,
29906,
29901,
29885,
629,
29879,
29918,
29873,
488,
2396,
525,
29900,
29955,
29950,
16359,
742,
13,
9651,
525,
29879,
29906,
29901,
13191,
749,
29918,
535,
3259,
29918,
19790,
2396,
29871,
29896,
29889,
29900,
29906,
29955,
29953,
29941,
29953,
29947,
29929,
29947,
29906,
29929,
29906,
29941,
29945,
29892,
13,
13,
9651,
396,
3645,
3803,
1297,
15562,
13,
9651,
525,
29879,
29906,
29901,
311,
5105,
287,
29918,
29885,
1039,
29918,
1272,
29918,
25376,
482,
2396,
29871,
29900,
29889,
29900,
29892,
13,
9651,
525,
29879,
29906,
29901,
29876,
397,
532,
29918,
29886,
15711,
29918,
25376,
482,
2396,
29871,
29929,
29953,
29889,
29955,
29953,
29929,
29945,
29945,
29941,
29892,
13,
9651,
525,
29879,
29906,
29901,
29879,
1337,
630,
29918,
1753,
522,
573,
29918,
29886,
15711,
29918,
25376,
482,
2396,
29871,
29900,
29889,
29900,
29892,
13,
9651,
525,
29879,
29906,
29901,
26031,
29918,
22100,
29918,
25376,
482,
2396,
29871,
29900,
29889,
29900,
29892,
13,
9651,
525,
29879,
29906,
29901,
9274,
29918,
17505,
29918,
25376,
482,
2396,
29871,
29900,
29889,
29900,
29892,
13,
9651,
525,
29879,
29906,
29901,
345,
657,
362,
29918,
25376,
482,
2396,
29871,
29900,
29889,
29900,
29900,
29900,
29941,
29900,
29947,
29892,
13,
9651,
525,
29879,
29906,
29901,
1333,
29918,
345,
657,
630,
29918,
25376,
482,
2396,
29871,
29900,
29889,
29900,
29953,
29929,
29945,
29941,
29896,
29892,
13,
9651,
525,
29879,
29906,
29901,
13405,
29918,
25376,
482,
2396,
29871,
29946,
29947,
29889,
29941,
29946,
29929,
29947,
29941,
29941,
29892,
13,
9651,
525,
29879,
29906,
29901,
348,
1990,
2164,
29918,
25376,
482,
2396,
29871,
29900,
29889,
29900,
29892,
13,
9651,
525,
29879,
29906,
29901,
27891,
29918,
771,
2291,
29918,
9274,
29879,
29918,
25376,
482,
2396,
29871,
29896,
29946,
29889,
29953,
29896,
29941,
29896,
29896,
29892,
13,
9651,
525,
29879,
29906,
29901,
9812,
29918,
771,
2291,
29918,
9274,
29879,
29918,
25376,
482,
2396,
29871,
29906,
29946,
29889,
29896,
29947,
29941,
29946,
29929,
29946,
29892,
13,
9651,
525,
29879,
29906,
29901,
386,
262,
29918,
29879,
381,
15816,
29918,
25376,
482,
2396,
29871,
29896,
29906,
29889,
29955,
29947,
29941,
29955,
29906,
29941,
29892,
13,
9651,
525,
29879,
29906,
29901,
29879,
3707,
29918,
625,
29918,
25376,
482,
2396,
29871,
29900,
29889,
29900,
29892,
13,
9651,
525,
29879,
29906,
29901,
12676,
29918,
2929,
279,
29918,
2256,
389,
2396,
29871,
29941,
29906,
29889,
29955,
29900,
29955,
29900,
29955,
29941,
29947,
29945,
29896,
29941,
29953,
29906,
29892,
13,
9651,
525,
29879,
29906,
29901,
12676,
29918,
2929,
279,
29918,
834,
326,
2806,
2396,
29871,
29953,
29906,
29889,
29941,
29906,
29947,
29953,
29945,
29946,
29929,
29946,
29946,
29947,
29906,
29929,
29946,
13,
4706,
500,
13,
13,
4706,
363,
413,
29892,
325,
297,
3806,
29889,
7076,
7295,
13,
9651,
1583,
29889,
9294,
797,
29898,
29895,
29892,
269,
29906,
29918,
11030,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
29879,
29906,
29918,
11030,
29961,
29895,
1402,
325,
29897,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
629,
273,
1297,
19635,
29889,
9274,
3335,
29918,
25376,
482,
29892,
29871,
29945,
29896,
29889,
29945,
29947,
29900,
29941,
29906,
29953,
29897,
13,
2
] |
examples/pull_entry_values.py | c0gnac/dealcloud-python | 1 | 48350 | """
This script pulls the values of the fields for the "Project Genome" entry on
the Deal list
"""
import getpass as gp
import sys
import requests
import dealcloud as dc
# Create an instance of a client for the DealCloud Data Service and a service
# proxy
try:
client = dc.create_client(
email=input('Email: '), password=<PASSWORD>(),
hostname=input('Hostname: ')
)
except requests.exceptions.ConnectionError:
print('Failed to connect to the DealCloud Web Service.')
sys.exit()
service = dc.bind_service(client)
# Find all of the lists in the site and try to find the Deal list by name
lists = service.GetEntryLists()
try:
deal_list = list(filter(lambda l: l.Name == 'Deal', lists))[0]
except IndexError:
print('Deal list could not be found.')
sys.exit()
# Find all of the entries on the Deal list and try to find the 'Project Genome'
# entry by name
entries = service.GetListEntries(deal_list.Id)
try:
deal_entry = list(filter(lambda e: e.Name == 'Project Genome', entries))[0]
except IndexError:
print('Project Genome could not be found.')
sys.exit()
# Find all of the fields on all of the lists in a site, get the ones on the
# Deal list
fields = service.GetFields()
deal_fields = list(filter(lambda f: f.EntryListId == deal_list.Id, fields))
# Create a type factory to access the types provided by the service
factory = client.type_factory('ns0')
# Build the payload for your request with the types provided by the factory
# and send it
requests = factory.ArrayOfDCPull()
for f in deal_fields:
p = factory.DCPull(EntryId=deal_entry.Id, FieldId=f.Id)
requests.DCPull.append(p)
response = service.ProcessDCPull(
requests=requests, resolveReferenceUrls=True, fillExtendedData=True
)
# Iterate over your responses and print them to the console
for r in response:
try:
field = list(filter(lambda f: f.Id == r.FieldId, deal_fields))[0]
except IndexError:
print(f'Field {r.FieldId} cound not be named.')
continue
print(f'{field.Name}: {r.Value}')
| [
1,
9995,
30004,
13,
4013,
2471,
8206,
29879,
278,
1819,
310,
278,
4235,
363,
278,
376,
7653,
5739,
608,
29908,
6251,
373,
30004,
13,
1552,
897,
284,
1051,
30004,
13,
15945,
19451,
13,
30004,
13,
5215,
679,
3364,
408,
330,
29886,
30004,
13,
5215,
10876,
30004,
13,
30004,
13,
5215,
7274,
30004,
13,
30004,
13,
5215,
5376,
9274,
408,
270,
29883,
30004,
13,
30004,
13,
30004,
13,
29937,
6204,
385,
2777,
310,
263,
3132,
363,
278,
897,
284,
20442,
3630,
6692,
322,
263,
2669,
30004,
13,
29937,
10166,
30004,
13,
2202,
29901,
30004,
13,
1678,
3132,
353,
270,
29883,
29889,
3258,
29918,
4645,
29898,
30004,
13,
4706,
4876,
29922,
2080,
877,
9823,
29901,
525,
511,
4800,
29922,
29966,
25711,
17013,
29958,
3285,
30004,
13,
4706,
3495,
978,
29922,
2080,
877,
8514,
978,
29901,
525,
8443,
13,
1678,
1723,
30004,
13,
19499,
7274,
29889,
11739,
29879,
29889,
5350,
2392,
29901,
30004,
13,
1678,
1596,
877,
17776,
304,
4511,
304,
278,
897,
284,
20442,
2563,
6692,
29889,
1495,
30004,
13,
1678,
10876,
29889,
13322,
26471,
13,
5509,
353,
270,
29883,
29889,
5355,
29918,
5509,
29898,
4645,
8443,
13,
30004,
13,
30004,
13,
29937,
10987,
599,
310,
278,
8857,
297,
278,
3268,
322,
1018,
304,
1284,
278,
897,
284,
1051,
491,
1024,
30004,
13,
21513,
353,
2669,
29889,
2577,
9634,
1293,
29879,
26471,
13,
2202,
29901,
30004,
13,
1678,
5376,
29918,
1761,
353,
1051,
29898,
4572,
29898,
2892,
301,
29901,
301,
29889,
1170,
1275,
525,
2772,
284,
742,
8857,
876,
29961,
29900,
29962,
30004,
13,
19499,
11374,
2392,
29901,
30004,
13,
1678,
1596,
877,
2772,
284,
1051,
1033,
451,
367,
1476,
29889,
1495,
30004,
13,
1678,
10876,
29889,
13322,
26471,
13,
30004,
13,
30004,
13,
29937,
10987,
599,
310,
278,
9976,
373,
278,
897,
284,
1051,
322,
1018,
304,
1284,
278,
525,
7653,
5739,
608,
29915,
30004,
13,
29937,
6251,
491,
1024,
30004,
13,
26586,
353,
2669,
29889,
2577,
1293,
5292,
2722,
29898,
311,
284,
29918,
1761,
29889,
1204,
8443,
13,
2202,
29901,
30004,
13,
1678,
5376,
29918,
8269,
353,
1051,
29898,
4572,
29898,
2892,
321,
29901,
321,
29889,
1170,
1275,
525,
7653,
5739,
608,
742,
9976,
876,
29961,
29900,
29962,
30004,
13,
19499,
11374,
2392,
29901,
30004,
13,
1678,
1596,
877,
7653,
5739,
608,
1033,
451,
367,
1476,
29889,
1495,
30004,
13,
1678,
10876,
29889,
13322,
26471,
13,
30004,
13,
30004,
13,
29937,
10987,
599,
310,
278,
4235,
373,
599,
310,
278,
8857,
297,
263,
3268,
29892,
679,
278,
6743,
373,
278,
30004,
13,
29937,
897,
284,
1051,
30004,
13,
9621,
353,
2669,
29889,
2577,
14256,
26471,
13,
311,
284,
29918,
9621,
353,
1051,
29898,
4572,
29898,
2892,
285,
29901,
285,
29889,
9634,
1293,
1204,
1275,
5376,
29918,
1761,
29889,
1204,
29892,
4235,
876,
30004,
13,
30004,
13,
30004,
13,
29937,
6204,
263,
1134,
12529,
304,
2130,
278,
4072,
4944,
491,
278,
2669,
30004,
13,
14399,
353,
3132,
29889,
1853,
29918,
14399,
877,
1983,
29900,
1495,
30004,
13,
30004,
13,
30004,
13,
29937,
8878,
278,
20092,
363,
596,
2009,
411,
278,
4072,
4944,
491,
278,
12529,
30004,
13,
29937,
322,
3638,
372,
30004,
13,
24830,
353,
12529,
29889,
2588,
2776,
29928,
6271,
913,
26471,
13,
1454,
285,
297,
5376,
29918,
9621,
29901,
30004,
13,
1678,
282,
353,
12529,
29889,
29928,
6271,
913,
29898,
9634,
1204,
29922,
311,
284,
29918,
8269,
29889,
1204,
29892,
8989,
1204,
29922,
29888,
29889,
1204,
8443,
13,
1678,
7274,
29889,
29928,
6271,
913,
29889,
4397,
29898,
29886,
8443,
13,
5327,
353,
2669,
29889,
7032,
29928,
6271,
913,
29898,
30004,
13,
1678,
7274,
29922,
24830,
29892,
8814,
7422,
5983,
29879,
29922,
5574,
29892,
5445,
5647,
2760,
1469,
29922,
5574,
30004,
13,
8443,
13,
30004,
13,
29937,
20504,
403,
975,
596,
20890,
322,
1596,
963,
304,
278,
2991,
30004,
13,
1454,
364,
297,
2933,
29901,
30004,
13,
1678,
1018,
29901,
30004,
13,
4706,
1746,
353,
1051,
29898,
4572,
29898,
2892,
285,
29901,
285,
29889,
1204,
1275,
364,
29889,
3073,
1204,
29892,
5376,
29918,
9621,
876,
29961,
29900,
29962,
30004,
13,
1678,
5174,
11374,
2392,
29901,
30004,
13,
4706,
1596,
29898,
29888,
29915,
3073,
426,
29878,
29889,
3073,
1204,
29913,
274,
618,
451,
367,
4257,
29889,
1495,
30004,
13,
4706,
6773,
30004,
13,
1678,
1596,
29898,
29888,
29915,
29912,
2671,
29889,
1170,
6177,
426,
29878,
29889,
1917,
29913,
1495,
30004,
13,
2
] |
stubs/workspaces.py | claytonbrown/troposphere | 0 | 13640 | <reponame>claytonbrown/troposphere
from . import AWSObject, AWSProperty
from .validators import *
from .constants import *
# -------------------------------------------
class WorkSpacesWorkspace(AWSObject):
"""# AWS::WorkSpaces::Workspace - CloudFormationResourceSpecification version: 1.4.0
{
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html",
"Properties": {
"BundleId": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-bundleid",
"PrimitiveType": "String",
"Required": true,
"UpdateType": "Conditional"
},
"DirectoryId": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-directoryid",
"PrimitiveType": "String",
"Required": true,
"UpdateType": "Conditional"
},
"RootVolumeEncryptionEnabled": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-rootvolumeencryptionenabled",
"PrimitiveType": "Boolean",
"Required": false,
"UpdateType": "Conditional"
},
"UserName": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-username",
"PrimitiveType": "String",
"Required": true,
"UpdateType": "Immutable"
},
"UserVolumeEncryptionEnabled": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-uservolumeencryptionenabled",
"PrimitiveType": "Boolean",
"Required": false,
"UpdateType": "Conditional"
},
"VolumeEncryptionKey": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-volumeencryptionkey",
"PrimitiveType": "String",
"Required": false,
"UpdateType": "Conditional"
}
}
}
"""
resource_type = "AWS::WorkSpaces::Workspace"
props = {
'BundleId': (basestring, True, 'Conditional', 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-bundleid'),
'DirectoryId': (basestring, True, 'Conditional', 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-directoryid'),
'RootVolumeEncryptionEnabled': (boolean, False, 'Conditional', 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-rootvolumeencryptionenabled'),
'UserName': (basestring, True, 'Immutable', 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-username'),
'UserVolumeEncryptionEnabled': (boolean, False, 'Conditional', 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-uservolumeencryptionenabled'),
'VolumeEncryptionKey': (basestring, False, 'Conditional', 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-volumeencryptionkey')
}
| [
1,
529,
276,
1112,
420,
29958,
695,
388,
880,
29890,
4708,
29914,
29873,
307,
1066,
9085,
13,
3166,
869,
1053,
15540,
2061,
29892,
15540,
4854,
13,
3166,
869,
3084,
4097,
1053,
334,
13,
3166,
869,
3075,
1934,
1053,
334,
13,
13,
13,
29937,
448,
2683,
2683,
28400,
13,
13,
1990,
5244,
5592,
3302,
5531,
3493,
29898,
29909,
7811,
2061,
1125,
13,
1678,
9995,
29937,
15540,
1057,
5531,
5592,
3302,
1057,
5531,
3493,
448,
14293,
2500,
362,
6848,
10299,
2450,
1873,
29901,
29871,
29896,
29889,
29946,
29889,
29900,
13,
13,
1678,
426,
13,
1678,
376,
6268,
362,
1115,
376,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
613,
13,
1678,
376,
11857,
1115,
426,
13,
4706,
376,
9534,
1204,
1115,
426,
13,
9651,
376,
6268,
362,
1115,
376,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
16718,
333,
613,
13,
9651,
376,
18213,
3321,
1542,
1115,
376,
1231,
613,
13,
9651,
376,
19347,
1115,
1565,
29892,
13,
9651,
376,
6422,
1542,
1115,
376,
10983,
3245,
29908,
13,
4706,
2981,
13,
4706,
376,
9882,
1204,
1115,
426,
13,
9651,
376,
6268,
362,
1115,
376,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
12322,
333,
613,
13,
9651,
376,
18213,
3321,
1542,
1115,
376,
1231,
613,
13,
9651,
376,
19347,
1115,
1565,
29892,
13,
9651,
376,
6422,
1542,
1115,
376,
10983,
3245,
29908,
13,
4706,
2981,
13,
4706,
376,
10303,
24679,
8566,
14272,
10861,
1115,
426,
13,
9651,
376,
6268,
362,
1115,
376,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
4632,
24623,
3977,
14272,
17590,
613,
13,
9651,
376,
18213,
3321,
1542,
1115,
376,
18146,
613,
13,
9651,
376,
19347,
1115,
2089,
29892,
13,
9651,
376,
6422,
1542,
1115,
376,
10983,
3245,
29908,
13,
4706,
2981,
13,
4706,
376,
28129,
1115,
426,
13,
9651,
376,
6268,
362,
1115,
376,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
6786,
613,
13,
9651,
376,
18213,
3321,
1542,
1115,
376,
1231,
613,
13,
9651,
376,
19347,
1115,
1565,
29892,
13,
9651,
376,
6422,
1542,
1115,
376,
1888,
23975,
29908,
13,
4706,
2981,
13,
4706,
376,
2659,
24679,
8566,
14272,
10861,
1115,
426,
13,
9651,
376,
6268,
362,
1115,
376,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
1792,
24623,
3977,
14272,
17590,
613,
13,
9651,
376,
18213,
3321,
1542,
1115,
376,
18146,
613,
13,
9651,
376,
19347,
1115,
2089,
29892,
13,
9651,
376,
6422,
1542,
1115,
376,
10983,
3245,
29908,
13,
4706,
2981,
13,
4706,
376,
24679,
8566,
14272,
2558,
1115,
426,
13,
9651,
376,
6268,
362,
1115,
376,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
24623,
3977,
14272,
1989,
613,
13,
9651,
376,
18213,
3321,
1542,
1115,
376,
1231,
613,
13,
9651,
376,
19347,
1115,
2089,
29892,
13,
9651,
376,
6422,
1542,
1115,
376,
10983,
3245,
29908,
13,
4706,
500,
13,
1678,
500,
13,
29913,
13,
1678,
9995,
13,
13,
1678,
6503,
29918,
1853,
353,
376,
29909,
7811,
1057,
5531,
5592,
3302,
1057,
5531,
3493,
29908,
13,
13,
1678,
17761,
353,
426,
13,
4706,
525,
9534,
1204,
2396,
313,
6500,
342,
5393,
29892,
5852,
29892,
525,
10983,
3245,
742,
525,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
16718,
333,
5477,
13,
4706,
525,
9882,
1204,
2396,
313,
6500,
342,
5393,
29892,
5852,
29892,
525,
10983,
3245,
742,
525,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
12322,
333,
5477,
13,
4706,
525,
10303,
24679,
8566,
14272,
10861,
2396,
313,
20054,
29892,
7700,
29892,
525,
10983,
3245,
742,
525,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
4632,
24623,
3977,
14272,
17590,
5477,
13,
4706,
525,
28129,
2396,
313,
6500,
342,
5393,
29892,
5852,
29892,
525,
1888,
23975,
742,
525,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
6786,
5477,
13,
4706,
525,
2659,
24679,
8566,
14272,
10861,
2396,
313,
20054,
29892,
7700,
29892,
525,
10983,
3245,
742,
525,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
1792,
24623,
3977,
14272,
17590,
5477,
13,
4706,
525,
24679,
8566,
14272,
2558,
2396,
313,
6500,
342,
5393,
29892,
7700,
29892,
525,
10983,
3245,
742,
525,
1124,
597,
2640,
29889,
10467,
29889,
17260,
29889,
510,
29914,
29909,
7811,
20442,
2500,
362,
29914,
12333,
29914,
2659,
9485,
680,
29914,
10467,
29899,
10314,
29899,
1287,
22854,
29899,
1287,
3493,
29889,
1420,
29937,
6854,
29876,
29899,
1287,
22854,
29899,
1287,
3493,
29899,
24623,
3977,
14272,
1989,
1495,
13,
1678,
500,
13,
13,
13,
2
] |
env/Lib/site-packages/countdowntimer_model/apps.py | gtkacz/fantasytrashtalk | 4 | 29798 | <reponame>gtkacz/fantasytrashtalk
from django.apps import AppConfig
class CountdowntimerModelConfig(AppConfig):
name = 'countdowntimer_model'
| [
1,
529,
276,
1112,
420,
29958,
4141,
29895,
10086,
29914,
29888,
424,
8995,
10678,
400,
2235,
13,
3166,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
13,
1990,
3917,
29881,
340,
593,
4193,
3195,
3991,
29898,
2052,
3991,
1125,
13,
1678,
1024,
353,
525,
2798,
29881,
340,
593,
4193,
29918,
4299,
29915,
13,
2
] |
websocket/_abnf.py | benhoyt/websocket-client | 147 | 1611486 | """
"""
"""
_abnf.py
websocket - WebSocket client library for Python
Copyright 2021 engn33r
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 array
import os
import struct
import sys
from ._exceptions import *
from ._utils import validate_utf8
from threading import Lock
try:
# If wsaccel is available, use compiled routines to mask data.
# wsaccel only provides around a 10% speed boost compared
# to the websocket-client _mask() implementation.
# Note that wsaccel is unmaintained.
from wsaccel.xormask import XorMaskerSimple
def _mask(_m, _d):
return XorMaskerSimple(_m).process(_d)
except ImportError:
# wsaccel is not available, use websocket-client _mask()
native_byteorder = sys.byteorder
def _mask(mask_value, data_value):
datalen = len(data_value)
data_value = int.from_bytes(data_value, native_byteorder)
mask_value = int.from_bytes(mask_value * (datalen // 4) + mask_value[: datalen % 4], native_byteorder)
return (data_value ^ mask_value).to_bytes(datalen, native_byteorder)
__all__ = [
'ABNF', 'continuous_frame', 'frame_buffer',
'STATUS_NORMAL',
'STATUS_GOING_AWAY',
'STATUS_PROTOCOL_ERROR',
'STATUS_UNSUPPORTED_DATA_TYPE',
'STATUS_STATUS_NOT_AVAILABLE',
'STATUS_ABNORMAL_CLOSED',
'STATUS_INVALID_PAYLOAD',
'STATUS_POLICY_VIOLATION',
'STATUS_MESSAGE_TOO_BIG',
'STATUS_INVALID_EXTENSION',
'STATUS_UNEXPECTED_CONDITION',
'STATUS_BAD_GATEWAY',
'STATUS_TLS_HANDSHAKE_ERROR',
]
# closing frame status codes.
STATUS_NORMAL = 1000
STATUS_GOING_AWAY = 1001
STATUS_PROTOCOL_ERROR = 1002
STATUS_UNSUPPORTED_DATA_TYPE = 1003
STATUS_STATUS_NOT_AVAILABLE = 1005
STATUS_ABNORMAL_CLOSED = 1006
STATUS_INVALID_PAYLOAD = 1007
STATUS_POLICY_VIOLATION = 1008
STATUS_MESSAGE_TOO_BIG = 1009
STATUS_INVALID_EXTENSION = 1010
STATUS_UNEXPECTED_CONDITION = 1011
STATUS_BAD_GATEWAY = 1014
STATUS_TLS_HANDSHAKE_ERROR = 1015
VALID_CLOSE_STATUS = (
STATUS_NORMAL,
STATUS_GOING_AWAY,
STATUS_PROTOCOL_ERROR,
STATUS_UNSUPPORTED_DATA_TYPE,
STATUS_INVALID_PAYLOAD,
STATUS_POLICY_VIOLATION,
STATUS_MESSAGE_TOO_BIG,
STATUS_INVALID_EXTENSION,
STATUS_UNEXPECTED_CONDITION,
STATUS_BAD_GATEWAY,
)
class ABNF(object):
"""
ABNF frame class.
See http://tools.ietf.org/html/rfc5234
and http://tools.ietf.org/html/rfc6455#section-5.2
"""
# operation code values.
OPCODE_CONT = 0x0
OPCODE_TEXT = 0x1
OPCODE_BINARY = 0x2
OPCODE_CLOSE = 0x8
OPCODE_PING = 0x9
OPCODE_PONG = 0xa
# available operation code value tuple
OPCODES = (OPCODE_CONT, OPCODE_TEXT, OPCODE_BINARY, OPCODE_CLOSE,
OPCODE_PING, OPCODE_PONG)
# opcode human readable string
OPCODE_MAP = {
OPCODE_CONT: "cont",
OPCODE_TEXT: "text",
OPCODE_BINARY: "binary",
OPCODE_CLOSE: "close",
OPCODE_PING: "ping",
OPCODE_PONG: "pong"
}
# data length threshold.
LENGTH_7 = 0x7e
LENGTH_16 = 1 << 16
LENGTH_63 = 1 << 63
def __init__(self, fin=0, rsv1=0, rsv2=0, rsv3=0,
opcode=OPCODE_TEXT, mask=1, data=""):
"""
Constructor for ABNF. Please check RFC for arguments.
"""
self.fin = fin
self.rsv1 = rsv1
self.rsv2 = rsv2
self.rsv3 = rsv3
self.opcode = opcode
self.mask = mask
if data is None:
data = ""
self.data = data
self.get_mask_key = os.urandom
def validate(self, skip_utf8_validation=False):
"""
Validate the ABNF frame.
Parameters
----------
skip_utf8_validation: skip utf8 validation.
"""
if self.rsv1 or self.rsv2 or self.rsv3:
raise WebSocketProtocolException("rsv is not implemented, yet")
if self.opcode not in ABNF.OPCODES:
raise WebSocketProtocolException("Invalid opcode %r", self.opcode)
if self.opcode == ABNF.OPCODE_PING and not self.fin:
raise WebSocketProtocolException("Invalid ping frame.")
if self.opcode == ABNF.OPCODE_CLOSE:
l = len(self.data)
if not l:
return
if l == 1 or l >= 126:
raise WebSocketProtocolException("Invalid close frame.")
if l > 2 and not skip_utf8_validation and not validate_utf8(self.data[2:]):
raise WebSocketProtocolException("Invalid close frame.")
code = 256 * self.data[0] + self.data[1]
if not self._is_valid_close_status(code):
raise WebSocketProtocolException("Invalid close opcode.")
@staticmethod
def _is_valid_close_status(code):
return code in VALID_CLOSE_STATUS or (3000 <= code < 5000)
def __str__(self):
return "fin=" + str(self.fin) \
+ " opcode=" + str(self.opcode) \
+ " data=" + str(self.data)
@staticmethod
def create_frame(data, opcode, fin=1):
"""
Create frame to send text, binary and other data.
Parameters
----------
data: <type>
data to send. This is string value(byte array).
If opcode is OPCODE_TEXT and this value is unicode,
data value is converted into unicode string, automatically.
opcode: <type>
operation code. please see OPCODE_XXX.
fin: <type>
fin flag. if set to 0, create continue fragmentation.
"""
if opcode == ABNF.OPCODE_TEXT and isinstance(data, str):
data = data.encode("utf-8")
# mask must be set if send data from client
return ABNF(fin, 0, 0, 0, opcode, 1, data)
def format(self):
"""
Format this object to string(byte array) to send data to server.
"""
if any(x not in (0, 1) for x in [self.fin, self.rsv1, self.rsv2, self.rsv3]):
raise ValueError("not 0 or 1")
if self.opcode not in ABNF.OPCODES:
raise ValueError("Invalid OPCODE")
length = len(self.data)
if length >= ABNF.LENGTH_63:
raise ValueError("data is too long")
frame_header = chr(self.fin << 7 |
self.rsv1 << 6 | self.rsv2 << 5 | self.rsv3 << 4 |
self.opcode).encode('latin-1')
if length < ABNF.LENGTH_7:
frame_header += chr(self.mask << 7 | length).encode('latin-1')
elif length < ABNF.LENGTH_16:
frame_header += chr(self.mask << 7 | 0x7e).encode('latin-1')
frame_header += struct.pack("!H", length)
else:
frame_header += chr(self.mask << 7 | 0x7f).encode('latin-1')
frame_header += struct.pack("!Q", length)
if not self.mask:
return frame_header + self.data
else:
mask_key = self.get_mask_key(4)
return frame_header + self._get_masked(mask_key)
def _get_masked(self, mask_key):
s = ABNF.mask(mask_key, self.data)
if isinstance(mask_key, str):
mask_key = mask_key.encode('utf-8')
return mask_key + s
@staticmethod
def mask(mask_key, data):
"""
Mask or unmask data. Just do xor for each byte
Parameters
----------
mask_key: <type>
4 byte string.
data: <type>
data to mask/unmask.
"""
if data is None:
data = ""
if isinstance(mask_key, str):
mask_key = mask_key.encode('latin-1')
if isinstance(data, str):
data = data.encode('latin-1')
return _mask(array.array("B", mask_key), array.array("B", data))
class frame_buffer(object):
_HEADER_MASK_INDEX = 5
_HEADER_LENGTH_INDEX = 6
def __init__(self, recv_fn, skip_utf8_validation):
self.recv = recv_fn
self.skip_utf8_validation = skip_utf8_validation
# Buffers over the packets from the layer beneath until desired amount
# bytes of bytes are received.
self.recv_buffer = []
self.clear()
self.lock = Lock()
def clear(self):
self.header = None
self.length = None
self.mask = None
def has_received_header(self):
return self.header is None
def recv_header(self):
header = self.recv_strict(2)
b1 = header[0]
fin = b1 >> 7 & 1
rsv1 = b1 >> 6 & 1
rsv2 = b1 >> 5 & 1
rsv3 = b1 >> 4 & 1
opcode = b1 & 0xf
b2 = header[1]
has_mask = b2 >> 7 & 1
length_bits = b2 & 0x7f
self.header = (fin, rsv1, rsv2, rsv3, opcode, has_mask, length_bits)
def has_mask(self):
if not self.header:
return False
return self.header[frame_buffer._HEADER_MASK_INDEX]
def has_received_length(self):
return self.length is None
def recv_length(self):
bits = self.header[frame_buffer._HEADER_LENGTH_INDEX]
length_bits = bits & 0x7f
if length_bits == 0x7e:
v = self.recv_strict(2)
self.length = struct.unpack("!H", v)[0]
elif length_bits == 0x7f:
v = self.recv_strict(8)
self.length = struct.unpack("!Q", v)[0]
else:
self.length = length_bits
def has_received_mask(self):
return self.mask is None
def recv_mask(self):
self.mask = self.recv_strict(4) if self.has_mask() else ""
def recv_frame(self):
with self.lock:
# Header
if self.has_received_header():
self.recv_header()
(fin, rsv1, rsv2, rsv3, opcode, has_mask, _) = self.header
# Frame length
if self.has_received_length():
self.recv_length()
length = self.length
# Mask
if self.has_received_mask():
self.recv_mask()
mask = self.mask
# Payload
payload = self.recv_strict(length)
if has_mask:
payload = ABNF.mask(mask, payload)
# Reset for next frame
self.clear()
frame = ABNF(fin, rsv1, rsv2, rsv3, opcode, has_mask, payload)
frame.validate(self.skip_utf8_validation)
return frame
def recv_strict(self, bufsize):
shortage = bufsize - sum(map(len, self.recv_buffer))
while shortage > 0:
# Limit buffer size that we pass to socket.recv() to avoid
# fragmenting the heap -- the number of bytes recv() actually
# reads is limited by socket buffer and is relatively small,
# yet passing large numbers repeatedly causes lots of large
# buffers allocated and then shrunk, which results in
# fragmentation.
bytes_ = self.recv(min(16384, shortage))
self.recv_buffer.append(bytes_)
shortage -= len(bytes_)
unified = bytes("", 'utf-8').join(self.recv_buffer)
if shortage == 0:
self.recv_buffer = []
return unified
else:
self.recv_buffer = [unified[bufsize:]]
return unified[:bufsize]
class continuous_frame(object):
def __init__(self, fire_cont_frame, skip_utf8_validation):
self.fire_cont_frame = fire_cont_frame
self.skip_utf8_validation = skip_utf8_validation
self.cont_data = None
self.recving_frames = None
def validate(self, frame):
if not self.recving_frames and frame.opcode == ABNF.OPCODE_CONT:
raise WebSocketProtocolException("Illegal frame")
if self.recving_frames and \
frame.opcode in (ABNF.OPCODE_TEXT, ABNF.OPCODE_BINARY):
raise WebSocketProtocolException("Illegal frame")
def add(self, frame):
if self.cont_data:
self.cont_data[1] += frame.data
else:
if frame.opcode in (ABNF.OPCODE_TEXT, ABNF.OPCODE_BINARY):
self.recving_frames = frame.opcode
self.cont_data = [frame.opcode, frame.data]
if frame.fin:
self.recving_frames = None
def is_fire(self, frame):
return frame.fin or self.fire_cont_frame
def extract(self, frame):
data = self.cont_data
self.cont_data = None
frame.data = data[1]
if not self.fire_cont_frame and data[0] == ABNF.OPCODE_TEXT and not self.skip_utf8_validation and not validate_utf8(frame.data):
raise WebSocketPayloadException(
"cannot decode: " + repr(frame.data))
return [data[0], frame]
| [
1,
9995,
13,
13,
15945,
29908,
13,
13,
15945,
29908,
13,
29918,
370,
29876,
29888,
29889,
2272,
13,
2676,
11514,
448,
2563,
11373,
3132,
3489,
363,
5132,
13,
13,
11882,
1266,
29871,
29906,
29900,
29906,
29896,
3033,
29876,
29941,
29941,
29878,
13,
13,
29931,
293,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
6293,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
3492,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
13,
1678,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
13,
2525,
2222,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
5721,
7541,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29956,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
13393,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
13400,
800,
1090,
278,
19245,
29889,
13,
15945,
29908,
13,
5215,
1409,
13,
5215,
2897,
13,
5215,
2281,
13,
5215,
10876,
13,
13,
3166,
869,
29918,
11739,
29879,
1053,
334,
13,
3166,
869,
29918,
13239,
1053,
12725,
29918,
9420,
29947,
13,
3166,
3244,
292,
1053,
18199,
13,
13,
2202,
29901,
13,
1678,
396,
960,
16904,
562,
2242,
338,
3625,
29892,
671,
13126,
6745,
1475,
304,
11105,
848,
29889,
13,
1678,
396,
16904,
562,
2242,
871,
8128,
2820,
263,
29871,
29896,
29900,
29995,
6210,
14505,
9401,
13,
1678,
396,
304,
278,
1856,
11514,
29899,
4645,
903,
13168,
580,
5314,
29889,
13,
1678,
396,
3940,
393,
16904,
562,
2242,
338,
443,
29885,
2365,
7114,
29889,
13,
1678,
515,
16904,
562,
2242,
29889,
29916,
555,
1278,
1053,
1060,
272,
19832,
261,
15427,
13,
13,
1678,
822,
903,
13168,
7373,
29885,
29892,
903,
29881,
1125,
13,
4706,
736,
1060,
272,
19832,
261,
15427,
7373,
29885,
467,
5014,
7373,
29881,
29897,
13,
13,
19499,
16032,
2392,
29901,
13,
1678,
396,
16904,
562,
2242,
338,
451,
3625,
29892,
671,
1856,
11514,
29899,
4645,
903,
13168,
580,
13,
1678,
7531,
29918,
10389,
2098,
353,
10876,
29889,
10389,
2098,
13,
13,
1678,
822,
903,
13168,
29898,
13168,
29918,
1767,
29892,
848,
29918,
1767,
1125,
13,
4706,
1418,
10066,
353,
7431,
29898,
1272,
29918,
1767,
29897,
13,
4706,
848,
29918,
1767,
353,
938,
29889,
3166,
29918,
13193,
29898,
1272,
29918,
1767,
29892,
7531,
29918,
10389,
2098,
29897,
13,
4706,
11105,
29918,
1767,
353,
938,
29889,
3166,
29918,
13193,
29898,
13168,
29918,
1767,
334,
313,
29881,
2075,
264,
849,
29871,
29946,
29897,
718,
11105,
29918,
1767,
7503,
1418,
10066,
1273,
29871,
29946,
1402,
7531,
29918,
10389,
2098,
29897,
13,
4706,
736,
313,
1272,
29918,
1767,
6228,
11105,
29918,
1767,
467,
517,
29918,
13193,
29898,
29881,
2075,
264,
29892,
7531,
29918,
10389,
2098,
29897,
13,
13,
13,
1649,
497,
1649,
353,
518,
13,
1678,
525,
2882,
22498,
742,
525,
20621,
681,
29918,
2557,
742,
525,
2557,
29918,
9040,
742,
13,
1678,
525,
27047,
29918,
29940,
1955,
1529,
29931,
742,
13,
1678,
525,
27047,
29918,
17080,
4214,
29918,
29909,
12982,
29979,
742,
13,
1678,
525,
27047,
29918,
8618,
4986,
15032,
29918,
11432,
742,
13,
1678,
525,
27047,
29918,
29965,
3059,
4897,
15082,
3352,
29918,
14573,
29918,
11116,
742,
13,
1678,
525,
27047,
29918,
27047,
29918,
12256,
29918,
26612,
6227,
6181,
742,
13,
1678,
525,
27047,
29918,
2882,
29940,
1955,
1529,
29931,
29918,
29907,
3927,
1660,
29928,
742,
13,
1678,
525,
27047,
29918,
1177,
26707,
29918,
7228,
29979,
29428,
742,
13,
1678,
525,
27047,
29918,
29925,
5607,
2965,
29979,
29918,
18118,
5607,
8098,
742,
13,
1678,
525,
27047,
29918,
2303,
1799,
10461,
29918,
4986,
29949,
29918,
29933,
6259,
742,
13,
1678,
525,
27047,
29918,
1177,
26707,
29918,
12194,
1430,
13381,
742,
13,
1678,
525,
27047,
29918,
3904,
5746,
4162,
1783,
3352,
29918,
6007,
29928,
22122,
742,
13,
1678,
525,
27047,
29918,
29933,
3035,
29918,
29954,
3040,
12982,
29979,
742,
13,
1678,
525,
27047,
29918,
29911,
8547,
29918,
29950,
9468,
23498,
6059,
29918,
11432,
742,
13,
29962,
13,
13,
29937,
14382,
3515,
4660,
11561,
29889,
13,
27047,
29918,
29940,
1955,
1529,
29931,
353,
29871,
29896,
29900,
29900,
29900,
13,
27047,
29918,
17080,
4214,
29918,
29909,
12982,
29979,
353,
29871,
29896,
29900,
29900,
29896,
13,
27047,
29918,
8618,
4986,
15032,
29918,
11432,
353,
29871,
29896,
29900,
29900,
29906,
13,
27047,
29918,
29965,
3059,
4897,
15082,
3352,
29918,
14573,
29918,
11116,
353,
29871,
29896,
29900,
29900,
29941,
13,
27047,
29918,
27047,
29918,
12256,
29918,
26612,
6227,
6181,
353,
29871,
29896,
29900,
29900,
29945,
13,
27047,
29918,
2882,
29940,
1955,
1529,
29931,
29918,
29907,
3927,
1660,
29928,
353,
29871,
29896,
29900,
29900,
29953,
13,
27047,
29918,
1177,
26707,
29918,
7228,
29979,
29428,
353,
29871,
29896,
29900,
29900,
29955,
13,
27047,
29918,
29925,
5607,
2965,
29979,
29918,
18118,
5607,
8098,
353,
29871,
29896,
29900,
29900,
29947,
13,
27047,
29918,
2303,
1799,
10461,
29918,
4986,
29949,
29918,
29933,
6259,
353,
29871,
29896,
29900,
29900,
29929,
13,
27047,
29918,
1177,
26707,
29918,
12194,
1430,
13381,
353,
29871,
29896,
29900,
29896,
29900,
13,
27047,
29918,
3904,
5746,
4162,
1783,
3352,
29918,
6007,
29928,
22122,
353,
29871,
29896,
29900,
29896,
29896,
13,
27047,
29918,
29933,
3035,
29918,
29954,
3040,
12982,
29979,
353,
29871,
29896,
29900,
29896,
29946,
13,
27047,
29918,
29911,
8547,
29918,
29950,
9468,
23498,
6059,
29918,
11432,
353,
29871,
29896,
29900,
29896,
29945,
13,
13,
26707,
29918,
29907,
3927,
1660,
29918,
27047,
353,
313,
13,
1678,
6850,
1299,
3308,
29918,
29940,
1955,
1529,
29931,
29892,
13,
1678,
6850,
1299,
3308,
29918,
17080,
4214,
29918,
29909,
12982,
29979,
29892,
13,
1678,
6850,
1299,
3308,
29918,
8618,
4986,
15032,
29918,
11432,
29892,
13,
1678,
6850,
1299,
3308,
29918,
29965,
3059,
4897,
15082,
3352,
29918,
14573,
29918,
11116,
29892,
13,
1678,
6850,
1299,
3308,
29918,
1177,
26707,
29918,
7228,
29979,
29428,
29892,
13,
1678,
6850,
1299,
3308,
29918,
29925,
5607,
2965,
29979,
29918,
18118,
5607,
8098,
29892,
13,
1678,
6850,
1299,
3308,
29918,
2303,
1799,
10461,
29918,
4986,
29949,
29918,
29933,
6259,
29892,
13,
1678,
6850,
1299,
3308,
29918,
1177,
26707,
29918,
12194,
1430,
13381,
29892,
13,
1678,
6850,
1299,
3308,
29918,
3904,
5746,
4162,
1783,
3352,
29918,
6007,
29928,
22122,
29892,
13,
1678,
6850,
1299,
3308,
29918,
29933,
3035,
29918,
29954,
3040,
12982,
29979,
29892,
13,
29897,
13,
13,
13,
1990,
17571,
22498,
29898,
3318,
1125,
13,
1678,
9995,
13,
1678,
17571,
22498,
3515,
770,
29889,
13,
1678,
2823,
1732,
597,
8504,
29889,
2035,
29888,
29889,
990,
29914,
1420,
29914,
9600,
29883,
29945,
29906,
29941,
29946,
13,
1678,
322,
1732,
597,
8504,
29889,
2035,
29888,
29889,
990,
29914,
1420,
29914,
9600,
29883,
29953,
29946,
29945,
29945,
29937,
2042,
29899,
29945,
29889,
29906,
13,
1678,
9995,
13,
13,
1678,
396,
5858,
775,
1819,
29889,
13,
1678,
6418,
16524,
29918,
22412,
353,
29871,
29900,
29916,
29900,
13,
1678,
6418,
16524,
29918,
16975,
353,
29871,
29900,
29916,
29896,
13,
1678,
6418,
16524,
29918,
29933,
1177,
19926,
353,
29871,
29900,
29916,
29906,
13,
1678,
6418,
16524,
29918,
29907,
3927,
1660,
353,
29871,
29900,
29916,
29947,
13,
1678,
6418,
16524,
29918,
29925,
4214,
353,
29871,
29900,
29916,
29929,
13,
1678,
6418,
16524,
29918,
29925,
20614,
353,
29871,
29900,
17367,
13,
13,
1678,
396,
3625,
5858,
775,
995,
18761,
13,
1678,
6418,
16524,
29903,
353,
313,
4590,
16524,
29918,
22412,
29892,
6418,
16524,
29918,
16975,
29892,
6418,
16524,
29918,
29933,
1177,
19926,
29892,
6418,
16524,
29918,
29907,
3927,
1660,
29892,
13,
1669,
6418,
16524,
29918,
29925,
4214,
29892,
6418,
16524,
29918,
29925,
20614,
29897,
13,
13,
1678,
396,
1015,
401,
5199,
19909,
1347,
13,
1678,
6418,
16524,
29918,
23827,
353,
426,
13,
4706,
6418,
16524,
29918,
22412,
29901,
376,
1285,
613,
13,
4706,
6418,
16524,
29918,
16975,
29901,
376,
726,
613,
13,
4706,
6418,
16524,
29918,
29933,
1177,
19926,
29901,
376,
19541,
613,
13,
4706,
6418,
16524,
29918,
29907,
3927,
1660,
29901,
376,
5358,
613,
13,
4706,
6418,
16524,
29918,
29925,
4214,
29901,
376,
15702,
613,
13,
4706,
6418,
16524,
29918,
29925,
20614,
29901,
376,
29886,
549,
29908,
13,
1678,
500,
13,
13,
1678,
396,
848,
3309,
16897,
29889,
13,
1678,
365,
1430,
29954,
4690,
29918,
29955,
353,
29871,
29900,
29916,
29955,
29872,
13,
1678,
365,
1430,
29954,
4690,
29918,
29896,
29953,
353,
29871,
29896,
3532,
29871,
29896,
29953,
13,
1678,
365,
1430,
29954,
4690,
29918,
29953,
29941,
353,
29871,
29896,
3532,
29871,
29953,
29941,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1436,
29922,
29900,
29892,
364,
4501,
29896,
29922,
29900,
29892,
364,
4501,
29906,
29922,
29900,
29892,
364,
4501,
29941,
29922,
29900,
29892,
13,
462,
1015,
401,
29922,
4590,
16524,
29918,
16975,
29892,
11105,
29922,
29896,
29892,
848,
13776,
1125,
13,
4706,
9995,
13,
4706,
1281,
18769,
363,
17571,
22498,
29889,
3529,
1423,
390,
8610,
363,
6273,
29889,
13,
4706,
9995,
13,
4706,
1583,
29889,
4951,
353,
1436,
13,
4706,
1583,
29889,
2288,
29894,
29896,
353,
364,
4501,
29896,
13,
4706,
1583,
29889,
2288,
29894,
29906,
353,
364,
4501,
29906,
13,
4706,
1583,
29889,
2288,
29894,
29941,
353,
364,
4501,
29941,
13,
4706,
1583,
29889,
459,
401,
353,
1015,
401,
13,
4706,
1583,
29889,
13168,
353,
11105,
13,
4706,
565,
848,
338,
6213,
29901,
13,
9651,
848,
353,
5124,
13,
4706,
1583,
29889,
1272,
353,
848,
13,
4706,
1583,
29889,
657,
29918,
13168,
29918,
1989,
353,
2897,
29889,
332,
2685,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
14383,
29918,
9420,
29947,
29918,
18157,
29922,
8824,
1125,
13,
4706,
9995,
13,
4706,
15758,
403,
278,
17571,
22498,
3515,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
14383,
29918,
9420,
29947,
29918,
18157,
29901,
14383,
23616,
29947,
8845,
29889,
13,
4706,
9995,
13,
4706,
565,
1583,
29889,
2288,
29894,
29896,
470,
1583,
29889,
2288,
29894,
29906,
470,
1583,
29889,
2288,
29894,
29941,
29901,
13,
9651,
12020,
2563,
11373,
17830,
2451,
703,
2288,
29894,
338,
451,
8762,
29892,
3447,
1159,
13,
13,
4706,
565,
1583,
29889,
459,
401,
451,
297,
17571,
22498,
29889,
4590,
16524,
29903,
29901,
13,
9651,
12020,
2563,
11373,
17830,
2451,
703,
13919,
1015,
401,
1273,
29878,
613,
1583,
29889,
459,
401,
29897,
13,
13,
4706,
565,
1583,
29889,
459,
401,
1275,
17571,
22498,
29889,
4590,
16524,
29918,
29925,
4214,
322,
451,
1583,
29889,
4951,
29901,
13,
9651,
12020,
2563,
11373,
17830,
2451,
703,
13919,
24543,
3515,
23157,
13,
13,
4706,
565,
1583,
29889,
459,
401,
1275,
17571,
22498,
29889,
4590,
16524,
29918,
29907,
3927,
1660,
29901,
13,
9651,
301,
353,
7431,
29898,
1311,
29889,
1272,
29897,
13,
9651,
565,
451,
301,
29901,
13,
18884,
736,
13,
9651,
565,
301,
1275,
29871,
29896,
470,
301,
6736,
29871,
29896,
29906,
29953,
29901,
13,
18884,
12020,
2563,
11373,
17830,
2451,
703,
13919,
3802,
3515,
23157,
13,
9651,
565,
301,
1405,
29871,
29906,
322,
451,
14383,
29918,
9420,
29947,
29918,
18157,
322,
451,
12725,
29918,
9420,
29947,
29898,
1311,
29889,
1272,
29961,
29906,
17531,
1125,
13,
18884,
12020,
2563,
11373,
17830,
2451,
703,
13919,
3802,
3515,
23157,
13,
13,
9651,
775,
353,
29871,
29906,
29945,
29953,
334,
1583,
29889,
1272,
29961,
29900,
29962,
718,
1583,
29889,
1272,
29961,
29896,
29962,
13,
9651,
565,
451,
1583,
3032,
275,
29918,
3084,
29918,
5358,
29918,
4882,
29898,
401,
1125,
13,
18884,
12020,
2563,
11373,
17830,
2451,
703,
13919,
3802,
1015,
401,
23157,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
275,
29918,
3084,
29918,
5358,
29918,
4882,
29898,
401,
1125,
13,
4706,
736,
775,
297,
12599,
1367,
29918,
29907,
3927,
1660,
29918,
27047,
470,
313,
29941,
29900,
29900,
29900,
5277,
775,
529,
29871,
29945,
29900,
29900,
29900,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
376,
4951,
543,
718,
851,
29898,
1311,
29889,
4951,
29897,
320,
13,
9651,
718,
376,
1015,
401,
543,
718,
851,
29898,
1311,
29889,
459,
401,
29897,
320,
13,
9651,
718,
376,
848,
543,
718,
851,
29898,
1311,
29889,
1272,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
1653,
29918,
2557,
29898,
1272,
29892,
1015,
401,
29892,
1436,
29922,
29896,
1125,
13,
4706,
9995,
13,
4706,
6204,
3515,
304,
3638,
1426,
29892,
7581,
322,
916,
848,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
848,
29901,
529,
1853,
29958,
13,
9651,
848,
304,
3638,
29889,
910,
338,
1347,
995,
29898,
10389,
1409,
467,
13,
9651,
960,
1015,
401,
338,
6418,
16524,
29918,
16975,
322,
445,
995,
338,
29104,
29892,
13,
9651,
848,
995,
338,
11543,
964,
29104,
1347,
29892,
6336,
29889,
13,
4706,
1015,
401,
29901,
529,
1853,
29958,
13,
9651,
5858,
775,
29889,
3113,
1074,
6418,
16524,
29918,
22791,
29889,
13,
4706,
1436,
29901,
529,
1853,
29958,
13,
9651,
1436,
7353,
29889,
565,
731,
304,
29871,
29900,
29892,
1653,
6773,
9376,
362,
29889,
13,
4706,
9995,
13,
4706,
565,
1015,
401,
1275,
17571,
22498,
29889,
4590,
16524,
29918,
16975,
322,
338,
8758,
29898,
1272,
29892,
851,
1125,
13,
9651,
848,
353,
848,
29889,
12508,
703,
9420,
29899,
29947,
1159,
13,
4706,
396,
11105,
1818,
367,
731,
565,
3638,
848,
515,
3132,
13,
4706,
736,
17571,
22498,
29898,
4951,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
1015,
401,
29892,
29871,
29896,
29892,
848,
29897,
13,
13,
1678,
822,
3402,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
19191,
445,
1203,
304,
1347,
29898,
10389,
1409,
29897,
304,
3638,
848,
304,
1923,
29889,
13,
4706,
9995,
13,
4706,
565,
738,
29898,
29916,
451,
297,
313,
29900,
29892,
29871,
29896,
29897,
363,
921,
297,
518,
1311,
29889,
4951,
29892,
1583,
29889,
2288,
29894,
29896,
29892,
1583,
29889,
2288,
29894,
29906,
29892,
1583,
29889,
2288,
29894,
29941,
29962,
1125,
13,
9651,
12020,
7865,
2392,
703,
1333,
29871,
29900,
470,
29871,
29896,
1159,
13,
4706,
565,
1583,
29889,
459,
401,
451,
297,
17571,
22498,
29889,
4590,
16524,
29903,
29901,
13,
9651,
12020,
7865,
2392,
703,
13919,
6418,
16524,
1159,
13,
4706,
3309,
353,
7431,
29898,
1311,
29889,
1272,
29897,
13,
4706,
565,
3309,
6736,
17571,
22498,
29889,
19433,
29918,
29953,
29941,
29901,
13,
9651,
12020,
7865,
2392,
703,
1272,
338,
2086,
1472,
1159,
13,
13,
4706,
3515,
29918,
6672,
353,
18460,
29898,
1311,
29889,
4951,
3532,
29871,
29955,
891,
13,
462,
965,
1583,
29889,
2288,
29894,
29896,
3532,
29871,
29953,
891,
1583,
29889,
2288,
29894,
29906,
3532,
29871,
29945,
891,
1583,
29889,
2288,
29894,
29941,
3532,
29871,
29946,
891,
13,
462,
965,
1583,
29889,
459,
401,
467,
12508,
877,
5066,
262,
29899,
29896,
1495,
13,
4706,
565,
3309,
529,
17571,
22498,
29889,
19433,
29918,
29955,
29901,
13,
9651,
3515,
29918,
6672,
4619,
18460,
29898,
1311,
29889,
13168,
3532,
29871,
29955,
891,
3309,
467,
12508,
877,
5066,
262,
29899,
29896,
1495,
13,
4706,
25342,
3309,
529,
17571,
22498,
29889,
19433,
29918,
29896,
29953,
29901,
13,
9651,
3515,
29918,
6672,
4619,
18460,
29898,
1311,
29889,
13168,
3532,
29871,
29955,
891,
29871,
29900,
29916,
29955,
29872,
467,
12508,
877,
5066,
262,
29899,
29896,
1495,
13,
9651,
3515,
29918,
6672,
4619,
2281,
29889,
4058,
703,
29991,
29950,
613,
3309,
29897,
13,
4706,
1683,
29901,
13,
9651,
3515,
29918,
6672,
4619,
18460,
29898,
1311,
29889,
13168,
3532,
29871,
29955,
891,
29871,
29900,
29916,
29955,
29888,
467,
12508,
877,
5066,
262,
29899,
29896,
1495,
13,
9651,
3515,
29918,
6672,
4619,
2281,
29889,
4058,
703,
29991,
29984,
613,
3309,
29897,
13,
13,
4706,
565,
451,
1583,
29889,
13168,
29901,
13,
9651,
736,
3515,
29918,
6672,
718,
1583,
29889,
1272,
13,
4706,
1683,
29901,
13,
9651,
11105,
29918,
1989,
353,
1583,
29889,
657,
29918,
13168,
29918,
1989,
29898,
29946,
29897,
13,
9651,
736,
3515,
29918,
6672,
718,
1583,
3032,
657,
29918,
13168,
287,
29898,
13168,
29918,
1989,
29897,
13,
13,
1678,
822,
903,
657,
29918,
13168,
287,
29898,
1311,
29892,
11105,
29918,
1989,
1125,
13,
4706,
269,
353,
17571,
22498,
29889,
13168,
29898,
13168,
29918,
1989,
29892,
1583,
29889,
1272,
29897,
13,
13,
4706,
565,
338,
8758,
29898,
13168,
29918,
1989,
29892,
851,
1125,
13,
9651,
11105,
29918,
1989,
353,
11105,
29918,
1989,
29889,
12508,
877,
9420,
29899,
29947,
1495,
13,
13,
4706,
736,
11105,
29918,
1989,
718,
269,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
11105,
29898,
13168,
29918,
1989,
29892,
848,
1125,
13,
4706,
9995,
13,
4706,
341,
1278,
470,
443,
13168,
848,
29889,
3387,
437,
921,
272,
363,
1269,
7023,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
11105,
29918,
1989,
29901,
529,
1853,
29958,
13,
632,
29946,
7023,
1347,
29889,
13,
4706,
848,
29901,
529,
1853,
29958,
13,
9651,
848,
304,
11105,
29914,
348,
13168,
29889,
13,
4706,
9995,
13,
4706,
565,
848,
338,
6213,
29901,
13,
9651,
848,
353,
5124,
13,
13,
4706,
565,
338,
8758,
29898,
13168,
29918,
1989,
29892,
851,
1125,
13,
9651,
11105,
29918,
1989,
353,
11105,
29918,
1989,
29889,
12508,
877,
5066,
262,
29899,
29896,
1495,
13,
13,
4706,
565,
338,
8758,
29898,
1272,
29892,
851,
1125,
13,
9651,
848,
353,
848,
29889,
12508,
877,
5066,
262,
29899,
29896,
1495,
13,
13,
4706,
736,
903,
13168,
29898,
2378,
29889,
2378,
703,
29933,
613,
11105,
29918,
1989,
511,
1409,
29889,
2378,
703,
29933,
613,
848,
876,
13,
13,
13,
1990,
3515,
29918,
9040,
29898,
3318,
1125,
13,
1678,
903,
23252,
1001,
29918,
1529,
16033,
29918,
27992,
353,
29871,
29945,
13,
1678,
903,
23252,
1001,
29918,
19433,
29918,
27992,
353,
29871,
29953,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1162,
29894,
29918,
9144,
29892,
14383,
29918,
9420,
29947,
29918,
18157,
1125,
13,
4706,
1583,
29889,
3757,
29894,
353,
1162,
29894,
29918,
9144,
13,
4706,
1583,
29889,
11014,
29918,
9420,
29947,
29918,
18157,
353,
14383,
29918,
9420,
29947,
29918,
18157,
13,
4706,
396,
22274,
414,
975,
278,
23912,
515,
278,
7546,
19540,
2745,
7429,
5253,
13,
4706,
396,
6262,
310,
6262,
526,
4520,
29889,
13,
4706,
1583,
29889,
3757,
29894,
29918,
9040,
353,
5159,
13,
4706,
1583,
29889,
8551,
580,
13,
4706,
1583,
29889,
908,
353,
18199,
580,
13,
13,
1678,
822,
2821,
29898,
1311,
1125,
13,
4706,
1583,
29889,
6672,
353,
6213,
13,
4706,
1583,
29889,
2848,
353,
6213,
13,
4706,
1583,
29889,
13168,
353,
6213,
13,
13,
1678,
822,
756,
29918,
13556,
2347,
29918,
6672,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
6672,
338,
6213,
13,
13,
1678,
822,
1162,
29894,
29918,
6672,
29898,
1311,
1125,
13,
4706,
4839,
353,
1583,
29889,
3757,
29894,
29918,
710,
919,
29898,
29906,
29897,
13,
4706,
289,
29896,
353,
4839,
29961,
29900,
29962,
13,
4706,
1436,
353,
289,
29896,
5099,
29871,
29955,
669,
29871,
29896,
13,
4706,
364,
4501,
29896,
353,
289,
29896,
5099,
29871,
29953,
669,
29871,
29896,
13,
4706,
364,
4501,
29906,
353,
289,
29896,
5099,
29871,
29945,
669,
29871,
29896,
13,
4706,
364,
4501,
29941,
353,
289,
29896,
5099,
29871,
29946,
669,
29871,
29896,
13,
4706,
1015,
401,
353,
289,
29896,
669,
29871,
29900,
24660,
13,
4706,
289,
29906,
353,
4839,
29961,
29896,
29962,
13,
4706,
756,
29918,
13168,
353,
289,
29906,
5099,
29871,
29955,
669,
29871,
29896,
13,
4706,
3309,
29918,
14836,
353,
289,
29906,
669,
29871,
29900,
29916,
29955,
29888,
13,
13,
4706,
1583,
29889,
6672,
353,
313,
4951,
29892,
364,
4501,
29896,
29892,
364,
4501,
29906,
29892,
364,
4501,
29941,
29892,
1015,
401,
29892,
756,
29918,
13168,
29892,
3309,
29918,
14836,
29897,
13,
13,
1678,
822,
756,
29918,
13168,
29898,
1311,
1125,
13,
4706,
565,
451,
1583,
29889,
6672,
29901,
13,
9651,
736,
7700,
13,
4706,
736,
1583,
29889,
6672,
29961,
2557,
29918,
9040,
3032,
23252,
1001,
29918,
1529,
16033,
29918,
27992,
29962,
13,
13,
1678,
822,
756,
29918,
13556,
2347,
29918,
2848,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
2848,
338,
6213,
13,
13,
1678,
822,
1162,
29894,
29918,
2848,
29898,
1311,
1125,
13,
4706,
9978,
353,
1583,
29889,
6672,
29961,
2557,
29918,
9040,
3032,
23252,
1001,
29918,
19433,
29918,
27992,
29962,
13,
4706,
3309,
29918,
14836,
353,
9978,
669,
29871,
29900,
29916,
29955,
29888,
13,
4706,
565,
3309,
29918,
14836,
1275,
29871,
29900,
29916,
29955,
29872,
29901,
13,
9651,
325,
353,
1583,
29889,
3757,
29894,
29918,
710,
919,
29898,
29906,
29897,
13,
9651,
1583,
29889,
2848,
353,
2281,
29889,
348,
4058,
703,
29991,
29950,
613,
325,
9601,
29900,
29962,
13,
4706,
25342,
3309,
29918,
14836,
1275,
29871,
29900,
29916,
29955,
29888,
29901,
13,
9651,
325,
353,
1583,
29889,
3757,
29894,
29918,
710,
919,
29898,
29947,
29897,
13,
9651,
1583,
29889,
2848,
353,
2281,
29889,
348,
4058,
703,
29991,
29984,
613,
325,
9601,
29900,
29962,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
2848,
353,
3309,
29918,
14836,
13,
13,
1678,
822,
756,
29918,
13556,
2347,
29918,
13168,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
13168,
338,
6213,
13,
13,
1678,
822,
1162,
29894,
29918,
13168,
29898,
1311,
1125,
13,
4706,
1583,
29889,
13168,
353,
1583,
29889,
3757,
29894,
29918,
710,
919,
29898,
29946,
29897,
565,
1583,
29889,
5349,
29918,
13168,
580,
1683,
5124,
13,
13,
1678,
822,
1162,
29894,
29918,
2557,
29898,
1311,
1125,
13,
13,
4706,
411,
1583,
29889,
908,
29901,
13,
9651,
396,
19345,
13,
9651,
565,
1583,
29889,
5349,
29918,
13556,
2347,
29918,
6672,
7295,
13,
18884,
1583,
29889,
3757,
29894,
29918,
6672,
580,
13,
9651,
313,
4951,
29892,
364,
4501,
29896,
29892,
364,
4501,
29906,
29892,
364,
4501,
29941,
29892,
1015,
401,
29892,
756,
29918,
13168,
29892,
24459,
353,
1583,
29889,
6672,
13,
13,
9651,
396,
12218,
3309,
13,
9651,
565,
1583,
29889,
5349,
29918,
13556,
2347,
29918,
2848,
7295,
13,
18884,
1583,
29889,
3757,
29894,
29918,
2848,
580,
13,
9651,
3309,
353,
1583,
29889,
2848,
13,
13,
9651,
396,
341,
1278,
13,
9651,
565,
1583,
29889,
5349,
29918,
13556,
2347,
29918,
13168,
7295,
13,
18884,
1583,
29889,
3757,
29894,
29918,
13168,
580,
13,
9651,
11105,
353,
1583,
29889,
13168,
13,
13,
9651,
396,
14617,
1359,
13,
9651,
20092,
353,
1583,
29889,
3757,
29894,
29918,
710,
919,
29898,
2848,
29897,
13,
9651,
565,
756,
29918,
13168,
29901,
13,
18884,
20092,
353,
17571,
22498,
29889,
13168,
29898,
13168,
29892,
20092,
29897,
13,
13,
9651,
396,
2538,
300,
363,
2446,
3515,
13,
9651,
1583,
29889,
8551,
580,
13,
13,
9651,
3515,
353,
17571,
22498,
29898,
4951,
29892,
364,
4501,
29896,
29892,
364,
4501,
29906,
29892,
364,
4501,
29941,
29892,
1015,
401,
29892,
756,
29918,
13168,
29892,
20092,
29897,
13,
9651,
3515,
29889,
15480,
29898,
1311,
29889,
11014,
29918,
9420,
29947,
29918,
18157,
29897,
13,
13,
4706,
736,
3515,
13,
13,
1678,
822,
1162,
29894,
29918,
710,
919,
29898,
1311,
29892,
18392,
2311,
1125,
13,
4706,
3273,
482,
353,
18392,
2311,
448,
2533,
29898,
1958,
29898,
2435,
29892,
1583,
29889,
3757,
29894,
29918,
9040,
876,
13,
4706,
1550,
3273,
482,
1405,
29871,
29900,
29901,
13,
9651,
396,
9628,
277,
6835,
2159,
393,
591,
1209,
304,
9909,
29889,
3757,
29894,
580,
304,
4772,
13,
9651,
396,
9376,
292,
278,
16947,
1192,
278,
1353,
310,
6262,
1162,
29894,
580,
2869,
13,
9651,
396,
13623,
338,
9078,
491,
9909,
6835,
322,
338,
13774,
2319,
29892,
13,
9651,
396,
3447,
6819,
2919,
3694,
28424,
9946,
14568,
310,
2919,
13,
9651,
396,
20487,
414,
19591,
322,
769,
14653,
2960,
29892,
607,
2582,
297,
13,
9651,
396,
9376,
362,
29889,
13,
9651,
6262,
29918,
353,
1583,
29889,
3757,
29894,
29898,
1195,
29898,
29896,
29953,
29941,
29947,
29946,
29892,
3273,
482,
876,
13,
9651,
1583,
29889,
3757,
29894,
29918,
9040,
29889,
4397,
29898,
13193,
19925,
13,
9651,
3273,
482,
22361,
7431,
29898,
13193,
19925,
13,
13,
4706,
443,
2164,
353,
6262,
703,
613,
525,
9420,
29899,
29947,
2824,
7122,
29898,
1311,
29889,
3757,
29894,
29918,
9040,
29897,
13,
13,
4706,
565,
3273,
482,
1275,
29871,
29900,
29901,
13,
9651,
1583,
29889,
3757,
29894,
29918,
9040,
353,
5159,
13,
9651,
736,
443,
2164,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
3757,
29894,
29918,
9040,
353,
518,
348,
2164,
29961,
9721,
2311,
29901,
5262,
13,
9651,
736,
443,
2164,
7503,
9721,
2311,
29962,
13,
13,
13,
1990,
9126,
29918,
2557,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3974,
29918,
1285,
29918,
2557,
29892,
14383,
29918,
9420,
29947,
29918,
18157,
1125,
13,
4706,
1583,
29889,
8696,
29918,
1285,
29918,
2557,
353,
3974,
29918,
1285,
29918,
2557,
13,
4706,
1583,
29889,
11014,
29918,
9420,
29947,
29918,
18157,
353,
14383,
29918,
9420,
29947,
29918,
18157,
13,
4706,
1583,
29889,
1285,
29918,
1272,
353,
6213,
13,
4706,
1583,
29889,
3757,
1747,
29918,
19935,
353,
6213,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
3515,
1125,
13,
4706,
565,
451,
1583,
29889,
3757,
1747,
29918,
19935,
322,
3515,
29889,
459,
401,
1275,
17571,
22498,
29889,
4590,
16524,
29918,
22412,
29901,
13,
9651,
12020,
2563,
11373,
17830,
2451,
703,
14126,
12018,
3515,
1159,
13,
4706,
565,
1583,
29889,
3757,
1747,
29918,
19935,
322,
320,
13,
18884,
3515,
29889,
459,
401,
297,
313,
2882,
22498,
29889,
4590,
16524,
29918,
16975,
29892,
17571,
22498,
29889,
4590,
16524,
29918,
29933,
1177,
19926,
1125,
13,
9651,
12020,
2563,
11373,
17830,
2451,
703,
14126,
12018,
3515,
1159,
13,
13,
1678,
822,
788,
29898,
1311,
29892,
3515,
1125,
13,
4706,
565,
1583,
29889,
1285,
29918,
1272,
29901,
13,
9651,
1583,
29889,
1285,
29918,
1272,
29961,
29896,
29962,
4619,
3515,
29889,
1272,
13,
4706,
1683,
29901,
13,
9651,
565,
3515,
29889,
459,
401,
297,
313,
2882,
22498,
29889,
4590,
16524,
29918,
16975,
29892,
17571,
22498,
29889,
4590,
16524,
29918,
29933,
1177,
19926,
1125,
13,
18884,
1583,
29889,
3757,
1747,
29918,
19935,
353,
3515,
29889,
459,
401,
13,
9651,
1583,
29889,
1285,
29918,
1272,
353,
518,
2557,
29889,
459,
401,
29892,
3515,
29889,
1272,
29962,
13,
13,
4706,
565,
3515,
29889,
4951,
29901,
13,
9651,
1583,
29889,
3757,
1747,
29918,
19935,
353,
6213,
13,
13,
1678,
822,
338,
29918,
8696,
29898,
1311,
29892,
3515,
1125,
13,
4706,
736,
3515,
29889,
4951,
470,
1583,
29889,
8696,
29918,
1285,
29918,
2557,
13,
13,
1678,
822,
6597,
29898,
1311,
29892,
3515,
1125,
13,
4706,
848,
353,
1583,
29889,
1285,
29918,
1272,
13,
4706,
1583,
29889,
1285,
29918,
1272,
353,
6213,
13,
4706,
3515,
29889,
1272,
353,
848,
29961,
29896,
29962,
13,
4706,
565,
451,
1583,
29889,
8696,
29918,
1285,
29918,
2557,
322,
848,
29961,
29900,
29962,
1275,
17571,
22498,
29889,
4590,
16524,
29918,
16975,
322,
451,
1583,
29889,
11014,
29918,
9420,
29947,
29918,
18157,
322,
451,
12725,
29918,
9420,
29947,
29898,
2557,
29889,
1272,
1125,
13,
9651,
12020,
2563,
11373,
15467,
1359,
2451,
29898,
13,
18884,
376,
29883,
6735,
21822,
29901,
376,
718,
2062,
29898,
2557,
29889,
1272,
876,
13,
13,
4706,
736,
518,
1272,
29961,
29900,
1402,
3515,
29962,
13,
2
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.