content
stringlengths 1
1.04M
| input_ids
sequencelengths 1
774k
| ratio_char_token
float64 0.38
22.9
| token_count
int64 1
774k
|
---|---|---|---|
import setuptools
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
setuptools.setup(
name="cause2e",
version="0.2.0",
author="Daniel Gruenbaum",
author_email="[email protected]",
description="A package for end-to-end causal analysis",
license="MIT",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/MLResearchAtOSRAM/cause2e",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows"
],
python_requires='>=3.7',
install_requires=[
"dowhy",
"ipython",
"jinja2",
"pillow",
"pyarrow",
"pycausal",
"seaborn"
]
)
| [
11748,
900,
37623,
10141,
201,
198,
201,
198,
201,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
1600,
21004,
2625,
40477,
12,
23,
4943,
355,
277,
25,
201,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
13,
961,
3419,
201,
198,
201,
198,
2617,
37623,
10141,
13,
40406,
7,
201,
198,
220,
220,
220,
1438,
2625,
25587,
17,
68,
1600,
201,
198,
220,
220,
220,
2196,
2625,
15,
13,
17,
13,
15,
1600,
201,
198,
220,
220,
220,
1772,
2625,
19962,
25665,
268,
24738,
1600,
201,
198,
220,
220,
220,
1772,
62,
12888,
2625,
67,
6321,
13,
48929,
268,
24738,
31,
4105,
12,
418,
859,
13,
785,
1600,
201,
198,
220,
220,
220,
6764,
2625,
32,
5301,
329,
886,
12,
1462,
12,
437,
26558,
3781,
1600,
201,
198,
220,
220,
220,
5964,
2625,
36393,
1600,
201,
198,
220,
220,
220,
890,
62,
11213,
28,
6511,
62,
11213,
11,
201,
198,
220,
220,
220,
890,
62,
11213,
62,
11299,
62,
4906,
2625,
5239,
14,
4102,
2902,
1600,
201,
198,
220,
220,
220,
19016,
2625,
5450,
1378,
12567,
13,
785,
14,
5805,
25104,
2953,
2640,
24115,
14,
25587,
17,
68,
1600,
201,
198,
220,
220,
220,
10392,
28,
2617,
37623,
10141,
13,
19796,
62,
43789,
22784,
201,
198,
220,
220,
220,
1398,
13350,
41888,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
15167,
2229,
15417,
7904,
11361,
7904,
513,
13,
22,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
15167,
2229,
15417,
7904,
11361,
7904,
513,
13,
23,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
15167,
2229,
15417,
7904,
11361,
7904,
513,
13,
24,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
34156,
7904,
7294,
40,
20010,
1079,
7904,
17168,
13789,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
18843,
803,
4482,
7904,
28069,
10426,
7904,
7020,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
18843,
803,
4482,
7904,
5413,
7904,
3964,
1,
201,
198,
220,
220,
220,
16589,
201,
198,
220,
220,
220,
21015,
62,
47911,
11639,
29,
28,
18,
13,
22,
3256,
201,
198,
220,
220,
220,
2721,
62,
47911,
41888,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
67,
322,
12114,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
541,
7535,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
18594,
6592,
17,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
27215,
322,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
9078,
6018,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
9078,
6888,
6775,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
366,
325,
397,
1211,
1,
201,
198,
220,
220,
220,
2361,
201,
198,
8,
201,
198
] | 2.251599 | 469 |
import cPickle
model=cPickle.load(open('lstm_tanh_relu_[1468202263.38]_2_0.610.p'))
cPickle.dump(model,open('model.bin.nlg','wb')) | [
11748,
269,
31686,
293,
201,
198,
19849,
28,
66,
31686,
293,
13,
2220,
7,
9654,
10786,
75,
301,
76,
62,
38006,
71,
62,
260,
2290,
62,
58,
1415,
3104,
1238,
1828,
5066,
13,
2548,
60,
62,
17,
62,
15,
13,
39132,
13,
79,
6,
4008,
201,
198,
66,
31686,
293,
13,
39455,
7,
19849,
11,
9654,
10786,
19849,
13,
8800,
13,
21283,
70,
41707,
39346,
6,
4008
] | 1.970149 | 67 |
#! /usr/bin/python3
from . import get_best
from . import math_helper
| [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
18,
198,
198,
6738,
764,
1330,
651,
62,
13466,
198,
6738,
764,
1330,
10688,
62,
2978,
525,
198
] | 2.692308 | 26 |
from pathlib import Path
from typing import Callable, Optional
import numpy as np
import torch
from torch_geometric.data import Data, InMemoryDataset, download_url
class Twitch(InMemoryDataset):
r"""The Twitch Gamer networks introduced in the
`"Multi-scale Attributed Node Embedding"
<https://arxiv.org/abs/1909.13021>`_ paper.
Nodes represent gamers on Twitch and edges are followerships between them.
Node features represent embeddings of games played by the Twitch users.
The task is to predict whether a user streams mature content.
Args:
root (string): Root directory where the dataset should be saved.
name (string): The name of the dataset (:obj:`"DE"`, :obj:`"EN"`,
:obj:`"ES"`, :obj:`"FR"`, :obj:`"PT"`, :obj:`"RU"`).
transform (callable, optional): A function/transform that takes in an
:obj:`torch_geometric.data.Data` object and returns a transformed
version. The data object will be transformed before every access.
(default: :obj:`None`)
pre_transform (callable, optional): A function/transform that takes in
an :obj:`torch_geometric.data.Data` object and returns a
transformed version. The data object will be transformed before
being saved to disk. (default: :obj:`None`)
"""
url = 'https://graphmining.ai/datasets/ptg/twitch'
@property
@property
@property
@property
| [
6738,
3108,
8019,
1330,
10644,
198,
6738,
19720,
1330,
4889,
540,
11,
32233,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
198,
6738,
28034,
62,
469,
16996,
13,
7890,
1330,
6060,
11,
554,
30871,
27354,
292,
316,
11,
4321,
62,
6371,
628,
198,
4871,
23835,
7,
818,
30871,
27354,
292,
316,
2599,
198,
220,
220,
220,
374,
37811,
464,
23835,
19576,
7686,
5495,
287,
262,
198,
220,
220,
220,
4600,
1,
29800,
12,
9888,
3460,
6169,
19081,
13302,
6048,
278,
1,
198,
220,
220,
220,
1279,
5450,
1378,
283,
87,
452,
13,
2398,
14,
8937,
14,
1129,
2931,
13,
12952,
2481,
29,
63,
62,
3348,
13,
198,
220,
220,
220,
399,
4147,
2380,
15072,
319,
23835,
290,
13015,
389,
10569,
5748,
1022,
606,
13,
198,
220,
220,
220,
19081,
3033,
2380,
11525,
67,
654,
286,
1830,
2826,
416,
262,
23835,
2985,
13,
198,
220,
220,
220,
383,
4876,
318,
284,
4331,
1771,
257,
2836,
15190,
15345,
2695,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6808,
357,
8841,
2599,
20410,
8619,
810,
262,
27039,
815,
307,
7448,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
357,
8841,
2599,
383,
1438,
286,
262,
27039,
357,
25,
26801,
25,
63,
1,
7206,
1,
47671,
1058,
26801,
25,
63,
1,
1677,
1,
47671,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
26801,
25,
63,
1,
1546,
1,
47671,
1058,
26801,
25,
63,
1,
10913,
1,
47671,
1058,
26801,
25,
63,
1,
11571,
1,
47671,
1058,
26801,
25,
63,
1,
49,
52,
1,
63,
737,
198,
220,
220,
220,
220,
220,
220,
220,
6121,
357,
13345,
540,
11,
11902,
2599,
317,
2163,
14,
35636,
326,
2753,
287,
281,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
26801,
25,
63,
13165,
354,
62,
469,
16996,
13,
7890,
13,
6601,
63,
2134,
290,
5860,
257,
14434,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2196,
13,
383,
1366,
2134,
481,
307,
14434,
878,
790,
1895,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
12286,
25,
1058,
26801,
25,
63,
14202,
63,
8,
198,
220,
220,
220,
220,
220,
220,
220,
662,
62,
35636,
357,
13345,
540,
11,
11902,
2599,
317,
2163,
14,
35636,
326,
2753,
287,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
281,
1058,
26801,
25,
63,
13165,
354,
62,
469,
16996,
13,
7890,
13,
6601,
63,
2134,
290,
5860,
257,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14434,
2196,
13,
383,
1366,
2134,
481,
307,
14434,
878,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
852,
7448,
284,
11898,
13,
357,
12286,
25,
1058,
26801,
25,
63,
14202,
63,
8,
628,
220,
220,
220,
37227,
628,
220,
220,
220,
19016,
796,
705,
5450,
1378,
34960,
45374,
13,
1872,
14,
19608,
292,
1039,
14,
457,
70,
14,
31844,
6,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
2488,
26745,
198
] | 2.779468 | 526 |
import json
from enum import Enum, unique
@unique
video_mapper = {item.value: item for item in Video.__members__.values() if item.enable}
video_mapper_json = []
for item in Video.__members__.values():
if not item.enable:
continue
video_mapper_json.append({
'label': item.label,
'value': item.value,
})
video_mapper_json = json.dumps(video_mapper_json, ensure_ascii=False)
| [
11748,
33918,
198,
6738,
33829,
1330,
2039,
388,
11,
3748,
628,
198,
31,
34642,
628,
198,
15588,
62,
76,
11463,
796,
1391,
9186,
13,
8367,
25,
2378,
329,
2378,
287,
7623,
13,
834,
30814,
834,
13,
27160,
3419,
611,
2378,
13,
21633,
92,
198,
198,
15588,
62,
76,
11463,
62,
17752,
796,
17635,
198,
1640,
2378,
287,
7623,
13,
834,
30814,
834,
13,
27160,
33529,
198,
220,
220,
220,
611,
407,
2378,
13,
21633,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2555,
198,
220,
220,
220,
2008,
62,
76,
11463,
62,
17752,
13,
33295,
15090,
198,
220,
220,
220,
220,
220,
220,
220,
705,
18242,
10354,
2378,
13,
18242,
11,
198,
220,
220,
220,
220,
220,
220,
220,
705,
8367,
10354,
2378,
13,
8367,
11,
198,
220,
220,
220,
220,
32092,
198,
15588,
62,
76,
11463,
62,
17752,
796,
33918,
13,
67,
8142,
7,
15588,
62,
76,
11463,
62,
17752,
11,
4155,
62,
292,
979,
72,
28,
25101,
8,
198
] | 2.555556 | 162 |
# -*- coding: utf-8 -*- #
# Copyright 2018 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.
"""Flags for commands in cloudasset."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import arg_parsers
def AddContentTypeArgs(parser, required):
"""--content-type argument for asset export and get-history."""
if required:
help_text = (
'Asset content type. Choices are `resource`, `iam-policy`. '
'Specifying `resource` will export resource metadata, and specifying '
'`iam-policy` will export IAM policy set on assets.')
else:
help_text = (
'Asset content type. If specified, only content matching the '
'specified type will be returned. Otherwise, no content but the '
'asset name will be returned. Choices are `resource`, '
'`iam-policy`. Specifying `resource` will export resource '
'metadata, and specifying `iam-policy` will export IAM policy set '
'on assets.')
parser.add_argument(
'--content-type',
required=required,
choices=['resource', 'iam-policy'],
help=help_text)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
1303,
198,
2,
15069,
2864,
3012,
3457,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
37811,
40053,
329,
9729,
287,
6279,
562,
316,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
23645,
17721,
21282,
74,
13,
13345,
72,
3008,
1330,
1822,
62,
79,
945,
364,
628,
628,
198,
198,
4299,
3060,
19746,
6030,
42035,
7,
48610,
11,
2672,
2599,
198,
220,
37227,
438,
11299,
12,
4906,
4578,
329,
11171,
10784,
290,
651,
12,
23569,
526,
15931,
198,
220,
611,
2672,
25,
198,
220,
220,
220,
1037,
62,
5239,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
45869,
2695,
2099,
13,
10031,
1063,
389,
4600,
31092,
47671,
4600,
1789,
12,
30586,
44646,
705,
198,
220,
220,
220,
220,
220,
220,
220,
705,
22882,
4035,
4600,
31092,
63,
481,
10784,
8271,
20150,
11,
290,
31577,
705,
198,
220,
220,
220,
220,
220,
220,
220,
705,
63,
1789,
12,
30586,
63,
481,
10784,
314,
2390,
2450,
900,
319,
6798,
2637,
8,
198,
220,
2073,
25,
198,
220,
220,
220,
1037,
62,
5239,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
45869,
2695,
2099,
13,
1002,
7368,
11,
691,
2695,
12336,
262,
705,
198,
220,
220,
220,
220,
220,
220,
220,
705,
23599,
2099,
481,
307,
4504,
13,
15323,
11,
645,
2695,
475,
262,
705,
198,
220,
220,
220,
220,
220,
220,
220,
705,
562,
316,
1438,
481,
307,
4504,
13,
10031,
1063,
389,
4600,
31092,
47671,
705,
198,
220,
220,
220,
220,
220,
220,
220,
705,
63,
1789,
12,
30586,
44646,
220,
18291,
4035,
4600,
31092,
63,
481,
10784,
8271,
705,
198,
220,
220,
220,
220,
220,
220,
220,
705,
38993,
11,
290,
31577,
4600,
1789,
12,
30586,
63,
481,
10784,
314,
2390,
2450,
900,
705,
198,
220,
220,
220,
220,
220,
220,
220,
705,
261,
6798,
2637,
8,
628,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
705,
438,
11299,
12,
4906,
3256,
198,
220,
220,
220,
220,
220,
2672,
28,
35827,
11,
198,
220,
220,
220,
220,
220,
7747,
28,
17816,
31092,
3256,
705,
1789,
12,
30586,
6,
4357,
198,
220,
220,
220,
220,
220,
1037,
28,
16794,
62,
5239,
8,
628,
628,
628
] | 3.182994 | 541 |
"""
Reading and writing JGF format graphs.
"""
### IMPORTS
import json
### CONSTANTS & DEFINES
### CODE ###
# XXX: maybe look at a custom decoder/loader?
| [
37811,
198,
36120,
290,
3597,
449,
21713,
5794,
28770,
13,
198,
37811,
198,
198,
21017,
30023,
33002,
198,
198,
11748,
33918,
628,
198,
21017,
7102,
2257,
1565,
4694,
1222,
5550,
20032,
1546,
198,
198,
21017,
42714,
44386,
198,
220,
220,
1303,
27713,
25,
3863,
804,
379,
257,
2183,
875,
12342,
14,
29356,
30,
198
] | 3 | 54 |
#!/usr/bin/env python
"""
Test module for VOF with EV
"""
from __future__ import absolute_import
from builtins import object
from proteus.iproteus import *
from proteus import Comm
comm = Comm.get()
Profiling.logLevel=2
Profiling.verbose=True
import numpy as np
import tables
from . import thelper_vof
from . import thelper_vof_p
from . import thelper_vof_n
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
14402,
8265,
329,
569,
19238,
351,
8696,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
6738,
3170,
1040,
1330,
2134,
198,
6738,
5915,
385,
13,
541,
2519,
385,
1330,
1635,
198,
6738,
5915,
385,
1330,
1520,
198,
9503,
796,
1520,
13,
1136,
3419,
198,
15404,
4386,
13,
6404,
4971,
28,
17,
198,
15404,
4386,
13,
19011,
577,
28,
17821,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
8893,
198,
6738,
764,
1330,
262,
75,
525,
62,
85,
1659,
198,
6738,
764,
1330,
262,
75,
525,
62,
85,
1659,
62,
79,
198,
6738,
764,
1330,
262,
75,
525,
62,
85,
1659,
62,
77,
198
] | 3.016807 | 119 |
# Copyright (c) 2020 Mobvoi Inc. (authors: Fangjun Kuang)
# Xiaomi Corporation (authors: Haowen Qiu)
#
# See ../../../LICENSE for clarification regarding multiple authors
import torch # noqa
import _k2
# The FSA properties are a bit-field; these constants can be used
# with '&' to determine the properties.
VALID = 0x01 # Valid from a formatting perspective
NONEMPTY = 0x02 # Nonempty as in, has at least one arc.
TOPSORTED = 0x04, # FSA is top-sorted, but possibly with
# self-loops, dest_state >= src_state
TOPSORTED_AND_ACYCLIC = 0x08 # Fsa is topsorted, dest_state > src_state
ARC_SORTED = 0x10 # Fsa is arc-sorted: arcs leaving a state are are sorted by
# label first and then on `dest_state`, see operator< in
# struct Arc in /k2/csrc/fsa.h (Note: labels are treated as
# uint32 for purpose of sorting!)
ARC_SORTED_AND_DETERMINISTIC = 0x20 # Arcs leaving a given state are *strictly*
# sorted by label, i.e. no duplicates with
# the same label.
EPSILON_FREE = 0x40 # Label zero (epsilon) is not present..
ACCESSIBLE = 0x80 # True if there are no obvious signs
# of states not being accessible or
# co-accessible, i.e. states with no
# arcs entering them
COACCESSIBLE = 0x0100 # True if there are no obvious signs of
# states not being co-accessible, i.e.
# i.e. states with no arcs leaving them
ALL = 0x01FF
def to_str(p: int) -> str:
'''Convert properties to a string for debug purpose.
Args:
p:
An integer returned by :func:`get_properties`.
Returns:
A string representation of the input properties.
'''
return _k2.fsa_properties_as_str(p)
| [
2,
15069,
357,
66,
8,
220,
12131,
220,
16540,
13038,
72,
3457,
13,
220,
220,
220,
220,
220,
220,
220,
357,
41617,
25,
24468,
29741,
12554,
648,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
46726,
10501,
357,
41617,
25,
9398,
322,
268,
1195,
16115,
8,
198,
2,
198,
2,
4091,
11485,
14,
40720,
40720,
43,
2149,
24290,
329,
31321,
5115,
3294,
7035,
198,
198,
11748,
28034,
220,
1303,
645,
20402,
198,
11748,
4808,
74,
17,
198,
198,
2,
383,
42894,
6608,
389,
257,
1643,
12,
3245,
26,
777,
38491,
460,
307,
973,
198,
2,
351,
705,
5,
6,
284,
5004,
262,
6608,
13,
198,
198,
23428,
2389,
796,
657,
87,
486,
220,
1303,
48951,
422,
257,
33313,
6650,
198,
45,
1340,
39494,
9936,
796,
657,
87,
2999,
220,
1303,
8504,
28920,
355,
287,
11,
468,
379,
1551,
530,
10389,
13,
198,
51,
30737,
9863,
1961,
796,
657,
87,
3023,
11,
220,
1303,
42894,
318,
1353,
12,
82,
9741,
11,
475,
5457,
351,
198,
2,
2116,
12,
5439,
2840,
11,
2244,
62,
5219,
18189,
12351,
62,
5219,
198,
51,
30737,
9863,
1961,
62,
6981,
62,
43300,
5097,
2149,
796,
657,
87,
2919,
220,
1303,
376,
11400,
318,
21246,
9741,
11,
2244,
62,
5219,
1875,
12351,
62,
5219,
198,
25793,
62,
50,
9863,
1961,
796,
657,
87,
940,
220,
1303,
376,
11400,
318,
10389,
12,
82,
9741,
25,
44606,
4305,
257,
1181,
389,
389,
23243,
416,
198,
2,
6167,
717,
290,
788,
319,
4600,
16520,
62,
5219,
47671,
766,
10088,
27,
287,
198,
2,
2878,
10173,
287,
1220,
74,
17,
14,
6359,
6015,
14,
9501,
64,
13,
71,
357,
6425,
25,
14722,
389,
5716,
355,
198,
2,
20398,
2624,
329,
4007,
286,
29407,
8133,
198,
198,
25793,
62,
50,
9863,
1961,
62,
6981,
62,
35,
2767,
1137,
23678,
8808,
2149,
796,
657,
87,
1238,
220,
1303,
943,
6359,
4305,
257,
1813,
1181,
389,
1635,
301,
2012,
306,
9,
198,
2,
23243,
416,
6167,
11,
1312,
13,
68,
13,
645,
14184,
16856,
351,
198,
2,
262,
976,
6167,
13,
198,
36,
3705,
4146,
1340,
62,
39274,
796,
657,
87,
1821,
220,
1303,
36052,
6632,
357,
538,
18217,
261,
8,
318,
407,
1944,
492,
198,
26861,
7597,
34563,
796,
657,
87,
1795,
220,
1303,
6407,
611,
612,
389,
645,
3489,
5895,
198,
2,
286,
2585,
407,
852,
9857,
393,
198,
2,
763,
12,
33780,
11,
1312,
13,
68,
13,
2585,
351,
645,
198,
2,
44606,
8218,
606,
198,
8220,
26861,
7597,
34563,
796,
657,
87,
39103,
220,
1303,
6407,
611,
612,
389,
645,
3489,
5895,
286,
198,
2,
2585,
407,
852,
763,
12,
33780,
11,
1312,
13,
68,
13,
198,
2,
1312,
13,
68,
13,
2585,
351,
645,
44606,
4305,
606,
198,
7036,
796,
657,
87,
486,
5777,
628,
198,
4299,
284,
62,
2536,
7,
79,
25,
493,
8,
4613,
965,
25,
198,
220,
220,
220,
705,
7061,
3103,
1851,
6608,
284,
257,
4731,
329,
14257,
4007,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
279,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1052,
18253,
4504,
416,
1058,
20786,
25,
63,
1136,
62,
48310,
44646,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
317,
4731,
10552,
286,
262,
5128,
6608,
13,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
1441,
4808,
74,
17,
13,
9501,
64,
62,
48310,
62,
292,
62,
2536,
7,
79,
8,
198
] | 2.80789 | 583 |
# Database info
MONGODB_DB_NAME = "NXS"
MONGODB_MODELS_COLLECTION_NAME = "Models"
MONGODB_PIPELINES_COLLECTION_NAME = "Pipelines"
MONGODB_W4_MODEL_PROFILES_COLLECTION_NAME = "W4Profiles"
# Storage info
STORAGE_MODEL_PATH = "models"
STORAGE_PREPROC_PATH = "preprocessing"
STORAGE_POSTPROC_PATH = "postprocessing"
STORAGE_TRANSFORM_PATH = "transforming"
STORAGE_PREDEFINED_PREPROC_PATH = "w4preprocessing"
STORAGE_PREDEFINED_POSTPROC_PATH = "w4postprocessing"
STORAGE_PREDEFINED_TRANSFORM_PATH = "w4transforming"
STORAGE_PREDEFINED_EXTRAS_PATH = "w4extras"
# QUEUE INFO
| [
2,
24047,
7508,
198,
44,
18494,
3727,
33,
62,
11012,
62,
20608,
796,
366,
45,
55,
50,
1,
198,
44,
18494,
3727,
33,
62,
33365,
37142,
62,
25154,
16779,
2849,
62,
20608,
796,
366,
5841,
1424,
1,
198,
44,
18494,
3727,
33,
62,
47,
4061,
3698,
1268,
1546,
62,
25154,
16779,
2849,
62,
20608,
796,
366,
47,
541,
20655,
1,
198,
44,
18494,
3727,
33,
62,
54,
19,
62,
33365,
3698,
62,
4805,
19238,
4146,
1546,
62,
25154,
16779,
2849,
62,
20608,
796,
366,
54,
19,
15404,
2915,
1,
198,
198,
2,
20514,
7508,
198,
2257,
1581,
11879,
62,
33365,
3698,
62,
34219,
796,
366,
27530,
1,
198,
2257,
1581,
11879,
62,
46437,
4805,
4503,
62,
34219,
796,
366,
3866,
36948,
1,
198,
2257,
1581,
11879,
62,
32782,
4805,
4503,
62,
34219,
796,
366,
7353,
36948,
1,
198,
2257,
1581,
11879,
62,
5446,
15037,
21389,
62,
34219,
796,
366,
7645,
15464,
1,
198,
2257,
1581,
11879,
62,
4805,
1961,
36,
20032,
1961,
62,
46437,
4805,
4503,
62,
34219,
796,
366,
86,
19,
3866,
36948,
1,
198,
2257,
1581,
11879,
62,
4805,
1961,
36,
20032,
1961,
62,
32782,
4805,
4503,
62,
34219,
796,
366,
86,
19,
7353,
36948,
1,
198,
2257,
1581,
11879,
62,
4805,
1961,
36,
20032,
1961,
62,
5446,
15037,
21389,
62,
34219,
796,
366,
86,
19,
7645,
15464,
1,
198,
2257,
1581,
11879,
62,
4805,
1961,
36,
20032,
1961,
62,
6369,
5446,
1921,
62,
34219,
796,
366,
86,
19,
2302,
8847,
1,
198,
198,
2,
1195,
8924,
8924,
24890,
628,
628
] | 2.264822 | 253 |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class NetworkController(object):
"""Control network settings and servers to simulate the Web.
Network changes include forwarding device ports to host platform ports.
Web Page Replay is used to record and replay HTTP/HTTPS responses.
"""
def SetReplayArgs(self,
archive_path,
wpr_mode,
netsim,
extra_wpr_args,
make_javascript_deterministic=False):
"""Save the arguments needed for replay."""
self._network_controller_backend.SetReplayArgs(
archive_path, wpr_mode, netsim, extra_wpr_args,
make_javascript_deterministic)
def UpdateReplayForExistingBrowser(self):
"""Restart replay if needed for an existing browser.
TODO(slamm): Drop this method when the browser_backend dependencies are
moved to the platform. https://crbug.com/423962
"""
self._network_controller_backend.UpdateReplay()
| [
2,
15069,
1946,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
198,
2,
1043,
287,
262,
38559,
24290,
2393,
13,
628,
198,
4871,
7311,
22130,
7,
15252,
2599,
198,
220,
37227,
15988,
3127,
6460,
290,
9597,
284,
29308,
262,
5313,
13,
628,
220,
7311,
2458,
2291,
43448,
3335,
14090,
284,
2583,
3859,
14090,
13,
198,
220,
5313,
7873,
23635,
318,
973,
284,
1700,
290,
24788,
14626,
14,
6535,
28820,
9109,
13,
198,
220,
37227,
628,
220,
825,
5345,
3041,
1759,
42035,
7,
944,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15424,
62,
6978,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
266,
1050,
62,
14171,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31720,
320,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3131,
62,
86,
1050,
62,
22046,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
787,
62,
37495,
62,
67,
2357,
49228,
28,
25101,
2599,
198,
220,
220,
220,
37227,
16928,
262,
7159,
2622,
329,
24788,
526,
15931,
198,
220,
220,
220,
2116,
13557,
27349,
62,
36500,
62,
1891,
437,
13,
7248,
3041,
1759,
42035,
7,
198,
220,
220,
220,
220,
220,
220,
220,
15424,
62,
6978,
11,
266,
1050,
62,
14171,
11,
31720,
320,
11,
3131,
62,
86,
1050,
62,
22046,
11,
198,
220,
220,
220,
220,
220,
220,
220,
787,
62,
37495,
62,
67,
2357,
49228,
8,
628,
220,
825,
10133,
3041,
1759,
1890,
3109,
9665,
46532,
7,
944,
2599,
198,
220,
220,
220,
37227,
19452,
433,
24788,
611,
2622,
329,
281,
4683,
6444,
13,
628,
220,
220,
220,
16926,
46,
7,
82,
11199,
2599,
14258,
428,
2446,
618,
262,
6444,
62,
1891,
437,
20086,
389,
198,
220,
220,
220,
3888,
284,
262,
3859,
13,
3740,
1378,
6098,
25456,
13,
785,
14,
43356,
4846,
17,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2116,
13557,
27349,
62,
36500,
62,
1891,
437,
13,
10260,
3041,
1759,
3419,
198
] | 2.786432 | 398 |
import OPEN_WEATHER_KEYS
from requests import get, exceptions
from datetime import datetime
# ----------------------------------------------------------------------------
"""
Use the datetime library to convert an integer unix timestamp and a unix
timezone offset to calculate string formated time and date.
Inputs:
dt -> Int
unix time-code
tz -> Int
unix time-code timexone offset
AM_PM -> Bool
True: Convert to 12 hour clock
Flase: Convert to 24 hour clock
Output:
Returns given time data as a formated string
"""
# ----------------------------------------------------------------------------
"""
Use the requests library to make an API call to Open Weather. If the
request is successful, return the requestd data as a JSON data set.
If the request fails, return None data type. The None response is to
be handled by the caller of the function
"""
# ----------------------------------------------------------------------------
"""
When 'weather-bot.py' is run as a program, this is where the program
starts. If another python file is currently the active project,
this section is ignored.
This is where I will test the weather-bot before it is added to the main
Hermes Project.
"""
if __name__ == '__main__':
weather_json = get_weather_json(OPEN_WEATHER_KEYS.lat, OPEN_WEATHER_KEYS.lon)
if weather_json is not None:
if 'current' in weather_json:
print('Current Weather Forecast:')
# Format available items
# Format time data
if 'dt' in weather_json['current']:
print('\tCurrent Time:\t'+convert_time(weather_json['current']['dt'], weather_json['timezone_offset'], True)[11:])
if 'sunrise' in weather_json['current']:
print('\tSunrise:\t'+convert_time(weather_json['current']['sunrise'], weather_json['timezone_offset'], True)[11:])
if 'sunset' in weather_json['current']:
print('\tSunset:\t\t'+convert_time(weather_json['current']['sunset'], weather_json['timezone_offset'], True)[11:])
# Add line between time and temp data
print(' ')
# Format temperature data
if 'temp' in weather_json['current']:
print('\tCurrent Temp:\t'+str(weather_json['current']['temp'])+' F')
if 'feels_like' in weather_json['current']:
print('\tFeels Like:\t'+str(weather_json['current']['feels_like'])+' F')
if 'dew_point' in weather_json['current']:
print('\tDew Point:\t'+str(weather_json['current']['dew_point'])+' F')
if 'pressure' in weather_json['current']:
print('\tPressure:\t'+str(weather_json['current']['pressure'])+' hPa')
# Add line between temp and sky data
print(' ')
# Format Sky Data
if 'uvi' in weather_json['current']:
print('\tUV Index:\t'+str(weather_json['current']['uvi'])+' ')
if 'clouds' in weather_json['current']:
print('\tCloud Cover:\t'+str(weather_json['current']['clouds'])+' %')
if 'humidity' in weather_json['current']:
print('\tHumidity:\t'+str(weather_json['current']['humidity'])+' %')
if 'visibility' in weather_json['current']:
print('\tVisibility:\t'+str(weather_json['current']['visibility'])+' meters')
if 'weather' in weather_json['current']:
if 'icon' in weather_json['current']['weather'][0]:
icon_url = 'http://openweathermap.org/img/wn/' + \
weather_json['current']['weather'][0]['icon'] + \
'@2x.png'
print(icon_url) | [
11748,
38303,
62,
8845,
45226,
62,
7336,
16309,
198,
6738,
7007,
1330,
651,
11,
13269,
198,
6738,
4818,
8079,
1330,
4818,
8079,
628,
198,
2,
16529,
10541,
198,
37811,
198,
220,
220,
220,
5765,
262,
4818,
8079,
5888,
284,
10385,
281,
18253,
555,
844,
41033,
290,
257,
555,
844,
198,
220,
220,
220,
220,
220,
220,
220,
640,
11340,
11677,
284,
15284,
4731,
1296,
515,
640,
290,
3128,
13,
198,
220,
220,
220,
220,
198,
220,
220,
220,
23412,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
288,
83,
220,
220,
220,
220,
220,
4613,
2558,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
555,
844,
640,
12,
8189,
198,
220,
220,
220,
220,
220,
220,
220,
256,
89,
220,
220,
220,
220,
220,
4613,
2558,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
555,
844,
640,
12,
8189,
640,
87,
505,
11677,
198,
220,
220,
220,
220,
220,
220,
220,
3001,
62,
5868,
220,
220,
4613,
347,
970,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6407,
25,
220,
38240,
284,
1105,
1711,
8801,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1610,
589,
25,
38240,
284,
1987,
1711,
8801,
198,
220,
220,
220,
25235,
25,
198,
220,
220,
220,
220,
220,
220,
220,
16409,
1813,
640,
1366,
355,
257,
1296,
515,
4731,
198,
37811,
628,
198,
2,
16529,
10541,
198,
37811,
198,
220,
220,
220,
5765,
262,
7007,
5888,
284,
787,
281,
7824,
869,
284,
4946,
15615,
13,
1002,
262,
220,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
318,
4388,
11,
1441,
262,
2581,
67,
1366,
355,
257,
19449,
1366,
900,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1002,
262,
2581,
10143,
11,
1441,
6045,
1366,
2099,
13,
383,
6045,
2882,
318,
284,
198,
220,
220,
220,
220,
220,
220,
220,
307,
12118,
416,
262,
24955,
286,
262,
2163,
198,
37811,
628,
198,
2,
16529,
10541,
198,
37811,
198,
220,
220,
220,
1649,
705,
23563,
12,
13645,
13,
9078,
6,
318,
1057,
355,
257,
1430,
11,
428,
318,
810,
262,
1430,
220,
198,
220,
220,
220,
220,
220,
220,
220,
4940,
13,
1002,
1194,
21015,
2393,
318,
3058,
262,
4075,
1628,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
428,
2665,
318,
9514,
13,
628,
220,
220,
220,
770,
318,
810,
314,
481,
1332,
262,
6193,
12,
13645,
878,
340,
318,
2087,
284,
262,
1388,
220,
198,
220,
220,
220,
220,
220,
220,
220,
41167,
4935,
13,
198,
37811,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
6193,
62,
17752,
796,
651,
62,
23563,
62,
17752,
7,
3185,
1677,
62,
8845,
45226,
62,
7336,
16309,
13,
15460,
11,
38303,
62,
8845,
45226,
62,
7336,
16309,
13,
14995,
8,
628,
220,
220,
220,
611,
6193,
62,
17752,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
705,
14421,
6,
287,
6193,
62,
17752,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
11297,
15615,
4558,
2701,
25,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
18980,
1695,
3709,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
18980,
640,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
28664,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
59,
83,
11297,
3862,
7479,
83,
6,
10,
1102,
1851,
62,
2435,
7,
23563,
62,
17752,
17816,
14421,
6,
7131,
6,
28664,
6,
4357,
6193,
62,
17752,
17816,
2435,
11340,
62,
28968,
6,
4357,
6407,
38381,
1157,
25,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
19155,
17163,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
59,
83,
16012,
17163,
7479,
83,
6,
10,
1102,
1851,
62,
2435,
7,
23563,
62,
17752,
17816,
14421,
6,
7131,
6,
19155,
17163,
6,
4357,
6193,
62,
17752,
17816,
2435,
11340,
62,
28968,
6,
4357,
6407,
38381,
1157,
25,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
19155,
2617,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
59,
83,
16012,
2617,
7479,
83,
59,
83,
6,
10,
1102,
1851,
62,
2435,
7,
23563,
62,
17752,
17816,
14421,
6,
7131,
6,
19155,
2617,
6,
4357,
6193,
62,
17752,
17816,
2435,
11340,
62,
28968,
6,
4357,
6407,
38381,
1157,
25,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
1627,
1022,
640,
290,
20218,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
705,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
18980,
5951,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
29510,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
59,
83,
11297,
24189,
7479,
83,
6,
10,
2536,
7,
23563,
62,
17752,
17816,
14421,
6,
7131,
6,
29510,
6,
12962,
10,
6,
376,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
5036,
1424,
62,
2339,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
59,
83,
14304,
1424,
4525,
7479,
83,
6,
10,
2536,
7,
23563,
62,
17752,
17816,
14421,
6,
7131,
6,
5036,
1424,
62,
2339,
6,
12962,
10,
6,
376,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
67,
413,
62,
4122,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
59,
83,
35,
413,
6252,
7479,
83,
6,
10,
2536,
7,
23563,
62,
17752,
17816,
14421,
6,
7131,
6,
67,
413,
62,
4122,
6,
12962,
10,
6,
376,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
36151,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
59,
83,
13800,
495,
7479,
83,
6,
10,
2536,
7,
23563,
62,
17752,
17816,
14421,
6,
7131,
6,
36151,
6,
12962,
10,
6,
289,
28875,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
1627,
1022,
20218,
290,
6766,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
705,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
18980,
5274,
6060,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
84,
8903,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
59,
83,
31667,
12901,
7479,
83,
6,
10,
2536,
7,
23563,
62,
17752,
17816,
14421,
6,
7131,
6,
84,
8903,
6,
12962,
10,
6,
705,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
17721,
82,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
59,
83,
18839,
17546,
7479,
83,
6,
10,
2536,
7,
23563,
62,
17752,
17816,
14421,
6,
7131,
6,
17721,
82,
6,
12962,
10,
6,
4064,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
17047,
17995,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
59,
83,
32661,
17995,
7479,
83,
6,
10,
2536,
7,
23563,
62,
17752,
17816,
14421,
6,
7131,
6,
17047,
17995,
6,
12962,
10,
6,
4064,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
4703,
2247,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
59,
83,
15854,
2247,
7479,
83,
6,
10,
2536,
7,
23563,
62,
17752,
17816,
14421,
6,
7131,
6,
4703,
2247,
6,
12962,
10,
6,
10700,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
23563,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
4749,
6,
287,
6193,
62,
17752,
17816,
14421,
6,
7131,
6,
23563,
6,
7131,
15,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7196,
62,
6371,
796,
705,
4023,
1378,
9654,
23563,
8899,
13,
2398,
14,
9600,
14,
675,
14,
6,
1343,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6193,
62,
17752,
17816,
14421,
6,
7131,
6,
23563,
6,
7131,
15,
7131,
6,
4749,
20520,
1343,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
31,
17,
87,
13,
11134,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
4749,
62,
6371,
8
] | 2.290772 | 1,723 |
#!/usr/bin/env python##############################################################################
#!/usr/bin/env python3
##############################################################################
# EVOLIFE http://evolife.telecom-paris.fr Jean-Louis Dessalles #
# Telecom Paris 2021 www.dessalles.fr #
# -------------------------------------------------------------------------- #
# License: Creative Commons BY-NC-SA #
##############################################################################
##############################################################################
# Alliances #
##############################################################################
""" EVOLIFE: Module Alliances:
Individuals inherit this class
which determines who is friend with whom
"""
import sys
if __name__ == '__main__': sys.path.append('../..') # for tests
from Evolife.Tools.Tools import error
class club:
""" class club: list of individuals associated with their performance.
The performance is used to decide who gets acquainted with whom.
"""
# def members(self): return self.__members
def minimal(self):
" returns the minimal performance among members "
if self.size(): return min([T[1] for T in self])
return -1
def maximal(self):
" returns the maximal performance among members "
if self.size(): return max([T[1] for T in self])
return -1
def best(self):
" returns the member with the best performance "
# if self.size(): return self.ordered()[0]
# if self.size(): return max([T for T in self.__members], key=lambda x: x[1])[0]
if self.size(): return max(self, key=lambda x: x[1])[0]
return None
def worst(self):
" returns the member with the worst performance "
if self.size(): return self.ordered()[-1]
return None
def accepts(self, performance, conservative=True):
" signals that the new individual can be accepted into the club "
if self.size() >= self.sizeMax:
if conservative and performance <= self.minimal():
return -1 # equality: priority given to former members
elif performance < self.minimal(): return -1
# returning the rank that the candidate would be assigned
# return sorted([performance] + self.performances(),reverse=True).index(performance)
rank = self.size() - sorted([performance] + self.performances()).index(performance)
if rank <= self.sizeMax: return rank
error('Alliances', 'accept')
def exits(self, oldMember):
" a member goes out from the club "
for (M,Perf) in self.__members[:]: # safe to copy the list as it is changed within the loop
if M == oldMember:
self.__members.remove((oldMember,Perf))
return True
print('exiled: %s' % str(oldMember))
error('Alliances: non-member attempting to quit a club')
return False
def weakening(self, Factor = 0.9): # temporary value
" all performances are reduced (represents temporal erosion) "
for (M,Perf) in self.__members[:]: # safe to copy the list as it is changed within the loop
self.__members.remove((M, Perf))
self.__members.append((M, Perf * Factor))
class Friend:
""" class Friend: defines an individual's acqaintances
"""
#################################
# asymmetrical links #
#################################
def affiliable(self, F_perf, conservative=True):
" Checks whether affiliation is possible "
return self.friends.accepts(F_perf, conservative=conservative) >= 0
def follow(self, F, F_perf, conservative=True, Quit=None):
""" the individual wants to be F's disciple due to F's performance
"""
# print self.ID, "wants to follows", (F.ID, F_perf)
if self.affiliable(F_perf, conservative=conservative):
# the new friend is good enough
RF = self.friends.enters(F, F_perf, conservative=conservative) # returns ejected old friend
if RF is not None:
# print('redundant friend of %s: %s' % (self, RF))
# print('self: %s' % self, ">>> self's friends: %s " % map(str, Friend.social_signature(self)))
if Quit is None: Quit = self.quit_
Quit(RF) # some redundant friend is disowned
return True
else: return False
# R = Friend in self.friends.names()
# if R: print self.ID, 'is already following', Friend.ID
def quit_(self, Friend=None):
""" the individual no longer follows its friend
"""
if Friend is None: Friend = self.friends.worst()
if Friend is not None:
# print(self, 'quits ', Friend)
self.friends.exits(Friend)
def checkNetwork(self, membershipFunction=None):
" updates links by forgetting friends that are gone "
for F in self:
if not membershipFunction(F): self.quit_(F)
def detach(self):
""" The individual quits all its friends """
for F in self: self.quit_(F)
#################################
# symmetrical links #
#################################
def get_friend(self, Offer, Partner, PartnerOffer):
" Checks mutual acceptance before establishing friendship "
if self.acquaintable(Offer, Partner, PartnerOffer):
if not self.follow(Partner, PartnerOffer, Quit=self.end_friendship):
error("Friend: self changed mind")
if not Partner.follow(self, Offer, Quit=Partner.end_friendship):
error("Friend: Partner changed mind")
return True
return False
def acquainted(self, Partner):
" same as get_friend/3 with no performance "
return self.get_friend(0, Partner, 0)
def end_friendship(self, Partner):
" Partners remove each other from their address book "
# print('\nsplitting up', self.ID, Partner.ID)
self.quit_(Partner)
Partner.quit_(self)
def forgetAll(self):
""" The individual quits its friends """
for F in self: self.end_friendship(F)
class Follower(Friend):
""" Augmented version of Friends for asymmetrical links - replaces 'Alliances'.
'Follower' in addition knows about who is following self
"""
def F_affiliable(self, perf, Guru, G_perf, conservative=True):
" Checks whether affiliation is possible "
A = self.affiliable(G_perf, conservative=conservative) # Guru is acceptable and ...
if self.followers is not None:
A &= Guru.followers.affiliable(perf, conservative=conservative) # ...self acceptable to Guru
return A
def F_follow(self, perf, G, G_perf, conservative=True):
""" the individual wants to be G's disciple because of some of G's performance
G may evaluate the individual's performance too
"""
# print '.',
if self.F_affiliable(perf, G, G_perf, conservative=conservative):
# ------ the new guru is good enough and the individual is good enough for the guru
# print('%s (%s) is about to follow %s (%s)' % (self, list(map(str, self.social_signature())), G, list(map(str, G.social_signature()))))
if not self.follow(G, G_perf, conservative=conservative, Quit=self.G_quit_):
error("Alliances", "inconsistent guru")
if G.followers is not None:
if not G.followers.follow(self, perf, conservative=conservative, Quit=G.F_quit_):
error('Alliances', "inconsistent self")
# self.consistency()
# G.consistency()
return True
else: return False
def G_quit_(self, Guru):
""" the individual no longer follows its guru
"""
# self.consistency()
# Guru.consistency()
self.quit_(Guru)
if Guru.followers is not None: Guru.followers.quit_(self)
def F_quit_(self, Follower):
""" the individual does not want its disciple any longer
"""
if self.followers is not None:
self.followers.quit_(Follower)
Follower.quit_(self)
else: error('Alliances', 'No Follower whatsoever')
def get_friend(self, Offer, Partner, PartnerOffer):
" Checks mutual acceptance before establishing friendship "
if self.acquaintable(Offer, Partner, PartnerOffer):
if not self.F_follow(Offer, Partner, PartnerOffer):
error("Friend: self changed mind")
if not Partner.F_follow(PartnerOffer, self, Offer):
error("Friend: Partner changed mind")
return True
return False
def end_friendship(self, Partner):
" Partners remove each other from their address book "
# print('\nsplitting up', self.ID, Partner.ID)
# print(self.consistency(), Partner.consistency())
self.G_quit_(Partner)
Partner.G_quit_(self)
def detach(self):
""" The individual quits its guru and its followers
"""
for G in self.names(): self.G_quit_(G) # G is erased from self's guru list
if self.names() != []: error("Alliances: recalcitrant guru")
if self.followers is not None:
for F in self.followers.names(): self.F_quit_(F) # self is erased from F's guru list
if self.followers.names() != []: error("Alliances: sticky followers")
# # # # class Alliances(object):
# # # # """ class Alliances: each agent stores both its gurus and its followers
# # # # (This is an old class, kept for compatibility (and not tested) """
# # # # def __init__(self, MaxGurus, MaxFollowers):
# # # # self.gurus = Friend(MaxGurus)
# # # # self.followers = Friend(MaxFollowers)
# # # # #################################
# # # # # hierarchical links #
# # # # #################################
# # # # def affiliable(self, perf, Guru, G_perf, conservative=True):
# # # # " Checks whether affiliation is possible "
# # # # return self.gurus.affiliable(G_perf, conservative=conservative) \
# # # # and Guru.followers.affiliable(perf, conservative=conservative)
# # # # def follow(self, perf, G, G_perf, conservative=True):
# # # # """ the individual wants to be G's disciple because of some of G's performance
# # # # G may evaluate the individual's performance too
# # # # """
# # # # if self.affiliable(perf, G, G_perf, conservative=conservative):
# # # # # the new guru is good enough and the individual is good enough for the guru
# # # # self.gurus.follow(G, G_perf, conservative=conservative, Quit=self.quit_)
# # # # G.followers.follow(self, perf, conservative=conservative, Quit=G.quit_)
# # # # return True
# # # # else: return False
# # # # def quit_(self, Guru):
# # # # """ the individual no longer follows its guru
# # # # """
# # # # Guru.followers.quit_(self)
# # # # self.gurus.quit_(Guru)
# # # # def best_friend(self): return self.gurus.best_friend()
# # # # def friends(self, ordered=True): return self.gurus.Friends(ordered=ordered)
# # # # def nbFriends(self): return self.gurus.nbFriends()
# # # # def nbFollowers(self): return self.followers.nbFriends()
# # # # def lessening_friendship(self, Factor=0.9):
# # # # self.gurus.lessening_friendship(Factor)
# # # # def forgetAll(self):
# # # # self.gurus.forgetAll()
# # # # self.followers.forgetAll()
# # # # #################################
# # # # # symmetrical links #
# # # # #################################
# # # # def acquaintable(self, Partner, Deal):
# # # # return self.affiliable(Deal, Partner, Deal) and Partner.affiliable(Deal, self, Deal)
# # # # def get_friend(self, Offer, Partner, Return=None):
# # # # " Checks mutual acceptance before establishing friendship "
# # # # if Return is None: Return = Offer
# # # # if self.affiliable(Offer, Partner, Return) and Partner.affiliable(Return, self, Offer):
# # # # self.follow(Offer, Partner, Return)
# # # # Partner.follow(Return, self, Offer)
# # # # return True
# # # # return False
# # # # def best_friend_symmetry(self):
# # # # " Checks whether self is its best friend's friend "
# # # # BF = self.best_friend()
# # # # if BF: return self == BF.best_friend()
# # # # return False
# # # # def restore_symmetry(self):
# # # # " Makes sure that self is its friends' friend - Useful for symmmtrical relations "
# # # # for F in self.gurus.names()[:]: # need to copy the list, as it is modified within the loop
# # # # #print 'checking symmetry for %d' % F.ID, F.gurus.names()
# # # # if self not in F.gurus.names():
# # # # print('%s quits %s ***** because absent from %s' % (self.ID, F.ID, str(F.gurus.names())))
# # # # self.quit_(F) # no hard feelings
# # # # #################################
# # # # # link processing #
# # # # #################################
# # # # def detach(self):
# # # # """ The individual quits its guru and its followers
# # # # """
# # # # for G in self.gurus.names(): self.quit_(G)
# # # # for F in self.followers.names(): F.quit_(self)
# # # # if self.gurus.names() != []: error("Alliances: recalcitrant guru")
# # # # if self.followers.names() != []: error("Alliances: sticky followers")
# # # # def consistency(self):
# # # # if self.gurus.size() > self.gurus.sizeMax():
# # # # error("Alliances", "too many gurus: %d" % self.gurus.size())
# # # # if self.followers.size() > self.followers.sizeMax():
# # # # error("Alliances", "too many followers: %d" % self.followers.size())
# # # # for F in self.followers.names():
# # # # if self not in F.gurus.names():
# # # # error("Alliances: non following followers")
# # # # if self == F: error("Alliances: Narcissism")
# # # # ## print self.ID, ' is in ', F.ID, "'s guru list: ", [G.ID for G in F.gurus.names()]
# # # # for G in self.gurus.names():
# # # # if self not in G.followers.names():
# # # # # print 'self: ',str(self), "self's gurus: ",Alliances.social_signature(self)
# # # # # print 'guru: ',str(G), 'its followers: ',[str(F) for F in G.followers.names()]
# # # # error("Alliances: unaware guru")
# # # # if self == G: error("Alliances: narcissism")
# # # # ## print self.ID, ' is in ', G.ID, "'s follower list: ", [F.ID for F in G.followers.names()]
# # # # ## print '\t', self.ID, ' OK'
# # # # if self.gurus.size() > 0:
# # # # if not self.gurus.friends.present((self.gurus.best(), self.gurus.friends.maximal())):
# # # # error("Alliances: best guru is ghost")
# # # # def social_signature(self):
# # # # ## return [F.ID for F in self.gurus.names()]
# # # # return self.gurus.Friends()
# # # # def signature(self): return self.social_signature()
###############################
# Local Test #
###############################
if __name__ == "__main__":
print(__doc__ + '\n')
print(Friend.__doc__ + '\n\n')
raw_input('[Return]')
__author__ = 'Dessalles'
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
29113,
29113,
7804,
4242,
2235,
198,
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
29113,
29113,
7804,
4242,
2235,
198,
2,
8696,
3535,
29150,
220,
2638,
1378,
1990,
349,
901,
13,
46813,
785,
12,
1845,
271,
13,
8310,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11320,
12,
32117,
360,
408,
439,
274,
220,
1303,
198,
2,
44021,
6342,
220,
33448,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7324,
13,
67,
408,
439,
274,
13,
8310,
220,
1303,
198,
2,
16529,
35937,
1303,
198,
2,
13789,
25,
220,
17404,
13815,
11050,
12,
7792,
12,
4090,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
29113,
29113,
7804,
4242,
2235,
628,
198,
29113,
29113,
7804,
4242,
2235,
198,
2,
220,
1439,
16097,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
29113,
29113,
7804,
4242,
2235,
198,
198,
37811,
8696,
3535,
29150,
25,
19937,
1439,
16097,
25,
198,
197,
197,
35392,
82,
16955,
428,
1398,
198,
197,
197,
4758,
15947,
508,
318,
1545,
351,
4150,
198,
37811,
198,
198,
11748,
25064,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
220,
25064,
13,
6978,
13,
33295,
10786,
40720,
492,
11537,
220,
1303,
329,
5254,
628,
198,
6738,
4319,
349,
901,
13,
33637,
13,
33637,
1330,
4049,
198,
198,
4871,
3430,
25,
198,
197,
37811,
1398,
3430,
25,
1351,
286,
3925,
3917,
351,
511,
2854,
13,
198,
197,
197,
464,
2854,
318,
973,
284,
5409,
508,
3011,
36620,
351,
4150,
13,
198,
197,
37811,
198,
197,
197,
198,
197,
2,
825,
1866,
7,
944,
2599,
197,
7783,
2116,
13,
834,
30814,
628,
197,
4299,
10926,
7,
944,
2599,
198,
197,
197,
1,
5860,
262,
10926,
2854,
1871,
1866,
366,
198,
197,
197,
361,
2116,
13,
7857,
33529,
197,
7783,
949,
26933,
51,
58,
16,
60,
329,
309,
287,
2116,
12962,
198,
197,
197,
7783,
532,
16,
628,
197,
4299,
40708,
7,
944,
2599,
198,
197,
197,
1,
5860,
262,
40708,
2854,
1871,
1866,
366,
197,
197,
198,
197,
197,
361,
2116,
13,
7857,
33529,
197,
7783,
3509,
26933,
51,
58,
16,
60,
329,
309,
287,
2116,
12962,
198,
197,
197,
7783,
532,
16,
628,
197,
4299,
1266,
7,
944,
2599,
198,
197,
197,
1,
5860,
262,
2888,
351,
262,
1266,
2854,
366,
198,
197,
197,
2,
611,
2116,
13,
7857,
33529,
197,
7783,
2116,
13,
24071,
3419,
58,
15,
60,
198,
197,
197,
2,
611,
2116,
13,
7857,
33529,
197,
7783,
3509,
26933,
51,
329,
309,
287,
2116,
13,
834,
30814,
4357,
1994,
28,
50033,
2124,
25,
2124,
58,
16,
12962,
58,
15,
60,
198,
197,
197,
361,
2116,
13,
7857,
33529,
197,
7783,
3509,
7,
944,
11,
1994,
28,
50033,
2124,
25,
2124,
58,
16,
12962,
58,
15,
60,
198,
197,
197,
7783,
6045,
628,
197,
4299,
5290,
7,
944,
2599,
198,
197,
197,
1,
5860,
262,
2888,
351,
262,
5290,
2854,
366,
198,
197,
197,
361,
2116,
13,
7857,
33529,
197,
7783,
2116,
13,
24071,
3419,
58,
12,
16,
60,
198,
197,
197,
7783,
6045,
628,
197,
4299,
18178,
7,
944,
11,
2854,
11,
5940,
28,
17821,
2599,
198,
197,
197,
1,
10425,
326,
262,
649,
1981,
460,
307,
6292,
656,
262,
3430,
366,
198,
197,
197,
361,
2116,
13,
7857,
3419,
18189,
2116,
13,
7857,
11518,
25,
198,
197,
197,
197,
361,
5940,
290,
2854,
19841,
2116,
13,
1084,
4402,
33529,
198,
197,
197,
197,
197,
7783,
532,
16,
220,
220,
1303,
10537,
25,
8475,
1813,
284,
1966,
1866,
198,
197,
197,
197,
417,
361,
2854,
1279,
2116,
13,
1084,
4402,
33529,
197,
7783,
532,
16,
198,
197,
197,
2,
8024,
262,
4279,
326,
262,
4540,
561,
307,
8686,
198,
197,
197,
2,
220,
1441,
23243,
26933,
26585,
60,
1343,
2116,
13,
525,
687,
1817,
22784,
50188,
28,
17821,
737,
9630,
7,
26585,
8,
198,
197,
197,
43027,
796,
2116,
13,
7857,
3419,
532,
23243,
26933,
26585,
60,
1343,
2116,
13,
525,
687,
1817,
3419,
737,
9630,
7,
26585,
8,
198,
197,
197,
361,
4279,
19841,
2116,
13,
7857,
11518,
25,
197,
7783,
4279,
198,
197,
197,
18224,
10786,
3237,
16097,
3256,
705,
13635,
11537,
628,
197,
4299,
30151,
7,
944,
11,
1468,
27608,
2599,
198,
197,
197,
1,
257,
2888,
2925,
503,
422,
262,
3430,
366,
198,
197,
197,
1640,
357,
44,
11,
5990,
69,
8,
287,
2116,
13,
834,
30814,
58,
25,
5974,
220,
1303,
3338,
284,
4866,
262,
1351,
355,
340,
318,
3421,
1626,
262,
9052,
198,
197,
197,
197,
361,
337,
6624,
1468,
27608,
25,
198,
197,
197,
197,
197,
944,
13,
834,
30814,
13,
28956,
19510,
727,
27608,
11,
5990,
69,
4008,
198,
197,
197,
197,
197,
7783,
6407,
198,
197,
197,
4798,
10786,
1069,
3902,
25,
4064,
82,
6,
4064,
965,
7,
727,
27608,
4008,
198,
197,
197,
18224,
10786,
3237,
16097,
25,
1729,
12,
19522,
9361,
284,
11238,
257,
3430,
11537,
198,
197,
197,
7783,
10352,
628,
197,
4299,
34992,
7,
944,
11,
27929,
796,
657,
13,
24,
2599,
220,
1303,
8584,
1988,
198,
197,
197,
1,
477,
13289,
389,
5322,
357,
7856,
6629,
21964,
29337,
8,
220,
366,
198,
197,
197,
1640,
357,
44,
11,
5990,
69,
8,
287,
2116,
13,
834,
30814,
58,
25,
5974,
220,
1303,
3338,
284,
4866,
262,
1351,
355,
340,
318,
3421,
1626,
262,
9052,
198,
197,
197,
197,
944,
13,
834,
30814,
13,
28956,
19510,
44,
11,
2448,
69,
4008,
198,
197,
197,
197,
944,
13,
834,
30814,
13,
33295,
19510,
44,
11,
2448,
69,
1635,
27929,
4008,
198,
198,
4871,
9182,
25,
198,
197,
37811,
197,
4871,
9182,
25,
15738,
281,
1981,
338,
936,
80,
2913,
1817,
220,
198,
197,
37811,
198,
197,
198,
197,
29113,
2,
198,
197,
2,
30372,
34546,
6117,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
197,
29113,
2,
198,
197,
198,
197,
4299,
8349,
540,
7,
944,
11,
376,
62,
525,
69,
11,
5940,
28,
17821,
2599,
198,
197,
197,
1,
47719,
1771,
26218,
318,
1744,
366,
198,
197,
197,
7783,
197,
944,
13,
36154,
13,
13635,
82,
7,
37,
62,
525,
69,
11,
5940,
28,
43218,
8,
18189,
657,
628,
197,
4299,
1061,
7,
944,
11,
376,
11,
376,
62,
525,
69,
11,
5940,
28,
17821,
11,
48887,
28,
14202,
2599,
198,
197,
197,
37811,
262,
1981,
3382,
284,
307,
376,
338,
35567,
2233,
284,
376,
338,
2854,
198,
197,
197,
37811,
198,
197,
197,
2,
3601,
2116,
13,
2389,
11,
366,
86,
1187,
284,
5679,
1600,
357,
37,
13,
2389,
11,
376,
62,
525,
69,
8,
198,
197,
197,
361,
2116,
13,
2001,
2403,
540,
7,
37,
62,
525,
69,
11,
5940,
28,
43218,
2599,
198,
197,
197,
197,
2,
262,
649,
1545,
318,
922,
1576,
198,
197,
197,
197,
32754,
796,
2116,
13,
36154,
13,
298,
364,
7,
37,
11,
376,
62,
525,
69,
11,
5940,
28,
43218,
8,
197,
2,
5860,
38632,
1468,
1545,
198,
197,
197,
197,
361,
20445,
318,
407,
6045,
25,
198,
197,
197,
197,
197,
2,
3601,
10786,
445,
917,
415,
1545,
286,
4064,
82,
25,
4064,
82,
6,
4064,
357,
944,
11,
20445,
4008,
198,
197,
197,
197,
197,
2,
3601,
10786,
944,
25,
4064,
82,
6,
4064,
2116,
11,
366,
33409,
2116,
338,
2460,
25,
4064,
82,
366,
4064,
3975,
7,
2536,
11,
9182,
13,
14557,
62,
12683,
1300,
7,
944,
22305,
198,
197,
197,
197,
197,
361,
48887,
318,
6045,
25,
48887,
796,
2116,
13,
47391,
62,
198,
197,
197,
197,
197,
4507,
270,
7,
32754,
8,
220,
220,
1303,
617,
30806,
1545,
318,
595,
11990,
198,
197,
197,
197,
7783,
6407,
198,
197,
197,
17772,
25,
197,
7783,
10352,
198,
197,
197,
2,
371,
796,
9182,
287,
2116,
13,
36154,
13,
14933,
3419,
198,
197,
197,
2,
611,
371,
25,
3601,
2116,
13,
2389,
11,
705,
271,
1541,
1708,
3256,
9182,
13,
2389,
198,
197,
198,
197,
4299,
11238,
41052,
944,
11,
9182,
28,
14202,
2599,
198,
197,
197,
37811,
262,
1981,
645,
2392,
5679,
663,
1545,
198,
197,
197,
37811,
198,
197,
197,
361,
9182,
318,
6045,
25,
9182,
796,
2116,
13,
36154,
13,
41430,
3419,
198,
197,
197,
361,
9182,
318,
407,
6045,
25,
198,
197,
197,
197,
2,
3601,
7,
944,
11,
705,
421,
896,
46083,
9182,
8,
198,
197,
197,
197,
944,
13,
36154,
13,
1069,
896,
7,
23331,
8,
628,
197,
4299,
2198,
26245,
7,
944,
11,
9931,
22203,
28,
14202,
2599,
198,
197,
197,
1,
5992,
6117,
416,
32012,
2460,
326,
389,
3750,
366,
198,
197,
197,
1640,
376,
287,
2116,
25,
198,
197,
197,
197,
361,
407,
9931,
22203,
7,
37,
2599,
197,
944,
13,
47391,
41052,
37,
8,
198,
197,
197,
198,
197,
4299,
48224,
7,
944,
2599,
198,
197,
197,
37811,
383,
1981,
627,
896,
477,
663,
2460,
197,
37811,
198,
197,
197,
1640,
376,
287,
2116,
25,
197,
944,
13,
47391,
41052,
37,
8,
198,
197,
197,
198,
197,
29113,
2,
198,
197,
2,
23606,
34546,
6117,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
197,
29113,
2,
198,
197,
198,
197,
4299,
651,
62,
6726,
7,
944,
11,
33085,
11,
35532,
11,
35532,
9362,
263,
2599,
198,
197,
197,
1,
47719,
13584,
13427,
878,
15010,
14738,
366,
198,
197,
197,
361,
2116,
13,
43561,
2913,
540,
7,
9362,
263,
11,
35532,
11,
35532,
9362,
263,
2599,
198,
197,
197,
197,
361,
407,
2116,
13,
27780,
7,
7841,
1008,
11,
35532,
9362,
263,
11,
48887,
28,
944,
13,
437,
62,
6726,
6720,
2599,
198,
197,
197,
197,
197,
18224,
7203,
23331,
25,
2116,
3421,
2000,
4943,
198,
197,
197,
197,
361,
407,
35532,
13,
27780,
7,
944,
11,
33085,
11,
48887,
28,
7841,
1008,
13,
437,
62,
6726,
6720,
2599,
198,
197,
197,
197,
197,
18224,
7203,
23331,
25,
35532,
3421,
2000,
4943,
198,
197,
197,
197,
7783,
6407,
198,
197,
197,
7783,
10352,
198,
197,
197,
198,
197,
4299,
36620,
7,
944,
11,
35532,
2599,
198,
197,
197,
1,
976,
355,
651,
62,
6726,
14,
18,
351,
645,
2854,
366,
198,
197,
197,
7783,
2116,
13,
1136,
62,
6726,
7,
15,
11,
35532,
11,
657,
8,
198,
197,
197,
198,
197,
4299,
886,
62,
6726,
6720,
7,
944,
11,
35532,
2599,
198,
197,
197,
1,
14205,
4781,
1123,
584,
422,
511,
2209,
1492,
366,
198,
197,
197,
2,
3601,
10786,
59,
5907,
489,
2535,
510,
3256,
2116,
13,
2389,
11,
35532,
13,
2389,
8,
198,
197,
197,
944,
13,
47391,
41052,
7841,
1008,
8,
198,
197,
197,
7841,
1008,
13,
47391,
41052,
944,
8,
628,
197,
4299,
6044,
3237,
7,
944,
2599,
198,
197,
197,
37811,
383,
1981,
627,
896,
663,
2460,
197,
37811,
198,
197,
197,
1640,
376,
287,
2116,
25,
197,
944,
13,
437,
62,
6726,
6720,
7,
37,
8,
198,
198,
4871,
376,
47030,
7,
23331,
2599,
198,
197,
37811,
2447,
12061,
2196,
286,
14213,
329,
30372,
34546,
6117,
532,
24020,
705,
3237,
16097,
4458,
198,
197,
197,
6,
37,
47030,
6,
287,
3090,
4206,
546,
508,
318,
1708,
2116,
198,
197,
37811,
198,
197,
198,
197,
4299,
376,
62,
2001,
2403,
540,
7,
944,
11,
23035,
11,
38749,
11,
402,
62,
525,
69,
11,
5940,
28,
17821,
2599,
198,
197,
197,
1,
47719,
1771,
26218,
318,
1744,
366,
198,
197,
197,
32,
796,
2116,
13,
2001,
2403,
540,
7,
38,
62,
525,
69,
11,
5940,
28,
43218,
8,
197,
2,
38749,
318,
10909,
290,
2644,
198,
197,
197,
361,
2116,
13,
27780,
364,
318,
407,
6045,
25,
197,
198,
197,
197,
197,
32,
1222,
28,
38749,
13,
27780,
364,
13,
2001,
2403,
540,
7,
525,
69,
11,
5940,
28,
43218,
8,
197,
2,
2644,
944,
10909,
284,
38749,
198,
197,
197,
7783,
317,
198,
197,
198,
197,
4299,
376,
62,
27780,
7,
944,
11,
23035,
11,
402,
11,
402,
62,
525,
69,
11,
5940,
28,
17821,
2599,
198,
197,
197,
37811,
262,
1981,
3382,
284,
307,
402,
338,
35567,
780,
286,
617,
286,
402,
338,
2854,
198,
197,
197,
197,
38,
743,
13446,
262,
1981,
338,
2854,
1165,
198,
197,
197,
37811,
198,
197,
197,
2,
3601,
705,
2637,
11,
198,
197,
197,
361,
2116,
13,
37,
62,
2001,
2403,
540,
7,
525,
69,
11,
402,
11,
402,
62,
525,
69,
11,
5940,
28,
43218,
2599,
198,
197,
197,
197,
2,
40103,
262,
649,
35730,
318,
922,
1576,
290,
262,
1981,
318,
922,
1576,
329,
262,
35730,
198,
197,
197,
197,
2,
3601,
10786,
4,
82,
37633,
82,
8,
318,
546,
284,
1061,
4064,
82,
37633,
82,
33047,
4064,
357,
944,
11,
1351,
7,
8899,
7,
2536,
11,
2116,
13,
14557,
62,
12683,
1300,
28955,
828,
402,
11,
1351,
7,
8899,
7,
2536,
11,
402,
13,
14557,
62,
12683,
1300,
3419,
35514,
198,
197,
197,
197,
361,
407,
2116,
13,
27780,
7,
38,
11,
402,
62,
525,
69,
11,
5940,
28,
43218,
11,
48887,
28,
944,
13,
38,
62,
47391,
62,
2599,
198,
197,
197,
197,
197,
18224,
7203,
3237,
16097,
1600,
366,
1939,
684,
7609,
35730,
4943,
198,
197,
197,
197,
361,
402,
13,
27780,
364,
318,
407,
6045,
25,
197,
198,
197,
197,
197,
197,
361,
407,
402,
13,
27780,
364,
13,
27780,
7,
944,
11,
23035,
11,
5940,
28,
43218,
11,
48887,
28,
38,
13,
37,
62,
47391,
62,
2599,
198,
197,
197,
197,
197,
197,
18224,
10786,
3237,
16097,
3256,
366,
1939,
684,
7609,
2116,
4943,
198,
197,
197,
197,
197,
2,
2116,
13,
5936,
396,
1387,
3419,
198,
197,
197,
197,
197,
2,
402,
13,
5936,
396,
1387,
3419,
198,
197,
197,
197,
7783,
6407,
198,
197,
197,
17772,
25,
197,
7783,
10352,
628,
197,
4299,
402,
62,
47391,
41052,
944,
11,
38749,
2599,
198,
197,
197,
37811,
262,
1981,
645,
2392,
5679,
663,
35730,
198,
197,
197,
37811,
198,
197,
197,
2,
2116,
13,
5936,
396,
1387,
3419,
198,
197,
197,
2,
38749,
13,
5936,
396,
1387,
3419,
198,
197,
197,
944,
13,
47391,
41052,
38,
14717,
8,
198,
197,
197,
361,
38749,
13,
27780,
364,
318,
407,
6045,
25,
220,
197,
38,
14717,
13,
27780,
364,
13,
47391,
41052,
944,
8,
628,
197,
4299,
376,
62,
47391,
41052,
944,
11,
376,
47030,
2599,
198,
197,
197,
37811,
262,
1981,
857,
407,
765,
663,
35567,
597,
2392,
198,
197,
197,
37811,
198,
197,
197,
361,
2116,
13,
27780,
364,
318,
407,
6045,
25,
220,
197,
198,
197,
197,
197,
944,
13,
27780,
364,
13,
47391,
41052,
37,
47030,
8,
198,
197,
197,
197,
37,
47030,
13,
47391,
41052,
944,
8,
198,
197,
197,
17772,
25,
197,
18224,
10786,
3237,
16097,
3256,
705,
2949,
376,
47030,
16014,
11537,
628,
197,
4299,
651,
62,
6726,
7,
944,
11,
33085,
11,
35532,
11,
35532,
9362,
263,
2599,
198,
197,
197,
1,
47719,
13584,
13427,
878,
15010,
14738,
366,
198,
197,
197,
361,
2116,
13,
43561,
2913,
540,
7,
9362,
263,
11,
35532,
11,
35532,
9362,
263,
2599,
198,
197,
197,
197,
361,
407,
2116,
13,
37,
62,
27780,
7,
9362,
263,
11,
35532,
11,
35532,
9362,
263,
2599,
198,
197,
197,
197,
197,
18224,
7203,
23331,
25,
2116,
3421,
2000,
4943,
198,
197,
197,
197,
361,
407,
35532,
13,
37,
62,
27780,
7,
7841,
1008,
9362,
263,
11,
2116,
11,
33085,
2599,
198,
197,
197,
197,
197,
18224,
7203,
23331,
25,
35532,
3421,
2000,
4943,
198,
197,
197,
197,
7783,
6407,
198,
197,
197,
7783,
10352,
198,
197,
197,
198,
197,
4299,
886,
62,
6726,
6720,
7,
944,
11,
35532,
2599,
198,
197,
197,
1,
14205,
4781,
1123,
584,
422,
511,
2209,
1492,
366,
198,
197,
197,
2,
3601,
10786,
59,
5907,
489,
2535,
510,
3256,
2116,
13,
2389,
11,
35532,
13,
2389,
8,
198,
197,
197,
2,
3601,
7,
944,
13,
5936,
396,
1387,
22784,
35532,
13,
5936,
396,
1387,
28955,
197,
197,
198,
197,
197,
944,
13,
38,
62,
47391,
41052,
7841,
1008,
8,
198,
197,
197,
7841,
1008,
13,
38,
62,
47391,
41052,
944,
8,
628,
197,
4299,
48224,
7,
944,
2599,
198,
197,
197,
37811,
383,
1981,
627,
896,
663,
35730,
290,
663,
10569,
198,
197,
197,
37811,
198,
197,
197,
1640,
402,
287,
2116,
13,
14933,
33529,
197,
197,
944,
13,
38,
62,
47391,
41052,
38,
8,
197,
2,
402,
318,
33588,
422,
2116,
338,
35730,
1351,
198,
197,
197,
361,
2116,
13,
14933,
3419,
14512,
685,
5974,
197,
197,
18224,
7203,
3237,
16097,
25,
42653,
47992,
5250,
35730,
4943,
198,
197,
197,
361,
2116,
13,
27780,
364,
318,
407,
6045,
25,
198,
197,
197,
197,
1640,
376,
287,
2116,
13,
27780,
364,
13,
14933,
33529,
197,
944,
13,
37,
62,
47391,
41052,
37,
8,
197,
2,
2116,
318,
33588,
422,
376,
338,
35730,
1351,
198,
197,
197,
197,
361,
2116,
13,
27780,
364,
13,
14933,
3419,
14512,
685,
5974,
197,
18224,
7203,
3237,
16097,
25,
23408,
220,
10569,
4943,
198,
197,
197,
198,
2,
1303,
1303,
1303,
1398,
1439,
16097,
7,
15252,
2599,
198,
197,
2,
1303,
1303,
1303,
37227,
197,
4871,
1439,
16097,
25,
1123,
5797,
7000,
1111,
663,
308,
31891,
290,
663,
10569,
220,
198,
197,
197,
2,
1303,
1303,
1303,
357,
1212,
318,
281,
1468,
1398,
11,
4030,
329,
17764,
357,
392,
407,
6789,
8,
197,
37811,
628,
197,
2,
1303,
1303,
1303,
825,
11593,
15003,
834,
7,
944,
11,
5436,
38,
31891,
11,
5436,
7155,
364,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
2116,
13,
70,
31891,
796,
9182,
7,
11518,
38,
31891,
8,
198,
197,
197,
2,
1303,
1303,
1303,
2116,
13,
27780,
364,
796,
9182,
7,
11518,
7155,
364,
8,
628,
197,
2,
1303,
1303,
1303,
1303,
29113,
198,
197,
2,
1303,
1303,
1303,
1303,
38958,
6117,
197,
197,
197,
2,
198,
197,
2,
1303,
1303,
1303,
1303,
29113,
198,
197,
198,
197,
2,
1303,
1303,
1303,
825,
8349,
540,
7,
944,
11,
23035,
11,
38749,
11,
402,
62,
525,
69,
11,
5940,
28,
17821,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
366,
47719,
1771,
26218,
318,
1744,
366,
198,
197,
197,
2,
1303,
1303,
1303,
1441,
197,
944,
13,
70,
31891,
13,
2001,
2403,
540,
7,
38,
62,
525,
69,
11,
5940,
28,
43218,
8,
3467,
198,
197,
197,
197,
2,
1303,
1303,
1303,
290,
197,
38,
14717,
13,
27780,
364,
13,
2001,
2403,
540,
7,
525,
69,
11,
5940,
28,
43218,
8,
198,
197,
198,
197,
2,
1303,
1303,
1303,
825,
1061,
7,
944,
11,
23035,
11,
402,
11,
402,
62,
525,
69,
11,
5940,
28,
17821,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
37227,
262,
1981,
3382,
284,
307,
402,
338,
35567,
780,
286,
617,
286,
402,
338,
2854,
198,
197,
197,
197,
2,
1303,
1303,
1303,
402,
743,
13446,
262,
1981,
338,
2854,
1165,
198,
197,
197,
2,
1303,
1303,
1303,
37227,
198,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
13,
2001,
2403,
540,
7,
525,
69,
11,
402,
11,
402,
62,
525,
69,
11,
5940,
28,
43218,
2599,
198,
197,
197,
197,
2,
1303,
1303,
1303,
1303,
262,
649,
35730,
318,
922,
1576,
290,
262,
1981,
318,
922,
1576,
329,
262,
35730,
198,
197,
197,
197,
2,
1303,
1303,
1303,
2116,
13,
70,
31891,
13,
27780,
7,
38,
11,
402,
62,
525,
69,
11,
5940,
28,
43218,
11,
48887,
28,
944,
13,
47391,
62,
8,
198,
197,
197,
197,
2,
1303,
1303,
1303,
402,
13,
27780,
364,
13,
27780,
7,
944,
11,
23035,
11,
5940,
28,
43218,
11,
48887,
28,
38,
13,
47391,
62,
8,
198,
197,
197,
197,
2,
1303,
1303,
1303,
1441,
6407,
198,
197,
197,
2,
1303,
1303,
1303,
2073,
25,
197,
7783,
10352,
628,
197,
2,
1303,
1303,
1303,
825,
11238,
41052,
944,
11,
38749,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
37227,
262,
1981,
645,
2392,
5679,
663,
35730,
198,
197,
197,
2,
1303,
1303,
1303,
37227,
198,
197,
197,
2,
1303,
1303,
1303,
38749,
13,
27780,
364,
13,
47391,
41052,
944,
8,
198,
197,
197,
2,
1303,
1303,
1303,
2116,
13,
70,
31891,
13,
47391,
41052,
38,
14717,
8,
628,
197,
2,
1303,
1303,
1303,
825,
1266,
62,
6726,
7,
944,
2599,
197,
7783,
2116,
13,
70,
31891,
13,
13466,
62,
6726,
3419,
198,
197,
198,
197,
2,
1303,
1303,
1303,
825,
2460,
7,
944,
11,
6149,
28,
17821,
2599,
197,
7783,
2116,
13,
70,
31891,
13,
36705,
7,
24071,
28,
24071,
8,
628,
197,
2,
1303,
1303,
1303,
825,
299,
65,
36705,
7,
944,
2599,
197,
7783,
2116,
13,
70,
31891,
13,
46803,
36705,
3419,
628,
197,
2,
1303,
1303,
1303,
825,
299,
65,
7155,
364,
7,
944,
2599,
197,
7783,
2116,
13,
27780,
364,
13,
46803,
36705,
3419,
628,
197,
2,
1303,
1303,
1303,
825,
1342,
3101,
62,
6726,
6720,
7,
944,
11,
27929,
28,
15,
13,
24,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
2116,
13,
70,
31891,
13,
1203,
3101,
62,
6726,
6720,
7,
41384,
8,
197,
197,
197,
197,
197,
628,
197,
2,
1303,
1303,
1303,
825,
6044,
3237,
7,
944,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
2116,
13,
70,
31891,
13,
1640,
1136,
3237,
3419,
198,
197,
197,
2,
1303,
1303,
1303,
2116,
13,
27780,
364,
13,
1640,
1136,
3237,
3419,
628,
197,
2,
1303,
1303,
1303,
1303,
29113,
198,
197,
2,
1303,
1303,
1303,
1303,
23606,
34546,
6117,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
197,
2,
1303,
1303,
1303,
1303,
29113,
198,
197,
198,
197,
2,
1303,
1303,
1303,
825,
24852,
540,
7,
944,
11,
35532,
11,
15138,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
1441,
2116,
13,
2001,
2403,
540,
7,
45776,
11,
35532,
11,
15138,
8,
290,
35532,
13,
2001,
2403,
540,
7,
45776,
11,
2116,
11,
15138,
8,
198,
197,
198,
197,
2,
1303,
1303,
1303,
825,
651,
62,
6726,
7,
944,
11,
33085,
11,
35532,
11,
8229,
28,
14202,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
366,
47719,
13584,
13427,
878,
15010,
14738,
366,
198,
197,
197,
2,
1303,
1303,
1303,
611,
8229,
318,
6045,
25,
197,
13615,
796,
33085,
198,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
13,
2001,
2403,
540,
7,
9362,
263,
11,
35532,
11,
8229,
8,
290,
35532,
13,
2001,
2403,
540,
7,
13615,
11,
2116,
11,
33085,
2599,
198,
197,
197,
197,
2,
1303,
1303,
1303,
2116,
13,
27780,
7,
9362,
263,
11,
35532,
11,
8229,
8,
198,
197,
197,
197,
2,
1303,
1303,
1303,
35532,
13,
27780,
7,
13615,
11,
2116,
11,
33085,
8,
198,
197,
197,
197,
2,
1303,
1303,
1303,
1441,
6407,
198,
197,
197,
2,
1303,
1303,
1303,
1441,
10352,
198,
197,
198,
197,
2,
1303,
1303,
1303,
825,
1266,
62,
6726,
62,
1837,
3020,
11973,
7,
944,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
366,
47719,
1771,
2116,
318,
663,
1266,
1545,
338,
1545,
366,
198,
197,
197,
2,
1303,
1303,
1303,
41646,
796,
2116,
13,
13466,
62,
6726,
3419,
198,
197,
197,
2,
1303,
1303,
1303,
611,
41646,
25,
220,
1441,
2116,
6624,
41646,
13,
13466,
62,
6726,
3419,
198,
197,
197,
2,
1303,
1303,
1303,
1441,
10352,
198,
197,
198,
197,
2,
1303,
1303,
1303,
825,
11169,
62,
1837,
3020,
11973,
7,
944,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
366,
27433,
1654,
326,
2116,
318,
663,
2460,
6,
1545,
532,
49511,
329,
23606,
76,
2213,
605,
2316,
366,
198,
197,
197,
2,
1303,
1303,
1303,
329,
376,
287,
2116,
13,
70,
31891,
13,
14933,
3419,
58,
25,
5974,
197,
1303,
761,
284,
4866,
262,
1351,
11,
355,
340,
318,
9518,
1626,
262,
9052,
198,
197,
197,
197,
2,
1303,
1303,
1303,
1303,
4798,
705,
41004,
40686,
329,
4064,
67,
6,
4064,
376,
13,
2389,
11,
376,
13,
70,
31891,
13,
14933,
3419,
198,
197,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
407,
287,
376,
13,
70,
31891,
13,
14933,
33529,
198,
197,
197,
197,
197,
2,
1303,
1303,
1303,
3601,
10786,
4,
82,
627,
896,
4064,
82,
25998,
9,
220,
780,
13717,
422,
4064,
82,
6,
4064,
357,
944,
13,
2389,
11,
376,
13,
2389,
11,
965,
7,
37,
13,
70,
31891,
13,
14933,
3419,
22305,
198,
197,
197,
197,
197,
2,
1303,
1303,
1303,
2116,
13,
47391,
41052,
37,
8,
220,
220,
1303,
645,
1327,
7666,
220,
628,
197,
197,
198,
197,
2,
1303,
1303,
1303,
1303,
29113,
198,
197,
2,
1303,
1303,
1303,
1303,
2792,
7587,
197,
197,
197,
220,
220,
1303,
198,
197,
2,
1303,
1303,
1303,
1303,
29113,
198,
197,
2,
1303,
1303,
1303,
825,
48224,
7,
944,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
37227,
383,
1981,
627,
896,
663,
35730,
290,
663,
10569,
198,
197,
197,
2,
1303,
1303,
1303,
37227,
198,
197,
197,
2,
1303,
1303,
1303,
329,
402,
287,
2116,
13,
70,
31891,
13,
14933,
33529,
197,
197,
944,
13,
47391,
41052,
38,
8,
198,
197,
197,
2,
1303,
1303,
1303,
329,
376,
287,
2116,
13,
27780,
364,
13,
14933,
33529,
197,
37,
13,
47391,
41052,
944,
8,
198,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
13,
70,
31891,
13,
14933,
3419,
14512,
685,
5974,
197,
197,
18224,
7203,
3237,
16097,
25,
42653,
47992,
5250,
35730,
4943,
198,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
13,
27780,
364,
13,
14933,
3419,
14512,
685,
5974,
197,
18224,
7203,
3237,
16097,
25,
23408,
10569,
4943,
198,
197,
197,
198,
197,
2,
1303,
1303,
1303,
825,
15794,
7,
944,
2599,
198,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
13,
70,
31891,
13,
7857,
3419,
1875,
2116,
13,
70,
31891,
13,
7857,
11518,
33529,
198,
197,
197,
197,
2,
1303,
1303,
1303,
4049,
7203,
3237,
16097,
1600,
366,
18820,
867,
308,
31891,
25,
4064,
67,
1,
4064,
2116,
13,
70,
31891,
13,
7857,
28955,
198,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
13,
27780,
364,
13,
7857,
3419,
1875,
2116,
13,
27780,
364,
13,
7857,
11518,
33529,
198,
197,
197,
197,
2,
1303,
1303,
1303,
4049,
7203,
3237,
16097,
1600,
366,
18820,
867,
10569,
25,
4064,
67,
1,
4064,
2116,
13,
27780,
364,
13,
7857,
28955,
198,
197,
197,
2,
1303,
1303,
1303,
329,
376,
287,
2116,
13,
27780,
364,
13,
14933,
33529,
198,
197,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
407,
287,
376,
13,
70,
31891,
13,
14933,
33529,
198,
197,
197,
197,
197,
2,
1303,
1303,
1303,
4049,
7203,
3237,
16097,
25,
1729,
1708,
10569,
4943,
198,
197,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
6624,
376,
25,
197,
18224,
7203,
3237,
16097,
25,
31987,
747,
1042,
4943,
198,
2,
1303,
1303,
1303,
22492,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
2116,
13,
2389,
11,
705,
318,
287,
46083,
376,
13,
2389,
11,
24018,
82,
35730,
1351,
25,
33172,
685,
38,
13,
2389,
329,
402,
287,
376,
13,
70,
31891,
13,
14933,
3419,
60,
198,
197,
197,
2,
1303,
1303,
1303,
329,
402,
287,
2116,
13,
70,
31891,
13,
14933,
33529,
198,
197,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
407,
287,
402,
13,
27780,
364,
13,
14933,
33529,
198,
197,
197,
197,
197,
2,
1303,
1303,
1303,
1303,
3601,
705,
944,
25,
46083,
2536,
7,
944,
828,
366,
944,
338,
308,
31891,
25,
33172,
3237,
16097,
13,
14557,
62,
12683,
1300,
7,
944,
8,
198,
197,
197,
197,
197,
2,
1303,
1303,
1303,
1303,
3601,
705,
70,
14717,
25,
46083,
2536,
7,
38,
828,
705,
896,
10569,
25,
705,
17414,
2536,
7,
37,
8,
329,
376,
287,
402,
13,
27780,
364,
13,
14933,
3419,
60,
198,
197,
197,
197,
197,
2,
1303,
1303,
1303,
4049,
7203,
3237,
16097,
25,
17261,
35730,
4943,
198,
197,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
6624,
402,
25,
197,
18224,
7203,
3237,
16097,
25,
24753,
1042,
4943,
198,
2,
1303,
1303,
1303,
22492,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
2116,
13,
2389,
11,
705,
318,
287,
46083,
402,
13,
2389,
11,
24018,
82,
33040,
1351,
25,
33172,
685,
37,
13,
2389,
329,
376,
287,
402,
13,
27780,
364,
13,
14933,
3419,
60,
198,
2,
1303,
1303,
1303,
22492,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
59,
83,
3256,
2116,
13,
2389,
11,
705,
7477,
6,
198,
197,
197,
2,
1303,
1303,
1303,
611,
2116,
13,
70,
31891,
13,
7857,
3419,
1875,
657,
25,
198,
197,
197,
197,
2,
1303,
1303,
1303,
611,
407,
2116,
13,
70,
31891,
13,
36154,
13,
25579,
19510,
944,
13,
70,
31891,
13,
13466,
22784,
2116,
13,
70,
31891,
13,
36154,
13,
9806,
4402,
28955,
2599,
198,
197,
197,
197,
197,
197,
2,
1303,
1303,
1303,
4049,
7203,
3237,
16097,
25,
1266,
35730,
318,
10905,
4943,
628,
197,
2,
1303,
1303,
1303,
825,
1919,
62,
12683,
1300,
7,
944,
2599,
198,
2,
1303,
1303,
1303,
22492,
220,
220,
220,
220,
220,
220,
220,
1441,
685,
37,
13,
2389,
329,
376,
287,
2116,
13,
70,
31891,
13,
14933,
3419,
60,
198,
197,
197,
2,
1303,
1303,
1303,
1441,
2116,
13,
70,
31891,
13,
36705,
3419,
198,
197,
197,
197,
198,
197,
2,
1303,
1303,
1303,
825,
9877,
7,
944,
2599,
197,
7783,
2116,
13,
14557,
62,
12683,
1300,
3419,
198,
197,
198,
14468,
7804,
4242,
21017,
198,
2,
10714,
6208,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
14468,
7804,
4242,
21017,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
197,
4798,
7,
834,
15390,
834,
1343,
705,
59,
77,
11537,
198,
197,
4798,
7,
23331,
13,
834,
15390,
834,
1343,
705,
59,
77,
59,
77,
11537,
198,
197,
1831,
62,
15414,
10786,
58,
13615,
60,
11537,
628,
198,
834,
9800,
834,
796,
705,
35,
408,
439,
274,
6,
198
] | 2.843316 | 5,042 |
#!//Users/tkirke/anaconda/bin/python
# -*- coding: utf-8 -*-
import re
import sys,os
import codecs
from math import sqrt,log
from scipy.io.wavfile import read,write
from scipy import signal
import numpy
import matplotlib
import pylab
from lame import *
# Remove chunks more -27 db down from peak to remove audio 'gaps'
# optional plot envelope
mp = re.compile('\.mp3')
files = []
show_plot = False
if (len(sys.argv) > 1):
files.append(sys.argv[1])
if (len(sys.argv) > 2): show_plot = True
else:
files = os.listdir('.')
debug = False
PB = open('mp3_levels.txt','w')
count = 0
for fil in files:
if (mp.search(fil)):
audio_in = decode_mp3(fil)
samples = len(audio_in)
seg = 1024
intvl = samples/seg
k = 0
minsig = 0
for i in xrange(intvl):
sum = 0.0
for j in xrange(seg):
s = float(audio_in[k])
sum += (s*s)
k = k+1
rms = sqrt(sum/seg)/16384.0
if (rms > 0): rms_db = 20.0*log(rms)/log(10.0)
if (rms_db < minsig):
minsig = rms_db
db10 = '%02d' % int(-minsig)
if (minsig > -20):
s = "Minimum level is -"+db10+" dB in "+str(seg)+" sample segments over "+str(0.1*int(samples/4410))+" seconds for "+fil
PB.write(s+"\n")
cmd = 'mv \"'+fil+"\" ./levels/"
os.system(cmd)
print s
PB.close()
| [
2,
0,
1003,
14490,
14,
30488,
343,
365,
14,
272,
330,
13533,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
302,
198,
11748,
25064,
11,
418,
198,
11748,
40481,
82,
198,
6738,
10688,
1330,
19862,
17034,
11,
6404,
198,
6738,
629,
541,
88,
13,
952,
13,
45137,
7753,
1330,
1100,
11,
13564,
198,
6738,
629,
541,
88,
1330,
6737,
198,
11748,
299,
32152,
198,
11748,
2603,
29487,
8019,
198,
11748,
279,
2645,
397,
198,
6738,
30248,
1330,
1635,
198,
198,
2,
17220,
22716,
517,
532,
1983,
20613,
866,
422,
9103,
284,
4781,
6597,
705,
70,
1686,
6,
198,
2,
11902,
7110,
22878,
198,
198,
3149,
796,
302,
13,
5589,
576,
10786,
17405,
3149,
18,
11537,
198,
198,
16624,
796,
17635,
198,
12860,
62,
29487,
796,
10352,
198,
361,
357,
11925,
7,
17597,
13,
853,
85,
8,
1875,
352,
2599,
198,
220,
220,
220,
3696,
13,
33295,
7,
17597,
13,
853,
85,
58,
16,
12962,
198,
220,
220,
220,
611,
357,
11925,
7,
17597,
13,
853,
85,
8,
1875,
362,
2599,
905,
62,
29487,
796,
6407,
198,
17772,
25,
198,
220,
220,
220,
3696,
796,
28686,
13,
4868,
15908,
10786,
2637,
8,
198,
198,
24442,
796,
10352,
198,
49079,
796,
1280,
10786,
3149,
18,
62,
46170,
13,
14116,
41707,
86,
11537,
198,
198,
9127,
796,
657,
198,
1640,
1226,
287,
3696,
25,
198,
220,
220,
220,
611,
357,
3149,
13,
12947,
7,
10379,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
6597,
62,
259,
796,
36899,
62,
3149,
18,
7,
10379,
8,
198,
220,
220,
220,
220,
220,
220,
220,
8405,
796,
18896,
7,
24051,
62,
259,
8,
198,
220,
220,
220,
220,
220,
220,
220,
384,
70,
796,
28119,
198,
220,
220,
220,
220,
220,
220,
220,
493,
19279,
796,
8405,
14,
325,
70,
198,
220,
220,
220,
220,
220,
220,
220,
479,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
23550,
328,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2124,
9521,
7,
600,
19279,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2160,
796,
657,
13,
15,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
474,
287,
2124,
9521,
7,
325,
70,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
796,
12178,
7,
24051,
62,
259,
58,
74,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2160,
15853,
357,
82,
9,
82,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
796,
479,
10,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
907,
796,
19862,
17034,
7,
16345,
14,
325,
70,
20679,
1433,
22842,
13,
15,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
357,
81,
907,
1875,
657,
2599,
374,
907,
62,
9945,
796,
1160,
13,
15,
9,
6404,
7,
81,
907,
20679,
6404,
7,
940,
13,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
357,
81,
907,
62,
9945,
1279,
23550,
328,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23550,
328,
796,
374,
907,
62,
9945,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
940,
796,
705,
4,
2999,
67,
6,
4064,
493,
32590,
42951,
328,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
42951,
328,
1875,
532,
1238,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
796,
366,
44046,
1241,
318,
532,
1,
10,
9945,
940,
10,
1,
30221,
287,
43825,
2536,
7,
325,
70,
47762,
1,
6291,
17894,
625,
43825,
2536,
7,
15,
13,
16,
9,
600,
7,
82,
12629,
14,
2598,
940,
4008,
10,
1,
4201,
329,
43825,
10379,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30524,
13,
13564,
7,
82,
10,
1,
59,
77,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23991,
796,
705,
76,
85,
19990,
6,
10,
10379,
10,
1,
7879,
24457,
46170,
30487,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
10057,
7,
28758,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
264,
198,
198,
49079,
13,
19836,
3419,
628,
628
] | 1.941489 | 752 |
""" Bills routes """
from flask import Blueprint, render_template, redirect, request, url_for, flash
from flask_login import login_required, current_user
from application import db
from .bill_forms import BillForm
from ..models import Bill
bills_bp = Blueprint('bills', __name__, url_prefix='/user',
template_folder='templates')
@bills_bp.route('/bills', methods=['GET', 'POST'])
@login_required
def bills_display():
""" Show and add bills """
bill_form = BillForm()
user_bills = Bill.query.filter_by(user_id=str(current_user.id)).all()
total_amount_due = round(
sum([bill.bill_amount for bill in user_bills if bill.is_paid == 'Not Paid']), 2)
if bill_form.validate_on_submit():
new_bill = Bill(bill_name=bill_form.bill_name.data,
bill_due_date=bill_form.bill_due_date.data, bill_amount=bill_form.bill_amount.data, user_id=str(current_user.id))
db.session.add(new_bill)
db.session.commit()
flash('Successfully added bill', 'success')
return redirect(url_for('bills.bills_display'))
return render_template('bills/bills.jinja', bill_form=bill_form, bills=user_bills, total_amount_due=total_amount_due)
@bills_bp.route('/bills/paid', methods=['POST'])
@login_required
def mark_bill_paid():
""" Marks a bill as paid """
bill_ids = request.json['idArr']
for id in bill_ids:
bill = Bill.query.get(id)
if bill.is_paid == 'Not Paid':
bill.is_paid = 'Paid'
else:
bill.is_paid = 'Not Paid'
db.session.commit()
return {"msg": "success"}
@bills_bp.route('/bills/edit/<bill_id>', methods=['GET', 'POST'])
@login_required
def edit_bill(bill_id):
""" Handle bill edit """
bill = Bill.query.get(bill_id)
bill_form = BillForm(obj=bill)
if bill_form.validate_on_submit():
bill.bill_name = bill_form.bill_name.data
bill.bill_due_date = bill_form.bill_due_date.data
bill.bill_amount = bill_form.bill_amount.data
db.session.commit()
flash('Successfully edited bill', 'info')
return redirect(url_for('bills.bills_display'))
return render_template('bills/edit_bill.jinja', form=bill_form, bill=bill)
@bills_bp.route('/bills/delete', methods=['POST'])
@login_required
def delete_bills():
""" Handle bill deletion """
bill_ids = request.json['idArr']
for id in bill_ids:
bill = Bill.query.get(id)
db.session.delete(bill)
db.session.commit()
flash('Bill successfully deleted', 'warning')
return {"msg": "success"}
| [
37811,
20209,
11926,
37227,
198,
198,
6738,
42903,
1330,
39932,
11,
8543,
62,
28243,
11,
18941,
11,
2581,
11,
19016,
62,
1640,
11,
7644,
198,
6738,
42903,
62,
38235,
1330,
17594,
62,
35827,
11,
1459,
62,
7220,
198,
6738,
3586,
1330,
20613,
198,
6738,
764,
35546,
62,
23914,
1330,
3941,
8479,
198,
6738,
11485,
27530,
1330,
3941,
198,
198,
65,
2171,
62,
46583,
796,
39932,
10786,
65,
2171,
3256,
11593,
3672,
834,
11,
19016,
62,
40290,
11639,
14,
7220,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11055,
62,
43551,
11639,
11498,
17041,
11537,
628,
198,
31,
65,
2171,
62,
46583,
13,
38629,
10786,
14,
65,
2171,
3256,
5050,
28,
17816,
18851,
3256,
705,
32782,
6,
12962,
198,
31,
38235,
62,
35827,
198,
4299,
9024,
62,
13812,
33529,
198,
220,
220,
220,
37227,
5438,
290,
751,
9024,
220,
37227,
628,
220,
220,
220,
2855,
62,
687,
796,
3941,
8479,
3419,
628,
220,
220,
220,
2836,
62,
65,
2171,
796,
3941,
13,
22766,
13,
24455,
62,
1525,
7,
7220,
62,
312,
28,
2536,
7,
14421,
62,
7220,
13,
312,
29720,
439,
3419,
628,
220,
220,
220,
2472,
62,
17287,
62,
23301,
796,
2835,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2160,
26933,
35546,
13,
35546,
62,
17287,
329,
2855,
287,
2836,
62,
65,
2171,
611,
2855,
13,
271,
62,
20333,
6624,
705,
3673,
47355,
20520,
828,
362,
8,
628,
220,
220,
220,
611,
2855,
62,
687,
13,
12102,
378,
62,
261,
62,
46002,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
35546,
796,
3941,
7,
35546,
62,
3672,
28,
35546,
62,
687,
13,
35546,
62,
3672,
13,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2855,
62,
23301,
62,
4475,
28,
35546,
62,
687,
13,
35546,
62,
23301,
62,
4475,
13,
7890,
11,
2855,
62,
17287,
28,
35546,
62,
687,
13,
35546,
62,
17287,
13,
7890,
11,
2836,
62,
312,
28,
2536,
7,
14421,
62,
7220,
13,
312,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
20613,
13,
29891,
13,
2860,
7,
3605,
62,
35546,
8,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
13,
29891,
13,
41509,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
7644,
10786,
33244,
2759,
2087,
2855,
3256,
705,
13138,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
18941,
7,
6371,
62,
1640,
10786,
65,
2171,
13,
65,
2171,
62,
13812,
6,
4008,
628,
220,
220,
220,
1441,
8543,
62,
28243,
10786,
65,
2171,
14,
65,
2171,
13,
18594,
6592,
3256,
2855,
62,
687,
28,
35546,
62,
687,
11,
9024,
28,
7220,
62,
65,
2171,
11,
2472,
62,
17287,
62,
23301,
28,
23350,
62,
17287,
62,
23301,
8,
628,
198,
31,
65,
2171,
62,
46583,
13,
38629,
10786,
14,
65,
2171,
14,
20333,
3256,
5050,
28,
17816,
32782,
6,
12962,
198,
31,
38235,
62,
35827,
198,
4299,
1317,
62,
35546,
62,
20333,
33529,
198,
220,
220,
220,
37227,
27366,
257,
2855,
355,
3432,
37227,
628,
220,
220,
220,
2855,
62,
2340,
796,
2581,
13,
17752,
17816,
312,
3163,
81,
20520,
628,
220,
220,
220,
329,
4686,
287,
2855,
62,
2340,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2855,
796,
3941,
13,
22766,
13,
1136,
7,
312,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2855,
13,
271,
62,
20333,
6624,
705,
3673,
47355,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2855,
13,
271,
62,
20333,
796,
705,
47,
1698,
6,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2855,
13,
271,
62,
20333,
796,
705,
3673,
47355,
6,
628,
220,
220,
220,
220,
220,
220,
220,
20613,
13,
29891,
13,
41509,
3419,
628,
220,
220,
220,
1441,
19779,
19662,
1298,
366,
13138,
20662,
628,
198,
31,
65,
2171,
62,
46583,
13,
38629,
10786,
14,
65,
2171,
14,
19312,
14,
27,
35546,
62,
312,
29,
3256,
5050,
28,
17816,
18851,
3256,
705,
32782,
6,
12962,
198,
31,
38235,
62,
35827,
198,
4299,
4370,
62,
35546,
7,
35546,
62,
312,
2599,
198,
220,
220,
220,
37227,
33141,
2855,
4370,
37227,
628,
220,
220,
220,
2855,
796,
3941,
13,
22766,
13,
1136,
7,
35546,
62,
312,
8,
628,
220,
220,
220,
2855,
62,
687,
796,
3941,
8479,
7,
26801,
28,
35546,
8,
628,
220,
220,
220,
611,
2855,
62,
687,
13,
12102,
378,
62,
261,
62,
46002,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
2855,
13,
35546,
62,
3672,
796,
2855,
62,
687,
13,
35546,
62,
3672,
13,
7890,
198,
220,
220,
220,
220,
220,
220,
220,
2855,
13,
35546,
62,
23301,
62,
4475,
796,
2855,
62,
687,
13,
35546,
62,
23301,
62,
4475,
13,
7890,
198,
220,
220,
220,
220,
220,
220,
220,
2855,
13,
35546,
62,
17287,
796,
2855,
62,
687,
13,
35546,
62,
17287,
13,
7890,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
13,
29891,
13,
41509,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
7644,
10786,
33244,
2759,
13012,
2855,
3256,
705,
10951,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
18941,
7,
6371,
62,
1640,
10786,
65,
2171,
13,
65,
2171,
62,
13812,
6,
4008,
628,
220,
220,
220,
1441,
8543,
62,
28243,
10786,
65,
2171,
14,
19312,
62,
35546,
13,
18594,
6592,
3256,
1296,
28,
35546,
62,
687,
11,
2855,
28,
35546,
8,
628,
198,
31,
65,
2171,
62,
46583,
13,
38629,
10786,
14,
65,
2171,
14,
33678,
3256,
5050,
28,
17816,
32782,
6,
12962,
198,
31,
38235,
62,
35827,
198,
4299,
12233,
62,
65,
2171,
33529,
198,
220,
220,
220,
37227,
33141,
2855,
39948,
37227,
628,
220,
220,
220,
2855,
62,
2340,
796,
2581,
13,
17752,
17816,
312,
3163,
81,
20520,
628,
220,
220,
220,
329,
4686,
287,
2855,
62,
2340,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2855,
796,
3941,
13,
22766,
13,
1136,
7,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
13,
29891,
13,
33678,
7,
35546,
8,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
13,
29891,
13,
41509,
3419,
628,
220,
220,
220,
7644,
10786,
17798,
7675,
13140,
3256,
705,
43917,
11537,
198,
220,
220,
220,
1441,
19779,
19662,
1298,
366,
13138,
20662,
198
] | 2.457786 | 1,066 |
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2007 - Frank Scholz <[email protected]>
from twisted.web import server, resource
from twisted.python import failure
from twisted.internet import defer
from coherence import log, SERVER_ID
from coherence.extern.et import ET, namespace_map_update
from coherence.upnp.core.utils import parse_xml
from coherence.upnp.core import soap_lite
import coherence.extern.louie as louie
class UPnPPublisher(resource.Resource, log.Loggable):
""" Based upon twisted.web.soap.SOAPPublisher and
extracted to remove the SOAPpy dependency
UPnP requires headers and OUT parameters to be returned
in a slightly
different way than the SOAPPublisher class does.
"""
logCategory = 'soap'
isLeaf = 1
encoding = "UTF-8"
envelope_attrib = None
def render(self, request):
"""Handle a SOAP command."""
data = request.content.read()
headers = request.getAllHeaders()
self.info('soap_request: %s', headers)
# allow external check of data
louie.send('UPnPTest.Control.Client.CommandReceived', None, headers, data)
tree = parse_xml(data)
#root = tree.getroot()
#print_c(root)
body = tree.find('{http://schemas.xmlsoap.org/soap/envelope/}Body')
method = body.getchildren()[0]
methodName = method.tag
ns = None
if methodName.startswith('{') and methodName.rfind('}') > 1:
ns, methodName = methodName[1:].split('}')
args = []
kwargs = {}
for child in method.getchildren():
kwargs[child.tag] = soap_lite.decode_result(child)
args.append(kwargs[child.tag])
#p, header, body, attrs = SOAPpy.parseSOAPRPC(data, 1, 1, 1)
#methodName, args, kwargs, ns = p._name, p._aslist, p._asdict, p._ns
try:
headers['content-type'].index('text/xml')
except:
self._gotError(failure.Failure(errorCode(415)), request, methodName)
return server.NOT_DONE_YET
self.debug('headers: %r', headers)
function, useKeywords = self.lookupFunction(methodName)
#print 'function', function, 'keywords', useKeywords, 'args', args, 'kwargs', kwargs
if not function:
self._methodNotFound(request, methodName)
return server.NOT_DONE_YET
else:
keywords = {'soap_methodName': methodName}
if(headers.has_key('user-agent') and
headers['user-agent'].find('Xbox/') == 0):
keywords['X_UPnPClient'] = 'XBox'
#if(headers.has_key('user-agent') and
# headers['user-agent'].startswith("""Mozilla/4.0 (compatible; UPnP/1.0; Windows""")):
# keywords['X_UPnPClient'] = 'XBox'
if(headers.has_key('x-av-client-info') and
headers['x-av-client-info'].find('"PLAYSTATION3') > 0):
keywords['X_UPnPClient'] = 'PLAYSTATION3'
if(headers.has_key('user-agent') and
headers['user-agent'].find('Philips-Software-WebClient/4.32') == 0):
keywords['X_UPnPClient'] = 'Philips-TV'
for k, v in kwargs.items():
keywords[str(k)] = v
self.info('call %s %s', methodName, keywords)
if hasattr(function, "useKeywords"):
d = defer.maybeDeferred(function, **keywords)
else:
d = defer.maybeDeferred(function, *args, **keywords)
d.addCallback(self._gotResult, request, methodName, ns)
d.addErrback(self._gotError, request, methodName, ns)
return server.NOT_DONE_YET
| [
2,
49962,
739,
262,
17168,
5964,
198,
2,
2638,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
2781,
12,
43085,
13,
10121,
198,
198,
2,
15069,
4343,
532,
5278,
3059,
349,
89,
1279,
1073,
23545,
31,
1350,
1765,
896,
13,
3262,
29,
198,
198,
6738,
19074,
13,
12384,
1330,
4382,
11,
8271,
198,
6738,
19074,
13,
29412,
1330,
5287,
198,
6738,
19074,
13,
37675,
1330,
29135,
198,
198,
6738,
763,
23545,
1330,
2604,
11,
18871,
5959,
62,
2389,
198,
198,
6738,
763,
23545,
13,
1069,
759,
13,
316,
1330,
12152,
11,
25745,
62,
8899,
62,
19119,
198,
198,
6738,
763,
23545,
13,
929,
37659,
13,
7295,
13,
26791,
1330,
21136,
62,
19875,
198,
198,
6738,
763,
23545,
13,
929,
37659,
13,
7295,
1330,
19533,
62,
36890,
198,
198,
11748,
763,
23545,
13,
1069,
759,
13,
75,
280,
494,
355,
21081,
494,
628,
198,
198,
4871,
15958,
77,
10246,
549,
8191,
7,
31092,
13,
26198,
11,
2604,
13,
43,
10332,
540,
2599,
198,
220,
220,
220,
37227,
13403,
2402,
19074,
13,
12384,
13,
568,
499,
13,
15821,
2969,
46471,
290,
198,
220,
220,
220,
220,
220,
220,
220,
21242,
284,
4781,
262,
12809,
2969,
9078,
20203,
628,
220,
220,
220,
220,
220,
220,
220,
15958,
77,
47,
4433,
24697,
290,
16289,
10007,
284,
307,
4504,
198,
220,
220,
220,
220,
220,
220,
220,
287,
257,
4622,
198,
220,
220,
220,
220,
220,
220,
220,
1180,
835,
621,
262,
12809,
2969,
46471,
1398,
857,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2604,
27313,
796,
705,
568,
499,
6,
198,
220,
220,
220,
318,
3123,
1878,
796,
352,
198,
220,
220,
220,
21004,
796,
366,
48504,
12,
23,
1,
198,
220,
220,
220,
22878,
62,
1078,
822,
796,
6045,
628,
220,
220,
220,
825,
8543,
7,
944,
11,
2581,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
37508,
257,
12809,
2969,
3141,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
2581,
13,
11299,
13,
961,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
24697,
796,
2581,
13,
1136,
3237,
13847,
364,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
10951,
10786,
568,
499,
62,
25927,
25,
4064,
82,
3256,
24697,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
1249,
7097,
2198,
286,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
21081,
494,
13,
21280,
10786,
8577,
77,
11571,
395,
13,
15988,
13,
11792,
13,
21575,
3041,
6471,
3256,
6045,
11,
24697,
11,
1366,
8,
628,
220,
220,
220,
220,
220,
220,
220,
5509,
796,
21136,
62,
19875,
7,
7890,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
15763,
796,
5509,
13,
1136,
15763,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
4798,
62,
66,
7,
15763,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1767,
796,
5509,
13,
19796,
10786,
90,
4023,
1378,
1416,
4411,
292,
13,
19875,
568,
499,
13,
2398,
14,
568,
499,
14,
268,
1091,
68,
14,
92,
25842,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
2446,
796,
1767,
13,
1136,
17197,
3419,
58,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2446,
5376,
796,
2446,
13,
12985,
198,
220,
220,
220,
220,
220,
220,
220,
36545,
796,
6045,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2446,
5376,
13,
9688,
2032,
342,
10786,
90,
11537,
290,
2446,
5376,
13,
81,
19796,
10786,
92,
11537,
1875,
352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36545,
11,
2446,
5376,
796,
2446,
5376,
58,
16,
25,
4083,
35312,
10786,
92,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
26498,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
479,
86,
22046,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1200,
287,
2446,
13,
1136,
17197,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
86,
22046,
58,
9410,
13,
12985,
60,
796,
19533,
62,
36890,
13,
12501,
1098,
62,
20274,
7,
9410,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26498,
13,
33295,
7,
46265,
22046,
58,
9410,
13,
12985,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
79,
11,
13639,
11,
1767,
11,
708,
3808,
796,
12809,
2969,
9078,
13,
29572,
15821,
2969,
49,
5662,
7,
7890,
11,
352,
11,
352,
11,
352,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
24396,
5376,
11,
26498,
11,
479,
86,
22046,
11,
36545,
796,
279,
13557,
3672,
11,
279,
13557,
292,
4868,
11,
279,
13557,
292,
11600,
11,
279,
13557,
5907,
628,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
24697,
17816,
11299,
12,
4906,
6,
4083,
9630,
10786,
5239,
14,
19875,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
23442,
12331,
7,
32165,
495,
13,
50015,
7,
18224,
10669,
7,
35038,
36911,
2581,
11,
2446,
5376,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
4382,
13,
11929,
62,
35,
11651,
62,
56,
2767,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
24442,
10786,
50145,
25,
4064,
81,
3256,
24697,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2163,
11,
779,
9218,
10879,
796,
2116,
13,
5460,
929,
22203,
7,
24396,
5376,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
4798,
705,
8818,
3256,
2163,
11,
705,
2539,
10879,
3256,
779,
9218,
10879,
11,
705,
22046,
3256,
26498,
11,
705,
46265,
22046,
3256,
479,
86,
22046,
628,
220,
220,
220,
220,
220,
220,
220,
611,
407,
2163,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
24396,
3673,
21077,
7,
25927,
11,
2446,
5376,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
4382,
13,
11929,
62,
35,
11651,
62,
56,
2767,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26286,
796,
1391,
6,
568,
499,
62,
24396,
5376,
10354,
2446,
5376,
92,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
7,
50145,
13,
10134,
62,
2539,
10786,
7220,
12,
25781,
11537,
290,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
24697,
17816,
7220,
12,
25781,
6,
4083,
19796,
10786,
43377,
14,
11537,
6624,
657,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26286,
17816,
55,
62,
8577,
77,
47,
11792,
20520,
796,
705,
55,
14253,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
361,
7,
50145,
13,
10134,
62,
2539,
10786,
7220,
12,
25781,
11537,
290,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
24697,
17816,
7220,
12,
25781,
6,
4083,
9688,
2032,
342,
7203,
15931,
44,
8590,
5049,
14,
19,
13,
15,
357,
38532,
26,
15958,
77,
47,
14,
16,
13,
15,
26,
3964,
15931,
4943,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
220,
220,
26286,
17816,
55,
62,
8577,
77,
47,
11792,
20520,
796,
705,
55,
14253,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
7,
50145,
13,
10134,
62,
2539,
10786,
87,
12,
615,
12,
16366,
12,
10951,
11537,
290,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
24697,
17816,
87,
12,
615,
12,
16366,
12,
10951,
6,
4083,
19796,
10786,
1,
31519,
2257,
6234,
18,
11537,
1875,
657,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26286,
17816,
55,
62,
8577,
77,
47,
11792,
20520,
796,
705,
31519,
2257,
6234,
18,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
7,
50145,
13,
10134,
62,
2539,
10786,
7220,
12,
25781,
11537,
290,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
24697,
17816,
7220,
12,
25781,
6,
4083,
19796,
10786,
18673,
2419,
12,
25423,
12,
13908,
11792,
14,
19,
13,
2624,
11537,
6624,
657,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26286,
17816,
55,
62,
8577,
77,
47,
11792,
20520,
796,
705,
18673,
2419,
12,
6849,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
479,
11,
410,
287,
479,
86,
22046,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26286,
58,
2536,
7,
74,
15437,
796,
410,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
10951,
10786,
13345,
4064,
82,
4064,
82,
3256,
2446,
5376,
11,
26286,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
468,
35226,
7,
8818,
11,
366,
1904,
9218,
10879,
1,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
796,
29135,
13,
25991,
7469,
17436,
7,
8818,
11,
12429,
2539,
10879,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
796,
29135,
13,
25991,
7469,
17436,
7,
8818,
11,
1635,
22046,
11,
12429,
2539,
10879,
8,
628,
220,
220,
220,
220,
220,
220,
220,
288,
13,
2860,
47258,
7,
944,
13557,
23442,
23004,
11,
2581,
11,
2446,
5376,
11,
36545,
8,
198,
220,
220,
220,
220,
220,
220,
220,
288,
13,
2860,
9139,
81,
1891,
7,
944,
13557,
23442,
12331,
11,
2581,
11,
2446,
5376,
11,
36545,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
4382,
13,
11929,
62,
35,
11651,
62,
56,
2767,
628
] | 2.224526 | 1,688 |
from setuptools import setup, find_packages
VERSION = "0.0.5"
setup(
name="mkdocs-bulma",
version=VERSION,
url="https://github.com/rajasimon/mkdocs-bulma",
license="MIT",
description="Bulma for mkdocs",
author="Raja Simon",
author_email="[email protected]",
packages=find_packages(),
include_package_data=True,
entry_points={"mkdocs.themes": ["bulma = bulma",]},
zip_safe=False,
)
| [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
43717,
796,
366,
15,
13,
15,
13,
20,
1,
628,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
28015,
31628,
12,
15065,
2611,
1600,
198,
220,
220,
220,
2196,
28,
43717,
11,
198,
220,
220,
220,
19016,
2625,
5450,
1378,
12567,
13,
785,
14,
430,
28121,
20473,
14,
28015,
31628,
12,
15065,
2611,
1600,
198,
220,
220,
220,
5964,
2625,
36393,
1600,
198,
220,
220,
220,
6764,
2625,
33481,
2611,
329,
33480,
31628,
1600,
198,
220,
220,
220,
1772,
2625,
49,
27792,
11288,
1600,
198,
220,
220,
220,
1772,
62,
12888,
2625,
430,
28121,
20473,
31,
291,
75,
2778,
13,
785,
1600,
198,
220,
220,
220,
10392,
28,
19796,
62,
43789,
22784,
198,
220,
220,
220,
2291,
62,
26495,
62,
7890,
28,
17821,
11,
198,
220,
220,
220,
5726,
62,
13033,
28,
4895,
28015,
31628,
13,
1169,
6880,
1298,
14631,
15065,
2611,
796,
4807,
2611,
1600,
60,
5512,
198,
220,
220,
220,
19974,
62,
21230,
28,
25101,
11,
198,
8,
198
] | 2.477011 | 174 |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""GUI module generated by PAGE version 4.14.
# In conjunction with Tcl version 8.6
# Jun 04, 2018 08:42:31 PM
"""
import base64
import sys
from GaQueens import GaQueens
try:
from Tkinter import *
except ImportError:
from tkinter import *
try:
import ttk
py3 = False
except ImportError:
import tkinter.ttk as ttk
py3 = True
# spinbox = StringVar(root, '4')
# spinbox2 = StringVar(root, '10')
# spinbox3 = StringVar(root, '-1')
with open("7735732.png", "rb") as image_file:
encoded_string = base64.b64encode(image_file.read())
root = Tk()
player1 = PhotoImage(data=encoded_string)
player1 = player1.subsample(3)
def vp_start_gui():
"""Start point when module is the main routine."""
global val, w, root, spinbox, spinbox2, spinbox3
# root = Tk()
spinbox = StringVar(root, '6')
spinbox2 = StringVar(root, '10')
spinbox3 = StringVar(root, '-1')
top = Algoritmo_gen_tico_con_N_reinas(root)
init(root, top)
root.mainloop()
w = None
def create_Algoritmo_gen_tico_con_N_reinas(root, *args, **kwargs):
"""Start point when module is imported by another program."""
global w, w_win, rt
rt = root
w = Toplevel(root)
top = Algoritmo_gen_tico_con_N_reinas(w)
init(w, top, *args, **kwargs)
return (w, top)
# The following code is added to facilitate the Scrolled widgets you specified.
class AutoScroll(object):
"""Configure the scrollbars for a widget."""
@staticmethod
def _autoscroll(sbar):
"""Hide and show scrollbar as needed."""
return wrapped
def _create_container(func):
"""Creates a ttk Frame with a given master, and use this new frame to
place the scrollbars and the widget."""
return wrapped
class ScrolledTreeView(AutoScroll, ttk.Treeview):
"""A standard ttk Treeview widget with scrollbars that will
automatically show/hide as needed."""
@_create_container
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
220,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
40156,
8265,
7560,
416,
48488,
2196,
604,
13,
1415,
13,
198,
2,
554,
17856,
351,
309,
565,
2196,
807,
13,
21,
198,
2,
220,
220,
220,
7653,
8702,
11,
2864,
8487,
25,
3682,
25,
3132,
3122,
198,
37811,
198,
198,
11748,
2779,
2414,
198,
11748,
25064,
198,
198,
6738,
12822,
15681,
641,
1330,
12822,
15681,
641,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
309,
74,
3849,
1330,
1635,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422,
256,
74,
3849,
1330,
1635,
198,
198,
28311,
25,
198,
220,
220,
220,
1330,
256,
30488,
198,
220,
220,
220,
12972,
18,
796,
10352,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
1330,
256,
74,
3849,
13,
926,
74,
355,
256,
30488,
198,
220,
220,
220,
12972,
18,
796,
6407,
198,
198,
2,
7906,
3524,
796,
10903,
19852,
7,
15763,
11,
705,
19,
11537,
198,
2,
7906,
3524,
17,
796,
10903,
19852,
7,
15763,
11,
705,
940,
11537,
198,
2,
7906,
3524,
18,
796,
10903,
19852,
7,
15763,
11,
705,
12,
16,
11537,
198,
198,
4480,
1280,
7203,
3324,
27277,
2624,
13,
11134,
1600,
366,
26145,
4943,
355,
2939,
62,
7753,
25,
198,
220,
220,
220,
30240,
62,
8841,
796,
2779,
2414,
13,
65,
2414,
268,
8189,
7,
9060,
62,
7753,
13,
961,
28955,
198,
198,
15763,
796,
309,
74,
3419,
198,
198,
7829,
16,
796,
5555,
5159,
7,
7890,
28,
12685,
9043,
62,
8841,
8,
198,
7829,
16,
796,
2137,
16,
13,
7266,
39873,
7,
18,
8,
628,
198,
4299,
410,
79,
62,
9688,
62,
48317,
33529,
198,
220,
220,
220,
37227,
10434,
966,
618,
8265,
318,
262,
1388,
8027,
526,
15931,
198,
220,
220,
220,
3298,
1188,
11,
266,
11,
6808,
11,
7906,
3524,
11,
7906,
3524,
17,
11,
7906,
3524,
18,
198,
220,
220,
220,
1303,
6808,
796,
309,
74,
3419,
198,
220,
220,
220,
7906,
3524,
796,
10903,
19852,
7,
15763,
11,
705,
21,
11537,
198,
220,
220,
220,
7906,
3524,
17,
796,
10903,
19852,
7,
15763,
11,
705,
940,
11537,
198,
220,
220,
220,
7906,
3524,
18,
796,
10903,
19852,
7,
15763,
11,
705,
12,
16,
11537,
198,
220,
220,
220,
1353,
796,
978,
7053,
270,
5908,
62,
5235,
62,
83,
3713,
62,
1102,
62,
45,
62,
260,
24252,
7,
15763,
8,
198,
220,
220,
220,
2315,
7,
15763,
11,
1353,
8,
198,
220,
220,
220,
6808,
13,
12417,
26268,
3419,
628,
198,
86,
796,
6045,
628,
198,
4299,
2251,
62,
2348,
7053,
270,
5908,
62,
5235,
62,
83,
3713,
62,
1102,
62,
45,
62,
260,
24252,
7,
15763,
11,
1635,
22046,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
10434,
966,
618,
8265,
318,
17392,
416,
1194,
1430,
526,
15931,
198,
220,
220,
220,
3298,
266,
11,
266,
62,
5404,
11,
374,
83,
198,
220,
220,
220,
374,
83,
796,
6808,
198,
220,
220,
220,
266,
796,
309,
643,
626,
7,
15763,
8,
198,
220,
220,
220,
1353,
796,
978,
7053,
270,
5908,
62,
5235,
62,
83,
3713,
62,
1102,
62,
45,
62,
260,
24252,
7,
86,
8,
198,
220,
220,
220,
2315,
7,
86,
11,
1353,
11,
1635,
22046,
11,
12429,
46265,
22046,
8,
198,
220,
220,
220,
1441,
357,
86,
11,
1353,
8,
628,
628,
198,
2,
383,
1708,
2438,
318,
2087,
284,
15570,
262,
1446,
8375,
40803,
345,
7368,
13,
198,
4871,
11160,
29261,
7,
15252,
2599,
198,
220,
220,
220,
37227,
16934,
495,
262,
10743,
34046,
329,
257,
26295,
526,
15931,
628,
220,
220,
220,
2488,
12708,
24396,
198,
220,
220,
220,
825,
4808,
2306,
17500,
2487,
7,
82,
5657,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38518,
290,
905,
10743,
5657,
355,
2622,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
12908,
628,
198,
4299,
4808,
17953,
62,
34924,
7,
20786,
2599,
198,
220,
220,
220,
37227,
16719,
274,
257,
256,
30488,
25184,
351,
257,
1813,
4958,
11,
290,
779,
428,
649,
5739,
284,
198,
220,
220,
220,
1295,
262,
10743,
34046,
290,
262,
26295,
526,
15931,
198,
220,
220,
220,
1441,
12908,
628,
198,
4871,
1446,
8375,
27660,
7680,
7,
27722,
29261,
11,
256,
30488,
13,
27660,
1177,
2599,
198,
220,
220,
220,
37227,
32,
3210,
256,
30488,
12200,
1177,
26295,
351,
10743,
34046,
326,
481,
198,
220,
220,
220,
6338,
905,
14,
24717,
355,
2622,
526,
15931,
198,
220,
220,
220,
2488,
62,
17953,
62,
34924,
628,
198
] | 2.610818 | 758 |
from django.contrib import admin
# Register your models here.
from apps.medicamento.models import Medicamento
#admin.site.register(Medicamento)
@admin.register(Medicamento) | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
2,
17296,
534,
4981,
994,
13,
198,
198,
6738,
6725,
13,
1150,
291,
3263,
78,
13,
27530,
1330,
5786,
3263,
78,
198,
2,
28482,
13,
15654,
13,
30238,
7,
39112,
3263,
78,
8,
198,
198,
31,
28482,
13,
30238,
7,
39112,
3263,
78,
8
] | 3.240741 | 54 |
# Generated by Django 2.2.4 on 2019-09-14 13:12
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
19,
319,
13130,
12,
2931,
12,
1415,
1511,
25,
1065,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
628
] | 2.818182 | 44 |
from Dealer import Dealer
from Player import Player
dealer = Dealer()
player_name = input('Ingrese el nombre del jugador \n|>> ')
player = Player(player_name)
players = player.make_players()
players.append(player)
dealer.shuffle()
dealer.deal_cards(players)
for player in players:
print(player)
for card in player.show_hand():
print(card)
| [
6738,
44480,
1330,
44480,
198,
6738,
7853,
1330,
7853,
198,
198,
31769,
263,
796,
44480,
3419,
198,
198,
7829,
62,
3672,
796,
5128,
10786,
27682,
260,
325,
1288,
299,
2381,
260,
1619,
45808,
7079,
3467,
77,
91,
4211,
705,
8,
198,
198,
7829,
220,
796,
7853,
7,
7829,
62,
3672,
8,
198,
32399,
796,
2137,
13,
15883,
62,
32399,
3419,
198,
198,
32399,
13,
33295,
7,
7829,
8,
198,
198,
31769,
263,
13,
1477,
18137,
3419,
198,
31769,
263,
13,
31769,
62,
27761,
7,
32399,
8,
198,
198,
1640,
2137,
287,
1938,
25,
198,
220,
220,
220,
3601,
7,
7829,
8,
628,
220,
220,
220,
329,
2657,
287,
220,
2137,
13,
12860,
62,
4993,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
9517,
8,
198
] | 2.84375 | 128 |
from test_all_fixers import lib3to2FixerTestCase
| [
6738,
1332,
62,
439,
62,
13049,
364,
1330,
9195,
18,
1462,
17,
22743,
263,
14402,
20448,
628
] | 2.941176 | 17 |
#!/usr/bin/env python
# 1. Run .omero files from /opt/omero/server/config/
# 2. Set omero config properties from CONFIG_ envvars
# Variable names should replace "." with "_" and "_" with "__"
# E.g. CONFIG_omero_web_public_enabled=false
import os
from subprocess import call
from re import sub
CONFIG_OMERO = '/opt/omero/server/config/omero-server-config-update.sh'
OMERO = '/opt/omero/server/venv3/bin/omero'
if os.access(CONFIG_OMERO, os.X_OK):
rc = call([CONFIG_OMERO])
assert rc == 0
for (k, v) in os.environ.items():
if k.startswith('CONFIG_'):
prop = k[7:]
prop = sub('([^_])_([^_])', r'\1.\2', prop)
prop = sub('__', '_', prop)
value = v
rc = call([OMERO, 'config', 'set', '--', prop, value])
assert rc == 0
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
352,
13,
5660,
764,
296,
3529,
3696,
422,
1220,
8738,
14,
296,
3529,
14,
15388,
14,
11250,
14,
198,
2,
362,
13,
5345,
267,
647,
78,
4566,
6608,
422,
25626,
62,
17365,
85,
945,
198,
2,
220,
220,
220,
35748,
3891,
815,
6330,
366,
526,
351,
45434,
1,
290,
45434,
1,
351,
366,
834,
1,
198,
2,
220,
220,
220,
412,
13,
70,
13,
25626,
62,
296,
3529,
62,
12384,
62,
11377,
62,
25616,
28,
9562,
198,
198,
11748,
28686,
198,
6738,
850,
14681,
1330,
869,
198,
6738,
302,
1330,
850,
628,
198,
10943,
16254,
62,
2662,
34812,
796,
31051,
8738,
14,
296,
3529,
14,
15388,
14,
11250,
14,
296,
3529,
12,
15388,
12,
11250,
12,
19119,
13,
1477,
6,
198,
2662,
34812,
796,
31051,
8738,
14,
296,
3529,
14,
15388,
14,
574,
85,
18,
14,
8800,
14,
296,
3529,
6,
198,
198,
361,
28686,
13,
15526,
7,
10943,
16254,
62,
2662,
34812,
11,
28686,
13,
55,
62,
11380,
2599,
198,
220,
220,
220,
48321,
796,
869,
26933,
10943,
16254,
62,
2662,
34812,
12962,
198,
220,
220,
220,
6818,
48321,
6624,
657,
198,
198,
1640,
357,
74,
11,
410,
8,
287,
28686,
13,
268,
2268,
13,
23814,
33529,
198,
220,
220,
220,
611,
479,
13,
9688,
2032,
342,
10786,
10943,
16254,
62,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
2632,
796,
479,
58,
22,
47715,
198,
220,
220,
220,
220,
220,
220,
220,
2632,
796,
850,
10786,
26933,
61,
62,
12962,
62,
26933,
61,
62,
12962,
3256,
374,
6,
59,
16,
13,
59,
17,
3256,
2632,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2632,
796,
850,
10786,
834,
3256,
705,
62,
3256,
2632,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
410,
198,
220,
220,
220,
220,
220,
220,
220,
48321,
796,
869,
26933,
2662,
34812,
11,
705,
11250,
3256,
705,
2617,
3256,
705,
438,
3256,
2632,
11,
1988,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
48321,
6624,
657,
198
] | 2.304985 | 341 |
#
# Copyright (c) 2021 The GPflux Contributors.
#
# 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.
#
""" A kernel's features and coefficients using Random Fourier Features (RFF). """
from typing import Mapping, Optional
import numpy as np
import tensorflow as tf
import gpflow
from gpflow.base import DType, TensorType
from gpflux.layers.basis_functions.fourier_features.base import FourierFeaturesBase
from gpflux.layers.basis_functions.fourier_features.utils import (
ORF_SUPPORTED_KERNELS,
RFF_SUPPORTED_KERNELS,
_bases_concat,
_bases_cosine,
_ceil_divide,
_matern_number,
_sample_chi,
_sample_students_t,
)
from gpflux.types import ShapeType
class RandomFourierFeatures(RandomFourierFeaturesBase):
r"""
Random Fourier features (RFF) is a method for approximating kernels. The essential
element of the RFF approach :cite:p:`rahimi2007random` is the realization that Bochner's theorem
for stationary kernels can be approximated by a Monte Carlo sum.
We will approximate the kernel :math:`k(\mathbf{x}, \mathbf{x}')`
by :math:`\Phi(\mathbf{x})^\top \Phi(\mathbf{x}')`
where :math:`\Phi: \mathbb{R}^{D} \to \mathbb{R}^{M}` is a finite-dimensional feature map.
The feature map is defined as:
.. math::
\Phi(\mathbf{x}) = \sqrt{\frac{2 \sigma^2}{\ell}}
\begin{bmatrix}
\cos(\boldsymbol{\theta}_1^\top \mathbf{x}) \\
\sin(\boldsymbol{\theta}_1^\top \mathbf{x}) \\
\vdots \\
\cos(\boldsymbol{\theta}_{\frac{M}{2}}^\top \mathbf{x}) \\
\sin(\boldsymbol{\theta}_{\frac{M}{2}}^\top \mathbf{x})
\end{bmatrix}
where :math:`\sigma^2` is the kernel variance.
The features are parameterised by random weights:
- :math:`\boldsymbol{\theta} \sim p(\boldsymbol{\theta})`
where :math:`p(\boldsymbol{\theta})` is the spectral density of the kernel.
At least for the squared exponential kernel, this variant of the feature
mapping has more desirable theoretical properties than its counterpart form
from phase-shifted cosines :class:`RandomFourierFeaturesCosine` :cite:p:`sutherland2015error`.
"""
def _compute_bases(self, inputs: TensorType) -> tf.Tensor:
"""
Compute basis functions.
:return: A tensor with the shape ``[N, 2M]``.
"""
return _bases_concat(inputs, self.W)
def _compute_constant(self) -> tf.Tensor:
"""
Compute normalizing constant for basis functions.
:return: A tensor with the shape ``[]`` (i.e. a scalar).
"""
return self.rff_constant(self.kernel.variance, output_dim=2 * self.n_components)
class RandomFourierFeaturesCosine(RandomFourierFeaturesBase):
r"""
Random Fourier Features (RFF) is a method for approximating kernels. The essential
element of the RFF approach :cite:p:`rahimi2007random` is the realization that Bochner's theorem
for stationary kernels can be approximated by a Monte Carlo sum.
We will approximate the kernel :math:`k(\mathbf{x}, \mathbf{x}')`
by :math:`\Phi(\mathbf{x})^\top \Phi(\mathbf{x}')` where
:math:`\Phi: \mathbb{R}^{D} \to \mathbb{R}^{M}` is a finite-dimensional feature map.
The feature map is defined as:
.. math::
\Phi(\mathbf{x}) = \sqrt{\frac{2 \sigma^2}{\ell}}
\begin{bmatrix}
\cos(\boldsymbol{\theta}_1^\top \mathbf{x} + \tau) \\
\vdots \\
\cos(\boldsymbol{\theta}_M^\top \mathbf{x} + \tau)
\end{bmatrix}
where :math:`\sigma^2` is the kernel variance.
The features are parameterised by random weights:
- :math:`\boldsymbol{\theta} \sim p(\boldsymbol{\theta})`
where :math:`p(\boldsymbol{\theta})` is the spectral density of the kernel
- :math:`\tau \sim \mathcal{U}(0, 2\pi)`
Equivalent to :class:`RandomFourierFeatures` by elementary trigonometric identities.
"""
def build(self, input_shape: ShapeType) -> None:
"""
Creates the variables of the layer.
See `tf.keras.layers.Layer.build()
<https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer#build>`_.
"""
self._bias_build(n_components=self.n_components)
super(RandomFourierFeaturesCosine, self).build(input_shape)
def _compute_bases(self, inputs: TensorType) -> tf.Tensor:
"""
Compute basis functions.
:return: A tensor with the shape ``[N, M]``.
"""
return _bases_cosine(inputs, self.W, self.b)
def _compute_constant(self) -> tf.Tensor:
"""
Compute normalizing constant for basis functions.
:return: A tensor with the shape ``[]`` (i.e. a scalar).
"""
return self.rff_constant(self.kernel.variance, output_dim=self.n_components)
class OrthogonalRandomFeatures(RandomFourierFeatures):
r"""
Orthogonal random Fourier features (ORF) :cite:p:`yu2016orthogonal` for more
efficient and accurate kernel approximations than :class:`RandomFourierFeatures`.
"""
| [
2,
198,
2,
15069,
357,
66,
8,
33448,
383,
14714,
69,
22564,
25767,
669,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
2,
198,
37811,
317,
9720,
338,
3033,
290,
44036,
1262,
14534,
34296,
5277,
17571,
357,
49,
5777,
737,
37227,
198,
198,
6738,
19720,
1330,
337,
5912,
11,
32233,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
11748,
27809,
11125,
198,
6738,
27809,
11125,
13,
8692,
1330,
360,
6030,
11,
309,
22854,
6030,
198,
198,
6738,
27809,
69,
22564,
13,
75,
6962,
13,
12093,
271,
62,
12543,
2733,
13,
69,
280,
5277,
62,
40890,
13,
8692,
1330,
34296,
5277,
23595,
14881,
198,
6738,
27809,
69,
22564,
13,
75,
6962,
13,
12093,
271,
62,
12543,
2733,
13,
69,
280,
5277,
62,
40890,
13,
26791,
1330,
357,
198,
220,
220,
220,
6375,
37,
62,
40331,
15490,
1961,
62,
42,
28778,
37142,
11,
198,
220,
220,
220,
371,
5777,
62,
40331,
15490,
1961,
62,
42,
28778,
37142,
11,
198,
220,
220,
220,
4808,
65,
1386,
62,
1102,
9246,
11,
198,
220,
220,
220,
4808,
65,
1386,
62,
6966,
500,
11,
198,
220,
220,
220,
4808,
344,
346,
62,
7146,
485,
11,
198,
220,
220,
220,
4808,
76,
9205,
62,
17618,
11,
198,
220,
220,
220,
4808,
39873,
62,
11072,
11,
198,
220,
220,
220,
4808,
39873,
62,
19149,
658,
62,
83,
11,
198,
8,
198,
6738,
27809,
69,
22564,
13,
19199,
1330,
25959,
6030,
628,
198,
198,
4871,
14534,
37,
280,
5277,
23595,
7,
29531,
37,
280,
5277,
23595,
14881,
2599,
198,
220,
220,
220,
374,
37811,
198,
220,
220,
220,
14534,
34296,
5277,
3033,
357,
49,
5777,
8,
318,
257,
2446,
329,
5561,
39204,
50207,
13,
383,
6393,
198,
220,
220,
220,
5002,
286,
262,
371,
5777,
3164,
1058,
66,
578,
25,
79,
25,
63,
11392,
25236,
12726,
25120,
63,
318,
262,
23258,
326,
3248,
354,
1008,
338,
44728,
198,
220,
220,
220,
329,
31607,
50207,
460,
307,
5561,
15655,
416,
257,
22489,
40089,
2160,
13,
628,
220,
220,
220,
775,
481,
27665,
262,
9720,
1058,
11018,
25,
63,
74,
38016,
11018,
19881,
90,
87,
5512,
3467,
11018,
19881,
90,
87,
92,
11537,
63,
198,
220,
220,
220,
416,
1058,
11018,
25,
63,
59,
2725,
72,
38016,
11018,
19881,
90,
87,
30072,
61,
59,
4852,
3467,
2725,
72,
38016,
11018,
19881,
90,
87,
92,
11537,
63,
198,
220,
220,
220,
810,
1058,
11018,
25,
63,
59,
2725,
72,
25,
3467,
11018,
11848,
90,
49,
92,
36796,
35,
92,
3467,
1462,
3467,
11018,
11848,
90,
49,
92,
36796,
44,
92,
63,
318,
257,
27454,
12,
19577,
3895,
3975,
13,
628,
220,
220,
220,
383,
3895,
3975,
318,
5447,
355,
25,
628,
220,
220,
220,
11485,
10688,
3712,
628,
220,
220,
220,
220,
220,
3467,
2725,
72,
38016,
11018,
19881,
90,
87,
30072,
796,
3467,
31166,
17034,
31478,
31944,
90,
17,
3467,
82,
13495,
61,
17,
18477,
59,
695,
11709,
198,
220,
220,
220,
220,
220,
220,
220,
3467,
27471,
90,
65,
6759,
8609,
92,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3467,
6966,
38016,
36575,
1837,
23650,
31478,
1169,
8326,
92,
62,
16,
61,
59,
4852,
3467,
11018,
19881,
90,
87,
30072,
26867,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3467,
31369,
38016,
36575,
1837,
23650,
31478,
1169,
8326,
92,
62,
16,
61,
59,
4852,
3467,
11018,
19881,
90,
87,
30072,
26867,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3467,
20306,
1747,
26867,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3467,
6966,
38016,
36575,
1837,
23650,
31478,
1169,
8326,
92,
23330,
59,
31944,
90,
44,
18477,
17,
11709,
61,
59,
4852,
3467,
11018,
19881,
90,
87,
30072,
26867,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3467,
31369,
38016,
36575,
1837,
23650,
31478,
1169,
8326,
92,
23330,
59,
31944,
90,
44,
18477,
17,
11709,
61,
59,
4852,
3467,
11018,
19881,
90,
87,
30072,
198,
220,
220,
220,
220,
220,
220,
220,
3467,
437,
90,
65,
6759,
8609,
92,
628,
220,
220,
220,
810,
1058,
11018,
25,
63,
59,
82,
13495,
61,
17,
63,
318,
262,
9720,
24198,
13,
198,
220,
220,
220,
383,
3033,
389,
11507,
1417,
416,
4738,
19590,
25,
628,
220,
220,
220,
532,
1058,
11018,
25,
63,
59,
36575,
1837,
23650,
31478,
1169,
8326,
92,
3467,
14323,
279,
38016,
36575,
1837,
23650,
31478,
1169,
8326,
30072,
63,
198,
220,
220,
220,
220,
220,
810,
1058,
11018,
25,
63,
79,
38016,
36575,
1837,
23650,
31478,
1169,
8326,
30072,
63,
318,
262,
37410,
12109,
286,
262,
9720,
13,
628,
220,
220,
220,
1629,
1551,
329,
262,
44345,
39682,
9720,
11,
428,
15304,
286,
262,
3895,
198,
220,
220,
220,
16855,
468,
517,
18763,
16200,
6608,
621,
663,
11283,
1296,
198,
220,
220,
220,
422,
7108,
12,
1477,
21715,
8615,
1127,
1058,
4871,
25,
63,
29531,
37,
280,
5277,
23595,
36734,
500,
63,
1058,
66,
578,
25,
79,
25,
63,
82,
45384,
4626,
18224,
44646,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
4808,
5589,
1133,
62,
65,
1386,
7,
944,
11,
17311,
25,
309,
22854,
6030,
8,
4613,
48700,
13,
51,
22854,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
3082,
1133,
4308,
5499,
13,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
317,
11192,
273,
351,
262,
5485,
7559,
58,
45,
11,
362,
44,
60,
15506,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
4808,
65,
1386,
62,
1102,
9246,
7,
15414,
82,
11,
2116,
13,
54,
8,
628,
220,
220,
220,
825,
4808,
5589,
1133,
62,
9979,
415,
7,
944,
8,
4613,
48700,
13,
51,
22854,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
3082,
1133,
3487,
2890,
6937,
329,
4308,
5499,
13,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
317,
11192,
273,
351,
262,
5485,
7559,
21737,
15506,
357,
72,
13,
68,
13,
257,
16578,
283,
737,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
81,
487,
62,
9979,
415,
7,
944,
13,
33885,
13,
25641,
590,
11,
5072,
62,
27740,
28,
17,
1635,
2116,
13,
77,
62,
5589,
3906,
8,
628,
198,
4871,
14534,
37,
280,
5277,
23595,
36734,
500,
7,
29531,
37,
280,
5277,
23595,
14881,
2599,
198,
220,
220,
220,
374,
37811,
198,
220,
220,
220,
14534,
34296,
5277,
17571,
357,
49,
5777,
8,
318,
257,
2446,
329,
5561,
39204,
50207,
13,
383,
6393,
198,
220,
220,
220,
5002,
286,
262,
371,
5777,
3164,
1058,
66,
578,
25,
79,
25,
63,
11392,
25236,
12726,
25120,
63,
318,
262,
23258,
326,
3248,
354,
1008,
338,
44728,
198,
220,
220,
220,
329,
31607,
50207,
460,
307,
5561,
15655,
416,
257,
22489,
40089,
2160,
13,
628,
220,
220,
220,
775,
481,
27665,
262,
9720,
1058,
11018,
25,
63,
74,
38016,
11018,
19881,
90,
87,
5512,
3467,
11018,
19881,
90,
87,
92,
11537,
63,
198,
220,
220,
220,
416,
1058,
11018,
25,
63,
59,
2725,
72,
38016,
11018,
19881,
90,
87,
30072,
61,
59,
4852,
3467,
2725,
72,
38016,
11018,
19881,
90,
87,
92,
11537,
63,
810,
198,
220,
220,
220,
1058,
11018,
25,
63,
59,
2725,
72,
25,
3467,
11018,
11848,
90,
49,
92,
36796,
35,
92,
3467,
1462,
3467,
11018,
11848,
90,
49,
92,
36796,
44,
92,
63,
318,
257,
27454,
12,
19577,
3895,
3975,
13,
628,
220,
220,
220,
383,
3895,
3975,
318,
5447,
355,
25,
628,
220,
220,
220,
11485,
10688,
3712,
198,
220,
220,
220,
220,
220,
3467,
2725,
72,
38016,
11018,
19881,
90,
87,
30072,
796,
3467,
31166,
17034,
31478,
31944,
90,
17,
3467,
82,
13495,
61,
17,
18477,
59,
695,
11709,
198,
220,
220,
220,
220,
220,
220,
220,
3467,
27471,
90,
65,
6759,
8609,
92,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3467,
6966,
38016,
36575,
1837,
23650,
31478,
1169,
8326,
92,
62,
16,
61,
59,
4852,
3467,
11018,
19881,
90,
87,
92,
1343,
3467,
83,
559,
8,
26867,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3467,
20306,
1747,
26867,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3467,
6966,
38016,
36575,
1837,
23650,
31478,
1169,
8326,
92,
62,
44,
61,
59,
4852,
3467,
11018,
19881,
90,
87,
92,
1343,
3467,
83,
559,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3467,
437,
90,
65,
6759,
8609,
92,
628,
220,
220,
220,
810,
1058,
11018,
25,
63,
59,
82,
13495,
61,
17,
63,
318,
262,
9720,
24198,
13,
198,
220,
220,
220,
383,
3033,
389,
11507,
1417,
416,
4738,
19590,
25,
628,
220,
220,
220,
532,
1058,
11018,
25,
63,
59,
36575,
1837,
23650,
31478,
1169,
8326,
92,
3467,
14323,
279,
38016,
36575,
1837,
23650,
31478,
1169,
8326,
30072,
63,
198,
220,
220,
220,
220,
220,
810,
1058,
11018,
25,
63,
79,
38016,
36575,
1837,
23650,
31478,
1169,
8326,
30072,
63,
318,
262,
37410,
12109,
286,
262,
9720,
198,
220,
220,
220,
532,
1058,
11018,
25,
63,
59,
83,
559,
3467,
14323,
3467,
11018,
9948,
90,
52,
92,
7,
15,
11,
362,
59,
14415,
8,
63,
628,
220,
220,
220,
7889,
29540,
284,
1058,
4871,
25,
63,
29531,
37,
280,
5277,
23595,
63,
416,
19823,
5192,
261,
16996,
18413,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
1382,
7,
944,
11,
5128,
62,
43358,
25,
25959,
6030,
8,
4613,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
7921,
274,
262,
9633,
286,
262,
7679,
13,
198,
220,
220,
220,
220,
220,
220,
220,
4091,
4600,
27110,
13,
6122,
292,
13,
75,
6962,
13,
49925,
13,
11249,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1279,
5450,
1378,
2503,
13,
83,
22854,
11125,
13,
2398,
14,
15042,
62,
31628,
14,
29412,
14,
27110,
14,
6122,
292,
14,
75,
6962,
14,
49925,
2,
11249,
29,
63,
44807,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
65,
4448,
62,
11249,
7,
77,
62,
5589,
3906,
28,
944,
13,
77,
62,
5589,
3906,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2208,
7,
29531,
37,
280,
5277,
23595,
36734,
500,
11,
2116,
737,
11249,
7,
15414,
62,
43358,
8,
628,
220,
220,
220,
825,
4808,
5589,
1133,
62,
65,
1386,
7,
944,
11,
17311,
25,
309,
22854,
6030,
8,
4613,
48700,
13,
51,
22854,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
3082,
1133,
4308,
5499,
13,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
317,
11192,
273,
351,
262,
5485,
7559,
58,
45,
11,
337,
60,
15506,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
4808,
65,
1386,
62,
6966,
500,
7,
15414,
82,
11,
2116,
13,
54,
11,
2116,
13,
65,
8,
628,
220,
220,
220,
825,
4808,
5589,
1133,
62,
9979,
415,
7,
944,
8,
4613,
48700,
13,
51,
22854,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
3082,
1133,
3487,
2890,
6937,
329,
4308,
5499,
13,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
317,
11192,
273,
351,
262,
5485,
7559,
21737,
15506,
357,
72,
13,
68,
13,
257,
16578,
283,
737,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
81,
487,
62,
9979,
415,
7,
944,
13,
33885,
13,
25641,
590,
11,
5072,
62,
27740,
28,
944,
13,
77,
62,
5589,
3906,
8,
628,
198,
4871,
47664,
519,
20996,
29531,
23595,
7,
29531,
37,
280,
5277,
23595,
2599,
198,
220,
220,
220,
374,
37811,
198,
220,
220,
220,
47664,
519,
20996,
4738,
34296,
5277,
3033,
357,
1581,
37,
8,
1058,
66,
578,
25,
79,
25,
63,
24767,
5304,
1506,
519,
20996,
63,
329,
517,
198,
220,
220,
220,
6942,
290,
7187,
9720,
5561,
320,
602,
621,
1058,
4871,
25,
63,
29531,
37,
280,
5277,
23595,
44646,
198,
220,
220,
220,
37227,
198
] | 2.541112 | 2,177 |
import editdistance
import re
| [
11748,
4370,
30246,
198,
11748,
302,
628,
628
] | 4.125 | 8 |
import os
TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
| [
11748,
28686,
198,
198,
51,
6465,
62,
26947,
62,
34720,
796,
28686,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
366,
7890,
4943,
198
] | 2.34375 | 32 |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
np.random.seed(3)
Data = pd.read_csv('AMZN.csv',header=0, usecols=['Date',
'Close'],parse_dates=True,index_col='Date')
print(Data.info())
print(Data.head())
print(Data.describe())
plt.figure(figsize=(10,5))
plt.plot(Data)
plt.show()
DataPCh = Data.pct_change()
LogReturns = np.log(1 + DataPCh)
print(LogReturns.tail(10))
plt.figure(figsize=(10,5))
plt.plot(LogReturns)
plt.show()
from sklearn.preprocessing import MinMaxScaler
scaler = MinMaxScaler()
DataScaled = scaler.fit_transform(Data)
TrainLen = int(len(DataScaled) * 0.70)
TestLen = len(DataScaled) - TrainLen
TrainData = DataScaled[0:TrainLen,:]
TestData = DataScaled[TrainLen:len(DataScaled),:]
print(len(TrainData), len(TestData))
TimeStep = 1
TrainX, TrainY = DatasetCreation(TrainData, TimeStep)
TestX, TestY = DatasetCreation(TestData, TimeStep)
TrainX = np.reshape(TrainX, (TrainX.shape[0], 1, TrainX.shape[1]))
TestX = np.reshape(TestX, (TestX.shape[0], 1, TestX.shape[1]))
from keras.models import Sequential
from keras.layers import LSTM
from keras.layers import Dense
from tensorflow import set_random_seed
set_random_seed(3)
model = Sequential()
model.add(LSTM(256, input_shape=(1, TimeStep)))
model.add(Dense(1))
model.compile(loss='mean_squared_error',optimizer='adam',metrics=['accuracy'])
model.fit(TrainX, TrainY, epochs=10, batch_size=1, verbose=1)
model.summary()
score = model.evaluate(TrainX, TrainY, verbose=0)
print('Keras Model Loss = ',score[0])
print('Keras Model Accuracy = ',score[1])
TrainPred = model.predict(TrainX)
TestPred = model.predict(TestX)
TrainPred = scaler.inverse_transform(TrainPred)
TrainY = scaler.inverse_transform([TrainY])
TestPred = scaler.inverse_transform(TestPred)
TestY = scaler.inverse_transform([TestY])
TrainPredictPlot = np.empty_like(DataScaled)
TrainPredictPlot[:, :] = np.nan
TrainPredictPlot[1:len(TrainPred)+1, :] = TrainPred
TestPredictPlot = np.empty_like(DataScaled)
TestPredictPlot[:, :] = np.nan
TestPredictPlot[len(TrainPred)+(1*2)+1:len(DataScaled)-1, :] = TestPred
plt.plot(scaler.inverse_transform(DataScaled))
plt.plot(TrainPredictPlot)
plt.plot(TestPredictPlot)
plt.show()
| [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
37659,
13,
25120,
13,
28826,
7,
18,
8,
198,
198,
6601,
796,
279,
67,
13,
961,
62,
40664,
10786,
2390,
57,
45,
13,
40664,
3256,
25677,
28,
15,
11,
779,
4033,
82,
28,
17816,
10430,
3256,
198,
6,
26125,
6,
4357,
29572,
62,
19581,
28,
17821,
11,
9630,
62,
4033,
11639,
10430,
11537,
198,
198,
4798,
7,
6601,
13,
10951,
28955,
198,
4798,
7,
6601,
13,
2256,
28955,
198,
4798,
7,
6601,
13,
20147,
4892,
28955,
198,
198,
489,
83,
13,
26875,
7,
5647,
7857,
16193,
940,
11,
20,
4008,
198,
489,
83,
13,
29487,
7,
6601,
8,
198,
489,
83,
13,
12860,
3419,
198,
198,
6601,
47,
1925,
796,
6060,
13,
79,
310,
62,
3803,
3419,
198,
198,
11187,
35561,
796,
45941,
13,
6404,
7,
16,
1343,
6060,
47,
1925,
8,
220,
198,
4798,
7,
11187,
35561,
13,
13199,
7,
940,
4008,
198,
198,
489,
83,
13,
26875,
7,
5647,
7857,
16193,
940,
11,
20,
4008,
198,
489,
83,
13,
29487,
7,
11187,
35561,
8,
198,
489,
83,
13,
12860,
3419,
198,
198,
6738,
1341,
35720,
13,
3866,
36948,
1330,
1855,
11518,
3351,
36213,
198,
198,
1416,
36213,
796,
1855,
11518,
3351,
36213,
3419,
198,
198,
6601,
3351,
3021,
796,
16578,
263,
13,
11147,
62,
35636,
7,
6601,
8,
198,
198,
44077,
30659,
796,
493,
7,
11925,
7,
6601,
3351,
3021,
8,
1635,
657,
13,
2154,
8,
198,
14402,
30659,
796,
18896,
7,
6601,
3351,
3021,
8,
532,
16835,
30659,
198,
44077,
6601,
796,
6060,
3351,
3021,
58,
15,
25,
44077,
30659,
11,
47715,
198,
14402,
6601,
796,
6060,
3351,
3021,
58,
44077,
30659,
25,
11925,
7,
6601,
3351,
3021,
828,
47715,
198,
198,
4798,
7,
11925,
7,
44077,
6601,
828,
18896,
7,
14402,
6601,
4008,
198,
198,
7575,
8600,
796,
352,
198,
44077,
55,
11,
16835,
56,
796,
16092,
292,
316,
12443,
341,
7,
44077,
6601,
11,
3862,
8600,
8,
198,
14402,
55,
11,
6208,
56,
796,
16092,
292,
316,
12443,
341,
7,
14402,
6601,
11,
3862,
8600,
8,
628,
198,
44077,
55,
796,
45941,
13,
3447,
1758,
7,
44077,
55,
11,
357,
44077,
55,
13,
43358,
58,
15,
4357,
352,
11,
16835,
55,
13,
43358,
58,
16,
60,
4008,
198,
14402,
55,
796,
45941,
13,
3447,
1758,
7,
14402,
55,
11,
357,
14402,
55,
13,
43358,
58,
15,
4357,
352,
11,
6208,
55,
13,
43358,
58,
16,
60,
4008,
628,
198,
6738,
41927,
292,
13,
27530,
1330,
24604,
1843,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
406,
2257,
44,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
360,
1072,
198,
6738,
11192,
273,
11125,
1330,
900,
62,
25120,
62,
28826,
198,
2617,
62,
25120,
62,
28826,
7,
18,
8,
198,
198,
19849,
796,
24604,
1843,
3419,
198,
19849,
13,
2860,
7,
43,
2257,
44,
7,
11645,
11,
5128,
62,
43358,
16193,
16,
11,
3862,
8600,
22305,
198,
19849,
13,
2860,
7,
35,
1072,
7,
16,
4008,
198,
19849,
13,
5589,
576,
7,
22462,
11639,
32604,
62,
16485,
1144,
62,
18224,
3256,
40085,
7509,
11639,
324,
321,
3256,
4164,
10466,
28,
17816,
4134,
23843,
6,
12962,
198,
198,
19849,
13,
11147,
7,
44077,
55,
11,
16835,
56,
11,
36835,
82,
28,
940,
11,
15458,
62,
7857,
28,
16,
11,
15942,
577,
28,
16,
8,
198,
198,
19849,
13,
49736,
3419,
198,
198,
26675,
796,
2746,
13,
49786,
7,
44077,
55,
11,
16835,
56,
11,
15942,
577,
28,
15,
8,
198,
4798,
10786,
42,
263,
292,
9104,
22014,
796,
46083,
26675,
58,
15,
12962,
198,
4798,
10786,
42,
263,
292,
9104,
33222,
796,
46083,
26675,
58,
16,
12962,
198,
198,
44077,
39156,
796,
2746,
13,
79,
17407,
7,
44077,
55,
8,
198,
14402,
39156,
796,
2746,
13,
79,
17407,
7,
14402,
55,
8,
198,
198,
44077,
39156,
796,
16578,
263,
13,
259,
4399,
62,
35636,
7,
44077,
39156,
8,
198,
44077,
56,
796,
16578,
263,
13,
259,
4399,
62,
35636,
26933,
44077,
56,
12962,
198,
14402,
39156,
796,
16578,
263,
13,
259,
4399,
62,
35636,
7,
14402,
39156,
8,
198,
14402,
56,
796,
16578,
263,
13,
259,
4399,
62,
35636,
26933,
14402,
56,
12962,
198,
198,
44077,
47,
17407,
43328,
796,
45941,
13,
28920,
62,
2339,
7,
6601,
3351,
3021,
8,
198,
44077,
47,
17407,
43328,
58,
45299,
1058,
60,
796,
45941,
13,
12647,
198,
44077,
47,
17407,
43328,
58,
16,
25,
11925,
7,
44077,
39156,
47762,
16,
11,
1058,
60,
796,
16835,
39156,
198,
198,
14402,
47,
17407,
43328,
796,
45941,
13,
28920,
62,
2339,
7,
6601,
3351,
3021,
8,
198,
14402,
47,
17407,
43328,
58,
45299,
1058,
60,
796,
45941,
13,
12647,
198,
14402,
47,
17407,
43328,
58,
11925,
7,
44077,
39156,
8,
33747,
16,
9,
17,
47762,
16,
25,
11925,
7,
6601,
3351,
3021,
13219,
16,
11,
1058,
60,
796,
6208,
39156,
198,
198,
489,
83,
13,
29487,
7,
1416,
36213,
13,
259,
4399,
62,
35636,
7,
6601,
3351,
3021,
4008,
198,
489,
83,
13,
29487,
7,
44077,
47,
17407,
43328,
8,
198,
489,
83,
13,
29487,
7,
14402,
47,
17407,
43328,
8,
198,
489,
83,
13,
12860,
3419,
198
] | 2.559302 | 860 |
from seq2annotation.trainer.train_model import train_model
from seq2annotation.algorithms.BiLSTM_CRF_model import BilstmCrfModel
from seq2annotation.algorithms.IDCNN_CRF_model import IdcnnCrfModel
# train_model(data_dir='./data', result_dir='./result', model_fn=IdcnnCrfModel.model_fn, **IdcnnCrfModel.default_params())
result = train_model(
data_dir='./data', result_dir='./results',
train_spec={'max_steps': None},
hook={
'stop_if_no_increase': {
'min_steps': 100,
'run_every_secs': 60,
'max_steps_without_increase': 10000
}
},
use_gpu=True,
tpu_config={
'tpu_name': 'u1mail2me',
},
model=BilstmCrfModel, **BilstmCrfModel.default_params()
)
print(result)
| [
6738,
33756,
17,
1236,
14221,
13,
2213,
10613,
13,
27432,
62,
19849,
1330,
4512,
62,
19849,
198,
6738,
33756,
17,
1236,
14221,
13,
282,
7727,
907,
13,
23286,
43,
2257,
44,
62,
9419,
37,
62,
19849,
1330,
347,
11750,
76,
13916,
69,
17633,
198,
6738,
33756,
17,
1236,
14221,
13,
282,
7727,
907,
13,
2389,
18474,
62,
9419,
37,
62,
19849,
1330,
5121,
66,
20471,
13916,
69,
17633,
628,
198,
2,
4512,
62,
19849,
7,
7890,
62,
15908,
28,
4458,
14,
7890,
3256,
1255,
62,
15908,
28,
4458,
14,
20274,
3256,
2746,
62,
22184,
28,
7390,
66,
20471,
13916,
69,
17633,
13,
19849,
62,
22184,
11,
12429,
7390,
66,
20471,
13916,
69,
17633,
13,
12286,
62,
37266,
28955,
198,
20274,
796,
4512,
62,
19849,
7,
198,
220,
220,
220,
1366,
62,
15908,
28,
4458,
14,
7890,
3256,
1255,
62,
15908,
28,
4458,
14,
43420,
3256,
198,
220,
220,
220,
4512,
62,
16684,
34758,
6,
9806,
62,
20214,
10354,
6045,
5512,
198,
220,
220,
220,
8011,
34758,
198,
220,
220,
220,
220,
220,
220,
220,
705,
11338,
62,
361,
62,
3919,
62,
24988,
589,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
1084,
62,
20214,
10354,
1802,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
5143,
62,
16833,
62,
2363,
82,
10354,
3126,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
9806,
62,
20214,
62,
19419,
62,
24988,
589,
10354,
33028,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
8964,
198,
220,
220,
220,
779,
62,
46999,
28,
17821,
11,
198,
220,
220,
220,
256,
19944,
62,
11250,
34758,
198,
220,
220,
220,
220,
220,
220,
220,
705,
83,
19944,
62,
3672,
10354,
705,
84,
16,
4529,
17,
1326,
3256,
198,
220,
220,
220,
8964,
198,
220,
220,
220,
2746,
28,
33,
11750,
76,
13916,
69,
17633,
11,
12429,
33,
11750,
76,
13916,
69,
17633,
13,
12286,
62,
37266,
3419,
198,
8,
198,
198,
4798,
7,
20274,
8,
198
] | 2.19883 | 342 |
"""
Your chance to explore Loops and Turtles!
Authors: David Mutchler, Dave Fisher, Vibha Alangar, Amanda Stouder,
their colleagues and Jasmine Scott
"""
###############################################################################
# COMPLETED: 1.
# On Line 5 above, replace PUT_YOUR_NAME_HERE with your own name.
###############################################################################
###############################################################################
# COMPLETED: 2.
# You should have RUN the m5e_loopy_turtles module and READ its code.
# (Do so now if you have not already done so.)
#
# Below this comment, add ANY CODE THAT YOU WANT, as long as:
# 1. You construct at least 2 rg.SimpleTurtle objects.
# 2. Each rg.SimpleTurtle object draws something
# (by moving, using its rg.Pen). ANYTHING is fine!
# 3. Each rg.SimpleTurtle moves inside a LOOP.
#
# Be creative! Strive for way-cool pictures! Abstract pictures rule!
#
# If you make syntax (notational) errors, no worries -- get help
# fixing them at either this session OR at the NEXT session.
#
# Don't forget to COMMIT-and-PUSH when you are done with this module.
###############################################################################
import rosegraphics as rg
window = rg.TurtleWindow()
son_goku = rg.SimpleTurtle('arrow')
son_goku.pen = rg.Pen('orange',5)
son_goku.speed = 2
for k in range(3):
son_goku.forward(100)
son_goku.pen_up()
son_goku.right(90)
son_goku.forward(50)
son_goku.pen_down()
son_goku.right(90)
son_goku.forward(100)
son_goku.pen_up()
son_goku.left(90)
son_goku.forward(50)
son_goku.left(90)
son_goku.pen_down()
prince_vegeta = rg.SimpleTurtle('arrow')
prince_vegeta.pen = rg.Pen('blue',5)
prince_vegeta.speed = 2
prince_vegeta.right(90)
prince_vegeta.pen_up()
prince_vegeta.forward(25)
for k in range(3):
prince_vegeta.pen_down()
prince_vegeta.left(90)
prince_vegeta.forward(100)
prince_vegeta.pen_up()
prince_vegeta.right(90)
prince_vegeta.forward(50)
prince_vegeta.pen_down()
prince_vegeta.right(90)
prince_vegeta.forward(100)
prince_vegeta.pen_up()
prince_vegeta.left(90)
prince_vegeta.forward(50)
window.close_on_mouse_click() | [
37811,
198,
7120,
2863,
284,
7301,
6706,
2840,
290,
44356,
0,
198,
198,
30515,
669,
25,
3271,
337,
7140,
1754,
11,
9935,
14388,
11,
569,
571,
3099,
978,
648,
283,
11,
23040,
520,
280,
1082,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
511,
7810,
290,
21961,
3810,
4746,
198,
37811,
198,
29113,
29113,
7804,
4242,
21017,
198,
2,
49269,
36493,
25,
352,
13,
198,
2,
220,
220,
1550,
6910,
642,
2029,
11,
6330,
220,
350,
3843,
62,
56,
11698,
62,
20608,
62,
39,
9338,
220,
351,
534,
898,
1438,
13,
198,
29113,
29113,
7804,
4242,
21017,
198,
198,
29113,
29113,
7804,
4242,
21017,
198,
2,
49269,
36493,
25,
362,
13,
198,
2,
220,
220,
921,
815,
423,
32494,
262,
220,
285,
20,
68,
62,
5439,
11081,
62,
83,
25195,
220,
8265,
290,
20832,
663,
2438,
13,
198,
2,
220,
220,
357,
5211,
523,
783,
611,
345,
423,
407,
1541,
1760,
523,
2014,
198,
2,
198,
2,
220,
220,
10383,
428,
2912,
11,
751,
15529,
42714,
14603,
7013,
41300,
11,
355,
890,
355,
25,
198,
2,
220,
220,
220,
220,
352,
13,
921,
5678,
379,
1551,
362,
48670,
13,
26437,
51,
17964,
5563,
13,
198,
2,
220,
220,
220,
220,
362,
13,
5501,
48670,
13,
26437,
51,
17964,
2134,
14293,
1223,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
1525,
3867,
11,
1262,
663,
48670,
13,
25553,
737,
220,
15529,
39356,
318,
3734,
0,
198,
2,
220,
220,
220,
220,
513,
13,
5501,
48670,
13,
26437,
51,
17964,
6100,
2641,
257,
17579,
3185,
13,
198,
2,
198,
2,
220,
220,
1355,
7325,
0,
220,
520,
11590,
329,
835,
12,
24494,
5986,
0,
220,
27741,
5986,
3896,
0,
198,
2,
198,
2,
220,
220,
1002,
345,
787,
15582,
357,
1662,
864,
8,
8563,
11,
645,
18572,
1377,
651,
1037,
198,
2,
220,
220,
18682,
606,
379,
2035,
428,
6246,
6375,
379,
262,
39726,
6246,
13,
198,
2,
198,
2,
220,
220,
2094,
470,
6044,
284,
22240,
2043,
12,
392,
12,
47,
27143,
618,
345,
389,
1760,
351,
428,
8265,
13,
198,
29113,
29113,
7804,
4242,
21017,
198,
11748,
8278,
70,
11549,
355,
48670,
198,
17497,
796,
48670,
13,
51,
17964,
27703,
3419,
198,
198,
1559,
62,
70,
11601,
796,
48670,
13,
26437,
51,
17964,
10786,
6018,
11537,
198,
1559,
62,
70,
11601,
13,
3617,
796,
48670,
13,
25553,
10786,
43745,
3256,
20,
8,
198,
1559,
62,
70,
11601,
13,
12287,
796,
362,
198,
198,
1640,
479,
287,
2837,
7,
18,
2599,
628,
220,
220,
220,
3367,
62,
70,
11601,
13,
11813,
7,
3064,
8,
198,
220,
220,
220,
3367,
62,
70,
11601,
13,
3617,
62,
929,
3419,
198,
220,
220,
220,
3367,
62,
70,
11601,
13,
3506,
7,
3829,
8,
198,
220,
220,
220,
3367,
62,
70,
11601,
13,
11813,
7,
1120,
8,
198,
220,
220,
220,
3367,
62,
70,
11601,
13,
3617,
62,
2902,
3419,
198,
220,
220,
220,
3367,
62,
70,
11601,
13,
3506,
7,
3829,
8,
198,
220,
220,
220,
3367,
62,
70,
11601,
13,
11813,
7,
3064,
8,
198,
220,
220,
220,
3367,
62,
70,
11601,
13,
3617,
62,
929,
3419,
198,
220,
220,
220,
3367,
62,
70,
11601,
13,
9464,
7,
3829,
8,
198,
220,
220,
220,
3367,
62,
70,
11601,
13,
11813,
7,
1120,
8,
198,
220,
220,
220,
3367,
62,
70,
11601,
13,
9464,
7,
3829,
8,
198,
220,
220,
220,
3367,
62,
70,
11601,
13,
3617,
62,
2902,
3419,
198,
198,
1050,
924,
62,
303,
1136,
64,
796,
48670,
13,
26437,
51,
17964,
10786,
6018,
11537,
198,
1050,
924,
62,
303,
1136,
64,
13,
3617,
796,
48670,
13,
25553,
10786,
17585,
3256,
20,
8,
198,
1050,
924,
62,
303,
1136,
64,
13,
12287,
796,
362,
198,
198,
1050,
924,
62,
303,
1136,
64,
13,
3506,
7,
3829,
8,
198,
1050,
924,
62,
303,
1136,
64,
13,
3617,
62,
929,
3419,
198,
1050,
924,
62,
303,
1136,
64,
13,
11813,
7,
1495,
8,
198,
198,
1640,
479,
287,
2837,
7,
18,
2599,
628,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
3617,
62,
2902,
3419,
198,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
9464,
7,
3829,
8,
198,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
11813,
7,
3064,
8,
198,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
3617,
62,
929,
3419,
198,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
3506,
7,
3829,
8,
198,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
11813,
7,
1120,
8,
198,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
3617,
62,
2902,
3419,
198,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
3506,
7,
3829,
8,
198,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
11813,
7,
3064,
8,
198,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
3617,
62,
929,
3419,
198,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
9464,
7,
3829,
8,
198,
220,
220,
220,
19716,
62,
303,
1136,
64,
13,
11813,
7,
1120,
8,
198,
198,
17497,
13,
19836,
62,
261,
62,
35888,
62,
12976,
3419
] | 2.726303 | 844 |
import pandas as pd
# Load dataset https://storage.googleapis.com/dqlab-dataset/LO4/global_air_quality_4000rows.csv
gaq = pd.read_csv('https://storage.googleapis.com/dqlab-dataset/LO4/global_air_quality_4000rows.csv', parse_dates=True, index_col='timestamp')
# Cetak 5 data teratas
print(gaq.head())
# Cetak info dari dataframe gaq
print('info')
print(gaq.info()) | [
11748,
19798,
292,
355,
279,
67,
198,
2,
8778,
27039,
3740,
1378,
35350,
13,
13297,
499,
271,
13,
785,
14,
67,
13976,
397,
12,
19608,
292,
316,
14,
21982,
19,
14,
20541,
62,
958,
62,
13237,
62,
27559,
8516,
13,
40664,
198,
4908,
80,
796,
279,
67,
13,
961,
62,
40664,
10786,
5450,
1378,
35350,
13,
13297,
499,
271,
13,
785,
14,
67,
13976,
397,
12,
19608,
292,
316,
14,
21982,
19,
14,
20541,
62,
958,
62,
13237,
62,
27559,
8516,
13,
40664,
3256,
21136,
62,
19581,
28,
17821,
11,
6376,
62,
4033,
11639,
16514,
27823,
11537,
198,
2,
327,
316,
461,
642,
1366,
1059,
265,
292,
198,
4798,
7,
4908,
80,
13,
2256,
28955,
198,
2,
327,
316,
461,
7508,
288,
2743,
1366,
14535,
308,
30188,
198,
4798,
10786,
10951,
11537,
198,
4798,
7,
4908,
80,
13,
10951,
28955
] | 2.592857 | 140 |
# Copyright 2022 Garda Technologies, LLC. 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.
#
# Originally written by Valery Korolyov <[email protected]>
# Partially overwrites original class DefectDojoAPI in
# defectdojo_api library which is licensed under the MIT License
# For more details on defectdojo_api visit https://github.com/DefectDojo/defectdojo_api
import json
import requests
from defectdojo_api.defectdojo_apiv2 import DefectDojoAPIv2
from .abc import DefectDojoAPIError, DefectDojoResponse
from .factory import DefectDojoAPIFactory
from .official import DefectDojoAPI_official
@DefectDojoAPIFactory.register("official_customized")
| [
2,
15069,
33160,
12790,
64,
21852,
11,
11419,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
2,
198,
2,
19486,
3194,
416,
3254,
1924,
14769,
3366,
709,
1279,
69,
4715,
993,
31,
83,
29822,
13,
952,
29,
198,
198,
2,
2142,
1927,
6993,
23156,
2656,
1398,
2896,
478,
5211,
7639,
17614,
287,
198,
2,
11855,
4598,
7639,
62,
15042,
5888,
543,
318,
11971,
739,
262,
17168,
13789,
198,
2,
1114,
517,
3307,
319,
11855,
4598,
7639,
62,
15042,
3187,
3740,
1378,
12567,
13,
785,
14,
7469,
478,
5211,
7639,
14,
4299,
478,
4598,
7639,
62,
15042,
198,
198,
11748,
33918,
198,
11748,
7007,
198,
198,
6738,
11855,
4598,
7639,
62,
15042,
13,
4299,
478,
4598,
7639,
62,
499,
452,
17,
1330,
2896,
478,
5211,
7639,
17614,
85,
17,
198,
198,
6738,
764,
39305,
1330,
2896,
478,
5211,
7639,
17614,
12331,
11,
2896,
478,
5211,
7639,
31077,
198,
6738,
764,
69,
9548,
1330,
2896,
478,
5211,
7639,
2969,
5064,
9548,
198,
6738,
764,
16841,
1330,
2896,
478,
5211,
7639,
17614,
62,
16841,
628,
198,
31,
7469,
478,
5211,
7639,
2969,
5064,
9548,
13,
30238,
7203,
16841,
62,
23144,
1143,
4943,
628
] | 3.539394 | 330 |
#!/usr/bin/python
import numpy as np
from scipy import optimize
from sympy import *
import matplotlib.pyplot as plt
import random
import pdb
import os
# Symbolic function to evaluate shape functions
shape_functions=lambda x,y: np.array([(1.-x)*(1.-y)/4.,(1.+x)*(1.-y)/4.,(1.+x)*(1.+y)/4.,(1.-x)*(1.+y)/4.])
grad_xi=lambda y:np.array([-(1.-y)/4.,(1.-y)/4.,(1.+y)/4.,-(1.+y)/4.])
grad_eta=lambda x:np.array([-(1.-x)/4.,-(1.+x)/4.,(1.+x)/4.,(1.-x)/4.])
# shapes=| N1(Xp1) N1(Xp2) ... N1(XNp) |
# | N2(Xp1) N2(Xp2) ... N2(XNp) |
# | N3(Xp1) N3(Xp2) ... N3(XNp) |
# | N4(Xp1) N4(Xp2) ... N4(XNp) |
# grad_z=| N1_z(Xp1) N1_z(Xp2) ... N1_z(XNp) |
# | N2_z(Xp1) N2_z(Xp2) ... N2_z(XNp) |
# | N3_z(Xp1) N3_z(Xp2) ... N3_z(XNp) |
# | N4_z(Xp1) N4_z(Xp2) ... N4_z(XNp) |
# where Ni(Xj) is the shape function of node i evaluated at the jth particles position
# samples=20
# cx=np.linspace(2.,80.,samples)
# cy=cx[0]
cx=2.
cy=2.
dx=2.
samples=1000
number_left = Rand(1, 4, samples)
position_left = RandPosition(number_left)
number_bott = Rand(1, 4, samples)
position_bott = RandPosition(number_bott)
number_curr = Rand(1, 4, samples)
position_curr = RandPosition(number_curr)
number_botle = Rand(1, 4, samples)
position_botle = RandPosition(number_botle)
if not os.path.exists('dcuRandom.npy'):
dcuSolution=[]
dcuSolution_id=[]
ctuSolution=[]
ctuSolution_id=[]
for i in range(samples):
print "Computing critical CFL for sample ",i,": ",number_curr[i]," particles"
solution_dcu=[]
solution_dcu_id=[]
solution_ctu=[]
solution_ctu_id=[]
for k in range(number_curr[i]):
# if number_curr[i]<number_prev[i] :
# print "Attention ca va merder !!!!!!"
# else:
# print "Ca va le faire..."
XL = position_left[i][:,0] ; YL = position_left[i][:,1]
XB = position_bott[i][:,0] ; YB = position_bott[i][:,1]
XBL = position_botle[i][:,0] ; YBL = position_botle[i][:,1]
XC = position_curr[i][:,0] ; YC = position_curr[i][:,1]
res=symbolResidual(k,dx,cx,cy,(XC,YC),(XB,YB),(XL,YL))
solution_dcu.append(gridSearch(res,dx,cx))
res=symbolResidual(k,dx,cx,cy,(XC,YC),(XC,YC),(XC,YC))
solution_dcu_id.append(gridSearch(res,dx,cx))
res=symbolResidual(k,dx,cx,cy,(XC,YC),(XB,YB),(XL,YL),(XBL,YBL))
solution_ctu.append(gridSearch(res,dx,cx))
res=symbolResidual(k,dx,cx,cy,(XC,YC),(XC,YC),(XC,YC),(XC,YC))
solution_ctu_id.append(gridSearch(res,dx,cx))
dcuSolution.append(min(solution_dcu))
dcuSolution_id.append(min(solution_dcu_id))
ctuSolution.append(min(solution_ctu))
ctuSolution_id.append(min(solution_ctu_id))
np.save('dcuRandom.npy',dcuSolution)
np.save('dcuRandom_id.npy',dcuSolution_id)
np.save('ctuRandom.npy',ctuSolution)
np.save('ctuRandom_id.npy',ctuSolution_id)
else :
dcuSolution=np.load('dcuRandom.npy')
dcuSolution_id=np.load('dcuRandom_id.npy')
ctuSolution=np.load('ctuRandom.npy')
ctuSolution_id=np.load('ctuRandom_id.npy')
import statistics
plt.figure()
plt.hist(dcuSolution,bins='auto',color='blue')
plt.grid()
plt.figure()
plt.hist(dcuSolution_id,bins='auto',color='red')
plt.grid()
plt.show()
pdb.set_trace()
plt.figure()
plt.hist(ctuSolution,bins='auto',color='blue')
plt.grid()
plt.figure()
plt.hist(ctuSolution_id,bins='auto',color='red')
plt.grid()
plt.show()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
1330,
27183,
198,
6738,
10558,
88,
1330,
1635,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
4738,
198,
11748,
279,
9945,
198,
11748,
28686,
628,
198,
2,
41327,
4160,
2163,
284,
13446,
5485,
5499,
198,
43358,
62,
12543,
2733,
28,
50033,
2124,
11,
88,
25,
45941,
13,
18747,
26933,
7,
16,
7874,
87,
27493,
7,
16,
7874,
88,
20679,
19,
1539,
7,
16,
13,
10,
87,
27493,
7,
16,
7874,
88,
20679,
19,
1539,
7,
16,
13,
10,
87,
27493,
7,
16,
13,
10,
88,
20679,
19,
1539,
7,
16,
7874,
87,
27493,
7,
16,
13,
10,
88,
20679,
19,
8183,
8,
198,
9744,
62,
29992,
28,
50033,
331,
25,
37659,
13,
18747,
26933,
30420,
16,
7874,
88,
20679,
19,
1539,
7,
16,
7874,
88,
20679,
19,
1539,
7,
16,
13,
10,
88,
20679,
19,
1539,
30420,
16,
13,
10,
88,
20679,
19,
8183,
8,
198,
9744,
62,
17167,
28,
50033,
2124,
25,
37659,
13,
18747,
26933,
30420,
16,
7874,
87,
20679,
19,
1539,
30420,
16,
13,
10,
87,
20679,
19,
1539,
7,
16,
13,
10,
87,
20679,
19,
1539,
7,
16,
7874,
87,
20679,
19,
8183,
8,
198,
198,
2,
15268,
28,
91,
399,
16,
7,
55,
79,
16,
8,
399,
16,
7,
55,
79,
17,
8,
2644,
399,
16,
7,
55,
45,
79,
8,
930,
198,
2,
220,
220,
220,
220,
220,
220,
220,
930,
399,
17,
7,
55,
79,
16,
8,
399,
17,
7,
55,
79,
17,
8,
2644,
399,
17,
7,
55,
45,
79,
8,
930,
198,
2,
220,
220,
220,
220,
220,
220,
220,
930,
399,
18,
7,
55,
79,
16,
8,
399,
18,
7,
55,
79,
17,
8,
2644,
399,
18,
7,
55,
45,
79,
8,
930,
198,
2,
220,
220,
220,
220,
220,
220,
220,
930,
399,
19,
7,
55,
79,
16,
8,
399,
19,
7,
55,
79,
17,
8,
2644,
399,
19,
7,
55,
45,
79,
8,
930,
198,
198,
2,
3915,
62,
89,
28,
91,
399,
16,
62,
89,
7,
55,
79,
16,
8,
399,
16,
62,
89,
7,
55,
79,
17,
8,
2644,
399,
16,
62,
89,
7,
55,
45,
79,
8,
930,
198,
2,
220,
220,
220,
220,
220,
220,
220,
930,
399,
17,
62,
89,
7,
55,
79,
16,
8,
399,
17,
62,
89,
7,
55,
79,
17,
8,
2644,
399,
17,
62,
89,
7,
55,
45,
79,
8,
930,
198,
2,
220,
220,
220,
220,
220,
220,
220,
930,
399,
18,
62,
89,
7,
55,
79,
16,
8,
399,
18,
62,
89,
7,
55,
79,
17,
8,
2644,
399,
18,
62,
89,
7,
55,
45,
79,
8,
930,
198,
2,
220,
220,
220,
220,
220,
220,
220,
930,
399,
19,
62,
89,
7,
55,
79,
16,
8,
399,
19,
62,
89,
7,
55,
79,
17,
8,
2644,
399,
19,
62,
89,
7,
55,
45,
79,
8,
930,
198,
198,
2,
810,
11556,
7,
55,
73,
8,
318,
262,
5485,
2163,
286,
10139,
1312,
16726,
379,
262,
474,
400,
13166,
2292,
628,
198,
198,
2,
8405,
28,
1238,
198,
2,
43213,
28,
37659,
13,
21602,
10223,
7,
17,
1539,
1795,
1539,
82,
12629,
8,
198,
2,
3075,
28,
66,
87,
58,
15,
60,
198,
66,
87,
28,
17,
13,
198,
948,
28,
17,
13,
198,
34350,
28,
17,
13,
198,
198,
82,
12629,
28,
12825,
198,
17618,
62,
9464,
796,
8790,
7,
16,
11,
604,
11,
8405,
8,
198,
9150,
62,
9464,
796,
8790,
26545,
7,
17618,
62,
9464,
8,
198,
198,
17618,
62,
10985,
796,
8790,
7,
16,
11,
604,
11,
8405,
8,
198,
9150,
62,
10985,
796,
8790,
26545,
7,
17618,
62,
10985,
8,
198,
198,
17618,
62,
22019,
81,
796,
8790,
7,
16,
11,
604,
11,
8405,
8,
198,
9150,
62,
22019,
81,
796,
8790,
26545,
7,
17618,
62,
22019,
81,
8,
198,
198,
17618,
62,
13645,
293,
796,
8790,
7,
16,
11,
604,
11,
8405,
8,
198,
9150,
62,
13645,
293,
796,
8790,
26545,
7,
17618,
62,
13645,
293,
8,
198,
198,
361,
407,
28686,
13,
6978,
13,
1069,
1023,
10786,
17896,
84,
29531,
13,
77,
9078,
6,
2599,
198,
220,
220,
220,
288,
27399,
46344,
28,
21737,
198,
220,
220,
220,
288,
27399,
46344,
62,
312,
28,
21737,
198,
220,
220,
220,
269,
28047,
46344,
28,
21737,
198,
220,
220,
220,
269,
28047,
46344,
62,
312,
28,
21737,
198,
220,
220,
220,
329,
1312,
287,
2837,
7,
82,
12629,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
366,
5377,
48074,
4688,
45239,
329,
6291,
33172,
72,
553,
25,
33172,
17618,
62,
22019,
81,
58,
72,
17241,
13166,
1,
198,
220,
220,
220,
220,
220,
220,
220,
4610,
62,
17896,
84,
28,
21737,
198,
220,
220,
220,
220,
220,
220,
220,
4610,
62,
17896,
84,
62,
312,
28,
21737,
198,
220,
220,
220,
220,
220,
220,
220,
4610,
62,
310,
84,
28,
21737,
198,
220,
220,
220,
220,
220,
220,
220,
4610,
62,
310,
84,
62,
312,
28,
21737,
198,
220,
220,
220,
220,
220,
220,
220,
329,
479,
287,
2837,
7,
17618,
62,
22019,
81,
58,
72,
60,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
611,
1271,
62,
22019,
81,
58,
72,
60,
27,
17618,
62,
47050,
58,
72,
60,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
220,
220,
220,
3601,
366,
8086,
1463,
1275,
46935,
4017,
1082,
37867,
10185,
2474,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
220,
220,
220,
3601,
366,
24334,
46935,
443,
37063,
9313,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16276,
796,
2292,
62,
9464,
58,
72,
7131,
45299,
15,
60,
2162,
575,
43,
796,
2292,
62,
9464,
58,
72,
7131,
45299,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1395,
33,
796,
2292,
62,
10985,
58,
72,
7131,
45299,
15,
60,
2162,
575,
33,
796,
2292,
62,
10985,
58,
72,
7131,
45299,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1395,
9148,
796,
2292,
62,
13645,
293,
58,
72,
7131,
45299,
15,
60,
2162,
575,
9148,
796,
2292,
62,
13645,
293,
58,
72,
7131,
45299,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1395,
34,
796,
2292,
62,
22019,
81,
58,
72,
7131,
45299,
15,
60,
2162,
575,
34,
796,
2292,
62,
22019,
81,
58,
72,
7131,
45299,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
581,
28,
1837,
23650,
4965,
312,
723,
7,
74,
11,
34350,
11,
66,
87,
11,
948,
11,
7,
55,
34,
11,
44816,
828,
7,
55,
33,
11,
56,
33,
828,
7,
32457,
11,
45448,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4610,
62,
17896,
84,
13,
33295,
7,
25928,
18243,
7,
411,
11,
34350,
11,
66,
87,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
581,
28,
1837,
23650,
4965,
312,
723,
7,
74,
11,
34350,
11,
66,
87,
11,
948,
11,
7,
55,
34,
11,
44816,
828,
7,
55,
34,
11,
44816,
828,
7,
55,
34,
11,
44816,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4610,
62,
17896,
84,
62,
312,
13,
33295,
7,
25928,
18243,
7,
411,
11,
34350,
11,
66,
87,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
581,
28,
1837,
23650,
4965,
312,
723,
7,
74,
11,
34350,
11,
66,
87,
11,
948,
11,
7,
55,
34,
11,
44816,
828,
7,
55,
33,
11,
56,
33,
828,
7,
32457,
11,
45448,
828,
7,
55,
9148,
11,
56,
9148,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4610,
62,
310,
84,
13,
33295,
7,
25928,
18243,
7,
411,
11,
34350,
11,
66,
87,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
581,
28,
1837,
23650,
4965,
312,
723,
7,
74,
11,
34350,
11,
66,
87,
11,
948,
11,
7,
55,
34,
11,
44816,
828,
7,
55,
34,
11,
44816,
828,
7,
55,
34,
11,
44816,
828,
7,
55,
34,
11,
44816,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4610,
62,
310,
84,
62,
312,
13,
33295,
7,
25928,
18243,
7,
411,
11,
34350,
11,
66,
87,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
288,
27399,
46344,
13,
33295,
7,
1084,
7,
82,
2122,
62,
17896,
84,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
288,
27399,
46344,
62,
312,
13,
33295,
7,
1084,
7,
82,
2122,
62,
17896,
84,
62,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
269,
28047,
46344,
13,
33295,
7,
1084,
7,
82,
2122,
62,
310,
84,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
269,
28047,
46344,
62,
312,
13,
33295,
7,
1084,
7,
82,
2122,
62,
310,
84,
62,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
45941,
13,
21928,
10786,
17896,
84,
29531,
13,
77,
9078,
3256,
17896,
84,
46344,
8,
198,
220,
220,
220,
45941,
13,
21928,
10786,
17896,
84,
29531,
62,
312,
13,
77,
9078,
3256,
17896,
84,
46344,
62,
312,
8,
198,
220,
220,
220,
45941,
13,
21928,
10786,
310,
84,
29531,
13,
77,
9078,
3256,
310,
84,
46344,
8,
198,
220,
220,
220,
45941,
13,
21928,
10786,
310,
84,
29531,
62,
312,
13,
77,
9078,
3256,
310,
84,
46344,
62,
312,
8,
198,
17772,
1058,
198,
220,
220,
220,
288,
27399,
46344,
28,
37659,
13,
2220,
10786,
17896,
84,
29531,
13,
77,
9078,
11537,
198,
220,
220,
220,
288,
27399,
46344,
62,
312,
28,
37659,
13,
2220,
10786,
17896,
84,
29531,
62,
312,
13,
77,
9078,
11537,
198,
220,
220,
220,
269,
28047,
46344,
28,
37659,
13,
2220,
10786,
310,
84,
29531,
13,
77,
9078,
11537,
198,
220,
220,
220,
269,
28047,
46344,
62,
312,
28,
37659,
13,
2220,
10786,
310,
84,
29531,
62,
312,
13,
77,
9078,
11537,
198,
198,
11748,
7869,
198,
489,
83,
13,
26875,
3419,
198,
489,
83,
13,
10034,
7,
17896,
84,
46344,
11,
65,
1040,
11639,
23736,
3256,
8043,
11639,
17585,
11537,
198,
489,
83,
13,
25928,
3419,
198,
198,
489,
83,
13,
26875,
3419,
198,
489,
83,
13,
10034,
7,
17896,
84,
46344,
62,
312,
11,
65,
1040,
11639,
23736,
3256,
8043,
11639,
445,
11537,
198,
489,
83,
13,
25928,
3419,
198,
198,
489,
83,
13,
12860,
3419,
198,
79,
9945,
13,
2617,
62,
40546,
3419,
198,
198,
489,
83,
13,
26875,
3419,
198,
489,
83,
13,
10034,
7,
310,
84,
46344,
11,
65,
1040,
11639,
23736,
3256,
8043,
11639,
17585,
11537,
198,
489,
83,
13,
25928,
3419,
198,
198,
489,
83,
13,
26875,
3419,
198,
489,
83,
13,
10034,
7,
310,
84,
46344,
62,
312,
11,
65,
1040,
11639,
23736,
3256,
8043,
11639,
445,
11537,
198,
489,
83,
13,
25928,
3419,
198,
198,
489,
83,
13,
12860,
3419,
198
] | 1.891534 | 1,890 |
# pylint: disable=redefined-outer-name,no-member
import json
import os
import shutil
import subprocess
import time
import pytest
from parse import parse
from sqlalchemy import create_engine
from alembic_utils.testbase import TEST_VERSIONS_ROOT, reset_event_listener_registry
PYTEST_DB = "postgresql://alem_user:password@localhost:5680/alem_db"
@pytest.fixture(scope="session")
def maybe_start_pg() -> None:
"""Creates a postgres 12 docker container that can be connected
to using the PYTEST_DB connection string"""
container_name = "alembic_utils_pg"
image = "postgres:12"
connection_template = "postgresql://{user}:{pw}@{host}:{port:d}/{db}"
conn_args = parse(connection_template, PYTEST_DB)
# Don't attempt to instantiate a container if
# we're on CI
if "GITHUB_SHA" in os.environ:
yield
return
try:
is_running = (
subprocess.check_output(
["docker", "inspect", "-f", "{{.State.Running}}", container_name]
)
.decode()
.strip()
== "true"
)
except subprocess.CalledProcessError:
# Can't inspect container if it isn't running
is_running = False
if is_running:
yield
return
subprocess.call(
[
"docker",
"run",
"--rm",
"--name",
container_name,
"-p",
f"{conn_args['port']}:5432",
"-d",
"-e",
f"POSTGRES_DB={conn_args['db']}",
"-e",
f"POSTGRES_PASSWORD={conn_args['pw']}",
"-e",
f"POSTGRES_USER={conn_args['user']}",
"--health-cmd",
"pg_isready",
"--health-interval",
"3s",
"--health-timeout",
"3s",
"--health-retries",
"15",
image,
]
)
# Wait for postgres to become healthy
for _ in range(10):
out = subprocess.check_output(["docker", "inspect", container_name])
inspect_info = json.loads(out)[0]
health_status = inspect_info["State"]["Health"]["Status"]
if health_status == "healthy":
break
else:
time.sleep(1)
else:
raise Exception("Could not reach postgres comtainer. Check docker installation")
yield
# subprocess.call(["docker", "stop", container_name])
return
@pytest.fixture(scope="session")
def raw_engine(maybe_start_pg: None):
"""sqlalchemy engine fixture"""
eng = create_engine(PYTEST_DB)
yield eng
eng.dispose()
@pytest.fixture(scope="function")
def engine(raw_engine):
"""Engine that has been reset between tests"""
run_cleaners()
yield raw_engine
run_cleaners()
| [
2,
279,
2645,
600,
25,
15560,
28,
445,
18156,
12,
39605,
12,
3672,
11,
3919,
12,
19522,
198,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
850,
14681,
198,
11748,
640,
198,
198,
11748,
12972,
9288,
198,
6738,
21136,
1330,
21136,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
198,
198,
6738,
31341,
2022,
291,
62,
26791,
13,
9288,
8692,
1330,
43001,
62,
28884,
11053,
62,
13252,
2394,
11,
13259,
62,
15596,
62,
4868,
877,
62,
2301,
4592,
198,
198,
47,
56,
51,
6465,
62,
11012,
796,
366,
7353,
34239,
13976,
1378,
282,
368,
62,
7220,
25,
28712,
31,
36750,
25,
3980,
1795,
14,
282,
368,
62,
9945,
1,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
2625,
29891,
4943,
198,
4299,
3863,
62,
9688,
62,
6024,
3419,
4613,
6045,
25,
198,
220,
220,
220,
37227,
16719,
274,
257,
1281,
34239,
1105,
36253,
9290,
326,
460,
307,
5884,
198,
220,
220,
220,
284,
1262,
262,
350,
56,
51,
6465,
62,
11012,
4637,
4731,
37811,
628,
220,
220,
220,
9290,
62,
3672,
796,
366,
282,
24419,
291,
62,
26791,
62,
6024,
1,
198,
220,
220,
220,
2939,
796,
366,
7353,
34239,
25,
1065,
1,
628,
220,
220,
220,
4637,
62,
28243,
796,
366,
7353,
34239,
13976,
1378,
90,
7220,
92,
29164,
79,
86,
92,
31,
90,
4774,
92,
29164,
634,
25,
67,
92,
14,
90,
9945,
36786,
198,
220,
220,
220,
48260,
62,
22046,
796,
21136,
7,
38659,
62,
28243,
11,
350,
56,
51,
6465,
62,
11012,
8,
628,
220,
220,
220,
1303,
2094,
470,
2230,
284,
9113,
9386,
257,
9290,
611,
198,
220,
220,
220,
1303,
356,
821,
319,
14514,
198,
220,
220,
220,
611,
366,
38,
10554,
10526,
62,
37596,
1,
287,
28686,
13,
268,
2268,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7800,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
628,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
318,
62,
20270,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
850,
14681,
13,
9122,
62,
22915,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14631,
45986,
1600,
366,
1040,
806,
1600,
27444,
69,
1600,
366,
27007,
13,
9012,
13,
28768,
11709,
1600,
9290,
62,
3672,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
12501,
1098,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
36311,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6624,
366,
7942,
1,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
2845,
850,
14681,
13,
34,
4262,
18709,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1680,
470,
10104,
9290,
611,
340,
2125,
470,
2491,
198,
220,
220,
220,
220,
220,
220,
220,
318,
62,
20270,
796,
10352,
628,
220,
220,
220,
611,
318,
62,
20270,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7800,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
628,
220,
220,
220,
850,
14681,
13,
13345,
7,
198,
220,
220,
220,
220,
220,
220,
220,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
45986,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5143,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
438,
26224,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
438,
3672,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9290,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27444,
79,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
90,
37043,
62,
22046,
17816,
634,
20520,
38362,
4051,
2624,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27444,
67,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27444,
68,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
32782,
10761,
1546,
62,
11012,
34758,
37043,
62,
22046,
17816,
9945,
20520,
92,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27444,
68,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
32782,
10761,
1546,
62,
47924,
54,
12532,
34758,
37043,
62,
22046,
17816,
79,
86,
20520,
92,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27444,
68,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
32782,
10761,
1546,
62,
29904,
34758,
37043,
62,
22046,
17816,
7220,
20520,
92,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
438,
13948,
12,
28758,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
6024,
62,
271,
1493,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
438,
13948,
12,
3849,
2100,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
18,
82,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
438,
13948,
12,
48678,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
18,
82,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
438,
13948,
12,
1186,
1678,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1314,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2939,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2361,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
1303,
16314,
329,
1281,
34239,
284,
1716,
5448,
198,
220,
220,
220,
329,
4808,
287,
2837,
7,
940,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
503,
796,
850,
14681,
13,
9122,
62,
22915,
7,
14692,
45986,
1600,
366,
1040,
806,
1600,
9290,
62,
3672,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
10104,
62,
10951,
796,
33918,
13,
46030,
7,
448,
38381,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1535,
62,
13376,
796,
10104,
62,
10951,
14692,
9012,
1,
7131,
1,
18081,
1,
7131,
1,
19580,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1535,
62,
13376,
6624,
366,
22796,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
640,
13,
42832,
7,
16,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
7203,
23722,
407,
3151,
1281,
34239,
401,
3153,
263,
13,
6822,
36253,
9988,
4943,
198,
220,
220,
220,
7800,
198,
220,
220,
220,
1303,
850,
14681,
13,
13345,
7,
14692,
45986,
1600,
366,
11338,
1600,
9290,
62,
3672,
12962,
198,
220,
220,
220,
1441,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
2625,
29891,
4943,
198,
4299,
8246,
62,
18392,
7,
25991,
62,
9688,
62,
6024,
25,
6045,
2599,
198,
220,
220,
220,
37227,
25410,
282,
26599,
3113,
29220,
37811,
198,
220,
220,
220,
1786,
796,
2251,
62,
18392,
7,
47,
56,
51,
6465,
62,
11012,
8,
198,
220,
220,
220,
7800,
1786,
198,
220,
220,
220,
1786,
13,
6381,
3455,
3419,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
2625,
8818,
4943,
198,
4299,
3113,
7,
1831,
62,
18392,
2599,
198,
220,
220,
220,
37227,
13798,
326,
468,
587,
13259,
1022,
5254,
37811,
628,
220,
220,
220,
1057,
62,
27773,
364,
3419,
628,
220,
220,
220,
7800,
8246,
62,
18392,
628,
220,
220,
220,
1057,
62,
27773,
364,
3419,
198
] | 2.120846 | 1,324 |
# -*- coding: utf-8 -*-
import sys
import dotenv
# 打印系统信息
print("Python %s on %s" % (sys.version, sys.platform))
sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])
# 导入环境变量
dotenv.load_dotenv(dotenv_path=PROJECT_ROOT + "/env/dc_dev.env")
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
25064,
198,
198,
11748,
16605,
24330,
198,
198,
2,
10545,
231,
241,
39355,
108,
163,
111,
119,
163,
119,
253,
46479,
94,
162,
223,
107,
198,
4798,
7203,
37906,
4064,
82,
319,
4064,
82,
1,
4064,
357,
17597,
13,
9641,
11,
25064,
13,
24254,
4008,
198,
198,
17597,
13,
6978,
13,
2302,
437,
26933,
33249,
2751,
62,
34720,
62,
6981,
62,
47,
56,
4221,
1340,
62,
47,
1404,
7998,
12962,
198,
198,
2,
10263,
107,
120,
17739,
98,
163,
236,
107,
161,
95,
225,
20998,
246,
34932,
237,
198,
26518,
24330,
13,
2220,
62,
26518,
24330,
7,
26518,
24330,
62,
6978,
28,
31190,
23680,
62,
13252,
2394,
1343,
12813,
24330,
14,
17896,
62,
7959,
13,
24330,
4943,
198
] | 1.796992 | 133 |
#!/usr/bin/env python
#
# Copyright 2014 Tuenti Technologies S.L.
#
# 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 getpass
import socket
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
15069,
1946,
16749,
298,
72,
21852,
311,
13,
43,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
2,
198,
198,
11748,
651,
6603,
198,
11748,
17802,
628
] | 3.685714 | 175 |
from django.test import tag
from test import cases as case
from test import fixtures as data
@tag('pool')
| [
6738,
42625,
14208,
13,
9288,
1330,
7621,
198,
198,
6738,
1332,
1330,
2663,
355,
1339,
198,
6738,
1332,
1330,
34609,
355,
1366,
628,
198,
31,
12985,
10786,
7742,
11537,
198
] | 3.633333 | 30 |
import os
from time import sleep
print('***********************')
a = 1
pid = os.fork()
if pid < 0:
print("创建进程失败")
elif pid == 0:
print('这是新的进程')
print("a =",a)
a = 10000
else:
sleep(1)
print("这是原有进程")
print("psarent a =",a)
print("演示完毕")
| [
11748,
28686,
198,
6738,
640,
1330,
3993,
198,
198,
4798,
10786,
8412,
2466,
8162,
11537,
198,
64,
796,
352,
198,
198,
35317,
796,
28686,
13,
32523,
3419,
198,
198,
361,
46514,
1279,
657,
25,
198,
220,
220,
220,
3601,
7203,
26344,
249,
161,
119,
118,
32573,
249,
163,
101,
233,
13783,
109,
164,
112,
98,
4943,
198,
417,
361,
46514,
6624,
657,
25,
198,
220,
220,
220,
3601,
10786,
32573,
247,
42468,
23877,
108,
21410,
32573,
249,
163,
101,
233,
11537,
198,
220,
220,
220,
3601,
7203,
64,
796,
1600,
64,
8,
198,
220,
220,
220,
257,
796,
33028,
198,
17772,
25,
198,
220,
220,
220,
3993,
7,
16,
8,
198,
220,
220,
220,
3601,
7203,
32573,
247,
42468,
43889,
253,
17312,
231,
32573,
249,
163,
101,
233,
4943,
198,
220,
220,
220,
3601,
7203,
862,
1580,
257,
796,
1600,
64,
8,
198,
198,
4798,
7203,
162,
120,
242,
163,
97,
118,
22522,
234,
162,
107,
243,
4943,
198
] | 1.710692 | 159 |
import glob
import os
import unittest
import sys
if __name__ == "__main__":
suite = build_test_suite()
runner = unittest.TextTestRunner()
result = runner.run(suite)
sys.exit(not result.wasSuccessful())
| [
11748,
15095,
198,
11748,
28686,
198,
11748,
555,
715,
395,
198,
11748,
25064,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
18389,
796,
1382,
62,
9288,
62,
2385,
578,
3419,
198,
220,
220,
220,
17490,
796,
555,
715,
395,
13,
8206,
14402,
49493,
3419,
628,
220,
220,
220,
1255,
796,
17490,
13,
5143,
7,
2385,
578,
8,
198,
220,
220,
220,
25064,
13,
37023,
7,
1662,
1255,
13,
9776,
33244,
913,
28955,
198
] | 2.728395 | 81 |
# Copyright 2014-present PlatformIO <[email protected]>
#
# 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.
"""
Arduino
Arduino Wiring-based Framework allows writing cross-platform software to
control devices attached to a wide range of Arduino boards to create all
kinds of creative coding, interactive objects, spaces or physical experiences.
http://arduino.cc/en/Reference/HomePage
"""
import os
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
platform = env.PioPlatform()
board = env.BoardConfig()
framework_package = "framework-arduino-sensebox"
if board.get("build.core", "").lower() != "arduino":
framework_package += "-%s" % board.get("build.core").lower()
FRAMEWORK_DIR = platform.get_package_dir(framework_package)
assert os.path.isdir(FRAMEWORK_DIR)
env.Append(
ASFLAGS=["-x", "assembler-with-cpp"],
CFLAGS=[
"-std=gnu11"
],
CCFLAGS=[
"-Os", # optimize for size
"-ffunction-sections", # place each function in its own section
"-fdata-sections",
"-Wall",
"-mcpu=%s" % board.get("build.cpu"),
"-mthumb",
"-nostdlib",
"--param", "max-inline-insns-single=500"
],
CXXFLAGS=[
"-fno-rtti",
"-fno-exceptions",
"-std=gnu++11",
"-fno-threadsafe-statics"
],
CPPDEFINES=[
("ARDUINO", 10805),
("F_CPU", "$BOARD_F_CPU"),
"USBCON"
],
LIBSOURCE_DIRS=[
os.path.join(FRAMEWORK_DIR, "libraries")
],
LINKFLAGS=[
"-Os",
"-mcpu=%s" % board.get("build.cpu"),
"-mthumb",
"-Wl,--gc-sections",
"-Wl,--check-sections",
"-Wl,--unresolved-symbols=report-all",
"-Wl,--warn-common",
"-Wl,--warn-section-align"
],
LIBS=["m"]
)
variants_dir = os.path.join(
"$PROJECT_DIR", board.get("build.variants_dir")) if board.get(
"build.variants_dir", "") else os.path.join(FRAMEWORK_DIR, "variants")
if not board.get("build.ldscript", ""):
env.Append(
LIBPATH=[
os.path.join(variants_dir, board.get("build.variant"), "linker_scripts", "gcc")
]
)
env.Replace(
LDSCRIPT_PATH=board.get("build.arduino.ldscript", "")
)
if "build.usb_product" in board:
env.Append(
CPPDEFINES=[
("USB_VID", board.get("build.hwids")[0][0]),
("USB_PID", board.get("build.hwids")[0][1]),
("USB_PRODUCT", '\\"%s\\"' %
board.get("build.usb_product", "").replace('"', "")),
("USB_MANUFACTURER", '\\"%s\\"' %
board.get("vendor", "").replace('"', ""))
]
)
| [
2,
15069,
1946,
12,
25579,
19193,
9399,
1279,
32057,
31,
24254,
952,
13,
2398,
29,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
198,
37811,
198,
3163,
24493,
198,
198,
3163,
24493,
370,
3428,
12,
3106,
25161,
3578,
3597,
3272,
12,
24254,
3788,
284,
198,
13716,
4410,
7223,
284,
257,
3094,
2837,
286,
27634,
11490,
284,
2251,
477,
198,
11031,
82,
286,
7325,
19617,
11,
14333,
5563,
11,
9029,
393,
3518,
6461,
13,
198,
198,
4023,
1378,
446,
84,
2879,
13,
535,
14,
268,
14,
26687,
14,
16060,
9876,
198,
37811,
198,
198,
11748,
28686,
198,
198,
6738,
6374,
684,
13,
7391,
1330,
15161,
31441,
198,
198,
24330,
796,
15161,
31441,
3419,
198,
24254,
796,
17365,
13,
47,
952,
37148,
3419,
198,
3526,
796,
17365,
13,
29828,
16934,
3419,
198,
198,
30604,
62,
26495,
796,
366,
30604,
12,
446,
84,
2879,
12,
33819,
3524,
1,
198,
361,
3096,
13,
1136,
7203,
11249,
13,
7295,
1600,
366,
11074,
21037,
3419,
14512,
366,
446,
84,
2879,
1298,
198,
220,
220,
220,
9355,
62,
26495,
15853,
27444,
4,
82,
1,
4064,
3096,
13,
1136,
7203,
11249,
13,
7295,
11074,
21037,
3419,
198,
10913,
2390,
6217,
14670,
62,
34720,
796,
3859,
13,
1136,
62,
26495,
62,
15908,
7,
30604,
62,
26495,
8,
198,
198,
30493,
28686,
13,
6978,
13,
9409,
343,
7,
10913,
2390,
6217,
14670,
62,
34720,
8,
198,
198,
24330,
13,
4677,
437,
7,
198,
220,
220,
220,
7054,
38948,
50,
28,
14692,
12,
87,
1600,
366,
34455,
1754,
12,
4480,
12,
20322,
33116,
628,
220,
220,
220,
327,
38948,
50,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
19282,
28,
41791,
1157,
1,
198,
220,
220,
220,
16589,
628,
220,
220,
220,
12624,
38948,
50,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
16748,
1600,
220,
1303,
27183,
329,
2546,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
487,
4575,
12,
23946,
1600,
220,
1303,
1295,
1123,
2163,
287,
663,
898,
2665,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
69,
7890,
12,
23946,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
22401,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
76,
36166,
28,
4,
82,
1,
4064,
3096,
13,
1136,
7203,
11249,
13,
36166,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
76,
400,
2178,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
77,
455,
67,
8019,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
438,
17143,
1600,
366,
9806,
12,
45145,
12,
1040,
5907,
12,
29762,
28,
4059,
1,
198,
220,
220,
220,
16589,
628,
220,
220,
220,
327,
8051,
38948,
50,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
69,
3919,
12,
81,
35671,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
69,
3919,
12,
1069,
11755,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
19282,
28,
41791,
4880,
1157,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
69,
3919,
12,
16663,
21230,
12,
14269,
873,
1,
198,
220,
220,
220,
16589,
628,
220,
220,
220,
16932,
5760,
36,
20032,
1546,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
5855,
9795,
52,
46016,
1600,
17729,
20,
828,
198,
220,
220,
220,
220,
220,
220,
220,
5855,
37,
62,
36037,
1600,
17971,
8202,
9795,
62,
37,
62,
36037,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
366,
2937,
2749,
1340,
1,
198,
220,
220,
220,
16589,
628,
220,
220,
220,
24653,
4462,
31033,
62,
34720,
50,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
6978,
13,
22179,
7,
10913,
2390,
6217,
14670,
62,
34720,
11,
366,
75,
11127,
4943,
198,
220,
220,
220,
16589,
628,
220,
220,
220,
34426,
38948,
50,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
16748,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
76,
36166,
28,
4,
82,
1,
4064,
3096,
13,
1136,
7203,
11249,
13,
36166,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
76,
400,
2178,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
54,
75,
11,
438,
36484,
12,
23946,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
54,
75,
11,
438,
9122,
12,
23946,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
54,
75,
11,
438,
403,
411,
5634,
12,
1837,
2022,
10220,
28,
13116,
12,
439,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
54,
75,
11,
438,
40539,
12,
11321,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
27444,
54,
75,
11,
438,
40539,
12,
5458,
12,
31494,
1,
198,
220,
220,
220,
16589,
628,
220,
220,
220,
24653,
4462,
28,
14692,
76,
8973,
198,
8,
198,
198,
25641,
1187,
62,
15908,
796,
28686,
13,
6978,
13,
22179,
7,
198,
220,
220,
220,
17971,
31190,
23680,
62,
34720,
1600,
3096,
13,
1136,
7203,
11249,
13,
25641,
1187,
62,
15908,
48774,
611,
3096,
13,
1136,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
11249,
13,
25641,
1187,
62,
15908,
1600,
366,
4943,
2073,
28686,
13,
6978,
13,
22179,
7,
10913,
2390,
6217,
14670,
62,
34720,
11,
366,
25641,
1187,
4943,
198,
198,
361,
407,
3096,
13,
1136,
7203,
11249,
13,
335,
12048,
1600,
13538,
2599,
198,
220,
220,
220,
17365,
13,
4677,
437,
7,
198,
220,
220,
220,
220,
220,
220,
220,
45651,
34219,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
6978,
13,
22179,
7,
25641,
1187,
62,
15908,
11,
3096,
13,
1136,
7203,
11249,
13,
25641,
415,
12340,
366,
8726,
263,
62,
46521,
1600,
366,
70,
535,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
2361,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
17365,
13,
3041,
5372,
7,
198,
220,
220,
220,
220,
220,
220,
220,
28377,
36584,
51,
62,
34219,
28,
3526,
13,
1136,
7203,
11249,
13,
446,
84,
2879,
13,
335,
12048,
1600,
366,
4943,
198,
220,
220,
220,
1267,
198,
198,
361,
366,
11249,
13,
43319,
62,
11167,
1,
287,
3096,
25,
198,
220,
220,
220,
17365,
13,
4677,
437,
7,
198,
220,
220,
220,
220,
220,
220,
220,
16932,
5760,
36,
20032,
1546,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5855,
27155,
62,
11008,
1600,
3096,
13,
1136,
7203,
11249,
13,
36599,
2340,
4943,
58,
15,
7131,
15,
46570,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5855,
27155,
62,
47,
2389,
1600,
3096,
13,
1136,
7203,
11249,
13,
36599,
2340,
4943,
58,
15,
7131,
16,
46570,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5855,
27155,
62,
4805,
28644,
1600,
705,
6852,
1,
4,
82,
6852,
30543,
4064,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3096,
13,
1136,
7203,
11249,
13,
43319,
62,
11167,
1600,
366,
11074,
33491,
10786,
1,
3256,
366,
4943,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5855,
27155,
62,
10725,
36820,
10659,
4261,
1137,
1600,
705,
6852,
1,
4,
82,
6852,
30543,
4064,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3096,
13,
1136,
7203,
85,
18738,
1600,
366,
11074,
33491,
10786,
1,
3256,
13538,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2361,
198,
220,
220,
220,
1267,
198
] | 2.333087 | 1,354 |
#!/usr/bin/python
#####################################################################################################################################
# #
# The purpose of this script is to collect data generated from parallel computation of parton level cross sections into one #
# dat file. This file should contain the average matched cross section (after PYTHIA) and all events over all runs. The script also #
# creates a repository to store this dat file and all root files for sharing with collaborators. #
# #
#####################################################################################################################################
# Imports
import os.path
import sys
import re
import numpy as np
# Define the background to collect results for
BG = 'jjWZ'
# Create an event repository for the results
repoBase = '/fdata/hepx/store/user/pwinslow/' + BG + '_Results/'
if os.path.isdir(repoBase) == True:
sys.exit('Repository already exists...')
else:
os.system('mkdir ' + repoBase)
# Loop through MG5 run folders and populate the repository with the corresponding pythia log files and delphes root + lhco files
print '\nPopulating event repository...'
for run in range(1,21,1):
# Define path to run files
EventBase = '/fdata/hepx/store/user/pwinslow/MGRecord/100TeV_LNV_Results/DiBoson/' + BG + 'BG/job{0}/MG5_aMC_v2_3_3/'.format(run) + BG + 'BG_100TeV/Events/'
# Copy relevant files to event repository
os.system('cp ' + EventBase + 'pythia_output.log' + ' ' + repoBase + 'pythia_output_job{0}.log'.format(run))
os.system('cp ' + EventBase + 'delphes_events.root' + ' ' + repoBase + 'delphes_events_job{0}.root'.format(run))
os.system('cp ' + EventBase + 'delphes_events.lhco' + ' ' + repoBase + 'delphes_events_job{0}.lhco'.format(run))
print 'Done populating repository.'
# Enter event repository
os.chdir(repoBase)
# Open a dat file to hold the full set of amalgamated events and averaged matched cross section information
print 'Amalgamating full LHCO events...'
with open('full_' + BG + '_lhco_events.dat', 'w') as full_event_file:
# Create list to store all matched cross sections
sigma_list = []
# Loop through all MG5 run folders and extract the average matched cross section
for arg in range(1,21,1):
# Define pythia file
pythia_file = 'pythia_output_job{0}.log'.format(arg)
# Check if pythia file exists
if os.path.isfile(pythia_file) == False:
print 'File not found...'
# Open pythia log file and extract the matched cross section, saving them all to a single list
with open(pythia_file, 'r+') as File:
sigma_string = File.readlines()[-1]
sigma = float(re.findall("-?\ *[0-9]+\.?[0-9]*(?:[Ee]\ *-?\ *[0-9]+)?", sigma_string)[0])
sigma_list.append(sigma)
# Write the average of all the matched cross sections to the dat file
full_event_file.write('Average matched cross section (pb): {0}\n'.format(np.mean(sigma_list)))
# Indicate beginning of event info
full_event_file.write('Begin event output...\n\n')
# Include header info for events
full_event_file.write(' # typ eta phi pt jmas ntrk btag had/em dum1 dum2\n')
# Loop through all MG5 runs again, this time extracting all events from all delphes event files
for run in range(1,21,1):
# Define delphes file
delphes_file = 'delphes_events_job{0}.lhco'.format(run)
# Check if delphes file exists
if os.path.isfile(delphes_file) == False:
print 'File not found...'
# Open delphes file and read in all events
with open(delphes_file, 'r+') as File:
delphes_events = File.readlines()
# While skipping header info, parse all events, printing each event separated by a line with a single 0
line = 1
while line < len(delphes_events):
if float(delphes_events[line].strip().split()[0]) != 0:
full_event_file.write(delphes_events[line])
line += 1
else:
full_event_file.write('0\n')
line += 1
# Delete individual leftover lhco files
print 'Cleaning repository...'
os.system('rm *.lhco')
print 'Full LHCO events collected and stored in repository.'
print 'Repository is complete.\n'
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
29113,
29113,
29113,
29113,
4242,
2,
198,
2,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
220,
220,
220,
1303,
198,
2,
383,
4007,
286,
428,
4226,
318,
284,
2824,
1366,
7560,
422,
10730,
29964,
286,
636,
261,
1241,
3272,
9004,
656,
530,
220,
197,
220,
220,
220,
1303,
198,
2,
4818,
2393,
13,
770,
2393,
815,
3994,
262,
2811,
14451,
3272,
2665,
357,
8499,
350,
56,
4221,
3539,
8,
290,
477,
2995,
625,
477,
4539,
13,
383,
4226,
635,
1303,
198,
2,
8075,
257,
16099,
284,
3650,
428,
4818,
2393,
290,
477,
6808,
3696,
329,
7373,
351,
37886,
13,
197,
197,
197,
197,
220,
220,
220,
1303,
198,
2,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
220,
220,
220,
1303,
198,
29113,
29113,
29113,
29113,
4242,
2,
628,
198,
198,
2,
1846,
3742,
198,
11748,
28686,
13,
6978,
198,
11748,
25064,
198,
11748,
302,
198,
11748,
299,
32152,
355,
45941,
628,
198,
2,
2896,
500,
262,
4469,
284,
2824,
2482,
329,
198,
40469,
796,
705,
41098,
54,
57,
6,
198,
198,
2,
13610,
281,
1785,
16099,
329,
262,
2482,
198,
260,
7501,
14881,
796,
31051,
69,
7890,
14,
258,
8416,
14,
8095,
14,
7220,
14,
79,
86,
1040,
9319,
14,
6,
1343,
34839,
1343,
705,
62,
25468,
14,
6,
198,
361,
28686,
13,
6978,
13,
9409,
343,
7,
260,
7501,
14881,
8,
6624,
6407,
25,
198,
197,
17597,
13,
37023,
10786,
6207,
13264,
1541,
7160,
986,
11537,
198,
17772,
25,
198,
197,
418,
13,
10057,
10786,
28015,
15908,
705,
1343,
29924,
14881,
8,
628,
198,
2,
26304,
832,
34809,
20,
1057,
24512,
290,
48040,
262,
16099,
351,
262,
11188,
279,
5272,
544,
2604,
3696,
290,
1619,
79,
956,
6808,
1343,
300,
71,
1073,
3696,
198,
4798,
705,
59,
77,
16979,
8306,
1785,
16099,
986,
6,
198,
1640,
1057,
287,
2837,
7,
16,
11,
2481,
11,
16,
2599,
628,
197,
2,
2896,
500,
3108,
284,
1057,
3696,
197,
198,
197,
9237,
14881,
796,
31051,
69,
7890,
14,
258,
8416,
14,
8095,
14,
7220,
14,
79,
86,
1040,
9319,
14,
20474,
23739,
14,
3064,
6767,
53,
62,
43,
27159,
62,
25468,
14,
18683,
33,
418,
261,
14,
6,
1343,
34839,
1343,
705,
40469,
14,
21858,
90,
15,
92,
14,
20474,
20,
62,
64,
9655,
62,
85,
17,
62,
18,
62,
18,
14,
4458,
18982,
7,
5143,
8,
1343,
34839,
1343,
705,
40469,
62,
3064,
6767,
53,
14,
37103,
14,
6,
628,
197,
2,
17393,
5981,
3696,
284,
1785,
16099,
198,
197,
418,
13,
10057,
10786,
13155,
705,
1343,
8558,
14881,
1343,
705,
79,
5272,
544,
62,
22915,
13,
6404,
6,
1343,
705,
705,
1343,
29924,
14881,
1343,
705,
79,
5272,
544,
62,
22915,
62,
21858,
90,
15,
27422,
6404,
4458,
18982,
7,
5143,
4008,
198,
197,
418,
13,
10057,
10786,
13155,
705,
1343,
8558,
14881,
1343,
705,
12381,
79,
956,
62,
31534,
13,
15763,
6,
1343,
705,
705,
1343,
29924,
14881,
1343,
705,
12381,
79,
956,
62,
31534,
62,
21858,
90,
15,
27422,
15763,
4458,
18982,
7,
5143,
4008,
197,
198,
197,
418,
13,
10057,
10786,
13155,
705,
1343,
8558,
14881,
1343,
705,
12381,
79,
956,
62,
31534,
13,
75,
71,
1073,
6,
1343,
705,
705,
1343,
29924,
14881,
1343,
705,
12381,
79,
956,
62,
31534,
62,
21858,
90,
15,
27422,
75,
71,
1073,
4458,
18982,
7,
5143,
4008,
197,
198,
4798,
705,
45677,
1461,
8306,
16099,
2637,
198,
198,
2,
6062,
1785,
16099,
220,
198,
418,
13,
354,
15908,
7,
260,
7501,
14881,
8,
628,
198,
2,
4946,
257,
4818,
2393,
284,
1745,
262,
1336,
900,
286,
45541,
321,
515,
2995,
290,
16449,
14451,
3272,
2665,
1321,
198,
4798,
705,
5840,
14016,
321,
803,
1336,
49730,
8220,
2995,
986,
6,
198,
4480,
1280,
10786,
12853,
62,
6,
1343,
34839,
1343,
705,
62,
75,
71,
1073,
62,
31534,
13,
19608,
3256,
705,
86,
11537,
355,
1336,
62,
15596,
62,
7753,
25,
628,
197,
2,
13610,
1351,
284,
3650,
477,
14451,
3272,
9004,
198,
197,
82,
13495,
62,
4868,
796,
17635,
628,
197,
2,
26304,
832,
477,
34809,
20,
1057,
24512,
290,
7925,
262,
2811,
14451,
3272,
2665,
198,
197,
1640,
1822,
287,
2837,
7,
16,
11,
2481,
11,
16,
2599,
628,
197,
197,
2,
2896,
500,
279,
5272,
544,
2393,
198,
197,
197,
79,
5272,
544,
62,
7753,
796,
705,
79,
5272,
544,
62,
22915,
62,
21858,
90,
15,
27422,
6404,
4458,
18982,
7,
853,
8,
197,
197,
628,
197,
197,
2,
6822,
611,
279,
5272,
544,
2393,
7160,
198,
197,
197,
361,
28686,
13,
6978,
13,
4468,
576,
7,
79,
5272,
544,
62,
7753,
8,
6624,
10352,
25,
198,
197,
197,
197,
4798,
705,
8979,
407,
1043,
986,
6,
628,
197,
197,
2,
4946,
279,
5272,
544,
2604,
2393,
290,
7925,
262,
14451,
3272,
2665,
11,
8914,
606,
477,
284,
257,
2060,
1351,
220,
198,
197,
197,
4480,
1280,
7,
79,
5272,
544,
62,
7753,
11,
705,
81,
10,
11537,
355,
9220,
25,
198,
197,
197,
198,
197,
197,
197,
82,
13495,
62,
8841,
796,
9220,
13,
961,
6615,
3419,
58,
12,
16,
60,
198,
197,
197,
197,
82,
13495,
796,
12178,
7,
260,
13,
19796,
439,
7203,
12,
30,
59,
1635,
58,
15,
12,
24,
48688,
17405,
30,
58,
15,
12,
24,
60,
9,
7,
27514,
58,
36,
68,
60,
59,
1635,
12,
30,
59,
1635,
58,
15,
12,
24,
48688,
19427,
1600,
264,
13495,
62,
8841,
38381,
15,
12962,
198,
197,
197,
197,
82,
13495,
62,
4868,
13,
33295,
7,
82,
13495,
8,
220,
628,
197,
2,
19430,
262,
2811,
286,
477,
262,
14451,
3272,
9004,
284,
262,
4818,
2393,
198,
197,
12853,
62,
15596,
62,
7753,
13,
13564,
10786,
26287,
14451,
3272,
2665,
357,
40842,
2599,
1391,
15,
32239,
77,
4458,
18982,
7,
37659,
13,
32604,
7,
82,
13495,
62,
4868,
22305,
198,
197,
2,
1423,
5344,
3726,
286,
1785,
7508,
220,
198,
197,
12853,
62,
15596,
62,
7753,
13,
13564,
10786,
44140,
1785,
5072,
986,
59,
77,
59,
77,
11537,
198,
197,
2,
40348,
13639,
7508,
329,
2995,
198,
197,
12853,
62,
15596,
62,
7753,
13,
13564,
10786,
220,
220,
1303,
220,
2170,
220,
220,
220,
220,
220,
2123,
64,
220,
220,
220,
220,
220,
872,
72,
220,
220,
220,
220,
220,
42975,
220,
220,
220,
474,
5356,
220,
220,
299,
2213,
74,
220,
220,
275,
12985,
220,
550,
14,
368,
220,
220,
288,
388,
16,
220,
220,
288,
388,
17,
59,
77,
11537,
628,
628,
197,
2,
26304,
832,
477,
34809,
20,
4539,
757,
11,
428,
640,
37895,
477,
2995,
422,
477,
1619,
79,
956,
1785,
3696,
198,
197,
1640,
1057,
287,
2837,
7,
16,
11,
2481,
11,
16,
2599,
628,
197,
197,
2,
2896,
500,
1619,
79,
956,
2393,
198,
197,
197,
12381,
79,
956,
62,
7753,
796,
705,
12381,
79,
956,
62,
31534,
62,
21858,
90,
15,
27422,
75,
71,
1073,
4458,
18982,
7,
5143,
8,
197,
197,
628,
197,
197,
2,
6822,
611,
1619,
79,
956,
2393,
7160,
198,
197,
197,
361,
28686,
13,
6978,
13,
4468,
576,
7,
12381,
79,
956,
62,
7753,
8,
6624,
10352,
25,
198,
197,
197,
197,
4798,
705,
8979,
407,
1043,
986,
6,
628,
197,
197,
2,
4946,
1619,
79,
956,
2393,
290,
1100,
287,
477,
2995,
198,
197,
197,
4480,
1280,
7,
12381,
79,
956,
62,
7753,
11,
705,
81,
10,
11537,
355,
9220,
25,
198,
197,
197,
197,
12381,
79,
956,
62,
31534,
796,
9220,
13,
961,
6615,
3419,
628,
197,
197,
2,
2893,
31017,
13639,
7508,
11,
21136,
477,
2995,
11,
13570,
1123,
1785,
11266,
416,
257,
1627,
351,
257,
2060,
657,
198,
197,
197,
1370,
796,
352,
198,
197,
197,
4514,
1627,
1279,
18896,
7,
12381,
79,
956,
62,
31534,
2599,
628,
197,
197,
197,
361,
12178,
7,
12381,
79,
956,
62,
31534,
58,
1370,
4083,
36311,
22446,
35312,
3419,
58,
15,
12962,
14512,
657,
25,
628,
197,
197,
197,
197,
12853,
62,
15596,
62,
7753,
13,
13564,
7,
12381,
79,
956,
62,
31534,
58,
1370,
12962,
197,
198,
197,
197,
197,
197,
1370,
15853,
352,
198,
197,
197,
197,
17772,
25,
198,
197,
198,
197,
197,
197,
197,
12853,
62,
15596,
62,
7753,
13,
13564,
10786,
15,
59,
77,
11537,
198,
197,
197,
197,
197,
1370,
15853,
352,
198,
198,
2,
23520,
1981,
39191,
300,
71,
1073,
3696,
198,
4798,
705,
34,
25909,
16099,
986,
6,
198,
418,
13,
10057,
10786,
26224,
46866,
75,
71,
1073,
11537,
198,
198,
4798,
705,
13295,
49730,
8220,
2995,
7723,
290,
8574,
287,
16099,
2637,
198,
4798,
705,
6207,
13264,
318,
1844,
13,
59,
77,
6,
198
] | 2.899861 | 1,438 |
from django.db import models
from django.utils import timezone
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
198
] | 3.705882 | 17 |
import os
from copy import deepcopy
from abc import ABCMeta, abstractmethod, abstractproperty
import numpy as np
import pandas as pd
from rdkit import Chem
from rdkit.Chem.Descriptors import ExactMolWt
from rdkit.Chem import AllChem
from rdkit import DataStructs
from scipy import sparse as sp
from ..utils.tools import property_getter
class MolFragmentsLabel:
""" Label atoms in a molecule with the fragments they belong to. The fragment
library is built from PubChem fingerprint section 3 to section 7. The labels are
fingerprint like vectors for each atom of the molecule.
Args:
ref_file (str): path to the reference file (csv format) that contains the SMARTS
strings to match molecular fragments.
"""
ref_smarts = None
@classmethod
def create_labels_for(self, mol, sparse=True):
""" Create fragment labels for a molecule:
Args:
mol (SMILES str or RDKit Mol object): the molecule to create labels for.
sparse (bool): return the matrix in sparse format. Default: True.
"""
if isinstance(mol, str):
mol = Chem.MolFromSmiles(mol)
if mol is None:
raise ValueError(f"{mol} is not a valid SMILES string.")
# add hydrogens to the molecule
mol = Chem.AddHs(mol)
# initiate the vectors
labels = np.zeros((len(self.ref_smarts), mol.GetNumAtoms()), dtype=np.int)
# search for the fragments in the molecule
for i, pattern in enumerate(self.ref_smarts):
mat_substructs = mol.GetSubstructMatches(pattern)
# convert tuple of tuples to a set
mat_atoms = set()
for atoms in mat_substructs:
mat_atoms = mat_atoms.union(set(atoms))
mat_atoms = list(mat_atoms)
labels[i, mat_atoms] = 1
if sparse:
labels = sp.coo_matrix(labels)
return labels
| [
11748,
28686,
198,
6738,
4866,
1330,
2769,
30073,
198,
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396,
11,
12531,
26745,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
374,
67,
15813,
1330,
12870,
198,
6738,
374,
67,
15813,
13,
41829,
13,
24564,
1968,
669,
1330,
1475,
529,
44,
349,
54,
83,
198,
6738,
374,
67,
15813,
13,
41829,
1330,
1439,
41829,
198,
6738,
374,
67,
15813,
1330,
6060,
44909,
82,
198,
6738,
629,
541,
88,
1330,
29877,
355,
599,
198,
198,
6738,
11485,
26791,
13,
31391,
1330,
3119,
62,
1136,
353,
628,
198,
4871,
17958,
42974,
902,
33986,
25,
198,
220,
220,
220,
37227,
36052,
23235,
287,
257,
27756,
351,
262,
21441,
484,
5594,
284,
13,
383,
24225,
198,
220,
220,
220,
5888,
318,
3170,
422,
8525,
41829,
25338,
2665,
513,
284,
2665,
767,
13,
383,
14722,
389,
198,
220,
220,
220,
25338,
588,
30104,
329,
1123,
22037,
286,
262,
27756,
13,
198,
220,
220,
220,
220,
198,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
62,
7753,
357,
2536,
2599,
3108,
284,
262,
4941,
2393,
357,
40664,
5794,
8,
326,
4909,
262,
9447,
1503,
4694,
198,
220,
220,
220,
220,
220,
220,
220,
13042,
284,
2872,
18955,
21441,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1006,
62,
5796,
5889,
796,
6045,
628,
220,
220,
220,
2488,
4871,
24396,
628,
220,
220,
220,
825,
2251,
62,
23912,
1424,
62,
1640,
7,
944,
11,
18605,
11,
29877,
28,
17821,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
13610,
24225,
14722,
329,
257,
27756,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18605,
357,
12310,
4146,
1546,
965,
393,
31475,
20827,
17958,
2134,
2599,
262,
27756,
284,
2251,
14722,
329,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29877,
357,
30388,
2599,
1441,
262,
17593,
287,
29877,
5794,
13,
15161,
25,
6407,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
7,
43132,
11,
965,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18605,
796,
12870,
13,
44,
349,
4863,
7556,
2915,
7,
43132,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
18605,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
1,
90,
43132,
92,
318,
407,
257,
4938,
9447,
4146,
1546,
4731,
19570,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
751,
7409,
48686,
284,
262,
27756,
198,
220,
220,
220,
220,
220,
220,
220,
18605,
796,
12870,
13,
4550,
39,
82,
7,
43132,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
22118,
262,
30104,
198,
220,
220,
220,
220,
220,
220,
220,
14722,
796,
45941,
13,
9107,
418,
19510,
11925,
7,
944,
13,
5420,
62,
5796,
5889,
828,
18605,
13,
3855,
33111,
2953,
3150,
3419,
828,
288,
4906,
28,
37659,
13,
600,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2989,
329,
262,
21441,
287,
262,
27756,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
11,
3912,
287,
27056,
378,
7,
944,
13,
5420,
62,
5796,
5889,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2603,
62,
7266,
7249,
82,
796,
18605,
13,
3855,
7004,
7249,
19044,
2052,
7,
33279,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
10385,
46545,
286,
12777,
2374,
284,
257,
900,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2603,
62,
265,
3150,
796,
900,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
23235,
287,
2603,
62,
7266,
7249,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2603,
62,
265,
3150,
796,
2603,
62,
265,
3150,
13,
24592,
7,
2617,
7,
265,
3150,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2603,
62,
265,
3150,
796,
1351,
7,
6759,
62,
265,
3150,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14722,
58,
72,
11,
2603,
62,
265,
3150,
60,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
611,
29877,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14722,
796,
599,
13,
1073,
78,
62,
6759,
8609,
7,
23912,
1424,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
14722,
628,
198
] | 2.469697 | 792 |
import cv2
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import openpyxl
#Get pixel/distance (using ImageJ software) to output actual diameters of circles
dp = 1
accum_ratio = 1
min_dist = 5
p1 = 40
p2 = 30
minDiam = 1
maxDiam = 30
scalebar = 10
min_range = 0
max_range = 100
intervals = 10
rad_list =[]
detected_circles = []
dataForTable = {}
# pd.DataFrame(rad_list).to_excel('emulsions_D50_list_1.xlsx',header=False, index=False)
| [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
1280,
9078,
87,
75,
198,
198,
2,
3855,
17465,
14,
30246,
357,
3500,
7412,
41,
3788,
8,
284,
5072,
4036,
48428,
7307,
286,
13332,
198,
198,
26059,
796,
352,
198,
4134,
388,
62,
10366,
952,
796,
352,
198,
1084,
62,
17080,
796,
642,
198,
79,
16,
796,
2319,
198,
79,
17,
796,
1542,
198,
1084,
35,
1789,
796,
352,
198,
9806,
35,
1789,
796,
1542,
198,
9888,
5657,
796,
838,
198,
1084,
62,
9521,
796,
657,
198,
9806,
62,
9521,
796,
1802,
198,
3849,
12786,
796,
838,
198,
6335,
62,
4868,
796,
21737,
198,
15255,
11197,
62,
66,
343,
5427,
796,
17635,
198,
7890,
1890,
10962,
796,
23884,
628,
198,
220,
220,
220,
220,
628,
198,
220,
220,
1303,
279,
67,
13,
6601,
19778,
7,
6335,
62,
4868,
737,
1462,
62,
1069,
5276,
10786,
368,
5753,
507,
62,
35,
1120,
62,
4868,
62,
16,
13,
87,
7278,
87,
3256,
25677,
28,
25101,
11,
6376,
28,
25101,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
220
] | 2.441624 | 197 |
import numpy as np
import os, json, util
if __name__ == "__main__":
fit_whitepoint_matrices(util.find_data_directory())
| [
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
11,
33918,
11,
7736,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
4197,
62,
1929,
270,
538,
1563,
62,
6759,
45977,
7,
22602,
13,
19796,
62,
7890,
62,
34945,
28955,
198
] | 2.645833 | 48 |
from django.db import models
from django.conf import settings
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
201,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
201,
198,
220,
220,
220,
220
] | 3.090909 | 22 |
# Inital char for detecting incoming order's String.
INITIALCHAR = '$'
# Separates order string from device id.
IDENTIFIERCHART = ":"
# Device Id and function separator in order's String.
DEFUSEPARATOR = '/'
# Variable separator
VARSEPARATOR = '&'
# Final char for detecting the final order's string.
STOPCHAR = ';' | [
2,
554,
1287,
1149,
329,
31521,
15619,
1502,
338,
10903,
13,
198,
1268,
2043,
12576,
38019,
796,
705,
3,
6,
198,
198,
2,
8621,
283,
689,
1502,
4731,
422,
3335,
4686,
13,
198,
25256,
5064,
38311,
3398,
7227,
796,
366,
11097,
198,
198,
2,
16232,
5121,
290,
2163,
2880,
1352,
287,
1502,
338,
10903,
13,
198,
32988,
2937,
8905,
1503,
25633,
796,
31051,
6,
198,
198,
2,
35748,
2880,
1352,
198,
53,
1503,
5188,
27082,
25633,
796,
705,
5,
6,
198,
198,
2,
8125,
1149,
329,
31521,
262,
2457,
1502,
338,
4731,
13,
198,
2257,
3185,
38019,
796,
705,
26,
6
] | 3.158416 | 101 |
from .chance import by_chance # noqa
from .django import get_random_instance # noqa
from .django import get_random_instances # noqa
from .exceptions import EmptyListError # noqa
from .exceptions import NoObjectsError # noqa
from .generate import randint # noqa
from .generate import random_birthday # noqa
from .generate import random_number_str # noqa
from .generate import random_phone # noqa
from .generate import random_string # noqa
from .lists import pick_random_entry # noqa
from .lists import pop_random_entry # noqa
from .lists import randomly_filter # noqa
from .lists import scramble # noqa
| [
6738,
764,
39486,
1330,
416,
62,
39486,
220,
1303,
645,
20402,
198,
6738,
764,
28241,
14208,
1330,
651,
62,
25120,
62,
39098,
220,
1303,
645,
20402,
198,
6738,
764,
28241,
14208,
1330,
651,
62,
25120,
62,
8625,
1817,
220,
1303,
645,
20402,
198,
6738,
764,
1069,
11755,
1330,
33523,
8053,
12331,
220,
1303,
645,
20402,
198,
6738,
764,
1069,
11755,
1330,
1400,
10267,
82,
12331,
220,
1303,
645,
20402,
198,
6738,
764,
8612,
378,
1330,
43720,
600,
220,
1303,
645,
20402,
198,
6738,
764,
8612,
378,
1330,
4738,
62,
24280,
820,
220,
1303,
645,
20402,
198,
6738,
764,
8612,
378,
1330,
4738,
62,
17618,
62,
2536,
220,
1303,
645,
20402,
198,
6738,
764,
8612,
378,
1330,
4738,
62,
4862,
220,
1303,
645,
20402,
198,
6738,
764,
8612,
378,
1330,
4738,
62,
8841,
220,
1303,
645,
20402,
198,
6738,
764,
20713,
1330,
2298,
62,
25120,
62,
13000,
220,
1303,
645,
20402,
198,
6738,
764,
20713,
1330,
1461,
62,
25120,
62,
13000,
220,
1303,
645,
20402,
198,
6738,
764,
20713,
1330,
15456,
62,
24455,
220,
1303,
645,
20402,
198,
6738,
764,
20713,
1330,
36755,
220,
1303,
645,
20402,
198
] | 3.294118 | 187 |
import json
import uuid
from datetime import datetime
from unittest import mock
from urllib.parse import urlencode
import responses
from django.contrib.messages import get_messages
from django.test import TestCase
from django.urls import reverse
from registrations.forms import RegistrationDetailsForm
from registrations.models import ReferralLink
from registrations.tasks import (
send_registration_to_openhim,
send_registration_to_rapidpro,
)
| [
11748,
33918,
198,
11748,
334,
27112,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
555,
715,
395,
1330,
15290,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
2956,
11925,
8189,
198,
198,
11748,
9109,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
37348,
1095,
1330,
651,
62,
37348,
1095,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
198,
6738,
47997,
13,
23914,
1330,
24610,
24259,
8479,
198,
6738,
47997,
13,
27530,
1330,
33973,
1373,
11280,
198,
6738,
47997,
13,
83,
6791,
1330,
357,
198,
220,
220,
220,
3758,
62,
2301,
33397,
62,
1462,
62,
9654,
38400,
11,
198,
220,
220,
220,
3758,
62,
2301,
33397,
62,
1462,
62,
2416,
312,
1676,
11,
198,
8,
628,
628,
198
] | 3.55814 | 129 |
#imports
import csv
import json
import requests
import requests.utils
import requests.sessions
import urllib3
import sys
import traceback
import configparser
import logging
from urllib3.exceptions import InsecureRequestWarning
urllib3.disable_warnings(InsecureRequestWarning)
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
config = configparser.ConfigParser()
config.read('config.ini')
if __name__ == '__main__':
main() | [
2,
320,
3742,
198,
11748,
269,
21370,
198,
11748,
33918,
198,
11748,
7007,
198,
11748,
7007,
13,
26791,
198,
11748,
7007,
13,
82,
6202,
198,
11748,
2956,
297,
571,
18,
198,
11748,
25064,
198,
11748,
12854,
1891,
198,
11748,
4566,
48610,
198,
11748,
18931,
198,
198,
6738,
2956,
297,
571,
18,
13,
1069,
11755,
1330,
554,
22390,
18453,
20361,
198,
333,
297,
571,
18,
13,
40223,
62,
40539,
654,
7,
818,
22390,
18453,
20361,
8,
628,
198,
6404,
2667,
13,
35487,
16934,
7,
18982,
11639,
4,
7,
5715,
3672,
8,
82,
25,
4,
7,
20500,
8,
82,
3256,
1241,
28,
6404,
2667,
13,
30531,
8,
198,
11250,
796,
4566,
48610,
13,
16934,
46677,
3419,
198,
11250,
13,
961,
10786,
11250,
13,
5362,
11537,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
197,
12417,
3419
] | 3.257143 | 140 |
#!/usr/bin/env python
#
# Copyright 2014 Corgan Labs
# See LICENSE.txt for distribution terms
#
from hashlib import sha256
__base58_alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
__base58_radix = len(__base58_alphabet)
def __string_to_int(data):
"Convert string of bytes Python integer, MSB"
val = 0
for (i, c) in enumerate(data[::-1]):
val += (256**i)*ord(c)
return val
def encode(data):
"Encode string into Bitcoin base58"
enc = ''
val = __string_to_int(data)
while val >= __base58_radix:
val, mod = divmod(val, __base58_radix)
enc = __base58_alphabet[mod] + enc
if val:
enc = __base58_alphabet[val] + enc
# Pad for leading zeroes
n = len(data)-len(data.lstrip('\0'))
return __base58_alphabet[0]*n + enc
def check_encode(raw):
"Encode raw string into Bitcoin base58 with checksum"
chk = sha256(sha256(raw).digest()).digest()[:4]
return encode(raw+chk)
def decode(data):
"Decode Bitcoin base58 format to string"
val = 0
for (i, c) in enumerate(data[::-1]):
val += __base58_alphabet.find(c) * (__base58_radix**i)
dec = ''
while val >= 256:
val, mod = divmod(val, 256)
dec = chr(mod) + dec
if val:
dec = chr(val) + dec
return dec
def check_decode(enc):
"Decode string from Bitcoin base58 and test checksum"
dec = decode(enc)
raw, chk = dec[:-4], dec[-4:]
if chk != sha256(sha256(raw).digest()).digest()[:4]:
raise ValueError("base58 decoding checksum error")
else:
return raw
if __name__ == '__main__':
assert(__base58_radix == 58)
data = 'now is the time for all good men to come to the aid of their country'
enc = check_encode(data)
assert(check_decode(enc) == data)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
15069,
1946,
2744,
1030,
23500,
198,
2,
4091,
38559,
24290,
13,
14116,
329,
6082,
2846,
198,
2,
198,
198,
6738,
12234,
8019,
1330,
427,
64,
11645,
198,
198,
834,
8692,
3365,
62,
17307,
8380,
796,
705,
10163,
2231,
3134,
4531,
24694,
32988,
17511,
41,
42,
31288,
22182,
48,
49,
2257,
52,
30133,
34278,
57,
39305,
4299,
456,
45961,
10295,
404,
80,
81,
301,
14795,
86,
5431,
89,
6,
198,
834,
8692,
3365,
62,
6335,
844,
796,
18896,
7,
834,
8692,
3365,
62,
17307,
8380,
8,
628,
198,
4299,
11593,
8841,
62,
1462,
62,
600,
7,
7890,
2599,
198,
220,
220,
220,
366,
3103,
1851,
4731,
286,
9881,
11361,
18253,
11,
6579,
33,
1,
198,
220,
220,
220,
1188,
796,
657,
198,
220,
220,
220,
329,
357,
72,
11,
269,
8,
287,
27056,
378,
7,
7890,
58,
3712,
12,
16,
60,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1188,
15853,
357,
11645,
1174,
72,
27493,
585,
7,
66,
8,
198,
220,
220,
220,
1441,
1188,
628,
198,
4299,
37773,
7,
7890,
2599,
198,
220,
220,
220,
366,
4834,
8189,
4731,
656,
6185,
2779,
3365,
1,
198,
220,
220,
220,
2207,
796,
10148,
198,
220,
220,
220,
1188,
796,
11593,
8841,
62,
1462,
62,
600,
7,
7890,
8,
198,
220,
220,
220,
981,
1188,
18189,
11593,
8692,
3365,
62,
6335,
844,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1188,
11,
953,
796,
2659,
4666,
7,
2100,
11,
11593,
8692,
3365,
62,
6335,
844,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2207,
796,
11593,
8692,
3365,
62,
17307,
8380,
58,
4666,
60,
1343,
2207,
198,
220,
220,
220,
611,
1188,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2207,
796,
11593,
8692,
3365,
62,
17307,
8380,
58,
2100,
60,
1343,
2207,
628,
220,
220,
220,
1303,
15744,
329,
3756,
1976,
263,
3028,
198,
220,
220,
220,
299,
796,
18896,
7,
7890,
13219,
11925,
7,
7890,
13,
75,
36311,
10786,
59,
15,
6,
4008,
198,
220,
220,
220,
1441,
11593,
8692,
3365,
62,
17307,
8380,
58,
15,
60,
9,
77,
1343,
2207,
628,
198,
4299,
2198,
62,
268,
8189,
7,
1831,
2599,
198,
220,
220,
220,
366,
4834,
8189,
8246,
4731,
656,
6185,
2779,
3365,
351,
8794,
388,
1,
198,
220,
220,
220,
442,
74,
796,
427,
64,
11645,
7,
26270,
11645,
7,
1831,
737,
12894,
395,
3419,
737,
12894,
395,
3419,
58,
25,
19,
60,
198,
220,
220,
220,
1441,
37773,
7,
1831,
10,
354,
74,
8,
628,
198,
4299,
36899,
7,
7890,
2599,
198,
220,
220,
220,
366,
10707,
1098,
6185,
2779,
3365,
5794,
284,
4731,
1,
198,
220,
220,
220,
1188,
796,
657,
198,
220,
220,
220,
329,
357,
72,
11,
269,
8,
287,
27056,
378,
7,
7890,
58,
3712,
12,
16,
60,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1188,
15853,
11593,
8692,
3365,
62,
17307,
8380,
13,
19796,
7,
66,
8,
1635,
357,
834,
8692,
3365,
62,
6335,
844,
1174,
72,
8,
198,
220,
220,
220,
875,
796,
10148,
198,
220,
220,
220,
981,
1188,
18189,
17759,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1188,
11,
953,
796,
2659,
4666,
7,
2100,
11,
17759,
8,
198,
220,
220,
220,
220,
220,
220,
220,
875,
796,
442,
81,
7,
4666,
8,
1343,
875,
198,
220,
220,
220,
611,
1188,
25,
198,
220,
220,
220,
220,
220,
220,
220,
875,
796,
442,
81,
7,
2100,
8,
1343,
875,
198,
220,
220,
220,
1441,
875,
628,
198,
4299,
2198,
62,
12501,
1098,
7,
12685,
2599,
198,
220,
220,
220,
366,
10707,
1098,
4731,
422,
6185,
2779,
3365,
290,
1332,
8794,
388,
1,
198,
220,
220,
220,
875,
796,
36899,
7,
12685,
8,
198,
220,
220,
220,
8246,
11,
442,
74,
796,
875,
58,
21912,
19,
4357,
875,
58,
12,
19,
47715,
198,
220,
220,
220,
611,
442,
74,
14512,
427,
64,
11645,
7,
26270,
11645,
7,
1831,
737,
12894,
395,
3419,
737,
12894,
395,
3419,
58,
25,
19,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7203,
8692,
3365,
39938,
8794,
388,
4049,
4943,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
8246,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
6818,
7,
834,
8692,
3365,
62,
6335,
844,
6624,
7618,
8,
198,
220,
220,
220,
1366,
796,
705,
2197,
318,
262,
640,
329,
477,
922,
1450,
284,
1282,
284,
262,
6133,
286,
511,
1499,
6,
198,
220,
220,
220,
2207,
796,
2198,
62,
268,
8189,
7,
7890,
8,
198,
220,
220,
220,
6818,
7,
9122,
62,
12501,
1098,
7,
12685,
8,
6624,
1366,
8,
198
] | 2.305344 | 786 |
import pytest
from aiodisque import Disque, Job
from aiodisque.iterators import JobsIterator
@pytest.mark.asyncio
@pytest.mark.asyncio
@pytest.mark.asyncio
@pytest.mark.asyncio
| [
11748,
12972,
9288,
198,
6738,
257,
2101,
271,
4188,
1330,
3167,
4188,
11,
15768,
198,
6738,
257,
2101,
271,
4188,
13,
2676,
2024,
1330,
19161,
37787,
628,
198,
31,
9078,
9288,
13,
4102,
13,
292,
13361,
952,
628,
198,
31,
9078,
9288,
13,
4102,
13,
292,
13361,
952,
628,
198,
31,
9078,
9288,
13,
4102,
13,
292,
13361,
952,
628,
198,
31,
9078,
9288,
13,
4102,
13,
292,
13361,
952,
198
] | 2.605634 | 71 |
import os
from shutil import rmtree
from uuid import uuid1
from django.conf import settings
from django.core.cache import cache
from django.core.files.uploadedfile import SimpleUploadedFile
from django.test import TestCase, Client
from django.urls import reverse
from posts.models import Post, Group, User, Comment
| [
11748,
28686,
198,
6738,
4423,
346,
1330,
374,
16762,
631,
198,
6738,
334,
27112,
1330,
334,
27112,
16,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
7295,
13,
23870,
1330,
12940,
198,
6738,
42625,
14208,
13,
7295,
13,
16624,
13,
25850,
276,
7753,
1330,
17427,
41592,
276,
8979,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
11,
20985,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
198,
6738,
6851,
13,
27530,
1330,
2947,
11,
4912,
11,
11787,
11,
18957,
628
] | 3.573034 | 89 |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
data = np.loadtxt('Data1.txt')
dataset = pd.DataFrame({'No.':data[:]})
dataset.sort_values('No.',inplace=True)
dataset.hist(bins=50) # Exploring data
plt.show()
dataset.boxplot(vert=False)
plt.show()
Q1=np.percentile(dataset, [25]) # Calculating Quartiles
Q2=np.percentile(dataset, [50])
Q3=np.percentile(dataset, [75])
Iqr=np.percentile(dataset, [75])-np.percentile(dataset, [25])
print("1st quartile:",Q1,"\n2nd quartile:",Q2,"\n3rd quartile:",Q3)
print("Inter-quartile range:",Iqr)
x1= 1.5 * Iqr # Calculating Boundary for Outlier
x2= 3 * Iqr # Calculating Boundary for Extreme Outlier
w1= Q1 - x1 #Setting Outlier Whisker
w2= Q3 + x1
Ew1= Q1 - x2 # Setting Extreme Outlier Whisker
Ew2= Q3 + x2
o =[] # Outliers points
Eo=[] # Extreme Outlier points
for i in range(len(dataset)):
if dataset['No.'][i] >= w2 and dataset['No.'][i] <= Ew2:
o.append(dataset['No.'][i])
if dataset['No.'][i] <= w1 and dataset['No.'][i] >= Ew1:
o.append(dataset['No.'][i])
if dataset['No.'][i] >= Ew2 or dataset['No.'][i] <= Ew1 :
Eo.append(dataset['No.'][i])
print("Outlier points: ", len(o))
print("Extreme Outlier points: ", len(Eo))
| [
11748,
299,
32152,
355,
45941,
201,
198,
11748,
19798,
292,
355,
279,
67,
201,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
201,
198,
201,
198,
7890,
796,
45941,
13,
2220,
14116,
10786,
6601,
16,
13,
14116,
11537,
201,
198,
19608,
292,
316,
796,
279,
67,
13,
6601,
19778,
15090,
6,
2949,
2637,
25,
7890,
58,
47715,
30072,
201,
198,
19608,
292,
316,
13,
30619,
62,
27160,
10786,
2949,
2637,
11,
259,
5372,
28,
17821,
8,
201,
198,
201,
198,
19608,
292,
316,
13,
10034,
7,
65,
1040,
28,
1120,
8,
1303,
5905,
3255,
1366,
201,
198,
489,
83,
13,
12860,
3419,
201,
198,
19608,
292,
316,
13,
3524,
29487,
7,
1851,
28,
25101,
8,
201,
198,
489,
83,
13,
12860,
3419,
201,
198,
201,
198,
48,
16,
28,
37659,
13,
25067,
576,
7,
19608,
292,
316,
11,
685,
1495,
12962,
1303,
27131,
803,
48748,
2915,
201,
198,
48,
17,
28,
37659,
13,
25067,
576,
7,
19608,
292,
316,
11,
685,
1120,
12962,
201,
198,
48,
18,
28,
37659,
13,
25067,
576,
7,
19608,
292,
316,
11,
685,
2425,
12962,
201,
198,
40,
80,
81,
28,
37659,
13,
25067,
576,
7,
19608,
292,
316,
11,
685,
2425,
12962,
12,
37659,
13,
25067,
576,
7,
19608,
292,
316,
11,
685,
1495,
12962,
201,
198,
4798,
7203,
16,
301,
28176,
576,
25,
1600,
48,
16,
553,
59,
77,
17,
358,
28176,
576,
25,
1600,
48,
17,
553,
59,
77,
18,
4372,
28176,
576,
25,
1600,
48,
18,
8,
201,
198,
4798,
7203,
9492,
12,
36008,
576,
2837,
25,
1600,
40,
80,
81,
8,
201,
198,
201,
198,
87,
16,
28,
352,
13,
20,
1635,
314,
80,
81,
220,
220,
1303,
27131,
803,
30149,
560,
329,
3806,
2505,
201,
198,
87,
17,
28,
513,
1635,
314,
80,
81,
220,
220,
220,
220,
1303,
27131,
803,
30149,
560,
329,
18111,
3806,
2505,
201,
198,
201,
198,
86,
16,
28,
1195,
16,
532,
2124,
16,
220,
220,
220,
220,
1303,
34149,
3806,
2505,
854,
1984,
263,
201,
198,
86,
17,
28,
1195,
18,
1343,
2124,
16,
201,
198,
201,
198,
36,
86,
16,
28,
1195,
16,
532,
2124,
17,
220,
220,
220,
1303,
25700,
18111,
3806,
2505,
854,
1984,
263,
201,
198,
36,
86,
17,
28,
1195,
18,
1343,
2124,
17,
220,
201,
198,
201,
198,
78,
796,
21737,
1303,
3806,
75,
3183,
2173,
201,
198,
36,
78,
28,
21737,
1303,
18111,
3806,
2505,
2173,
201,
198,
1640,
1312,
287,
2837,
7,
11925,
7,
19608,
292,
316,
8,
2599,
201,
198,
220,
220,
220,
611,
27039,
17816,
2949,
2637,
7131,
72,
60,
18189,
266,
17,
290,
27039,
17816,
2949,
2637,
7131,
72,
60,
19841,
412,
86,
17,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
267,
13,
33295,
7,
19608,
292,
316,
17816,
2949,
2637,
7131,
72,
12962,
201,
198,
220,
220,
220,
611,
27039,
17816,
2949,
2637,
7131,
72,
60,
19841,
266,
16,
290,
27039,
17816,
2949,
2637,
7131,
72,
60,
18189,
412,
86,
16,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
267,
13,
33295,
7,
19608,
292,
316,
17816,
2949,
2637,
7131,
72,
12962,
201,
198,
220,
220,
220,
611,
27039,
17816,
2949,
2637,
7131,
72,
60,
18189,
412,
86,
17,
393,
27039,
17816,
2949,
2637,
7131,
72,
60,
19841,
412,
86,
16,
1058,
201,
198,
220,
220,
220,
220,
220,
220,
220,
412,
78,
13,
33295,
7,
19608,
292,
316,
17816,
2949,
2637,
7131,
72,
12962,
201,
198,
220,
220,
220,
220,
201,
198,
4798,
7203,
7975,
2505,
2173,
25,
33172,
18896,
7,
78,
4008,
201,
198,
4798,
7203,
36716,
3806,
2505,
2173,
25,
33172,
18896,
7,
36,
78,
4008,
201,
198
] | 2.123355 | 608 |
import cv2
import numpy as np
| [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198
] | 2.727273 | 11 |
from abc import abstractmethod
from ROAR.planning_module.abstract_planner import AbstractPlanner
from ROAR.control_module.controller import Controller
from ROAR.planning_module.behavior_planner.behavior_planner import BehaviorPlanner
from ROAR.planning_module.mission_planner.mission_planner import MissionPlanner
from typing import Optional
from ROAR.utilities_module.vehicle_models import VehicleControl
from collections import deque
| [
6738,
450,
66,
1330,
12531,
24396,
198,
6738,
15107,
1503,
13,
11578,
768,
62,
21412,
13,
397,
8709,
62,
11578,
1008,
1330,
27741,
20854,
1008,
198,
6738,
15107,
1503,
13,
13716,
62,
21412,
13,
36500,
1330,
22741,
198,
6738,
15107,
1503,
13,
11578,
768,
62,
21412,
13,
46571,
62,
11578,
1008,
13,
46571,
62,
11578,
1008,
1330,
20181,
20854,
1008,
198,
6738,
15107,
1503,
13,
11578,
768,
62,
21412,
13,
3411,
62,
11578,
1008,
13,
3411,
62,
11578,
1008,
1330,
12633,
20854,
1008,
198,
6738,
19720,
1330,
32233,
198,
6738,
15107,
1503,
13,
315,
2410,
62,
21412,
13,
33892,
1548,
62,
27530,
1330,
21501,
15988,
198,
6738,
17268,
1330,
390,
4188,
628
] | 3.901786 | 112 |
import argparse
import csv
import re
from datetime import datetime, timedelta
from decimal import Decimal
import pytz
from core_data_modules.logging import Logger
from dateutil.parser import isoparse
from rapid_pro_tools.rapid_pro_client import RapidProClient
from storage.google_cloud import google_cloud_utils
log = Logger(__name__)
TARGET_SHORTCODE = "378"
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Uses Rapid Pro's message logs to filter a Hormuud recovery csv for incoming messages on this "
"short code that aren't in Rapid Pro. Attempts to identify messages that have already been "
"received in Rapid Pro by (i) looking for exact text matches, then (ii) looking for matches after "
"applying Excel's data-mangling algorithms, then (iii) matching by timestamp. "
"Matches made by method (iii) are exported for manual review")
parser.add_argument("google_cloud_credentials_file_path", metavar="google-cloud-credentials-file-path",
help="Path to a Google Cloud service account credentials file to use to access the "
"credentials bucket")
parser.add_argument("rapid_pro_domain", metavar="rapid-pro-domain",
help="URL of the Rapid Pro server to download data from")
parser.add_argument("rapid_pro_token_file_url", metavar="rapid-pro-token-file-url",
help="GS URL of a text file containing the authorisation token for the Rapid Pro server")
parser.add_argument("start_date", metavar="start-date",
help="Timestamp to filter both datasets by (inclusive), as an ISO8601 str")
parser.add_argument("end_date", metavar="end-date",
help="Timestamp to filter both datasets by (exclusive), as an ISO8601 str")
parser.add_argument("hormuud_csv_input_path", metavar="hormuud-csv-input-path",
help="Path to a CSV file issued by Hormuud to recover messages from")
parser.add_argument("timestamp_matches_log_output_csv_path", metavar="timestamp-matches-log-output-csv-path",
help="File to log the matches made between the Rapid Pro and recovery datasets by timestamp, "
"for manual review and approval")
parser.add_argument("output_csv_path", metavar="output-csv-path",
help="File to write the filtered, recovered data to, in a format ready for de-identification "
"and integration into the pipeline")
args = parser.parse_args()
google_cloud_credentials_file_path = args.google_cloud_credentials_file_path
rapid_pro_domain = args.rapid_pro_domain
rapid_pro_token_file_url = args.rapid_pro_token_file_url
start_date = isoparse(args.start_date)
end_date = isoparse(args.end_date)
hormuud_csv_input_path = args.hormuud_csv_input_path
timestamp_matches_log_output_csv_path = args.timestamp_matches_log_output_csv_path
output_csv_path = args.output_csv_path
# Get messages from Rapid Pro and from the recovery csv
rapid_pro_messages = get_incoming_hormuud_messages_from_rapid_pro(
google_cloud_credentials_file_path, rapid_pro_domain, rapid_pro_token_file_url,
created_after_inclusive=start_date,
created_before_exclusive=end_date,
)
all_rapid_pro_messages = rapid_pro_messages
recovered_messages = get_incoming_hormuud_messages_from_recovery_csv(
hormuud_csv_input_path, received_after_inclusive=start_date, received_before_exclusive=end_date
)
# Group the messages by the sender's urn, and store in container dicts where we can write the best matching Rapid
# Pro message to when we find it.
recovered_lut = dict() # of urn -> list of recovered message dict
recovered_messages.sort(key=lambda msg: msg["timestamp"])
for msg in recovered_messages:
urn = msg["Sender"]
if urn not in recovered_lut:
recovered_lut[urn] = []
recovered_lut[urn].append({
"recovered_message": msg,
"rapid_pro_message": None
})
# Search the recovered messages for exact text matches to each of the Rapid Pro messages.
# A Rapid Pro message matches a message in the recovery csv if:
# (i) the recovery csv message has no match yet,
# (ii) the text exactly matches, and
# (iii) the time at Hormuud differs from the time at Rapid Pro by < 5 minutes (experimental analysis of this
# dataset showed the mean lag to be roughly 3-4 mins, with >99.99% of messages received within 4 minutes)
log.info(f"Attempting to match the Rapid Pro messages with the recovered messages...")
rapid_pro_messages.sort(key=lambda msg: msg.sent_on)
unmatched_messages = []
skipped_messages = []
for rapid_pro_msg in rapid_pro_messages:
rapid_pro_text = rapid_pro_msg.text
if rapid_pro_msg.urn not in recovered_lut:
log.warning(f"URN {rapid_pro_msg.urn} not found in the recovered_lut")
skipped_messages.append(rapid_pro_msg)
continue
for recovery_item in recovered_lut[rapid_pro_msg.urn]:
if recovery_item["rapid_pro_message"] is None and \
recovery_item["recovered_message"]["Message"] == rapid_pro_text and \
rapid_pro_msg.sent_on - recovery_item["recovered_message"]["timestamp"] < timedelta(minutes=5):
recovery_item["rapid_pro_message"] = rapid_pro_msg
break
else:
unmatched_messages.append(rapid_pro_msg)
log.info(f"Attempted to perform exact matches for {len(rapid_pro_messages)} Rapid Pro messages: "
f"{len(rapid_pro_messages) - len(unmatched_messages)} matched successfully, "
f"{len(skipped_messages)} messages skipped due to their urns not being present in the recovery csv, "
f"{len(unmatched_messages)} unmatched messages remain")
# Attempt to find matches after simulating Excel-mangling of some of the data.
rapid_pro_messages = unmatched_messages
unmatched_messages = []
for rapid_pro_msg in rapid_pro_messages:
rapid_pro_text = rapid_pro_msg.text
rapid_pro_text = rapid_pro_text.replace("\n", " ") # newlines -> spaces
if re.compile("^\\s*[0-9][0-9]*\\s*$").match(rapid_pro_text):
rapid_pro_text = rapid_pro_text.strip() # numbers with whitespace -> just the number
if rapid_pro_text.startswith("0"):
rapid_pro_text = rapid_pro_text[1:] # replace leading 0
if Decimal(rapid_pro_text) > 1000000000:
rapid_pro_text = f"{Decimal(rapid_pro_text):.14E}" # big numbers -> scientific notation
if re.compile("^\".*\"$").match(rapid_pro_text):
rapid_pro_text = rapid_pro_text.replace("\"", "") # strictly quoted text -> just the text
rapid_pro_text = rapid_pro_text.encode("ascii", "replace").decode("ascii") # non-ascii characters -> '?'
for recovery_item in recovered_lut[rapid_pro_msg.urn]:
if recovery_item["rapid_pro_message"] is None and \
recovery_item["recovered_message"]["Message"] == rapid_pro_text and \
rapid_pro_msg.sent_on - recovery_item["recovered_message"]["timestamp"] < timedelta(minutes=5):
recovery_item["rapid_pro_message"] = rapid_pro_msg
break
else:
unmatched_messages.append(rapid_pro_msg)
log.info(f"Attempted to perform Excel-mangled matches for {len(rapid_pro_messages)} Rapid Pro messages: "
f"{len(rapid_pro_messages) - len(unmatched_messages)} matched successfully, "
f"{len(unmatched_messages)} unmatched messages remain")
# Finally, search by timestamp, and export these to a log file for manual review.
# This covers all sorts of weird edge cases, mostly around Hormuud/Excel's handling of special characters.
rapid_pro_messages = unmatched_messages
unmatched_messages = []
with open(timestamp_matches_log_output_csv_path, "w") as f:
writer = csv.DictWriter(f, fieldnames=["Rapid Pro", "Hormuud Recovery"])
writer.writeheader()
for rapid_pro_msg in rapid_pro_messages:
for recovery_item in recovered_lut[rapid_pro_msg.urn]:
if recovery_item["rapid_pro_message"] is None and \
rapid_pro_msg.sent_on - recovery_item["recovered_message"]["timestamp"] < timedelta(minutes=5):
writer.writerow({
"Rapid Pro": rapid_pro_msg.text,
"Hormuud Recovery": recovery_item["recovered_message"]["Message"]
})
recovery_item["rapid_pro_message"] = rapid_pro_msg
break
else:
unmatched_messages.append(rapid_pro_msg)
log.info(f"Attempted to perform timestamp matching for {len(rapid_pro_messages)} Rapid Pro messages: "
f"{len(rapid_pro_messages) - len(unmatched_messages)} matched successfully, "
f"{len(unmatched_messages)} unmatched messages remain")
log.info(f"Wrote the timestamp-based matches to {timestamp_matches_log_output_csv_path} for manual verification. "
f"Please check these carefully")
if len(unmatched_messages) > 0:
log.error(f"{len(unmatched_messages)} unmatched messages remain after attempting all automated matching "
f"techniques")
print(unmatched_messages[0].serialize())
exit(1)
# Get the recovered messages that don't have a matching message from Rapid Pro
unmatched_recovered_messages = []
matched_recovered_messages = []
for urn in recovered_lut:
for recovery_item in recovered_lut[urn]:
if recovery_item["rapid_pro_message"] is None:
unmatched_recovered_messages.append(recovery_item["recovered_message"])
else:
matched_recovered_messages.append(recovery_item["recovered_message"])
log.info(f"Found {len(unmatched_recovered_messages)} recovered messages that had no match in Rapid Pro "
f"(and {len(matched_recovered_messages)} that did have a match)")
expected_unmatched_messages_count = len(recovered_messages) - len(all_rapid_pro_messages) + len(skipped_messages)
log.info(f"Total expected unmatched messages was {expected_unmatched_messages_count}")
if expected_unmatched_messages_count != len(unmatched_recovered_messages):
log.error("Number of unmatched messages != expected number of unmatched messages")
exit(1)
# Export to a csv that can be processed by de_identify_csv.py
log.info(f"Exporting unmatched recovered messages to {output_csv_path}")
with open(output_csv_path, "w") as f:
writer = csv.DictWriter(f, fieldnames=["Sender", "Receiver", "Message", "ReceivedOn"])
writer.writeheader()
for msg in unmatched_recovered_messages:
writer.writerow({
"Sender": msg["Sender"],
"Receiver": msg["Receiver"],
"Message": msg["Message"],
"ReceivedOn": msg["ReceivedOn"]
})
| [
11748,
1822,
29572,
198,
11748,
269,
21370,
198,
11748,
302,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
6738,
32465,
1330,
4280,
4402,
198,
198,
11748,
12972,
22877,
198,
6738,
4755,
62,
7890,
62,
18170,
13,
6404,
2667,
1330,
5972,
1362,
198,
6738,
3128,
22602,
13,
48610,
1330,
318,
404,
17208,
198,
6738,
5801,
62,
1676,
62,
31391,
13,
2416,
312,
62,
1676,
62,
16366,
1330,
26430,
2964,
11792,
198,
6738,
6143,
13,
13297,
62,
17721,
1330,
23645,
62,
17721,
62,
26791,
198,
198,
6404,
796,
5972,
1362,
7,
834,
3672,
834,
8,
198,
198,
51,
46095,
62,
9693,
1581,
4825,
16820,
796,
366,
30695,
1,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
198,
220,
220,
220,
220,
220,
220,
220,
6764,
2625,
5842,
274,
26430,
1041,
338,
3275,
17259,
284,
8106,
257,
367,
579,
84,
463,
7628,
269,
21370,
329,
15619,
6218,
319,
428,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
19509,
2438,
326,
3588,
470,
287,
26430,
1041,
13,
25770,
82,
284,
5911,
6218,
326,
423,
1541,
587,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
47844,
287,
26430,
1041,
416,
357,
72,
8,
2045,
329,
2748,
2420,
7466,
11,
788,
357,
4178,
8,
2045,
329,
7466,
706,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1324,
3157,
24134,
338,
1366,
12,
76,
27499,
16113,
11,
788,
357,
15479,
8,
12336,
416,
41033,
13,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
19044,
2052,
925,
416,
2446,
357,
15479,
8,
389,
29050,
329,
10107,
2423,
4943,
628,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
13297,
62,
17721,
62,
66,
445,
14817,
62,
7753,
62,
6978,
1600,
1138,
615,
283,
2625,
13297,
12,
17721,
12,
66,
445,
14817,
12,
7753,
12,
6978,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
15235,
284,
257,
3012,
10130,
2139,
1848,
18031,
2393,
284,
779,
284,
1895,
262,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
66,
445,
14817,
19236,
4943,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
2416,
312,
62,
1676,
62,
27830,
1600,
1138,
615,
283,
2625,
2416,
312,
12,
1676,
12,
27830,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
21886,
286,
262,
26430,
1041,
4382,
284,
4321,
1366,
422,
4943,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
2416,
312,
62,
1676,
62,
30001,
62,
7753,
62,
6371,
1600,
1138,
615,
283,
2625,
2416,
312,
12,
1676,
12,
30001,
12,
7753,
12,
6371,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
14313,
10289,
286,
257,
2420,
2393,
7268,
262,
1772,
5612,
11241,
329,
262,
26430,
1041,
4382,
4943,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
9688,
62,
4475,
1600,
1138,
615,
283,
2625,
9688,
12,
4475,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
14967,
27823,
284,
8106,
1111,
40522,
416,
357,
259,
5731,
828,
355,
281,
19694,
4521,
486,
965,
4943,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
437,
62,
4475,
1600,
1138,
615,
283,
2625,
437,
12,
4475,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
14967,
27823,
284,
8106,
1111,
40522,
416,
357,
41195,
828,
355,
281,
19694,
4521,
486,
965,
4943,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
71,
579,
84,
463,
62,
40664,
62,
15414,
62,
6978,
1600,
1138,
615,
283,
2625,
71,
579,
84,
463,
12,
40664,
12,
15414,
12,
6978,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
15235,
284,
257,
44189,
2393,
4884,
416,
367,
579,
84,
463,
284,
8551,
6218,
422,
4943,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
16514,
27823,
62,
6759,
2052,
62,
6404,
62,
22915,
62,
40664,
62,
6978,
1600,
1138,
615,
283,
2625,
16514,
27823,
12,
6759,
2052,
12,
6404,
12,
22915,
12,
40664,
12,
6978,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
8979,
284,
2604,
262,
7466,
925,
1022,
262,
26430,
1041,
290,
7628,
40522,
416,
41033,
11,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1640,
10107,
2423,
290,
7546,
4943,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
22915,
62,
40664,
62,
6978,
1600,
1138,
615,
283,
2625,
22915,
12,
40664,
12,
6978,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
8979,
284,
3551,
262,
29083,
11,
11911,
1366,
284,
11,
287,
257,
5794,
3492,
329,
390,
12,
738,
2649,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
392,
11812,
656,
262,
11523,
4943,
628,
220,
220,
220,
26498,
796,
30751,
13,
29572,
62,
22046,
3419,
628,
220,
220,
220,
23645,
62,
17721,
62,
66,
445,
14817,
62,
7753,
62,
6978,
796,
26498,
13,
13297,
62,
17721,
62,
66,
445,
14817,
62,
7753,
62,
6978,
198,
220,
220,
220,
5801,
62,
1676,
62,
27830,
796,
26498,
13,
2416,
312,
62,
1676,
62,
27830,
198,
220,
220,
220,
5801,
62,
1676,
62,
30001,
62,
7753,
62,
6371,
796,
26498,
13,
2416,
312,
62,
1676,
62,
30001,
62,
7753,
62,
6371,
198,
220,
220,
220,
923,
62,
4475,
796,
318,
404,
17208,
7,
22046,
13,
9688,
62,
4475,
8,
198,
220,
220,
220,
886,
62,
4475,
796,
318,
404,
17208,
7,
22046,
13,
437,
62,
4475,
8,
198,
220,
220,
220,
12241,
84,
463,
62,
40664,
62,
15414,
62,
6978,
796,
26498,
13,
71,
579,
84,
463,
62,
40664,
62,
15414,
62,
6978,
198,
220,
220,
220,
41033,
62,
6759,
2052,
62,
6404,
62,
22915,
62,
40664,
62,
6978,
796,
26498,
13,
16514,
27823,
62,
6759,
2052,
62,
6404,
62,
22915,
62,
40664,
62,
6978,
198,
220,
220,
220,
5072,
62,
40664,
62,
6978,
796,
26498,
13,
22915,
62,
40664,
62,
6978,
628,
220,
220,
220,
1303,
3497,
6218,
422,
26430,
1041,
290,
422,
262,
7628,
269,
21370,
198,
220,
220,
220,
5801,
62,
1676,
62,
37348,
1095,
796,
651,
62,
259,
4976,
62,
71,
579,
84,
463,
62,
37348,
1095,
62,
6738,
62,
2416,
312,
62,
1676,
7,
198,
220,
220,
220,
220,
220,
220,
220,
23645,
62,
17721,
62,
66,
445,
14817,
62,
7753,
62,
6978,
11,
5801,
62,
1676,
62,
27830,
11,
5801,
62,
1676,
62,
30001,
62,
7753,
62,
6371,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2727,
62,
8499,
62,
259,
5731,
28,
9688,
62,
4475,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2727,
62,
19052,
62,
41195,
28,
437,
62,
4475,
11,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
477,
62,
2416,
312,
62,
1676,
62,
37348,
1095,
796,
5801,
62,
1676,
62,
37348,
1095,
628,
220,
220,
220,
11911,
62,
37348,
1095,
796,
651,
62,
259,
4976,
62,
71,
579,
84,
463,
62,
37348,
1095,
62,
6738,
62,
260,
1073,
548,
62,
40664,
7,
198,
220,
220,
220,
220,
220,
220,
220,
12241,
84,
463,
62,
40664,
62,
15414,
62,
6978,
11,
2722,
62,
8499,
62,
259,
5731,
28,
9688,
62,
4475,
11,
2722,
62,
19052,
62,
41195,
28,
437,
62,
4475,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
1303,
4912,
262,
6218,
416,
262,
29788,
338,
220,
700,
11,
290,
3650,
287,
9290,
8633,
82,
810,
356,
460,
3551,
262,
1266,
12336,
26430,
198,
220,
220,
220,
1303,
1041,
3275,
284,
618,
356,
1064,
340,
13,
198,
220,
220,
220,
11911,
62,
75,
315,
796,
8633,
3419,
220,
1303,
286,
220,
700,
4613,
1351,
286,
11911,
3275,
8633,
198,
220,
220,
220,
11911,
62,
37348,
1095,
13,
30619,
7,
2539,
28,
50033,
31456,
25,
31456,
14692,
16514,
27823,
8973,
8,
198,
220,
220,
220,
329,
31456,
287,
11911,
62,
37348,
1095,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
700,
796,
31456,
14692,
50,
2194,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
611,
220,
700,
407,
287,
11911,
62,
75,
315,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11911,
62,
75,
315,
58,
700,
60,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
11911,
62,
75,
315,
58,
700,
4083,
33295,
15090,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8344,
2557,
62,
20500,
1298,
31456,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
2416,
312,
62,
1676,
62,
20500,
1298,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
32092,
628,
220,
220,
220,
1303,
11140,
262,
11911,
6218,
329,
2748,
2420,
7466,
284,
1123,
286,
262,
26430,
1041,
6218,
13,
198,
220,
220,
220,
1303,
317,
26430,
1041,
3275,
7466,
257,
3275,
287,
262,
7628,
269,
21370,
611,
25,
198,
220,
220,
220,
1303,
357,
72,
8,
220,
220,
262,
7628,
269,
21370,
3275,
468,
645,
2872,
1865,
11,
198,
220,
220,
220,
1303,
357,
4178,
8,
220,
262,
2420,
3446,
7466,
11,
290,
198,
220,
220,
220,
1303,
357,
15479,
8,
262,
640,
379,
367,
579,
84,
463,
24242,
422,
262,
640,
379,
26430,
1041,
416,
1279,
642,
2431,
357,
23100,
9134,
3781,
286,
428,
198,
220,
220,
220,
1303,
27039,
3751,
262,
1612,
19470,
284,
307,
7323,
513,
12,
19,
23550,
11,
351,
1875,
2079,
13,
2079,
4,
286,
6218,
2722,
1626,
604,
2431,
8,
198,
220,
220,
220,
2604,
13,
10951,
7,
69,
1,
37177,
278,
284,
2872,
262,
26430,
1041,
6218,
351,
262,
11911,
6218,
9313,
8,
198,
220,
220,
220,
5801,
62,
1676,
62,
37348,
1095,
13,
30619,
7,
2539,
28,
50033,
31456,
25,
31456,
13,
34086,
62,
261,
8,
198,
220,
220,
220,
48621,
62,
37348,
1095,
796,
17635,
198,
220,
220,
220,
26684,
62,
37348,
1095,
796,
17635,
198,
220,
220,
220,
329,
5801,
62,
1676,
62,
19662,
287,
5801,
62,
1676,
62,
37348,
1095,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5801,
62,
1676,
62,
5239,
796,
5801,
62,
1676,
62,
19662,
13,
5239,
628,
220,
220,
220,
220,
220,
220,
220,
611,
5801,
62,
1676,
62,
19662,
13,
700,
407,
287,
11911,
62,
75,
315,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
43917,
7,
69,
1,
27064,
1391,
2416,
312,
62,
1676,
62,
19662,
13,
700,
92,
407,
1043,
287,
262,
11911,
62,
75,
315,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26684,
62,
37348,
1095,
13,
33295,
7,
2416,
312,
62,
1676,
62,
19662,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2555,
628,
220,
220,
220,
220,
220,
220,
220,
329,
7628,
62,
9186,
287,
11911,
62,
75,
315,
58,
2416,
312,
62,
1676,
62,
19662,
13,
700,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
7628,
62,
9186,
14692,
2416,
312,
62,
1676,
62,
20500,
8973,
318,
6045,
290,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7628,
62,
9186,
14692,
8344,
2557,
62,
20500,
1,
7131,
1,
12837,
8973,
6624,
5801,
62,
1676,
62,
5239,
290,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5801,
62,
1676,
62,
19662,
13,
34086,
62,
261,
532,
7628,
62,
9186,
14692,
8344,
2557,
62,
20500,
1,
7131,
1,
16514,
27823,
8973,
1279,
28805,
12514,
7,
1084,
1769,
28,
20,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7628,
62,
9186,
14692,
2416,
312,
62,
1676,
62,
20500,
8973,
796,
5801,
62,
1676,
62,
19662,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48621,
62,
37348,
1095,
13,
33295,
7,
2416,
312,
62,
1676,
62,
19662,
8,
198,
220,
220,
220,
2604,
13,
10951,
7,
69,
1,
37177,
276,
284,
1620,
2748,
7466,
329,
1391,
11925,
7,
2416,
312,
62,
1676,
62,
37348,
1095,
38165,
26430,
1041,
6218,
25,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
90,
11925,
7,
2416,
312,
62,
1676,
62,
37348,
1095,
8,
532,
18896,
7,
403,
31409,
62,
37348,
1095,
38165,
14451,
7675,
11,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
90,
11925,
7,
8135,
3949,
62,
37348,
1095,
38165,
6218,
26684,
2233,
284,
511,
220,
700,
82,
407,
852,
1944,
287,
262,
7628,
269,
21370,
11,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
90,
11925,
7,
403,
31409,
62,
37348,
1095,
38165,
48621,
6218,
3520,
4943,
628,
220,
220,
220,
1303,
25770,
284,
1064,
7466,
706,
985,
8306,
24134,
12,
76,
27499,
286,
617,
286,
262,
1366,
13,
198,
220,
220,
220,
5801,
62,
1676,
62,
37348,
1095,
796,
48621,
62,
37348,
1095,
198,
220,
220,
220,
48621,
62,
37348,
1095,
796,
17635,
198,
220,
220,
220,
329,
5801,
62,
1676,
62,
19662,
287,
5801,
62,
1676,
62,
37348,
1095,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5801,
62,
1676,
62,
5239,
796,
5801,
62,
1676,
62,
19662,
13,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
5801,
62,
1676,
62,
5239,
796,
5801,
62,
1676,
62,
5239,
13,
33491,
7203,
59,
77,
1600,
366,
366,
8,
220,
1303,
649,
6615,
4613,
9029,
198,
220,
220,
220,
220,
220,
220,
220,
611,
302,
13,
5589,
576,
7203,
61,
6852,
82,
9,
58,
15,
12,
24,
7131,
15,
12,
24,
60,
9,
6852,
82,
9,
3,
11074,
15699,
7,
2416,
312,
62,
1676,
62,
5239,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5801,
62,
1676,
62,
5239,
796,
5801,
62,
1676,
62,
5239,
13,
36311,
3419,
220,
1303,
3146,
351,
13216,
10223,
4613,
655,
262,
1271,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5801,
62,
1676,
62,
5239,
13,
9688,
2032,
342,
7203,
15,
1,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5801,
62,
1676,
62,
5239,
796,
5801,
62,
1676,
62,
5239,
58,
16,
47715,
220,
1303,
6330,
3756,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
4280,
4402,
7,
2416,
312,
62,
1676,
62,
5239,
8,
1875,
1802,
24598,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5801,
62,
1676,
62,
5239,
796,
277,
1,
90,
10707,
4402,
7,
2416,
312,
62,
1676,
62,
5239,
2599,
13,
1415,
36,
36786,
220,
1303,
1263,
3146,
4613,
5654,
33274,
198,
220,
220,
220,
220,
220,
220,
220,
611,
302,
13,
5589,
576,
7203,
61,
59,
1911,
9,
7879,
3,
11074,
15699,
7,
2416,
312,
62,
1676,
62,
5239,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5801,
62,
1676,
62,
5239,
796,
5801,
62,
1676,
62,
5239,
13,
33491,
7203,
7879,
1600,
366,
4943,
220,
1303,
14084,
10947,
2420,
4613,
655,
262,
2420,
198,
220,
220,
220,
220,
220,
220,
220,
5801,
62,
1676,
62,
5239,
796,
5801,
62,
1676,
62,
5239,
13,
268,
8189,
7203,
292,
979,
72,
1600,
366,
33491,
11074,
12501,
1098,
7203,
292,
979,
72,
4943,
220,
1303,
1729,
12,
292,
979,
72,
3435,
4613,
705,
8348,
628,
220,
220,
220,
220,
220,
220,
220,
329,
7628,
62,
9186,
287,
11911,
62,
75,
315,
58,
2416,
312,
62,
1676,
62,
19662,
13,
700,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
7628,
62,
9186,
14692,
2416,
312,
62,
1676,
62,
20500,
8973,
318,
6045,
290,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7628,
62,
9186,
14692,
8344,
2557,
62,
20500,
1,
7131,
1,
12837,
8973,
6624,
5801,
62,
1676,
62,
5239,
290,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5801,
62,
1676,
62,
19662,
13,
34086,
62,
261,
532,
7628,
62,
9186,
14692,
8344,
2557,
62,
20500,
1,
7131,
1,
16514,
27823,
8973,
1279,
28805,
12514,
7,
1084,
1769,
28,
20,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7628,
62,
9186,
14692,
2416,
312,
62,
1676,
62,
20500,
8973,
796,
5801,
62,
1676,
62,
19662,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48621,
62,
37348,
1095,
13,
33295,
7,
2416,
312,
62,
1676,
62,
19662,
8,
198,
220,
220,
220,
2604,
13,
10951,
7,
69,
1,
37177,
276,
284,
1620,
24134,
12,
76,
22393,
7466,
329,
1391,
11925,
7,
2416,
312,
62,
1676,
62,
37348,
1095,
38165,
26430,
1041,
6218,
25,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
90,
11925,
7,
2416,
312,
62,
1676,
62,
37348,
1095,
8,
532,
18896,
7,
403,
31409,
62,
37348,
1095,
38165,
14451,
7675,
11,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
90,
11925,
7,
403,
31409,
62,
37348,
1095,
38165,
48621,
6218,
3520,
4943,
628,
220,
220,
220,
1303,
9461,
11,
2989,
416,
41033,
11,
290,
10784,
777,
284,
257,
2604,
2393,
329,
10107,
2423,
13,
198,
220,
220,
220,
1303,
770,
8698,
477,
10524,
286,
7650,
5743,
2663,
11,
4632,
1088,
367,
579,
84,
463,
14,
3109,
5276,
338,
9041,
286,
2041,
3435,
13,
198,
220,
220,
220,
5801,
62,
1676,
62,
37348,
1095,
796,
48621,
62,
37348,
1095,
198,
220,
220,
220,
48621,
62,
37348,
1095,
796,
17635,
198,
220,
220,
220,
351,
1280,
7,
16514,
27823,
62,
6759,
2052,
62,
6404,
62,
22915,
62,
40664,
62,
6978,
11,
366,
86,
4943,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6260,
796,
269,
21370,
13,
35,
713,
34379,
7,
69,
11,
2214,
14933,
28,
14692,
35230,
312,
1041,
1600,
366,
39,
579,
84,
463,
21007,
8973,
8,
198,
220,
220,
220,
220,
220,
220,
220,
6260,
13,
13564,
25677,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
329,
5801,
62,
1676,
62,
19662,
287,
5801,
62,
1676,
62,
37348,
1095,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
7628,
62,
9186,
287,
11911,
62,
75,
315,
58,
2416,
312,
62,
1676,
62,
19662,
13,
700,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
7628,
62,
9186,
14692,
2416,
312,
62,
1676,
62,
20500,
8973,
318,
6045,
290,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5801,
62,
1676,
62,
19662,
13,
34086,
62,
261,
532,
7628,
62,
9186,
14692,
8344,
2557,
62,
20500,
1,
7131,
1,
16514,
27823,
8973,
1279,
28805,
12514,
7,
1084,
1769,
28,
20,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
13,
16002,
322,
15090,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
35230,
312,
1041,
1298,
5801,
62,
1676,
62,
19662,
13,
5239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
39,
579,
84,
463,
21007,
1298,
7628,
62,
9186,
14692,
8344,
2557,
62,
20500,
1,
7131,
1,
12837,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
32092,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7628,
62,
9186,
14692,
2416,
312,
62,
1676,
62,
20500,
8973,
796,
5801,
62,
1676,
62,
19662,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48621,
62,
37348,
1095,
13,
33295,
7,
2416,
312,
62,
1676,
62,
19662,
8,
198,
220,
220,
220,
2604,
13,
10951,
7,
69,
1,
37177,
276,
284,
1620,
41033,
12336,
329,
1391,
11925,
7,
2416,
312,
62,
1676,
62,
37348,
1095,
38165,
26430,
1041,
6218,
25,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
90,
11925,
7,
2416,
312,
62,
1676,
62,
37348,
1095,
8,
532,
18896,
7,
403,
31409,
62,
37348,
1095,
38165,
14451,
7675,
11,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
90,
11925,
7,
403,
31409,
62,
37348,
1095,
38165,
48621,
6218,
3520,
4943,
198,
220,
220,
220,
2604,
13,
10951,
7,
69,
1,
54,
2519,
262,
41033,
12,
3106,
7466,
284,
1391,
16514,
27823,
62,
6759,
2052,
62,
6404,
62,
22915,
62,
40664,
62,
6978,
92,
329,
10107,
19637,
13,
366,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
5492,
2198,
777,
7773,
4943,
628,
220,
220,
220,
611,
18896,
7,
403,
31409,
62,
37348,
1095,
8,
1875,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
18224,
7,
69,
1,
90,
11925,
7,
403,
31409,
62,
37348,
1095,
38165,
48621,
6218,
3520,
706,
9361,
477,
16359,
12336,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
23873,
6368,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
403,
31409,
62,
37348,
1095,
58,
15,
4083,
46911,
1096,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
8420,
7,
16,
8,
628,
220,
220,
220,
1303,
3497,
262,
11911,
6218,
326,
836,
470,
423,
257,
12336,
3275,
422,
26430,
1041,
198,
220,
220,
220,
48621,
62,
8344,
2557,
62,
37348,
1095,
796,
17635,
198,
220,
220,
220,
14451,
62,
8344,
2557,
62,
37348,
1095,
796,
17635,
198,
220,
220,
220,
329,
220,
700,
287,
11911,
62,
75,
315,
25,
198,
220,
220,
220,
220,
220,
220,
220,
329,
7628,
62,
9186,
287,
11911,
62,
75,
315,
58,
700,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
7628,
62,
9186,
14692,
2416,
312,
62,
1676,
62,
20500,
8973,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48621,
62,
8344,
2557,
62,
37348,
1095,
13,
33295,
7,
260,
1073,
548,
62,
9186,
14692,
8344,
2557,
62,
20500,
8973,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14451,
62,
8344,
2557,
62,
37348,
1095,
13,
33295,
7,
260,
1073,
548,
62,
9186,
14692,
8344,
2557,
62,
20500,
8973,
8,
198,
220,
220,
220,
2604,
13,
10951,
7,
69,
1,
21077,
1391,
11925,
7,
403,
31409,
62,
8344,
2557,
62,
37348,
1095,
38165,
11911,
6218,
326,
550,
645,
2872,
287,
26430,
1041,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
18109,
392,
1391,
11925,
7,
31409,
62,
8344,
2557,
62,
37348,
1095,
38165,
326,
750,
423,
257,
2872,
8,
4943,
198,
220,
220,
220,
2938,
62,
403,
31409,
62,
37348,
1095,
62,
9127,
796,
18896,
7,
8344,
2557,
62,
37348,
1095,
8,
532,
18896,
7,
439,
62,
2416,
312,
62,
1676,
62,
37348,
1095,
8,
1343,
18896,
7,
8135,
3949,
62,
37348,
1095,
8,
198,
220,
220,
220,
2604,
13,
10951,
7,
69,
1,
14957,
2938,
48621,
6218,
373,
1391,
40319,
62,
403,
31409,
62,
37348,
1095,
62,
9127,
92,
4943,
628,
220,
220,
220,
611,
2938,
62,
403,
31409,
62,
37348,
1095,
62,
9127,
14512,
18896,
7,
403,
31409,
62,
8344,
2557,
62,
37348,
1095,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
18224,
7203,
15057,
286,
48621,
6218,
14512,
2938,
1271,
286,
48621,
6218,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
8420,
7,
16,
8,
628,
220,
220,
220,
1303,
36472,
284,
257,
269,
21370,
326,
460,
307,
13686,
416,
390,
62,
738,
1958,
62,
40664,
13,
9078,
198,
220,
220,
220,
2604,
13,
10951,
7,
69,
1,
3109,
26527,
48621,
11911,
6218,
284,
1391,
22915,
62,
40664,
62,
6978,
92,
4943,
198,
220,
220,
220,
351,
1280,
7,
22915,
62,
40664,
62,
6978,
11,
366,
86,
4943,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6260,
796,
269,
21370,
13,
35,
713,
34379,
7,
69,
11,
2214,
14933,
28,
14692,
50,
2194,
1600,
366,
3041,
39729,
1600,
366,
12837,
1600,
366,
3041,
6471,
2202,
8973,
8,
198,
220,
220,
220,
220,
220,
220,
220,
6260,
13,
13564,
25677,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
329,
31456,
287,
48621,
62,
8344,
2557,
62,
37348,
1095,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
13,
16002,
322,
15090,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
50,
2194,
1298,
31456,
14692,
50,
2194,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3041,
39729,
1298,
31456,
14692,
3041,
39729,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12837,
1298,
31456,
14692,
12837,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3041,
6471,
2202,
1298,
31456,
14692,
3041,
6471,
2202,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
32092,
198
] | 2.457837 | 4,613 |
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
from unittest import TestCase
from django.conf import settings
from polyaxon import types
from polycommon.conf.exceptions import ConfException
from polycommon.conf.service import ConfService
from polycommon.options.option import Option, OptionScope, OptionStores
from polycommon.options.option_manager import OptionManager
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
15069,
2864,
12,
42334,
12280,
897,
261,
11,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
198,
11748,
28686,
198,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
7514,
897,
261,
1330,
3858,
198,
6738,
7514,
11321,
13,
10414,
13,
1069,
11755,
1330,
7326,
16922,
198,
6738,
7514,
11321,
13,
10414,
13,
15271,
1330,
7326,
16177,
198,
6738,
7514,
11321,
13,
25811,
13,
18076,
1330,
16018,
11,
16018,
43642,
11,
16018,
1273,
2850,
198,
6738,
7514,
11321,
13,
25811,
13,
18076,
62,
37153,
1330,
16018,
13511,
628,
628,
628,
628,
628,
198
] | 3.758893 | 253 |
try:
import ROOT
except ImportError:
collect_ignore_glob = ["*/root/*"]
# otherwise will have problems either with tox,
# or when executing pytest directly
collect_ignore_glob += ["root/*"]
| [
28311,
25,
198,
220,
220,
220,
1330,
15107,
2394,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
2824,
62,
46430,
62,
4743,
672,
796,
14631,
16208,
15763,
15211,
8973,
198,
220,
220,
220,
1303,
4306,
481,
423,
2761,
2035,
351,
8293,
11,
198,
220,
220,
220,
1303,
393,
618,
23710,
12972,
9288,
3264,
198,
220,
220,
220,
2824,
62,
46430,
62,
4743,
672,
15853,
14631,
15763,
15211,
8973,
198
] | 3 | 70 |
# Generated by Django 3.2.9 on 2021-11-21 07:57
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
24,
319,
33448,
12,
1157,
12,
2481,
8753,
25,
3553,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import numpy as np
import math
from humpday.objectives.deapobjectives import schwefel, schaffer, bohachevsky, griewank, rastrigin, shekel, rosenbrock
# Some test objective functions to help guide optimizer choices
# -------------------------------------------------------------
#
# We'll use DEAP's set of groovy benchmarks, and landscapes, swarmpackagepy also
#
# See pretty pictures at https://deap.readthedocs.io/en/master/api/benchmarks.html#deap.benchmarks
# Some hardness assessment is at https://github.com/nathanrooy/landscapes#available-functions-from-single_objective but we'll do our own
## Basis of tricky functions
import datetime
DAY = datetime.datetime.today().day
OFFSET = DAY / 50
POWER = 1 + (DAY % 3) / 3.0
SHIFT = DAY / 100
def smoosh(ui):
""" Distort the interval to avoid obvious minima and avoid memorization """
ui_rotate = ui + SHIFT % 1.0
ui_shift = ui_rotate + SHIFT
xi = ui_shift ** POWER
low = SHIFT ** POWER
high = (1 + SHIFT) ** POWER
yi = (xi - low) / (high - low)
return yi ** POWER
## Combinations
DEAP_OBJECTIVES = [schwefel_on_cube, rastrigin_on_cube, griewank_on_cube,
bohachevsky_on_cube, rosenbrock_on_cube, shaffer_on_cube, shekel_on_cube,
deap_combo1_on_cube, deap_combo2_on_cube, deap_combo3_on_cube]
# By hand...
def rosenbrock_modified_on_cube(u: [float]) -> float:
""" https://en.wikipedia.org/wiki/Rosenbrock_function """
u_scaled = [4 * ui - 2 for ui in u]
if len(u) == 1:
return (0.25 - u_scaled[0]) ** 2
else:
return 5 + 0.001 * np.sum(
[100 * (ui_plus - ui * ui) + (1 - ui) * (1 - ui) for ui, ui_plus in zip(u_scaled[1:], u_scaled)])
# According to http://infinity77.net/global_optimization/test_functions.html#test-functions-index
# there are some really hard ones
# See https://github.com/andyfaff/ampgo/blob/master/%20ampgo%20--username%20andrea.gavana%40gmail.com/go_benchmark.py
# See also https://arxiv.org/pdf/1308.4008v1.pdf
def damavandi_on_cube(u: [float]) -> float:
""" A trivial multi-dimensional extension of Damavandi's function """
return 0.01 * damavandi2(u[0], u[1]) - 0.46
def damavandi2(u1, u2) -> float:
""" Pretty evil function this one """
# http://infinity77.net/global_optimization/test_functions_nd_D.html#go_benchmark.Damavandi
x1 = u1 / 14.
x2 = u2 / 14.
numerator = math.sin(math.pi * (x1 - 2.0)) * math.sin(math.pi * (x2 - 2.0))
denumerator = (math.pi ** 2) * (x1 - 2.0) * (x2 - 2.0)
factor1 = 1.0 - (abs(numerator / denumerator)) ** 5.0
factor2 = 2 + (x1 - 7.0) ** 2.0 + 2 * (x2 - 7.0) ** 2.0
return factor1 * factor2
# Landscapes
from landscapes.single_objective import styblinski_tang, zakharov, salomon, rotated_hyper_ellipsoid, qing, michalewicz
LANDSCAPES_OBJECTIVES = [styblinski_tang_on_cube, zakharov_on_cube, salomon_on_cube, rotated_hyper_ellipsoid_on_cube,
qing_on_cube, michaelewicz_on_cube, landscapes_combo1_on_cube, landscapes_combo2_on_cube,
landscapes_combo3_on_cube]
# Some copied from peabox
# https://github.com/stromatolith/peabox/blob/master/peabox/peabox_testfuncs.py
# as that isn't deployed to PyPI as far as I can determine
# Adapted from https://github.com/SISDevelop/SwarmPackagePy/blob/master/SwarmPackagePy/testFunctions.py
SWARM_OBJECTIVES = [cross_on_cube, powers_on_cube,
booth_on_cube, matyas_on_cube, drop_wave_on_cube]
A_CLASSIC_OBJECTIVE = rastrigin_on_cube # Just pick one for testing
MISC_OBJECTIVES = [paviani_on_cube, damavandi_on_cube, rosenbrock_modified_on_cube, ackley_on_cube]
CLASSIC_OBJECTIVES = DEAP_OBJECTIVES + LANDSCAPES_OBJECTIVES + MISC_OBJECTIVES + SWARM_OBJECTIVES
if __name__ == "__main__":
for objective in CLASSIC_OBJECTIVES:
objective(u=[0.0, 0.5, 1.0])
objective(u=[0.0, 0.5, 0.0, 0.0, 1.0])
print(len(CLASSIC_OBJECTIVES))
| [
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
198,
6738,
49779,
820,
13,
15252,
1083,
13,
2934,
499,
15252,
1083,
1330,
5513,
732,
69,
417,
11,
5513,
31183,
11,
275,
1219,
4891,
14259,
2584,
11,
11120,
413,
962,
11,
374,
459,
4359,
259,
11,
673,
7750,
11,
686,
6248,
7957,
694,
198,
198,
2,
2773,
1332,
9432,
5499,
284,
1037,
5698,
6436,
7509,
7747,
198,
2,
20368,
1783,
32501,
198,
2,
198,
2,
775,
1183,
779,
5550,
2969,
338,
900,
286,
7128,
27796,
31747,
11,
290,
32964,
11,
30077,
26495,
9078,
635,
198,
2,
198,
2,
4091,
2495,
5986,
379,
3740,
1378,
2934,
499,
13,
961,
83,
704,
420,
82,
13,
952,
14,
268,
14,
9866,
14,
15042,
14,
26968,
14306,
13,
6494,
2,
2934,
499,
13,
26968,
14306,
198,
2,
2773,
49604,
8922,
318,
379,
3740,
1378,
12567,
13,
785,
14,
77,
6696,
305,
726,
14,
1044,
1416,
7916,
2,
15182,
12,
12543,
2733,
12,
6738,
12,
29762,
62,
15252,
425,
475,
356,
1183,
466,
674,
898,
628,
198,
2235,
6455,
271,
286,
17198,
5499,
198,
198,
11748,
4818,
8079,
198,
198,
26442,
796,
4818,
8079,
13,
19608,
8079,
13,
40838,
22446,
820,
198,
27977,
28480,
796,
24644,
1220,
2026,
198,
47,
36048,
796,
352,
1343,
357,
26442,
4064,
513,
8,
1220,
513,
13,
15,
198,
9693,
32297,
796,
24644,
1220,
1802,
628,
198,
4299,
895,
78,
3768,
7,
9019,
2599,
198,
220,
220,
220,
37227,
4307,
419,
262,
16654,
284,
3368,
3489,
949,
8083,
290,
3368,
16181,
1634,
37227,
198,
220,
220,
220,
334,
72,
62,
10599,
378,
796,
334,
72,
1343,
6006,
32297,
4064,
352,
13,
15,
198,
220,
220,
220,
334,
72,
62,
30846,
796,
334,
72,
62,
10599,
378,
1343,
6006,
32297,
198,
220,
220,
220,
2124,
72,
796,
334,
72,
62,
30846,
12429,
40295,
198,
220,
220,
220,
1877,
796,
6006,
32297,
12429,
40295,
198,
220,
220,
220,
1029,
796,
357,
16,
1343,
6006,
32297,
8,
12429,
40295,
198,
220,
220,
220,
331,
72,
796,
357,
29992,
532,
1877,
8,
1220,
357,
8929,
532,
1877,
8,
198,
220,
220,
220,
1441,
331,
72,
12429,
40295,
628,
628,
628,
628,
198,
198,
2235,
14336,
7352,
628,
628,
198,
7206,
2969,
62,
9864,
23680,
42472,
796,
685,
20601,
732,
69,
417,
62,
261,
62,
40296,
11,
374,
459,
4359,
259,
62,
261,
62,
40296,
11,
11120,
413,
962,
62,
261,
62,
40296,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
1219,
4891,
14259,
2584,
62,
261,
62,
40296,
11,
686,
6248,
7957,
694,
62,
261,
62,
40296,
11,
427,
31183,
62,
261,
62,
40296,
11,
673,
7750,
62,
261,
62,
40296,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
390,
499,
62,
785,
2127,
16,
62,
261,
62,
40296,
11,
390,
499,
62,
785,
2127,
17,
62,
261,
62,
40296,
11,
390,
499,
62,
785,
2127,
18,
62,
261,
62,
40296,
60,
628,
198,
2,
2750,
1021,
986,
198,
198,
4299,
686,
6248,
7957,
694,
62,
41771,
62,
261,
62,
40296,
7,
84,
25,
685,
22468,
12962,
4613,
12178,
25,
198,
220,
220,
220,
37227,
3740,
1378,
268,
13,
31266,
13,
2398,
14,
15466,
14,
49,
5233,
7957,
694,
62,
8818,
37227,
198,
220,
220,
220,
334,
62,
1416,
3021,
796,
685,
19,
1635,
334,
72,
532,
362,
329,
334,
72,
287,
334,
60,
198,
220,
220,
220,
611,
18896,
7,
84,
8,
6624,
352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
15,
13,
1495,
532,
334,
62,
1416,
3021,
58,
15,
12962,
12429,
362,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
642,
1343,
657,
13,
8298,
1635,
45941,
13,
16345,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
3064,
1635,
357,
9019,
62,
9541,
532,
334,
72,
1635,
334,
72,
8,
1343,
357,
16,
532,
334,
72,
8,
1635,
357,
16,
532,
334,
72,
8,
329,
334,
72,
11,
334,
72,
62,
9541,
287,
19974,
7,
84,
62,
1416,
3021,
58,
16,
25,
4357,
334,
62,
1416,
3021,
8,
12962,
628,
198,
2,
4784,
284,
2638,
1378,
10745,
6269,
3324,
13,
3262,
14,
20541,
62,
40085,
1634,
14,
9288,
62,
12543,
2733,
13,
6494,
2,
9288,
12,
12543,
2733,
12,
9630,
198,
2,
612,
389,
617,
1107,
1327,
3392,
198,
2,
4091,
3740,
1378,
12567,
13,
785,
14,
10757,
69,
2001,
14,
696,
2188,
14,
2436,
672,
14,
9866,
14,
4,
1238,
696,
2188,
4,
1238,
438,
29460,
4,
1238,
392,
21468,
13,
70,
615,
2271,
4,
1821,
14816,
13,
785,
14,
2188,
62,
26968,
4102,
13,
9078,
198,
2,
4091,
635,
3740,
1378,
283,
87,
452,
13,
2398,
14,
12315,
14,
12952,
23,
13,
7029,
23,
85,
16,
13,
12315,
198,
198,
4299,
1801,
615,
26800,
62,
261,
62,
40296,
7,
84,
25,
685,
22468,
12962,
4613,
12178,
25,
198,
220,
220,
220,
37227,
317,
20861,
5021,
12,
19577,
7552,
286,
5245,
615,
26800,
338,
2163,
37227,
198,
220,
220,
220,
1441,
657,
13,
486,
1635,
1801,
615,
26800,
17,
7,
84,
58,
15,
4357,
334,
58,
16,
12962,
532,
657,
13,
3510,
628,
198,
4299,
1801,
615,
26800,
17,
7,
84,
16,
11,
334,
17,
8,
4613,
12178,
25,
198,
220,
220,
220,
37227,
20090,
6181,
2163,
428,
530,
37227,
198,
220,
220,
220,
1303,
2638,
1378,
10745,
6269,
3324,
13,
3262,
14,
20541,
62,
40085,
1634,
14,
9288,
62,
12543,
2733,
62,
358,
62,
35,
13,
6494,
2,
2188,
62,
26968,
4102,
13,
14550,
615,
26800,
198,
220,
220,
220,
2124,
16,
796,
334,
16,
1220,
1478,
13,
198,
220,
220,
220,
2124,
17,
796,
334,
17,
1220,
1478,
13,
198,
220,
220,
220,
5470,
1352,
796,
10688,
13,
31369,
7,
11018,
13,
14415,
1635,
357,
87,
16,
532,
362,
13,
15,
4008,
1635,
10688,
13,
31369,
7,
11018,
13,
14415,
1635,
357,
87,
17,
532,
362,
13,
15,
4008,
198,
220,
220,
220,
2853,
6975,
1352,
796,
357,
11018,
13,
14415,
12429,
362,
8,
1635,
357,
87,
16,
532,
362,
13,
15,
8,
1635,
357,
87,
17,
532,
362,
13,
15,
8,
198,
220,
220,
220,
5766,
16,
796,
352,
13,
15,
532,
357,
8937,
7,
77,
6975,
1352,
1220,
2853,
6975,
1352,
4008,
12429,
642,
13,
15,
198,
220,
220,
220,
5766,
17,
796,
362,
1343,
357,
87,
16,
532,
767,
13,
15,
8,
12429,
362,
13,
15,
1343,
362,
1635,
357,
87,
17,
532,
767,
13,
15,
8,
12429,
362,
13,
15,
198,
220,
220,
220,
1441,
5766,
16,
1635,
5766,
17,
628,
198,
198,
2,
6379,
1416,
7916,
198,
198,
6738,
32964,
13,
29762,
62,
15252,
425,
1330,
8944,
2436,
21141,
62,
83,
648,
11,
1976,
461,
9869,
709,
11,
3664,
16698,
11,
38375,
62,
49229,
62,
695,
541,
568,
312,
11,
10662,
278,
11,
285,
488,
282,
413,
28051,
628,
628,
628,
628,
628,
198,
198,
25697,
5258,
33177,
1546,
62,
9864,
23680,
42472,
796,
685,
34365,
2436,
21141,
62,
83,
648,
62,
261,
62,
40296,
11,
1976,
461,
9869,
709,
62,
261,
62,
40296,
11,
3664,
16698,
62,
261,
62,
40296,
11,
38375,
62,
49229,
62,
695,
541,
568,
312,
62,
261,
62,
40296,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10662,
278,
62,
261,
62,
40296,
11,
285,
488,
3609,
293,
22664,
89,
62,
261,
62,
40296,
11,
32964,
62,
785,
2127,
16,
62,
261,
62,
40296,
11,
32964,
62,
785,
2127,
17,
62,
261,
62,
40296,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
32964,
62,
785,
2127,
18,
62,
261,
62,
40296,
60,
628,
198,
2,
2773,
18984,
422,
613,
397,
1140,
198,
2,
3740,
1378,
12567,
13,
785,
14,
20282,
265,
21446,
14,
431,
397,
1140,
14,
2436,
672,
14,
9866,
14,
431,
397,
1140,
14,
431,
397,
1140,
62,
9288,
12543,
6359,
13,
9078,
198,
2,
355,
326,
2125,
470,
12380,
284,
9485,
11901,
355,
1290,
355,
314,
460,
5004,
628,
198,
198,
2,
30019,
276,
422,
3740,
1378,
12567,
13,
785,
14,
50,
1797,
19246,
14,
10462,
1670,
27813,
20519,
14,
2436,
672,
14,
9866,
14,
10462,
1670,
27813,
20519,
14,
9288,
24629,
2733,
13,
9078,
628,
628,
628,
198,
50,
16279,
44,
62,
9864,
23680,
42472,
796,
685,
19692,
62,
261,
62,
40296,
11,
5635,
62,
261,
62,
40296,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18600,
62,
261,
62,
40296,
11,
2603,
88,
292,
62,
261,
62,
40296,
11,
4268,
62,
19204,
62,
261,
62,
40296,
60,
198,
198,
32,
62,
31631,
2149,
62,
9864,
23680,
9306,
796,
374,
459,
4359,
259,
62,
261,
62,
40296,
220,
1303,
2329,
2298,
530,
329,
4856,
198,
198,
44,
37719,
62,
9864,
23680,
42472,
796,
685,
79,
615,
25111,
62,
261,
62,
40296,
11,
1801,
615,
26800,
62,
261,
62,
40296,
11,
686,
6248,
7957,
694,
62,
41771,
62,
261,
62,
40296,
11,
257,
694,
1636,
62,
261,
62,
40296,
60,
198,
198,
31631,
2149,
62,
9864,
23680,
42472,
796,
5550,
2969,
62,
9864,
23680,
42472,
1343,
24192,
5258,
33177,
1546,
62,
9864,
23680,
42472,
1343,
337,
37719,
62,
9864,
23680,
42472,
1343,
12672,
33456,
62,
9864,
23680,
42472,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
329,
9432,
287,
42715,
2149,
62,
9864,
23680,
42472,
25,
198,
220,
220,
220,
220,
220,
220,
220,
9432,
7,
84,
41888,
15,
13,
15,
11,
657,
13,
20,
11,
352,
13,
15,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
9432,
7,
84,
41888,
15,
13,
15,
11,
657,
13,
20,
11,
657,
13,
15,
11,
657,
13,
15,
11,
352,
13,
15,
12962,
198,
220,
220,
220,
3601,
7,
11925,
7,
31631,
2149,
62,
9864,
23680,
42472,
4008,
198
] | 2.366071 | 1,680 |
import datetime
import os
import shutil
from packages.dialogs.auxiliar_dialogs import selfCloseInterface
| [
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
198,
6738,
10392,
13,
38969,
18463,
13,
14644,
4797,
62,
38969,
18463,
1330,
2116,
26125,
39317,
628
] | 3.821429 | 28 |
#!/usr/bin/env python3
#### ros import
import rospy
import std_msgs.msg
from rospkg import RosPack
from std_msgs.msg import UInt8
from std_msgs.msg import Float32MultiArray #c
from sensor_msgs.msg import Image
from geometry_msgs.msg import Polygon, Point32
import cv2
from cv_bridge import CvBridge, CvBridgeError
# python import
import os
import argparse
import time
import math
package = RosPack()
img_size = (480, 360)
if __name__ == "__main__":
# Initialize node
rospy.init_node("detector_manager_node")
dm = DetectorManager()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
4242,
686,
82,
1330,
220,
198,
11748,
686,
2777,
88,
198,
11748,
14367,
62,
907,
14542,
13,
19662,
198,
6738,
686,
2777,
10025,
1330,
10018,
11869,
198,
6738,
14367,
62,
907,
14542,
13,
19662,
1330,
471,
5317,
23,
198,
6738,
14367,
62,
907,
14542,
13,
19662,
1330,
48436,
2624,
29800,
19182,
1303,
66,
198,
6738,
12694,
62,
907,
14542,
13,
19662,
1330,
7412,
198,
6738,
22939,
62,
907,
14542,
13,
19662,
1330,
12280,
14520,
11,
6252,
2624,
198,
11748,
269,
85,
17,
198,
6738,
269,
85,
62,
9458,
1330,
327,
85,
37385,
11,
327,
85,
37385,
12331,
198,
198,
2,
21015,
1330,
220,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
640,
198,
11748,
10688,
198,
198,
26495,
796,
10018,
11869,
3419,
198,
9600,
62,
7857,
796,
357,
22148,
11,
11470,
8,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1303,
20768,
1096,
10139,
198,
220,
220,
220,
686,
2777,
88,
13,
15003,
62,
17440,
7203,
15255,
9250,
62,
37153,
62,
17440,
4943,
198,
220,
220,
220,
288,
76,
796,
4614,
9250,
13511,
3419,
198
] | 2.816327 | 196 |
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
url(r'^truco/', include('truco.urls', namespace="truco")),
url(r'^usuarios/', include('usuarios.urls', namespace="usuarios")),
)
| [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
2291,
11,
19016,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
28482,
13,
2306,
375,
29392,
3419,
198,
198,
6371,
33279,
82,
796,
7572,
7,
198,
220,
220,
220,
705,
3256,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
28482,
14,
3256,
2291,
7,
28482,
13,
15654,
13,
6371,
82,
36911,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
83,
622,
1073,
14,
3256,
2291,
10786,
83,
622,
1073,
13,
6371,
82,
3256,
25745,
2625,
83,
622,
1073,
4943,
828,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
385,
84,
13010,
14,
3256,
2291,
10786,
385,
84,
13010,
13,
6371,
82,
3256,
25745,
2625,
385,
84,
13010,
4943,
828,
198,
8,
198
] | 2.511628 | 129 |
#!/usr/bin/env python3
"""
Description:
Usage:
$> roslaunch turtle_nodes.launch
$> ./executive_step_02.py
Output:
[INFO] : State machine starting in initial state 'RESET' with userdata:
[]
[INFO] : State machine transitioning 'RESET':'succeeded'-->'SPAWN'
[INFO] : State machine terminating 'SPAWN':'succeeded':'succeeded'
"""
import rospy
import threading
import smach
from smach import StateMachine, ServiceState, SimpleActionState
import std_srvs.srv
import turtlesim.srv
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
11828,
25,
198,
198,
28350,
25,
198,
220,
220,
220,
720,
29,
686,
6649,
11429,
28699,
62,
77,
4147,
13,
35681,
198,
220,
220,
220,
720,
29,
24457,
18558,
8827,
62,
9662,
62,
2999,
13,
9078,
198,
198,
26410,
25,
198,
220,
220,
220,
685,
10778,
60,
1058,
1812,
4572,
3599,
287,
4238,
1181,
705,
19535,
2767,
6,
351,
2836,
7890,
25,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17635,
198,
220,
220,
220,
685,
10778,
60,
1058,
1812,
4572,
37005,
705,
19535,
2767,
10354,
6,
82,
1229,
2707,
276,
6,
46904,
6,
4303,
12298,
45,
6,
198,
220,
220,
220,
685,
10778,
60,
1058,
1812,
4572,
47985,
705,
4303,
12298,
45,
10354,
6,
82,
1229,
2707,
276,
10354,
6,
82,
1229,
2707,
276,
6,
198,
198,
37811,
198,
198,
11748,
686,
2777,
88,
198,
198,
11748,
4704,
278,
198,
198,
11748,
895,
620,
198,
6738,
895,
620,
1330,
1812,
37573,
11,
4809,
9012,
11,
17427,
12502,
9012,
198,
198,
11748,
14367,
62,
27891,
14259,
13,
27891,
85,
198,
11748,
36288,
320,
13,
27891,
85,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.583333 | 216 |
import pandas as pd
import numpy as np
import os
from hickit.reader import get_headers, get_chrom_sizes
import tensorflow as tf
import json
import tensorflow_addons as tfa
from utils import *
import gc
from sklearn.metrics import f1_score, average_precision_score
def run_output_predictions(run_id, model_stage, threshold, target_dataset_name, target_assembly, chroms, output_path, mode):
"""
:param run_id: String - The string that specifies the run of experiment
:param model_stage: String - can only be 'GNN', 'CNN', or 'Finetune'
:param threshold: Float - The probability threshold
:param target_dataset_name: String - The name of dataset you want to predict on
:param chroms: List - Chromosome list we want to predict on. e.g. ['1', '2', 'X']
:param target_assembly: String - 'hg19' or 'hg38'
:param output_path: String - The path to the output file
:param mode: String - 'test' or 'realworld'. Test mode means the target cell line has the ground truth ChIA-PET
data and the program will calculate the PRAUC for it. 'realworld' mode does not print PRAUC because the target
dataset does not have label.
:return: Pandas dataframe contains the genome-wide annotations
"""
dataset_dir = os.path.join('dataset', target_dataset_name)
model_path = os.path.join('models', run_id + '_' + model_stage)
chrom_size_path = '{}.chrom.sizes'.format(target_assembly)
extra_config_path = os.path.join('configs', '{}_extra_settings.json'.format(run_id))
with open(extra_config_path) as fp:
saved_upper_bound = json.load(fp)['graph_upper_bound']
pred_dfs = []
ys = []
y_preds = []
for chrom in chroms:
model = tf.keras.models.load_model(model_path)
indicator_path = os.path.join(dataset_dir, 'indicators.{}.csv'.format(chrom))
identical_path = os.path.join(dataset_dir, 'graph_identical.{}.npy'.format(chrom))
images, graphs, y, features = read_data_with_motif([chrom], dataset_dir, IMAGE_SIZE)
graphs = normalise_graphs(scale_hic(graphs, saved_upper_bound))
test_y_pred = np.asarray(model.predict([images, features, graphs])[1])
ys.append(y.flatten())
y_preds.append(test_y_pred.flatten())
chrom_proba, chrom_gt = get_chrom_proba(
chrom,
get_chrom_sizes(chrom_size_path),
10000,
test_y_pred,
y,
indicator_path,
identical_path,
IMAGE_SIZE
)
current_df = get_chrom_pred_df(
chrom, chrom_proba, threshold,
get_headers([chrom], get_chrom_sizes(chrom_size_path), 10000),
)
pred_dfs.append(current_df)
del model
gc.collect()
tf.keras.backend.clear_session()
if mode == 'test':
print('PRAUC on the target cell line is {}'.format(
average_precision_score(np.concatenate(ys), np.concatenate(y_preds))
))
full_pred_df = pd.concat(pred_dfs)
full_pred_df.to_csv(output_path, sep='\t', index=False, header=False)
return full_pred_df
if __name__ == '__main__':
run_output_predictions(
'gm12878_ctcf_50', # Specify the ID of a pre-trained model
'Finetune', # Specify using which stage of the model to make prediction
0.48, # Set the probability threshold
'hela_100', # Specify the name of the dataset you want to predict on
'hg38', # The genome assembly of the target dataset
['1'], # Annotate on which Chromosomes
'predictions/hela_test.bedpe', # The output file path
'test' # Test mode means the target dataset has label; 'realworld' mode
# means the target cell line does not have label
)
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
6738,
289,
624,
270,
13,
46862,
1330,
651,
62,
50145,
11,
651,
62,
28663,
62,
82,
4340,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
33918,
198,
11748,
11192,
273,
11125,
62,
39996,
355,
256,
13331,
198,
6738,
3384,
4487,
1330,
1635,
198,
11748,
308,
66,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
277,
16,
62,
26675,
11,
2811,
62,
3866,
16005,
62,
26675,
628,
198,
4299,
1057,
62,
22915,
62,
28764,
9278,
7,
5143,
62,
312,
11,
2746,
62,
14247,
11,
11387,
11,
2496,
62,
19608,
292,
316,
62,
3672,
11,
2496,
62,
41873,
11,
15358,
82,
11,
5072,
62,
6978,
11,
4235,
2599,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1058,
17143,
1057,
62,
312,
25,
10903,
532,
383,
4731,
326,
26052,
262,
1057,
286,
6306,
198,
220,
220,
220,
1058,
17143,
2746,
62,
14247,
25,
10903,
532,
460,
691,
307,
705,
38,
6144,
3256,
705,
18474,
3256,
393,
705,
18467,
316,
1726,
6,
198,
220,
220,
220,
1058,
17143,
11387,
25,
48436,
532,
383,
12867,
11387,
198,
220,
220,
220,
1058,
17143,
2496,
62,
19608,
292,
316,
62,
3672,
25,
10903,
532,
383,
1438,
286,
27039,
345,
765,
284,
4331,
319,
198,
220,
220,
220,
1058,
17143,
15358,
82,
25,
7343,
532,
18255,
418,
462,
1351,
356,
765,
284,
4331,
319,
13,
304,
13,
70,
13,
37250,
16,
3256,
705,
17,
3256,
705,
55,
20520,
198,
220,
220,
220,
1058,
17143,
2496,
62,
41873,
25,
10903,
532,
705,
71,
70,
1129,
6,
393,
705,
71,
70,
2548,
6,
198,
220,
220,
220,
1058,
17143,
5072,
62,
6978,
25,
10903,
532,
383,
3108,
284,
262,
5072,
2393,
198,
220,
220,
220,
1058,
17143,
4235,
25,
10903,
532,
705,
9288,
6,
393,
705,
5305,
6894,
4458,
6208,
4235,
1724,
262,
2496,
2685,
1627,
468,
262,
2323,
3872,
609,
3539,
12,
47731,
198,
220,
220,
220,
1366,
290,
262,
1430,
481,
15284,
262,
350,
3861,
9598,
329,
340,
13,
705,
5305,
6894,
6,
4235,
857,
407,
3601,
350,
3861,
9598,
780,
262,
2496,
198,
220,
220,
220,
27039,
857,
407,
423,
6167,
13,
198,
220,
220,
220,
1058,
7783,
25,
16492,
292,
1366,
14535,
4909,
262,
19270,
12,
4421,
37647,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
27039,
62,
15908,
796,
28686,
13,
6978,
13,
22179,
10786,
19608,
292,
316,
3256,
2496,
62,
19608,
292,
316,
62,
3672,
8,
198,
220,
220,
220,
2746,
62,
6978,
796,
28686,
13,
6978,
13,
22179,
10786,
27530,
3256,
1057,
62,
312,
1343,
705,
62,
6,
1343,
2746,
62,
14247,
8,
198,
220,
220,
220,
15358,
62,
7857,
62,
6978,
796,
705,
90,
27422,
28663,
13,
82,
4340,
4458,
18982,
7,
16793,
62,
41873,
8,
198,
220,
220,
220,
3131,
62,
11250,
62,
6978,
796,
28686,
13,
6978,
13,
22179,
10786,
11250,
82,
3256,
705,
90,
92,
62,
26086,
62,
33692,
13,
17752,
4458,
18982,
7,
5143,
62,
312,
4008,
198,
220,
220,
220,
351,
1280,
7,
26086,
62,
11250,
62,
6978,
8,
355,
277,
79,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7448,
62,
45828,
62,
7784,
796,
33918,
13,
2220,
7,
46428,
8,
17816,
34960,
62,
45828,
62,
7784,
20520,
198,
220,
220,
220,
2747,
62,
7568,
82,
796,
17635,
198,
220,
220,
220,
331,
82,
796,
17635,
198,
220,
220,
220,
331,
62,
28764,
82,
796,
17635,
198,
220,
220,
220,
329,
15358,
287,
15358,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2746,
796,
48700,
13,
6122,
292,
13,
27530,
13,
2220,
62,
19849,
7,
19849,
62,
6978,
8,
198,
220,
220,
220,
220,
220,
220,
220,
16916,
62,
6978,
796,
28686,
13,
6978,
13,
22179,
7,
19608,
292,
316,
62,
15908,
11,
705,
521,
44549,
13,
90,
27422,
40664,
4458,
18982,
7,
28663,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
10411,
62,
6978,
796,
28686,
13,
6978,
13,
22179,
7,
19608,
292,
316,
62,
15908,
11,
705,
34960,
62,
738,
605,
13,
90,
27422,
77,
9078,
4458,
18982,
7,
28663,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
4263,
11,
28770,
11,
331,
11,
3033,
796,
1100,
62,
7890,
62,
4480,
62,
27926,
361,
26933,
28663,
4357,
27039,
62,
15908,
11,
8959,
11879,
62,
33489,
8,
198,
220,
220,
220,
220,
220,
220,
220,
28770,
796,
3487,
786,
62,
34960,
82,
7,
9888,
62,
71,
291,
7,
34960,
82,
11,
7448,
62,
45828,
62,
7784,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1332,
62,
88,
62,
28764,
796,
45941,
13,
292,
18747,
7,
19849,
13,
79,
17407,
26933,
17566,
11,
3033,
11,
28770,
12962,
58,
16,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
331,
82,
13,
33295,
7,
88,
13,
2704,
41769,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
331,
62,
28764,
82,
13,
33295,
7,
9288,
62,
88,
62,
28764,
13,
2704,
41769,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
15358,
62,
1676,
7012,
11,
15358,
62,
13655,
796,
651,
62,
28663,
62,
1676,
7012,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15358,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
651,
62,
28663,
62,
82,
4340,
7,
28663,
62,
7857,
62,
6978,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33028,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1332,
62,
88,
62,
28764,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16916,
62,
6978,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10411,
62,
6978,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8959,
11879,
62,
33489,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
1459,
62,
7568,
796,
651,
62,
28663,
62,
28764,
62,
7568,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15358,
11,
15358,
62,
1676,
7012,
11,
11387,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
651,
62,
50145,
26933,
28663,
4357,
651,
62,
28663,
62,
82,
4340,
7,
28663,
62,
7857,
62,
6978,
828,
33028,
828,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
2747,
62,
7568,
82,
13,
33295,
7,
14421,
62,
7568,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1619,
2746,
198,
220,
220,
220,
220,
220,
220,
220,
308,
66,
13,
33327,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
48700,
13,
6122,
292,
13,
1891,
437,
13,
20063,
62,
29891,
3419,
198,
220,
220,
220,
611,
4235,
6624,
705,
9288,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
47,
3861,
9598,
319,
262,
2496,
2685,
1627,
318,
23884,
4458,
18982,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2811,
62,
3866,
16005,
62,
26675,
7,
37659,
13,
1102,
9246,
268,
378,
7,
893,
828,
45941,
13,
1102,
9246,
268,
378,
7,
88,
62,
28764,
82,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
15306,
198,
220,
220,
220,
1336,
62,
28764,
62,
7568,
796,
279,
67,
13,
1102,
9246,
7,
28764,
62,
7568,
82,
8,
198,
220,
220,
220,
1336,
62,
28764,
62,
7568,
13,
1462,
62,
40664,
7,
22915,
62,
6978,
11,
41767,
11639,
59,
83,
3256,
6376,
28,
25101,
11,
13639,
28,
25101,
8,
198,
220,
220,
220,
1441,
1336,
62,
28764,
62,
7568,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1057,
62,
22915,
62,
28764,
9278,
7,
198,
220,
220,
220,
220,
220,
220,
220,
705,
39870,
12762,
3695,
62,
310,
12993,
62,
1120,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
18291,
1958,
262,
4522,
286,
257,
662,
12,
35311,
2746,
198,
220,
220,
220,
220,
220,
220,
220,
705,
18467,
316,
1726,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
18291,
1958,
1262,
543,
3800,
286,
262,
2746,
284,
787,
17724,
198,
220,
220,
220,
220,
220,
220,
220,
657,
13,
2780,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
5345,
262,
12867,
11387,
198,
220,
220,
220,
220,
220,
220,
220,
705,
2978,
64,
62,
3064,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
18291,
1958,
262,
1438,
286,
262,
27039,
345,
765,
284,
4331,
319,
198,
220,
220,
220,
220,
220,
220,
220,
705,
71,
70,
2548,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
383,
19270,
10474,
286,
262,
2496,
27039,
198,
220,
220,
220,
220,
220,
220,
220,
37250,
16,
6,
4357,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1052,
1662,
378,
319,
543,
18255,
418,
2586,
198,
220,
220,
220,
220,
220,
220,
220,
705,
28764,
9278,
14,
2978,
64,
62,
9288,
13,
3077,
431,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
383,
5072,
2393,
3108,
198,
220,
220,
220,
220,
220,
220,
220,
705,
9288,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
6208,
4235,
1724,
262,
2496,
27039,
468,
6167,
26,
705,
5305,
6894,
6,
4235,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1724,
262,
2496,
2685,
1627,
857,
407,
423,
6167,
198,
220,
220,
220,
1267,
628
] | 2.206074 | 1,844 |
""" test elstruct writer/run/reader pipelines
"""
import warnings
import tempfile
import numpy
import automol
import elstruct
SCRIPT_DCT = {
'cfour2': None,
'gaussian09': None,
'gaussian16': None,
'molpro2015': None,
'mrcc2018': None,
'nwchem6': None,
'orca4': None,
'psi4': "#!/usr/bin/env bash\n"
"psi4 -i run.inp -o run.out >> stdout.log &> stderr.log",
}
def test__energy():
""" test the energy pipeline
"""
basis = '6-31g'
geom = (('O', (0.0, 0.0, -0.110)),
('H', (0.0, -1.635, 0.876)),
('H', (-0.0, 1.635, 0.876)))
mult_vals = [1, 2]
charge_vals = [0, 1]
for prog in elstruct.writer.programs():
for method in elstruct.program_methods(prog):
for mult, charge in zip(mult_vals, charge_vals):
for orb_restricted in (
elstruct.program_method_orbital_restrictions(
prog, method, singlet=(mult == 1))):
vals = _test_pipeline(
script_str=SCRIPT_DCT[prog],
writer=elstruct.writer.energy,
readers=(
elstruct.reader.energy_(prog, method),
),
args=(geom, charge, mult, method, basis, prog),
kwargs={'orb_restricted': orb_restricted},
error=elstruct.Error.SCF_NOCONV,
error_kwargs={'scf_options': [
elstruct.option.specify(
elstruct.Option.Scf.MAXITER_, 2)
]},
)
print(vals)
def test__gradient():
""" test the gradient pipeline
"""
basis = 'sto-3g'
geom = (('O', (0.0, 0.0, -0.110)),
('H', (0.0, -1.635, 0.876)),
('H', (-0.0, 1.635, 0.876)))
mult_vals = [1, 2]
charge_vals = [0, 1]
for prog in elstruct.writer.gradient_programs():
methods = list(elstruct.program_nondft_methods(prog))
dft_methods = list(elstruct.program_dft_methods(prog))
if dft_methods:
methods.append(numpy.random.choice(dft_methods))
for method in methods:
for mult, charge in zip(mult_vals, charge_vals):
for orb_restricted in (
elstruct.program_method_orbital_restrictions(
prog, method, singlet=(mult == 1))):
vals = _test_pipeline(
script_str=SCRIPT_DCT[prog],
writer=elstruct.writer.gradient,
readers=(
elstruct.reader.energy_(prog, method),
elstruct.reader.gradient_(prog),
),
args=(geom, charge, mult, method, basis, prog),
kwargs={'orb_restricted': orb_restricted},
)
print(vals)
def test__hessian():
""" test the hessian pipeline
"""
basis = 'sto-3g'
geom = (('O', (0.0, 0.0, -0.110)),
('H', (0.0, -1.635, 0.876)),
('H', (-0.0, 1.635, 0.876)))
mult_vals = [1, 2]
charge_vals = [0, 1]
for prog in elstruct.writer.hessian_programs():
methods = list(elstruct.program_nondft_methods(prog))
dft_methods = list(elstruct.program_dft_methods(prog))
if dft_methods:
methods.append(numpy.random.choice(dft_methods))
for method in methods:
for mult, charge in zip(mult_vals, charge_vals):
for orb_restricted in (
elstruct.program_method_orbital_restrictions(
prog, method, singlet=(mult == 1))):
vals = _test_pipeline(
script_str=SCRIPT_DCT[prog],
writer=elstruct.writer.hessian,
readers=(
elstruct.reader.energy_(prog, method),
elstruct.reader.hessian_(prog),
),
args=(geom, charge, mult, method, basis, prog),
kwargs={'orb_restricted': orb_restricted},
)
print(vals)
def test__optimization():
""" test elstruct optimization writes and reads
"""
method = 'hf'
basis = 'sto-3g'
geom = ((('C', (None, None, None), (None, None, None)),
('O', (0, None, None), ('R1', None, None)),
('H', (0, 1, None), ('R2', 'A2', None)),
('H', (0, 1, 2), ('R3', 'A3', 'D3')),
('H', (0, 1, 2), ('R4', 'A4', 'D4')),
('H', (1, 0, 2), ('R5', 'A5', 'D5'))),
{'R1': 2.6, 'R2': 2.0, 'A2': 1.9,
'R3': 2.0, 'A3': 1.9, 'D3': 2.1,
'R4': 2.0, 'A4': 1.9, 'D4': 4.1,
'R5': 1.8, 'A5': 1.8, 'D5': 5.2})
mult = 1
charge = 0
orb_restricted = True
frozen_coordinates = ('R5', 'A5', 'D3')
ref_frozen_values = (1.8, 1.8, 2.1)
for prog in elstruct.writer.optimization_programs():
script_str = SCRIPT_DCT[prog]
# MRCC2018 does not support constrained optimizations
if prog != 'mrcc2018':
opt_kwargs = {'orb_restricted': orb_restricted,
'frozen_coordinates': frozen_coordinates}
else:
opt_kwargs = {'orb_restricted': orb_restricted}
vals = _test_pipeline(
script_str=script_str,
writer=elstruct.writer.optimization,
readers=(
elstruct.reader.energy_(prog, method),
elstruct.reader.opt_geometry_(prog),
elstruct.reader.opt_zmatrix_(prog),
),
args=(geom, charge, mult, method, basis, prog),
kwargs=opt_kwargs,
error=elstruct.Error.OPT_NOCONV,
error_kwargs={'job_options': [
elstruct.option.specify(
elstruct.Option.Opt.MAXITER_, 2)
]},
)
print(vals)
if script_str is not None:
# check that the frozen coordinates didn't change
zma = vals[-1]
val_dct = automol.zmatrix.values(zma)
frozen_values = tuple(
map(val_dct.__getitem__, frozen_coordinates))
assert numpy.allclose(
frozen_values, ref_frozen_values, rtol=1e-4)
if __name__ == '__main__':
test__energy()
test__gradient()
test__hessian()
test__optimization()
| [
37811,
1332,
1288,
7249,
6260,
14,
5143,
14,
46862,
31108,
198,
37811,
198,
11748,
14601,
198,
11748,
20218,
7753,
198,
11748,
299,
32152,
198,
11748,
3557,
349,
198,
11748,
1288,
7249,
628,
198,
6173,
46023,
62,
35,
4177,
796,
1391,
198,
220,
220,
220,
705,
12993,
454,
17,
10354,
6045,
11,
198,
220,
220,
220,
705,
4908,
31562,
2931,
10354,
6045,
11,
198,
220,
220,
220,
705,
4908,
31562,
1433,
10354,
6045,
11,
198,
220,
220,
220,
705,
43132,
1676,
4626,
10354,
6045,
11,
198,
220,
220,
220,
705,
43395,
535,
7908,
10354,
6045,
11,
198,
220,
220,
220,
705,
47516,
15245,
21,
10354,
6045,
11,
198,
220,
220,
220,
705,
273,
6888,
19,
10354,
6045,
11,
198,
220,
220,
220,
705,
862,
72,
19,
10354,
25113,
48443,
14629,
14,
8800,
14,
24330,
27334,
59,
77,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
862,
72,
19,
532,
72,
1057,
13,
259,
79,
532,
78,
1057,
13,
448,
9609,
14367,
448,
13,
6404,
1222,
29,
336,
1082,
81,
13,
6404,
1600,
198,
92,
628,
198,
4299,
1332,
834,
22554,
33529,
198,
220,
220,
220,
37227,
1332,
262,
2568,
11523,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
4308,
796,
705,
21,
12,
3132,
70,
6,
198,
220,
220,
220,
4903,
296,
796,
357,
10786,
46,
3256,
357,
15,
13,
15,
11,
657,
13,
15,
11,
532,
15,
13,
11442,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
39,
3256,
357,
15,
13,
15,
11,
532,
16,
13,
48250,
11,
657,
13,
23,
4304,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
39,
3256,
13841,
15,
13,
15,
11,
352,
13,
48250,
11,
657,
13,
23,
4304,
22305,
198,
220,
220,
220,
1963,
62,
12786,
796,
685,
16,
11,
362,
60,
198,
220,
220,
220,
3877,
62,
12786,
796,
685,
15,
11,
352,
60,
628,
220,
220,
220,
329,
1172,
287,
1288,
7249,
13,
16002,
13,
23065,
82,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
329,
2446,
287,
1288,
7249,
13,
23065,
62,
24396,
82,
7,
1676,
70,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1963,
11,
3877,
287,
19974,
7,
16680,
62,
12786,
11,
3877,
62,
12786,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
15769,
62,
49343,
287,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
23065,
62,
24396,
62,
27688,
1287,
62,
2118,
2012,
507,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1172,
11,
2446,
11,
1702,
1616,
16193,
16680,
6624,
352,
4008,
2599,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
874,
796,
4808,
9288,
62,
79,
541,
4470,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4226,
62,
2536,
28,
6173,
46023,
62,
35,
4177,
58,
1676,
70,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
28,
417,
7249,
13,
16002,
13,
22554,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7183,
16193,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
46862,
13,
22554,
41052,
1676,
70,
11,
2446,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26498,
16193,
469,
296,
11,
3877,
11,
1963,
11,
2446,
11,
4308,
11,
1172,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
86,
22046,
34758,
6,
27688,
62,
49343,
10354,
15769,
62,
49343,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
28,
417,
7249,
13,
12331,
13,
6173,
37,
62,
45,
4503,
1340,
53,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
46265,
22046,
34758,
6,
1416,
69,
62,
25811,
10354,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
18076,
13,
16684,
1958,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
19722,
13,
3351,
69,
13,
22921,
2043,
1137,
62,
11,
362,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2361,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
12786,
8,
628,
198,
4299,
1332,
834,
49607,
33529,
198,
220,
220,
220,
37227,
1332,
262,
31312,
11523,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
4308,
796,
705,
301,
78,
12,
18,
70,
6,
198,
220,
220,
220,
4903,
296,
796,
357,
10786,
46,
3256,
357,
15,
13,
15,
11,
657,
13,
15,
11,
532,
15,
13,
11442,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
39,
3256,
357,
15,
13,
15,
11,
532,
16,
13,
48250,
11,
657,
13,
23,
4304,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
39,
3256,
13841,
15,
13,
15,
11,
352,
13,
48250,
11,
657,
13,
23,
4304,
22305,
198,
220,
220,
220,
1963,
62,
12786,
796,
685,
16,
11,
362,
60,
198,
220,
220,
220,
3877,
62,
12786,
796,
685,
15,
11,
352,
60,
628,
220,
220,
220,
329,
1172,
287,
1288,
7249,
13,
16002,
13,
49607,
62,
23065,
82,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
5050,
796,
1351,
7,
417,
7249,
13,
23065,
62,
77,
623,
701,
62,
24396,
82,
7,
1676,
70,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
288,
701,
62,
24396,
82,
796,
1351,
7,
417,
7249,
13,
23065,
62,
67,
701,
62,
24396,
82,
7,
1676,
70,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
288,
701,
62,
24396,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5050,
13,
33295,
7,
77,
32152,
13,
25120,
13,
25541,
7,
67,
701,
62,
24396,
82,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
329,
2446,
287,
5050,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1963,
11,
3877,
287,
19974,
7,
16680,
62,
12786,
11,
3877,
62,
12786,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
15769,
62,
49343,
287,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
23065,
62,
24396,
62,
27688,
1287,
62,
2118,
2012,
507,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1172,
11,
2446,
11,
1702,
1616,
16193,
16680,
6624,
352,
4008,
2599,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
874,
796,
4808,
9288,
62,
79,
541,
4470,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4226,
62,
2536,
28,
6173,
46023,
62,
35,
4177,
58,
1676,
70,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
28,
417,
7249,
13,
16002,
13,
49607,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7183,
16193,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
46862,
13,
22554,
41052,
1676,
70,
11,
2446,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
46862,
13,
49607,
41052,
1676,
70,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26498,
16193,
469,
296,
11,
3877,
11,
1963,
11,
2446,
11,
4308,
11,
1172,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
86,
22046,
34758,
6,
27688,
62,
49343,
10354,
15769,
62,
49343,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
12786,
8,
628,
198,
4299,
1332,
834,
33979,
666,
33529,
198,
220,
220,
220,
37227,
1332,
262,
339,
824,
666,
11523,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
4308,
796,
705,
301,
78,
12,
18,
70,
6,
198,
220,
220,
220,
4903,
296,
796,
357,
10786,
46,
3256,
357,
15,
13,
15,
11,
657,
13,
15,
11,
532,
15,
13,
11442,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
39,
3256,
357,
15,
13,
15,
11,
532,
16,
13,
48250,
11,
657,
13,
23,
4304,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
39,
3256,
13841,
15,
13,
15,
11,
352,
13,
48250,
11,
657,
13,
23,
4304,
22305,
198,
220,
220,
220,
1963,
62,
12786,
796,
685,
16,
11,
362,
60,
198,
220,
220,
220,
3877,
62,
12786,
796,
685,
15,
11,
352,
60,
628,
220,
220,
220,
329,
1172,
287,
1288,
7249,
13,
16002,
13,
33979,
666,
62,
23065,
82,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
5050,
796,
1351,
7,
417,
7249,
13,
23065,
62,
77,
623,
701,
62,
24396,
82,
7,
1676,
70,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
288,
701,
62,
24396,
82,
796,
1351,
7,
417,
7249,
13,
23065,
62,
67,
701,
62,
24396,
82,
7,
1676,
70,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
288,
701,
62,
24396,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5050,
13,
33295,
7,
77,
32152,
13,
25120,
13,
25541,
7,
67,
701,
62,
24396,
82,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
329,
2446,
287,
5050,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1963,
11,
3877,
287,
19974,
7,
16680,
62,
12786,
11,
3877,
62,
12786,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
15769,
62,
49343,
287,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
23065,
62,
24396,
62,
27688,
1287,
62,
2118,
2012,
507,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1172,
11,
2446,
11,
1702,
1616,
16193,
16680,
6624,
352,
4008,
2599,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
874,
796,
4808,
9288,
62,
79,
541,
4470,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4226,
62,
2536,
28,
6173,
46023,
62,
35,
4177,
58,
1676,
70,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
28,
417,
7249,
13,
16002,
13,
33979,
666,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7183,
16193,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
46862,
13,
22554,
41052,
1676,
70,
11,
2446,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
46862,
13,
33979,
666,
41052,
1676,
70,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26498,
16193,
469,
296,
11,
3877,
11,
1963,
11,
2446,
11,
4308,
11,
1172,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
86,
22046,
34758,
6,
27688,
62,
49343,
10354,
15769,
62,
49343,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
12786,
8,
628,
198,
4299,
1332,
834,
40085,
1634,
33529,
198,
220,
220,
220,
37227,
1332,
1288,
7249,
23989,
6797,
290,
9743,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2446,
796,
705,
71,
69,
6,
198,
220,
220,
220,
4308,
796,
705,
301,
78,
12,
18,
70,
6,
198,
220,
220,
220,
4903,
296,
796,
14808,
10786,
34,
3256,
357,
14202,
11,
6045,
11,
6045,
828,
357,
14202,
11,
6045,
11,
6045,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
46,
3256,
357,
15,
11,
6045,
11,
6045,
828,
19203,
49,
16,
3256,
6045,
11,
6045,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
39,
3256,
357,
15,
11,
352,
11,
6045,
828,
19203,
49,
17,
3256,
705,
32,
17,
3256,
6045,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
39,
3256,
357,
15,
11,
352,
11,
362,
828,
19203,
49,
18,
3256,
705,
32,
18,
3256,
705,
35,
18,
11537,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
39,
3256,
357,
15,
11,
352,
11,
362,
828,
19203,
49,
19,
3256,
705,
32,
19,
3256,
705,
35,
19,
11537,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
39,
3256,
357,
16,
11,
657,
11,
362,
828,
19203,
49,
20,
3256,
705,
32,
20,
3256,
705,
35,
20,
6,
4008,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
6,
49,
16,
10354,
362,
13,
21,
11,
705,
49,
17,
10354,
362,
13,
15,
11,
705,
32,
17,
10354,
352,
13,
24,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
49,
18,
10354,
362,
13,
15,
11,
705,
32,
18,
10354,
352,
13,
24,
11,
705,
35,
18,
10354,
362,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
49,
19,
10354,
362,
13,
15,
11,
705,
32,
19,
10354,
352,
13,
24,
11,
705,
35,
19,
10354,
604,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
49,
20,
10354,
352,
13,
23,
11,
705,
32,
20,
10354,
352,
13,
23,
11,
705,
35,
20,
10354,
642,
13,
17,
30072,
198,
220,
220,
220,
1963,
796,
352,
198,
220,
220,
220,
3877,
796,
657,
198,
220,
220,
220,
15769,
62,
49343,
796,
6407,
198,
220,
220,
220,
12912,
62,
37652,
17540,
796,
19203,
49,
20,
3256,
705,
32,
20,
3256,
705,
35,
18,
11537,
198,
220,
220,
220,
1006,
62,
69,
42005,
62,
27160,
796,
357,
16,
13,
23,
11,
352,
13,
23,
11,
362,
13,
16,
8,
198,
220,
220,
220,
329,
1172,
287,
1288,
7249,
13,
16002,
13,
40085,
1634,
62,
23065,
82,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
4226,
62,
2536,
796,
6374,
46023,
62,
35,
4177,
58,
1676,
70,
60,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
17242,
4093,
7908,
857,
407,
1104,
31070,
41446,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1172,
14512,
705,
43395,
535,
7908,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2172,
62,
46265,
22046,
796,
1391,
6,
27688,
62,
49343,
10354,
15769,
62,
49343,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
69,
42005,
62,
37652,
17540,
10354,
220,
12912,
62,
37652,
17540,
92,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2172,
62,
46265,
22046,
796,
1391,
6,
27688,
62,
49343,
10354,
15769,
62,
49343,
92,
628,
220,
220,
220,
220,
220,
220,
220,
410,
874,
796,
4808,
9288,
62,
79,
541,
4470,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4226,
62,
2536,
28,
12048,
62,
2536,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
28,
417,
7249,
13,
16002,
13,
40085,
1634,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7183,
16193,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
46862,
13,
22554,
41052,
1676,
70,
11,
2446,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
46862,
13,
8738,
62,
469,
15748,
41052,
1676,
70,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
46862,
13,
8738,
62,
89,
6759,
8609,
41052,
1676,
70,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26498,
16193,
469,
296,
11,
3877,
11,
1963,
11,
2446,
11,
4308,
11,
1172,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
86,
22046,
28,
8738,
62,
46265,
22046,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
28,
417,
7249,
13,
12331,
13,
3185,
51,
62,
45,
4503,
1340,
53,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
46265,
22046,
34758,
6,
21858,
62,
25811,
10354,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
18076,
13,
16684,
1958,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
7249,
13,
19722,
13,
27871,
13,
22921,
2043,
1137,
62,
11,
362,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2361,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
12786,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
4226,
62,
2536,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2198,
326,
262,
12912,
22715,
1422,
470,
1487,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
2611,
796,
410,
874,
58,
12,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1188,
62,
67,
310,
796,
3557,
349,
13,
89,
6759,
8609,
13,
27160,
7,
89,
2611,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12912,
62,
27160,
796,
46545,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3975,
7,
2100,
62,
67,
310,
13,
834,
1136,
9186,
834,
11,
12912,
62,
37652,
17540,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6818,
299,
32152,
13,
439,
19836,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12912,
62,
27160,
11,
1006,
62,
69,
42005,
62,
27160,
11,
374,
83,
349,
28,
16,
68,
12,
19,
8,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1332,
834,
22554,
3419,
198,
220,
220,
220,
1332,
834,
49607,
3419,
198,
220,
220,
220,
1332,
834,
33979,
666,
3419,
198,
220,
220,
220,
1332,
834,
40085,
1634,
3419,
198
] | 1.780455 | 3,735 |
from setuptools import setup
setup(
name = 'tnn',
version = '0.0.4',
description = 'Tensorflow Neural Network Framework for Algorithmic Traders',
url = 'http://github.com/Savahi/tnn',
author = 'Savahi',
author_email = '[email protected]',
license = 'MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
],
packages = ['tnn'],
keywords = 'neural network tensorflow algorithmic trading stock exchange',
install_requires = ['tensorflow', 'numpy', 'datetime', 'shelve', 'os', 'taft'],
zip_safe = False )
| [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
220,
198,
197,
3672,
796,
705,
83,
20471,
3256,
198,
197,
9641,
796,
705,
15,
13,
15,
13,
19,
3256,
198,
197,
11213,
796,
705,
51,
22854,
11125,
47986,
7311,
25161,
329,
978,
7727,
9383,
8397,
364,
3256,
198,
197,
6371,
796,
705,
4023,
1378,
12567,
13,
785,
14,
47362,
32810,
14,
83,
20471,
3256,
198,
197,
9800,
796,
705,
47362,
32810,
3256,
198,
197,
9800,
62,
12888,
796,
705,
1477,
31,
2213,
4980,
1734,
13,
622,
3256,
198,
197,
43085,
796,
705,
36393,
3256,
198,
197,
4871,
13350,
41888,
198,
197,
220,
220,
220,
705,
41206,
12678,
7904,
513,
532,
12995,
3256,
198,
197,
220,
220,
220,
705,
5317,
1631,
7591,
1240,
7904,
34152,
3256,
198,
197,
4357,
197,
198,
197,
43789,
796,
37250,
83,
20471,
6,
4357,
198,
197,
2539,
10879,
796,
705,
710,
1523,
3127,
11192,
273,
11125,
8385,
9383,
7313,
4283,
5163,
3256,
198,
197,
17350,
62,
47911,
796,
37250,
83,
22854,
11125,
3256,
705,
77,
32152,
3256,
705,
19608,
8079,
3256,
705,
82,
2978,
303,
3256,
705,
418,
3256,
705,
8326,
701,
6,
4357,
198,
197,
13344,
62,
21230,
796,
10352,
1267,
628,
198
] | 2.834171 | 199 |
import pandas as pd
import numpy as np | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941
] | 3.166667 | 12 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
from django.db import models
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
4818,
8079,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
628
] | 2.583333 | 36 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
import unittest
from hypothesis import given, example
from . import pyliza_strategies as liza_st
from pyliza.transformation import DecompositionRule
from pyliza.processing import ProcessingWord as PW
from pyliza.processing import ProcessingPhrase as PPhrase
| [
11748,
555,
715,
395,
198,
6738,
14078,
1330,
1813,
11,
1672,
198,
198,
6738,
764,
1330,
279,
2645,
23638,
62,
2536,
2397,
444,
355,
300,
23638,
62,
301,
198,
6738,
279,
2645,
23638,
13,
7645,
1161,
1330,
4280,
296,
9150,
31929,
198,
6738,
279,
2645,
23638,
13,
36948,
1330,
28403,
26449,
355,
44141,
198,
6738,
279,
2645,
23638,
13,
36948,
1330,
28403,
2725,
22789,
355,
350,
2725,
22789,
628
] | 3.768116 | 69 |
# -*- coding: utf-8 -*-
#
# Copyright © 2012 Zulip, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# See zulip_trac.py for installation and configuration instructions
# Change these constants to configure the plugin:
ZULIP_USER = "[email protected]"
ZULIP_API_KEY = "0123456789abcdef0123456789abcdef"
STREAM_FOR_NOTIFICATIONS = "trac"
TRAC_BASE_TICKET_URL = "https://trac.example.com/ticket"
# Most people find that having every change in Trac result in a
# notification is too noisy -- in particular, when someone goes
# through recategorizing a bunch of tickets, that can often be noisy
# and annoying. We solve this issue by only sending a notification
# for changes to the fields listed below.
#
# TRAC_NOTIFY_FIELDS lets you specify which fields will trigger a
# Zulip notification in response to a trac update; you should change
# this list to match your team's workflow. The complete list of
# possible fields is:
#
# (priority, milestone, cc, owner, keywords, component, severity,
# type, versions, description, resolution, summary, comment)
TRAC_NOTIFY_FIELDS = ["description", "summary", "resolution", "comment", "owner"]
## If properly installed, the Zulip API should be in your import
## path, but if not, set a custom path below
ZULIP_API_PATH = None
# Set this to your Zulip API server URI
ZULIP_SITE = "https://zulip.example.com"
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
10673,
2321,
1168,
377,
541,
11,
3457,
13,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
3917,
10314,
3696,
357,
1169,
366,
25423,
12340,
284,
1730,
198,
2,
287,
262,
10442,
1231,
17504,
11,
1390,
1231,
17385,
262,
2489,
198,
2,
284,
779,
11,
4866,
11,
13096,
11,
20121,
11,
7715,
11,
14983,
11,
850,
43085,
11,
290,
14,
273,
3677,
198,
2,
9088,
286,
262,
10442,
11,
290,
284,
8749,
6506,
284,
4150,
262,
10442,
318,
198,
2,
30760,
284,
466,
523,
11,
2426,
284,
262,
1708,
3403,
25,
198,
2,
198,
2,
383,
2029,
6634,
4003,
290,
428,
7170,
4003,
2236,
307,
3017,
287,
198,
2,
477,
9088,
393,
8904,
16690,
286,
262,
10442,
13,
198,
2,
198,
2,
3336,
47466,
3180,
36592,
2389,
1961,
366,
1921,
3180,
1600,
42881,
34764,
56,
3963,
15529,
509,
12115,
11,
7788,
32761,
6375,
198,
2,
8959,
49094,
11,
47783,
2751,
21728,
5626,
40880,
5390,
3336,
34764,
11015,
3963,
34482,
3398,
1565,
5603,
25382,
11,
198,
2,
376,
46144,
7473,
317,
16652,
2149,
37232,
33079,
48933,
5357,
44521,
1268,
10913,
2751,
12529,
13,
3268,
8005,
49261,
50163,
3336,
198,
2,
37195,
20673,
6375,
27975,
38162,
9947,
367,
15173,
4877,
9348,
43031,
19146,
7473,
15529,
47666,
3955,
11,
29506,
25552,
6375,
25401,
198,
2,
43031,
25382,
11,
7655,
2767,
16879,
3268,
3537,
40282,
3963,
27342,
10659,
11,
309,
9863,
6375,
25401,
54,
24352,
11,
5923,
1797,
2751,
16034,
11,
198,
2,
16289,
3963,
6375,
3268,
7102,
45,
24565,
13315,
3336,
47466,
6375,
3336,
23210,
6375,
25401,
5550,
1847,
20754,
3268,
198,
2,
3336,
47466,
13,
198,
198,
2,
4091,
1976,
377,
541,
62,
2213,
330,
13,
9078,
329,
9988,
290,
8398,
7729,
198,
198,
2,
9794,
777,
38491,
284,
17425,
262,
13877,
25,
198,
57,
6239,
4061,
62,
29904,
796,
366,
2213,
330,
12,
13645,
31,
20688,
13,
785,
1,
198,
57,
6239,
4061,
62,
17614,
62,
20373,
796,
366,
486,
1954,
2231,
3134,
4531,
39305,
4299,
486,
1954,
2231,
3134,
4531,
39305,
4299,
1,
198,
2257,
32235,
62,
13775,
62,
11929,
30643,
18421,
796,
366,
2213,
330,
1,
198,
5446,
2246,
62,
33,
11159,
62,
51,
11860,
2767,
62,
21886,
796,
366,
5450,
1378,
2213,
330,
13,
20688,
13,
785,
14,
43350,
1,
198,
198,
2,
4042,
661,
1064,
326,
1719,
790,
1487,
287,
833,
330,
1255,
287,
257,
198,
2,
14483,
318,
1165,
31210,
1377,
287,
1948,
11,
618,
2130,
2925,
198,
2,
832,
664,
47467,
2890,
257,
7684,
286,
8587,
11,
326,
460,
1690,
307,
31210,
198,
2,
290,
15774,
13,
220,
775,
8494,
428,
2071,
416,
691,
7216,
257,
14483,
198,
2,
329,
2458,
284,
262,
7032,
5610,
2174,
13,
198,
2,
198,
2,
7579,
2246,
62,
11929,
5064,
56,
62,
11674,
3698,
5258,
8781,
345,
11986,
543,
7032,
481,
7616,
257,
198,
2,
1168,
377,
541,
14483,
287,
2882,
284,
257,
491,
330,
4296,
26,
345,
815,
1487,
198,
2,
428,
1351,
284,
2872,
534,
1074,
338,
30798,
13,
220,
383,
1844,
1351,
286,
198,
2,
1744,
7032,
318,
25,
198,
2,
198,
2,
357,
49336,
11,
23554,
11,
36624,
11,
4870,
11,
26286,
11,
7515,
11,
19440,
11,
198,
2,
220,
2099,
11,
6300,
11,
6764,
11,
6323,
11,
10638,
11,
2912,
8,
198,
5446,
2246,
62,
11929,
5064,
56,
62,
11674,
3698,
5258,
796,
14631,
11213,
1600,
366,
49736,
1600,
366,
29268,
1600,
366,
23893,
1600,
366,
18403,
8973,
198,
198,
2235,
1002,
6105,
6589,
11,
262,
1168,
377,
541,
7824,
815,
307,
287,
534,
1330,
198,
2235,
3108,
11,
475,
611,
407,
11,
900,
257,
2183,
3108,
2174,
198,
57,
6239,
4061,
62,
17614,
62,
34219,
796,
6045,
198,
198,
2,
5345,
428,
284,
534,
1168,
377,
541,
7824,
4382,
43975,
198,
57,
6239,
4061,
62,
50,
12709,
796,
366,
5450,
1378,
89,
377,
541,
13,
20688,
13,
785,
1,
198
] | 3.528274 | 672 |
"""Update invoice profile API method."""
from ibsng.handler.handler import Handler
class updateInvoiceProfile(Handler):
"""Update invoice profile method class."""
def control(self):
"""Validate inputs after setup method.
:return: None
:rtype: None
"""
self.is_valid(self.profile_id, int)
self.is_valid(self.profile_name, str)
self.is_valid(self.isp_name, str, False)
self.is_valid(self.rules, list, False)
self.is_valid(self.comment, str, False)
def setup(self, profile_id, profile_name,
isp_name="", rules=[], comment=""):
"""Setup required parameters.
:param int profile_id: profile id
:param str profile_name: new profile name
:param str isp_name: new isp name
:param list rules: new rules
:param str comment: new comment
:return: None
:rtype: None
"""
self.profile_id = profile_id
self.profile_name = profile_name
self.isp_name = isp_name
self.rules = rules
self.comment = comment
| [
37811,
10260,
45458,
7034,
7824,
2446,
526,
15931,
198,
6738,
24283,
82,
782,
13,
30281,
13,
30281,
1330,
32412,
628,
198,
4871,
4296,
19904,
2942,
37046,
7,
25060,
2599,
198,
220,
220,
220,
37227,
10260,
45458,
7034,
2446,
1398,
526,
15931,
628,
220,
220,
220,
825,
1630,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
7762,
20540,
17311,
706,
9058,
2446,
13,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
271,
62,
12102,
7,
944,
13,
13317,
62,
312,
11,
493,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
271,
62,
12102,
7,
944,
13,
13317,
62,
3672,
11,
965,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
271,
62,
12102,
7,
944,
13,
8802,
62,
3672,
11,
965,
11,
10352,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
271,
62,
12102,
7,
944,
13,
38785,
11,
1351,
11,
10352,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
271,
62,
12102,
7,
944,
13,
23893,
11,
965,
11,
10352,
8,
628,
220,
220,
220,
825,
9058,
7,
944,
11,
7034,
62,
312,
11,
7034,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
79,
62,
3672,
2625,
1600,
3173,
41888,
4357,
2912,
33151,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
40786,
2672,
10007,
13,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
493,
7034,
62,
312,
25,
7034,
4686,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
965,
7034,
62,
3672,
25,
649,
7034,
1438,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
965,
318,
79,
62,
3672,
25,
649,
318,
79,
1438,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
1351,
3173,
25,
649,
3173,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
965,
2912,
25,
649,
2912,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
13317,
62,
312,
796,
7034,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
13317,
62,
3672,
796,
7034,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
8802,
62,
3672,
796,
318,
79,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
38785,
796,
3173,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
23893,
796,
2912,
198
] | 2.364807 | 466 |
import pytest
from api import API
@pytest.fixture
| [
11748,
12972,
9288,
198,
6738,
40391,
1330,
7824,
628,
198,
31,
9078,
9288,
13,
69,
9602,
628,
628,
628,
198
] | 2.9 | 20 |
from dataclasses import dataclass
from . import rte
@dataclass
@dataclass
@dataclass
@dataclass
| [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
198,
6738,
764,
1330,
374,
660,
628,
198,
31,
19608,
330,
31172,
628,
198,
31,
19608,
330,
31172,
628,
198,
31,
19608,
330,
31172,
628,
198,
31,
19608,
330,
31172,
628
] | 2.65 | 40 |
# coding: utf-8
import unittest
import os
from asn1crypto import x509, pem
from pyhanko_certvalidator.fetchers import aiohttp_fetchers, requests_fetchers
from pyhanko_certvalidator.context import ValidationContext
from pyhanko_certvalidator.validate import verify_crl
from .constants import TEST_REQUEST_TIMEOUT
tests_root = os.path.dirname(__file__)
fixtures_dir = os.path.join(tests_root, 'fixtures')
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
11748,
555,
715,
395,
198,
11748,
28686,
198,
198,
6738,
355,
77,
16,
29609,
78,
1330,
2124,
29022,
11,
279,
368,
198,
6738,
12972,
71,
962,
78,
62,
22583,
12102,
1352,
13,
34045,
3533,
1330,
257,
952,
4023,
62,
34045,
3533,
11,
7007,
62,
34045,
3533,
198,
6738,
12972,
71,
962,
78,
62,
22583,
12102,
1352,
13,
22866,
1330,
3254,
24765,
21947,
198,
6738,
12972,
71,
962,
78,
62,
22583,
12102,
1352,
13,
12102,
378,
1330,
11767,
62,
6098,
75,
198,
6738,
764,
9979,
1187,
1330,
43001,
62,
2200,
35780,
62,
34694,
12425,
198,
198,
41989,
62,
15763,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
8,
198,
69,
25506,
62,
15908,
796,
28686,
13,
6978,
13,
22179,
7,
41989,
62,
15763,
11,
705,
69,
25506,
11537,
628
] | 2.907143 | 140 |
import os
import sys
from datetime import datetime
from typing import List, Tuple, Union
import clr
import pandas as pd
PISDKHOME = os.getenv("PISDKHOME")
sys.path.append(PISDKHOME)
clr.AddReference("OSIsoft.PISDK")
from PISDK import PISDK, PISubBatch, PIUnitBatch
UnitBatches = pd.DataFrame
SubBatches = pd.DataFrame
class PIBatch:
"""
Class for querying PIBatch data via the PISDK
Args
- server (str): the name of the PIServer to connect to
Raises
- PIBatchError: an error occurred trying to connect to
server
"""
def search(
self,
unit_id: str,
start_time: Union[datetime, str] = "-100d",
end_time: Union[datetime, str] = "*",
batch_id: Union[List[str], str] = "*",
product: Union[List[str], str] = "*",
procedure: Union[List[str], str] = "*",
sub_batches: Union[List[str], str] = "*"
) -> Tuple[UnitBatches, SubBatches]:
"""
Query batches for a given unit_id
Args
- unit_id (str): Wildcard string of a PIModule name to match
- start_time (Union[datetime, str]): The search start time.
datetime.datetime objects are converted to ISOFormat strings
- end_time (Union[datetime, str]): The search end time.
datetime.datetime objects are converted to ISOFormat strings.
Defaults to "*"
- batch_id (Union[List[str], str]): Wildcard string of BatchID to match.
List instances are concatenated to a single string separated by commas
",". Defaults to "*"
- product (Union[List[str], str]): Wildcard string of Product to match.
List instances are concatenated to a single string separated by commas
",". Defaults to "*"
- procedure (Union[List[str], str]): Wildcard string of Procedure to match.
List instances are concatenated to a single string separated by commas
",". Defaults to "*"
- sub_batches (Union[List[str], str]): Wildcard string of SubBatch to match.
List instances are concatenated to a single string separated by commas
",". Defaults to "*"
Returns
- UnitBatches (pd.DataFrame): DataFrame of unit batches with schema
"BatchID": str
"Product": str
"Name": str
"StartTime": str
"EndTime": str
"Procedure": str
"UniqueID": str
"SubBatchCount": int
- SubBatches (pd.DataFrame): Dataframe of sub batches with schema
"ParentID": str (PIUnitBatch.UniqueID)
"Name": str
"StartTime": str
"EndTime": str
"UniqueID": str (PISubBatch.UniqueID)
Raises
- PIBatchError: An error occurred in connecting to server or during
query
- NoBatchesFound: Query returned no results
"""
start_time, end_time, batch_id, product, procedure, sub_batches = self._prep_search_criteria(
start_time,
end_time,
batch_id,
product,
procedure,
sub_batches
)
try:
unit_batches_raw = [
PIUnitBatch(batch) for batch in self._db.PIUnitBatchSearch(
start_time, end_time, unit_id, batch_id, product, procedure, sub_batches
)
]
except BaseException as err:
raise PIBatchError(
"Unable to retrieve unit batches"
) from err
if not unit_batches_raw:
raise NoBatchesFound
sub_batches_raw = {unit_batch.UniqueID: unit_batch.PISubBatches for unit_batch in unit_batches_raw}
# parse unit batches and sub batches to dataframes
self.now = datetime.now().strftime("%m/%d/%Y %H:%M:%S %p")
unit_batches: UnitBatches = self._parse_unit_batches(unit_batches_raw)
sub_batches: SubBatches = self._parse_sub_batches(sub_batches_raw)
return unit_batches, sub_batches
def _prep_search_criteria(
self,
start_time: Union[datetime, str],
end_time: Union[datetime, str],
batch_id: Union[List[str], str],
product: Union[List[str], str],
procedure: Union[List[str], str],
sub_batches: Union[List[str], str]
) -> Tuple:
"""
Properly format variables for query
"""
start_time = start_time.isoformat() if isinstance(start_time, datetime) else start_time
end_time = end_time.isoformat() if isinstance(end_time, datetime) else end_time
batch_id = ','.join(batch_id) if isinstance(batch_id, list) else batch_id
product = ','.join(product) if isinstance(product, list) else product
procedure = ','.join(procedure) if isinstance(procedure, list) else procedure
sub_batches = ','.join(sub_batches) if isinstance(sub_batches, list) else sub_batches
return start_time, end_time, batch_id, product, procedure, sub_batches
def _parse_unit_batches(self, unit_batches: list) -> UnitBatches:
"""
Parse returned unit batches to required schema
Args
- unit_batches (list): List of PIUnitBatch objects
Returns
- UnitBatches (pd.DataFrame): DataFrame of unit batches with schema
"BatchID": str
"Product": str
"Name": str
"StartTime": str
"EndTime": str
"Procedure": str
"UniqueID": str
"SubBatchCount": int
"""
batch_ids = [unit_batch.BatchID for unit_batch in unit_batches]
products = [unit_batch.Product for unit_batch in unit_batches]
unit_names = [unit_batch.PIUnit.Name for unit_batch in unit_batches]
start_times = [unit_batch.StartTime.LocalDate.ToString() for unit_batch in unit_batches]
end_times = []
procedure_names = [unit_batch.ProcedureName for unit_batch in unit_batches]
unique_ids = [unit_batch.UniqueID for unit_batch in unit_batches]
sub_batch_counts = [unit_batch.PISubBatches.Count for unit_batch in unit_batches]
for unit_batch in unit_batches:
try:
end_times.append(unit_batch.EndTime.LocalDate.ToString())
except AttributeError:
end_times.append(self.now)
parsed = {
"BatchID": batch_ids,
"Product": products,
"Name": unit_names,
"StartTime": start_times,
"EndTime": end_times,
"Procedure": procedure_names,
"UniqueID": unique_ids,
"SubBatchCount": sub_batch_counts
}
return pd.DataFrame.from_dict(parsed)
def _parse_sub_batches(self, sub_batches: dict) -> SubBatches:
"""
Format returned sub batches to required schema
Args
- sub_batches (dict): key:value pair of objects
PIUnitBatch.UniqueID: PIUnitBatch.PISubBatches
Returns
- SubBatches (pd.DataFrame): Dataframe of sub batches with schema
"ParentID": str (PIUnitBatch.UniqueID)
"Name": str
"StartTime": str
"EndTime": str
"UniqueID": str (PISubBatch.UniqueID)
"""
parent_ids = []
names = []
start_times = []
end_times = []
unique_ids = []
for parent_id, sub_batch in sub_batches.items():
unit_sub_batches = [PISubBatch(unit_sub_batch) for unit_sub_batch in sub_batch]
for unit_sub_batch in unit_sub_batches:
parent_ids.append(parent_id)
names.append(unit_sub_batch.Name)
start_times.append(unit_sub_batch.StartTime.LocalDate.ToString())
try:
end_times.append(unit_sub_batch.EndTime.LocalDate.ToString())
except AttributeError:
end_times.append(self.now)
unique_ids.append(unit_sub_batch.UniqueID)
parsed = {
"ParentID": parent_ids,
"Name": names,
"StartTime": start_times,
"EndTime": end_times,
"UniqueID": unique_ids
}
return pd.DataFrame.from_dict(parsed) | [
11748,
28686,
198,
11748,
25064,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
19720,
1330,
7343,
11,
309,
29291,
11,
4479,
198,
198,
11748,
537,
81,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
47,
1797,
48510,
39069,
796,
28686,
13,
1136,
24330,
7203,
47,
1797,
48510,
39069,
4943,
198,
17597,
13,
6978,
13,
33295,
7,
47,
1797,
48510,
39069,
8,
198,
198,
565,
81,
13,
4550,
26687,
7203,
2640,
40,
4215,
13,
47,
1797,
48510,
4943,
198,
198,
6738,
350,
1797,
48510,
1330,
350,
1797,
48510,
11,
350,
1797,
549,
33,
963,
11,
30434,
26453,
33,
963,
198,
198,
26453,
33,
20981,
796,
279,
67,
13,
6601,
19778,
198,
7004,
33,
20981,
796,
279,
67,
13,
6601,
19778,
628,
628,
198,
4871,
350,
9865,
963,
25,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
5016,
329,
42517,
1112,
350,
9865,
963,
1366,
2884,
262,
350,
1797,
48510,
198,
220,
220,
220,
220,
198,
220,
220,
220,
943,
14542,
198,
220,
220,
220,
220,
220,
220,
220,
532,
4382,
357,
2536,
2599,
262,
1438,
286,
262,
350,
1797,
18497,
284,
2018,
284,
628,
220,
220,
220,
7567,
2696,
198,
220,
220,
220,
220,
220,
220,
220,
532,
350,
9865,
963,
12331,
25,
281,
4049,
5091,
2111,
284,
2018,
284,
198,
220,
220,
220,
220,
220,
220,
220,
4382,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
2989,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4326,
62,
312,
25,
965,
11,
198,
220,
220,
220,
220,
220,
220,
220,
923,
62,
2435,
25,
4479,
58,
19608,
8079,
11,
965,
60,
796,
27444,
3064,
67,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
886,
62,
2435,
25,
4479,
58,
19608,
8079,
11,
965,
60,
796,
366,
9,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
312,
25,
4479,
58,
8053,
58,
2536,
4357,
965,
60,
796,
366,
9,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
1720,
25,
4479,
58,
8053,
58,
2536,
4357,
965,
60,
796,
366,
9,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
8771,
25,
4479,
58,
8053,
58,
2536,
4357,
965,
60,
796,
366,
9,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
850,
62,
8664,
2052,
25,
4479,
58,
8053,
58,
2536,
4357,
965,
60,
796,
366,
9,
1,
198,
220,
220,
220,
1267,
4613,
309,
29291,
58,
26453,
33,
20981,
11,
3834,
33,
20981,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
43301,
37830,
329,
257,
1813,
4326,
62,
312,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
4326,
62,
312,
357,
2536,
2599,
6183,
9517,
4731,
286,
257,
350,
3955,
375,
2261,
1438,
284,
2872,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
923,
62,
2435,
357,
38176,
58,
19608,
8079,
11,
965,
60,
2599,
383,
2989,
923,
640,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4818,
8079,
13,
19608,
8079,
5563,
389,
11513,
284,
19694,
26227,
13042,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
886,
62,
2435,
357,
38176,
58,
19608,
8079,
11,
965,
60,
2599,
383,
2989,
886,
640,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4818,
8079,
13,
19608,
8079,
5563,
389,
11513,
284,
19694,
26227,
13042,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2896,
13185,
284,
366,
9,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
15458,
62,
312,
357,
38176,
58,
8053,
58,
2536,
4357,
965,
60,
2599,
6183,
9517,
4731,
286,
347,
963,
2389,
284,
2872,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7343,
10245,
389,
1673,
36686,
515,
284,
257,
2060,
4731,
11266,
416,
725,
292,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
553,
13,
2896,
13185,
284,
366,
9,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
1720,
357,
38176,
58,
8053,
58,
2536,
4357,
965,
60,
2599,
6183,
9517,
4731,
286,
8721,
284,
2872,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7343,
10245,
389,
1673,
36686,
515,
284,
257,
2060,
4731,
11266,
416,
725,
292,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
553,
13,
2896,
13185,
284,
366,
9,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
8771,
357,
38176,
58,
8053,
58,
2536,
4357,
965,
60,
2599,
6183,
9517,
4731,
286,
34997,
284,
2872,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7343,
10245,
389,
1673,
36686,
515,
284,
257,
2060,
4731,
11266,
416,
725,
292,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
553,
13,
2896,
13185,
284,
366,
9,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
850,
62,
8664,
2052,
357,
38176,
58,
8053,
58,
2536,
4357,
965,
60,
2599,
6183,
9517,
4731,
286,
3834,
33,
963,
284,
2872,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7343,
10245,
389,
1673,
36686,
515,
284,
257,
2060,
4731,
11266,
416,
725,
292,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
553,
13,
2896,
13185,
284,
366,
9,
1,
628,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
16409,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
11801,
33,
20981,
357,
30094,
13,
6601,
19778,
2599,
6060,
19778,
286,
4326,
37830,
351,
32815,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
33,
963,
2389,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15667,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5376,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10434,
7575,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12915,
7575,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
2964,
771,
495,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
40257,
2389,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7004,
33,
963,
12332,
1298,
493,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
3834,
33,
20981,
357,
30094,
13,
6601,
19778,
2599,
6060,
14535,
286,
850,
37830,
351,
32815,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
24546,
2389,
1298,
965,
357,
11901,
26453,
33,
963,
13,
40257,
2389,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5376,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10434,
7575,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12915,
7575,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
40257,
2389,
1298,
965,
357,
47,
1797,
549,
33,
963,
13,
40257,
2389,
8,
628,
220,
220,
220,
220,
220,
220,
220,
7567,
2696,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
350,
9865,
963,
12331,
25,
1052,
4049,
5091,
287,
14320,
284,
4382,
393,
1141,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12405,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
1400,
33,
20981,
21077,
25,
43301,
4504,
645,
2482,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
923,
62,
2435,
11,
886,
62,
2435,
11,
15458,
62,
312,
11,
1720,
11,
8771,
11,
850,
62,
8664,
2052,
796,
2116,
13557,
46012,
62,
12947,
62,
22213,
5142,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
2435,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
62,
2435,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1720,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8771,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
850,
62,
8664,
2052,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4326,
62,
8664,
2052,
62,
1831,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30434,
26453,
33,
963,
7,
43501,
8,
329,
15458,
287,
2116,
13557,
9945,
13,
11901,
26453,
33,
963,
18243,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
2435,
11,
886,
62,
2435,
11,
4326,
62,
312,
11,
15458,
62,
312,
11,
1720,
11,
8771,
11,
850,
62,
8664,
2052,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
7308,
16922,
355,
11454,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
350,
9865,
963,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3118,
540,
284,
19818,
4326,
37830,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
422,
11454,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
4326,
62,
8664,
2052,
62,
1831,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
1400,
33,
20981,
21077,
628,
220,
220,
220,
220,
220,
220,
220,
850,
62,
8664,
2052,
62,
1831,
796,
1391,
20850,
62,
43501,
13,
40257,
2389,
25,
4326,
62,
43501,
13,
47,
1797,
549,
33,
20981,
329,
4326,
62,
43501,
287,
4326,
62,
8664,
2052,
62,
1831,
92,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
21136,
4326,
37830,
290,
850,
37830,
284,
1366,
37805,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2197,
796,
4818,
8079,
13,
2197,
22446,
2536,
31387,
7203,
4,
76,
14,
4,
67,
14,
4,
56,
4064,
39,
25,
4,
44,
25,
4,
50,
4064,
79,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
4326,
62,
8664,
2052,
25,
11801,
33,
20981,
796,
2116,
13557,
29572,
62,
20850,
62,
8664,
2052,
7,
20850,
62,
8664,
2052,
62,
1831,
8,
198,
220,
220,
220,
220,
220,
220,
220,
850,
62,
8664,
2052,
25,
3834,
33,
20981,
796,
2116,
13557,
29572,
62,
7266,
62,
8664,
2052,
7,
7266,
62,
8664,
2052,
62,
1831,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
4326,
62,
8664,
2052,
11,
850,
62,
8664,
2052,
628,
220,
220,
220,
825,
4808,
46012,
62,
12947,
62,
22213,
5142,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
11,
198,
220,
220,
220,
220,
220,
220,
220,
923,
62,
2435,
25,
4479,
58,
19608,
8079,
11,
965,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
886,
62,
2435,
25,
4479,
58,
19608,
8079,
11,
965,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
312,
25,
4479,
58,
8053,
58,
2536,
4357,
965,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
1720,
25,
4479,
58,
8053,
58,
2536,
4357,
965,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
8771,
25,
4479,
58,
8053,
58,
2536,
4357,
965,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
850,
62,
8664,
2052,
25,
4479,
58,
8053,
58,
2536,
4357,
965,
60,
198,
220,
220,
220,
1267,
4613,
309,
29291,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
45989,
306,
5794,
9633,
329,
12405,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
923,
62,
2435,
796,
923,
62,
2435,
13,
26786,
18982,
3419,
611,
318,
39098,
7,
9688,
62,
2435,
11,
4818,
8079,
8,
2073,
923,
62,
2435,
198,
220,
220,
220,
220,
220,
220,
220,
886,
62,
2435,
796,
886,
62,
2435,
13,
26786,
18982,
3419,
611,
318,
39098,
7,
437,
62,
2435,
11,
4818,
8079,
8,
2073,
886,
62,
2435,
198,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
312,
796,
705,
4032,
13,
22179,
7,
43501,
62,
312,
8,
611,
318,
39098,
7,
43501,
62,
312,
11,
1351,
8,
2073,
15458,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
1720,
796,
705,
4032,
13,
22179,
7,
11167,
8,
611,
318,
39098,
7,
11167,
11,
1351,
8,
2073,
1720,
198,
220,
220,
220,
220,
220,
220,
220,
8771,
796,
705,
4032,
13,
22179,
7,
1676,
771,
495,
8,
611,
318,
39098,
7,
1676,
771,
495,
11,
1351,
8,
2073,
8771,
198,
220,
220,
220,
220,
220,
220,
220,
850,
62,
8664,
2052,
796,
705,
4032,
13,
22179,
7,
7266,
62,
8664,
2052,
8,
611,
318,
39098,
7,
7266,
62,
8664,
2052,
11,
1351,
8,
2073,
850,
62,
8664,
2052,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
923,
62,
2435,
11,
886,
62,
2435,
11,
15458,
62,
312,
11,
1720,
11,
8771,
11,
850,
62,
8664,
2052,
628,
220,
220,
220,
825,
4808,
29572,
62,
20850,
62,
8664,
2052,
7,
944,
11,
4326,
62,
8664,
2052,
25,
1351,
8,
4613,
11801,
33,
20981,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2547,
325,
4504,
4326,
37830,
284,
2672,
32815,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
4326,
62,
8664,
2052,
357,
4868,
2599,
7343,
286,
30434,
26453,
33,
963,
5563,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
11801,
33,
20981,
357,
30094,
13,
6601,
19778,
2599,
6060,
19778,
286,
4326,
37830,
351,
32815,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
33,
963,
2389,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15667,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5376,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10434,
7575,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12915,
7575,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
2964,
771,
495,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
40257,
2389,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7004,
33,
963,
12332,
1298,
493,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
2340,
796,
685,
20850,
62,
43501,
13,
33,
963,
2389,
329,
4326,
62,
43501,
287,
4326,
62,
8664,
2052,
60,
198,
220,
220,
220,
220,
220,
220,
220,
3186,
796,
685,
20850,
62,
43501,
13,
15667,
329,
4326,
62,
43501,
287,
4326,
62,
8664,
2052,
60,
198,
220,
220,
220,
220,
220,
220,
220,
4326,
62,
14933,
796,
685,
20850,
62,
43501,
13,
11901,
26453,
13,
5376,
329,
4326,
62,
43501,
287,
4326,
62,
8664,
2052,
60,
198,
220,
220,
220,
220,
220,
220,
220,
923,
62,
22355,
796,
685,
20850,
62,
43501,
13,
10434,
7575,
13,
14565,
10430,
13,
2514,
10100,
3419,
329,
4326,
62,
43501,
287,
4326,
62,
8664,
2052,
60,
198,
220,
220,
220,
220,
220,
220,
220,
886,
62,
22355,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
8771,
62,
14933,
796,
685,
20850,
62,
43501,
13,
2964,
771,
495,
5376,
329,
4326,
62,
43501,
287,
4326,
62,
8664,
2052,
60,
198,
220,
220,
220,
220,
220,
220,
220,
3748,
62,
2340,
796,
685,
20850,
62,
43501,
13,
40257,
2389,
329,
4326,
62,
43501,
287,
4326,
62,
8664,
2052,
60,
198,
220,
220,
220,
220,
220,
220,
220,
850,
62,
43501,
62,
9127,
82,
796,
685,
20850,
62,
43501,
13,
47,
1797,
549,
33,
20981,
13,
12332,
329,
4326,
62,
43501,
287,
4326,
62,
8664,
2052,
60,
198,
220,
220,
220,
220,
220,
220,
220,
329,
4326,
62,
43501,
287,
4326,
62,
8664,
2052,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
62,
22355,
13,
33295,
7,
20850,
62,
43501,
13,
12915,
7575,
13,
14565,
10430,
13,
2514,
10100,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
3460,
4163,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
62,
22355,
13,
33295,
7,
944,
13,
2197,
8,
628,
220,
220,
220,
220,
220,
220,
220,
44267,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
33,
963,
2389,
1298,
15458,
62,
2340,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15667,
1298,
3186,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5376,
1298,
4326,
62,
14933,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10434,
7575,
1298,
923,
62,
22355,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12915,
7575,
1298,
886,
62,
22355,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
2964,
771,
495,
1298,
8771,
62,
14933,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
40257,
2389,
1298,
3748,
62,
2340,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7004,
33,
963,
12332,
1298,
850,
62,
43501,
62,
9127,
82,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
279,
67,
13,
6601,
19778,
13,
6738,
62,
11600,
7,
79,
945,
276,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
825,
4808,
29572,
62,
7266,
62,
8664,
2052,
7,
944,
11,
850,
62,
8664,
2052,
25,
8633,
8,
4613,
3834,
33,
20981,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
18980,
4504,
850,
37830,
284,
2672,
32815,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
850,
62,
8664,
2052,
357,
11600,
2599,
1994,
25,
8367,
5166,
286,
5563,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30434,
26453,
33,
963,
13,
40257,
2389,
25,
30434,
26453,
33,
963,
13,
47,
1797,
549,
33,
20981,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
3834,
33,
20981,
357,
30094,
13,
6601,
19778,
2599,
6060,
14535,
286,
850,
37830,
351,
32815,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
24546,
2389,
1298,
965,
357,
11901,
26453,
33,
963,
13,
40257,
2389,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5376,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10434,
7575,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12915,
7575,
1298,
965,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
40257,
2389,
1298,
965,
357,
47,
1797,
549,
33,
963,
13,
40257,
2389,
8,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2560,
62,
2340,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
3891,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
923,
62,
22355,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
886,
62,
22355,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
3748,
62,
2340,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
329,
2560,
62,
312,
11,
850,
62,
43501,
287,
850,
62,
8664,
2052,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4326,
62,
7266,
62,
8664,
2052,
796,
685,
47,
1797,
549,
33,
963,
7,
20850,
62,
7266,
62,
43501,
8,
329,
4326,
62,
7266,
62,
43501,
287,
850,
62,
43501,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
4326,
62,
7266,
62,
43501,
287,
4326,
62,
7266,
62,
8664,
2052,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2560,
62,
2340,
13,
33295,
7,
8000,
62,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3891,
13,
33295,
7,
20850,
62,
7266,
62,
43501,
13,
5376,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
22355,
13,
33295,
7,
20850,
62,
7266,
62,
43501,
13,
10434,
7575,
13,
14565,
10430,
13,
2514,
10100,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
62,
22355,
13,
33295,
7,
20850,
62,
7266,
62,
43501,
13,
12915,
7575,
13,
14565,
10430,
13,
2514,
10100,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
3460,
4163,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
62,
22355,
13,
33295,
7,
944,
13,
2197,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3748,
62,
2340,
13,
33295,
7,
20850,
62,
7266,
62,
43501,
13,
40257,
2389,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
44267,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
24546,
2389,
1298,
2560,
62,
2340,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5376,
1298,
3891,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10434,
7575,
1298,
923,
62,
22355,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12915,
7575,
1298,
886,
62,
22355,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
40257,
2389,
1298,
3748,
62,
2340,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
279,
67,
13,
6601,
19778,
13,
6738,
62,
11600,
7,
79,
945,
276,
8
] | 2.088106 | 4,086 |
#!/usr/bin/env python3.7
import numpy as np
import pandas as pd
import tinydb as db
import matplotlib.pyplot as plt
from scipy.integrate import simps
from pygama import DataSet
import pygama.utils as pgu
import pygama.analysis.histograms as pgh
import pygama.analysis.peak_fitting as pga
from numpy import diff
"""""
This is a script to fit the 60keV, 99keV and 103keV lines of an 241Am scan.
This script is based on the pygama version from December 2019 and is a bit outdated.
An update will be done soon
You need to have done a Calibration before and the output must be in the ds.calDB file
The function takes a DataSet (December version) and a t2-level file
Then a fit on the 60kev line and on the 99/103 keV lines is performed, the
integrals are caluclated and the ratio is determind
A.Zschocke
"""
if __name__=="__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
13,
22,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
7009,
9945,
355,
20613,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
629,
541,
88,
13,
18908,
4873,
1330,
985,
862,
198,
6738,
12972,
70,
1689,
1330,
6060,
7248,
198,
11748,
12972,
70,
1689,
13,
26791,
355,
279,
5162,
198,
11748,
12972,
70,
1689,
13,
20930,
13,
10034,
26836,
355,
279,
456,
198,
11748,
12972,
70,
1689,
13,
20930,
13,
36729,
62,
32232,
355,
279,
4908,
198,
6738,
299,
32152,
1330,
814,
628,
220,
198,
198,
15931,
37811,
198,
1212,
318,
257,
4226,
284,
4197,
262,
3126,
365,
53,
11,
7388,
365,
53,
290,
15349,
365,
53,
3951,
286,
281,
35150,
5840,
9367,
13,
198,
1212,
4226,
318,
1912,
319,
262,
12972,
70,
1689,
2196,
422,
3426,
13130,
290,
318,
257,
1643,
23572,
13,
220,
198,
2025,
4296,
481,
307,
1760,
2582,
198,
198,
1639,
761,
284,
423,
1760,
257,
2199,
571,
1358,
878,
290,
262,
5072,
1276,
307,
287,
262,
288,
82,
13,
9948,
11012,
2393,
198,
198,
464,
2163,
2753,
257,
6060,
7248,
357,
20588,
2196,
8,
290,
257,
256,
17,
12,
5715,
2393,
220,
198,
6423,
257,
4197,
319,
262,
3126,
365,
85,
1627,
290,
319,
262,
7388,
14,
15197,
885,
53,
3951,
318,
6157,
11,
262,
198,
18908,
30691,
389,
2386,
36616,
515,
290,
262,
8064,
318,
2206,
10155,
198,
198,
32,
13,
57,
20601,
420,
365,
198,
37811,
628,
628,
220,
220,
220,
220,
220,
628,
198,
361,
11593,
3672,
834,
855,
1,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 3.067857 | 280 |
from ..ex.relational import IRelationalRow
from . import xivrow, XivSubRow, IXivSheet
from .interfaces import IShopListing, IShopListingItem
from .shop_listing_item import ShopListingItem
@xivrow
| [
6738,
11485,
1069,
13,
2411,
864,
1330,
314,
6892,
864,
25166,
198,
6738,
764,
1330,
2124,
452,
808,
11,
1395,
452,
7004,
25166,
11,
22631,
452,
3347,
316,
198,
6738,
764,
3849,
32186,
1330,
314,
29917,
8053,
278,
11,
314,
29917,
8053,
278,
7449,
198,
6738,
764,
24643,
62,
4868,
278,
62,
9186,
1330,
13705,
8053,
278,
7449,
628,
198,
31,
87,
452,
808,
198
] | 3.046154 | 65 |
#!/usr/bin/env python3
"""
**experimental** a graphical retro-style version of `ask` - because we can. :D
asks a yes/no question via audio (text-to-speech).
returncode reflects answer in common unix-style (0 == yes/ok, 1 == nope)
Usage:
xask [<msg>] [--yes=<reply_yes>] [--no=<reply_no>] [--engine=<tts-engine>]
[--yes-exec=<yes-exec>] [--no-exec=<no-exec>]
Options:
--engine=<str> TTS-engine to use {'google', 'espeak', 'festival'}
[default: espeak]
--no=<str> Message for negative answer
--no-exec=<str> execute given command by negative answer
--yes=<str> Message for positive answer
--yes-exec=<str> execute given command by positive answer
-h, --help Print this
--version Print version
Examples:
$ xask "Do you want to play a game?" && echo "Splendid! :)"
$ xask "Do you want to play a game?" --yes="Splendid, let's play!" --no="Okidoki. Maybe another time."
$ xask "Reboot universe?" --yes="rebooting now." --yes-exec "init 6" --no="Ok. Maybe another time."
"""
import logging
import os
import subprocess
import sys
import threading
import time
logger = logging.getLogger(__name__)
#logger.setLevel(logging.INFO)
logger.setLevel(logging.WARNING)
handler = logging.StreamHandler() # console-handler
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)
from docopt import docopt
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1' # no "Hello from the pygame community..." on stdout.
try:
import pygame
import pygame.freetype
from pygame.locals import *
except ImportError:
logger.critical("whuuups. no pygame import possible :/")
sys.exit(1)
from say import __version__, available_engines, ENGINE_DEFAULT, say
_VERBOSITY = 0
WINDOW_SIZE = (1200, 800)
FULLSCREEN=True # if set, the previously defined WINDOW_SIZE is ignored
#FULLSCREEN=False # if set, the previously defined WINDOW_SIZE is ignored
FONT_ZOOM=0.75
MARGIN = [0,0,0,0] # top, left, right, bottom
VT100 = (80,24) # https://de.wikipedia.org/wiki/VT100
#PAGE_SIZE=VT100
PAGE_SIZE=(20,6)
# === THEME / COLOR SCHEME
# --- day
#BACKGROUND_COLOR = (255,255,255)
#TEXT_COLOR = (0,0,0)
#CURSOR_COLOR=GRAY
# --- night
BACKGROUND_COLOR = (0,0,0)
TEXT_COLOR = (255,255,255)
CURSOR_COLOR= (0,128,0) # https://docs.oracle.com/cd/E19728-01/820-2550/term_em_colormaps.html
# === THEME / COLOR SCHEME
def get_font_for_page(surface=None, page_size = (80,24), font = "FreeMono, Monospace", margin=(0,0,0,0), monospace=True):
"""
calculates the (monospace) fontsize for page_size (<columns_char_N>,<rows_char_N>)
returns FontInstance
"""
assert(isinstance(font,str))
font_name = font
FONT_SIZE_MIN = 1
width, height = surface.get_size()
width -= MARGIN[1] + MARGIN[2] # left + right
height -= MARGIN[0] + MARGIN[3] # top + bottom
font_size = 101
ref_char = ' '
assert(FONT_SIZE_MIN > 0)
ref_size_x = None
ref_size_y = None
font = None
running = True
while running:
if font_size > (FONT_SIZE_MIN + 1):
font_size -= 1
else:
raise Exception("Ouch! Fontsize required for page_size={} < {} :-/".format(page_size,FONT_SIZE_MIN))
font = pygame.freetype.SysFont(font_name, font_size)
font.origin = True
#ref_size_x = font.get_rect(ref_char).width
ref_size_x = font.get_rect(ref_char).width + 1 # WORKAROUND: add one pixel per char to be safe ?
ref_size_y = font.get_sized_height() + 2
if (ref_size_x * page_size[0] > width) or (ref_size_y * page_size[1] > height):
logger.debug("fontsize={} : ref_char's size_x={} size_y={}".format(font_size, ref_size_x,ref_size_y))
continue
else: # got fitting fontsize
running = False
logger.info("found fontsize={} (font={}) suiting for page_size={} # ref_char's ('{}') size_x={} size_y={}".format(font_size, font_name, page_size, ref_char, ref_size_x,ref_size_y))
return font
def word_wrap(surf = None, text = None, stop_pos = None, font = None, color=(0, 0, 0), render=True):
"""
throws text onto screen/surface (if render=True).
if render is set to False only the positioning is calculated - handy
for calculating the position of a cursor onto content already drawn
by an earlier call (return values can be used for setting the cursor to a specific
position (stop_pos) of the text)
:args:
text a "page" as string which should be printed on durface
stop_pos the position in text where printing to surface shoud stop
(default == None == len(text)
render nothing is printed onto surface. but the positioning
calculations are done (see retunrn values)
returns x,y # position of the last processed character of the text
# (the x-position is the position where the pixelrepresentation of the char ends)
**TODO: `color=random_color()` option**
"""
assert(isinstance(render,bool))
assert(isinstance(stop_pos,int) or stop_pos == None)
if not(isinstance(stop_pos,int)):
stop_pos = len(text) - 1
pos = 0
font.origin = True
words = text.split(' ')
width, height = surf.get_size()
width -= MARGIN[1] + MARGIN[2] # left + right
height -= MARGIN[0] + MARGIN[3] # top + bottom
line_spacing = font.get_sized_height() + 2
x, y = MARGIN[1], line_spacing + MARGIN[0]
space = font.get_rect(' ')
i_pos = -1 # position in text-stream
linebreaks = 0 # nr. of linebreaks in text-stream
lines = text.split('\n')
trimmed = False # if stop_pos is reached we set this to true and end the loop
for i, line in enumerate(lines):
logger.debug("line {} : '{}'".format(i, line))
if len(line) > 0: # cause ''.split(' ') => ['']
words = line.split(' ')
else:
words = []
logger.debug("words of line {}: {}".format(line, words))
for i2, word in enumerate(words):
logger.debug("word_wrap-func line nr. {} word nr. {}".format(i,i2))
if i2 < len(words) - 1:
if set(words[i2+1:]) != set(['']): # FIX-20011822-01: don't append whitespace if last word in line only followed by whitespaces
word += ' '
if stop_pos != None and (i_pos + len(word) >= stop_pos):
logger.debug("trimming word '{}' to pos length {} @ i_pos {}".format(word,stop_pos,i_pos))
# trim word to pos length
too_long = (i_pos + len(word)-1) - stop_pos
tmpi = len(word) - too_long
word = word[:tmpi]
logger.debug("trimmed to '{}' @ i_pos {}".format(word,i_pos))
trimmed=True
if word=='' and not trimmed:
word = ' '
logger.debug("word == ' ' @ i_pos: {}".format(i_pos))
i_pos += len(word)
bounds = font.get_rect(word)
logger.debug("assume: {} <= {}".format(bounds.width,space.width * len(word)))
if not (bounds.width <= (space.width * len(word))):
logger.debug("WARNING ASSERTION WRONG. MAYBE WE CAN USE A TRESHOLD IN WHICH IT IS OKAY?")
logger.debug('{}'.format(word))
if x + bounds.width > width:
x, y = MARGIN[1], y + line_spacing
if x + bounds.width > width:
raise ValueError("word {} px to wide (x) for the surface".format(width - (x + bounds.width)))
else:
logger.debug("word width (x) fits into surface. {}px left".format(width - (x + bounds.width)))
if y + bounds.height - bounds.y > height:
logger.critical("FIXME: text to long (y) for the surface")
raise ValueError("text to long (y) for the surface")
if render:
logger.debug("render word '{}' on pos {},{}".format(word, x,y))
font.render_to(surf, (x, y), None, color)
x += bounds.width
if trimmed:
break
if trimmed:
break
# add linebreak
if i < len(lines) - 1:
x = MARGIN[1]; y += line_spacing
i_pos += 1 # the '\n' of the .split()
linebreaks += 1
logger.info("word_wrap: i_pos {} lines {} linebreaks done {}".format(i_pos,len(lines),linebreaks))
logger.info("word_wrap: i_pos={} stop_pos={} (should be same)".format(i_pos,stop_pos))
if stop_pos < len(text):
#assert(i_pos == stop_pos)
assert(abs(i_pos - stop_pos) < 2)
if abs(i_pos - stop_pos) >= 2:
logger.warning("word_wrap : abs(i_pos - stop_pos) is {} (but should be zero)".format(abs(i_pos - stop_pos)))
return x, y
def _show_message(surf=None, page="Do you want to play a game?", page_from_pos=0, show_cursor=True, wait_for_keypress=True):
"""
shows message (question) char by char (full-)screen
returns
key pressed by user # e.g "y", "n"
"""
SHOW_CURSOR=show_cursor
font = get_font_for_page(surface=surf, page_size = PAGE_SIZE, margin=MARGIN)
# **
page_in_transition = True
page_transition_pos = page_from_pos
page_transition_state = ""
# **
running = True
user_pressed_key = None
clock = pygame.time.Clock()
while running:
for event in pygame.event.get():
# === event handler ===
if event.type == KEYDOWN:
if (event.key == K_ESCAPE):
events = pygame.event.get()
user_pressed_key = event
running = False
break;
else:
user_pressed_key = event.unicode
running = False
break;
# === show content
surf.fill(BACKGROUND_COLOR)
if page_in_transition:
page_transition_state = page[0:page_transition_pos + 1]
x,y = word_wrap(surf, page_transition_state, None, font, TEXT_COLOR)
if page_transition_pos == len(page): # transition finished
page_in_transition = False
#if time.time() % 1 > 0.2: # speed of transition progress
# page_transition_pos += 1
page_transition_pos += 1
else:
x,y = word_wrap(surf, page, None, font, TEXT_COLOR)
if not wait_for_keypress:
running = False
cursor_pos = page_transition_pos + 1
# === cursor positioning
font.origin = True
line_spacing = font.get_sized_height() + 2
space = font.get_rect(' ')
cursor_width = space.width
cursor_height_percentage = 100
cursor_height = (line_spacing / 100) * 80
if SHOW_CURSOR:
if page_in_transition:
x,y = word_wrap(surf=surf, text=page_transition_state, stop_pos=cursor_pos, font = font, color=TEXT_COLOR, render=False)
else:
x,y = word_wrap(surf=surf, text=page, stop_pos=cursor_pos, font = font, color=TEXT_COLOR, render=False)
if x > MARGIN[1]:
cursor = Rect((x, y - cursor_height), (cursor_width, cursor_height)) # left, top, width, height
else:
cursor = Rect((x,y - cursor_height), (cursor_width, cursor_height)) # left, top, width, height
if time.time() % 1 > 0.5: # blinking
pygame.draw.rect(surf, CURSOR_COLOR, cursor)
# --- TODO save a screenshot or gif-animation for docs
#if not page_in_transition:
# pygame.image.save(surf,'/tmp/screenshot_xask.png') # save screenshot
# ---
clock.tick(30)
pygame.display.update()
return user_pressed_key
def xsay(msg,engine,surf=None,quit_if_done=False,timeout=None):
"""
**experimental** a graphical retro-style version of `say`.
"""
if not surf:
surf = _init_screen(fullscreen=FULLSCREEN)
t1 = ThreadWithReturnValue(target=_show_message,args=(surf,msg,))
t2 = threading.Thread(target=say,args=(msg,engine))
t1.start()
#time.sleep(0.5)
t2.start()
res = t1.join()
t2.join()
if quit_if_done:
pygame.quit()
return res
if __name__ == '__main__':
s = time.perf_counter()
is_yes = main()
elapsed = time.perf_counter() - s
logger.info(f"{__file__} executed in {elapsed:0.2f} seconds.")
yn_rc = 0
if not is_yes:
yn_rc = 1
sys.exit(yn_rc)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
1174,
23100,
9134,
1174,
257,
27831,
12175,
12,
7635,
2196,
286,
4600,
2093,
63,
532,
780,
356,
460,
13,
1058,
35,
198,
198,
6791,
257,
3763,
14,
3919,
1808,
2884,
6597,
357,
5239,
12,
1462,
12,
45862,
737,
198,
7783,
8189,
12497,
3280,
287,
2219,
555,
844,
12,
7635,
357,
15,
6624,
3763,
14,
482,
11,
352,
6624,
299,
3008,
8,
198,
198,
28350,
25,
198,
87,
2093,
685,
27,
19662,
37981,
685,
438,
8505,
28,
27,
47768,
62,
8505,
37981,
685,
438,
3919,
28,
27,
47768,
62,
3919,
37981,
685,
438,
18392,
28,
27,
83,
912,
12,
18392,
37981,
198,
220,
220,
220,
220,
685,
438,
8505,
12,
18558,
28,
27,
8505,
12,
18558,
37981,
685,
438,
3919,
12,
18558,
28,
27,
3919,
12,
18558,
37981,
198,
198,
29046,
25,
198,
220,
220,
220,
1377,
18392,
28,
27,
2536,
29,
220,
220,
309,
4694,
12,
18392,
284,
779,
1391,
6,
13297,
3256,
705,
274,
36729,
3256,
705,
69,
6743,
6,
92,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
12286,
25,
1658,
36729,
60,
198,
220,
220,
220,
1377,
3919,
28,
27,
2536,
29,
220,
220,
220,
220,
220,
220,
16000,
329,
4633,
3280,
198,
220,
220,
220,
1377,
3919,
12,
18558,
28,
27,
2536,
29,
220,
12260,
1813,
3141,
416,
4633,
3280,
198,
220,
220,
220,
1377,
8505,
28,
27,
2536,
29,
220,
220,
220,
220,
220,
16000,
329,
3967,
3280,
198,
220,
220,
220,
1377,
8505,
12,
18558,
28,
27,
2536,
29,
12260,
1813,
3141,
416,
3967,
3280,
628,
220,
220,
220,
532,
71,
11,
1377,
16794,
220,
220,
220,
220,
220,
220,
12578,
428,
198,
220,
220,
220,
1377,
9641,
220,
220,
220,
220,
220,
220,
220,
12578,
2196,
198,
198,
27730,
25,
198,
220,
220,
220,
720,
2124,
2093,
366,
5211,
345,
765,
284,
711,
257,
983,
1701,
11405,
9809,
366,
26568,
437,
312,
0,
14373,
1,
198,
220,
220,
220,
720,
2124,
2093,
366,
5211,
345,
765,
284,
711,
257,
983,
1701,
1377,
8505,
2625,
26568,
437,
312,
11,
1309,
338,
711,
2474,
1377,
3919,
2625,
18690,
312,
18228,
13,
6674,
1194,
640,
526,
198,
220,
220,
220,
720,
2124,
2093,
366,
28951,
1025,
6881,
1701,
1377,
8505,
2625,
34806,
12494,
783,
526,
1377,
8505,
12,
18558,
366,
15003,
718,
1,
1377,
3919,
2625,
18690,
13,
6674,
1194,
640,
526,
198,
37811,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
11748,
4704,
278,
198,
11748,
640,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
2,
6404,
1362,
13,
2617,
4971,
7,
6404,
2667,
13,
10778,
8,
198,
6404,
1362,
13,
2617,
4971,
7,
6404,
2667,
13,
31502,
8,
198,
30281,
796,
18931,
13,
12124,
25060,
3419,
1303,
8624,
12,
30281,
198,
687,
1436,
796,
18931,
13,
8479,
1436,
10786,
4,
7,
292,
310,
524,
8,
82,
532,
4064,
7,
3672,
8,
82,
532,
4064,
7,
5715,
3672,
8,
82,
532,
4064,
7,
20500,
8,
82,
11537,
198,
30281,
13,
2617,
8479,
1436,
7,
687,
1436,
8,
198,
6404,
1362,
13,
2860,
25060,
7,
30281,
8,
198,
198,
6738,
2205,
8738,
1330,
2205,
8738,
198,
418,
13,
268,
2268,
17816,
47,
56,
47109,
62,
39,
14114,
62,
40331,
15490,
62,
4805,
2662,
11571,
20520,
796,
705,
16,
6,
1303,
645,
366,
15496,
422,
262,
12972,
6057,
2055,
9313,
319,
14367,
448,
13,
198,
28311,
25,
198,
220,
220,
220,
1330,
12972,
6057,
198,
220,
220,
220,
1330,
12972,
6057,
13,
69,
2871,
2981,
198,
220,
220,
220,
422,
12972,
6057,
13,
17946,
874,
1330,
1635,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
49706,
13,
34666,
7203,
1929,
12303,
4739,
13,
645,
12972,
6057,
1330,
1744,
1058,
14,
4943,
198,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
198,
6738,
910,
1330,
11593,
9641,
834,
11,
1695,
62,
1516,
1127,
11,
36924,
8881,
62,
7206,
38865,
11,
910,
198,
198,
62,
5959,
33,
2640,
9050,
796,
657,
198,
198,
28929,
3913,
62,
33489,
796,
357,
27550,
11,
10460,
8,
198,
37,
9994,
6173,
2200,
1677,
28,
17821,
1303,
611,
900,
11,
262,
4271,
5447,
370,
12115,
3913,
62,
33489,
318,
9514,
198,
2,
37,
9994,
6173,
2200,
1677,
28,
25101,
1303,
611,
900,
11,
262,
4271,
5447,
370,
12115,
3913,
62,
33489,
318,
9514,
198,
37,
35830,
62,
57,
46,
2662,
28,
15,
13,
2425,
198,
40569,
38,
1268,
796,
685,
15,
11,
15,
11,
15,
11,
15,
60,
1303,
1353,
11,
1364,
11,
826,
11,
4220,
198,
36392,
3064,
796,
357,
1795,
11,
1731,
8,
1303,
3740,
1378,
2934,
13,
31266,
13,
2398,
14,
15466,
14,
36392,
3064,
198,
2,
4537,
8264,
62,
33489,
28,
36392,
3064,
198,
4537,
8264,
62,
33489,
16193,
1238,
11,
21,
8,
198,
198,
2,
24844,
3336,
11682,
1220,
20444,
1581,
22374,
3620,
36,
198,
2,
11420,
1110,
198,
2,
31098,
46025,
62,
46786,
796,
357,
13381,
11,
13381,
11,
13381,
8,
198,
2,
32541,
62,
46786,
796,
357,
15,
11,
15,
11,
15,
8,
198,
2,
34,
4261,
50,
1581,
62,
46786,
28,
38,
30631,
198,
2,
11420,
1755,
198,
31098,
46025,
62,
46786,
796,
357,
15,
11,
15,
11,
15,
8,
198,
32541,
62,
46786,
796,
357,
13381,
11,
13381,
11,
13381,
8,
198,
34,
4261,
50,
1581,
62,
46786,
28,
357,
15,
11,
12762,
11,
15,
8,
1303,
3740,
1378,
31628,
13,
273,
6008,
13,
785,
14,
10210,
14,
36,
24991,
2078,
12,
486,
14,
41739,
12,
1495,
1120,
14,
4354,
62,
368,
62,
4033,
579,
1686,
13,
6494,
198,
2,
24844,
3336,
11682,
1220,
20444,
1581,
22374,
3620,
36,
628,
628,
198,
4299,
651,
62,
10331,
62,
1640,
62,
7700,
7,
42029,
28,
14202,
11,
2443,
62,
7857,
796,
357,
1795,
11,
1731,
828,
10369,
796,
366,
11146,
9069,
78,
11,
2892,
24912,
1600,
10330,
16193,
15,
11,
15,
11,
15,
11,
15,
828,
937,
24912,
28,
17821,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
43707,
262,
357,
2144,
24912,
8,
10369,
7857,
329,
2443,
62,
7857,
38155,
28665,
82,
62,
10641,
62,
45,
22330,
27,
8516,
62,
10641,
62,
45,
43734,
628,
220,
220,
220,
5860,
24060,
33384,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6818,
7,
271,
39098,
7,
10331,
11,
2536,
4008,
198,
220,
220,
220,
10369,
62,
3672,
796,
10369,
198,
220,
220,
220,
376,
35830,
62,
33489,
62,
23678,
796,
352,
198,
220,
220,
220,
9647,
11,
6001,
796,
4417,
13,
1136,
62,
7857,
3419,
198,
220,
220,
220,
9647,
48185,
18805,
38,
1268,
58,
16,
60,
1343,
18805,
38,
1268,
58,
17,
60,
220,
1303,
1364,
1343,
826,
198,
220,
220,
220,
6001,
48185,
18805,
38,
1268,
58,
15,
60,
1343,
18805,
38,
1268,
58,
18,
60,
1303,
1353,
1343,
4220,
198,
220,
220,
220,
10369,
62,
7857,
796,
8949,
198,
220,
220,
220,
1006,
62,
10641,
796,
705,
705,
198,
220,
220,
220,
6818,
7,
37,
35830,
62,
33489,
62,
23678,
1875,
657,
8,
198,
220,
220,
220,
1006,
62,
7857,
62,
87,
796,
6045,
198,
220,
220,
220,
1006,
62,
7857,
62,
88,
796,
6045,
198,
220,
220,
220,
10369,
796,
6045,
198,
220,
220,
220,
2491,
796,
6407,
198,
220,
220,
220,
981,
2491,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
10369,
62,
7857,
1875,
357,
37,
35830,
62,
33489,
62,
23678,
1343,
352,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10369,
62,
7857,
48185,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
7203,
46,
794,
0,
24060,
7857,
2672,
329,
2443,
62,
7857,
34758,
92,
1279,
23884,
1058,
12,
14,
1911,
18982,
7,
7700,
62,
7857,
11,
37,
35830,
62,
33489,
62,
23678,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
10369,
796,
12972,
6057,
13,
69,
2871,
2981,
13,
44387,
23252,
7,
10331,
62,
3672,
11,
10369,
62,
7857,
8,
198,
220,
220,
220,
220,
220,
220,
220,
10369,
13,
47103,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
5420,
62,
7857,
62,
87,
796,
10369,
13,
1136,
62,
2554,
7,
5420,
62,
10641,
737,
10394,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
62,
7857,
62,
87,
796,
10369,
13,
1136,
62,
2554,
7,
5420,
62,
10641,
737,
10394,
1343,
352,
1303,
30936,
1503,
15919,
25,
751,
530,
17465,
583,
1149,
284,
307,
3338,
5633,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
62,
7857,
62,
88,
796,
10369,
13,
1136,
62,
13982,
62,
17015,
3419,
1343,
362,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
5420,
62,
7857,
62,
87,
1635,
2443,
62,
7857,
58,
15,
60,
1875,
9647,
8,
393,
357,
5420,
62,
7857,
62,
88,
1635,
2443,
62,
7857,
58,
16,
60,
1875,
6001,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
7203,
10331,
7857,
34758,
92,
1058,
1006,
62,
10641,
338,
2546,
62,
87,
34758,
92,
2546,
62,
88,
34758,
92,
1911,
18982,
7,
10331,
62,
7857,
11,
1006,
62,
7857,
62,
87,
11,
5420,
62,
7857,
62,
88,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2555,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
1303,
1392,
15830,
10369,
7857,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2491,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
10951,
7203,
9275,
10369,
7857,
34758,
92,
357,
10331,
34758,
30072,
424,
1780,
329,
2443,
62,
7857,
34758,
92,
1303,
1006,
62,
10641,
338,
19203,
90,
92,
11537,
2546,
62,
87,
34758,
92,
2546,
62,
88,
34758,
92,
1911,
18982,
7,
10331,
62,
7857,
11,
10369,
62,
3672,
11,
2443,
62,
7857,
11,
1006,
62,
10641,
11,
1006,
62,
7857,
62,
87,
11,
5420,
62,
7857,
62,
88,
4008,
198,
220,
220,
220,
1441,
10369,
628,
198,
4299,
1573,
62,
37150,
7,
11793,
69,
796,
6045,
11,
2420,
796,
6045,
11,
2245,
62,
1930,
796,
6045,
11,
10369,
796,
6045,
11,
3124,
16193,
15,
11,
657,
11,
657,
828,
8543,
28,
17821,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
12542,
2420,
4291,
3159,
14,
42029,
357,
361,
8543,
28,
17821,
737,
628,
220,
220,
220,
611,
8543,
318,
900,
284,
10352,
691,
262,
22097,
318,
10488,
532,
15728,
198,
220,
220,
220,
329,
26019,
262,
2292,
286,
257,
23493,
4291,
2695,
1541,
7428,
198,
220,
220,
220,
416,
281,
2961,
869,
357,
7783,
3815,
460,
307,
973,
329,
4634,
262,
23493,
284,
257,
2176,
198,
220,
220,
220,
2292,
357,
11338,
62,
1930,
8,
286,
262,
2420,
8,
628,
220,
220,
220,
1058,
22046,
25,
628,
220,
220,
220,
220,
220,
220,
2420,
220,
220,
220,
220,
220,
220,
220,
220,
257,
366,
7700,
1,
355,
4731,
543,
815,
307,
10398,
319,
22365,
2550,
198,
220,
220,
220,
220,
220,
220,
2245,
62,
1930,
220,
220,
220,
220,
262,
2292,
287,
2420,
810,
13570,
284,
4417,
427,
2778,
2245,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
12286,
6624,
6045,
6624,
18896,
7,
5239,
8,
198,
220,
220,
220,
220,
220,
220,
8543,
220,
220,
220,
220,
220,
220,
2147,
318,
10398,
4291,
4417,
13,
475,
262,
22097,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16765,
389,
1760,
357,
3826,
1005,
403,
35906,
3815,
8,
628,
220,
220,
220,
5860,
2124,
11,
88,
1303,
2292,
286,
262,
938,
13686,
2095,
286,
262,
2420,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
357,
1169,
2124,
12,
9150,
318,
262,
2292,
810,
262,
17465,
15603,
341,
286,
262,
1149,
5645,
8,
628,
220,
220,
220,
12429,
51,
3727,
46,
25,
4600,
8043,
28,
25120,
62,
8043,
3419,
63,
3038,
1174,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6818,
7,
271,
39098,
7,
13287,
11,
30388,
4008,
198,
220,
220,
220,
6818,
7,
271,
39098,
7,
11338,
62,
1930,
11,
600,
8,
393,
2245,
62,
1930,
6624,
6045,
8,
198,
220,
220,
220,
611,
407,
7,
271,
39098,
7,
11338,
62,
1930,
11,
600,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
2245,
62,
1930,
796,
18896,
7,
5239,
8,
532,
352,
198,
220,
220,
220,
1426,
796,
657,
198,
220,
220,
220,
10369,
13,
47103,
796,
6407,
198,
220,
220,
220,
2456,
796,
2420,
13,
35312,
10786,
705,
8,
198,
220,
220,
220,
9647,
11,
6001,
796,
9053,
13,
1136,
62,
7857,
3419,
198,
220,
220,
220,
9647,
48185,
18805,
38,
1268,
58,
16,
60,
1343,
18805,
38,
1268,
58,
17,
60,
220,
1303,
1364,
1343,
826,
198,
220,
220,
220,
6001,
48185,
18805,
38,
1268,
58,
15,
60,
1343,
18805,
38,
1268,
58,
18,
60,
1303,
1353,
1343,
4220,
198,
220,
220,
220,
1627,
62,
2777,
4092,
796,
10369,
13,
1136,
62,
13982,
62,
17015,
3419,
1343,
362,
198,
220,
220,
220,
2124,
11,
331,
796,
18805,
38,
1268,
58,
16,
4357,
1627,
62,
2777,
4092,
1343,
18805,
38,
1268,
58,
15,
60,
198,
220,
220,
220,
2272,
796,
10369,
13,
1136,
62,
2554,
10786,
705,
8,
198,
220,
220,
220,
1312,
62,
1930,
796,
532,
16,
1303,
2292,
287,
2420,
12,
5532,
198,
220,
220,
220,
1627,
30058,
796,
657,
1303,
299,
81,
13,
286,
1627,
30058,
287,
2420,
12,
5532,
198,
220,
220,
220,
3951,
796,
2420,
13,
35312,
10786,
59,
77,
11537,
198,
220,
220,
220,
40325,
796,
10352,
1303,
611,
2245,
62,
1930,
318,
4251,
356,
900,
428,
284,
2081,
290,
886,
262,
9052,
198,
220,
220,
220,
329,
1312,
11,
1627,
287,
27056,
378,
7,
6615,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
7203,
1370,
23884,
1058,
705,
90,
92,
6,
1911,
18982,
7,
72,
11,
1627,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
18896,
7,
1370,
8,
1875,
657,
25,
1303,
2728,
705,
4458,
35312,
10786,
705,
8,
5218,
685,
7061,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2456,
796,
1627,
13,
35312,
10786,
705,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2456,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
7203,
10879,
286,
1627,
23884,
25,
23884,
1911,
18982,
7,
1370,
11,
2456,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
17,
11,
1573,
287,
27056,
378,
7,
10879,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
7203,
4775,
62,
37150,
12,
20786,
1627,
299,
81,
13,
23884,
1573,
299,
81,
13,
23884,
1911,
18982,
7,
72,
11,
72,
17,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1312,
17,
1279,
18896,
7,
10879,
8,
532,
352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
900,
7,
10879,
58,
72,
17,
10,
16,
25,
12962,
14512,
900,
26933,
7061,
60,
2599,
1303,
44855,
12,
2167,
16817,
1828,
12,
486,
25,
836,
470,
24443,
13216,
10223,
611,
938,
1573,
287,
1627,
691,
3940,
416,
13216,
43076,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1573,
15853,
705,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2245,
62,
1930,
14512,
6045,
290,
357,
72,
62,
1930,
1343,
18896,
7,
4775,
8,
18189,
2245,
62,
1930,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
7203,
2213,
27428,
1573,
705,
90,
92,
6,
284,
1426,
4129,
23884,
2488,
1312,
62,
1930,
23884,
1911,
18982,
7,
4775,
11,
11338,
62,
1930,
11,
72,
62,
1930,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
15797,
1573,
284,
1426,
4129,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1165,
62,
6511,
796,
357,
72,
62,
1930,
1343,
18896,
7,
4775,
13219,
16,
8,
532,
2245,
62,
1930,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45218,
72,
796,
18896,
7,
4775,
8,
532,
1165,
62,
6511,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1573,
796,
1573,
58,
25,
22065,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
7203,
2213,
320,
1150,
284,
705,
90,
92,
6,
2488,
1312,
62,
1930,
23884,
1911,
18982,
7,
4775,
11,
72,
62,
1930,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
40325,
28,
17821,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1573,
855,
7061,
290,
407,
40325,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1573,
796,
705,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
7203,
4775,
6624,
705,
705,
2488,
1312,
62,
1930,
25,
23884,
1911,
18982,
7,
72,
62,
1930,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
1930,
15853,
18896,
7,
4775,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22303,
796,
10369,
13,
1136,
62,
2554,
7,
4775,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
7203,
562,
2454,
25,
23884,
19841,
23884,
1911,
18982,
7,
65,
3733,
13,
10394,
11,
13200,
13,
10394,
1635,
18896,
7,
4775,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
357,
65,
3733,
13,
10394,
19841,
357,
13200,
13,
10394,
1635,
18896,
7,
4775,
4008,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
7203,
31502,
24994,
17395,
2849,
11342,
18494,
13,
26720,
12473,
12887,
15628,
23210,
317,
7579,
44011,
15173,
3268,
7655,
20739,
7283,
3180,
7477,
4792,
1701,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
10786,
90,
92,
4458,
18982,
7,
4775,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2124,
1343,
22303,
13,
10394,
1875,
9647,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
11,
331,
796,
18805,
38,
1268,
58,
16,
4357,
331,
1343,
1627,
62,
2777,
4092,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2124,
1343,
22303,
13,
10394,
1875,
9647,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7203,
4775,
23884,
279,
87,
284,
3094,
357,
87,
8,
329,
262,
4417,
1911,
18982,
7,
10394,
532,
357,
87,
1343,
22303,
13,
10394,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
7203,
4775,
9647,
357,
87,
8,
11414,
656,
4417,
13,
23884,
8416,
1364,
1911,
18982,
7,
10394,
532,
357,
87,
1343,
22303,
13,
10394,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
331,
1343,
22303,
13,
17015,
532,
22303,
13,
88,
1875,
6001,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
34666,
7203,
47084,
11682,
25,
2420,
284,
890,
357,
88,
8,
329,
262,
4417,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7203,
5239,
284,
890,
357,
88,
8,
329,
262,
4417,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
8543,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
24442,
7203,
13287,
1573,
705,
90,
92,
6,
319,
1426,
1391,
5512,
90,
92,
1911,
18982,
7,
4775,
11,
2124,
11,
88,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10369,
13,
13287,
62,
1462,
7,
11793,
69,
11,
357,
87,
11,
331,
828,
6045,
11,
3124,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
15853,
22303,
13,
10394,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
40325,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
611,
40325,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
751,
1627,
9032,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1312,
1279,
18896,
7,
6615,
8,
532,
352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
796,
18805,
38,
1268,
58,
16,
11208,
331,
15853,
1627,
62,
2777,
4092,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
1930,
15853,
352,
1303,
262,
705,
59,
77,
6,
286,
262,
764,
35312,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1627,
30058,
15853,
352,
198,
220,
220,
220,
49706,
13,
10951,
7203,
4775,
62,
37150,
25,
1312,
62,
1930,
23884,
3951,
23884,
1627,
30058,
1760,
23884,
1911,
18982,
7,
72,
62,
1930,
11,
11925,
7,
6615,
828,
1370,
30058,
4008,
198,
220,
220,
220,
49706,
13,
10951,
7203,
4775,
62,
37150,
25,
1312,
62,
1930,
34758,
92,
2245,
62,
1930,
34758,
92,
357,
21754,
307,
976,
8,
1911,
18982,
7,
72,
62,
1930,
11,
11338,
62,
1930,
4008,
198,
220,
220,
220,
611,
2245,
62,
1930,
1279,
18896,
7,
5239,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
30493,
7,
72,
62,
1930,
6624,
2245,
62,
1930,
8,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
8937,
7,
72,
62,
1930,
532,
2245,
62,
1930,
8,
1279,
362,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2352,
7,
72,
62,
1930,
532,
2245,
62,
1930,
8,
18189,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
43917,
7203,
4775,
62,
37150,
1058,
2352,
7,
72,
62,
1930,
532,
2245,
62,
1930,
8,
318,
23884,
357,
4360,
815,
307,
6632,
8,
1911,
18982,
7,
8937,
7,
72,
62,
1930,
532,
2245,
62,
1930,
22305,
198,
220,
220,
220,
1441,
2124,
11,
331,
628,
198,
4299,
4808,
12860,
62,
20500,
7,
11793,
69,
28,
14202,
11,
2443,
2625,
5211,
345,
765,
284,
711,
257,
983,
35379,
2443,
62,
6738,
62,
1930,
28,
15,
11,
905,
62,
66,
21471,
28,
17821,
11,
4043,
62,
1640,
62,
2539,
8439,
28,
17821,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2523,
3275,
357,
25652,
8,
1149,
416,
1149,
357,
12853,
25106,
9612,
628,
220,
220,
220,
5860,
628,
220,
220,
220,
220,
220,
220,
220,
1994,
12070,
416,
2836,
1303,
304,
13,
70,
366,
88,
1600,
366,
77,
1,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
37041,
62,
34,
4261,
50,
1581,
28,
12860,
62,
66,
21471,
198,
220,
220,
220,
10369,
796,
651,
62,
10331,
62,
1640,
62,
7700,
7,
42029,
28,
11793,
69,
11,
2443,
62,
7857,
796,
48488,
62,
33489,
11,
10330,
28,
40569,
38,
1268,
8,
198,
220,
220,
220,
1303,
12429,
198,
220,
220,
220,
2443,
62,
259,
62,
7645,
653,
796,
6407,
198,
220,
220,
220,
2443,
62,
7645,
653,
62,
1930,
796,
2443,
62,
6738,
62,
1930,
198,
220,
220,
220,
2443,
62,
7645,
653,
62,
5219,
796,
13538,
198,
220,
220,
220,
1303,
12429,
198,
220,
220,
220,
2491,
796,
6407,
198,
220,
220,
220,
2836,
62,
45477,
62,
2539,
796,
6045,
198,
220,
220,
220,
8801,
796,
12972,
6057,
13,
2435,
13,
44758,
3419,
198,
220,
220,
220,
981,
2491,
25,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1785,
287,
12972,
6057,
13,
15596,
13,
1136,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
24844,
1785,
21360,
24844,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1785,
13,
4906,
6624,
35374,
41925,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
357,
15596,
13,
2539,
6624,
509,
62,
1546,
33177,
36,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2995,
796,
12972,
6057,
13,
15596,
13,
1136,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
45477,
62,
2539,
796,
1785,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2491,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
26,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
45477,
62,
2539,
796,
1785,
13,
46903,
1098,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2491,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
26,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
24844,
905,
2695,
198,
220,
220,
220,
220,
220,
220,
220,
9053,
13,
20797,
7,
31098,
46025,
62,
46786,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2443,
62,
259,
62,
7645,
653,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2443,
62,
7645,
653,
62,
5219,
796,
2443,
58,
15,
25,
7700,
62,
7645,
653,
62,
1930,
1343,
352,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
11,
88,
796,
1573,
62,
37150,
7,
11793,
69,
11,
2443,
62,
7645,
653,
62,
5219,
11,
6045,
11,
10369,
11,
40383,
62,
46786,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2443,
62,
7645,
653,
62,
1930,
6624,
18896,
7,
7700,
2599,
1303,
6801,
5201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2443,
62,
259,
62,
7645,
653,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
361,
640,
13,
2435,
3419,
4064,
352,
1875,
657,
13,
17,
25,
1303,
2866,
286,
6801,
4371,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
220,
220,
2443,
62,
7645,
653,
62,
1930,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2443,
62,
7645,
653,
62,
1930,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
11,
88,
796,
1573,
62,
37150,
7,
11793,
69,
11,
2443,
11,
6045,
11,
10369,
11,
40383,
62,
46786,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
4043,
62,
1640,
62,
2539,
8439,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2491,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
23493,
62,
1930,
796,
2443,
62,
7645,
653,
62,
1930,
1343,
352,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
24844,
23493,
22097,
198,
220,
220,
220,
220,
220,
220,
220,
10369,
13,
47103,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
1627,
62,
2777,
4092,
796,
10369,
13,
1136,
62,
13982,
62,
17015,
3419,
1343,
362,
198,
220,
220,
220,
220,
220,
220,
220,
2272,
796,
10369,
13,
1136,
62,
2554,
10786,
705,
8,
198,
220,
220,
220,
220,
220,
220,
220,
23493,
62,
10394,
796,
2272,
13,
10394,
198,
220,
220,
220,
220,
220,
220,
220,
23493,
62,
17015,
62,
25067,
496,
796,
1802,
198,
220,
220,
220,
220,
220,
220,
220,
23493,
62,
17015,
796,
357,
1370,
62,
2777,
4092,
1220,
1802,
8,
1635,
4019,
198,
220,
220,
220,
220,
220,
220,
220,
611,
37041,
62,
34,
4261,
50,
1581,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2443,
62,
259,
62,
7645,
653,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
11,
88,
796,
1573,
62,
37150,
7,
11793,
69,
28,
11793,
69,
11,
2420,
28,
7700,
62,
7645,
653,
62,
5219,
11,
2245,
62,
1930,
28,
66,
21471,
62,
1930,
11,
10369,
796,
10369,
11,
3124,
28,
32541,
62,
46786,
11,
8543,
28,
25101,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
11,
88,
796,
1573,
62,
37150,
7,
11793,
69,
28,
11793,
69,
11,
2420,
28,
7700,
11,
2245,
62,
1930,
28,
66,
21471,
62,
1930,
11,
10369,
796,
10369,
11,
3124,
28,
32541,
62,
46786,
11,
8543,
28,
25101,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2124,
1875,
18805,
38,
1268,
58,
16,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23493,
796,
48599,
19510,
87,
11,
331,
532,
23493,
62,
17015,
828,
357,
66,
21471,
62,
10394,
11,
23493,
62,
17015,
4008,
1303,
1364,
11,
1353,
11,
9647,
11,
6001,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23493,
796,
48599,
19510,
87,
11,
88,
532,
23493,
62,
17015,
828,
357,
66,
21471,
62,
10394,
11,
23493,
62,
17015,
4008,
1303,
1364,
11,
1353,
11,
9647,
11,
6001,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
640,
13,
2435,
3419,
4064,
352,
1875,
657,
13,
20,
25,
1303,
43196,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12972,
6057,
13,
19334,
13,
2554,
7,
11793,
69,
11,
327,
4261,
50,
1581,
62,
46786,
11,
23493,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
11420,
16926,
46,
3613,
257,
22032,
393,
9381,
12,
11227,
341,
329,
34165,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
361,
407,
2443,
62,
259,
62,
7645,
653,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
220,
220,
12972,
6057,
13,
9060,
13,
21928,
7,
11793,
69,
4032,
14,
22065,
14,
1416,
26892,
62,
87,
2093,
13,
11134,
11537,
1303,
3613,
22032,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
11420,
198,
220,
220,
220,
220,
220,
220,
220,
8801,
13,
42298,
7,
1270,
8,
198,
220,
220,
220,
220,
220,
220,
220,
12972,
6057,
13,
13812,
13,
19119,
3419,
198,
220,
220,
220,
1441,
2836,
62,
45477,
62,
2539,
628,
198,
4299,
2124,
16706,
7,
19662,
11,
18392,
11,
11793,
69,
28,
14202,
11,
47391,
62,
361,
62,
28060,
28,
25101,
11,
48678,
28,
14202,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
12429,
23100,
9134,
1174,
257,
27831,
12175,
12,
7635,
2196,
286,
4600,
16706,
44646,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
407,
9053,
25,
198,
220,
220,
220,
220,
220,
220,
220,
9053,
796,
4808,
15003,
62,
9612,
7,
12853,
9612,
28,
37,
9994,
6173,
2200,
1677,
8,
198,
220,
220,
220,
256,
16,
796,
14122,
3152,
13615,
11395,
7,
16793,
28,
62,
12860,
62,
20500,
11,
22046,
16193,
11793,
69,
11,
19662,
11,
4008,
198,
220,
220,
220,
256,
17,
796,
4704,
278,
13,
16818,
7,
16793,
28,
16706,
11,
22046,
16193,
19662,
11,
18392,
4008,
198,
220,
220,
220,
256,
16,
13,
9688,
3419,
198,
220,
220,
220,
1303,
2435,
13,
42832,
7,
15,
13,
20,
8,
198,
220,
220,
220,
256,
17,
13,
9688,
3419,
198,
220,
220,
220,
581,
796,
256,
16,
13,
22179,
3419,
198,
220,
220,
220,
256,
17,
13,
22179,
3419,
198,
220,
220,
220,
611,
11238,
62,
361,
62,
28060,
25,
198,
220,
220,
220,
220,
220,
220,
220,
12972,
6057,
13,
47391,
3419,
198,
220,
220,
220,
1441,
581,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
264,
796,
640,
13,
525,
69,
62,
24588,
3419,
198,
220,
220,
220,
318,
62,
8505,
796,
1388,
3419,
198,
220,
220,
220,
42118,
796,
640,
13,
525,
69,
62,
24588,
3419,
532,
264,
198,
220,
220,
220,
49706,
13,
10951,
7,
69,
1,
90,
834,
7753,
834,
92,
10945,
287,
1391,
417,
28361,
25,
15,
13,
17,
69,
92,
4201,
19570,
198,
220,
220,
220,
331,
77,
62,
6015,
796,
657,
198,
220,
220,
220,
611,
407,
318,
62,
8505,
25,
198,
220,
220,
220,
220,
220,
220,
220,
331,
77,
62,
6015,
796,
352,
198,
220,
220,
220,
25064,
13,
37023,
7,
2047,
62,
6015,
8,
198
] | 2.223081 | 5,693 |
'''
Some people remain old fashioned and John is one of them. He doesn't like the new smart phones with full keypads and still uses the old keypads which require you to tap a key multiple times to type a single letter. For example, if the keyboard has two keys, one with the letters "adef" and the other one with the letters "zyx", then typing 'a' requires one keystroke, typing 'f' requires four keystrokes, typing 'y' requires two keystrokes, and so on.
He recently moved to a new country where the language is such that his keypad is not the most efficient. In every language some characters occur more often than others. He wants to create a specific keyboard for this language that uses N different letters. He has a large body of text in this language, and has already analyzed it to find the frequencies of all N letters of its alphabet.
You are given an array 'frequencies' with N elements. Each element of frequencies is the number of times one of the letters in the new language appears in the text John has. Each element of frequencies will be strictly positive. (I.e., each of the N letters occurs at least once.)
You are also given an array keySize. The number of elements of keySize is the number of keys on the keyboard. Each element of keySize gives the maximal number of letters that maybe put on one of the keys.
Find an assignment of letters to keys that minimizes the number of keystrokes needed to type the entire text. Output that minimum number of keystrokes. If there is not enough room on the keys and some letters of the alphabet won't fit, Output -1 instead.
Input Format
The first line will contain a number 'N' that specifies the size of 'frequencies' array
The second line will contain N numbers that form the frequencies array
The third line contains a number 'K' that specifies the size of the 'keySize' array
The fourth line contains K numbers that form the keySize array
Output Format
Output a single integer that is answer to the problem.
Constraints
frequencies will contain between 1 and 50 elements, inclusive.
Each element of frequencies will be between 1 and 1,000, inclusive.
keySizes will contain between 1 and 50 elements, inclusive.
Each element of keySizes will be between 1 and 50, inclusive.
SAMPLE INPUT
4
7 3 4 1
2
2 2
SAMPLE OUTPUT
19
'''
n=int(input())
freq=[int(x) for x in input().split()]
k=int(input())
keysizes=[int(x) for x in input().split()]
if n>sum(keysizes):
print('-1')
else:
freq.sort()
total=0
h=1
while len(freq)!=0:
for i in range(len(keysizes)):
try:
total+=freq.pop()*h
except IndexError:
break
keysizes[i] -= 1
for e in keysizes:
if e==0:
keysizes.remove(e)
h+=1
print(total) | [
7061,
6,
628,
198,
4366,
661,
3520,
1468,
35458,
290,
1757,
318,
530,
286,
606,
13,
679,
1595,
470,
588,
262,
649,
4451,
9512,
351,
1336,
1994,
79,
5643,
290,
991,
3544,
262,
1468,
1994,
79,
5643,
543,
2421,
345,
284,
9814,
257,
1994,
3294,
1661,
284,
2099,
257,
2060,
3850,
13,
1114,
1672,
11,
611,
262,
10586,
468,
734,
8251,
11,
530,
351,
262,
7475,
366,
671,
69,
1,
290,
262,
584,
530,
351,
262,
7475,
366,
7357,
87,
1600,
788,
19720,
705,
64,
6,
4433,
530,
1994,
30757,
11,
19720,
705,
69,
6,
4433,
1440,
1994,
20661,
5209,
11,
19720,
705,
88,
6,
4433,
734,
1994,
20661,
5209,
11,
290,
523,
319,
13,
198,
1544,
2904,
3888,
284,
257,
649,
1499,
810,
262,
3303,
318,
884,
326,
465,
1994,
15636,
318,
407,
262,
749,
6942,
13,
554,
790,
3303,
617,
3435,
3051,
517,
1690,
621,
1854,
13,
679,
3382,
284,
2251,
257,
2176,
10586,
329,
428,
3303,
326,
3544,
399,
1180,
7475,
13,
679,
468,
257,
1588,
1767,
286,
2420,
287,
428,
3303,
11,
290,
468,
1541,
15475,
340,
284,
1064,
262,
19998,
286,
477,
399,
7475,
286,
663,
24830,
13,
198,
1639,
389,
1813,
281,
7177,
705,
69,
8897,
3976,
6,
351,
399,
4847,
13,
5501,
5002,
286,
19998,
318,
262,
1271,
286,
1661,
530,
286,
262,
7475,
287,
262,
649,
3303,
3568,
287,
262,
2420,
1757,
468,
13,
5501,
5002,
286,
19998,
481,
307,
14084,
3967,
13,
357,
40,
13,
68,
1539,
1123,
286,
262,
399,
7475,
8833,
379,
1551,
1752,
2014,
198,
1639,
389,
635,
1813,
281,
7177,
1994,
10699,
13,
383,
1271,
286,
4847,
286,
1994,
10699,
318,
262,
1271,
286,
8251,
319,
262,
10586,
13,
5501,
5002,
286,
1994,
10699,
3607,
262,
40708,
1271,
286,
7475,
326,
3863,
1234,
319,
530,
286,
262,
8251,
13,
198,
16742,
281,
16237,
286,
7475,
284,
8251,
326,
10356,
4340,
262,
1271,
286,
1994,
20661,
5209,
2622,
284,
2099,
262,
2104,
2420,
13,
25235,
326,
5288,
1271,
286,
1994,
20661,
5209,
13,
1002,
612,
318,
407,
1576,
2119,
319,
262,
8251,
290,
617,
7475,
286,
262,
24830,
1839,
470,
4197,
11,
25235,
532,
16,
2427,
13,
198,
198,
20560,
18980,
198,
464,
717,
1627,
481,
3994,
257,
1271,
705,
45,
6,
326,
26052,
262,
2546,
286,
705,
69,
8897,
3976,
6,
7177,
198,
464,
1218,
1627,
481,
3994,
399,
3146,
326,
1296,
262,
19998,
7177,
198,
464,
2368,
1627,
4909,
257,
1271,
705,
42,
6,
326,
26052,
262,
2546,
286,
262,
705,
2539,
10699,
6,
7177,
198,
464,
5544,
1627,
4909,
509,
3146,
326,
1296,
262,
1994,
10699,
7177,
198,
198,
26410,
18980,
198,
26410,
257,
2060,
18253,
326,
318,
3280,
284,
262,
1917,
13,
198,
198,
3103,
2536,
6003,
198,
69,
8897,
3976,
481,
3994,
1022,
352,
290,
2026,
4847,
11,
19889,
13,
198,
10871,
5002,
286,
19998,
481,
307,
1022,
352,
290,
352,
11,
830,
11,
19889,
13,
198,
2539,
50,
4340,
481,
3994,
1022,
352,
290,
2026,
4847,
11,
19889,
13,
198,
10871,
5002,
286,
1994,
50,
4340,
481,
307,
1022,
352,
290,
2026,
11,
19889,
13,
198,
198,
49302,
16437,
3268,
30076,
220,
198,
19,
198,
22,
513,
604,
352,
198,
17,
198,
17,
362,
198,
198,
49302,
16437,
16289,
30076,
220,
198,
1129,
198,
198,
7061,
6,
628,
198,
77,
28,
600,
7,
15414,
28955,
198,
19503,
80,
41888,
600,
7,
87,
8,
329,
2124,
287,
5128,
22446,
35312,
3419,
60,
198,
220,
198,
74,
28,
600,
7,
15414,
28955,
198,
13083,
4340,
41888,
600,
7,
87,
8,
329,
2124,
287,
5128,
22446,
35312,
3419,
60,
197,
198,
220,
198,
361,
299,
29,
16345,
7,
13083,
4340,
2599,
198,
197,
4798,
10786,
12,
16,
11537,
198,
197,
198,
17772,
25,
198,
197,
19503,
80,
13,
30619,
3419,
198,
197,
23350,
28,
15,
198,
197,
71,
28,
16,
198,
197,
198,
197,
4514,
18896,
7,
19503,
80,
31520,
28,
15,
25,
198,
197,
197,
1640,
1312,
287,
2837,
7,
11925,
7,
13083,
4340,
8,
2599,
198,
197,
197,
197,
28311,
25,
198,
197,
197,
197,
197,
23350,
47932,
19503,
80,
13,
12924,
3419,
9,
71,
198,
197,
197,
197,
197,
198,
197,
197,
197,
16341,
12901,
12331,
25,
198,
197,
197,
197,
197,
9032,
198,
197,
197,
197,
197,
198,
197,
197,
197,
13083,
4340,
58,
72,
60,
48185,
352,
198,
197,
197,
1640,
304,
287,
8251,
4340,
25,
198,
197,
197,
197,
361,
304,
855,
15,
25,
198,
197,
197,
197,
197,
13083,
4340,
13,
28956,
7,
68,
8,
198,
197,
197,
197,
197,
198,
197,
197,
71,
47932,
16,
198,
197,
4798,
7,
23350,
8
] | 3.556283 | 764 |
import json
import pathlib
from .._config import CONFIG_FILE_NAME
class ConfigData:
'''
This class handles access to simulation setup configuration data.
'''
# Constructor.
def __setitem__( self, index, value ):
'''
For setting a configuration value.
'''
self.__config_data[index] = value
def __getitem__( self, index ):
'''
For retrieving a configuration value.
'''
return self.__config_data[index]
def __contains__( self, item ):
'''
Returns a boolean value depending on whether the configuration contains the specified item or not.
'''
return item in self.__config_data
def write( self ):
'''
Save configuration.
'''
with open( self.path, 'w' ) as sim_setup_file:
json.dump(
self.__config_data,
sim_setup_file,
indent = 2,
separators = ( ',', ': ' ) )
sim_setup_file.write( '\n' )
@property
def path( self ):
'''
Absolute path to configuration file.
'''
return self.__sim_setup_file_path
@property
def data( self ):
'''
Configuration data as dict.
'''
return self.__config_data
def __recursive_del_empty_str_from_lists( self, obj ):
'''
Helper function: recursively remove empty strings from lists in dicts.
'''
for k,v in obj.items():
if isinstance( v, list ):
if '' in v:
v.remove( '' )
elif isinstance( v, dict ):
self.__recursive_del_empty_str_from_lists( v )
| [
11748,
33918,
201,
198,
11748,
3108,
8019,
201,
198,
201,
198,
6738,
11485,
62,
11250,
1330,
25626,
62,
25664,
62,
20608,
201,
198,
201,
198,
201,
198,
4871,
17056,
6601,
25,
201,
198,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
770,
1398,
17105,
1895,
284,
18640,
9058,
8398,
1366,
13,
201,
198,
220,
220,
220,
705,
7061,
201,
198,
201,
198,
220,
220,
220,
1303,
28407,
273,
13,
201,
198,
201,
198,
201,
198,
220,
220,
220,
825,
11593,
2617,
9186,
834,
7,
2116,
11,
6376,
11,
1988,
15179,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1114,
4634,
257,
8398,
1988,
13,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
834,
11250,
62,
7890,
58,
9630,
60,
796,
1988,
201,
198,
201,
198,
201,
198,
220,
220,
220,
825,
11593,
1136,
9186,
834,
7,
2116,
11,
6376,
15179,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1114,
50122,
257,
8398,
1988,
13,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
834,
11250,
62,
7890,
58,
9630,
60,
201,
198,
201,
198,
201,
198,
220,
220,
220,
825,
11593,
3642,
1299,
834,
7,
2116,
11,
2378,
15179,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
16409,
257,
25131,
1988,
6906,
319,
1771,
262,
8398,
4909,
262,
7368,
2378,
393,
407,
13,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2378,
287,
2116,
13,
834,
11250,
62,
7890,
201,
198,
201,
198,
201,
198,
220,
220,
220,
825,
3551,
7,
2116,
15179,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
12793,
8398,
13,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
2116,
13,
6978,
11,
705,
86,
6,
1267,
355,
985,
62,
40406,
62,
7753,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33918,
13,
39455,
7,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
834,
11250,
62,
7890,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
985,
62,
40406,
62,
7753,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33793,
796,
362,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2880,
2024,
796,
357,
46083,
3256,
705,
25,
705,
1267,
1267,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
985,
62,
40406,
62,
7753,
13,
13564,
7,
705,
59,
77,
6,
1267,
201,
198,
201,
198,
201,
198,
220,
220,
220,
2488,
26745,
201,
198,
220,
220,
220,
825,
3108,
7,
2116,
15179,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
36532,
3108,
284,
8398,
2393,
13,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
834,
14323,
62,
40406,
62,
7753,
62,
6978,
201,
198,
201,
198,
201,
198,
220,
220,
220,
2488,
26745,
201,
198,
220,
220,
220,
825,
1366,
7,
2116,
15179,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
28373,
1366,
355,
8633,
13,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
834,
11250,
62,
7890,
201,
198,
201,
198,
201,
198,
220,
220,
220,
825,
11593,
8344,
30753,
62,
12381,
62,
28920,
62,
2536,
62,
6738,
62,
20713,
7,
2116,
11,
26181,
15179,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
5053,
525,
2163,
25,
664,
1834,
2280,
4781,
6565,
13042,
422,
8341,
287,
8633,
82,
13,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
220,
220,
220,
220,
329,
479,
11,
85,
287,
26181,
13,
23814,
33529,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
7,
410,
11,
1351,
15179,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
10148,
287,
410,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
13,
28956,
7,
10148,
1267,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
318,
39098,
7,
410,
11,
8633,
15179,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
834,
8344,
30753,
62,
12381,
62,
28920,
62,
2536,
62,
6738,
62,
20713,
7,
410,
1267,
201,
198
] | 2.010056 | 895 |
import numpy as np
import scipy.sparse
from typing import Union, List
from dataclasses import dataclass, field, fields, InitVar
import scipy.sparse as sp
@dataclass
class Subgraph:
"""
Represents the meta information of sampled subgraphs.
"""
# data fields
indptr : np.ndarray
indices : np.ndarray
data : np.ndarray
node : np.ndarray
edge_index : np.ndarray
target : np.ndarray
hop : np.ndarray
ppr : np.ndarray
# init fields
cap_node_full : InitVar[int]=None
cap_edge_full : InitVar[int]=None
cap_node_subg : InitVar[int]=None
cap_edge_subg : InitVar[int]=None
validate : InitVar[bool]=True
# summary
names_data_fields = ['indptr', 'indices', 'data', 'node', 'edge_index', 'target', 'hop', 'ppr']
def __post_init__(self, cap_node_full, cap_edge_full, cap_node_subg, cap_edge_subg, validate):
"""
All subgraphs sampled by the same sampler should have the same dtype, since cap_*_subg are an upper bound
for all subgraphs under that sampler.
"""
if cap_node_full is not None and cap_edge_full is not None \
and cap_node_subg is not None and cap_edge_subg is not None:
dtype = {'indptr' : np.int64,
'indices' : np.int64,
'data' : np.float32,
'node' : np.int64,
'edge_index': np.int64,
'target' : np.int64,
'hop' : np.int64,
'ppr' : np.float32}
f_dtype = lambda n : np.uint16 if n < 2**16 else np.uint32
if cap_node_full < 2**32:
dtype['node'] = f_dtype(cap_node_full)
if cap_edge_full < 2**32:
dtype['edge_index'] = f_dtype(cap_edge_full)
if cap_node_subg < 2**32:
dtype['indices'] = f_dtype(cap_node_subg)
dtype['target'] = f_dtype(cap_node_subg)
dtype['hop'] = f_dtype(cap_node_subg)
if cap_edge_subg < 2**32:
dtype['indptr'] = f_dtype(cap_edge_subg)
assert set(dtype.keys()) == set(self.names_data_fields)
for n in self.names_data_fields:
v = getattr(self, n)
if v is not None:
setattr(self, n, v.astype(dtype[n], copy=False))
# explicitly handle data -- if it is all 1.
if np.all(self.data == 1.):
self.data = np.broadcast_to(np.array([1.]), self.data.size)
if validate:
self.check_valid()
@classmethod
def cat_to_block_diagonal(cls, subgs : list):
""" Concatenate subgraphs into a full adj matrix (i.e., into the block diagonal form) """
offset_indices = np.cumsum([s.node.size for s in subgs]) # always int64
offset_indptr = np.cumsum([s.edge_index.size for s in subgs]) # ^
offset_indices[1:] = offset_indices[:-1]
offset_indices[0] = 0
offset_indptr[1:] = offset_indptr[:-1]
offset_indptr[0] = 0
node_batch = np.concatenate([s.node for s in subgs]) # keep original dtype
edge_index_batch = np.concatenate([s.edge_index for s in subgs]) # ^
data_batch = np.concatenate([s.data for s in subgs]) # ^
hop_batch = np.concatenate([s.hop for s in subgs]) # ^
if subgs[0].ppr.size == 0:
ppr_batch = np.array([])
else: # need to explicitly check due to .max() function
ppr_batch = np.concatenate([s.ppr/s.ppr.max() for s in subgs]) # renorm ppr
target_batch_itr = [s.target.astype(np.int64) for s in subgs]
indptr_batch_itr = [s.indptr.astype(np.int64) for s in subgs]
indices_batch_itr = [s.indices.astype(np.int64) for s in subgs]
target_batch, indptr_batch, indices_batch = [], [], []
for i in range(len(subgs)):
target_batch.append(target_batch_itr[i] + offset_indices[i])
if i > 0: # end of indptr1 equals beginning of indptr2. So remove one duplicate to ensure correctness.
indptr_batch_itr[i] = indptr_batch_itr[i][1:]
indptr_batch.append(indptr_batch_itr[i] + offset_indptr[i])
indices_batch.append(indices_batch_itr[i] + offset_indices[i])
target_batch = np.concatenate(target_batch)
indptr_batch = np.concatenate(indptr_batch)
indices_batch = np.concatenate(indices_batch)
ret_subg = cls(
indptr=indptr_batch,
indices=indices_batch,
data=data_batch,
node=node_batch,
edge_index=edge_index_batch,
target=target_batch,
hop=hop_batch,
ppr=ppr_batch,
cap_node_full=2**63, # just be safe. Note that concated subgraphs are only used for one batch.
cap_edge_full=2**63,
cap_node_subg=2**63,
cap_edge_subg=2**63,
validate=True
)
return ret_subg
class GraphSampler:
"""
This is the sampler super-class. Any shallow sampler is supposed to perform
the following meta-steps:
1. [optional] Preprocessing: e.g., for PPR sampler, we need to calculate the
PPR vector for each node in the training graph. This is to be performed
only once.
==> Need to override the `preproc()` in sub-class
2. Parallel sampling: launch a batch of graph samplers in parallel and sample
subgraphs independently. For efficiency, the actual sampling operation
happen in C++. And the classes here is mainly just a wrapper.
==> Need to set self.para_sampler to the appropriate C++ sampler
in `__init__()` of the sampler sub-class
3. Post-processing: upon getting the sampled subgraphs, we need to prepare the
appropriate information (e.g., subgraph adj with renamed indices) to
enable the PyTorch trainer. Also, we need to do data conversion from C++
to Python (or, mostly numpy). Post-processing is handled via PyBind11.
"""
def __init__(self, adj, node_target, aug_feat, args_preproc):
"""
Inputs:
adj scipy sparse CSR matrix of the training graph
node_target 1D np array storing the indices of the training nodes
args_preproc dict, addition arguments needed for pre-processing
Outputs:
None
"""
self.adj = adj
self.node_target = np.unique(node_target)
self.aug_feat = aug_feat
# size in terms of number of vertices in subgraph
self.name_sampler = "None"
self.node_subgraph = None
self.preproc(**args_preproc)
def helper_extract_subgraph(self, node_ids, target_ids=None):
"""
Used for serial Python sampler (not for the parallel C++ sampler).
Return adj of node-induced subgraph and other corresponding data struct.
Inputs:
node_ids 1D np array, each element is the ID in the original
training graph.
Outputs:
indptr np array, indptr of the subg adj CSR
indices np array, indices of the subg adj CSR
data np array, data of the subg adj CSR. Since we have aggregator
normalization, we can simply set all data values to be 1
subg_nodes np array, i-th element stores the node ID of the original graph
for the i-th node in the subgraph. Used to index the full feats
and label matrices.
subg_edge_index np array, i-th element stores the edge ID of the original graph
for the i-th edge in the subgraph. Used to index the full array
of aggregation normalization.
"""
# Let n = num subg nodes; m = num subg edges
node_ids = np.unique(node_ids)
node_ids.sort()
orig2subg = {n: i for i, n in enumerate(node_ids)}
n = node_ids.size
indptr = np.zeros(node_ids.size + 1)
indices = []
subg_edge_index = []
subg_nodes = node_ids
for nid in node_ids:
idx_s, idx_e = self.adj.indptr[nid], self.adj.indptr[nid + 1]
neighs = self.adj.indices[idx_s : idx_e]
for i_n, n in enumerate(neighs):
if n in orig2subg:
indices.append(orig2subg[n])
indptr[orig2subg[nid] + 1] += 1
subg_edge_index.append(idx_s + i_n)
indptr = indptr.cumsum().astype(np.int64)
indices = np.array(indices)
subg_edge_index = np.array(subg_edge_index)
data = np.ones(indices.size)
assert indptr[-1] == indices.size == subg_edge_index.size
if target_ids is not None:
return indptr, indices, data, subg_nodes, subg_edge_index,\
np.array([orig2subg[t] for t in target_ids])
else:
return indptr, indices, data, subg_nodes, subg_edge_index
class KHopSamplingBase(GraphSampler):
"""
The sampler performs k-hop sampling, by following the steps:
1. Randomly pick `size_root` number of root nodes from all training nodes;
2. Sample hop-`k` neighborhood from the roots. A node at hop-i will fanout to
at most `budget` nodes at hop-(i+1)
3. Generate node-induced subgraph from the nodes touched by the random walk.
If budget == -1, then we will expand all hop-(i+1) neighbors without any subsampling
"""
def __init__(self, adj, node_target, aug_feat, size_root, depth, budget):
"""
Inputs:
adj see super-class
node_target see super-class
size_root int, number of root nodes randomly picked
depth int, number of hops to expand
budget int, number of hop-(i+1) neighbors to expand
Outputs:
None
"""
self.size_root = size_root
self.depth = depth
self.budget = budget
self.name = "khop"
super().__init__(adj, node_target, aug_feat, {})
class PPRSamplingBase(GraphSampler):
"""
The sampler performs sampling based on PPR score
"""
def __init__(self, adj, node_target, aug_feat, size_root, k, alpha=0.85, epsilon=1e-5, threshold=0):
"""
Inputs:
adj see super-class
node_target see super-class
size_root int, number of root nodes randomly picked
k int, number of hops to expand
budget int, number of hop-(i+1) neighbors to expand
Outputs:
None
"""
self.size_root = size_root
self.k = k
self.alpha = alpha
self.epsilon = epsilon
self.threshold = threshold
self.name = "ppr"
super().__init__(adj, node_target, aug_feat, {})
| [
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
82,
29572,
198,
6738,
19720,
1330,
4479,
11,
7343,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
2214,
11,
7032,
11,
44707,
19852,
198,
11748,
629,
541,
88,
13,
82,
29572,
355,
599,
628,
198,
31,
19608,
330,
31172,
198,
4871,
3834,
34960,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1432,
6629,
262,
13634,
1321,
286,
35846,
850,
34960,
82,
13,
220,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
1366,
7032,
198,
220,
220,
220,
773,
20692,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
45941,
13,
358,
18747,
198,
220,
220,
220,
36525,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
45941,
13,
358,
18747,
198,
220,
220,
220,
1366,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
45941,
13,
358,
18747,
198,
220,
220,
220,
10139,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
45941,
13,
358,
18747,
198,
220,
220,
220,
5743,
62,
9630,
220,
220,
220,
220,
220,
1058,
45941,
13,
358,
18747,
198,
220,
220,
220,
2496,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
45941,
13,
358,
18747,
198,
220,
220,
220,
1725,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
45941,
13,
358,
18747,
198,
220,
220,
220,
279,
1050,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
45941,
13,
358,
18747,
198,
220,
220,
220,
1303,
2315,
7032,
198,
220,
220,
220,
1451,
62,
17440,
62,
12853,
220,
220,
1058,
44707,
19852,
58,
600,
22241,
14202,
198,
220,
220,
220,
1451,
62,
14907,
62,
12853,
220,
220,
1058,
44707,
19852,
58,
600,
22241,
14202,
198,
220,
220,
220,
1451,
62,
17440,
62,
7266,
70,
220,
220,
1058,
44707,
19852,
58,
600,
22241,
14202,
198,
220,
220,
220,
1451,
62,
14907,
62,
7266,
70,
220,
220,
1058,
44707,
19852,
58,
600,
22241,
14202,
198,
220,
220,
220,
26571,
220,
220,
220,
220,
220,
220,
220,
1058,
44707,
19852,
58,
30388,
22241,
17821,
198,
220,
220,
220,
1303,
10638,
198,
220,
220,
220,
3891,
62,
7890,
62,
25747,
796,
37250,
521,
20692,
3256,
705,
521,
1063,
3256,
705,
7890,
3256,
705,
17440,
3256,
705,
14907,
62,
9630,
3256,
705,
16793,
3256,
705,
8548,
3256,
705,
381,
81,
20520,
628,
220,
220,
220,
825,
11593,
7353,
62,
15003,
834,
7,
944,
11,
1451,
62,
17440,
62,
12853,
11,
1451,
62,
14907,
62,
12853,
11,
1451,
62,
17440,
62,
7266,
70,
11,
1451,
62,
14907,
62,
7266,
70,
11,
26571,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1439,
850,
34960,
82,
35846,
416,
262,
976,
6072,
20053,
815,
423,
262,
976,
288,
4906,
11,
1201,
1451,
62,
9,
62,
7266,
70,
389,
281,
6727,
5421,
198,
220,
220,
220,
220,
220,
220,
220,
329,
477,
850,
34960,
82,
739,
326,
6072,
20053,
13,
220,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1451,
62,
17440,
62,
12853,
318,
407,
6045,
290,
1451,
62,
14907,
62,
12853,
318,
407,
6045,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
1451,
62,
17440,
62,
7266,
70,
318,
407,
6045,
290,
1451,
62,
14907,
62,
7266,
70,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
4906,
796,
1391,
6,
521,
20692,
6,
220,
220,
1058,
45941,
13,
600,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
521,
1063,
6,
220,
1058,
45941,
13,
600,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
7890,
6,
220,
220,
220,
220,
1058,
45941,
13,
22468,
2624,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
17440,
6,
220,
220,
220,
220,
1058,
45941,
13,
600,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
14907,
62,
9630,
10354,
45941,
13,
600,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
16793,
6,
220,
220,
1058,
45941,
13,
600,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
8548,
6,
220,
220,
220,
220,
220,
1058,
45941,
13,
600,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
381,
81,
6,
220,
220,
220,
220,
220,
1058,
45941,
13,
22468,
2624,
92,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
62,
67,
4906,
796,
37456,
299,
1058,
45941,
13,
28611,
1433,
611,
299,
1279,
362,
1174,
1433,
2073,
45941,
13,
28611,
2624,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1451,
62,
17440,
62,
12853,
1279,
362,
1174,
2624,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
4906,
17816,
17440,
20520,
796,
277,
62,
67,
4906,
7,
11128,
62,
17440,
62,
12853,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1451,
62,
14907,
62,
12853,
1279,
362,
1174,
2624,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
4906,
17816,
14907,
62,
9630,
20520,
796,
277,
62,
67,
4906,
7,
11128,
62,
14907,
62,
12853,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1451,
62,
17440,
62,
7266,
70,
1279,
362,
1174,
2624,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
4906,
17816,
521,
1063,
20520,
796,
277,
62,
67,
4906,
7,
11128,
62,
17440,
62,
7266,
70,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
4906,
17816,
16793,
20520,
220,
796,
277,
62,
67,
4906,
7,
11128,
62,
17440,
62,
7266,
70,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
4906,
17816,
8548,
20520,
220,
220,
220,
220,
796,
277,
62,
67,
4906,
7,
11128,
62,
17440,
62,
7266,
70,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1451,
62,
14907,
62,
7266,
70,
1279,
362,
1174,
2624,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
4906,
17816,
521,
20692,
20520,
220,
796,
277,
62,
67,
4906,
7,
11128,
62,
14907,
62,
7266,
70,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6818,
900,
7,
67,
4906,
13,
13083,
28955,
6624,
900,
7,
944,
13,
14933,
62,
7890,
62,
25747,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
299,
287,
2116,
13,
14933,
62,
7890,
62,
25747,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
796,
651,
35226,
7,
944,
11,
299,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
410,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
900,
35226,
7,
944,
11,
299,
11,
410,
13,
459,
2981,
7,
67,
4906,
58,
77,
4357,
4866,
28,
25101,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
11777,
5412,
1366,
1377,
611,
340,
318,
477,
352,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
45941,
13,
439,
7,
944,
13,
7890,
6624,
352,
47308,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7890,
796,
45941,
13,
36654,
2701,
62,
1462,
7,
37659,
13,
18747,
26933,
16,
8183,
828,
2116,
13,
7890,
13,
7857,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
26571,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
9122,
62,
12102,
3419,
628,
220,
220,
220,
2488,
4871,
24396,
198,
220,
220,
220,
825,
3797,
62,
1462,
62,
9967,
62,
10989,
27923,
7,
565,
82,
11,
850,
14542,
1058,
1351,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
1482,
9246,
268,
378,
850,
34960,
82,
656,
257,
1336,
9224,
17593,
357,
72,
13,
68,
1539,
656,
262,
2512,
40039,
1296,
8,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
11677,
62,
521,
1063,
796,
45941,
13,
66,
5700,
388,
26933,
82,
13,
17440,
13,
7857,
329,
264,
287,
850,
14542,
12962,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1464,
493,
2414,
198,
220,
220,
220,
220,
220,
220,
220,
11677,
62,
521,
20692,
796,
45941,
13,
66,
5700,
388,
26933,
82,
13,
14907,
62,
9630,
13,
7857,
329,
264,
287,
850,
14542,
12962,
220,
220,
220,
220,
220,
220,
1303,
10563,
198,
220,
220,
220,
220,
220,
220,
220,
11677,
62,
521,
1063,
58,
16,
47715,
796,
11677,
62,
521,
1063,
58,
21912,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
11677,
62,
521,
1063,
58,
15,
60,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
11677,
62,
521,
20692,
58,
16,
47715,
796,
11677,
62,
521,
20692,
58,
21912,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
11677,
62,
521,
20692,
58,
15,
60,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
10139,
62,
43501,
796,
45941,
13,
1102,
9246,
268,
378,
26933,
82,
13,
17440,
329,
264,
287,
850,
14542,
12962,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1394,
2656,
288,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
5743,
62,
9630,
62,
43501,
796,
45941,
13,
1102,
9246,
268,
378,
26933,
82,
13,
14907,
62,
9630,
329,
264,
287,
850,
14542,
12962,
220,
220,
220,
1303,
10563,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
62,
43501,
796,
45941,
13,
1102,
9246,
268,
378,
26933,
82,
13,
7890,
329,
264,
287,
850,
14542,
12962,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
10563,
198,
220,
220,
220,
220,
220,
220,
220,
1725,
62,
43501,
796,
45941,
13,
1102,
9246,
268,
378,
26933,
82,
13,
8548,
329,
264,
287,
850,
14542,
12962,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
10563,
198,
220,
220,
220,
220,
220,
220,
220,
611,
850,
14542,
58,
15,
4083,
381,
81,
13,
7857,
6624,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
1050,
62,
43501,
796,
45941,
13,
18747,
26933,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
220,
220,
220,
220,
220,
220,
1303,
761,
284,
11777,
2198,
2233,
284,
764,
9806,
3419,
2163,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
1050,
62,
43501,
796,
45941,
13,
1102,
9246,
268,
378,
26933,
82,
13,
381,
81,
14,
82,
13,
381,
81,
13,
9806,
3419,
329,
264,
287,
850,
14542,
12962,
220,
220,
220,
220,
220,
1303,
8851,
579,
279,
1050,
198,
220,
220,
220,
220,
220,
220,
220,
2496,
62,
43501,
62,
270,
81,
220,
796,
685,
82,
13,
16793,
13,
459,
2981,
7,
37659,
13,
600,
2414,
8,
329,
264,
287,
850,
14542,
60,
198,
220,
220,
220,
220,
220,
220,
220,
773,
20692,
62,
43501,
62,
270,
81,
220,
796,
685,
82,
13,
521,
20692,
13,
459,
2981,
7,
37659,
13,
600,
2414,
8,
329,
264,
287,
850,
14542,
60,
198,
220,
220,
220,
220,
220,
220,
220,
36525,
62,
43501,
62,
270,
81,
796,
685,
82,
13,
521,
1063,
13,
459,
2981,
7,
37659,
13,
600,
2414,
8,
329,
264,
287,
850,
14542,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2496,
62,
43501,
11,
773,
20692,
62,
43501,
11,
36525,
62,
43501,
796,
685,
4357,
685,
4357,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2837,
7,
11925,
7,
7266,
14542,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2496,
62,
43501,
13,
33295,
7,
16793,
62,
43501,
62,
270,
81,
58,
72,
60,
1343,
11677,
62,
521,
1063,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1312,
1875,
657,
25,
220,
220,
220,
220,
220,
220,
1303,
886,
286,
773,
20692,
16,
21767,
3726,
286,
773,
20692,
17,
13,
1406,
4781,
530,
23418,
284,
4155,
29409,
13,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
773,
20692,
62,
43501,
62,
270,
81,
58,
72,
60,
796,
773,
20692,
62,
43501,
62,
270,
81,
58,
72,
7131,
16,
47715,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
773,
20692,
62,
43501,
13,
33295,
7,
521,
20692,
62,
43501,
62,
270,
81,
58,
72,
60,
1343,
11677,
62,
521,
20692,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36525,
62,
43501,
13,
33295,
7,
521,
1063,
62,
43501,
62,
270,
81,
58,
72,
60,
1343,
11677,
62,
521,
1063,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2496,
62,
43501,
796,
45941,
13,
1102,
9246,
268,
378,
7,
16793,
62,
43501,
8,
198,
220,
220,
220,
220,
220,
220,
220,
773,
20692,
62,
43501,
796,
45941,
13,
1102,
9246,
268,
378,
7,
521,
20692,
62,
43501,
8,
198,
220,
220,
220,
220,
220,
220,
220,
36525,
62,
43501,
796,
45941,
13,
1102,
9246,
268,
378,
7,
521,
1063,
62,
43501,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1005,
62,
7266,
70,
796,
537,
82,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
773,
20692,
28,
521,
20692,
62,
43501,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36525,
28,
521,
1063,
62,
43501,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
28,
7890,
62,
43501,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10139,
28,
17440,
62,
43501,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5743,
62,
9630,
28,
14907,
62,
9630,
62,
43501,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2496,
28,
16793,
62,
43501,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1725,
28,
8548,
62,
43501,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
1050,
28,
381,
81,
62,
43501,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1451,
62,
17440,
62,
12853,
28,
17,
1174,
5066,
11,
220,
220,
220,
220,
220,
220,
220,
1303,
655,
307,
3338,
13,
5740,
326,
1673,
515,
850,
34960,
82,
389,
691,
973,
329,
530,
15458,
13,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1451,
62,
14907,
62,
12853,
28,
17,
1174,
5066,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1451,
62,
17440,
62,
7266,
70,
28,
17,
1174,
5066,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1451,
62,
14907,
62,
7266,
70,
28,
17,
1174,
5066,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26571,
28,
17821,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
1005,
62,
7266,
70,
628,
198,
4871,
29681,
16305,
20053,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
770,
318,
262,
6072,
20053,
2208,
12,
4871,
13,
4377,
19337,
6072,
20053,
318,
4385,
284,
1620,
198,
220,
220,
220,
262,
1708,
13634,
12,
20214,
25,
198,
220,
220,
220,
220,
352,
13,
685,
25968,
60,
3771,
36948,
25,
304,
13,
70,
1539,
329,
350,
4805,
6072,
20053,
11,
356,
761,
284,
15284,
262,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
350,
4805,
15879,
329,
1123,
10139,
287,
262,
3047,
4823,
13,
770,
318,
284,
307,
6157,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
691,
1752,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6624,
29,
10664,
284,
20957,
262,
4600,
3866,
36942,
3419,
63,
287,
850,
12,
4871,
198,
220,
220,
220,
220,
362,
13,
42945,
19232,
25,
4219,
257,
15458,
286,
4823,
6072,
489,
364,
287,
10730,
290,
6291,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
850,
34960,
82,
14799,
13,
1114,
9332,
11,
262,
4036,
19232,
4905,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1645,
287,
327,
4880,
13,
843,
262,
6097,
994,
318,
8384,
655,
257,
29908,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6624,
29,
10664,
284,
900,
2116,
13,
1845,
64,
62,
37687,
20053,
284,
262,
5035,
327,
4880,
6072,
20053,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
287,
4600,
834,
15003,
834,
3419,
63,
286,
262,
6072,
20053,
850,
12,
4871,
198,
220,
220,
220,
220,
513,
13,
2947,
12,
36948,
25,
2402,
1972,
262,
35846,
850,
34960,
82,
11,
356,
761,
284,
8335,
262,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5035,
1321,
357,
68,
13,
70,
1539,
850,
34960,
9224,
351,
25121,
36525,
8,
284,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7139,
262,
9485,
15884,
354,
21997,
13,
4418,
11,
356,
761,
284,
466,
1366,
11315,
422,
327,
4880,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
11361,
357,
273,
11,
4632,
299,
32152,
737,
2947,
12,
36948,
318,
12118,
2884,
9485,
36180,
1157,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
9224,
11,
10139,
62,
16793,
11,
16339,
62,
27594,
11,
26498,
62,
3866,
36942,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
23412,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9224,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
629,
541,
88,
29877,
9429,
49,
17593,
286,
262,
3047,
4823,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10139,
62,
16793,
220,
220,
220,
220,
352,
35,
45941,
7177,
23069,
262,
36525,
286,
262,
3047,
13760,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26498,
62,
3866,
36942,
220,
220,
220,
8633,
11,
3090,
7159,
2622,
329,
662,
12,
36948,
628,
220,
220,
220,
220,
220,
220,
220,
25235,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
41255,
796,
9224,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17440,
62,
16793,
796,
45941,
13,
34642,
7,
17440,
62,
16793,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7493,
62,
27594,
796,
16339,
62,
27594,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2546,
287,
2846,
286,
1271,
286,
9421,
1063,
287,
850,
34960,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
62,
37687,
20053,
796,
366,
14202,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17440,
62,
7266,
34960,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3866,
36942,
7,
1174,
22046,
62,
3866,
36942,
8,
628,
220,
220,
220,
825,
31904,
62,
2302,
974,
62,
7266,
34960,
7,
944,
11,
10139,
62,
2340,
11,
2496,
62,
2340,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
16718,
329,
11389,
11361,
6072,
20053,
357,
1662,
329,
262,
10730,
327,
4880,
6072,
20053,
737,
198,
220,
220,
220,
220,
220,
220,
220,
8229,
9224,
286,
10139,
12,
17223,
850,
34960,
290,
584,
11188,
1366,
2878,
13,
628,
220,
220,
220,
220,
220,
220,
220,
23412,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10139,
62,
2340,
220,
220,
220,
220,
220,
220,
220,
352,
35,
45941,
7177,
11,
1123,
5002,
318,
262,
4522,
287,
262,
2656,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3047,
4823,
13,
198,
220,
220,
220,
220,
220,
220,
220,
25235,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
773,
20692,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45941,
7177,
11,
773,
20692,
286,
262,
850,
70,
9224,
9429,
49,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36525,
220,
220,
220,
220,
220,
220,
220,
220,
45941,
7177,
11,
36525,
286,
262,
850,
70,
9224,
9429,
49,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45941,
7177,
11,
1366,
286,
262,
850,
70,
9224,
9429,
49,
13,
4619,
356,
423,
13262,
1352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3487,
1634,
11,
356,
460,
2391,
900,
477,
1366,
3815,
284,
307,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
850,
70,
62,
77,
4147,
220,
220,
220,
220,
220,
45941,
7177,
11,
1312,
12,
400,
5002,
7000,
262,
10139,
4522,
286,
262,
2656,
4823,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
262,
1312,
12,
400,
10139,
287,
262,
850,
34960,
13,
16718,
284,
6376,
262,
1336,
35664,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
6167,
2603,
45977,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
850,
70,
62,
14907,
62,
9630,
45941,
7177,
11,
1312,
12,
400,
5002,
7000,
262,
5743,
4522,
286,
262,
2656,
4823,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
262,
1312,
12,
400,
5743,
287,
262,
850,
34960,
13,
16718,
284,
6376,
262,
1336,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
286,
46500,
3487,
1634,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3914,
299,
796,
997,
850,
70,
13760,
26,
285,
796,
997,
850,
70,
13015,
198,
220,
220,
220,
220,
220,
220,
220,
10139,
62,
2340,
796,
45941,
13,
34642,
7,
17440,
62,
2340,
8,
198,
220,
220,
220,
220,
220,
220,
220,
10139,
62,
2340,
13,
30619,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1796,
17,
7266,
70,
796,
1391,
77,
25,
1312,
329,
1312,
11,
299,
287,
27056,
378,
7,
17440,
62,
2340,
38165,
198,
220,
220,
220,
220,
220,
220,
220,
299,
796,
10139,
62,
2340,
13,
7857,
198,
220,
220,
220,
220,
220,
220,
220,
773,
20692,
796,
45941,
13,
9107,
418,
7,
17440,
62,
2340,
13,
7857,
1343,
352,
8,
198,
220,
220,
220,
220,
220,
220,
220,
36525,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
850,
70,
62,
14907,
62,
9630,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
850,
70,
62,
77,
4147,
796,
10139,
62,
2340,
198,
220,
220,
220,
220,
220,
220,
220,
329,
299,
312,
287,
10139,
62,
2340,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
87,
62,
82,
11,
4686,
87,
62,
68,
796,
2116,
13,
41255,
13,
521,
20692,
58,
77,
312,
4357,
2116,
13,
41255,
13,
521,
20692,
58,
77,
312,
1343,
352,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3422,
82,
796,
2116,
13,
41255,
13,
521,
1063,
58,
312,
87,
62,
82,
1058,
4686,
87,
62,
68,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
62,
77,
11,
299,
287,
27056,
378,
7,
710,
394,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
299,
287,
1796,
17,
7266,
70,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36525,
13,
33295,
7,
11612,
17,
7266,
70,
58,
77,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
773,
20692,
58,
11612,
17,
7266,
70,
58,
77,
312,
60,
1343,
352,
60,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
850,
70,
62,
14907,
62,
9630,
13,
33295,
7,
312,
87,
62,
82,
1343,
1312,
62,
77,
8,
198,
220,
220,
220,
220,
220,
220,
220,
773,
20692,
796,
773,
20692,
13,
66,
5700,
388,
22446,
459,
2981,
7,
37659,
13,
600,
2414,
8,
198,
220,
220,
220,
220,
220,
220,
220,
36525,
796,
45941,
13,
18747,
7,
521,
1063,
8,
198,
220,
220,
220,
220,
220,
220,
220,
850,
70,
62,
14907,
62,
9630,
796,
45941,
13,
18747,
7,
7266,
70,
62,
14907,
62,
9630,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
45941,
13,
1952,
7,
521,
1063,
13,
7857,
8,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
773,
20692,
58,
12,
16,
60,
6624,
36525,
13,
7857,
6624,
850,
70,
62,
14907,
62,
9630,
13,
7857,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2496,
62,
2340,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
773,
20692,
11,
36525,
11,
1366,
11,
850,
70,
62,
77,
4147,
11,
850,
70,
62,
14907,
62,
9630,
11,
59,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45941,
13,
18747,
26933,
11612,
17,
7266,
70,
58,
83,
60,
329,
256,
287,
2496,
62,
2340,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
773,
20692,
11,
36525,
11,
1366,
11,
850,
70,
62,
77,
4147,
11,
850,
70,
62,
14907,
62,
9630,
628,
628,
198,
4871,
509,
23483,
16305,
11347,
14881,
7,
37065,
16305,
20053,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
383,
6072,
20053,
17706,
479,
12,
8548,
19232,
11,
416,
1708,
262,
4831,
25,
198,
220,
220,
220,
220,
352,
13,
14534,
306,
2298,
4600,
7857,
62,
15763,
63,
1271,
286,
6808,
13760,
422,
477,
3047,
13760,
26,
198,
220,
220,
220,
220,
362,
13,
27565,
1725,
12,
63,
74,
63,
6232,
422,
262,
11135,
13,
317,
10139,
379,
1725,
12,
72,
481,
4336,
448,
284,
198,
220,
220,
220,
220,
220,
220,
220,
379,
749,
4600,
37315,
63,
13760,
379,
1725,
30420,
72,
10,
16,
8,
198,
220,
220,
220,
220,
513,
13,
2980,
378,
10139,
12,
17223,
850,
34960,
422,
262,
13760,
12615,
416,
262,
4738,
2513,
13,
198,
220,
220,
220,
1002,
4466,
6624,
532,
16,
11,
788,
356,
481,
4292,
477,
1725,
30420,
72,
10,
16,
8,
12020,
1231,
597,
6352,
321,
11347,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
9224,
11,
10139,
62,
16793,
11,
16339,
62,
27594,
11,
2546,
62,
15763,
11,
6795,
11,
4466,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
23412,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9224,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
766,
2208,
12,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10139,
62,
16793,
220,
220,
220,
220,
766,
2208,
12,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2546,
62,
15763,
220,
220,
220,
220,
220,
220,
493,
11,
1271,
286,
6808,
13760,
15456,
6497,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6795,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
493,
11,
1271,
286,
29438,
284,
4292,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4466,
220,
220,
220,
220,
220,
220,
220,
220,
220,
493,
11,
1271,
286,
1725,
30420,
72,
10,
16,
8,
12020,
284,
4292,
628,
220,
220,
220,
220,
220,
220,
220,
25235,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7857,
62,
15763,
796,
2546,
62,
15763,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
18053,
796,
6795,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
37315,
796,
4466,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
796,
366,
74,
8548,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2208,
22446,
834,
15003,
834,
7,
41255,
11,
10139,
62,
16793,
11,
16339,
62,
27594,
11,
23884,
8,
628,
198,
4871,
350,
4805,
16305,
11347,
14881,
7,
37065,
16305,
20053,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
383,
6072,
20053,
17706,
19232,
1912,
319,
350,
4805,
4776,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
9224,
11,
10139,
62,
16793,
11,
16339,
62,
27594,
11,
2546,
62,
15763,
11,
479,
11,
17130,
28,
15,
13,
5332,
11,
304,
862,
33576,
28,
16,
68,
12,
20,
11,
11387,
28,
15,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
23412,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9224,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
766,
2208,
12,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10139,
62,
16793,
220,
220,
220,
220,
766,
2208,
12,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2546,
62,
15763,
220,
220,
220,
220,
220,
220,
493,
11,
1271,
286,
6808,
13760,
15456,
6497,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
493,
11,
1271,
286,
29438,
284,
4292,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4466,
220,
220,
220,
220,
220,
220,
220,
220,
220,
493,
11,
1271,
286,
1725,
30420,
72,
10,
16,
8,
12020,
284,
4292,
628,
220,
220,
220,
220,
220,
220,
220,
25235,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7857,
62,
15763,
796,
2546,
62,
15763,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
74,
796,
479,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
26591,
796,
17130,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
538,
18217,
261,
796,
304,
862,
33576,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
400,
10126,
796,
11387,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
796,
366,
381,
81,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2208,
22446,
834,
15003,
834,
7,
41255,
11,
10139,
62,
16793,
11,
16339,
62,
27594,
11,
23884,
8,
628
] | 2.057503 | 5,478 |
import os
import pathlib
from dotenv import load_dotenv
# Load .env vars
load_dotenv(pathlib.Path('.').parent/'.env')
MONGO_URL = os.getenv('MONGO_URL')
MONGO_DATABASE = os.getenv('MONGO_DATABASE')
| [
11748,
28686,
198,
11748,
3108,
8019,
198,
198,
6738,
16605,
24330,
1330,
3440,
62,
26518,
24330,
628,
198,
2,
8778,
764,
24330,
410,
945,
198,
2220,
62,
26518,
24330,
7,
6978,
8019,
13,
15235,
10786,
2637,
737,
8000,
14,
4458,
24330,
11537,
198,
198,
27857,
11230,
62,
21886,
796,
28686,
13,
1136,
24330,
10786,
27857,
11230,
62,
21886,
11537,
198,
27857,
11230,
62,
35,
1404,
6242,
11159,
796,
28686,
13,
1136,
24330,
10786,
27857,
11230,
62,
35,
1404,
6242,
11159,
11537,
198
] | 2.463415 | 82 |
#Read data
inputList = []
with open('inputs\input1.txt') as f:
for line in f.readlines():
inputList.append(int(line.strip()))
#Define functions
import itertools
import numpy as np
#Solution 1
print(solveProblem(inputList,2))
#Solution 2
print(solveProblem(inputList,3))
| [
2,
5569,
1366,
198,
15414,
8053,
796,
17635,
198,
198,
4480,
1280,
10786,
15414,
82,
59,
15414,
16,
13,
14116,
11537,
355,
277,
25,
198,
220,
220,
220,
329,
1627,
287,
277,
13,
961,
6615,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
5128,
8053,
13,
33295,
7,
600,
7,
1370,
13,
36311,
3419,
4008,
628,
198,
2,
7469,
500,
5499,
198,
11748,
340,
861,
10141,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
46344,
352,
198,
4798,
7,
82,
6442,
40781,
7,
15414,
8053,
11,
17,
4008,
198,
198,
2,
46344,
362,
198,
4798,
7,
82,
6442,
40781,
7,
15414,
8053,
11,
18,
4008,
628
] | 2.666667 | 108 |
#!/usr/bin/python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
from __future__ import absolute_import
from .common import Test, free_tcp_port, Skipped
from proton import Message
from proton.handlers import CHandshaker, CFlowController
from proton.reactor import Reactor
import os
import subprocess
from threading import Thread
import time
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
5115,
6634,
9238,
13,
220,
383,
7054,
37,
16625,
428,
2393,
198,
2,
284,
345,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
198,
2,
366,
34156,
15341,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
198,
2,
351,
262,
13789,
13,
220,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
198,
2,
3788,
9387,
739,
262,
13789,
318,
9387,
319,
281,
198,
2,
366,
1921,
3180,
1,
29809,
1797,
11,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
198,
2,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
220,
4091,
262,
13789,
329,
262,
198,
2,
2176,
3303,
15030,
21627,
290,
11247,
198,
2,
739,
262,
13789,
13,
198,
2,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
6738,
764,
11321,
1330,
6208,
11,
1479,
62,
83,
13155,
62,
634,
11,
3661,
3949,
198,
6738,
386,
1122,
1330,
16000,
198,
6738,
386,
1122,
13,
4993,
8116,
1330,
5870,
392,
1477,
3110,
11,
327,
37535,
22130,
198,
6738,
386,
1122,
13,
260,
11218,
1330,
797,
11218,
198,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
6738,
4704,
278,
1330,
14122,
198,
11748,
640,
628
] | 3.892473 | 279 |
import subprocess
import sys
# Validate command-line arguments
if len(sys.argv) < 2 or (not (sys.argv[1] == "METRICS" and len(sys.argv) == 3) and not (sys.argv[1] == "FULL" and len(sys.argv) == 7 and sys.argv[3].isdigit() and all([x.isdigit() for x in sys.argv[4].split("_")]) and sys.argv[5].lstrip("-").isdigit() and sys.argv[6].lstrip("-").isdigit())):
print("Usage:\n python MQLibMaster.py METRICS tag\n [[or]]\n python MQLibMaster.py FULL tag #ITERFORBASELINE SEEDS_SEPARATED_BY_UNDERSCORES MINSECONDS MAXSECONDS")
exit(1)
# Run until it tells us that we're done
while True:
if sys.argv[1] == "METRICS":
p = subprocess.Popen(["python", "MQLibRunner.py", sys.argv[1], sys.argv[2]],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
else:
p = subprocess.Popen(["python", "MQLibRunner.py", sys.argv[1], sys.argv[2], sys.argv[3],
sys.argv[4], sys.argv[5], sys.argv[6]],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
for line in p.stdout:
sys.stdout.write(line)
p.wait()
# MQLibRunner.py will terminate this EC2 node if it completes successfully,
# so if we're still running then it must have failed. We'll just kick
# it off again at the top of the loop.
| [
11748,
850,
14681,
198,
11748,
25064,
198,
198,
2,
3254,
20540,
3141,
12,
1370,
7159,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
1279,
362,
393,
357,
1662,
357,
17597,
13,
853,
85,
58,
16,
60,
6624,
366,
47123,
49,
19505,
1,
290,
18896,
7,
17597,
13,
853,
85,
8,
6624,
513,
8,
290,
407,
357,
17597,
13,
853,
85,
58,
16,
60,
6624,
366,
37,
9994,
1,
290,
18896,
7,
17597,
13,
853,
85,
8,
6624,
767,
290,
25064,
13,
853,
85,
58,
18,
4083,
9409,
328,
270,
3419,
290,
477,
26933,
87,
13,
9409,
328,
270,
3419,
329,
2124,
287,
25064,
13,
853,
85,
58,
19,
4083,
35312,
7203,
62,
4943,
12962,
290,
25064,
13,
853,
85,
58,
20,
4083,
75,
36311,
7203,
12,
11074,
9409,
328,
270,
3419,
290,
25064,
13,
853,
85,
58,
21,
4083,
75,
36311,
7203,
12,
11074,
9409,
328,
270,
28955,
2599,
198,
220,
220,
220,
3601,
7203,
28350,
7479,
77,
220,
21015,
337,
9711,
571,
18254,
13,
9078,
31243,
49,
19505,
7621,
59,
77,
220,
220,
220,
16410,
273,
11907,
59,
77,
220,
21015,
337,
9711,
571,
18254,
13,
9078,
34958,
7621,
1303,
2043,
1137,
13775,
33,
1921,
3698,
8881,
7946,
1961,
50,
62,
5188,
27082,
11617,
62,
17513,
62,
4944,
35,
4877,
44879,
1546,
20625,
23683,
1340,
5258,
25882,
23683,
1340,
5258,
4943,
198,
220,
220,
220,
8420,
7,
16,
8,
198,
198,
2,
5660,
1566,
340,
4952,
514,
326,
356,
821,
1760,
198,
4514,
6407,
25,
198,
220,
220,
220,
611,
25064,
13,
853,
85,
58,
16,
60,
6624,
366,
47123,
49,
19505,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
279,
796,
850,
14681,
13,
47,
9654,
7,
14692,
29412,
1600,
366,
44,
9711,
571,
49493,
13,
9078,
1600,
25064,
13,
853,
85,
58,
16,
4357,
25064,
13,
853,
85,
58,
17,
60,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14367,
448,
28,
7266,
14681,
13,
47,
4061,
36,
11,
336,
1082,
81,
28,
7266,
14681,
13,
36886,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
279,
796,
850,
14681,
13,
47,
9654,
7,
14692,
29412,
1600,
366,
44,
9711,
571,
49493,
13,
9078,
1600,
25064,
13,
853,
85,
58,
16,
4357,
25064,
13,
853,
85,
58,
17,
4357,
25064,
13,
853,
85,
58,
18,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
853,
85,
58,
19,
4357,
25064,
13,
853,
85,
58,
20,
4357,
25064,
13,
853,
85,
58,
21,
60,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14367,
448,
28,
7266,
14681,
13,
47,
4061,
36,
11,
336,
1082,
81,
28,
7266,
14681,
13,
36886,
8,
198,
220,
220,
220,
329,
1627,
287,
279,
13,
19282,
448,
25,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
19282,
448,
13,
13564,
7,
1370,
8,
198,
220,
220,
220,
279,
13,
17077,
3419,
628,
220,
220,
220,
1303,
337,
9711,
571,
49493,
13,
9078,
481,
23654,
428,
13182,
17,
10139,
611,
340,
32543,
7675,
11,
198,
220,
220,
220,
1303,
523,
611,
356,
821,
991,
2491,
788,
340,
1276,
423,
4054,
13,
775,
1183,
655,
4829,
198,
220,
220,
220,
1303,
340,
572,
757,
379,
262,
1353,
286,
262,
9052,
13,
198
] | 2.175207 | 605 |
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
# X = np.array([[5,3],
# [10,15],
# [15,12],
# [24,10],
# [30,30],
# [85,70],
# [71,80],
# [60,78],
# [70,55],
# [80,91],])
# cluster = AgglomerativeClustering(n_clusters=2, affinity='euclidean', linkage='ward')
# cluster.fit_predict(X)
# print(cluster.labels_)
# plt.scatter(X[:,0],X[:,1], c=cluster.labels_, cmap='rainbow')
# plt.show()
# %%
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
# %%
dates = ['2016-1-1', '2016-1-2', '2016-1-3']
cols = pd.MultiIndex.from_product([dates, ['High', 'Low']])
cols
# pd.DataFrame(data=cols)
# %%
bags = {}
pose_x = np.asarray([1,2,3,4]).T
pose_y = np.asarray([2,2,3,4]).T
t = np.asarray([3,2,3,4]).T
col_xy = np.asarray([4,2,3,4]).T
subgoal_x = np.asarray([5,2,3,4]).T
subgoal_y = np.asarray([6,2,3,4]).T
wpg_x = np.asarray([7,2,3,4]).T
wpg_y = np.asarray([8,2,3,4]).T
bags["run_1"] = [pose_x, pose_y, t, col_xy, subgoal_x, subgoal_y, wpg_x, wpg_y]
bags["run_2"] = [pose_x, pose_y, t, col_xy, subgoal_x, subgoal_y, wpg_x, wpg_y]
# %%
df = pd.DataFrame(data=bags)
df2 = df.to_dict()
df.to_csv("test.csv",index=False)
# %%
df
# %%
df2
# %%
runs = pd.read_excel('runs_ex.xlsx',engine='openpyxl')
type(runs)
runs.to_excel("output.xlsx")
# %%
df2["run_2"]
# %%
bags["run_2"]
# %%
import json
data = {}
data['run'] = []
data['time'] = []
data['path'] = []
data['velocity'] = []
data['collision'] = []
data['run'].append(0)
data['time'].append(1)
data['path'].append(2)
data['velocity'].append(3)
data['collision'].append(4)
with open('data.json', 'w') as outfile:
json.dump(data, outfile)
# %%
| [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
1395,
796,
45941,
13,
18747,
26933,
58,
20,
11,
18,
4357,
198,
2,
220,
220,
220,
220,
685,
940,
11,
1314,
4357,
198,
2,
220,
220,
220,
220,
685,
1314,
11,
1065,
4357,
198,
2,
220,
220,
220,
220,
685,
1731,
11,
940,
4357,
198,
2,
220,
220,
220,
220,
685,
1270,
11,
1270,
4357,
198,
2,
220,
220,
220,
220,
685,
5332,
11,
2154,
4357,
198,
2,
220,
220,
220,
220,
685,
4869,
11,
1795,
4357,
198,
2,
220,
220,
220,
220,
685,
1899,
11,
3695,
4357,
198,
2,
220,
220,
220,
220,
685,
2154,
11,
2816,
4357,
198,
2,
220,
220,
220,
220,
685,
1795,
11,
6420,
4357,
12962,
628,
198,
198,
2,
13946,
796,
19015,
75,
12057,
876,
2601,
436,
1586,
7,
77,
62,
565,
13654,
28,
17,
11,
28430,
11639,
12496,
565,
485,
272,
3256,
45945,
11639,
904,
11537,
198,
2,
13946,
13,
11147,
62,
79,
17407,
7,
55,
8,
198,
198,
2,
3601,
7,
565,
5819,
13,
23912,
1424,
62,
8,
198,
2,
458,
83,
13,
1416,
1436,
7,
55,
58,
45299,
15,
4357,
55,
58,
45299,
16,
4357,
269,
28,
565,
5819,
13,
23912,
1424,
62,
11,
269,
8899,
11639,
3201,
8176,
11537,
198,
2,
458,
83,
13,
12860,
3419,
198,
198,
2,
43313,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
2,
43313,
198,
19581,
796,
37250,
5304,
12,
16,
12,
16,
3256,
705,
5304,
12,
16,
12,
17,
3256,
705,
5304,
12,
16,
12,
18,
20520,
198,
4033,
82,
796,
279,
67,
13,
29800,
15732,
13,
6738,
62,
11167,
26933,
19581,
11,
37250,
11922,
3256,
705,
20535,
6,
11907,
8,
198,
4033,
82,
198,
2,
279,
67,
13,
6601,
19778,
7,
7890,
28,
4033,
82,
8,
198,
2,
43313,
198,
34005,
796,
23884,
198,
3455,
62,
87,
796,
45941,
13,
292,
18747,
26933,
16,
11,
17,
11,
18,
11,
19,
35944,
51,
198,
198,
3455,
62,
88,
796,
45941,
13,
292,
18747,
26933,
17,
11,
17,
11,
18,
11,
19,
35944,
51,
198,
83,
796,
45941,
13,
292,
18747,
26933,
18,
11,
17,
11,
18,
11,
19,
35944,
51,
198,
4033,
62,
5431,
796,
45941,
13,
292,
18747,
26933,
19,
11,
17,
11,
18,
11,
19,
35944,
51,
198,
7266,
35231,
62,
87,
796,
45941,
13,
292,
18747,
26933,
20,
11,
17,
11,
18,
11,
19,
35944,
51,
198,
7266,
35231,
62,
88,
796,
45941,
13,
292,
18747,
26933,
21,
11,
17,
11,
18,
11,
19,
35944,
51,
198,
86,
6024,
62,
87,
796,
45941,
13,
292,
18747,
26933,
22,
11,
17,
11,
18,
11,
19,
35944,
51,
198,
86,
6024,
62,
88,
796,
45941,
13,
292,
18747,
26933,
23,
11,
17,
11,
18,
11,
19,
35944,
51,
198,
34005,
14692,
5143,
62,
16,
8973,
796,
685,
3455,
62,
87,
11,
12705,
62,
88,
11,
256,
11,
951,
62,
5431,
11,
850,
35231,
62,
87,
11,
850,
35231,
62,
88,
11,
266,
6024,
62,
87,
11,
266,
6024,
62,
88,
60,
198,
34005,
14692,
5143,
62,
17,
8973,
796,
685,
3455,
62,
87,
11,
12705,
62,
88,
11,
256,
11,
951,
62,
5431,
11,
850,
35231,
62,
87,
11,
850,
35231,
62,
88,
11,
266,
6024,
62,
87,
11,
266,
6024,
62,
88,
60,
198,
2,
43313,
198,
7568,
796,
279,
67,
13,
6601,
19778,
7,
7890,
28,
34005,
8,
198,
7568,
17,
796,
47764,
13,
1462,
62,
11600,
3419,
198,
7568,
13,
1462,
62,
40664,
7203,
9288,
13,
40664,
1600,
9630,
28,
25101,
8,
198,
2,
43313,
198,
7568,
198,
2,
43313,
198,
7568,
17,
198,
2,
43313,
198,
48381,
796,
279,
67,
13,
961,
62,
1069,
5276,
10786,
48381,
62,
1069,
13,
87,
7278,
87,
3256,
18392,
11639,
9654,
9078,
87,
75,
11537,
220,
198,
4906,
7,
48381,
8,
198,
48381,
13,
1462,
62,
1069,
5276,
7203,
22915,
13,
87,
7278,
87,
4943,
220,
198,
2,
43313,
198,
7568,
17,
14692,
5143,
62,
17,
8973,
198,
2,
43313,
198,
34005,
14692,
5143,
62,
17,
8973,
198,
2,
43313,
198,
11748,
33918,
198,
198,
7890,
796,
23884,
198,
7890,
17816,
5143,
20520,
220,
220,
220,
220,
220,
220,
796,
17635,
198,
7890,
17816,
2435,
20520,
220,
220,
220,
220,
220,
796,
17635,
198,
7890,
17816,
6978,
20520,
220,
220,
220,
220,
220,
796,
17635,
198,
7890,
17816,
626,
11683,
20520,
220,
796,
17635,
198,
7890,
17816,
26000,
1166,
20520,
796,
17635,
198,
198,
7890,
17816,
5143,
6,
4083,
33295,
7,
15,
8,
198,
7890,
17816,
2435,
6,
4083,
33295,
7,
16,
8,
198,
7890,
17816,
6978,
6,
4083,
33295,
7,
17,
8,
198,
7890,
17816,
626,
11683,
6,
4083,
33295,
7,
18,
8,
198,
7890,
17816,
26000,
1166,
6,
4083,
33295,
7,
19,
8,
628,
198,
198,
4480,
1280,
10786,
7890,
13,
17752,
3256,
705,
86,
11537,
355,
503,
7753,
25,
198,
220,
220,
220,
33918,
13,
39455,
7,
7890,
11,
503,
7753,
8,
198,
2,
43313,
198
] | 1.994118 | 850 |
# -*- coding: utf-8 -*-
__author__ = 'Stéphane-Poirier'
import math
from diff_graph import DiffGraph
from ferrer import FerrerIterator, ferrer_size
import time
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description='ramsey : evaluate expected value of Kr presence for a range of sizes')
parser.add_argument("-r", "--Kr", type=int, default=5, help="size of Kr to avoid")
parser.add_argument("-n", "--size_max", type=int, default=51, help="size max of Kn to measure")
parser.add_argument("-m", "--method", type=str, default="triangles", help="method used to evaluate expected value")
options = parser.parse_args()
if options.method == "test":
test()
elif options.method.lower() == "erdos":
print("Erdös method to evaluate expected value of K{}".format(options.Kr))
evaluate_erdos(options.Kr, options.size_max)
elif options.method.lower() == "triangles":
print("Triangles method to evaluate expected value of K{}".format(options.Kr))
evaluate_triangles(options.Kr, options.size_max)
elif options.method.lower() == "stars":
print("Stars method to evaluate expected value of K{}".format(options.Kr))
evaluate_stars(options.Kr, options.size_max)
else:
print("Method {} is not yet implemented".format(options.method))
# n_graph = graph.Graph.from_diffs(({1, 4}, {2, 3, 5}))
# n_graph.set_edge(2, 3, 1)
# print("{}".format(n_graph))
# n_cliques = n_graph.count_cliques()
# print("nb cliques {}".format(n_cliques))
# d_graph = diff_graph.DiffGraph(({1, 4}, {2, 3, 5}))
# print("{}".format(d_graph))
# for lst in FerrerIterator(4, 7, 10):
# cur_size = ferrer_size(lst)
# print("list {} : size {}".format(lst, cur_size))
# n = 17
# qs0 = quadratic_set(n)
# qs1 = set(range(1, n)) - qs0
# d_graph = DiffGraph((qs0, qs1))
# n_cliques = d_graph.count_cliques(isomorphic=True)
# expected_cliques(n, n_cliques, 2, 5, isomorphic=True)
Gp = []
expectations_dict = {}
for n in range(5, 150, 4):
if is_prime(n):
print(n)
start = time.process_time()
qs0 = quadratic_set(n)
qs1 = set(range(1, n)) - qs0
d_graph = DiffGraph((qs0, qs1))
n_cliques = d_graph.count_cliques(isomorphic=True)
print("nb cliques {}".format(n_cliques))
max_cliques = len([x for x in n_cliques[0] if x > 0])-1
Gp.append((n, max_cliques))
min_r = max_cliques+1
for nb_copies in range(2, 3*n+1):
for r in range(min_r, (max_cliques*nb_copies)):
exp = expected_cliques(n, n_cliques, nb_copies, r, isomorphic=True)
if r not in expectations_dict \
or n*nb_copies - math.floor(exp) > expectations_dict[r][1]*expectations_dict[r][2] - math.floor(expectations_dict[r][0]):
expectations_dict[r] = (exp, n, nb_copies)
if exp < 1.0:
break
if exp > n * nb_copies:
min_r = r + 1
print("time {}".format(time.process_time() - start))
print(Gp)
print(expectations_dict)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
834,
9800,
834,
796,
705,
1273,
2634,
746,
1531,
12,
47,
10840,
959,
6,
198,
198,
11748,
10688,
198,
6738,
814,
62,
34960,
1330,
10631,
37065,
198,
6738,
11354,
11751,
1330,
12880,
11751,
37787,
11,
11354,
11751,
62,
7857,
198,
11748,
640,
628,
628,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1330,
1822,
29572,
198,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
11639,
859,
4397,
1058,
13446,
2938,
1988,
286,
13685,
4931,
329,
257,
2837,
286,
10620,
11537,
628,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
12,
81,
1600,
366,
438,
42,
81,
1600,
2099,
28,
600,
11,
4277,
28,
20,
11,
1037,
2625,
7857,
286,
13685,
284,
3368,
4943,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
12,
77,
1600,
366,
438,
7857,
62,
9806,
1600,
2099,
28,
600,
11,
4277,
28,
4349,
11,
1037,
2625,
7857,
3509,
286,
6102,
284,
3953,
4943,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
12,
76,
1600,
366,
438,
24396,
1600,
2099,
28,
2536,
11,
4277,
2625,
28461,
27787,
1600,
1037,
2625,
24396,
973,
284,
13446,
2938,
1988,
4943,
628,
220,
220,
220,
3689,
796,
30751,
13,
29572,
62,
22046,
3419,
628,
220,
220,
220,
611,
3689,
13,
24396,
6624,
366,
9288,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
1332,
3419,
198,
220,
220,
220,
1288,
361,
3689,
13,
24396,
13,
21037,
3419,
6624,
366,
263,
37427,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
36,
4372,
9101,
82,
2446,
284,
13446,
2938,
1988,
286,
509,
90,
92,
1911,
18982,
7,
25811,
13,
42,
81,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
13446,
62,
263,
37427,
7,
25811,
13,
42,
81,
11,
3689,
13,
7857,
62,
9806,
8,
198,
220,
220,
220,
1288,
361,
3689,
13,
24396,
13,
21037,
3419,
6624,
366,
28461,
27787,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
14824,
27787,
2446,
284,
13446,
2938,
1988,
286,
509,
90,
92,
1911,
18982,
7,
25811,
13,
42,
81,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
13446,
62,
28461,
27787,
7,
25811,
13,
42,
81,
11,
3689,
13,
7857,
62,
9806,
8,
198,
220,
220,
220,
1288,
361,
3689,
13,
24396,
13,
21037,
3419,
6624,
366,
30783,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
29366,
2446,
284,
13446,
2938,
1988,
286,
509,
90,
92,
1911,
18982,
7,
25811,
13,
42,
81,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
13446,
62,
30783,
7,
25811,
13,
42,
81,
11,
3689,
13,
7857,
62,
9806,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
17410,
23884,
318,
407,
1865,
9177,
1911,
18982,
7,
25811,
13,
24396,
4008,
628,
220,
220,
220,
1303,
299,
62,
34960,
796,
4823,
13,
37065,
13,
6738,
62,
67,
10203,
7,
15090,
16,
11,
604,
5512,
1391,
17,
11,
513,
11,
642,
92,
4008,
198,
220,
220,
220,
1303,
299,
62,
34960,
13,
2617,
62,
14907,
7,
17,
11,
513,
11,
352,
8,
198,
220,
220,
220,
1303,
3601,
7203,
90,
92,
1911,
18982,
7,
77,
62,
34960,
4008,
198,
220,
220,
220,
1303,
299,
62,
565,
6368,
796,
299,
62,
34960,
13,
9127,
62,
565,
6368,
3419,
198,
220,
220,
220,
1303,
3601,
7203,
46803,
537,
6368,
23884,
1911,
18982,
7,
77,
62,
565,
6368,
4008,
628,
220,
220,
220,
1303,
288,
62,
34960,
796,
814,
62,
34960,
13,
28813,
37065,
7,
15090,
16,
11,
604,
5512,
1391,
17,
11,
513,
11,
642,
92,
4008,
198,
220,
220,
220,
1303,
3601,
7203,
90,
92,
1911,
18982,
7,
67,
62,
34960,
4008,
628,
220,
220,
220,
1303,
329,
300,
301,
287,
12880,
11751,
37787,
7,
19,
11,
767,
11,
838,
2599,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
1090,
62,
7857,
796,
11354,
11751,
62,
7857,
7,
75,
301,
8,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
3601,
7203,
4868,
23884,
1058,
2546,
23884,
1911,
18982,
7,
75,
301,
11,
1090,
62,
7857,
4008,
628,
220,
220,
220,
1303,
299,
796,
1596,
198,
220,
220,
220,
1303,
10662,
82,
15,
796,
15094,
81,
1512,
62,
2617,
7,
77,
8,
198,
220,
220,
220,
1303,
10662,
82,
16,
796,
900,
7,
9521,
7,
16,
11,
299,
4008,
532,
10662,
82,
15,
198,
220,
220,
220,
1303,
288,
62,
34960,
796,
10631,
37065,
19510,
48382,
15,
11,
10662,
82,
16,
4008,
198,
220,
220,
220,
1303,
299,
62,
565,
6368,
796,
288,
62,
34960,
13,
9127,
62,
565,
6368,
7,
271,
46374,
28,
17821,
8,
198,
220,
220,
220,
1303,
2938,
62,
565,
6368,
7,
77,
11,
299,
62,
565,
6368,
11,
362,
11,
642,
11,
318,
46374,
28,
17821,
8,
628,
220,
220,
220,
402,
79,
796,
17635,
198,
220,
220,
220,
9027,
62,
11600,
796,
23884,
198,
220,
220,
220,
329,
299,
287,
2837,
7,
20,
11,
6640,
11,
604,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
611,
318,
62,
35505,
7,
77,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
77,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
796,
640,
13,
14681,
62,
2435,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10662,
82,
15,
796,
15094,
81,
1512,
62,
2617,
7,
77,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10662,
82,
16,
796,
900,
7,
9521,
7,
16,
11,
299,
4008,
532,
10662,
82,
15,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
62,
34960,
796,
10631,
37065,
19510,
48382,
15,
11,
10662,
82,
16,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
62,
565,
6368,
796,
288,
62,
34960,
13,
9127,
62,
565,
6368,
7,
271,
46374,
28,
17821,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
46803,
537,
6368,
23884,
1911,
18982,
7,
77,
62,
565,
6368,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3509,
62,
565,
6368,
796,
18896,
26933,
87,
329,
2124,
287,
299,
62,
565,
6368,
58,
15,
60,
611,
2124,
1875,
657,
12962,
12,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
402,
79,
13,
33295,
19510,
77,
11,
3509,
62,
565,
6368,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
949,
62,
81,
796,
3509,
62,
565,
6368,
10,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
299,
65,
62,
22163,
444,
287,
2837,
7,
17,
11,
513,
9,
77,
10,
16,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
374,
287,
2837,
7,
1084,
62,
81,
11,
357,
9806,
62,
565,
6368,
9,
46803,
62,
22163,
444,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1033,
796,
2938,
62,
565,
6368,
7,
77,
11,
299,
62,
565,
6368,
11,
299,
65,
62,
22163,
444,
11,
374,
11,
318,
46374,
28,
17821,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
374,
407,
287,
9027,
62,
11600,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
393,
299,
9,
46803,
62,
22163,
444,
532,
10688,
13,
28300,
7,
11201,
8,
1875,
9027,
62,
11600,
58,
81,
7131,
16,
60,
9,
1069,
806,
602,
62,
11600,
58,
81,
7131,
17,
60,
532,
10688,
13,
28300,
7,
1069,
806,
602,
62,
11600,
58,
81,
7131,
15,
60,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9027,
62,
11600,
58,
81,
60,
796,
357,
11201,
11,
299,
11,
299,
65,
62,
22163,
444,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1033,
1279,
352,
13,
15,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1033,
1875,
299,
1635,
299,
65,
62,
22163,
444,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
949,
62,
81,
796,
374,
1343,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
2435,
23884,
1911,
18982,
7,
2435,
13,
14681,
62,
2435,
3419,
532,
923,
4008,
628,
220,
220,
220,
3601,
7,
38,
79,
8,
198,
220,
220,
220,
3601,
7,
1069,
806,
602,
62,
11600,
8,
198
] | 2.141931 | 1,543 |
from conans import AutoToolsBuildEnvironment, ConanFile, tools
from conans.errors import ConanInvalidConfiguration
import os
required_conan_version = ">=1.36.0"
| [
6738,
369,
504,
1330,
11160,
33637,
15580,
31441,
11,
31634,
8979,
11,
4899,
198,
6738,
369,
504,
13,
48277,
1330,
31634,
44651,
38149,
198,
11748,
28686,
198,
198,
35827,
62,
1102,
272,
62,
9641,
796,
366,
29,
28,
16,
13,
2623,
13,
15,
1,
628
] | 3.622222 | 45 |
import unittest
import os
import signal
if __name__ == '__main__':
unittest.main()
os.kill(os.getpid(), signal.SIGKILL)
| [
11748,
555,
715,
395,
198,
11748,
28686,
198,
11748,
6737,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
628,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198,
220,
220,
220,
28686,
13,
12728,
7,
418,
13,
1136,
35317,
22784,
6737,
13,
50,
3528,
42,
8267,
8,
198
] | 2.45283 | 53 |
import datetime
import os
import pycurl
import sentinel5dl
import sentinel5dl.__main__ as executable
import tempfile
import unittest
import logging
import sys
testpath = os.path.dirname(os.path.abspath(__file__))
if __name__ == '__main__':
unittest.main()
| [
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
12972,
66,
6371,
198,
11748,
1908,
20538,
20,
25404,
198,
11748,
1908,
20538,
20,
25404,
13,
834,
12417,
834,
355,
28883,
198,
11748,
20218,
7753,
198,
11748,
555,
715,
395,
198,
11748,
18931,
198,
11748,
25064,
628,
198,
9288,
6978,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
397,
2777,
776,
7,
834,
7753,
834,
4008,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.891304 | 92 |
import time
poll_active = False
poll = {}
allowed_users = set()
voted = set()
| [
11748,
640,
198,
198,
30393,
62,
5275,
796,
10352,
198,
30393,
796,
23884,
198,
40845,
62,
18417,
796,
900,
3419,
198,
85,
5191,
796,
900,
3419,
198
] | 2.925926 | 27 |
# Copyright 2014 Basho Technologies, Inc.
#
# This file is provided to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""
distutils commands for generating protocol message-code mappings.
"""
__all__ = ['build_messages', 'clean_messages']
import re
import csv
import os
from os.path import isfile
from distutils import log
from distutils.core import Command
from distutils.file_util import write_file
from datetime import date
LICENSE = """# Copyright {0} Basho Technologies, Inc.
#
# This file is provided to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
""".format(date.today().year)
class clean_messages(Command):
"""
Cleans generated message code mappings. Add to the build process
using::
setup(cmd_class={'clean_messages': clean_messages})
"""
description = "clean generated protocol message code mappings"
user_options = [
('destination=', None, 'destination Python source file')
]
class build_messages(Command):
"""
Generates message code mappings. Add to the build process using::
setup(cmd_class={'build_messages': build_messages})
"""
description = "generate protocol message code mappings"
user_options = [
('source=', None, 'source CSV file containing message code mappings'),
('destination=', None, 'destination Python source file')
]
# Used in loading and generating
_pb_imports = set()
_messages = set()
_linesep = os.linesep
_indented_item_sep = ',{0} '.format(_linesep)
_docstring = [
''
'# This is a generated file. DO NOT EDIT.',
'',
'"""',
'Constants and mappings between Riak protocol codes and messages.',
'"""',
''
]
def _format_python2_or_3(self):
"""
Change the PB files to use full pathnames for Python 3.x
and modify the metaclasses to be version agnostic
"""
pb_files = set()
with open(self.source, 'r', buffering=1) as csvfile:
reader = csv.reader(csvfile)
for row in reader:
_, _, proto = row
pb_files.add('riak_pb/{0}_pb2.py'.format(proto))
for im in sorted(pb_files):
with open(im, 'r', buffering=1) as pbfile:
contents = 'from six import *\n' + pbfile.read()
contents = re.sub(r'riak_pb2',
r'riak_pb.riak_pb2',
contents)
# Look for this pattern in the protoc-generated file:
#
# class RpbCounterGetResp(_message.Message):
# __metaclass__ = _reflection.GeneratedProtocolMessageType
#
# and convert it to:
#
# @add_metaclass(_reflection.GeneratedProtocolMessageType)
# class RpbCounterGetResp(_message.Message):
contents = re.sub(
r'class\s+(\S+)\((\S+)\):\s*\n'
'\s+__metaclass__\s+=\s+(\S+)\s*\n',
r'@add_metaclass(\3)\nclass \1(\2):\n', contents)
with open(im, 'w', buffering=1) as pbfile:
pbfile.write(contents)
| [
2,
15069,
1946,
15743,
78,
21852,
11,
3457,
13,
198,
2,
198,
2,
770,
2393,
318,
2810,
284,
345,
739,
262,
24843,
13789,
11,
198,
2,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
407,
779,
428,
2393,
198,
2,
2845,
287,
11846,
351,
262,
13789,
13,
220,
921,
743,
7330,
198,
2,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
198,
2,
3788,
9387,
739,
262,
13789,
318,
9387,
319,
281,
198,
2,
366,
1921,
3180,
1,
29809,
1797,
11,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
198,
2,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
220,
4091,
262,
13789,
329,
262,
198,
2,
2176,
3303,
15030,
21627,
290,
11247,
198,
2,
739,
262,
13789,
13,
198,
198,
37811,
198,
17080,
26791,
9729,
329,
15453,
8435,
3275,
12,
8189,
285,
39242,
13,
198,
37811,
198,
198,
834,
439,
834,
796,
37250,
11249,
62,
37348,
1095,
3256,
705,
27773,
62,
37348,
1095,
20520,
198,
198,
11748,
302,
198,
11748,
269,
21370,
198,
11748,
28686,
198,
6738,
28686,
13,
6978,
1330,
318,
7753,
198,
6738,
1233,
26791,
1330,
2604,
198,
6738,
1233,
26791,
13,
7295,
1330,
9455,
198,
6738,
1233,
26791,
13,
7753,
62,
22602,
1330,
3551,
62,
7753,
198,
6738,
4818,
8079,
1330,
3128,
198,
198,
43,
2149,
24290,
796,
37227,
2,
15069,
1391,
15,
92,
15743,
78,
21852,
11,
3457,
13,
198,
2,
198,
2,
770,
2393,
318,
2810,
284,
345,
739,
262,
24843,
13789,
11,
198,
2,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
407,
779,
428,
2393,
198,
2,
2845,
287,
11846,
351,
262,
13789,
13,
220,
921,
743,
7330,
198,
2,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
198,
2,
3788,
9387,
739,
262,
13789,
318,
9387,
319,
281,
198,
2,
366,
1921,
3180,
1,
29809,
1797,
11,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
198,
2,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
220,
4091,
262,
13789,
329,
262,
198,
2,
2176,
3303,
15030,
21627,
290,
11247,
198,
2,
739,
262,
13789,
13,
198,
15931,
1911,
18982,
7,
4475,
13,
40838,
22446,
1941,
8,
628,
628,
198,
4871,
3424,
62,
37348,
1095,
7,
21575,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3779,
504,
7560,
3275,
2438,
285,
39242,
13,
3060,
284,
262,
1382,
1429,
198,
220,
220,
220,
1262,
3712,
628,
220,
220,
220,
220,
220,
220,
220,
9058,
7,
28758,
62,
4871,
34758,
6,
27773,
62,
37348,
1095,
10354,
3424,
62,
37348,
1095,
30072,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
6764,
796,
366,
27773,
7560,
8435,
3275,
2438,
285,
39242,
1,
628,
220,
220,
220,
2836,
62,
25811,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
19203,
16520,
1883,
28,
3256,
6045,
11,
705,
16520,
1883,
11361,
2723,
2393,
11537,
198,
220,
220,
220,
2361,
628,
198,
4871,
1382,
62,
37348,
1095,
7,
21575,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2980,
689,
3275,
2438,
285,
39242,
13,
3060,
284,
262,
1382,
1429,
1262,
3712,
628,
220,
220,
220,
220,
220,
220,
220,
9058,
7,
28758,
62,
4871,
34758,
6,
11249,
62,
37348,
1095,
10354,
1382,
62,
37348,
1095,
30072,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
6764,
796,
366,
8612,
378,
8435,
3275,
2438,
285,
39242,
1,
628,
220,
220,
220,
2836,
62,
25811,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
19203,
10459,
28,
3256,
6045,
11,
705,
10459,
44189,
2393,
7268,
3275,
2438,
285,
39242,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
19203,
16520,
1883,
28,
3256,
6045,
11,
705,
16520,
1883,
11361,
2723,
2393,
11537,
198,
220,
220,
220,
2361,
628,
220,
220,
220,
1303,
16718,
287,
11046,
290,
15453,
198,
220,
220,
220,
4808,
40842,
62,
320,
3742,
796,
900,
3419,
198,
220,
220,
220,
4808,
37348,
1095,
796,
900,
3419,
198,
220,
220,
220,
4808,
6615,
538,
796,
28686,
13,
6615,
538,
198,
220,
220,
220,
4808,
521,
4714,
62,
9186,
62,
325,
79,
796,
46083,
90,
15,
92,
220,
220,
220,
45302,
18982,
28264,
6615,
538,
8,
628,
220,
220,
220,
4808,
15390,
8841,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
10148,
198,
220,
220,
220,
220,
220,
220,
220,
705,
2,
770,
318,
257,
7560,
2393,
13,
8410,
5626,
48483,
2637,
11,
198,
220,
220,
220,
220,
220,
220,
220,
705,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
37811,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
34184,
1187,
290,
285,
39242,
1022,
30385,
461,
8435,
12416,
290,
6218,
2637,
11,
198,
220,
220,
220,
220,
220,
220,
220,
705,
37811,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
10148,
198,
220,
220,
220,
2361,
628,
220,
220,
220,
825,
4808,
18982,
62,
29412,
17,
62,
273,
62,
18,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
9794,
262,
30524,
3696,
284,
779,
1336,
3108,
14933,
329,
11361,
513,
13,
87,
198,
220,
220,
220,
220,
220,
220,
220,
290,
13096,
262,
1138,
330,
28958,
284,
307,
2196,
556,
43758,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
279,
65,
62,
16624,
796,
900,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
944,
13,
10459,
11,
705,
81,
3256,
6940,
1586,
28,
16,
8,
355,
269,
21370,
7753,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9173,
796,
269,
21370,
13,
46862,
7,
40664,
7753,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
5752,
287,
9173,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
11,
4808,
11,
44876,
796,
5752,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
65,
62,
16624,
13,
2860,
10786,
380,
461,
62,
40842,
14,
90,
15,
92,
62,
40842,
17,
13,
9078,
4458,
18982,
7,
1676,
1462,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
329,
545,
287,
23243,
7,
40842,
62,
16624,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
320,
11,
705,
81,
3256,
6940,
1586,
28,
16,
8,
355,
279,
65,
7753,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10154,
796,
705,
6738,
2237,
1330,
1635,
59,
77,
6,
1343,
279,
65,
7753,
13,
961,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10154,
796,
302,
13,
7266,
7,
81,
6,
380,
461,
62,
40842,
17,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
6,
380,
461,
62,
40842,
13,
380,
461,
62,
40842,
17,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10154,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
6803,
329,
428,
3912,
287,
262,
1237,
420,
12,
27568,
2393,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1398,
371,
40842,
31694,
3855,
19309,
28264,
20500,
13,
12837,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
220,
220,
11593,
4164,
330,
31172,
834,
796,
4808,
5420,
1564,
13,
8645,
515,
19703,
4668,
12837,
6030,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
290,
10385,
340,
284,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2488,
2860,
62,
4164,
330,
31172,
28264,
5420,
1564,
13,
8645,
515,
19703,
4668,
12837,
6030,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1398,
371,
40842,
31694,
3855,
19309,
28264,
20500,
13,
12837,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10154,
796,
302,
13,
7266,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
6,
4871,
59,
82,
33747,
59,
50,
10,
19415,
19510,
59,
50,
10,
19415,
2599,
59,
82,
9,
59,
77,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
59,
82,
10,
834,
4164,
330,
31172,
834,
59,
82,
47932,
59,
82,
33747,
59,
50,
10,
19415,
82,
9,
59,
77,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
6,
31,
2860,
62,
4164,
330,
31172,
38016,
18,
19415,
77,
4871,
3467,
16,
38016,
17,
2599,
59,
77,
3256,
10154,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
320,
11,
705,
86,
3256,
6940,
1586,
28,
16,
8,
355,
279,
65,
7753,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
65,
7753,
13,
13564,
7,
3642,
658,
8,
198
] | 2.507229 | 1,660 |
from isochrones.starmodel import StarModel, BasicStarModel
from isochrones import get_ichrone
import numpy as np
mist = get_ichrone("mist")
props = dict(Teff=(5800, 100), logg=(4.5, 0.1), J=(3.58, 0.05), K=(3.22, 0.05), parallax=(100, 0.1))
props_phot = dict(J=(3.58, 0.05), K=(3.22, 0.05), parallax=(100, 0.1))
props_spec = dict(Teff=(5800, 100), logg=(4.5, 0.1), parallax=(100, 0.1))
| [
6738,
318,
5374,
9821,
13,
301,
1670,
375,
417,
1330,
2907,
17633,
11,
14392,
8248,
17633,
198,
6738,
318,
5374,
9821,
1330,
651,
62,
488,
33171,
198,
11748,
299,
32152,
355,
45941,
198,
198,
37980,
796,
651,
62,
488,
33171,
7203,
37980,
4943,
198,
198,
1676,
862,
796,
8633,
7,
6767,
487,
16193,
3365,
405,
11,
1802,
828,
2604,
70,
16193,
19,
13,
20,
11,
657,
13,
16,
828,
449,
16193,
18,
13,
3365,
11,
657,
13,
2713,
828,
509,
16193,
18,
13,
1828,
11,
657,
13,
2713,
828,
1582,
439,
897,
16193,
3064,
11,
657,
13,
16,
4008,
628,
198,
1676,
862,
62,
38611,
796,
8633,
7,
41,
16193,
18,
13,
3365,
11,
657,
13,
2713,
828,
509,
16193,
18,
13,
1828,
11,
657,
13,
2713,
828,
1582,
439,
897,
16193,
3064,
11,
657,
13,
16,
4008,
198,
1676,
862,
62,
16684,
796,
8633,
7,
6767,
487,
16193,
3365,
405,
11,
1802,
828,
2604,
70,
16193,
19,
13,
20,
11,
657,
13,
16,
828,
1582,
439,
897,
16193,
3064,
11,
657,
13,
16,
4008,
628,
628
] | 2.220339 | 177 |
import os, fnmatch
from functools import partial
from PyQt5.QtCore import QProcess
from pykeyboard import PyKeyboard
from bots.abstract_bot import AbstractBot
from bots.action import Action
from bots.utility import waitForWindowByTitle
from local_settings import VIDEO_DIR
| [
11748,
28686,
11,
24714,
15699,
198,
6738,
1257,
310,
10141,
1330,
13027,
198,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
1195,
18709,
198,
6738,
12972,
2539,
3526,
1330,
9485,
9218,
3526,
198,
198,
6738,
29641,
13,
397,
8709,
62,
13645,
1330,
27741,
20630,
198,
6738,
29641,
13,
2673,
1330,
7561,
198,
6738,
29641,
13,
315,
879,
1330,
4043,
1890,
27703,
3886,
19160,
198,
6738,
1957,
62,
33692,
1330,
35507,
62,
34720,
628
] | 3.631579 | 76 |
#############################################################
# rename or copy this file to config.py if you make changes #
#############################################################
# change this to your fully-qualified domain name to run a
# remote server. The default value of localhost will
# only allow connections from the same computer.
#jsonrpc_servername = "h3.umd.edu"
jsonrpc_servername = "localhost"
jsonrpc_port = 8001
http_port = 8000
serve_staticfiles = False
#use_redis = True
use_diskcache = True
diskcache_params = {"size_limit": int(4*2**30), "shards": 5}
use_msgpack = True
data_sources = [
{
"name": "ncnr",
"url": "https://www.ncnr.nist.gov/pub/",
"start_path": "ncnrdata",
"file_helper_url": "https://www.ncnr.nist.gov/ipeek/listftpfiles.php"
},
]
instruments = ["refl", "ospec", "sans"]
| [
29113,
14468,
7804,
4242,
2,
198,
2,
36265,
393,
4866,
428,
2393,
284,
4566,
13,
9078,
611,
345,
787,
2458,
1303,
198,
29113,
14468,
7804,
4242,
2,
198,
198,
2,
1487,
428,
284,
534,
3938,
12,
22557,
7386,
1438,
284,
1057,
257,
220,
198,
2,
6569,
4382,
13,
220,
383,
4277,
1988,
286,
1957,
4774,
481,
198,
2,
691,
1249,
8787,
422,
262,
976,
3644,
13,
198,
2,
17752,
81,
14751,
62,
2655,
933,
480,
796,
366,
71,
18,
13,
388,
67,
13,
15532,
1,
198,
17752,
81,
14751,
62,
2655,
933,
480,
796,
366,
36750,
1,
198,
17752,
81,
14751,
62,
634,
796,
807,
8298,
198,
4023,
62,
634,
796,
38055,
198,
2655,
303,
62,
12708,
16624,
796,
10352,
198,
2,
1904,
62,
445,
271,
796,
6407,
198,
1904,
62,
39531,
23870,
796,
6407,
198,
39531,
23870,
62,
37266,
796,
19779,
7857,
62,
32374,
1298,
493,
7,
19,
9,
17,
1174,
1270,
828,
366,
1477,
1371,
1298,
642,
92,
198,
1904,
62,
19662,
8002,
796,
6407,
198,
7890,
62,
82,
2203,
796,
685,
198,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
3672,
1298,
366,
10782,
48624,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
6371,
1298,
366,
5450,
1378,
2503,
13,
10782,
48624,
13,
77,
396,
13,
9567,
14,
12984,
14,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
9688,
62,
6978,
1298,
366,
10782,
77,
4372,
1045,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
7753,
62,
2978,
525,
62,
6371,
1298,
366,
5450,
1378,
2503,
13,
10782,
48624,
13,
77,
396,
13,
9567,
14,
3757,
988,
14,
4868,
701,
79,
16624,
13,
10121,
1,
198,
220,
220,
220,
8964,
198,
60,
198,
259,
2536,
2886,
796,
14631,
260,
2704,
1600,
366,
418,
43106,
1600,
366,
82,
504,
8973,
198
] | 2.819079 | 304 |
# emails.py
from django.template import loader
from django.core.mail import EmailMultiAlternatives
from django.conf import settings
mongodb_notification_email = NotificationEmail()
| [
2,
7237,
13,
9078,
198,
198,
6738,
42625,
14208,
13,
28243,
1330,
40213,
198,
6738,
42625,
14208,
13,
7295,
13,
4529,
1330,
9570,
29800,
23081,
2929,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
628,
198,
31059,
375,
65,
62,
1662,
2649,
62,
12888,
796,
42808,
15333,
3419,
198
] | 3.7 | 50 |
#
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations
from typing import *
import functools
from edb import errors
from edb.edgeql import qltypes
from edb.schema import objtypes as s_objtypes
from edb.schema import pointers as s_pointers
from edb.ir import ast as irast
from edb.ir import utils as irutils
from .. import context
if TYPE_CHECKING:
from edb.schema import constraints as s_constr
ONE = qltypes.Cardinality.ONE
MANY = qltypes.Cardinality.MANY
@functools.singledispatch
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
@_infer_cardinality.register
| [
2,
198,
2,
770,
2723,
2393,
318,
636,
286,
262,
13113,
11012,
1280,
2723,
1628,
13,
198,
2,
198,
2,
15069,
3648,
12,
25579,
6139,
25896,
3457,
13,
290,
262,
13113,
11012,
7035,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
2,
628,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
6738,
19720,
1330,
1635,
198,
198,
11748,
1257,
310,
10141,
198,
198,
6738,
1225,
65,
1330,
8563,
198,
198,
6738,
1225,
65,
13,
14907,
13976,
1330,
10662,
75,
19199,
198,
198,
6738,
1225,
65,
13,
15952,
2611,
1330,
26181,
19199,
355,
264,
62,
26801,
19199,
198,
6738,
1225,
65,
13,
15952,
2611,
1330,
32007,
355,
264,
62,
47809,
198,
198,
6738,
1225,
65,
13,
343,
1330,
6468,
355,
4173,
459,
198,
6738,
1225,
65,
13,
343,
1330,
3384,
4487,
355,
4173,
26791,
198,
198,
6738,
11485,
1330,
4732,
198,
198,
361,
41876,
62,
50084,
2751,
25,
198,
220,
220,
220,
422,
1225,
65,
13,
15952,
2611,
1330,
17778,
355,
264,
62,
1102,
2536,
628,
198,
11651,
796,
10662,
75,
19199,
13,
16962,
1292,
414,
13,
11651,
198,
10725,
56,
796,
10662,
75,
19199,
13,
16962,
1292,
414,
13,
10725,
56,
628,
628,
198,
198,
31,
12543,
310,
10141,
13,
12215,
992,
8802,
963,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
628,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628,
198,
31,
62,
259,
2232,
62,
9517,
1292,
414,
13,
30238,
628
] | 3.025316 | 632 |
"""added orientation column to pi model
Revision ID: 2711340c6d9d
Revises: 490d49497045
Create Date: 2015-09-25 09:43:33.202018
"""
# revision identifiers, used by Alembic.
revision = '2711340c6d9d'
down_revision = '490d49497045'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
| [
37811,
29373,
12852,
5721,
284,
31028,
2746,
198,
198,
18009,
1166,
4522,
25,
2681,
16616,
1821,
66,
21,
67,
24,
67,
198,
18009,
2696,
25,
45601,
67,
2920,
2920,
2154,
2231,
198,
16447,
7536,
25,
1853,
12,
2931,
12,
1495,
7769,
25,
3559,
25,
2091,
13,
1238,
7908,
198,
198,
37811,
198,
198,
2,
18440,
42814,
11,
973,
416,
9300,
2022,
291,
13,
198,
260,
10178,
796,
705,
1983,
16616,
1821,
66,
21,
67,
24,
67,
6,
198,
2902,
62,
260,
10178,
796,
705,
31503,
67,
2920,
2920,
2154,
2231,
6,
198,
1671,
3702,
62,
23912,
1424,
796,
6045,
198,
10378,
2412,
62,
261,
796,
6045,
198,
198,
6738,
31341,
2022,
291,
1330,
1034,
198,
11748,
44161,
282,
26599,
355,
473,
628,
198
] | 2.617886 | 123 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.