content
stringlengths 1
1.04M
| input_ids
sequencelengths 1
774k
| ratio_char_token
float64 0.38
22.9
| token_count
int64 1
774k
|
---|---|---|---|
# -*- coding: utf-8 -
#
# This file is part of dj-webmachine released under the MIT license.
# See the NOTICE for more information.
from django.template import loader, RequestContext
from django.utils.encoding import iri_to_uri
try:
from restkit import oauth2
except ImportError:
raise ImportError("restkit>=3.0.2 package is needed for auth.")
from webmachine.auth.oauth import OAuthServer, load_oauth_datastore
from webmachine.forms import OAuthAuthenticationForm
from webmachine.resource import Resource
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
42625,
12,
12384,
30243,
2716,
739,
262,
17168,
5964,
13,
198,
2,
4091,
262,
28536,
329,
517,
1321,
13,
198,
198,
6738,
42625,
14208,
13,
28243,
1330,
40213,
11,
19390,
21947,
198,
6738,
42625,
14208,
13,
26791,
13,
12685,
7656,
1330,
4173,
72,
62,
1462,
62,
9900,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
1334,
15813,
1330,
267,
18439,
17,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
5298,
17267,
12331,
7203,
2118,
15813,
29,
28,
18,
13,
15,
13,
17,
5301,
318,
2622,
329,
6284,
19570,
198,
198,
6738,
3992,
30243,
13,
18439,
13,
12162,
1071,
1330,
440,
30515,
10697,
11,
3440,
62,
12162,
1071,
62,
19608,
459,
382,
198,
6738,
3992,
30243,
13,
23914,
1330,
440,
30515,
47649,
3299,
8479,
198,
6738,
3992,
30243,
13,
31092,
1330,
20857,
628
] | 3.363636 | 154 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from commands.basecommand import BaseCommand
import re
| [
2,
15069,
357,
66,
8,
5413,
10501,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
198,
198,
6738,
9729,
13,
8692,
21812,
1330,
7308,
21575,
198,
11748,
302,
628,
628,
628,
628
] | 4.121212 | 33 |
# stdlib
import re
from typing import Union, no_type_check
# 3rd party
import click
import pytest
from _pytest.capture import CaptureResult
from coincidence.regressions import AdvancedDataRegressionFixture, AdvancedFileRegressionFixture
from coincidence.selectors import max_version, min_version, not_pypy, only_pypy
from consolekit.terminal_colours import strip_ansi
from consolekit.testing import CliRunner, Result
from domdf_python_tools.paths import PathPlus, in_directory
# this package
from formate import Reformatter, reformat_file
from formate.__main__ import main
from formate.config import load_toml
path_sub = re.compile(rf" .*/pytest-of-.*/pytest-\d+")
@no_type_check
@pytest.fixture()
@pytest.fixture()
@max_version("3.9.9", reason="Output differs on Python 3.10+")
@not_pypy("Output differs on PyPy")
@only_pypy("Output differs on PyPy")
@min_version("3.10", reason="Output differs on Python 3.10+")
@pytest.mark.skipif(click.__version__.split('.')[0] != '7', reason="Output differs on Click 8")
@pytest.mark.skipif(click.__version__.split('.')[0] == '7', reason="Output differs on Click 8")
| [
2,
14367,
8019,
198,
11748,
302,
198,
6738,
19720,
1330,
4479,
11,
645,
62,
4906,
62,
9122,
198,
198,
2,
513,
4372,
2151,
198,
11748,
3904,
198,
11748,
12972,
9288,
198,
6738,
4808,
9078,
9288,
13,
27144,
495,
1330,
31793,
23004,
198,
6738,
21083,
13,
2301,
601,
507,
1330,
13435,
6601,
8081,
2234,
37,
9602,
11,
13435,
8979,
8081,
2234,
37,
9602,
198,
6738,
21083,
13,
19738,
669,
1330,
3509,
62,
9641,
11,
949,
62,
9641,
11,
407,
62,
79,
4464,
88,
11,
691,
62,
79,
4464,
88,
198,
6738,
8624,
15813,
13,
23705,
282,
62,
4033,
4662,
1330,
10283,
62,
504,
72,
198,
6738,
8624,
15813,
13,
33407,
1330,
1012,
72,
49493,
11,
25414,
198,
6738,
2401,
7568,
62,
29412,
62,
31391,
13,
6978,
82,
1330,
10644,
17860,
11,
287,
62,
34945,
198,
198,
2,
428,
5301,
198,
6738,
1296,
378,
1330,
17893,
1436,
11,
4975,
265,
62,
7753,
198,
6738,
1296,
378,
13,
834,
12417,
834,
1330,
1388,
198,
6738,
1296,
378,
13,
11250,
1330,
3440,
62,
39532,
75,
198,
198,
6978,
62,
7266,
796,
302,
13,
5589,
576,
7,
41871,
1,
764,
16208,
9078,
9288,
12,
1659,
12,
15885,
14,
9078,
9288,
12,
59,
67,
10,
4943,
628,
198,
31,
3919,
62,
4906,
62,
9122,
628,
198,
31,
9078,
9288,
13,
69,
9602,
3419,
628,
198,
31,
9078,
9288,
13,
69,
9602,
3419,
628,
628,
628,
198,
198,
31,
9806,
62,
9641,
7203,
18,
13,
24,
13,
24,
1600,
1738,
2625,
26410,
24242,
319,
11361,
513,
13,
940,
10,
4943,
198,
31,
1662,
62,
79,
4464,
88,
7203,
26410,
24242,
319,
9485,
20519,
4943,
628,
198,
31,
8807,
62,
79,
4464,
88,
7203,
26410,
24242,
319,
9485,
20519,
4943,
628,
198,
31,
1084,
62,
9641,
7203,
18,
13,
940,
1600,
1738,
2625,
26410,
24242,
319,
11361,
513,
13,
940,
10,
4943,
628,
198,
31,
9078,
9288,
13,
4102,
13,
48267,
361,
7,
12976,
13,
834,
9641,
834,
13,
35312,
10786,
2637,
38381,
15,
60,
14512,
705,
22,
3256,
1738,
2625,
26410,
24242,
319,
6914,
807,
4943,
628,
198,
31,
9078,
9288,
13,
4102,
13,
48267,
361,
7,
12976,
13,
834,
9641,
834,
13,
35312,
10786,
2637,
38381,
15,
60,
6624,
705,
22,
3256,
1738,
2625,
26410,
24242,
319,
6914,
807,
4943,
198
] | 3.013333 | 375 |
import copy
import logging
import shutil
from math import exp
import numpy as np
from sklearn.preprocessing import StandardScaler, normalize
from sklearn.utils import shuffle
from tqdm import trange
from lib.bqueue import Bqueue
from lib.dnn import Dnn
from lib.helper import Helper
from lib.som import SOM
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("Model")
terminal_columns = shutil.get_terminal_size().columns // 2
| [
11748,
4866,
198,
11748,
18931,
198,
11748,
4423,
346,
198,
6738,
10688,
1330,
1033,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
13,
3866,
36948,
1330,
8997,
3351,
36213,
11,
3487,
1096,
198,
6738,
1341,
35720,
13,
26791,
1330,
36273,
198,
6738,
256,
80,
36020,
1330,
491,
858,
198,
6738,
9195,
13,
65,
36560,
1330,
347,
36560,
198,
6738,
9195,
13,
67,
20471,
1330,
360,
20471,
198,
6738,
9195,
13,
2978,
525,
1330,
5053,
525,
198,
6738,
9195,
13,
82,
296,
1330,
42121,
198,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
10778,
8,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7203,
17633,
4943,
198,
23705,
282,
62,
28665,
82,
796,
4423,
346,
13,
1136,
62,
23705,
282,
62,
7857,
22446,
28665,
82,
3373,
362,
628
] | 3.313433 | 134 |
from django.conf.urls.defaults import *
from views import home
urlpatterns = patterns('',
url(r'^$', home, name='home'),
url('fandjango/', include('fandjango.urls'))
)
| [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12286,
82,
1330,
1635,
198,
198,
6738,
5009,
1330,
1363,
198,
198,
6371,
33279,
82,
796,
7572,
10786,
3256,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
3,
3256,
1363,
11,
1438,
11639,
11195,
33809,
628,
220,
220,
220,
19016,
10786,
69,
392,
73,
14208,
14,
3256,
2291,
10786,
69,
392,
73,
14208,
13,
6371,
82,
6,
4008,
198,
8,
198
] | 2.521127 | 71 |
from quart import Quart, flask_patch
from app.main import main
from .extinsions import db
| [
6738,
28176,
1330,
48748,
11,
42903,
62,
17147,
198,
6738,
598,
13,
12417,
1330,
1388,
198,
6738,
764,
2302,
1040,
507,
1330,
20613,
628
] | 3.791667 | 24 |
import re
import signal
import sys
from threading import Thread
import pychess
from pychess.Players.PyChess import PyChess
from pychess.System import conf, fident
from pychess.Utils.book import getOpenings
from pychess.Utils.const import (
NORMALCHESS,
FEN_START,
BLACK,
FISCHERRANDOMCHESS,
CRAZYHOUSECHESS,
WILDCASTLESHUFFLECHESS,
LOSERSCHESS,
SUICIDECHESS,
ATOMICCHESS,
THREECHECKCHESS,
KINGOFTHEHILLCHESS,
ASEANCHESS,
MAKRUKCHESS,
CAMBODIANCHESS,
SITTUYINCHESS,
GIVEAWAYCHESS,
HORDECHESS,
RACINGKINGSCHESS,
PLACEMENTCHESS,
WHITE,
)
from pychess.Utils.lutils.Benchmark import benchmark
from pychess.Utils.lutils.perft import perft
from pychess.Utils.lutils.LBoard import LBoard
from pychess.Utils.lutils.ldata import MAXPLY
from pychess.Utils.lutils import lsearch, leval
from pychess.Utils.lutils.lmove import parseSAN, parseAny, toSAN, ParsingError
from pychess.Utils.lutils.lmovegen import genAllMoves, genCaptures, genCheckEvasions
from pychess.Utils.lutils.validator import validateMove
from pychess.System.Log import log
from pychess.Variants.horde import HORDESTART
from pychess.Variants.placement import PLACEMENTSTART
from pychess.Variants.asean import (
ASEANSTART,
MAKRUKSTART,
KAMBODIANSTART,
SITTUYINSTART,
)
if sys.platform != "win32":
import readline
readline.clear_history()
ASCII = sys.platform == "win32"
| [
11748,
302,
198,
11748,
6737,
198,
11748,
25064,
198,
6738,
4704,
278,
1330,
14122,
198,
198,
11748,
12972,
2395,
824,
198,
6738,
12972,
2395,
824,
13,
24860,
13,
20519,
7376,
824,
1330,
9485,
7376,
824,
198,
6738,
12972,
2395,
824,
13,
11964,
1330,
1013,
11,
277,
738,
198,
6738,
12972,
2395,
824,
13,
18274,
4487,
13,
2070,
1330,
651,
11505,
654,
198,
6738,
12972,
2395,
824,
13,
18274,
4487,
13,
9979,
1330,
357,
198,
220,
220,
220,
25273,
42126,
3398,
7597,
11,
198,
220,
220,
220,
376,
1677,
62,
2257,
7227,
11,
198,
220,
220,
220,
31963,
11,
198,
220,
220,
220,
376,
1797,
3398,
1137,
49,
6981,
2662,
3398,
7597,
11,
198,
220,
220,
220,
33416,
57,
56,
39,
20958,
25994,
7597,
11,
198,
220,
220,
220,
370,
4146,
9697,
11262,
28378,
39,
47588,
2538,
3398,
7597,
11,
198,
220,
220,
220,
406,
2640,
4877,
3398,
7597,
11,
198,
220,
220,
220,
13558,
2149,
2389,
25994,
7597,
11,
198,
220,
220,
220,
5161,
2662,
2149,
3398,
7597,
11,
198,
220,
220,
220,
2320,
2200,
25994,
25171,
3398,
7597,
11,
198,
220,
220,
220,
32957,
19238,
10970,
39,
8267,
3398,
7597,
11,
198,
220,
220,
220,
317,
5188,
1565,
3398,
7597,
11,
198,
220,
220,
220,
8779,
30758,
15039,
3398,
7597,
11,
198,
220,
220,
220,
32421,
33,
3727,
16868,
3398,
7597,
11,
198,
220,
220,
220,
311,
22470,
52,
56,
1268,
3398,
7597,
11,
198,
220,
220,
220,
402,
9306,
12298,
4792,
3398,
7597,
11,
198,
220,
220,
220,
367,
12532,
25994,
7597,
11,
198,
220,
220,
220,
371,
2246,
2751,
42,
20754,
3398,
7597,
11,
198,
220,
220,
220,
9297,
2246,
12529,
3398,
7597,
11,
198,
220,
220,
220,
44925,
11,
198,
8,
198,
6738,
12972,
2395,
824,
13,
18274,
4487,
13,
75,
26791,
13,
44199,
4102,
1330,
18335,
198,
6738,
12972,
2395,
824,
13,
18274,
4487,
13,
75,
26791,
13,
525,
701,
1330,
583,
701,
198,
6738,
12972,
2395,
824,
13,
18274,
4487,
13,
75,
26791,
13,
43,
29828,
1330,
22199,
11953,
198,
6738,
12972,
2395,
824,
13,
18274,
4487,
13,
75,
26791,
13,
335,
1045,
1330,
25882,
6489,
56,
198,
6738,
12972,
2395,
824,
13,
18274,
4487,
13,
75,
26791,
1330,
300,
12947,
11,
443,
2100,
198,
6738,
12972,
2395,
824,
13,
18274,
4487,
13,
75,
26791,
13,
75,
21084,
1330,
21136,
36753,
11,
21136,
7149,
11,
284,
36753,
11,
23042,
278,
12331,
198,
6738,
12972,
2395,
824,
13,
18274,
4487,
13,
75,
26791,
13,
75,
21084,
5235,
1330,
2429,
3237,
44,
5241,
11,
2429,
19209,
942,
11,
2429,
9787,
36,
11017,
507,
198,
6738,
12972,
2395,
824,
13,
18274,
4487,
13,
75,
26791,
13,
12102,
1352,
1330,
26571,
21774,
198,
6738,
12972,
2395,
824,
13,
11964,
13,
11187,
1330,
2604,
198,
6738,
12972,
2395,
824,
13,
23907,
1187,
13,
71,
17531,
1330,
367,
12532,
6465,
7227,
198,
6738,
12972,
2395,
824,
13,
23907,
1187,
13,
489,
5592,
1330,
9297,
2246,
12529,
2257,
7227,
198,
6738,
12972,
2395,
824,
13,
23907,
1187,
13,
589,
272,
1330,
357,
198,
220,
220,
220,
317,
5188,
1565,
2257,
7227,
11,
198,
220,
220,
220,
8779,
30758,
15039,
2257,
7227,
11,
198,
220,
220,
220,
509,
2390,
33,
3727,
16868,
2257,
7227,
11,
198,
220,
220,
220,
311,
22470,
52,
56,
38604,
7227,
11,
198,
8,
198,
198,
361,
25064,
13,
24254,
14512,
366,
5404,
2624,
1298,
198,
220,
220,
220,
1330,
1100,
1370,
628,
220,
220,
220,
1100,
1370,
13,
20063,
62,
23569,
3419,
198,
198,
42643,
3978,
796,
25064,
13,
24254,
6624,
366,
5404,
2624,
1,
628,
198
] | 2.432203 | 590 |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
628,
198
] | 2.083333 | 24 |
print(Class2.get_user("test"))
| [
4798,
7,
9487,
17,
13,
1136,
62,
7220,
7203,
9288,
48774,
628
] | 2.666667 | 12 |
# -*- coding: utf-8 -*-
import unittest
from cwr.parser.encoder.dictionary import IPIBaseDictionaryEncoder
"""
Acknowledgement to dictionary encoding tests.
The following cases are tested:
"""
__author__ = 'Bernardo Martínez Garrido'
__license__ = 'MIT'
__status__ = 'Development'
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
555,
715,
395,
198,
198,
6738,
269,
18351,
13,
48610,
13,
12685,
12342,
13,
67,
14188,
1330,
6101,
9865,
589,
35,
14188,
27195,
12342,
198,
198,
37811,
198,
39482,
16025,
284,
22155,
21004,
5254,
13,
198,
198,
464,
1708,
2663,
389,
6789,
25,
198,
37811,
198,
198,
834,
9800,
834,
796,
705,
23927,
13109,
3981,
8836,
710,
89,
46619,
17305,
6,
198,
834,
43085,
834,
796,
705,
36393,
6,
198,
834,
13376,
834,
796,
705,
41206,
6,
628
] | 3.053191 | 94 |
# Create example plots for README
import numpy as np
import matplotlib.pyplot as plt
import os.path
create_plot('asu-dark')
create_plot('asu-light')
| [
2,
13610,
1672,
21528,
329,
20832,
11682,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
28686,
13,
6978,
198,
198,
17953,
62,
29487,
10786,
27345,
12,
21953,
11537,
198,
17953,
62,
29487,
10786,
27345,
12,
2971,
11537,
628
] | 3.04 | 50 |
# Ultroid - UserBot
# Copyright (C) 2020 TeamUltroid
#
# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
# PLease read the GNU Affero General Public License in
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
"""
✘ Commands Available -
• `{i}grey <reply to any media>`
To make it black nd white.
• `{i}color <reply to any Black nd White media>`
To make it Colorfull.
• `{i}toon <reply to any media>`
To make it toon.
• `{i}danger <reply to any media>`
To make it look Danger.
• `{i}negative <reply to any media>`
To make negative image.
• `{i}blur <reply to any media>`
To make it blurry.
• `{i}quad <reply to any media>`
create a Vortex.
• `{i}mirror <reply to any media>`
To create mirror pic.
• `{i}flip <reply to any media>`
To make it flip.
• `{i}sketch <reply to any media>`
To draw its sketch.
• `{i}blue <reply to any media>`
just cool.
• `{i}csample <color name /color code>`
example : `{i}csample red`
`{i}csample #ffffff`
"""
import asyncio
import os
import cv2
import numpy as np
from PIL import Image
from telegraph import upload_file as upf
from telethon.errors.rpcerrorlist import (
ChatSendMediaForbiddenError,
MessageDeleteForbiddenError,
)
from validators.url import url
from . import *
@ultroid_cmd(
pattern="sketch$",
)
@ultroid_cmd(pattern="color$")
@ultroid_cmd(
pattern="grey$",
)
@ultroid_cmd(
pattern="blur$",
)
@ultroid_cmd(
pattern="negative$",
)
@ultroid_cmd(
pattern="mirror$",
)
@ultroid_cmd(
pattern="flip$",
)
@ultroid_cmd(
pattern="quad$",
)
@ultroid_cmd(
pattern="toon$",
)
@ultroid_cmd(
pattern="danger$",
)
@ultroid_cmd(pattern="csample (.*)")
@ultroid_cmd(
pattern="blue$",
)
HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
| [
2,
6172,
3882,
532,
11787,
20630,
198,
2,
15069,
357,
34,
8,
12131,
4816,
16301,
3882,
198,
2,
198,
2,
770,
2393,
318,
257,
636,
286,
1279,
3740,
1378,
12567,
13,
785,
14,
15592,
16301,
3882,
14,
16301,
3882,
14,
1875,
198,
2,
350,
3123,
589,
1100,
262,
22961,
6708,
3529,
3611,
5094,
13789,
287,
198,
2,
1279,
5450,
1378,
2503,
13,
12567,
13,
785,
14,
15592,
16301,
3882,
14,
16301,
3882,
14,
2436,
672,
14,
12417,
14,
43,
2149,
24290,
15913,
13,
198,
198,
37811,
198,
26486,
246,
49505,
14898,
532,
198,
198,
3581,
4600,
90,
72,
92,
49502,
1279,
47768,
284,
597,
2056,
29,
63,
198,
220,
220,
220,
1675,
787,
340,
2042,
299,
67,
2330,
13,
198,
198,
3581,
4600,
90,
72,
92,
8043,
1279,
47768,
284,
597,
2619,
299,
67,
2635,
2056,
29,
63,
198,
220,
220,
220,
1675,
787,
340,
5315,
12853,
13,
198,
198,
3581,
4600,
90,
72,
92,
1462,
261,
1279,
47768,
284,
597,
2056,
29,
63,
198,
220,
220,
220,
1675,
787,
340,
284,
261,
13,
198,
198,
3581,
4600,
90,
72,
92,
38537,
1279,
47768,
284,
597,
2056,
29,
63,
198,
220,
220,
220,
1675,
787,
340,
804,
20419,
13,
198,
198,
3581,
4600,
90,
72,
92,
31591,
1279,
47768,
284,
597,
2056,
29,
63,
198,
220,
220,
220,
1675,
787,
4633,
2939,
13,
198,
198,
3581,
4600,
90,
72,
92,
2436,
333,
1279,
47768,
284,
597,
2056,
29,
63,
198,
220,
220,
220,
1675,
787,
340,
44701,
13,
198,
198,
3581,
4600,
90,
72,
92,
47003,
1279,
47768,
284,
597,
2056,
29,
63,
198,
220,
220,
220,
2251,
257,
49790,
13,
198,
198,
3581,
4600,
90,
72,
92,
10793,
1472,
1279,
47768,
284,
597,
2056,
29,
63,
198,
220,
220,
220,
1675,
2251,
10162,
8301,
13,
198,
198,
3581,
4600,
90,
72,
92,
2704,
541,
1279,
47768,
284,
597,
2056,
29,
63,
198,
220,
220,
220,
1675,
787,
340,
14283,
13,
198,
198,
3581,
4600,
90,
72,
92,
82,
7126,
354,
1279,
47768,
284,
597,
2056,
29,
63,
198,
220,
220,
220,
1675,
3197,
663,
17548,
13,
198,
198,
3581,
4600,
90,
72,
92,
17585,
1279,
47768,
284,
597,
2056,
29,
63,
198,
220,
220,
220,
655,
3608,
13,
198,
198,
3581,
4600,
90,
72,
92,
6359,
1403,
1279,
8043,
1438,
1220,
8043,
2438,
29,
63,
198,
220,
220,
1672,
1058,
4600,
90,
72,
92,
6359,
1403,
2266,
63,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4600,
90,
72,
92,
6359,
1403,
1303,
12927,
487,
63,
198,
37811,
198,
198,
11748,
30351,
952,
198,
11748,
28686,
198,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
198,
6738,
573,
16606,
1330,
9516,
62,
7753,
355,
510,
69,
198,
6738,
5735,
400,
261,
13,
48277,
13,
81,
79,
2189,
1472,
4868,
1330,
357,
198,
220,
220,
220,
24101,
25206,
13152,
1890,
37978,
12331,
11,
198,
220,
220,
220,
16000,
38727,
1890,
37978,
12331,
11,
198,
8,
198,
6738,
4938,
2024,
13,
6371,
1330,
19016,
198,
198,
6738,
764,
1330,
1635,
628,
198,
31,
586,
3882,
62,
28758,
7,
198,
220,
220,
220,
3912,
2625,
82,
7126,
354,
3,
1600,
198,
8,
628,
198,
31,
586,
3882,
62,
28758,
7,
33279,
2625,
8043,
3,
4943,
628,
198,
31,
586,
3882,
62,
28758,
7,
198,
220,
220,
220,
3912,
2625,
49502,
3,
1600,
198,
8,
628,
198,
31,
586,
3882,
62,
28758,
7,
198,
220,
220,
220,
3912,
2625,
2436,
333,
3,
1600,
198,
8,
628,
198,
31,
586,
3882,
62,
28758,
7,
198,
220,
220,
220,
3912,
2625,
31591,
3,
1600,
198,
8,
628,
198,
31,
586,
3882,
62,
28758,
7,
198,
220,
220,
220,
3912,
2625,
10793,
1472,
3,
1600,
198,
8,
628,
198,
31,
586,
3882,
62,
28758,
7,
198,
220,
220,
220,
3912,
2625,
2704,
541,
3,
1600,
198,
8,
628,
198,
31,
586,
3882,
62,
28758,
7,
198,
220,
220,
220,
3912,
2625,
47003,
3,
1600,
198,
8,
628,
198,
31,
586,
3882,
62,
28758,
7,
198,
220,
220,
220,
3912,
2625,
1462,
261,
3,
1600,
198,
8,
628,
198,
31,
586,
3882,
62,
28758,
7,
198,
220,
220,
220,
3912,
2625,
38537,
3,
1600,
198,
8,
628,
198,
31,
586,
3882,
62,
28758,
7,
33279,
2625,
6359,
1403,
357,
15885,
8,
4943,
628,
198,
31,
586,
3882,
62,
28758,
7,
198,
220,
220,
220,
3912,
2625,
17585,
3,
1600,
198,
8,
628,
198,
39,
3698,
47,
13,
19119,
15090,
69,
1,
90,
834,
3672,
834,
13,
35312,
10786,
2637,
38381,
16,
48999,
1298,
277,
1,
90,
834,
15390,
834,
13,
18982,
7,
72,
28,
39,
8575,
35972,
38165,
20662,
8,
198
] | 2.407455 | 778 |
from clpy.math.misc import * # NOQA
| [
6738,
537,
9078,
13,
11018,
13,
44374,
1330,
1635,
220,
1303,
8005,
48,
32,
198
] | 2.466667 | 15 |
x1 = 2.0
x2 = 3.0
ReLu = lambda x: max(0.0, x)
ReLuDer = lambda x: 1 if x > 0 else 0
error_fn = lambda prediction, target: 0.5 * (target - prediction) ** 2
# input
a1 = x1
a2 = x2
w11 = 0.11
w12 = 0.21
w21 = 0.12
w22 = 0.08
w1o = 0.14
w2o = 0.15
y = 1
n = 0.5
# foward
# layer 1
zh1 = (w11 * a1) + (w12 * a2)
zh2 = (w21 * a1) + (w22 * a2)
#print(f"zh1 = {zh1}")
#print(f"zh2 = {zh2}")
h0 = 1
h1 = ReLu(zh1)
h2 = ReLu(zh2)
#print(f"h1 = {h1}")
#print(f"h2 = {h2}")
# layer 2
zo1 = (w1o * h1) + (w2o * h2)
o1 = ReLu(zo1)
error = error_fn(o1, y)
#print(f"zo1 = {zo1}")
print(f"o1 = {o1}")
print(f"error = {error}")
# Back
# Last layer
d_Etotal_d_out = (o1 - y)
#print(f"d_Etotal_d_out = {d_Etotal_d_out}")
d_out_d_zo1 = ReLuDer(o1)
#print(f"d_out_d_zo1 = {d_out_d_zo1}")
d_zo1_d_w1o = h1
#print(f"d_zo1_d_w1o = {d_zo1_d_w1o}")
d_zo1_d_w2o = h2
#print(f"d_zo1_d_w2o = {d_zo1_d_w2o}")
d_Etotal_d_w1o = d_Etotal_d_out * d_out_d_zo1 * d_zo1_d_w1o
#print(f"d_Etotal_d_w1o = {d_Etotal_d_w1o}")
d_Etotal_d_w2o = d_Etotal_d_out * d_out_d_zo1 * d_zo1_d_w2o
#print(f"d_Etotal_d_w1o = {d_Etotal_d_w2o}")
# Previous layer
d_w1o_d_h1 = w1o
d_h1_d_zh1 = 1
d_zh1_d_w11 = a1
d_Etotal_d_w11 = d_Etotal_d_w1o * d_w1o_d_h1 * d_h1_d_zh1 * d_zh1_d_w11
#print(f"d_Etotal_d_w11 = {d_Etotal_d_w11}")
d_w1o_d_h1 = w1o
d_h1_d_zh1 = 1
d_zh1_d_w12 = a2
d_Etotal_d_w12 = d_Etotal_d_w1o * d_w1o_d_h1 * d_h1_d_zh1 * d_zh1_d_w12
#print(f"d_Etotal_d_w11 = {d_Etotal_d_w12}")
d_w2o_d_h2 = w2o
d_h2_d_zh2 = 1
d_zh2_d_w21 = a1
d_Etotal_d_w21 = d_Etotal_d_w1o * d_w2o_d_h2 * d_h2_d_zh2 * d_zh2_d_w21
#print(f"d_Etotal_d_w21 = {d_Etotal_d_w21}")
d_w2o_d_h2 = w2o
d_h2_d_zh2 = 1
d_zh2_d_w22 = a2
d_Etotal_d_w22 = d_Etotal_d_w1o * d_w2o_d_h2 * d_h2_d_zh2 * d_zh2_d_w22
#print(f"d_Etotal_d_w22 = {d_Etotal_d_w22}")
w1o = w1o - n * d_Etotal_d_w1o
w2o = w1o - n * d_Etotal_d_w2o
w11 = w11 - n * d_Etotal_d_w11
w12 = w12 - n * d_Etotal_d_w12
w21 = w21 - n * d_Etotal_d_w21
w22 = w22 - n * d_Etotal_d_w22
| [
198,
87,
16,
796,
362,
13,
15,
198,
87,
17,
796,
513,
13,
15,
198,
198,
3041,
25596,
796,
37456,
2124,
25,
3509,
7,
15,
13,
15,
11,
2124,
8,
198,
3041,
25596,
28532,
796,
37456,
2124,
25,
352,
611,
2124,
1875,
657,
2073,
657,
198,
18224,
62,
22184,
796,
37456,
17724,
11,
2496,
25,
657,
13,
20,
1635,
357,
16793,
532,
17724,
8,
12429,
362,
198,
198,
2,
5128,
198,
64,
16,
796,
2124,
16,
198,
64,
17,
796,
2124,
17,
198,
198,
86,
1157,
796,
657,
13,
1157,
198,
86,
1065,
796,
657,
13,
2481,
198,
198,
86,
2481,
796,
657,
13,
1065,
198,
86,
1828,
796,
657,
13,
2919,
198,
198,
86,
16,
78,
796,
657,
13,
1415,
198,
86,
17,
78,
796,
657,
13,
1314,
198,
198,
88,
796,
352,
198,
77,
796,
657,
13,
20,
198,
198,
2,
277,
46138,
220,
198,
2,
7679,
352,
198,
23548,
16,
796,
357,
86,
1157,
1635,
257,
16,
8,
1343,
357,
86,
1065,
1635,
257,
17,
8,
198,
23548,
17,
796,
357,
86,
2481,
1635,
257,
16,
8,
1343,
357,
86,
1828,
1635,
257,
17,
8,
198,
2,
4798,
7,
69,
1,
23548,
16,
796,
1391,
23548,
16,
92,
4943,
198,
2,
4798,
7,
69,
1,
23548,
17,
796,
1391,
23548,
17,
92,
4943,
198,
198,
71,
15,
796,
352,
198,
71,
16,
796,
797,
25596,
7,
23548,
16,
8,
198,
71,
17,
796,
797,
25596,
7,
23548,
17,
8,
198,
2,
4798,
7,
69,
1,
71,
16,
796,
1391,
71,
16,
92,
4943,
198,
2,
4798,
7,
69,
1,
71,
17,
796,
1391,
71,
17,
92,
4943,
198,
198,
2,
7679,
362,
198,
10872,
16,
796,
357,
86,
16,
78,
1635,
289,
16,
8,
1343,
357,
86,
17,
78,
1635,
289,
17,
8,
198,
78,
16,
796,
797,
25596,
7,
10872,
16,
8,
198,
18224,
796,
4049,
62,
22184,
7,
78,
16,
11,
331,
8,
198,
198,
2,
4798,
7,
69,
1,
10872,
16,
796,
1391,
10872,
16,
92,
4943,
198,
4798,
7,
69,
1,
78,
16,
796,
1391,
78,
16,
92,
4943,
198,
4798,
7,
69,
1,
18224,
796,
1391,
18224,
92,
4943,
198,
198,
2,
5157,
198,
198,
2,
4586,
7679,
198,
67,
62,
36,
23350,
62,
67,
62,
448,
796,
357,
78,
16,
532,
331,
8,
198,
2,
4798,
7,
69,
1,
67,
62,
36,
23350,
62,
67,
62,
448,
796,
1391,
67,
62,
36,
23350,
62,
67,
62,
448,
92,
4943,
198,
198,
67,
62,
448,
62,
67,
62,
10872,
16,
796,
797,
25596,
28532,
7,
78,
16,
8,
198,
2,
4798,
7,
69,
1,
67,
62,
448,
62,
67,
62,
10872,
16,
796,
1391,
67,
62,
448,
62,
67,
62,
10872,
16,
92,
4943,
198,
198,
67,
62,
10872,
16,
62,
67,
62,
86,
16,
78,
796,
289,
16,
198,
2,
4798,
7,
69,
1,
67,
62,
10872,
16,
62,
67,
62,
86,
16,
78,
796,
1391,
67,
62,
10872,
16,
62,
67,
62,
86,
16,
78,
92,
4943,
198,
198,
67,
62,
10872,
16,
62,
67,
62,
86,
17,
78,
796,
289,
17,
198,
2,
4798,
7,
69,
1,
67,
62,
10872,
16,
62,
67,
62,
86,
17,
78,
796,
1391,
67,
62,
10872,
16,
62,
67,
62,
86,
17,
78,
92,
4943,
198,
198,
67,
62,
36,
23350,
62,
67,
62,
86,
16,
78,
796,
288,
62,
36,
23350,
62,
67,
62,
448,
1635,
288,
62,
448,
62,
67,
62,
10872,
16,
1635,
288,
62,
10872,
16,
62,
67,
62,
86,
16,
78,
198,
2,
4798,
7,
69,
1,
67,
62,
36,
23350,
62,
67,
62,
86,
16,
78,
796,
1391,
67,
62,
36,
23350,
62,
67,
62,
86,
16,
78,
92,
4943,
198,
198,
67,
62,
36,
23350,
62,
67,
62,
86,
17,
78,
796,
288,
62,
36,
23350,
62,
67,
62,
448,
1635,
288,
62,
448,
62,
67,
62,
10872,
16,
1635,
288,
62,
10872,
16,
62,
67,
62,
86,
17,
78,
198,
2,
4798,
7,
69,
1,
67,
62,
36,
23350,
62,
67,
62,
86,
16,
78,
796,
1391,
67,
62,
36,
23350,
62,
67,
62,
86,
17,
78,
92,
4943,
628,
198,
2,
21801,
7679,
198,
67,
62,
86,
16,
78,
62,
67,
62,
71,
16,
796,
266,
16,
78,
198,
67,
62,
71,
16,
62,
67,
62,
23548,
16,
796,
352,
198,
67,
62,
23548,
16,
62,
67,
62,
86,
1157,
796,
257,
16,
198,
198,
67,
62,
36,
23350,
62,
67,
62,
86,
1157,
796,
288,
62,
36,
23350,
62,
67,
62,
86,
16,
78,
1635,
288,
62,
86,
16,
78,
62,
67,
62,
71,
16,
1635,
288,
62,
71,
16,
62,
67,
62,
23548,
16,
1635,
288,
62,
23548,
16,
62,
67,
62,
86,
1157,
198,
2,
4798,
7,
69,
1,
67,
62,
36,
23350,
62,
67,
62,
86,
1157,
796,
1391,
67,
62,
36,
23350,
62,
67,
62,
86,
1157,
92,
4943,
198,
198,
67,
62,
86,
16,
78,
62,
67,
62,
71,
16,
796,
266,
16,
78,
198,
67,
62,
71,
16,
62,
67,
62,
23548,
16,
796,
352,
198,
67,
62,
23548,
16,
62,
67,
62,
86,
1065,
796,
257,
17,
198,
198,
67,
62,
36,
23350,
62,
67,
62,
86,
1065,
796,
288,
62,
36,
23350,
62,
67,
62,
86,
16,
78,
1635,
288,
62,
86,
16,
78,
62,
67,
62,
71,
16,
1635,
288,
62,
71,
16,
62,
67,
62,
23548,
16,
1635,
288,
62,
23548,
16,
62,
67,
62,
86,
1065,
198,
2,
4798,
7,
69,
1,
67,
62,
36,
23350,
62,
67,
62,
86,
1157,
796,
1391,
67,
62,
36,
23350,
62,
67,
62,
86,
1065,
92,
4943,
198,
198,
67,
62,
86,
17,
78,
62,
67,
62,
71,
17,
796,
266,
17,
78,
198,
67,
62,
71,
17,
62,
67,
62,
23548,
17,
796,
352,
198,
67,
62,
23548,
17,
62,
67,
62,
86,
2481,
796,
257,
16,
198,
198,
67,
62,
36,
23350,
62,
67,
62,
86,
2481,
796,
288,
62,
36,
23350,
62,
67,
62,
86,
16,
78,
1635,
288,
62,
86,
17,
78,
62,
67,
62,
71,
17,
1635,
288,
62,
71,
17,
62,
67,
62,
23548,
17,
1635,
288,
62,
23548,
17,
62,
67,
62,
86,
2481,
198,
2,
4798,
7,
69,
1,
67,
62,
36,
23350,
62,
67,
62,
86,
2481,
796,
1391,
67,
62,
36,
23350,
62,
67,
62,
86,
2481,
92,
4943,
198,
198,
67,
62,
86,
17,
78,
62,
67,
62,
71,
17,
796,
266,
17,
78,
198,
67,
62,
71,
17,
62,
67,
62,
23548,
17,
796,
352,
198,
67,
62,
23548,
17,
62,
67,
62,
86,
1828,
796,
257,
17,
198,
198,
67,
62,
36,
23350,
62,
67,
62,
86,
1828,
796,
288,
62,
36,
23350,
62,
67,
62,
86,
16,
78,
1635,
288,
62,
86,
17,
78,
62,
67,
62,
71,
17,
1635,
288,
62,
71,
17,
62,
67,
62,
23548,
17,
1635,
288,
62,
23548,
17,
62,
67,
62,
86,
1828,
198,
2,
4798,
7,
69,
1,
67,
62,
36,
23350,
62,
67,
62,
86,
1828,
796,
1391,
67,
62,
36,
23350,
62,
67,
62,
86,
1828,
92,
4943,
628,
198,
198,
86,
16,
78,
796,
266,
16,
78,
532,
299,
1635,
288,
62,
36,
23350,
62,
67,
62,
86,
16,
78,
198,
86,
17,
78,
796,
266,
16,
78,
532,
299,
1635,
288,
62,
36,
23350,
62,
67,
62,
86,
17,
78,
198,
198,
86,
1157,
796,
266,
1157,
532,
299,
1635,
288,
62,
36,
23350,
62,
67,
62,
86,
1157,
198,
86,
1065,
796,
266,
1065,
532,
299,
1635,
288,
62,
36,
23350,
62,
67,
62,
86,
1065,
198,
198,
86,
2481,
796,
266,
2481,
532,
299,
1635,
288,
62,
36,
23350,
62,
67,
62,
86,
2481,
198,
86,
1828,
796,
266,
1828,
532,
299,
1635,
288,
62,
36,
23350,
62,
67,
62,
86,
1828,
198
] | 1.53668 | 1,295 |
""" Representation class for CDB data
"""
import pickle
import numpy as np
from scipy.sparse import dok_matrix
#from gensim.matutils import unitvec
from medcat.utils.matutils import unitvec, sigmoid
from medcat.utils.attr_dict import AttrDict
from medcat.utils.loggers import basic_logger
import os
import pandas as pd
log = basic_logger("cdb")
class CDB(object):
""" Holds all the CDB data required for annotation
"""
MAX_COO_DICT_SIZE = int(os.getenv('MAX_COO_DICT_SIZE', 10000000))
MIN_COO_COUNT = int(os.getenv('MIN_COO_COUNT', 100))
def add_concept(self, cui, name, onto, tokens, snames, isupper=False,
is_pref_name=False, tui=None, pretty_name='',
desc=None, tokens_vocab=None, original_name=None,
is_unique=None, tui_name=None):
r'''
Add a concept to internal Concept Database (CDB). Depending on what you are providing
this will add a large number of properties for each concept.
Args:
cui (str):
Concept ID or unique identifer in this database, all concepts that have
the same CUI will be merged internally.
name (str):
Name for this concept, or the value that if found in free text can be linked to this concept.
onto (str):
Ontology from which the concept is taken (e.g. SNOMEDCT)
tokens (str, list of str):
Tokenized version of the name. Usually done vai spacy
snames (str, list of str):
Subnames of this name, have a look at medcat.prepare_cdb.PrepareCDB for details on how
to provide `snames`.Example: if name is "heart attack" snames is ['heart', 'heart attack']
isupper (boolean, optional):
If name in the original ontology is upper_cased
is_pref_name (boolean, optional):
If this is the prefered name for this CUI
tui (str, optional):
Semantic type identifier (have a look at TUIs in UMLS or SNOMED-CT)
pretty_name (str, optional):
Pretty name for this concept, really just the pretty name for the concept if it exists.
desc (str, optinal):
Description of this concept.
tokens_vocab (list of str, optional):
Tokens that should be added to the vocabulary, usually not normalized version of tokens.
original_name (str, optinal):
The orignal name from the source vocabulary, without any normalization.
is_unique (boolean, optional):
If set to False - you can require disambiguation for a name even if it is unique inside
of the current CDB. If set to True - you are forcing medcat to make a decision without
disambiguation even if it is required. Do not set this arg unless you are sure.
tui_name (str, optional):
The name for the TUI
'''
# Add the info property
if cui not in self.cui2info:
self.cui2info[cui] = {}
# Add is name upper
if name in self.name_isupper:
self.name_isupper[name] = self.name_isupper[name] or isupper
self.name_isupper[name] = self.name_isupper[name] or isupper
else:
self.name_isupper[name] = isupper
# Add original name
if original_name is not None:
self.name2original_name[name] = original_name
if original_name in self.original_name2cuis:
self.original_name2cuis[original_name].add(cui)
else:
self.original_name2cuis[original_name] = {cui}
if cui in self.cui2original_names:
self.cui2original_names[cui].add(original_name)
else:
self.cui2original_names[cui] = {original_name}
# Add prefered name
if is_pref_name:
self.cui2pref_name[cui] = name
if pretty_name:
self.cui2pretty_name[cui] = pretty_name
if cui not in self.cui2pretty_name and pretty_name:
self.cui2pretty_name[cui] = pretty_name
if tui is not None:
self.cui2tui[cui] = tui
if tui in self.tui2cuis:
self.tui2cuis[tui].add(cui)
else:
self.tui2cuis[tui] = set([cui])
if tui_name is not None:
self.tui2name[tui] = tui_name
if is_unique is not None:
self.name_isunique[name] = is_unique
# Add name to cnt
if name not in self.name2cnt:
self.name2cnt[name] = {}
if cui in self.name2cnt[name]:
self.name2cnt[name][cui] += 1
else:
self.name2cnt[name][cui] = 1
# Add description
if desc is not None:
if cui not in self.cui2desc:
self.cui2desc[cui] = str(desc)
elif str(desc) not in str(self.cui2desc[cui]):
self.cui2desc[cui] = str(self.cui2desc[cui]) + "\n\n" + str(desc)
# Add cui to a list of cuis
if cui not in self.index2cui:
self.index2cui.append(cui)
self.cui2index[cui] = len(self.index2cui) - 1
# Expand coo matrix if it is used
if self._coo_matrix is not None:
s = self._coo_matrix.shape[0] + 1
self._coo_matrix.resize((s, s))
# Add words to vocab
for token in tokens_vocab:
if token in self.vocab:
self.vocab[token] += 1
else:
self.vocab[token] = 1
# Add also the normalized tokens, why not
for token in tokens:
if token in self.vocab:
self.vocab[token] += 1
else:
self.vocab[token] = 1
# Add number of tokens for this name
if name in self.name2ntkns:
self.name2ntkns[name].add(len(tokens))
else:
self.name2ntkns[name] = {len(tokens)}
# Add mappings to onto2cuis
if onto not in self.onto2cuis:
self.onto2cuis[onto] = set([cui])
else:
self.onto2cuis[onto].add(cui)
if cui in self.cui2ontos:
self.cui2ontos[cui].add(onto)
else:
self.cui2ontos[cui] = {onto}
# Add mappings to name2cui
if name not in self.name2cui:
self.name2cui[name] = set([cui])
else:
self.name2cui[name].add(cui)
# Add snames to set
self.sname2name.update(snames)
# Add mappings to cui2names
if cui not in self.cui2names:
self.cui2names[cui] = {name}
else:
self.cui2names[cui].add(name)
# Add mappings to cui2words
if cui not in self.cui2words:
self.cui2words[cui] = {}
for token in tokens:
if not token.isdigit() and len(token) > 1:
if token in self.cui2words[cui]:
self.cui2words[cui][token] += 1
else:
self.cui2words[cui][token] = 1
def add_tui_names(self, csv_path, sep="|"):
""" Fils the tui2name dict
"""
df = pd.read_csv(csv_path, sep=sep)
for index, row in df.iterrows():
tui = row['tui']
name = row['name']
if tui not in self.tui2name:
self.tui2name[tui] = name
def add_context_vec(self, cui, context_vec, negative=False, cntx_type='LONG', inc_cui_count=True, anneal=True, lr=0.5):
""" Add the vector representation of a context for this CUI
cui: The concept in question
context_vec: Vector represenation of the context
negative: Is this negative context of positive
cntx_type: Currently only two supported LONG and SHORT
pretty much just based on the window size
inc_cui_count: should this be counted
"""
if cui not in self.cui_count:
self.increase_cui_count(cui, True)
# Ignore very similar context
prob = 0.95
# Set the right context
if cntx_type == 'MED':
cui2context_vec = self.cui2context_vec
elif cntx_type == 'SHORT':
cui2context_vec = self.cui2context_vec_short
elif cntx_type == 'LONG':
cui2context_vec = self.cui2context_vec_long
sim = 0
cv = context_vec
if cui in cui2context_vec:
sim = np.dot(unitvec(cv), unitvec(cui2context_vec[cui]))
if anneal:
lr = max(lr / self.cui_count[cui], 0.0005)
if negative:
b = max(0, sim) * lr
cui2context_vec[cui] = cui2context_vec[cui]*(1-b) - cv*b
#cui2context_vec[cui] = cui2context_vec[cui] - cv*b
else:
if sim < prob:
b = (1 - max(0, sim)) * lr
cui2context_vec[cui] = cui2context_vec[cui]*(1-b) + cv*b
#cui2context_vec[cui] = cui2context_vec[cui] + cv*b
# Increase cui count
self.increase_cui_count(cui, inc_cui_count)
else:
if negative:
cui2context_vec[cui] = -1 * cv
else:
cui2context_vec[cui] = cv
self.increase_cui_count(cui, inc_cui_count)
return sim
def add_coo(self, cui1, cui2):
""" Add one cooccurrence
cui1: Base CUI
cui2: Coocured with CUI
"""
key = (self.cui2index[cui1], self.cui2index[cui2])
if key in self.coo_dict:
self.coo_dict[key] += 1
else:
self.coo_dict[key] = 1
def add_coos(self, cuis):
""" Given a list of CUIs it will add them to the coo matrix
saying that each CUI cooccurred with each one
cuis: List of CUIs
"""
# We use done to ignore multiple occ of same concept
d_cui1 = set()
pairs = set()
for i, cui1 in enumerate(cuis):
if cui1 not in d_cui1:
for cui2 in cuis[i+1:]:
t = cui1+cui2
if t not in pairs:
self.add_coo(cui1, cui2)
pairs.add(t)
t = cui2+cui1
if t not in pairs:
self.add_coo(cui2, cui1)
pairs.add(t)
d_cui1.add(cui1)
if len(self.coo_dict) > self.MAX_COO_DICT_SIZE:
log.info("Starting the clean of COO_DICT, parameters are\n \
MAX_COO_DICT_SIZE: {}\n \
MIN_COO_COUNT: {}".format(self.MAX_COO_DICT_SIZE, self.MIN_COO_COUNT))
# Remove entries from coo_dict if too many
old_size = len(self.coo_dict)
to_del = []
for key in self.coo_dict.keys():
if self.coo_dict[key] < self.MIN_COO_COUNT:
to_del.append(key)
for key in to_del:
del self.coo_dict[key]
new_size = len(self.coo_dict)
log.info("COO_DICT cleaned, size was: {} and now is {}. In total \
{} items were removed".format(old_size, new_size, old_size-new_size))
@property
def coo_matrix(self):
""" Get the COO Matrix as scikit dok_matrix
"""
if self._coo_matrix is None:
s = len(self.cui2index)
self._coo_matrix = dok_matrix((s, s), dtype=np.uint32)
self._coo_matrix._update(self.coo_dict)
return self._coo_matrix
@coo_matrix.setter
def coo_matrix(self, val):
""" Imposible to set, it is built internally
"""
raise AttributeError("Can not set attribute coo_matrix")
def reset_coo_matrix(self):
""" Remove the COO-Matrix
"""
self.cui_count_ext = {}
self.coo_dict = {}
self._coo_matrix = None
@classmethod
def save_dict(self, path):
""" Saves variables of this object
"""
with open(path, 'wb') as f:
pickle.dump(self.__dict__, f)
def load_dict(self, path):
""" Loads variables of this object
"""
with open(path, 'rb') as f:
self.__dict__ = pickle.load(f)
def import_training(self, cdb, overwrite=True):
r'''
This will import vector embeddings from another CDB. No new concept swill be added.
IMPORTANT it will not import name maps (cui2name or name2cui or ...).
Args:
cdb (medcat.cdb.CDB):
Concept database from which to import training vectors
overwrite (boolean):
If True all training data in the existing CDB will be overwritten, else
the average between the two training vectors will be taken.
Examples:
>>> new_cdb.import_traininig(cdb=old_cdb, owerwrite=True)
'''
# Import vectors and counts
for cui in self.cui2names:
if cui in cdb.cui_count:
if overwrite or cui not in self.cui_count:
self.cui_count[cui] = cdb.cui_count[cui]
else:
self.cui_count[cui] = (self.cui_count[cui] + cdb.cui_count[cui]) / 2
if cui in cdb.cui2context_vec:
if overwrite or cui not in self.cui2context_vec:
self.cui2context_vec[cui] = cdb.cui2context_vec[cui]
else:
self.cui2context_vec[cui] = (cdb.cui2context_vec[cui] + self.cui2context_vec[cui]) / 2
if cui in cdb.cui2context_vec_short:
if overwrite or cui not in self.cui2context_vec_short:
self.cui2context_vec_short[cui] = cdb.cui2context_vec_short[cui]
else:
self.cui2context_vec_short[cui] = (cdb.cui2context_vec_short[cui] + self.cui2context_vec_short[cui]) / 2
if cui in cdb.cui2context_vec_long:
if overwrite or cui not in self.cui2context_vec_long:
self.cui2context_vec_long[cui] = cdb.cui2context_vec_long[cui]
else:
self.cui2context_vec_long[cui] = (cdb.cui2context_vec_long[cui] + self.cui2context_vec_long[cui]) / 2
if cui in cdb.cui_disamb_always:
self.cui_disamb_always[cui] = cdb.cui_disamb_always
def reset_cui_count(self, n=10):
r'''
Reset the CUI count for all concepts that received training, used when starting new unsupervised training
or for suppervised with annealing.
Args:
n (int, optional):
This will be set as the CUI count for all cuis in this CDB.
Examples:
>>> cdb.reset_cui_count()
'''
for cui in self.cui_count.keys():
self.cui_count[cui] = n
def reset_training(self):
r'''
Will remove all training efforts - in other words all embeddings that are learnt
for concepts in the current CDB. Please note that this does not remove synonyms (names) that were
potentially added during supervised/online learning.
'''
self.cui_count = {}
self.cui2context_vec = {}
self.cui2context_vec_short = {}
self.cui2context_vec_long = {}
self.coo_dict = {}
self.cui_disamb_always = {}
self.reset_coo_matrix()
self.reset_similarity_matrix()
def print_stats(self):
""" Print basic statistics on the database
"""
print("Number of concepts: {:,}".format(len(self.cui2names)))
print("Number of names: {:,}".format(len(self.name2cui)))
print("Number of concepts that received training: {:,}".format(len(self.cui2context_vec)))
print("Number of seen training examples in total: {:,}".format(sum(self.cui_count.values())))
print("Average training examples per concept: {:.1f}".format(np.average(list(self.cui_count.values()))))
def most_similar(self, cui, tui_filter=[], min_cnt=0, topn=50):
r'''
Given a concept it will calculat what other concepts in this CDB have the most similar
embedding.
Args:
cui (str):
The concept ID for the base concept for which you want to get the most similar concepts.
tui_filter (list):
A list of TUIs that will be used to filterout the returned results. Using this it is possible
to limit the similarity calculation to only disorders/symptoms/drugs/...
min_cnt (int):
Minimum training examples (unsupervised+supervised) that a concept must have to be considered
for the similarity calculation.
topn (int):
How many results to return
Return:
results (dict):
A dictionary with topn results like: {<cui>: {'name': <name>, 'sim': <similarity>, 'tui_name': <tui_name>,
'tui': <tui>, 'cnt': <number of training examples the concept has seen>}, ...}
'''
# Create the matrix if necessary
if not hasattr(self, 'sim_vectors') or self.sim_vectors is None or len(self.sim_vectors) < len(self.cui2context_vec):
print("Building similarity matrix")
log.info("Building similarity matrix")
sim_vectors = []
sim_vectors_counts = []
sim_vectors_tuis = []
sim_vectors_cuis = []
for _cui in self.cui2context_vec:
sim_vectors.append(unitvec(self.cui2context_vec[_cui]))
sim_vectors_counts.append(self.cui_count[_cui])
sim_vectors_tuis.append(self.cui2tui.get(_cui, 'unk'))
sim_vectors_cuis.append(_cui)
self.sim_vectors = np.array(sim_vectors)
self.sim_vectors_counts = np.array(sim_vectors_counts)
self.sim_vectors_tuis = np.array(sim_vectors_tuis)
self.sim_vectors_cuis = np.array(sim_vectors_cuis)
# Select appropirate concepts
tui_inds = np.arange(0, len(self.sim_vectors_tuis))
if len(tui_filter) > 0:
tui_inds = np.array([], dtype=np.int32)
for tui in tui_filter:
tui_inds = np.union1d(np.where(self.sim_vectors_tuis == tui)[0], tui_inds)
cnt_inds = np.arange(0, len(self.sim_vectors_counts))
if min_cnt > 0:
cnt_inds = np.where(self.sim_vectors_counts >= min_cnt)[0]
# Intersect cnt and tui
inds = np.intersect1d(tui_inds, cnt_inds)
mtrx = self.sim_vectors[inds]
cuis = self.sim_vectors_cuis[inds]
sims = np.dot(mtrx, unitvec(self.cui2context_vec[cui]))
sims_srt = np.argsort(-1*sims)
# Create the return dict
res = {}
for ind, _cui in enumerate(cuis[sims_srt[0:topn]]):
res[_cui] = {'name': self.cui2pretty_name[_cui], 'sim': sims[sims_srt][ind],
'tui_name': self.tui2name.get(self.cui2tui.get(_cui, 'unk'), 'unk'),
'tui': self.cui2tui.get(_cui, 'unk'),
'cnt': self.cui_count[_cui]}
return res
| [
37811,
10858,
341,
1398,
329,
6458,
33,
1366,
198,
37811,
198,
11748,
2298,
293,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
82,
29572,
1330,
466,
74,
62,
6759,
8609,
198,
2,
6738,
308,
641,
320,
13,
6759,
26791,
1330,
4326,
35138,
198,
6738,
1117,
9246,
13,
26791,
13,
6759,
26791,
1330,
4326,
35138,
11,
264,
17225,
1868,
198,
6738,
1117,
9246,
13,
26791,
13,
35226,
62,
11600,
1330,
3460,
81,
35,
713,
198,
6738,
1117,
9246,
13,
26791,
13,
6404,
5355,
1330,
4096,
62,
6404,
1362,
198,
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6404,
796,
4096,
62,
6404,
1362,
7203,
66,
9945,
4943,
198,
4871,
6458,
33,
7,
15252,
2599,
198,
220,
220,
220,
37227,
9340,
82,
477,
262,
6458,
33,
1366,
2672,
329,
23025,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
25882,
62,
34,
6684,
62,
35,
18379,
62,
33489,
796,
493,
7,
418,
13,
1136,
24330,
10786,
22921,
62,
34,
6684,
62,
35,
18379,
62,
33489,
3256,
1802,
20483,
4008,
198,
220,
220,
220,
20625,
62,
34,
6684,
62,
34,
28270,
796,
493,
7,
418,
13,
1136,
24330,
10786,
23678,
62,
34,
6684,
62,
34,
28270,
3256,
1802,
4008,
628,
198,
220,
220,
220,
825,
751,
62,
43169,
7,
944,
11,
269,
9019,
11,
1438,
11,
4291,
11,
16326,
11,
3013,
1047,
11,
318,
45828,
28,
25101,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
3866,
69,
62,
3672,
28,
25101,
11,
256,
9019,
28,
14202,
11,
2495,
62,
3672,
11639,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1715,
28,
14202,
11,
16326,
62,
18893,
397,
28,
14202,
11,
2656,
62,
3672,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
34642,
28,
14202,
11,
256,
9019,
62,
3672,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
374,
7061,
6,
198,
220,
220,
220,
220,
220,
220,
220,
3060,
257,
3721,
284,
5387,
26097,
24047,
357,
8610,
33,
737,
23591,
319,
644,
345,
389,
4955,
198,
220,
220,
220,
220,
220,
220,
220,
428,
481,
751,
257,
1588,
1271,
286,
6608,
329,
1123,
3721,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
9019,
357,
2536,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26097,
4522,
393,
3748,
1852,
7087,
287,
428,
6831,
11,
477,
10838,
326,
423,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
262,
976,
327,
10080,
481,
307,
23791,
20947,
13,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
357,
2536,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6530,
329,
428,
3721,
11,
393,
262,
1988,
326,
611,
1043,
287,
1479,
2420,
460,
307,
6692,
284,
428,
3721,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4291,
357,
2536,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9463,
1435,
422,
543,
262,
3721,
318,
2077,
357,
68,
13,
70,
13,
11346,
2662,
1961,
4177,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16326,
357,
2536,
11,
1351,
286,
965,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29130,
1143,
2196,
286,
262,
1438,
13,
19672,
1760,
410,
1872,
599,
1590,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3013,
1047,
357,
2536,
11,
1351,
286,
965,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3834,
14933,
286,
428,
1438,
11,
423,
257,
804,
379,
1117,
9246,
13,
46012,
533,
62,
66,
9945,
13,
37534,
533,
8610,
33,
329,
3307,
319,
703,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
2148,
4600,
82,
14933,
44646,
16281,
25,
611,
1438,
318,
366,
11499,
1368,
1,
3013,
1047,
318,
37250,
11499,
3256,
705,
11499,
1368,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
45828,
357,
2127,
21052,
11,
11902,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1002,
1438,
287,
262,
2656,
39585,
1435,
318,
6727,
62,
66,
839,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
3866,
69,
62,
3672,
357,
2127,
21052,
11,
11902,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1002,
428,
318,
262,
7694,
1068,
1438,
329,
428,
327,
10080,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9019,
357,
2536,
11,
11902,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12449,
5109,
2099,
27421,
357,
14150,
257,
804,
379,
309,
52,
3792,
287,
471,
5805,
50,
393,
11346,
2662,
1961,
12,
4177,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2495,
62,
3672,
357,
2536,
11,
11902,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
20090,
1438,
329,
428,
3721,
11,
1107,
655,
262,
2495,
1438,
329,
262,
3721,
611,
340,
7160,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1715,
357,
2536,
11,
2172,
1292,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12489,
286,
428,
3721,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16326,
62,
18893,
397,
357,
4868,
286,
965,
11,
11902,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47365,
326,
815,
307,
2087,
284,
262,
25818,
11,
3221,
407,
39279,
2196,
286,
16326,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2656,
62,
3672,
357,
2536,
11,
2172,
1292,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
393,
570,
282,
1438,
422,
262,
2723,
25818,
11,
1231,
597,
3487,
1634,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
34642,
357,
2127,
21052,
11,
11902,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1002,
900,
284,
10352,
532,
345,
460,
2421,
595,
4131,
328,
2288,
329,
257,
1438,
772,
611,
340,
318,
3748,
2641,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
286,
262,
1459,
6458,
33,
13,
1002,
900,
284,
6407,
532,
345,
389,
10833,
1117,
9246,
284,
787,
257,
2551,
1231,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
595,
4131,
328,
2288,
772,
611,
340,
318,
2672,
13,
2141,
407,
900,
428,
1822,
4556,
345,
389,
1654,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9019,
62,
3672,
357,
2536,
11,
11902,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
1438,
329,
262,
309,
10080,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
262,
7508,
3119,
198,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
407,
287,
2116,
13,
66,
9019,
17,
10951,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
10951,
58,
66,
9019,
60,
796,
23884,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
318,
1438,
6727,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1438,
287,
2116,
13,
3672,
62,
271,
45828,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
62,
271,
45828,
58,
3672,
60,
796,
2116,
13,
3672,
62,
271,
45828,
58,
3672,
60,
393,
318,
45828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
62,
271,
45828,
58,
3672,
60,
796,
2116,
13,
3672,
62,
271,
45828,
58,
3672,
60,
393,
318,
45828,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
62,
271,
45828,
58,
3672,
60,
796,
318,
45828,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
2656,
1438,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2656,
62,
3672,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
17,
14986,
62,
3672,
58,
3672,
60,
796,
2656,
62,
3672,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2656,
62,
3672,
287,
2116,
13,
14986,
62,
3672,
17,
27399,
271,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
14986,
62,
3672,
17,
27399,
271,
58,
14986,
62,
3672,
4083,
2860,
7,
66,
9019,
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,
2116,
13,
14986,
62,
3672,
17,
27399,
271,
58,
14986,
62,
3672,
60,
796,
1391,
66,
9019,
92,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
287,
2116,
13,
66,
9019,
17,
14986,
62,
14933,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
14986,
62,
14933,
58,
66,
9019,
4083,
2860,
7,
14986,
62,
3672,
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,
2116,
13,
66,
9019,
17,
14986,
62,
14933,
58,
66,
9019,
60,
796,
1391,
14986,
62,
3672,
92,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
7694,
1068,
1438,
220,
198,
220,
220,
220,
220,
220,
220,
220,
611,
318,
62,
3866,
69,
62,
3672,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
3866,
69,
62,
3672,
58,
66,
9019,
60,
796,
1438,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2495,
62,
3672,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
37784,
62,
3672,
58,
66,
9019,
60,
796,
2495,
62,
3672,
628,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
407,
287,
2116,
13,
66,
9019,
17,
37784,
62,
3672,
290,
2495,
62,
3672,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
37784,
62,
3672,
58,
66,
9019,
60,
796,
2495,
62,
3672,
628,
220,
220,
220,
220,
220,
220,
220,
611,
256,
9019,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
83,
9019,
58,
66,
9019,
60,
796,
256,
9019,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
256,
9019,
287,
2116,
13,
83,
9019,
17,
27399,
271,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
83,
9019,
17,
27399,
271,
58,
83,
9019,
4083,
2860,
7,
66,
9019,
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,
2116,
13,
83,
9019,
17,
27399,
271,
58,
83,
9019,
60,
796,
900,
26933,
66,
9019,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
256,
9019,
62,
3672,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
83,
9019,
17,
3672,
58,
83,
9019,
60,
796,
256,
9019,
62,
3672,
628,
220,
220,
220,
220,
220,
220,
220,
611,
318,
62,
34642,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
62,
271,
34642,
58,
3672,
60,
796,
318,
62,
34642,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
1438,
284,
269,
429,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1438,
407,
287,
2116,
13,
3672,
17,
66,
429,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
17,
66,
429,
58,
3672,
60,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
287,
2116,
13,
3672,
17,
66,
429,
58,
3672,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
17,
66,
429,
58,
3672,
7131,
66,
9019,
60,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
17,
66,
429,
58,
3672,
7131,
66,
9019,
60,
796,
352,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
6764,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1715,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
407,
287,
2116,
13,
66,
9019,
17,
20147,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
20147,
58,
66,
9019,
60,
796,
965,
7,
20147,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
965,
7,
20147,
8,
407,
287,
965,
7,
944,
13,
66,
9019,
17,
20147,
58,
66,
9019,
60,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
20147,
58,
66,
9019,
60,
796,
965,
7,
944,
13,
66,
9019,
17,
20147,
58,
66,
9019,
12962,
1343,
37082,
77,
59,
77,
1,
1343,
965,
7,
20147,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
269,
9019,
284,
257,
1351,
286,
18912,
271,
198,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
407,
287,
2116,
13,
9630,
17,
66,
9019,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
9630,
17,
66,
9019,
13,
33295,
7,
66,
9019,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
9630,
58,
66,
9019,
60,
796,
18896,
7,
944,
13,
9630,
17,
66,
9019,
8,
532,
352,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
49368,
763,
78,
17593,
611,
340,
318,
973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13557,
1073,
78,
62,
6759,
8609,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
796,
2116,
13557,
1073,
78,
62,
6759,
8609,
13,
43358,
58,
15,
60,
1343,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
1073,
78,
62,
6759,
8609,
13,
411,
1096,
19510,
82,
11,
264,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
2456,
284,
12776,
397,
198,
220,
220,
220,
220,
220,
220,
220,
329,
11241,
287,
16326,
62,
18893,
397,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
11241,
287,
2116,
13,
18893,
397,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
18893,
397,
58,
30001,
60,
15853,
352,
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,
2116,
13,
18893,
397,
58,
30001,
60,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
635,
262,
39279,
16326,
11,
1521,
407,
198,
220,
220,
220,
220,
220,
220,
220,
329,
11241,
287,
16326,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
11241,
287,
2116,
13,
18893,
397,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
18893,
397,
58,
30001,
60,
15853,
352,
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,
2116,
13,
18893,
397,
58,
30001,
60,
796,
352,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
1271,
286,
16326,
329,
428,
1438,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1438,
287,
2116,
13,
3672,
17,
429,
74,
5907,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
17,
429,
74,
5907,
58,
3672,
4083,
2860,
7,
11925,
7,
83,
482,
641,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
17,
429,
74,
5907,
58,
3672,
60,
796,
1391,
11925,
7,
83,
482,
641,
38165,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
285,
39242,
284,
4291,
17,
27399,
271,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4291,
407,
287,
2116,
13,
5957,
17,
27399,
271,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5957,
17,
27399,
271,
58,
5957,
60,
796,
900,
26933,
66,
9019,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5957,
17,
27399,
271,
58,
5957,
4083,
2860,
7,
66,
9019,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
287,
2116,
13,
66,
9019,
17,
756,
418,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
756,
418,
58,
66,
9019,
4083,
2860,
7,
5957,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
756,
418,
58,
66,
9019,
60,
796,
1391,
5957,
92,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
285,
39242,
284,
1438,
17,
66,
9019,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1438,
407,
287,
2116,
13,
3672,
17,
66,
9019,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
17,
66,
9019,
58,
3672,
60,
796,
900,
26933,
66,
9019,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3672,
17,
66,
9019,
58,
3672,
4083,
2860,
7,
66,
9019,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
3013,
1047,
284,
900,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
82,
3672,
17,
3672,
13,
19119,
7,
82,
14933,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
285,
39242,
284,
269,
9019,
17,
14933,
198,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
407,
287,
2116,
13,
66,
9019,
17,
14933,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
14933,
58,
66,
9019,
60,
796,
1391,
3672,
92,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
14933,
58,
66,
9019,
4083,
2860,
7,
3672,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
285,
39242,
284,
269,
9019,
17,
10879,
198,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
407,
287,
2116,
13,
66,
9019,
17,
10879,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
10879,
58,
66,
9019,
60,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
329,
11241,
287,
16326,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
11241,
13,
9409,
328,
270,
3419,
290,
18896,
7,
30001,
8,
1875,
352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
11241,
287,
2116,
13,
66,
9019,
17,
10879,
58,
66,
9019,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
10879,
58,
66,
9019,
7131,
30001,
60,
15853,
352,
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,
2116,
13,
66,
9019,
17,
10879,
58,
66,
9019,
7131,
30001,
60,
796,
352,
628,
198,
220,
220,
220,
825,
751,
62,
83,
9019,
62,
14933,
7,
944,
11,
269,
21370,
62,
6978,
11,
41767,
2625,
91,
1,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
376,
4487,
262,
256,
9019,
17,
3672,
8633,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
47764,
796,
279,
67,
13,
961,
62,
40664,
7,
40664,
62,
6978,
11,
41767,
28,
325,
79,
8,
628,
220,
220,
220,
220,
220,
220,
220,
329,
6376,
11,
5752,
287,
47764,
13,
2676,
8516,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9019,
796,
5752,
17816,
83,
9019,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
796,
5752,
17816,
3672,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
256,
9019,
407,
287,
2116,
13,
83,
9019,
17,
3672,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
83,
9019,
17,
3672,
58,
83,
9019,
60,
796,
1438,
628,
198,
220,
220,
220,
825,
751,
62,
22866,
62,
35138,
7,
944,
11,
269,
9019,
11,
4732,
62,
35138,
11,
4633,
28,
25101,
11,
269,
429,
87,
62,
4906,
11639,
43,
18494,
3256,
753,
62,
66,
9019,
62,
9127,
28,
17821,
11,
281,
710,
282,
28,
17821,
11,
300,
81,
28,
15,
13,
20,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3060,
262,
15879,
10552,
286,
257,
4732,
329,
428,
327,
10080,
628,
220,
220,
220,
220,
220,
220,
220,
269,
9019,
25,
220,
383,
3721,
287,
1808,
198,
220,
220,
220,
220,
220,
220,
220,
4732,
62,
35138,
25,
220,
20650,
1128,
411,
268,
341,
286,
262,
4732,
198,
220,
220,
220,
220,
220,
220,
220,
4633,
25,
220,
1148,
428,
4633,
4732,
286,
3967,
198,
220,
220,
220,
220,
220,
220,
220,
269,
429,
87,
62,
4906,
25,
220,
16888,
691,
734,
4855,
44533,
290,
6006,
9863,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2495,
881,
655,
1912,
319,
262,
4324,
2546,
198,
220,
220,
220,
220,
220,
220,
220,
753,
62,
66,
9019,
62,
9127,
25,
220,
815,
428,
307,
14789,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
407,
287,
2116,
13,
66,
9019,
62,
9127,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
24988,
589,
62,
66,
9019,
62,
9127,
7,
66,
9019,
11,
6407,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
41032,
845,
2092,
4732,
198,
220,
220,
220,
220,
220,
220,
220,
1861,
796,
657,
13,
3865,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
5345,
262,
826,
4732,
198,
220,
220,
220,
220,
220,
220,
220,
611,
269,
429,
87,
62,
4906,
6624,
705,
30733,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
9019,
17,
22866,
62,
35138,
796,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
269,
429,
87,
62,
4906,
6624,
705,
9693,
9863,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
9019,
17,
22866,
62,
35138,
796,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
19509,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
269,
429,
87,
62,
4906,
6624,
705,
43,
18494,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
9019,
17,
22866,
62,
35138,
796,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
6511,
628,
220,
220,
220,
220,
220,
220,
220,
985,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
269,
85,
796,
4732,
62,
35138,
198,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
287,
269,
9019,
17,
22866,
62,
35138,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
985,
796,
45941,
13,
26518,
7,
20850,
35138,
7,
33967,
828,
4326,
35138,
7,
66,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
281,
710,
282,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
81,
796,
3509,
7,
14050,
1220,
2116,
13,
66,
9019,
62,
9127,
58,
66,
9019,
4357,
657,
13,
830,
20,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
4633,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
796,
3509,
7,
15,
11,
985,
8,
1635,
300,
81,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
796,
269,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
9,
7,
16,
12,
65,
8,
532,
269,
85,
9,
65,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
66,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
796,
269,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
532,
269,
85,
9,
65,
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,
611,
985,
1279,
1861,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
796,
357,
16,
532,
3509,
7,
15,
11,
985,
4008,
1635,
300,
81,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
796,
269,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
9,
7,
16,
12,
65,
8,
1343,
269,
85,
9,
65,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
66,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
796,
269,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
1343,
269,
85,
9,
65,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
25285,
269,
9019,
954,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
24988,
589,
62,
66,
9019,
62,
9127,
7,
66,
9019,
11,
753,
62,
66,
9019,
62,
9127,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
4633,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
796,
532,
16,
1635,
269,
85,
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,
269,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
796,
269,
85,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
24988,
589,
62,
66,
9019,
62,
9127,
7,
66,
9019,
11,
753,
62,
66,
9019,
62,
9127,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
985,
628,
628,
220,
220,
220,
825,
751,
62,
1073,
78,
7,
944,
11,
269,
9019,
16,
11,
269,
9019,
17,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3060,
530,
763,
13966,
33928,
628,
220,
220,
220,
220,
220,
220,
220,
269,
9019,
16,
25,
220,
7308,
327,
10080,
198,
220,
220,
220,
220,
220,
220,
220,
269,
9019,
17,
25,
220,
1766,
420,
1522,
351,
327,
10080,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1994,
796,
357,
944,
13,
66,
9019,
17,
9630,
58,
66,
9019,
16,
4357,
2116,
13,
66,
9019,
17,
9630,
58,
66,
9019,
17,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
611,
1994,
287,
2116,
13,
1073,
78,
62,
11600,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1073,
78,
62,
11600,
58,
2539,
60,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1073,
78,
62,
11600,
58,
2539,
60,
796,
352,
628,
198,
220,
220,
220,
825,
751,
62,
1073,
418,
7,
944,
11,
18912,
271,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
11259,
257,
1351,
286,
29369,
3792,
340,
481,
751,
606,
284,
262,
763,
78,
17593,
198,
220,
220,
220,
220,
220,
220,
220,
2282,
326,
1123,
327,
10080,
763,
13966,
12808,
351,
1123,
530,
628,
220,
220,
220,
220,
220,
220,
220,
18912,
271,
25,
220,
7343,
286,
29369,
3792,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
775,
779,
1760,
284,
8856,
3294,
1609,
286,
976,
3721,
198,
220,
220,
220,
220,
220,
220,
220,
288,
62,
66,
9019,
16,
796,
900,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
14729,
796,
900,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
11,
269,
9019,
16,
287,
27056,
378,
7,
27399,
271,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
16,
407,
287,
288,
62,
66,
9019,
16,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
269,
9019,
17,
287,
18912,
271,
58,
72,
10,
16,
25,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
796,
269,
9019,
16,
10,
66,
9019,
17,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
256,
407,
287,
14729,
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,
2116,
13,
2860,
62,
1073,
78,
7,
66,
9019,
16,
11,
269,
9019,
17,
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,
14729,
13,
2860,
7,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
796,
269,
9019,
17,
10,
66,
9019,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
256,
407,
287,
14729,
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,
2116,
13,
2860,
62,
1073,
78,
7,
66,
9019,
17,
11,
269,
9019,
16,
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,
14729,
13,
2860,
7,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
62,
66,
9019,
16,
13,
2860,
7,
66,
9019,
16,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
18896,
7,
944,
13,
1073,
78,
62,
11600,
8,
1875,
2116,
13,
22921,
62,
34,
6684,
62,
35,
18379,
62,
33489,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
22851,
262,
3424,
286,
327,
6684,
62,
35,
18379,
11,
10007,
389,
59,
77,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25882,
62,
34,
6684,
62,
35,
18379,
62,
33489,
25,
23884,
59,
77,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
20625,
62,
34,
6684,
62,
34,
28270,
25,
23884,
1911,
18982,
7,
944,
13,
22921,
62,
34,
6684,
62,
35,
18379,
62,
33489,
11,
2116,
13,
23678,
62,
34,
6684,
62,
34,
28270,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
17220,
12784,
422,
763,
78,
62,
11600,
611,
1165,
867,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1468,
62,
7857,
796,
18896,
7,
944,
13,
1073,
78,
62,
11600,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
62,
12381,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1994,
287,
2116,
13,
1073,
78,
62,
11600,
13,
13083,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
1073,
78,
62,
11600,
58,
2539,
60,
1279,
2116,
13,
23678,
62,
34,
6684,
62,
34,
28270,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
62,
12381,
13,
33295,
7,
2539,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1994,
287,
284,
62,
12381,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1619,
2116,
13,
1073,
78,
62,
11600,
58,
2539,
60,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
649,
62,
7857,
796,
18896,
7,
944,
13,
1073,
78,
62,
11600,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
34,
6684,
62,
35,
18379,
20750,
11,
2546,
373,
25,
23884,
290,
783,
318,
23884,
13,
554,
2472,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23884,
3709,
547,
4615,
1911,
18982,
7,
727,
62,
7857,
11,
649,
62,
7857,
11,
1468,
62,
7857,
12,
3605,
62,
7857,
4008,
628,
198,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
763,
78,
62,
6759,
8609,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3497,
262,
327,
6684,
24936,
355,
629,
1134,
270,
466,
74,
62,
6759,
8609,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13557,
1073,
78,
62,
6759,
8609,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
796,
18896,
7,
944,
13,
66,
9019,
17,
9630,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
1073,
78,
62,
6759,
8609,
796,
466,
74,
62,
6759,
8609,
19510,
82,
11,
264,
828,
288,
4906,
28,
37659,
13,
28611,
2624,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
1073,
78,
62,
6759,
8609,
13557,
19119,
7,
944,
13,
1073,
78,
62,
11600,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
1073,
78,
62,
6759,
8609,
628,
198,
220,
220,
220,
2488,
1073,
78,
62,
6759,
8609,
13,
2617,
353,
198,
220,
220,
220,
825,
763,
78,
62,
6759,
8609,
7,
944,
11,
1188,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
1846,
1930,
856,
284,
900,
11,
340,
318,
3170,
20947,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
3460,
4163,
12331,
7203,
6090,
407,
900,
11688,
763,
78,
62,
6759,
8609,
4943,
628,
198,
220,
220,
220,
825,
13259,
62,
1073,
78,
62,
6759,
8609,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
17220,
262,
327,
6684,
12,
46912,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
62,
9127,
62,
2302,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1073,
78,
62,
11600,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
1073,
78,
62,
6759,
8609,
796,
6045,
628,
628,
220,
220,
220,
2488,
4871,
24396,
628,
198,
220,
220,
220,
825,
3613,
62,
11600,
7,
944,
11,
3108,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
311,
3080,
9633,
286,
428,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
6978,
11,
705,
39346,
11537,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2298,
293,
13,
39455,
7,
944,
13,
834,
11600,
834,
11,
277,
8,
628,
198,
220,
220,
220,
825,
3440,
62,
11600,
7,
944,
11,
3108,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
8778,
82,
9633,
286,
428,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
6978,
11,
705,
26145,
11537,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
834,
11600,
834,
796,
2298,
293,
13,
2220,
7,
69,
8,
628,
198,
220,
220,
220,
825,
1330,
62,
34409,
7,
944,
11,
269,
9945,
11,
49312,
28,
17821,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
374,
7061,
6,
198,
220,
220,
220,
220,
220,
220,
220,
770,
481,
1330,
15879,
11525,
67,
654,
422,
1194,
6458,
33,
13,
1400,
649,
3721,
1509,
359,
307,
2087,
13,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
8643,
340,
481,
407,
1330,
1438,
8739,
357,
66,
9019,
17,
3672,
393,
1438,
17,
66,
9019,
393,
2644,
737,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
9945,
357,
1150,
9246,
13,
66,
9945,
13,
8610,
33,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26097,
6831,
422,
543,
284,
1330,
3047,
30104,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49312,
357,
2127,
21052,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1002,
6407,
477,
3047,
1366,
287,
262,
4683,
6458,
33,
481,
307,
6993,
9108,
11,
2073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
262,
2811,
1022,
262,
734,
3047,
30104,
481,
307,
2077,
13,
628,
220,
220,
220,
220,
220,
220,
220,
21066,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13163,
649,
62,
66,
9945,
13,
11748,
62,
27432,
259,
328,
7,
66,
9945,
28,
727,
62,
66,
9945,
11,
12334,
263,
13564,
28,
17821,
8,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
17267,
30104,
290,
9853,
198,
220,
220,
220,
220,
220,
220,
220,
329,
269,
9019,
287,
2116,
13,
66,
9019,
17,
14933,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
287,
269,
9945,
13,
66,
9019,
62,
9127,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
49312,
393,
269,
9019,
407,
287,
2116,
13,
66,
9019,
62,
9127,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
62,
9127,
58,
66,
9019,
60,
796,
269,
9945,
13,
66,
9019,
62,
9127,
58,
66,
9019,
60,
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,
2116,
13,
66,
9019,
62,
9127,
58,
66,
9019,
60,
796,
357,
944,
13,
66,
9019,
62,
9127,
58,
66,
9019,
60,
1343,
269,
9945,
13,
66,
9019,
62,
9127,
58,
66,
9019,
12962,
1220,
362,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
287,
269,
9945,
13,
66,
9019,
17,
22866,
62,
35138,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
49312,
393,
269,
9019,
407,
287,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
796,
269,
9945,
13,
66,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
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,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
796,
357,
66,
9945,
13,
66,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
1343,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
12962,
1220,
362,
628,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
287,
269,
9945,
13,
66,
9019,
17,
22866,
62,
35138,
62,
19509,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
49312,
393,
269,
9019,
407,
287,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
19509,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
19509,
58,
66,
9019,
60,
796,
269,
9945,
13,
66,
9019,
17,
22866,
62,
35138,
62,
19509,
58,
66,
9019,
60,
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,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
19509,
58,
66,
9019,
60,
796,
357,
66,
9945,
13,
66,
9019,
17,
22866,
62,
35138,
62,
19509,
58,
66,
9019,
60,
1343,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
19509,
58,
66,
9019,
12962,
1220,
362,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
287,
269,
9945,
13,
66,
9019,
17,
22866,
62,
35138,
62,
6511,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
49312,
393,
269,
9019,
407,
287,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
6511,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
6511,
58,
66,
9019,
60,
796,
269,
9945,
13,
66,
9019,
17,
22866,
62,
35138,
62,
6511,
58,
66,
9019,
60,
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,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
6511,
58,
66,
9019,
60,
796,
357,
66,
9945,
13,
66,
9019,
17,
22866,
62,
35138,
62,
6511,
58,
66,
9019,
60,
1343,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
6511,
58,
66,
9019,
12962,
1220,
362,
220,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
269,
9019,
287,
269,
9945,
13,
66,
9019,
62,
6381,
4131,
62,
33770,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
62,
6381,
4131,
62,
33770,
58,
66,
9019,
60,
796,
269,
9945,
13,
66,
9019,
62,
6381,
4131,
62,
33770,
628,
198,
220,
220,
220,
825,
13259,
62,
66,
9019,
62,
9127,
7,
944,
11,
299,
28,
940,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
374,
7061,
6,
198,
220,
220,
220,
220,
220,
220,
220,
30027,
262,
327,
10080,
954,
329,
477,
10838,
326,
2722,
3047,
11,
973,
618,
3599,
649,
555,
16668,
16149,
3047,
198,
220,
220,
220,
220,
220,
220,
220,
393,
329,
802,
712,
1417,
351,
281,
710,
4272,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
357,
600,
11,
11902,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
770,
481,
307,
900,
355,
262,
327,
10080,
954,
329,
477,
18912,
271,
287,
428,
6458,
33,
13,
628,
220,
220,
220,
220,
220,
220,
220,
21066,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13163,
269,
9945,
13,
42503,
62,
66,
9019,
62,
9127,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
329,
269,
9019,
287,
2116,
13,
66,
9019,
62,
9127,
13,
13083,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
62,
9127,
58,
66,
9019,
60,
796,
299,
628,
198,
220,
220,
220,
825,
13259,
62,
34409,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
374,
7061,
6,
198,
220,
220,
220,
220,
220,
220,
220,
2561,
4781,
477,
3047,
4040,
532,
287,
584,
2456,
477,
11525,
67,
654,
326,
389,
26338,
198,
220,
220,
220,
220,
220,
220,
220,
329,
10838,
287,
262,
1459,
6458,
33,
13,
4222,
3465,
326,
428,
857,
407,
4781,
6171,
43612,
357,
14933,
8,
326,
547,
198,
220,
220,
220,
220,
220,
220,
220,
6196,
2087,
1141,
28679,
14,
25119,
4673,
13,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
62,
9127,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
19509,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
62,
6511,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1073,
78,
62,
11600,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
9019,
62,
6381,
4131,
62,
33770,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
42503,
62,
1073,
78,
62,
6759,
8609,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
42503,
62,
38610,
414,
62,
6759,
8609,
3419,
628,
628,
198,
220,
220,
220,
825,
3601,
62,
34242,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
12578,
4096,
7869,
319,
262,
6831,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
15057,
286,
10838,
25,
1391,
45299,
92,
1911,
18982,
7,
11925,
7,
944,
13,
66,
9019,
17,
14933,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
15057,
286,
3891,
25,
220,
220,
220,
1391,
45299,
92,
1911,
18982,
7,
11925,
7,
944,
13,
3672,
17,
66,
9019,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
15057,
286,
10838,
326,
2722,
3047,
25,
1391,
45299,
92,
1911,
18982,
7,
11925,
7,
944,
13,
66,
9019,
17,
22866,
62,
35138,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
15057,
286,
1775,
3047,
6096,
287,
2472,
25,
1391,
45299,
92,
1911,
18982,
7,
16345,
7,
944,
13,
66,
9019,
62,
9127,
13,
27160,
3419,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
26287,
3047,
6096,
583,
3721,
25,
220,
220,
220,
220,
46110,
13,
16,
69,
92,
1911,
18982,
7,
37659,
13,
23913,
7,
4868,
7,
944,
13,
66,
9019,
62,
9127,
13,
27160,
3419,
35514,
628,
628,
220,
220,
220,
825,
749,
62,
38610,
7,
944,
11,
269,
9019,
11,
256,
9019,
62,
24455,
41888,
4357,
949,
62,
66,
429,
28,
15,
11,
1353,
77,
28,
1120,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
374,
7061,
6,
198,
220,
220,
220,
220,
220,
220,
220,
11259,
257,
3721,
340,
481,
5204,
265,
644,
584,
10838,
287,
428,
6458,
33,
423,
262,
749,
2092,
198,
220,
220,
220,
220,
220,
220,
220,
11525,
12083,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
9019,
357,
2536,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
3721,
4522,
329,
262,
2779,
3721,
329,
543,
345,
765,
284,
651,
262,
749,
2092,
10838,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9019,
62,
24455,
357,
4868,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
317,
1351,
286,
309,
52,
3792,
326,
481,
307,
973,
284,
8106,
448,
262,
4504,
2482,
13,
8554,
428,
340,
318,
1744,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
4179,
262,
26789,
17952,
284,
691,
11916,
14,
37047,
35533,
14,
30349,
82,
14,
986,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
949,
62,
66,
429,
357,
600,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26265,
3047,
6096,
357,
403,
16668,
16149,
10,
16668,
16149,
8,
326,
257,
3721,
1276,
423,
284,
307,
3177,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
262,
26789,
17952,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1353,
77,
357,
600,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1374,
867,
2482,
284,
1441,
628,
220,
220,
220,
220,
220,
220,
220,
8229,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2482,
357,
11600,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
317,
22155,
351,
1353,
77,
2482,
588,
25,
1391,
27,
66,
9019,
31175,
1391,
6,
3672,
10354,
1279,
3672,
22330,
705,
14323,
10354,
1279,
38610,
414,
22330,
705,
83,
9019,
62,
3672,
10354,
1279,
83,
9019,
62,
3672,
22330,
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,
220,
220,
220,
220,
220,
220,
705,
83,
9019,
10354,
1279,
83,
9019,
22330,
705,
66,
429,
10354,
1279,
17618,
286,
3047,
6096,
262,
3721,
468,
1775,
29,
5512,
2644,
92,
628,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
13610,
262,
17593,
611,
3306,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
468,
35226,
7,
944,
11,
705,
14323,
62,
303,
5217,
11537,
393,
2116,
13,
14323,
62,
303,
5217,
318,
6045,
393,
18896,
7,
944,
13,
14323,
62,
303,
5217,
8,
1279,
18896,
7,
944,
13,
66,
9019,
17,
22866,
62,
35138,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
25954,
26789,
17593,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
25954,
26789,
17593,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
985,
62,
303,
5217,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
985,
62,
303,
5217,
62,
9127,
82,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
985,
62,
303,
5217,
62,
28047,
271,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
985,
62,
303,
5217,
62,
27399,
271,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
4808,
66,
9019,
287,
2116,
13,
66,
9019,
17,
22866,
62,
35138,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
985,
62,
303,
5217,
13,
33295,
7,
20850,
35138,
7,
944,
13,
66,
9019,
17,
22866,
62,
35138,
29795,
66,
9019,
60,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
985,
62,
303,
5217,
62,
9127,
82,
13,
33295,
7,
944,
13,
66,
9019,
62,
9127,
29795,
66,
9019,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
985,
62,
303,
5217,
62,
28047,
271,
13,
33295,
7,
944,
13,
66,
9019,
17,
83,
9019,
13,
1136,
28264,
66,
9019,
11,
705,
2954,
6,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
985,
62,
303,
5217,
62,
27399,
271,
13,
33295,
28264,
66,
9019,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
14323,
62,
303,
5217,
796,
45941,
13,
18747,
7,
14323,
62,
303,
5217,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
14323,
62,
303,
5217,
62,
9127,
82,
796,
45941,
13,
18747,
7,
14323,
62,
303,
5217,
62,
9127,
82,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
14323,
62,
303,
5217,
62,
28047,
271,
796,
45941,
13,
18747,
7,
14323,
62,
303,
5217,
62,
28047,
271,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
14323,
62,
303,
5217,
62,
27399,
271,
796,
45941,
13,
18747,
7,
14323,
62,
303,
5217,
62,
27399,
271,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
9683,
1331,
4063,
378,
10838,
198,
220,
220,
220,
220,
220,
220,
220,
256,
9019,
62,
521,
82,
796,
45941,
13,
283,
858,
7,
15,
11,
18896,
7,
944,
13,
14323,
62,
303,
5217,
62,
28047,
271,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
18896,
7,
83,
9019,
62,
24455,
8,
1875,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9019,
62,
521,
82,
796,
45941,
13,
18747,
26933,
4357,
288,
4906,
28,
37659,
13,
600,
2624,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
256,
9019,
287,
256,
9019,
62,
24455,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
9019,
62,
521,
82,
796,
45941,
13,
24592,
16,
67,
7,
37659,
13,
3003,
7,
944,
13,
14323,
62,
303,
5217,
62,
28047,
271,
6624,
256,
9019,
38381,
15,
4357,
256,
9019,
62,
521,
82,
8,
198,
220,
220,
220,
220,
220,
220,
220,
269,
429,
62,
521,
82,
796,
45941,
13,
283,
858,
7,
15,
11,
18896,
7,
944,
13,
14323,
62,
303,
5217,
62,
9127,
82,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
949,
62,
66,
429,
1875,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
429,
62,
521,
82,
796,
45941,
13,
3003,
7,
944,
13,
14323,
62,
303,
5217,
62,
9127,
82,
18189,
949,
62,
66,
429,
38381,
15,
60,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
4225,
8831,
269,
429,
290,
256,
9019,
198,
220,
220,
220,
220,
220,
220,
220,
773,
82,
796,
45941,
13,
3849,
8831,
16,
67,
7,
83,
9019,
62,
521,
82,
11,
269,
429,
62,
521,
82,
8,
628,
220,
220,
220,
220,
220,
220,
220,
285,
2213,
87,
796,
2116,
13,
14323,
62,
303,
5217,
58,
521,
82,
60,
198,
220,
220,
220,
220,
220,
220,
220,
18912,
271,
796,
2116,
13,
14323,
62,
303,
5217,
62,
27399,
271,
58,
521,
82,
60,
628,
220,
220,
220,
220,
220,
220,
220,
985,
82,
796,
45941,
13,
26518,
7,
76,
2213,
87,
11,
4326,
35138,
7,
944,
13,
66,
9019,
17,
22866,
62,
35138,
58,
66,
9019,
60,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
985,
82,
62,
82,
17034,
796,
45941,
13,
22046,
419,
32590,
16,
9,
82,
12078,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
13610,
262,
1441,
8633,
198,
220,
220,
220,
220,
220,
220,
220,
581,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
329,
773,
11,
4808,
66,
9019,
287,
27056,
378,
7,
27399,
271,
58,
82,
12078,
62,
82,
17034,
58,
15,
25,
4852,
77,
11907,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
581,
29795,
66,
9019,
60,
796,
1391,
6,
3672,
10354,
2116,
13,
66,
9019,
17,
37784,
62,
3672,
29795,
66,
9019,
4357,
705,
14323,
10354,
985,
82,
58,
82,
12078,
62,
82,
17034,
7131,
521,
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,
705,
83,
9019,
62,
3672,
10354,
2116,
13,
83,
9019,
17,
3672,
13,
1136,
7,
944,
13,
66,
9019,
17,
83,
9019,
13,
1136,
28264,
66,
9019,
11,
705,
2954,
33809,
705,
2954,
33809,
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,
705,
83,
9019,
10354,
2116,
13,
66,
9019,
17,
83,
9019,
13,
1136,
28264,
66,
9019,
11,
705,
2954,
33809,
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,
705,
66,
429,
10354,
2116,
13,
66,
9019,
62,
9127,
29795,
66,
9019,
48999,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
581,
198
] | 1.940701 | 10,017 |
from .scope import Scope
import socket
import json
| [
6738,
764,
29982,
1330,
41063,
198,
11748,
17802,
198,
11748,
33918,
628
] | 4.333333 | 12 |
# Copyright 2016 Ifwe 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.
from sqlalchemy import ForeignKey
from sqlalchemy.dialects.mysql import INTEGER, SMALLINT
from sqlalchemy.orm import relationship
from .meta import Base, Column
| [
2,
15069,
1584,
1002,
732,
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,
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,
6738,
44161,
282,
26599,
1330,
8708,
9218,
198,
6738,
44161,
282,
26599,
13,
38969,
478,
82,
13,
28744,
13976,
1330,
17828,
7156,
1137,
11,
9447,
7036,
12394,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
2776,
198,
198,
6738,
764,
28961,
1330,
7308,
11,
29201,
628
] | 3.741117 | 197 |
#!/usr/bin/python3
import sys
import os
import argparse
import traceback
import random
import math
import time
import re
import logging
import colorsys
import json
import tensorflow as tf
import numpy as np
from board import Board
from model import Model
import common
description = """
Play go with a trained neural net!
Implements a basic GTP engine that uses the neural net directly to play moves.
"""
parser = argparse.ArgumentParser(description=description)
common.add_model_load_args(parser)
parser.add_argument('-name-scope', help='Name scope for model variables', required=False)
args = vars(parser.parse_args())
(model_variables_prefix, model_config_json) = common.load_model_paths(args)
name_scope = args["name_scope"]
#Hardcoded max board size
pos_len = 6
# Model ----------------------------------------------------------------
with open(model_config_json) as f:
model_config = json.load(f)
if name_scope is not None:
with tf.compat.v1.variable_scope(name_scope):
model = Model(model_config,pos_len,{})
else:
model = Model(model_config,pos_len,{})
policy0_output = tf.nn.softmax(model.policy_output[:,:,0])
policy1_output = tf.nn.softmax(model.policy_output[:,:,1])
value_output = tf.nn.softmax(model.value_output)
scoremean_output = 20.0 * model.miscvalues_output[:,0]
scorestdev_output = 20.0 * tf.math.softplus(model.miscvalues_output[:,1])
lead_output = 20.0 * model.miscvalues_output[:,2]
vtime_output = 40.0 * tf.math.softplus(model.miscvalues_output[:,3])
estv_output = tf.sqrt(0.25 * tf.math.softplus(model.moremiscvalues_output[:,0]))
ests_output = tf.sqrt(30.0 * tf.math.softplus(model.moremiscvalues_output[:,1]))
td_value_output = tf.nn.softmax(model.miscvalues_output[:,4:7])
td_value_output2 = tf.nn.softmax(model.miscvalues_output[:,7:10])
td_value_output3 = tf.nn.softmax(model.moremiscvalues_output[:,2:5])
td_score_output = model.moremiscvalues_output[:,5:8] * 20.0
vtime_output = 40.0 * tf.math.softplus(model.miscvalues_output[:,3])
vtime_output = 40.0 * tf.math.softplus(model.miscvalues_output[:,3])
ownership_output = tf.tanh(model.ownership_output)
scoring_output = model.scoring_output
futurepos_output = tf.tanh(model.futurepos_output)
seki_output = tf.nn.softmax(model.seki_output[:,:,:,0:3])
seki_output = seki_output[:,:,:,1] - seki_output[:,:,:,2]
seki_output2 = tf.sigmoid(model.seki_output[:,:,:,3])
scorebelief_output = tf.nn.softmax(model.scorebelief_output)
sbscale_output = model.sbscale3_layer
# Moves ----------------------------------------------------------------
# Basic parsing --------------------------------------------------------
colstr = 'ABCDEFGHJKLMNOPQRST'
# GTP Implementation -----------------------------------------------------
#Adapted from https://github.com/pasky/michi/blob/master/michi.py, which is distributed under MIT license
#https://opensource.org/licenses/MIT
saver = tf.compat.v1.train.Saver(
max_to_keep = 10000,
save_relative_paths = True,
)
# session_config = tf.compat.v1.ConfigProto(allow_soft_placement=True)
# session_config.gpu_options.per_process_gpu_memory_fraction = 0.3
with tf.compat.v1.Session() as session:
saver.restore(session, model_variables_prefix)
run_gtp(session)
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
12854,
1891,
198,
11748,
4738,
198,
11748,
10688,
198,
11748,
640,
198,
11748,
302,
198,
11748,
18931,
198,
11748,
7577,
893,
198,
11748,
33918,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
3096,
1330,
5926,
198,
6738,
2746,
1330,
9104,
198,
11748,
2219,
198,
198,
11213,
796,
37227,
198,
11002,
467,
351,
257,
8776,
17019,
2010,
0,
198,
3546,
1154,
902,
257,
4096,
402,
7250,
3113,
326,
3544,
262,
17019,
2010,
3264,
284,
711,
6100,
13,
198,
37811,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
28,
11213,
8,
198,
11321,
13,
2860,
62,
19849,
62,
2220,
62,
22046,
7,
48610,
8,
198,
48610,
13,
2860,
62,
49140,
10786,
12,
3672,
12,
29982,
3256,
1037,
11639,
5376,
8354,
329,
2746,
9633,
3256,
2672,
28,
25101,
8,
198,
22046,
796,
410,
945,
7,
48610,
13,
29572,
62,
22046,
28955,
198,
198,
7,
19849,
62,
25641,
2977,
62,
40290,
11,
2746,
62,
11250,
62,
17752,
8,
796,
2219,
13,
2220,
62,
19849,
62,
6978,
82,
7,
22046,
8,
198,
3672,
62,
29982,
796,
26498,
14692,
3672,
62,
29982,
8973,
198,
198,
2,
17309,
40976,
3509,
3096,
2546,
198,
1930,
62,
11925,
796,
718,
198,
198,
2,
9104,
16529,
198,
198,
4480,
1280,
7,
19849,
62,
11250,
62,
17752,
8,
355,
277,
25,
198,
220,
2746,
62,
11250,
796,
33918,
13,
2220,
7,
69,
8,
198,
198,
361,
1438,
62,
29982,
318,
407,
6045,
25,
198,
220,
351,
48700,
13,
5589,
265,
13,
85,
16,
13,
45286,
62,
29982,
7,
3672,
62,
29982,
2599,
198,
220,
220,
220,
2746,
796,
9104,
7,
19849,
62,
11250,
11,
1930,
62,
11925,
11,
90,
30072,
198,
17772,
25,
198,
220,
2746,
796,
9104,
7,
19849,
62,
11250,
11,
1930,
62,
11925,
11,
90,
30072,
198,
30586,
15,
62,
22915,
796,
48700,
13,
20471,
13,
4215,
9806,
7,
19849,
13,
30586,
62,
22915,
58,
45299,
45299,
15,
12962,
198,
30586,
16,
62,
22915,
796,
48700,
13,
20471,
13,
4215,
9806,
7,
19849,
13,
30586,
62,
22915,
58,
45299,
45299,
16,
12962,
198,
8367,
62,
22915,
796,
48700,
13,
20471,
13,
4215,
9806,
7,
19849,
13,
8367,
62,
22915,
8,
198,
26675,
32604,
62,
22915,
796,
1160,
13,
15,
1635,
2746,
13,
44374,
27160,
62,
22915,
58,
45299,
15,
60,
198,
1416,
26522,
7959,
62,
22915,
796,
1160,
13,
15,
1635,
48700,
13,
11018,
13,
4215,
9541,
7,
19849,
13,
44374,
27160,
62,
22915,
58,
45299,
16,
12962,
198,
28230,
62,
22915,
796,
1160,
13,
15,
1635,
2746,
13,
44374,
27160,
62,
22915,
58,
45299,
17,
60,
198,
85,
2435,
62,
22915,
796,
2319,
13,
15,
1635,
48700,
13,
11018,
13,
4215,
9541,
7,
19849,
13,
44374,
27160,
62,
22915,
58,
45299,
18,
12962,
198,
395,
85,
62,
22915,
796,
48700,
13,
31166,
17034,
7,
15,
13,
1495,
1635,
48700,
13,
11018,
13,
4215,
9541,
7,
19849,
13,
3549,
44374,
27160,
62,
22915,
58,
45299,
15,
60,
4008,
198,
3558,
62,
22915,
796,
48700,
13,
31166,
17034,
7,
1270,
13,
15,
1635,
48700,
13,
11018,
13,
4215,
9541,
7,
19849,
13,
3549,
44374,
27160,
62,
22915,
58,
45299,
16,
60,
4008,
198,
8671,
62,
8367,
62,
22915,
796,
48700,
13,
20471,
13,
4215,
9806,
7,
19849,
13,
44374,
27160,
62,
22915,
58,
45299,
19,
25,
22,
12962,
198,
8671,
62,
8367,
62,
22915,
17,
796,
48700,
13,
20471,
13,
4215,
9806,
7,
19849,
13,
44374,
27160,
62,
22915,
58,
45299,
22,
25,
940,
12962,
198,
8671,
62,
8367,
62,
22915,
18,
796,
48700,
13,
20471,
13,
4215,
9806,
7,
19849,
13,
3549,
44374,
27160,
62,
22915,
58,
45299,
17,
25,
20,
12962,
198,
8671,
62,
26675,
62,
22915,
796,
2746,
13,
3549,
44374,
27160,
62,
22915,
58,
45299,
20,
25,
23,
60,
1635,
1160,
13,
15,
198,
85,
2435,
62,
22915,
796,
2319,
13,
15,
1635,
48700,
13,
11018,
13,
4215,
9541,
7,
19849,
13,
44374,
27160,
62,
22915,
58,
45299,
18,
12962,
198,
85,
2435,
62,
22915,
796,
2319,
13,
15,
1635,
48700,
13,
11018,
13,
4215,
9541,
7,
19849,
13,
44374,
27160,
62,
22915,
58,
45299,
18,
12962,
198,
15605,
1056,
62,
22915,
796,
48700,
13,
38006,
71,
7,
19849,
13,
15605,
1056,
62,
22915,
8,
198,
46536,
62,
22915,
796,
2746,
13,
46536,
62,
22915,
198,
37443,
1930,
62,
22915,
796,
48700,
13,
38006,
71,
7,
19849,
13,
37443,
1930,
62,
22915,
8,
198,
325,
4106,
62,
22915,
796,
48700,
13,
20471,
13,
4215,
9806,
7,
19849,
13,
325,
4106,
62,
22915,
58,
45299,
45299,
45299,
15,
25,
18,
12962,
198,
325,
4106,
62,
22915,
796,
384,
4106,
62,
22915,
58,
45299,
45299,
45299,
16,
60,
532,
384,
4106,
62,
22915,
58,
45299,
45299,
45299,
17,
60,
198,
325,
4106,
62,
22915,
17,
796,
48700,
13,
82,
17225,
1868,
7,
19849,
13,
325,
4106,
62,
22915,
58,
45299,
45299,
45299,
18,
12962,
198,
26675,
6667,
2086,
62,
22915,
796,
48700,
13,
20471,
13,
4215,
9806,
7,
19849,
13,
26675,
6667,
2086,
62,
22915,
8,
198,
36299,
9888,
62,
22915,
796,
2746,
13,
36299,
9888,
18,
62,
29289,
628,
198,
2,
38213,
16529,
628,
198,
198,
2,
14392,
32096,
20368,
22369,
198,
4033,
2536,
796,
705,
24694,
32988,
17511,
41,
42,
31288,
45,
3185,
48,
49,
2257,
6,
628,
198,
2,
402,
7250,
46333,
20368,
19351,
12,
198,
198,
2,
48003,
276,
422,
3740,
1378,
12567,
13,
785,
14,
79,
2093,
88,
14,
76,
16590,
14,
2436,
672,
14,
9866,
14,
76,
16590,
13,
9078,
11,
543,
318,
9387,
739,
17168,
5964,
198,
2,
5450,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
36393,
198,
198,
82,
8770,
796,
48700,
13,
5589,
265,
13,
85,
16,
13,
27432,
13,
50,
8770,
7,
198,
220,
3509,
62,
1462,
62,
14894,
796,
33028,
11,
198,
220,
3613,
62,
43762,
62,
6978,
82,
796,
6407,
11,
198,
8,
628,
198,
2,
6246,
62,
11250,
796,
48700,
13,
5589,
265,
13,
85,
16,
13,
16934,
2964,
1462,
7,
12154,
62,
4215,
62,
489,
5592,
28,
17821,
8,
198,
2,
6246,
62,
11250,
13,
46999,
62,
25811,
13,
525,
62,
14681,
62,
46999,
62,
31673,
62,
69,
7861,
796,
657,
13,
18,
198,
4480,
48700,
13,
5589,
265,
13,
85,
16,
13,
36044,
3419,
355,
6246,
25,
198,
220,
473,
332,
13,
2118,
382,
7,
29891,
11,
2746,
62,
25641,
2977,
62,
40290,
8,
198,
220,
1057,
62,
13655,
79,
7,
29891,
8,
198
] | 2.948435 | 1,086 |
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.rcParams['pdf.fonttype'] = 42
import bluepy
variances = ['0p001', '0p01', '0p05', '0p1', '0p5', '1p0', '1p5', '2p0', '10p0']
bcs = ['/gpfs/bbp.cscs.ch/project/proj9/simulations/nolte/variability/spontaneous/base_seeds_abcd_stim/seed170/variance%s/BlueConfig' % s for s in variances[1:]]
bcs = ['/gpfs/bbp.cscs.ch/project/proj9/simulations/nolte/variability/spontaneous/base_seeds_abcd/seed170/BlueConfig'] + bcs
# bcs = ['/gpfs/bbp.cscs.ch/project/proj9/simulations/nolte/ei-balance/' \
# 'scan_layer5/Ca%s/BlueConfig' % s for s in cas]
sim = bluepy.Simulation(bcs[0])
gids = np.array(list(sim.get_circuit_target()))
gids_exc = np.random.permutation(np.intersect1d(np.array(list(sim.circuit.get_target('Excitatory'))), gids))
gids_inh = np.random.permutation(np.intersect1d(np.array(list(sim.circuit.get_target('Inhibitory'))), gids))
# bcs = bcs_0
names = ['MVR', 'det_syns']
fig, axs = plt.subplots(len(bcs), 2, figsize=(14, 14))
for i, bc in enumerate(bcs):
print bc
sim = bluepy.Simulation(bc)
ax = axs[i, 0]
spikes = bluepy.Simulation(bc).v2.reports['spikes']
df = spikes.data(t_start=1000.0)
gids_spiking = np.abs(np.array(df.axes[0]) - gids.max())
times = np.array(df)
ax.vlines(times, gids_spiking, gids_spiking + 200, rasterized=True, lw=0.3)
ax2 = ax.twinx()
ax2.hist(times, bins=np.linspace(1000, 2000, 101), histtype='step', weights=np.zeros(times.size) + (1000.0/10.0)/gids.size)
ax2.set_ylabel('FR (Hz)')
# ax2.set_ylim([0, 3])
# ax2.set_yticks([0, 1, 2, 3])
ax.set_xlabel('t (ms)')
ax.set_ylabel('Neurons')
ax.set_title('variance in percent: %s' % variances[i])
plt.tight_layout()
plt.savefig('figures/variance_raster.pdf', dpi=300) | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
198,
6759,
29487,
8019,
13,
1904,
10786,
46384,
11537,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
489,
83,
13,
6015,
10044,
4105,
17816,
12315,
13,
10331,
4906,
20520,
796,
5433,
198,
198,
11748,
4171,
9078,
628,
198,
85,
3699,
728,
796,
37250,
15,
79,
8298,
3256,
705,
15,
79,
486,
3256,
705,
15,
79,
2713,
3256,
705,
15,
79,
16,
3256,
705,
15,
79,
20,
3256,
705,
16,
79,
15,
3256,
705,
16,
79,
20,
3256,
705,
17,
79,
15,
3256,
705,
940,
79,
15,
20520,
198,
198,
65,
6359,
796,
685,
26488,
31197,
9501,
14,
11848,
79,
13,
66,
1416,
82,
13,
354,
14,
16302,
14,
1676,
73,
24,
14,
14323,
5768,
14,
77,
349,
660,
14,
25641,
1799,
14,
2777,
756,
11655,
14,
8692,
62,
325,
5379,
62,
397,
10210,
62,
42003,
14,
28826,
17279,
14,
25641,
590,
4,
82,
14,
14573,
16934,
6,
4064,
264,
329,
264,
287,
1401,
16097,
58,
16,
25,
11907,
198,
65,
6359,
796,
685,
26488,
31197,
9501,
14,
11848,
79,
13,
66,
1416,
82,
13,
354,
14,
16302,
14,
1676,
73,
24,
14,
14323,
5768,
14,
77,
349,
660,
14,
25641,
1799,
14,
2777,
756,
11655,
14,
8692,
62,
325,
5379,
62,
397,
10210,
14,
28826,
17279,
14,
14573,
16934,
20520,
1343,
275,
6359,
198,
198,
2,
275,
6359,
796,
685,
26488,
31197,
9501,
14,
11848,
79,
13,
66,
1416,
82,
13,
354,
14,
16302,
14,
1676,
73,
24,
14,
14323,
5768,
14,
77,
349,
660,
14,
20295,
12,
20427,
14,
6,
3467,
198,
2,
220,
220,
220,
220,
220,
220,
220,
705,
35836,
62,
29289,
20,
14,
24334,
4,
82,
14,
14573,
16934,
6,
4064,
264,
329,
264,
287,
6124,
60,
198,
198,
14323,
796,
4171,
9078,
13,
8890,
1741,
7,
65,
6359,
58,
15,
12962,
198,
70,
2340,
796,
45941,
13,
18747,
7,
4868,
7,
14323,
13,
1136,
62,
21170,
5013,
62,
16793,
3419,
4008,
198,
70,
2340,
62,
41194,
796,
45941,
13,
25120,
13,
16321,
7094,
7,
37659,
13,
3849,
8831,
16,
67,
7,
37659,
13,
18747,
7,
4868,
7,
14323,
13,
21170,
5013,
13,
1136,
62,
16793,
10786,
40127,
270,
2870,
6,
4008,
828,
308,
2340,
4008,
198,
70,
2340,
62,
259,
71,
796,
45941,
13,
25120,
13,
16321,
7094,
7,
37659,
13,
3849,
8831,
16,
67,
7,
37659,
13,
18747,
7,
4868,
7,
14323,
13,
21170,
5013,
13,
1136,
62,
16793,
10786,
818,
26964,
652,
6,
4008,
828,
308,
2340,
4008,
198,
198,
2,
275,
6359,
796,
275,
6359,
62,
15,
198,
14933,
796,
37250,
44,
13024,
3256,
705,
15255,
62,
1837,
5907,
20520,
198,
5647,
11,
7877,
82,
796,
458,
83,
13,
7266,
489,
1747,
7,
11925,
7,
65,
6359,
828,
362,
11,
2336,
7857,
16193,
1415,
11,
1478,
4008,
198,
198,
1640,
1312,
11,
47125,
287,
27056,
378,
7,
65,
6359,
2599,
198,
220,
220,
220,
3601,
47125,
198,
220,
220,
220,
985,
796,
4171,
9078,
13,
8890,
1741,
7,
15630,
8,
628,
198,
220,
220,
220,
7877,
796,
7877,
82,
58,
72,
11,
657,
60,
628,
220,
220,
220,
27198,
796,
4171,
9078,
13,
8890,
1741,
7,
15630,
737,
85,
17,
13,
48922,
17816,
2777,
7938,
20520,
198,
220,
220,
220,
47764,
796,
27198,
13,
7890,
7,
83,
62,
9688,
28,
12825,
13,
15,
8,
198,
220,
220,
220,
308,
2340,
62,
2777,
14132,
796,
45941,
13,
8937,
7,
37659,
13,
18747,
7,
7568,
13,
897,
274,
58,
15,
12962,
532,
308,
2340,
13,
9806,
28955,
198,
220,
220,
220,
1661,
796,
45941,
13,
18747,
7,
7568,
8,
198,
220,
220,
220,
7877,
13,
85,
6615,
7,
22355,
11,
308,
2340,
62,
2777,
14132,
11,
308,
2340,
62,
2777,
14132,
1343,
939,
11,
374,
1603,
1143,
28,
17821,
11,
300,
86,
28,
15,
13,
18,
8,
198,
220,
220,
220,
7877,
17,
796,
7877,
13,
4246,
28413,
3419,
198,
220,
220,
220,
7877,
17,
13,
10034,
7,
22355,
11,
41701,
28,
37659,
13,
21602,
10223,
7,
12825,
11,
4751,
11,
8949,
828,
1554,
4906,
11639,
9662,
3256,
19590,
28,
37659,
13,
9107,
418,
7,
22355,
13,
7857,
8,
1343,
357,
12825,
13,
15,
14,
940,
13,
15,
20679,
70,
2340,
13,
7857,
8,
198,
220,
220,
220,
7877,
17,
13,
2617,
62,
2645,
9608,
10786,
10913,
357,
7399,
8,
11537,
198,
1303,
220,
220,
7877,
17,
13,
2617,
62,
88,
2475,
26933,
15,
11,
513,
12962,
198,
1303,
220,
220,
7877,
17,
13,
2617,
62,
20760,
3378,
26933,
15,
11,
352,
11,
362,
11,
513,
12962,
628,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
10786,
83,
357,
907,
8,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
8199,
333,
684,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
7839,
10786,
25641,
590,
287,
1411,
25,
4064,
82,
6,
4064,
1401,
16097,
58,
72,
12962,
628,
220,
220,
220,
458,
83,
13,
33464,
62,
39786,
3419,
198,
220,
220,
220,
458,
83,
13,
21928,
5647,
10786,
5647,
942,
14,
25641,
590,
62,
81,
1603,
13,
12315,
3256,
288,
14415,
28,
6200,
8
] | 2.157833 | 849 |
import os
import json
import shutil
from urllib import request
from .utils import PACKAGE_ROOT
from . import __folder_structure_version__
def init_database(database_dir: str = None) -> None:
"""
Creates a basic OpenGenomeBrowser folders structure.
Result:
database
├── organisms
├── annotations.json
├── annotation-descriptions
│ ├── SL.tsv
│ ├── KO.tsv
│ ├── KR.tsv
│ ├── EC.tsv
│ └── GO.tsv
├── orthologs
└── pathway-maps
├── type_dictionary.json
└── svg
:param database_dir: Path to the root of the OpenGenomeBrowser folder structure. (Will contain 'organisms' folder.)
"""
if database_dir is None:
assert 'GENOMIC_DATABASE' in os.environ, f'Cannot find the database. Please set --database_dir or environment variable GENOMIC_DATABASE'
database_dir = os.environ['GENOMIC_DATABASE']
assert os.path.isdir(os.path.dirname(database_dir)), f'Parent dir of {database_dir=} does not exist!'
assert not os.path.exists(database_dir), f'Error: {database_dir=} already exist!'
# make main dir
os.makedirs(database_dir)
# set version
with open(f'{database_dir}/version.json', 'w') as f:
json.dump({'folder_structure_version': __folder_structure_version__}, f, indent=4)
# make organisms dir (empty)
os.makedirs(f'{database_dir}/organisms')
# make orthologs dir (empty)
os.makedirs(f'{database_dir}/orthologs')
# make pathway maps dir and content
os.makedirs(f'{database_dir}/pathway-maps')
os.makedirs(f'{database_dir}/pathway-maps/svg')
with open(f'{database_dir}/pathway-maps/type_dictionary.json', 'w') as f:
f.write('{}')
# Create annotations.json
shutil.copy(src=f'{PACKAGE_ROOT}/data/annotations.json', dst=f'{database_dir}/annotations.json')
# download annotation descriptions
annotation_descriptions_dir = f'{database_dir}/annotation-descriptions'
os.makedirs(annotation_descriptions_dir)
download_sl_data(out=f'{annotation_descriptions_dir}/SL.tsv')
download_kegg_data(src='rn', out=f'{annotation_descriptions_dir}/KR.tsv', remove_prefix='rn:')
download_kegg_data(src='ko', out=f'{annotation_descriptions_dir}/KG.tsv', remove_prefix='ko:')
download_kegg_data(src='enzyme', out=f'{annotation_descriptions_dir}/EC.tsv', remove_prefix='ec:', add_prefix='EC:')
download_go_data(out=f'{annotation_descriptions_dir}/GO.tsv')
if __name__ == '__main__':
main()
| [
11748,
28686,
198,
11748,
33918,
198,
11748,
4423,
346,
198,
6738,
2956,
297,
571,
1330,
2581,
198,
6738,
764,
26791,
1330,
47035,
11879,
62,
13252,
2394,
198,
6738,
764,
1330,
11593,
43551,
62,
301,
5620,
62,
9641,
834,
628,
628,
198,
198,
4299,
2315,
62,
48806,
7,
48806,
62,
15908,
25,
965,
796,
6045,
8,
4613,
6045,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7921,
274,
257,
4096,
4946,
13746,
462,
46532,
24512,
4645,
13,
628,
220,
220,
220,
25414,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6831,
198,
220,
220,
220,
220,
220,
220,
220,
35306,
20296,
198,
220,
220,
220,
220,
220,
220,
220,
35306,
37647,
13,
17752,
198,
220,
220,
220,
220,
220,
220,
220,
35306,
23025,
12,
20147,
1968,
507,
198,
220,
220,
220,
220,
220,
220,
220,
19421,
220,
220,
35306,
12419,
13,
912,
85,
198,
220,
220,
220,
220,
220,
220,
220,
19421,
220,
220,
35306,
21054,
13,
912,
85,
198,
220,
220,
220,
220,
220,
220,
220,
19421,
220,
220,
35306,
29430,
13,
912,
85,
198,
220,
220,
220,
220,
220,
220,
220,
19421,
220,
220,
35306,
13182,
13,
912,
85,
198,
220,
220,
220,
220,
220,
220,
220,
19421,
220,
220,
13305,
242,
8418,
10351,
13,
912,
85,
198,
220,
220,
220,
220,
220,
220,
220,
35306,
29617,
928,
82,
198,
220,
220,
220,
220,
220,
220,
220,
13305,
242,
8418,
21182,
12,
31803,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
35306,
2099,
62,
67,
14188,
13,
17752,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13305,
242,
8418,
38487,
70,
628,
198,
220,
220,
220,
1058,
17143,
6831,
62,
15908,
25,
10644,
284,
262,
6808,
286,
262,
4946,
13746,
462,
46532,
9483,
4645,
13,
357,
8743,
3994,
705,
45165,
6,
9483,
2014,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
6831,
62,
15908,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
705,
35353,
2662,
2149,
62,
35,
1404,
6242,
11159,
6,
287,
28686,
13,
268,
2268,
11,
277,
6,
34,
34574,
1064,
262,
6831,
13,
4222,
900,
1377,
48806,
62,
15908,
393,
2858,
7885,
24700,
2662,
2149,
62,
35,
1404,
6242,
11159,
6,
198,
220,
220,
220,
220,
220,
220,
220,
6831,
62,
15908,
796,
28686,
13,
268,
2268,
17816,
35353,
2662,
2149,
62,
35,
1404,
6242,
11159,
20520,
628,
220,
220,
220,
6818,
28686,
13,
6978,
13,
9409,
343,
7,
418,
13,
6978,
13,
15908,
3672,
7,
48806,
62,
15908,
36911,
277,
6,
24546,
26672,
286,
1391,
48806,
62,
15908,
28,
92,
857,
407,
2152,
13679,
198,
220,
220,
220,
6818,
407,
28686,
13,
6978,
13,
1069,
1023,
7,
48806,
62,
15908,
828,
277,
6,
12331,
25,
1391,
48806,
62,
15908,
28,
92,
1541,
2152,
13679,
628,
220,
220,
220,
1303,
787,
1388,
26672,
198,
220,
220,
220,
28686,
13,
76,
4335,
17062,
7,
48806,
62,
15908,
8,
628,
220,
220,
220,
1303,
900,
2196,
198,
220,
220,
220,
351,
1280,
7,
69,
6,
90,
48806,
62,
15908,
92,
14,
9641,
13,
17752,
3256,
705,
86,
11537,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
33918,
13,
39455,
15090,
6,
43551,
62,
301,
5620,
62,
9641,
10354,
11593,
43551,
62,
301,
5620,
62,
9641,
834,
5512,
277,
11,
33793,
28,
19,
8,
628,
220,
220,
220,
1303,
787,
20296,
26672,
357,
28920,
8,
198,
220,
220,
220,
28686,
13,
76,
4335,
17062,
7,
69,
6,
90,
48806,
62,
15908,
92,
14,
45165,
11537,
628,
220,
220,
220,
1303,
787,
29617,
928,
82,
26672,
357,
28920,
8,
198,
220,
220,
220,
28686,
13,
76,
4335,
17062,
7,
69,
6,
90,
48806,
62,
15908,
92,
14,
1506,
928,
82,
11537,
628,
220,
220,
220,
1303,
787,
21182,
8739,
26672,
290,
2695,
198,
220,
220,
220,
28686,
13,
76,
4335,
17062,
7,
69,
6,
90,
48806,
62,
15908,
92,
14,
6978,
1014,
12,
31803,
11537,
198,
220,
220,
220,
28686,
13,
76,
4335,
17062,
7,
69,
6,
90,
48806,
62,
15908,
92,
14,
6978,
1014,
12,
31803,
14,
21370,
70,
11537,
198,
220,
220,
220,
351,
1280,
7,
69,
6,
90,
48806,
62,
15908,
92,
14,
6978,
1014,
12,
31803,
14,
4906,
62,
67,
14188,
13,
17752,
3256,
705,
86,
11537,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
277,
13,
13564,
10786,
90,
92,
11537,
628,
220,
220,
220,
1303,
13610,
37647,
13,
17752,
198,
220,
220,
220,
4423,
346,
13,
30073,
7,
10677,
28,
69,
6,
90,
47,
8120,
11879,
62,
13252,
2394,
92,
14,
7890,
14,
34574,
602,
13,
17752,
3256,
29636,
28,
69,
6,
90,
48806,
62,
15908,
92,
14,
34574,
602,
13,
17752,
11537,
628,
220,
220,
220,
1303,
4321,
23025,
16969,
198,
220,
220,
220,
23025,
62,
20147,
1968,
507,
62,
15908,
796,
277,
6,
90,
48806,
62,
15908,
92,
14,
1236,
14221,
12,
20147,
1968,
507,
6,
198,
220,
220,
220,
28686,
13,
76,
4335,
17062,
7,
1236,
14221,
62,
20147,
1968,
507,
62,
15908,
8,
198,
220,
220,
220,
4321,
62,
6649,
62,
7890,
7,
448,
28,
69,
6,
90,
1236,
14221,
62,
20147,
1968,
507,
62,
15908,
92,
14,
8634,
13,
912,
85,
11537,
198,
220,
220,
220,
4321,
62,
365,
1130,
62,
7890,
7,
10677,
11639,
35906,
3256,
503,
28,
69,
6,
90,
1236,
14221,
62,
20147,
1968,
507,
62,
15908,
92,
14,
30758,
13,
912,
85,
3256,
4781,
62,
40290,
11639,
35906,
25,
11537,
198,
220,
220,
220,
4321,
62,
365,
1130,
62,
7890,
7,
10677,
11639,
7204,
3256,
503,
28,
69,
6,
90,
1236,
14221,
62,
20147,
1968,
507,
62,
15908,
92,
14,
42,
38,
13,
912,
85,
3256,
4781,
62,
40290,
11639,
7204,
25,
11537,
198,
220,
220,
220,
4321,
62,
365,
1130,
62,
7890,
7,
10677,
11639,
268,
24266,
3256,
503,
28,
69,
6,
90,
1236,
14221,
62,
20147,
1968,
507,
62,
15908,
92,
14,
2943,
13,
912,
85,
3256,
4781,
62,
40290,
11639,
721,
25,
3256,
751,
62,
40290,
11639,
2943,
25,
11537,
198,
220,
220,
220,
4321,
62,
2188,
62,
7890,
7,
448,
28,
69,
6,
90,
1236,
14221,
62,
20147,
1968,
507,
62,
15908,
92,
14,
11230,
13,
912,
85,
11537,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.426261 | 1,051 |
from .base_dataset import BaseADDataset
from torch.utils.data import DataLoader
class TorchvisionDataset(BaseADDataset):
"""TorchvisionDataset class for datasets already implemented in torchvision.datasets."""
| [
6738,
764,
8692,
62,
19608,
292,
316,
1330,
7308,
2885,
27354,
292,
316,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
628,
198,
4871,
34868,
10178,
27354,
292,
316,
7,
14881,
2885,
27354,
292,
316,
2599,
198,
220,
220,
220,
37227,
15884,
354,
10178,
27354,
292,
316,
1398,
329,
40522,
1541,
9177,
287,
28034,
10178,
13,
19608,
292,
1039,
526,
15931,
198
] | 3.375 | 64 |
import os
import glob
from pathlib import Path
from .helpers import cached_property
from . import helpers
from . import config
# NOTE:
# For better detection we can add an argument allowing metadata reading
# Exact set of file types needs to be reviewed
class File:
"""File representation"""
@cached_property
@cached_property
@cached_property
@cached_property
@cached_property
@cached_property
@cached_property
@cached_property
@cached_property
@cached_property
@cached_property
@cached_property
@cached_property
@cached_property
@cached_property
# Detect
| [
11748,
28686,
198,
11748,
15095,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
764,
16794,
364,
1330,
39986,
62,
26745,
198,
6738,
764,
1330,
49385,
198,
6738,
764,
1330,
4566,
628,
198,
2,
24550,
25,
198,
2,
1114,
1365,
13326,
356,
460,
751,
281,
4578,
5086,
20150,
3555,
198,
2,
1475,
529,
900,
286,
2393,
3858,
2476,
284,
307,
11765,
628,
198,
4871,
9220,
25,
198,
220,
220,
220,
37227,
8979,
10552,
37811,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
2488,
66,
2317,
62,
26745,
628,
220,
220,
220,
1303,
35874,
198
] | 2.995349 | 215 |
import sys
import requests
import csv
import io
from datetime import datetime
from collections import defaultdict
from .utils import store_data, stoi
# ------------------------------------------------------------------------
# Globals
deaths_URL = "https://raw.githubusercontent.com/datadista/datasets/master/COVID%2019/ccaa_covid19_fallecidos.csv"
cases_URL = "https://raw.githubusercontent.com/datadista/datasets/master/COVID%2019/ccaa_covid19_casos.csv"
hospitalized_URL = "https://raw.githubusercontent.com/datadista/datasets/master/COVID%2019/ccaa_covid19_hospitalizados.csv"
icu_URL = "https://raw.githubusercontent.com/datadista/datasets/master/COVID%2019/ccaa_covid19_uci.csv"
recovered_URL = "https://raw.githubusercontent.com/datadista/datasets/master/COVID%2019/ccaa_covid19_altas.csv"
cols = ['time', 'cases', 'deaths', 'hospitalized', 'icu', 'recovered']
# ------------------------------------------------------------------------
# Main point of entry
| [
11748,
25064,
198,
11748,
7007,
198,
11748,
269,
21370,
198,
11748,
33245,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
764,
26791,
1330,
3650,
62,
7890,
11,
3995,
72,
198,
198,
2,
16529,
982,
198,
2,
40713,
874,
198,
198,
22595,
82,
62,
21886,
796,
220,
220,
220,
220,
220,
220,
366,
5450,
1378,
1831,
13,
12567,
43667,
13,
785,
14,
19608,
324,
12523,
14,
19608,
292,
1039,
14,
9866,
14,
8220,
11008,
4,
23344,
14,
535,
7252,
62,
66,
709,
312,
1129,
62,
69,
6765,
66,
312,
418,
13,
40664,
1,
198,
33964,
62,
21886,
796,
220,
220,
220,
220,
220,
220,
220,
366,
5450,
1378,
1831,
13,
12567,
43667,
13,
785,
14,
19608,
324,
12523,
14,
19608,
292,
1039,
14,
9866,
14,
8220,
11008,
4,
23344,
14,
535,
7252,
62,
66,
709,
312,
1129,
62,
34004,
418,
13,
40664,
1,
198,
49257,
1143,
62,
21886,
796,
366,
5450,
1378,
1831,
13,
12567,
43667,
13,
785,
14,
19608,
324,
12523,
14,
19608,
292,
1039,
14,
9866,
14,
8220,
11008,
4,
23344,
14,
535,
7252,
62,
66,
709,
312,
1129,
62,
49257,
528,
22484,
13,
40664,
1,
198,
291,
84,
62,
21886,
796,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5450,
1378,
1831,
13,
12567,
43667,
13,
785,
14,
19608,
324,
12523,
14,
19608,
292,
1039,
14,
9866,
14,
8220,
11008,
4,
23344,
14,
535,
7252,
62,
66,
709,
312,
1129,
62,
42008,
13,
40664,
1,
198,
8344,
2557,
62,
21886,
796,
220,
220,
220,
366,
5450,
1378,
1831,
13,
12567,
43667,
13,
785,
14,
19608,
324,
12523,
14,
19608,
292,
1039,
14,
9866,
14,
8220,
11008,
4,
23344,
14,
535,
7252,
62,
66,
709,
312,
1129,
62,
2501,
292,
13,
40664,
1,
198,
4033,
82,
796,
37250,
2435,
3256,
705,
33964,
3256,
705,
22595,
82,
3256,
705,
49257,
1143,
3256,
705,
291,
84,
3256,
705,
8344,
2557,
20520,
198,
198,
2,
16529,
982,
198,
2,
8774,
966,
286,
5726,
198
] | 2.993976 | 332 |
# This file is part of the pyMOR project (http://www.pymor.org).
# Copyright 2013-2016 pyMOR developers and contributors. All rights reserved.
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
import numpy as np
from pymor.algorithms.timestepping import ExplicitEulerTimeStepper
from pymor.analyticalproblems.advection import InstationaryAdvectionProblem
from pymor.discretizations.basic import InstationaryDiscretization
from pymor.domaindiscretizers.default import discretize_domain_default
from pymor.gui.qt import PatchVisualizer, Matplotlib1DVisualizer
from pymor.operators.numpy import NumpyGenericOperator
from pymor.operators.fv import (nonlinear_advection_lax_friedrichs_operator,
nonlinear_advection_engquist_osher_operator,
nonlinear_advection_simplified_engquist_osher_operator,
L2Product, L2ProductFunctional)
from pymor.vectorarrays.numpy import NumpyVectorArray
def discretize_nonlinear_instationary_advection_fv(analytical_problem, diameter=None, nt=100, num_flux='lax_friedrichs',
lxf_lambda=1., eo_gausspoints=5, eo_intervals=1, num_values=None,
domain_discretizer=None, grid=None, boundary_info=None):
"""Discretizes an |InstationaryAdvectionProblem| using the finite volume method.
Explicit Euler time-stepping is used for time discretization.
Parameters
----------
analytical_problem
The |InstationaryAdvectionProblem| to discretize.
diameter
If not `None`, `diameter` is passed as an argument to the
`domain_discretizer`.
nt
The number of time steps.
num_flux
The numerical flux to use in the finite volume formulation. Allowed
values are `'lax_friedrichs'`, `'engquist_osher'`, `'simplified_engquist_osher'`
(see :mod:`pymor.operators.fv`).
lxf_lambda
The stabilization parameter for the Lax-Friedrichs numerical flux
(ignored, if different flux is chosen).
eo_gausspoints
Number of Gauss points for the Engquist-Osher numerical flux
(ignored, if different flux is chosen).
eo_intervals
Number of sub-intervals to use for integration when using Engquist-Osher
numerical flux (ignored, if different flux is chosen).
num_values
The number of returned vectors of the solution trajectory. If `None`, each
intermediate vector that is calculated is returned.
domain_discretizer
Discretizer to be used for discretizing the analytical domain. This has
to be a function `domain_discretizer(domain_description, diameter)`.
If `None`, |discretize_domain_default| is used.
grid
Instead of using a domain discretizer, the |Grid| can also be passed directly
using this parameter.
boundary_info
A |BoundaryInfo| specifying the boundary types of the grid boundary entities.
Must be provided if `grid` is specified.
Returns
-------
discretization
The |Discretization| that has been generated.
data
Dictionary with the following entries:
:grid: The generated |Grid|.
:boundary_info: The generated |BoundaryInfo|.
"""
assert isinstance(analytical_problem, InstationaryAdvectionProblem)
assert grid is None or boundary_info is not None
assert boundary_info is None or grid is not None
assert grid is None or domain_discretizer is None
assert num_flux in ('lax_friedrichs', 'engquist_osher', 'simplified_engquist_osher')
if grid is None:
domain_discretizer = domain_discretizer or discretize_domain_default
if diameter is None:
grid, boundary_info = domain_discretizer(analytical_problem.domain)
else:
grid, boundary_info = domain_discretizer(analytical_problem.domain, diameter=diameter)
p = analytical_problem
if num_flux == 'lax_friedrichs':
L = nonlinear_advection_lax_friedrichs_operator(grid, boundary_info, p.flux_function,
dirichlet_data=p.dirichlet_data, lxf_lambda=lxf_lambda)
elif num_flux == 'engquist_osher':
L = nonlinear_advection_engquist_osher_operator(grid, boundary_info, p.flux_function,
p.flux_function_derivative,
gausspoints=eo_gausspoints, intervals=eo_intervals,
dirichlet_data=p.dirichlet_data)
else:
L = nonlinear_advection_simplified_engquist_osher_operator(grid, boundary_info, p.flux_function,
p.flux_function_derivative,
dirichlet_data=p.dirichlet_data)
F = None if p.rhs is None else L2ProductFunctional(grid, p.rhs)
if p.initial_data.parametric:
I = NumpyGenericOperator(initial_projection, dim_range=grid.size(0), linear=True,
parameter_type=p.initial_data.parameter_type)
else:
I = p.initial_data.evaluate(grid.quadrature_points(0, order=2)).squeeze()
I = np.sum(I * grid.reference_element.quadrature(order=2)[1], axis=1) * (1. / grid.reference_element.volume)
I = NumpyVectorArray(I, copy=False)
products = {'l2': L2Product(grid, boundary_info)}
if grid.dim == 2:
visualizer = PatchVisualizer(grid=grid, bounding_box=grid.bounding_box(), codim=0)
elif grid.dim == 1:
visualizer = Matplotlib1DVisualizer(grid, codim=0)
else:
visualizer = None
parameter_space = p.parameter_space if hasattr(p, 'parameter_space') else None
time_stepper = ExplicitEulerTimeStepper(nt=nt)
discretization = InstationaryDiscretization(operator=L, rhs=F, initial_data=I, T=p.T, products=products,
time_stepper=time_stepper,
parameter_space=parameter_space, visualizer=visualizer,
num_values=num_values, name='{}_FV'.format(p.name))
return discretization, {'grid': grid, 'boundary_info': boundary_info}
| [
2,
770,
2393,
318,
636,
286,
262,
12972,
44,
1581,
1628,
357,
4023,
1378,
2503,
13,
9078,
4491,
13,
2398,
737,
198,
2,
15069,
2211,
12,
5304,
12972,
44,
1581,
6505,
290,
20420,
13,
1439,
2489,
10395,
13,
198,
2,
13789,
25,
347,
10305,
362,
12,
2601,
682,
13789,
357,
4023,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
21800,
12,
17,
12,
2601,
682,
8,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
12972,
4491,
13,
282,
7727,
907,
13,
16514,
29872,
2105,
1330,
11884,
36,
18173,
7575,
7447,
2848,
198,
6738,
12972,
4491,
13,
38200,
22869,
1676,
22143,
13,
324,
303,
596,
1330,
2262,
341,
560,
2782,
303,
596,
40781,
198,
6738,
12972,
4491,
13,
15410,
1186,
4582,
13,
35487,
1330,
2262,
341,
560,
15642,
1186,
1634,
198,
6738,
12972,
4491,
13,
27830,
15410,
1186,
11341,
13,
12286,
1330,
1221,
1186,
1096,
62,
27830,
62,
12286,
198,
6738,
12972,
4491,
13,
48317,
13,
39568,
1330,
17106,
36259,
7509,
11,
6550,
29487,
8019,
16,
35,
36259,
7509,
198,
6738,
12972,
4491,
13,
3575,
2024,
13,
77,
32152,
1330,
399,
32152,
46189,
18843,
1352,
198,
6738,
12972,
4491,
13,
3575,
2024,
13,
69,
85,
1330,
357,
13159,
29127,
62,
324,
303,
596,
62,
75,
897,
62,
25520,
7527,
82,
62,
46616,
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,
220,
220,
220,
220,
220,
220,
1729,
29127,
62,
324,
303,
596,
62,
1516,
30062,
62,
38321,
62,
46616,
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,
220,
220,
220,
220,
220,
220,
1729,
29127,
62,
324,
303,
596,
62,
14323,
489,
1431,
62,
1516,
30062,
62,
38321,
62,
46616,
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,
220,
220,
220,
220,
220,
220,
406,
17,
15667,
11,
406,
17,
15667,
22203,
282,
8,
198,
6738,
12972,
4491,
13,
31364,
3258,
592,
13,
77,
32152,
1330,
399,
32152,
38469,
19182,
628,
198,
4299,
1221,
1186,
1096,
62,
13159,
29127,
62,
8625,
341,
560,
62,
324,
303,
596,
62,
69,
85,
7,
38200,
22869,
62,
45573,
11,
14753,
28,
14202,
11,
299,
83,
28,
3064,
11,
997,
62,
69,
22564,
11639,
75,
897,
62,
25520,
7527,
82,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
26152,
62,
50033,
28,
16,
1539,
304,
78,
62,
4908,
1046,
13033,
28,
20,
11,
304,
78,
62,
3849,
12786,
28,
16,
11,
997,
62,
27160,
28,
14202,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7386,
62,
15410,
1186,
7509,
28,
14202,
11,
10706,
28,
14202,
11,
18645,
62,
10951,
28,
14202,
2599,
198,
220,
220,
220,
37227,
15642,
1186,
4340,
281,
930,
6310,
341,
560,
2782,
303,
596,
40781,
91,
1262,
262,
27454,
6115,
2446,
13,
628,
220,
220,
220,
11884,
412,
18173,
640,
12,
4169,
2105,
318,
973,
329,
640,
1221,
1186,
1634,
13,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
30063,
62,
45573,
198,
220,
220,
220,
220,
220,
220,
220,
383,
930,
6310,
341,
560,
2782,
303,
596,
40781,
91,
284,
1221,
1186,
1096,
13,
198,
220,
220,
220,
14753,
198,
220,
220,
220,
220,
220,
220,
220,
1002,
407,
4600,
14202,
47671,
4600,
67,
13173,
63,
318,
3804,
355,
281,
4578,
284,
262,
198,
220,
220,
220,
220,
220,
220,
220,
4600,
27830,
62,
15410,
1186,
7509,
44646,
198,
220,
220,
220,
299,
83,
198,
220,
220,
220,
220,
220,
220,
220,
383,
1271,
286,
640,
4831,
13,
198,
220,
220,
220,
997,
62,
69,
22564,
198,
220,
220,
220,
220,
220,
220,
220,
383,
29052,
28462,
284,
779,
287,
262,
27454,
6115,
31760,
13,
1439,
6972,
198,
220,
220,
220,
220,
220,
220,
220,
3815,
389,
4600,
6,
75,
897,
62,
25520,
7527,
82,
6,
47671,
4600,
6,
1516,
30062,
62,
38321,
6,
47671,
4600,
6,
14323,
489,
1431,
62,
1516,
30062,
62,
38321,
6,
63,
198,
220,
220,
220,
220,
220,
220,
220,
357,
3826,
1058,
4666,
25,
63,
9078,
4491,
13,
3575,
2024,
13,
69,
85,
63,
737,
198,
220,
220,
220,
300,
26152,
62,
50033,
198,
220,
220,
220,
220,
220,
220,
220,
383,
43200,
11507,
329,
262,
406,
897,
12,
37,
2228,
7527,
82,
29052,
28462,
198,
220,
220,
220,
220,
220,
220,
220,
357,
570,
1850,
11,
611,
1180,
28462,
318,
7147,
737,
198,
220,
220,
220,
304,
78,
62,
4908,
1046,
13033,
198,
220,
220,
220,
220,
220,
220,
220,
7913,
286,
12822,
1046,
2173,
329,
262,
1985,
30062,
12,
16748,
372,
29052,
28462,
198,
220,
220,
220,
220,
220,
220,
220,
357,
570,
1850,
11,
611,
1180,
28462,
318,
7147,
737,
198,
220,
220,
220,
304,
78,
62,
3849,
12786,
198,
220,
220,
220,
220,
220,
220,
220,
7913,
286,
850,
12,
3849,
12786,
284,
779,
329,
11812,
618,
1262,
1985,
30062,
12,
16748,
372,
198,
220,
220,
220,
220,
220,
220,
220,
29052,
28462,
357,
570,
1850,
11,
611,
1180,
28462,
318,
7147,
737,
198,
220,
220,
220,
997,
62,
27160,
198,
220,
220,
220,
220,
220,
220,
220,
383,
1271,
286,
4504,
30104,
286,
262,
4610,
22942,
13,
1002,
4600,
14202,
47671,
1123,
198,
220,
220,
220,
220,
220,
220,
220,
19898,
15879,
326,
318,
10488,
318,
4504,
13,
198,
220,
220,
220,
7386,
62,
15410,
1186,
7509,
198,
220,
220,
220,
220,
220,
220,
220,
8444,
1186,
7509,
284,
307,
973,
329,
1221,
1186,
2890,
262,
30063,
7386,
13,
770,
468,
198,
220,
220,
220,
220,
220,
220,
220,
284,
307,
257,
2163,
4600,
27830,
62,
15410,
1186,
7509,
7,
27830,
62,
11213,
11,
14753,
8,
44646,
198,
220,
220,
220,
220,
220,
220,
220,
1002,
4600,
14202,
47671,
930,
15410,
1186,
1096,
62,
27830,
62,
12286,
91,
318,
973,
13,
198,
220,
220,
220,
10706,
198,
220,
220,
220,
220,
220,
220,
220,
5455,
286,
1262,
257,
7386,
1221,
1186,
7509,
11,
262,
930,
41339,
91,
460,
635,
307,
3804,
3264,
198,
220,
220,
220,
220,
220,
220,
220,
1262,
428,
11507,
13,
198,
220,
220,
220,
18645,
62,
10951,
198,
220,
220,
220,
220,
220,
220,
220,
317,
930,
49646,
560,
12360,
91,
31577,
262,
18645,
3858,
286,
262,
10706,
18645,
12066,
13,
198,
220,
220,
220,
220,
220,
220,
220,
12039,
307,
2810,
611,
4600,
25928,
63,
318,
7368,
13,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
1221,
1186,
1634,
198,
220,
220,
220,
220,
220,
220,
220,
383,
930,
15642,
1186,
1634,
91,
326,
468,
587,
7560,
13,
198,
220,
220,
220,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
28261,
351,
262,
1708,
12784,
25,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
25928,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
7560,
930,
41339,
91,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
7784,
560,
62,
10951,
25,
220,
383,
7560,
930,
49646,
560,
12360,
91,
13,
628,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
6818,
318,
39098,
7,
38200,
22869,
62,
45573,
11,
2262,
341,
560,
2782,
303,
596,
40781,
8,
198,
220,
220,
220,
6818,
10706,
318,
6045,
393,
18645,
62,
10951,
318,
407,
6045,
198,
220,
220,
220,
6818,
18645,
62,
10951,
318,
6045,
393,
10706,
318,
407,
6045,
198,
220,
220,
220,
6818,
10706,
318,
6045,
393,
7386,
62,
15410,
1186,
7509,
318,
6045,
198,
220,
220,
220,
6818,
997,
62,
69,
22564,
287,
19203,
75,
897,
62,
25520,
7527,
82,
3256,
705,
1516,
30062,
62,
38321,
3256,
705,
14323,
489,
1431,
62,
1516,
30062,
62,
38321,
11537,
628,
220,
220,
220,
611,
10706,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7386,
62,
15410,
1186,
7509,
796,
7386,
62,
15410,
1186,
7509,
393,
1221,
1186,
1096,
62,
27830,
62,
12286,
198,
220,
220,
220,
220,
220,
220,
220,
611,
14753,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10706,
11,
18645,
62,
10951,
796,
7386,
62,
15410,
1186,
7509,
7,
38200,
22869,
62,
45573,
13,
27830,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10706,
11,
18645,
62,
10951,
796,
7386,
62,
15410,
1186,
7509,
7,
38200,
22869,
62,
45573,
13,
27830,
11,
14753,
28,
67,
13173,
8,
628,
220,
220,
220,
279,
796,
30063,
62,
45573,
628,
220,
220,
220,
611,
997,
62,
69,
22564,
6624,
705,
75,
897,
62,
25520,
7527,
82,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
406,
796,
1729,
29127,
62,
324,
303,
596,
62,
75,
897,
62,
25520,
7527,
82,
62,
46616,
7,
25928,
11,
18645,
62,
10951,
11,
279,
13,
69,
22564,
62,
8818,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26672,
488,
1616,
62,
7890,
28,
79,
13,
15908,
488,
1616,
62,
7890,
11,
300,
26152,
62,
50033,
28,
75,
26152,
62,
50033,
8,
198,
220,
220,
220,
1288,
361,
997,
62,
69,
22564,
6624,
705,
1516,
30062,
62,
38321,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
406,
796,
1729,
29127,
62,
324,
303,
596,
62,
1516,
30062,
62,
38321,
62,
46616,
7,
25928,
11,
18645,
62,
10951,
11,
279,
13,
69,
22564,
62,
8818,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
13,
69,
22564,
62,
8818,
62,
1082,
452,
876,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31986,
1046,
13033,
28,
68,
78,
62,
4908,
1046,
13033,
11,
20016,
28,
68,
78,
62,
3849,
12786,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26672,
488,
1616,
62,
7890,
28,
79,
13,
15908,
488,
1616,
62,
7890,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
406,
796,
1729,
29127,
62,
324,
303,
596,
62,
14323,
489,
1431,
62,
1516,
30062,
62,
38321,
62,
46616,
7,
25928,
11,
18645,
62,
10951,
11,
279,
13,
69,
22564,
62,
8818,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
13,
69,
22564,
62,
8818,
62,
1082,
452,
876,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26672,
488,
1616,
62,
7890,
28,
79,
13,
15908,
488,
1616,
62,
7890,
8,
198,
220,
220,
220,
376,
796,
6045,
611,
279,
13,
81,
11994,
318,
6045,
2073,
406,
17,
15667,
22203,
282,
7,
25928,
11,
279,
13,
81,
11994,
8,
628,
220,
220,
220,
611,
279,
13,
36733,
62,
7890,
13,
17143,
19482,
25,
198,
220,
220,
220,
220,
220,
220,
220,
314,
796,
399,
32152,
46189,
18843,
1352,
7,
36733,
62,
16302,
295,
11,
5391,
62,
9521,
28,
25928,
13,
7857,
7,
15,
828,
14174,
28,
17821,
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,
220,
220,
220,
220,
220,
220,
220,
11507,
62,
4906,
28,
79,
13,
36733,
62,
7890,
13,
17143,
2357,
62,
4906,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
314,
796,
279,
13,
36733,
62,
7890,
13,
49786,
7,
25928,
13,
421,
41909,
1300,
62,
13033,
7,
15,
11,
1502,
28,
17,
29720,
16485,
1453,
2736,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
314,
796,
45941,
13,
16345,
7,
40,
1635,
10706,
13,
35790,
62,
30854,
13,
421,
41909,
1300,
7,
2875,
28,
17,
38381,
16,
4357,
16488,
28,
16,
8,
1635,
357,
16,
13,
1220,
10706,
13,
35790,
62,
30854,
13,
29048,
8,
198,
220,
220,
220,
220,
220,
220,
220,
314,
796,
399,
32152,
38469,
19182,
7,
40,
11,
4866,
28,
25101,
8,
628,
220,
220,
220,
3186,
796,
1391,
6,
75,
17,
10354,
406,
17,
15667,
7,
25928,
11,
18645,
62,
10951,
38165,
198,
220,
220,
220,
611,
10706,
13,
27740,
6624,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5874,
7509,
796,
17106,
36259,
7509,
7,
25928,
28,
25928,
11,
5421,
278,
62,
3524,
28,
25928,
13,
7784,
278,
62,
3524,
22784,
14873,
320,
28,
15,
8,
198,
220,
220,
220,
1288,
361,
10706,
13,
27740,
6624,
352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5874,
7509,
796,
6550,
29487,
8019,
16,
35,
36259,
7509,
7,
25928,
11,
14873,
320,
28,
15,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5874,
7509,
796,
6045,
198,
220,
220,
220,
11507,
62,
13200,
796,
279,
13,
17143,
2357,
62,
13200,
611,
468,
35226,
7,
79,
11,
705,
17143,
2357,
62,
13200,
11537,
2073,
6045,
198,
220,
220,
220,
640,
62,
4169,
2848,
796,
11884,
36,
18173,
7575,
7447,
2848,
7,
429,
28,
429,
8,
628,
220,
220,
220,
1221,
1186,
1634,
796,
2262,
341,
560,
15642,
1186,
1634,
7,
46616,
28,
43,
11,
9529,
82,
28,
37,
11,
4238,
62,
7890,
28,
40,
11,
309,
28,
79,
13,
51,
11,
3186,
28,
29498,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
640,
62,
4169,
2848,
28,
2435,
62,
4169,
2848,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11507,
62,
13200,
28,
17143,
2357,
62,
13200,
11,
5874,
7509,
28,
41464,
7509,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
997,
62,
27160,
28,
22510,
62,
27160,
11,
1438,
11639,
90,
92,
62,
37,
53,
4458,
18982,
7,
79,
13,
3672,
4008,
628,
220,
220,
220,
1441,
1221,
1186,
1634,
11,
1391,
6,
25928,
10354,
10706,
11,
705,
7784,
560,
62,
10951,
10354,
18645,
62,
10951,
92,
198
] | 2.282562 | 2,810 |
"""
object_adventure.py
A text adventure with objects you can pick up and put down.
"""
# data setup
rooms = {
'empty': {'name': 'an empty room',
'east': 'bedroom', 'north': 'temple',
'contents': [],
'text': 'The stone floors and walls are cold and damp.'},
'temple': {'name': 'a small temple',
'east': 'torture', 'south': 'empty',
'contents': ['bench', 'bench', 'bench', 'statue'],
'text': 'This seems to be a place of worship and deep contemplation.'},
'torture': {'name': 'a torture chamber',
'west': 'temple', 'south': 'bedroom',
'contents': ['chains', 'thumbscrews'],
'text': 'There is a rack and an iron maiden against the wall\naand some dark stains on the floor.'},
'bedroom': {'name': 'a bedroom',
'north': 'torture', 'west': 'empty',
'contents': ['sheets', 'bed'],
'text': 'This is clearly a bedroom, but no one has slept\nhere in a long time.'}
}
directions = ['north', 'south', 'east', 'west']
current_room = rooms['empty']
carrying = []
# game loop
while True:
# display current location
print()
print('You are in {}.'.format(current_room['name']))
print(current_room['text'])
# display movable objects
if current_room['contents']:
print('In the room are: {}'.format(', '.join(current_room['contents'])))
# get user input
command = input('\nWhat do you do? ').strip()
# movement
if command in directions:
if command in current_room:
current_room = rooms[current_room[command]]
else:
# bad movement
print("You can't go that way.")
# quit game
elif command.lower() in ('q', 'quit'):
break
# gather objects
elif command.lower().split()[0] == 'get':
item = command.lower().split()[1]
if item in current_room['contents']:
current_room['contents'].remove(item)
carrying.append(item)
else:
print("I don't see that here.")
# get rid of objects
elif command.lower().split()[0] == 'drop':
item = command.lower().split()[1]
if item in carrying:
current_room['contents'].append(item)
carrying.remove(item)
else:
print("You aren't carrying that.")
# bad command
else:
print("I don't understand that command.") | [
37811,
198,
15252,
62,
324,
5388,
13,
9078,
198,
220,
198,
32,
2420,
8855,
351,
5563,
345,
460,
2298,
510,
290,
1234,
866,
13,
198,
37811,
198,
220,
198,
2,
1366,
9058,
198,
9649,
796,
1391,
198,
220,
220,
220,
705,
28920,
10354,
1391,
6,
3672,
10354,
705,
272,
6565,
2119,
3256,
220,
198,
220,
220,
220,
220,
220,
220,
220,
705,
23316,
10354,
705,
36269,
3256,
705,
43588,
10354,
705,
11498,
1154,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
3642,
658,
10354,
685,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
5239,
10354,
705,
464,
7815,
18570,
290,
7714,
389,
4692,
290,
21151,
2637,
5512,
198,
220,
220,
220,
705,
11498,
1154,
10354,
1391,
6,
3672,
10354,
705,
64,
1402,
12505,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
23316,
10354,
705,
83,
419,
495,
3256,
705,
35782,
10354,
705,
28920,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
3642,
658,
10354,
37250,
26968,
3256,
705,
26968,
3256,
705,
26968,
3256,
705,
14269,
518,
6,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
5239,
10354,
705,
1212,
2331,
284,
307,
257,
1295,
286,
11892,
290,
2769,
50152,
2637,
5512,
198,
220,
220,
220,
705,
83,
419,
495,
10354,
1391,
6,
3672,
10354,
705,
64,
11543,
11847,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7038,
10354,
705,
11498,
1154,
3256,
705,
35782,
10354,
705,
36269,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
3642,
658,
10354,
37250,
38861,
3256,
705,
400,
2178,
1416,
1809,
82,
6,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
5239,
10354,
705,
1858,
318,
257,
19127,
290,
281,
6953,
34827,
1028,
262,
3355,
59,
2616,
392,
617,
3223,
43329,
319,
262,
4314,
2637,
5512,
198,
220,
220,
220,
705,
36269,
10354,
1391,
6,
3672,
10354,
705,
64,
14043,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
43588,
10354,
705,
83,
419,
495,
3256,
705,
7038,
10354,
705,
28920,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
3642,
658,
10354,
37250,
42011,
3256,
705,
3077,
6,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
5239,
10354,
705,
1212,
318,
4084,
257,
14043,
11,
475,
645,
530,
468,
21256,
59,
77,
1456,
287,
257,
890,
640,
2637,
92,
198,
220,
220,
220,
1782,
198,
198,
12942,
507,
796,
37250,
43588,
3256,
705,
35782,
3256,
705,
23316,
3256,
705,
7038,
20520,
198,
198,
14421,
62,
3823,
796,
9519,
17816,
28920,
20520,
198,
198,
34993,
278,
796,
17635,
198,
220,
198,
2,
983,
9052,
198,
4514,
6407,
25,
198,
220,
220,
220,
1303,
3359,
1459,
4067,
198,
220,
220,
220,
3601,
3419,
198,
220,
220,
220,
3601,
10786,
1639,
389,
287,
23884,
2637,
13,
18982,
7,
14421,
62,
3823,
17816,
3672,
20520,
4008,
198,
220,
220,
220,
3601,
7,
14421,
62,
3823,
17816,
5239,
6,
12962,
198,
220,
220,
220,
1303,
3359,
1409,
540,
5563,
198,
220,
220,
220,
611,
1459,
62,
3823,
17816,
3642,
658,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
818,
262,
2119,
389,
25,
23884,
4458,
18982,
7,
3256,
45302,
22179,
7,
14421,
62,
3823,
17816,
3642,
658,
20520,
22305,
198,
220,
220,
220,
1303,
651,
2836,
5128,
198,
220,
220,
220,
3141,
796,
5128,
10786,
59,
77,
2061,
466,
345,
466,
30,
705,
737,
36311,
3419,
198,
220,
220,
220,
1303,
3356,
198,
220,
220,
220,
611,
3141,
287,
11678,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
3141,
287,
1459,
62,
3823,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1459,
62,
3823,
796,
9519,
58,
14421,
62,
3823,
58,
21812,
11907,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2089,
3356,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
1639,
460,
470,
467,
326,
835,
19570,
198,
220,
220,
220,
1303,
11238,
983,
198,
220,
220,
220,
1288,
361,
3141,
13,
21037,
3419,
287,
19203,
80,
3256,
705,
47391,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
1303,
6431,
5563,
198,
220,
220,
220,
1288,
361,
3141,
13,
21037,
22446,
35312,
3419,
58,
15,
60,
6624,
705,
1136,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
2378,
796,
3141,
13,
21037,
22446,
35312,
3419,
58,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2378,
287,
1459,
62,
3823,
17816,
3642,
658,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1459,
62,
3823,
17816,
3642,
658,
6,
4083,
28956,
7,
9186,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6872,
13,
33295,
7,
9186,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
40,
836,
470,
766,
326,
994,
19570,
198,
220,
220,
220,
1303,
651,
5755,
286,
5563,
198,
220,
220,
220,
1288,
361,
3141,
13,
21037,
22446,
35312,
3419,
58,
15,
60,
6624,
705,
14781,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
2378,
796,
3141,
13,
21037,
22446,
35312,
3419,
58,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2378,
287,
6872,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1459,
62,
3823,
17816,
3642,
658,
6,
4083,
33295,
7,
9186,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6872,
13,
28956,
7,
9186,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
1639,
3588,
470,
6872,
326,
19570,
198,
220,
220,
220,
1303,
2089,
3141,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
40,
836,
470,
1833,
326,
3141,
19570
] | 2.417505 | 994 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 Alibaba Group Holding Limited. 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.
#
import concurrent.futures
import io
from functools import lru_cache
import msgpack
import simdjson
from graphscope.framework import dag_utils
from graphscope.nx.utils.misc import clear_mutation_cache
from graphscope.proto import graph_def_pb2
from graphscope.proto import types_pb2
__all__ = ["Cache"]
class Cache:
"""A adhoc cache for graphscope.nx Graph.
The Cache is consists of two kind of cache: the iteration batch cache for
__iter__ and the LRU cache for cache miss.
"""
def warmup(self):
"""Warm up the iteration cache."""
self._len = self._graph.number_of_nodes()
if self._len > 1000:
# avoid much small graphs to compete thread resource
self.enable_iter_cache = True
self._async_fetch_node_id_cache(0)
self._async_fetch_succ_cache(0)
self._async_fetch_node_attr_cache(0)
self._async_fetch_succ_attr_cache(0)
# LRU Caches
@lru_cache(1000000)
@lru_cache(1000000)
@lru_cache(1000000)
@lru_cache(1000000)
@lru_cache(1000000)
def align_node_attr_cache(self):
"""Check and align the node attr cache with node id cache"""
if self.enable_iter_cache and self.node_attr_align is False:
f = self.futures["node_attr"]
if f is not None:
start_gid, self.node_attr_cache = f.result()
if start_gid == self.iter_pre_gid:
# align to current node_id_cache
if self.iter_gid != self.iter_pre_gid:
self._async_fetch_node_attr_cache(self.iter_gid)
self.node_attr_align = True
else:
# not align to current node_id_cache, should fetch again
self._async_fetch_node_attr_cache(self.iter_pre_gid)
return self.node_attr_align
def align_succ_cache(self):
"""Check and align the succ neighbor cache with node id cache"""
if self.enable_iter_cache and self.succ_align is False:
f = self.futures["succ"]
start_gid, self.succ_cache = f.result()
if start_gid == self.iter_pre_gid:
if self.iter_gid != self.iter_pre_gid:
self._async_fetch_succ_cache(self.iter_gid)
self.succ_align = True
else:
self._async_fetch_succ_cache(self.iter_pre_gid)
return self.succ_align
def align_succ_attr_cache(self):
"""Check and align the succ neighbor attr cache with node id cache"""
if self.enable_iter_cache and self.succ_attr_align is False:
f = self.futures["succ_attr"]
if f is not None:
start_gid, self.succ_attr_cache = f.result()
if start_gid == self.iter_pre_gid:
if self.iter_gid != self.iter_pre_gid:
self._async_fetch_succ_attr_cache(self.iter_gid)
self.succ_attr_align = True
else:
self._async_fetch_succ_attr_cache(self.iter_pre_gid)
return self.succ_attr_align
def align_pred_cache(self):
"""Check and align the pred neighbor cache with node id cache"""
if self.enable_iter_cache and self.pred_align is False:
if self.futures["pred"] is None:
self._async_fetch_pred_cache(self.iter_pre_gid)
f = self.futures["pred"]
start_gid, self.pred_cache = f.result()
if start_gid == self.iter_pre_gid:
if self.iter_gid != self.iter_pre_gid:
self._async_fetch_pred_cache(self.iter_gid)
self.pred_align = True
else:
print("pred not align", start_gid, self.iter_pre_gid)
self._async_fetch_pred_cache(self.iter_pre_gid)
return self.pred_align
def align_pred_attr_cache(self):
"""Check and align the pred neighbor attr cache with node id cache"""
if self.enable_iter_cache and self.pred_attr_align is False:
if self.futures["pred_attr"] is None:
self._async_fetch_pred_attr_cache(self.iter_pre_gid)
f = self.futures["pred_attr"]
start_gid, self.pred_attr_cache = f.result()
if start_gid == self.iter_pre_gid:
if self.iter_gid != self.iter_pre_gid:
self._async_fetch_pred_attr_cache(self.iter_gid)
self.pred_attr_align = True
else:
self._async_fetch_pred_attr_cache(self.iter_pre_gid)
return self.pred_attr_align
@clear_mutation_cache
@clear_mutation_cache
@clear_mutation_cache
def clear(self):
"""Clear batch cache and lru cache, reset the status and warmup again"""
if self.enable_iter_cache:
self.shutdown()
self.enable_iter_cache = False
self.iter_gid = 0
self.iter_pre_gid = 0
self.id2i.clear()
self.node_id_cache = ()
self.node_attr_cache = ()
self.succ_cache = ()
self.succ_attr_cache = ()
self.pred_cache = ()
self.pred_attr_cache = ()
self.node_attr_align = (
self.succ_align
) = self.succ_attr_align = self.pred_align = self.pred_attr_align = False
self.get_node_attr.cache_clear()
self.get_successors.cache_clear()
self.get_succ_attr.cache_clear()
self.get_predecessors.cache_clear()
self.get_pred_attr.cache_clear()
self.warmup()
def clear_node_attr_cache(self):
"""Clear the node attr cache"""
if self.futures["node_attr"] is not None:
self.futures["node_attr"].cancel()
if self.futures["node_attr"] is not None:
try:
self.futures["node_attr"].result()
except concurrent.futures.CancelledError:
pass
self.futures["node_attr"] = None
self.node_attr_cache = ()
self.get_node_attr.cache_clear()
self.node_attr_align = False
def clear_neighbor_attr_cache(self):
"""Clear the neighbor attr cache"""
if self.futures["succ_attr"] is not None:
self.futures["succ_attr"].cancel()
if self.futures["pred_attr"] is not None:
self.futures["pred_attr"].cancel()
if self.futures["succ_attr"] is not None:
try:
self.futures["succ_attr"].result()
except concurrent.futures.CancelledError:
pass
if self.futures["pred_attr"] is not None:
try:
self.futures["pred_attr"].result()
except concurrent.futures.CancelledError:
pass
self.futures["succ_attr"] = None
self.futures["pred_attr"] = None
self.succ_attr_cache = ()
self.pred_attr_cache = ()
self.get_succ_attr.cache_clear()
self.get_pred_attr.cache_clear()
self.succ_attr_align = False
self.pred_attr_align = False
def get_neighbors(graph, n, pred=False):
"""Get the neighbors of node in graph.
Parameters
----------
graph:
the graph to query.
n: node
the node to get neighbors.
report_type:
the report type of report graph operation,
types_pb2.SUCCS_BY_NODE: get the successors of node,
types_pb2.PREDS_BY_NODE: get the predecessors of node,
"""
if graph.graph_type == graph_def_pb2.ARROW_PROPERTY:
n = graph._convert_to_label_id_tuple(n)
report_t = types_pb2.PREDS_BY_NODE if pred else types_pb2.SUCCS_BY_NODE
op = dag_utils.report_graph(graph, report_t, node=simdjson.dumps(n).encode("utf-8"))
archive = op.eval()
return msgpack.unpackb(archive.get_bytes(), use_list=False)
def get_neighbors_attr(graph, n, pred=False):
"""Get the neighbors attr of node in graph.
Parameters
----------
graph:
the graph to query.
n: node
the node to get neighbors.
report_type:
the report type of report graph operation,
types_pb2.SUCC_ATTR_BY_NODE: get the successors attr of node,
types_pb2.PRED_ATTR_BY_NODE: get the predecessors attr of node,
Returns
-------
attr: tuple
"""
if graph.graph_type == graph_def_pb2.ARROW_PROPERTY:
n = graph._convert_to_label_id_tuple(n)
report_t = types_pb2.PRED_ATTR_BY_NODE if pred else types_pb2.SUCC_ATTR_BY_NODE
op = dag_utils.report_graph(graph, report_t, node=simdjson.dumps(n).encode("utf-8"))
archive = op.eval()
return simdjson.loads(archive.get_bytes())
def get_node_data(graph, n):
"""Returns the attribute dictionary of node n.
This is identical to `G[n]`.
Parameters
----------
n : nodes
Returns
-------
node_dict : dictionary
The node attribute dictionary.
Examples
--------
>>> G = nx.path_graph(4) # or DiGraph etc
>>> G[0]
{}
Warning: Assigning to `G[n]` is not permitted.
But it is safe to assign attributes `G[n]['foo']`
>>> G[0]['weight'] = 7
>>> G[0]['weight']
7
>>> G = nx.path_graph(4) # or DiGraph etc
>>> G.get_node_data(0, 1)
{}
"""
if graph.graph_type == graph_def_pb2.ARROW_PROPERTY:
n = graph._convert_to_label_id_tuple(n)
op = dag_utils.report_graph(
graph, types_pb2.NODE_DATA, node=simdjson.dumps(n).encode("utf-8")
)
archive = op.eval()
return msgpack.loads(archive.get_bytes(), use_list=False)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
12131,
41992,
4912,
31703,
15302,
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,
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,
24580,
13,
69,
315,
942,
198,
11748,
33245,
198,
6738,
1257,
310,
10141,
1330,
300,
622,
62,
23870,
198,
198,
11748,
31456,
8002,
198,
11748,
985,
67,
17752,
198,
198,
6738,
4823,
29982,
13,
30604,
1330,
48924,
62,
26791,
198,
6738,
4823,
29982,
13,
77,
87,
13,
26791,
13,
44374,
1330,
1598,
62,
76,
7094,
62,
23870,
198,
6738,
4823,
29982,
13,
1676,
1462,
1330,
4823,
62,
4299,
62,
40842,
17,
198,
6738,
4823,
29982,
13,
1676,
1462,
1330,
3858,
62,
40842,
17,
198,
198,
834,
439,
834,
796,
14631,
30562,
8973,
628,
198,
4871,
34088,
25,
198,
220,
220,
220,
37227,
32,
512,
71,
420,
12940,
329,
4823,
29982,
13,
77,
87,
29681,
13,
198,
220,
220,
220,
383,
34088,
318,
10874,
286,
734,
1611,
286,
12940,
25,
262,
24415,
15458,
12940,
329,
198,
220,
220,
220,
11593,
2676,
834,
290,
262,
37491,
52,
12940,
329,
12940,
2051,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
5814,
929,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
54,
1670,
510,
262,
24415,
12940,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
11925,
796,
2116,
13557,
34960,
13,
17618,
62,
1659,
62,
77,
4147,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13557,
11925,
1875,
8576,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3368,
881,
1402,
28770,
284,
9320,
4704,
8271,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
21633,
62,
2676,
62,
23870,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
17440,
62,
312,
62,
23870,
7,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
2385,
535,
62,
23870,
7,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
17440,
62,
35226,
62,
23870,
7,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
2385,
535,
62,
35226,
62,
23870,
7,
15,
8,
628,
220,
220,
220,
1303,
37491,
52,
327,
3694,
198,
220,
220,
220,
2488,
75,
622,
62,
23870,
7,
16,
10535,
8,
628,
220,
220,
220,
2488,
75,
622,
62,
23870,
7,
16,
10535,
8,
628,
220,
220,
220,
2488,
75,
622,
62,
23870,
7,
16,
10535,
8,
628,
220,
220,
220,
2488,
75,
622,
62,
23870,
7,
16,
10535,
8,
628,
220,
220,
220,
2488,
75,
622,
62,
23870,
7,
16,
10535,
8,
628,
220,
220,
220,
825,
10548,
62,
17440,
62,
35226,
62,
23870,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
9787,
290,
10548,
262,
10139,
708,
81,
12940,
351,
10139,
4686,
12940,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
21633,
62,
2676,
62,
23870,
290,
2116,
13,
17440,
62,
35226,
62,
31494,
318,
10352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
796,
2116,
13,
69,
315,
942,
14692,
17440,
62,
35226,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
277,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
70,
312,
11,
2116,
13,
17440,
62,
35226,
62,
23870,
796,
277,
13,
20274,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
923,
62,
70,
312,
6624,
2116,
13,
2676,
62,
3866,
62,
70,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
10548,
284,
1459,
10139,
62,
312,
62,
23870,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
2676,
62,
70,
312,
14512,
2116,
13,
2676,
62,
3866,
62,
70,
312,
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,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
17440,
62,
35226,
62,
23870,
7,
944,
13,
2676,
62,
70,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17440,
62,
35226,
62,
31494,
796,
6407,
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,
1303,
407,
10548,
284,
1459,
10139,
62,
312,
62,
23870,
11,
815,
21207,
757,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
17440,
62,
35226,
62,
23870,
7,
944,
13,
2676,
62,
3866,
62,
70,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
17440,
62,
35226,
62,
31494,
628,
220,
220,
220,
825,
10548,
62,
2385,
535,
62,
23870,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
9787,
290,
10548,
262,
17458,
4780,
12940,
351,
10139,
4686,
12940,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
21633,
62,
2676,
62,
23870,
290,
2116,
13,
2385,
535,
62,
31494,
318,
10352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
796,
2116,
13,
69,
315,
942,
14692,
2385,
535,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
70,
312,
11,
2116,
13,
2385,
535,
62,
23870,
796,
277,
13,
20274,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
923,
62,
70,
312,
6624,
2116,
13,
2676,
62,
3866,
62,
70,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
2676,
62,
70,
312,
14512,
2116,
13,
2676,
62,
3866,
62,
70,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
2385,
535,
62,
23870,
7,
944,
13,
2676,
62,
70,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2385,
535,
62,
31494,
796,
6407,
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,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
2385,
535,
62,
23870,
7,
944,
13,
2676,
62,
3866,
62,
70,
312,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
2385,
535,
62,
31494,
628,
220,
220,
220,
825,
10548,
62,
2385,
535,
62,
35226,
62,
23870,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
9787,
290,
10548,
262,
17458,
4780,
708,
81,
12940,
351,
10139,
4686,
12940,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
21633,
62,
2676,
62,
23870,
290,
2116,
13,
2385,
535,
62,
35226,
62,
31494,
318,
10352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
796,
2116,
13,
69,
315,
942,
14692,
2385,
535,
62,
35226,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
277,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
70,
312,
11,
2116,
13,
2385,
535,
62,
35226,
62,
23870,
796,
277,
13,
20274,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
923,
62,
70,
312,
6624,
2116,
13,
2676,
62,
3866,
62,
70,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
2676,
62,
70,
312,
14512,
2116,
13,
2676,
62,
3866,
62,
70,
312,
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,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
2385,
535,
62,
35226,
62,
23870,
7,
944,
13,
2676,
62,
70,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2385,
535,
62,
35226,
62,
31494,
796,
6407,
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,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
2385,
535,
62,
35226,
62,
23870,
7,
944,
13,
2676,
62,
3866,
62,
70,
312,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
2385,
535,
62,
35226,
62,
31494,
628,
220,
220,
220,
825,
10548,
62,
28764,
62,
23870,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
9787,
290,
10548,
262,
2747,
4780,
12940,
351,
10139,
4686,
12940,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
21633,
62,
2676,
62,
23870,
290,
2116,
13,
28764,
62,
31494,
318,
10352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
69,
315,
942,
14692,
28764,
8973,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
28764,
62,
23870,
7,
944,
13,
2676,
62,
3866,
62,
70,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
796,
2116,
13,
69,
315,
942,
14692,
28764,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
70,
312,
11,
2116,
13,
28764,
62,
23870,
796,
277,
13,
20274,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
923,
62,
70,
312,
6624,
2116,
13,
2676,
62,
3866,
62,
70,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
2676,
62,
70,
312,
14512,
2116,
13,
2676,
62,
3866,
62,
70,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
28764,
62,
23870,
7,
944,
13,
2676,
62,
70,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
28764,
62,
31494,
796,
6407,
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,
3601,
7203,
28764,
407,
10548,
1600,
923,
62,
70,
312,
11,
2116,
13,
2676,
62,
3866,
62,
70,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
28764,
62,
23870,
7,
944,
13,
2676,
62,
3866,
62,
70,
312,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
28764,
62,
31494,
628,
220,
220,
220,
825,
10548,
62,
28764,
62,
35226,
62,
23870,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
9787,
290,
10548,
262,
2747,
4780,
708,
81,
12940,
351,
10139,
4686,
12940,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
21633,
62,
2676,
62,
23870,
290,
2116,
13,
28764,
62,
35226,
62,
31494,
318,
10352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
69,
315,
942,
14692,
28764,
62,
35226,
8973,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
28764,
62,
35226,
62,
23870,
7,
944,
13,
2676,
62,
3866,
62,
70,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
796,
2116,
13,
69,
315,
942,
14692,
28764,
62,
35226,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
62,
70,
312,
11,
2116,
13,
28764,
62,
35226,
62,
23870,
796,
277,
13,
20274,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
923,
62,
70,
312,
6624,
2116,
13,
2676,
62,
3866,
62,
70,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
2676,
62,
70,
312,
14512,
2116,
13,
2676,
62,
3866,
62,
70,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
28764,
62,
35226,
62,
23870,
7,
944,
13,
2676,
62,
70,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
28764,
62,
35226,
62,
31494,
796,
6407,
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,
2116,
13557,
292,
13361,
62,
69,
7569,
62,
28764,
62,
35226,
62,
23870,
7,
944,
13,
2676,
62,
3866,
62,
70,
312,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
28764,
62,
35226,
62,
31494,
628,
220,
220,
220,
2488,
20063,
62,
76,
7094,
62,
23870,
628,
220,
220,
220,
2488,
20063,
62,
76,
7094,
62,
23870,
628,
220,
220,
220,
2488,
20063,
62,
76,
7094,
62,
23870,
628,
220,
220,
220,
825,
1598,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
19856,
15458,
12940,
290,
300,
622,
12940,
11,
13259,
262,
3722,
290,
5814,
929,
757,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
21633,
62,
2676,
62,
23870,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
49625,
2902,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
21633,
62,
2676,
62,
23870,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2676,
62,
70,
312,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2676,
62,
3866,
62,
70,
312,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
312,
17,
72,
13,
20063,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17440,
62,
312,
62,
23870,
796,
7499,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17440,
62,
35226,
62,
23870,
796,
7499,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2385,
535,
62,
23870,
796,
7499,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2385,
535,
62,
35226,
62,
23870,
796,
7499,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
28764,
62,
23870,
796,
7499,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
28764,
62,
35226,
62,
23870,
796,
7499,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17440,
62,
35226,
62,
31494,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2385,
535,
62,
31494,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
796,
2116,
13,
2385,
535,
62,
35226,
62,
31494,
796,
2116,
13,
28764,
62,
31494,
796,
2116,
13,
28764,
62,
35226,
62,
31494,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1136,
62,
17440,
62,
35226,
13,
23870,
62,
20063,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1136,
62,
13138,
669,
13,
23870,
62,
20063,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1136,
62,
2385,
535,
62,
35226,
13,
23870,
62,
20063,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1136,
62,
28764,
721,
23295,
13,
23870,
62,
20063,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1136,
62,
28764,
62,
35226,
13,
23870,
62,
20063,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
31975,
929,
3419,
628,
220,
220,
220,
825,
1598,
62,
17440,
62,
35226,
62,
23870,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
19856,
262,
10139,
708,
81,
12940,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
69,
315,
942,
14692,
17440,
62,
35226,
8973,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
69,
315,
942,
14692,
17440,
62,
35226,
1,
4083,
66,
21130,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
69,
315,
942,
14692,
17440,
62,
35226,
8973,
318,
407,
6045,
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,
2116,
13,
69,
315,
942,
14692,
17440,
62,
35226,
1,
4083,
20274,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
24580,
13,
69,
315,
942,
13,
34,
590,
3353,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
69,
315,
942,
14692,
17440,
62,
35226,
8973,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17440,
62,
35226,
62,
23870,
796,
7499,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1136,
62,
17440,
62,
35226,
13,
23870,
62,
20063,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17440,
62,
35226,
62,
31494,
796,
10352,
628,
220,
220,
220,
825,
1598,
62,
710,
394,
2865,
62,
35226,
62,
23870,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
19856,
262,
4780,
708,
81,
12940,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
69,
315,
942,
14692,
2385,
535,
62,
35226,
8973,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
69,
315,
942,
14692,
2385,
535,
62,
35226,
1,
4083,
66,
21130,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
69,
315,
942,
14692,
28764,
62,
35226,
8973,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
69,
315,
942,
14692,
28764,
62,
35226,
1,
4083,
66,
21130,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
69,
315,
942,
14692,
2385,
535,
62,
35226,
8973,
318,
407,
6045,
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,
2116,
13,
69,
315,
942,
14692,
2385,
535,
62,
35226,
1,
4083,
20274,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
24580,
13,
69,
315,
942,
13,
34,
590,
3353,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
69,
315,
942,
14692,
28764,
62,
35226,
8973,
318,
407,
6045,
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,
2116,
13,
69,
315,
942,
14692,
28764,
62,
35226,
1,
4083,
20274,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
24580,
13,
69,
315,
942,
13,
34,
590,
3353,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
69,
315,
942,
14692,
2385,
535,
62,
35226,
8973,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
69,
315,
942,
14692,
28764,
62,
35226,
8973,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2385,
535,
62,
35226,
62,
23870,
796,
7499,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
28764,
62,
35226,
62,
23870,
796,
7499,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1136,
62,
2385,
535,
62,
35226,
13,
23870,
62,
20063,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1136,
62,
28764,
62,
35226,
13,
23870,
62,
20063,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2385,
535,
62,
35226,
62,
31494,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
28764,
62,
35226,
62,
31494,
796,
10352,
628,
198,
4299,
651,
62,
710,
394,
32289,
7,
34960,
11,
299,
11,
2747,
28,
25101,
2599,
198,
220,
220,
220,
37227,
3855,
262,
12020,
286,
10139,
287,
4823,
13,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
4823,
25,
198,
220,
220,
220,
220,
220,
220,
220,
262,
4823,
284,
12405,
13,
198,
220,
220,
220,
299,
25,
10139,
198,
220,
220,
220,
220,
220,
220,
220,
262,
10139,
284,
651,
12020,
13,
198,
220,
220,
220,
989,
62,
4906,
25,
198,
220,
220,
220,
220,
220,
220,
220,
262,
989,
2099,
286,
989,
4823,
4905,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3858,
62,
40842,
17,
13,
12564,
4093,
50,
62,
17513,
62,
45,
16820,
25,
651,
262,
41491,
286,
10139,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3858,
62,
40842,
17,
13,
4805,
1961,
50,
62,
17513,
62,
45,
16820,
25,
651,
262,
27677,
286,
10139,
11,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
4823,
13,
34960,
62,
4906,
6624,
4823,
62,
4299,
62,
40842,
17,
13,
26465,
3913,
62,
4805,
31054,
9936,
25,
198,
220,
220,
220,
220,
220,
220,
220,
299,
796,
4823,
13557,
1102,
1851,
62,
1462,
62,
18242,
62,
312,
62,
83,
29291,
7,
77,
8,
198,
220,
220,
220,
989,
62,
83,
796,
3858,
62,
40842,
17,
13,
4805,
1961,
50,
62,
17513,
62,
45,
16820,
611,
2747,
2073,
3858,
62,
40842,
17,
13,
12564,
4093,
50,
62,
17513,
62,
45,
16820,
198,
220,
220,
220,
1034,
796,
48924,
62,
26791,
13,
13116,
62,
34960,
7,
34960,
11,
989,
62,
83,
11,
10139,
28,
14323,
67,
17752,
13,
67,
8142,
7,
77,
737,
268,
8189,
7203,
40477,
12,
23,
48774,
198,
220,
220,
220,
15424,
796,
1034,
13,
18206,
3419,
198,
220,
220,
220,
1441,
31456,
8002,
13,
403,
8002,
65,
7,
17474,
13,
1136,
62,
33661,
22784,
779,
62,
4868,
28,
25101,
8,
628,
198,
4299,
651,
62,
710,
394,
32289,
62,
35226,
7,
34960,
11,
299,
11,
2747,
28,
25101,
2599,
198,
220,
220,
220,
37227,
3855,
262,
12020,
708,
81,
286,
10139,
287,
4823,
13,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
4823,
25,
198,
220,
220,
220,
220,
220,
220,
220,
262,
4823,
284,
12405,
13,
198,
220,
220,
220,
299,
25,
10139,
198,
220,
220,
220,
220,
220,
220,
220,
262,
10139,
284,
651,
12020,
13,
198,
220,
220,
220,
989,
62,
4906,
25,
198,
220,
220,
220,
220,
220,
220,
220,
262,
989,
2099,
286,
989,
4823,
4905,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3858,
62,
40842,
17,
13,
12564,
4093,
62,
1404,
5446,
62,
17513,
62,
45,
16820,
25,
651,
262,
41491,
708,
81,
286,
10139,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3858,
62,
40842,
17,
13,
4805,
1961,
62,
1404,
5446,
62,
17513,
62,
45,
16820,
25,
651,
262,
27677,
708,
81,
286,
10139,
11,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
708,
81,
25,
46545,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
4823,
13,
34960,
62,
4906,
6624,
4823,
62,
4299,
62,
40842,
17,
13,
26465,
3913,
62,
4805,
31054,
9936,
25,
198,
220,
220,
220,
220,
220,
220,
220,
299,
796,
4823,
13557,
1102,
1851,
62,
1462,
62,
18242,
62,
312,
62,
83,
29291,
7,
77,
8,
198,
220,
220,
220,
989,
62,
83,
796,
3858,
62,
40842,
17,
13,
4805,
1961,
62,
1404,
5446,
62,
17513,
62,
45,
16820,
611,
2747,
2073,
3858,
62,
40842,
17,
13,
12564,
4093,
62,
1404,
5446,
62,
17513,
62,
45,
16820,
198,
220,
220,
220,
1034,
796,
48924,
62,
26791,
13,
13116,
62,
34960,
7,
34960,
11,
989,
62,
83,
11,
10139,
28,
14323,
67,
17752,
13,
67,
8142,
7,
77,
737,
268,
8189,
7203,
40477,
12,
23,
48774,
198,
220,
220,
220,
15424,
796,
1034,
13,
18206,
3419,
198,
220,
220,
220,
1441,
985,
67,
17752,
13,
46030,
7,
17474,
13,
1136,
62,
33661,
28955,
628,
198,
4299,
651,
62,
17440,
62,
7890,
7,
34960,
11,
299,
2599,
198,
220,
220,
220,
37227,
35561,
262,
11688,
22155,
286,
10139,
299,
13,
628,
220,
220,
220,
770,
318,
10411,
284,
4600,
38,
58,
77,
60,
44646,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
299,
1058,
13760,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
10139,
62,
11600,
1058,
22155,
198,
220,
220,
220,
220,
220,
220,
220,
383,
10139,
11688,
22155,
13,
628,
220,
220,
220,
21066,
198,
220,
220,
220,
24200,
198,
220,
220,
220,
13163,
402,
796,
299,
87,
13,
6978,
62,
34960,
7,
19,
8,
220,
1303,
393,
6031,
37065,
3503,
198,
220,
220,
220,
13163,
402,
58,
15,
60,
198,
220,
220,
220,
23884,
628,
220,
220,
220,
15932,
25,
2195,
38944,
284,
4600,
38,
58,
77,
60,
63,
318,
407,
10431,
13,
198,
220,
220,
220,
887,
340,
318,
3338,
284,
8333,
12608,
4600,
38,
58,
77,
7131,
6,
21943,
20520,
63,
628,
220,
220,
220,
13163,
402,
58,
15,
7131,
6,
6551,
20520,
796,
767,
198,
220,
220,
220,
13163,
402,
58,
15,
7131,
6,
6551,
20520,
198,
220,
220,
220,
767,
628,
220,
220,
220,
13163,
402,
796,
299,
87,
13,
6978,
62,
34960,
7,
19,
8,
220,
1303,
393,
6031,
37065,
3503,
198,
220,
220,
220,
13163,
402,
13,
1136,
62,
17440,
62,
7890,
7,
15,
11,
352,
8,
198,
220,
220,
220,
23884,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
4823,
13,
34960,
62,
4906,
6624,
4823,
62,
4299,
62,
40842,
17,
13,
26465,
3913,
62,
4805,
31054,
9936,
25,
198,
220,
220,
220,
220,
220,
220,
220,
299,
796,
4823,
13557,
1102,
1851,
62,
1462,
62,
18242,
62,
312,
62,
83,
29291,
7,
77,
8,
198,
220,
220,
220,
1034,
796,
48924,
62,
26791,
13,
13116,
62,
34960,
7,
198,
220,
220,
220,
220,
220,
220,
220,
4823,
11,
3858,
62,
40842,
17,
13,
45,
16820,
62,
26947,
11,
10139,
28,
14323,
67,
17752,
13,
67,
8142,
7,
77,
737,
268,
8189,
7203,
40477,
12,
23,
4943,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
15424,
796,
1034,
13,
18206,
3419,
198,
220,
220,
220,
1441,
31456,
8002,
13,
46030,
7,
17474,
13,
1136,
62,
33661,
22784,
779,
62,
4868,
28,
25101,
8,
198
] | 2.134876 | 4,797 |
"""Example of assigning a variable."""
user_name = input("What is your name? ")
| [
37811,
16281,
286,
38875,
257,
7885,
526,
15931,
198,
7220,
62,
3672,
796,
5128,
7203,
2061,
318,
534,
1438,
30,
366,
8,
198
] | 3.478261 | 23 |
# See LICENSE for licensing information.
#
# Copyright (c) 2021 Regents of the University of California and The Board
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
import os
import datetime
from shutil import copyfile
from subprocess import call, DEVNULL, STDOUT
from re import findall
from .core import core
from .test_bench import test_bench
from .test_data import test_data
from .sim_cache import sim_cache
import debug
from globals import OPTS, print_time
class verification:
"""
Class to generate files for verification and verify the design by running
EDA tools.
"""
def verify(self):
""" Run the verifier. """
debug.print_raw("Initializing verification...")
self.prepare_files()
if OPTS.simulate:
self.simulate()
if OPTS.synthesize:
self.synthesize()
debug.print_raw("Verification completed.")
def simulate(self):
"""
Save required files and simulate the design by running an EDA tool's
simulator.
"""
debug.info(1, "Initializing simulation...")
debug.info(1, "Writing simulation files...")
start_time = datetime.datetime.now()
# Write the DRAM file
dram_path = OPTS.temp_path + "dram.v"
debug.info(1, "Verilog (DRAM): Writing to {}".format(dram_path))
self.sim_cache.dram.sim_dram_write(dram_path)
# Write the test bench file
tb_path = OPTS.temp_path + "test_bench.v"
debug.info(1, "Verilog (Test bench): Writing to {}".format(tb_path))
self.tb.test_bench_write(tb_path)
# Write the test data file
data_path = OPTS.temp_path + "test_data.v"
debug.info(1, "Verilog (Test data): Writing to {}".format(data_path))
self.data.generate_data(OPTS.sim_size)
self.data.test_data_write(data_path)
# Run FuseSoc for simulation
debug.info(1, "Running FuseSoC for simulation...")
self.run_fusesoc(self.name, self.core.core_name, OPTS.temp_path, True)
# Check the result of the simulation
self.check_sim_result(OPTS.temp_path, "icarus.log")
print_time("Simulation", datetime.datetime.now(), start_time)
def synthesize(self):
"""
Save required files and synthesize the design by running an EDA tool's
synthesizer.
"""
debug.info(1, "Initializing synthesis...")
start_time = datetime.datetime.now()
# Convert SRAM modules to blackbox
debug.info(1, "Converting OpenRAM modules to blackbox...")
self.convert_to_blacbox(OPTS.temp_path + OPTS.tag_array_name + ".v")
self.convert_to_blacbox(OPTS.temp_path + OPTS.data_array_name + ".v")
if OPTS.replacement_policy.has_sram_array():
self.convert_to_blacbox(OPTS.temp_path + OPTS.use_array_name + ".v")
# Run FuseSoc for synthesis
debug.info(1, "Running FuseSoC for synthesis...")
self.run_fusesoc(self.name, self.core.core_name, OPTS.temp_path, False)
# Check the result of the synthesis
self.check_synth_result(OPTS.temp_path, "yosys.log")
print_time("Synthesis", datetime.datetime.now(), start_time)
def prepare_files(self):
""" Prepare common files among simulation and synthesis. """
# Write the CORE file
core_path = OPTS.temp_path + "verify.core"
debug.info(1, "CORE: Writing to {}".format(core_path))
self.core.core_write(core_path)
# Copy the generated cache Verilog file
cache_path = OPTS.temp_path + self.name + ".v"
debug.info(1, "Copying the cache design file to the temp subfolder")
copyfile(OPTS.output_path + self.name + ".v", cache_path)
if OPTS.run_openram:
# Copy the configuration files
debug.info(1, "Copying the config files to the temp subfolder")
self.copy_config_file(OPTS.data_array_name + "_config.py", OPTS.temp_path)
self.copy_config_file(OPTS.tag_array_name + "_config.py", OPTS.temp_path)
# Random replacement policy doesn't need a separate SRAM array
if OPTS.replacement_policy.has_sram_array():
self.copy_config_file(OPTS.use_array_name + "_config.py", OPTS.temp_path)
# Run OpenRAM to generate Verilog files of SRAMs
debug.info(1, "Running OpenRAM for the data array...")
self.run_openram("{}_config.py".format(OPTS.temp_path + OPTS.data_array_name))
debug.info(1, "Running OpenRAM for the tag array...")
self.run_openram("{}_config.py".format(OPTS.temp_path + OPTS.tag_array_name))
# Random replacement policy doesn't need a separate SRAM array
if OPTS.replacement_policy.has_sram_array():
debug.info(1, "Running OpenRAM for the use array...")
self.run_openram("{}_config.py".format(OPTS.temp_path + OPTS.use_array_name))
else:
debug.info(1, "Skipping to run OpenRAM")
def run_openram(self, config_path):
""" Run OpenRAM to generate Verilog modules. """
openram_command = "python3 $OPENRAM_HOME/openram.py"
if call("{0} {1}".format(openram_command, config_path),
cwd=OPTS.temp_path,
shell=True,
stdout=self.stdout,
stderr=self.stderr) != 0:
debug.error("OpenRAM failed!", -1)
if not OPTS.keep_openram_files:
for file in os.listdir(OPTS.temp_path):
file_path = OPTS.temp_path + file
if not os.path.isdir(file_path) and all([x not in file for x in [".v", ".py", ".core"]]):
os.remove(file_path)
def run_fusesoc(self, library_name, core_name, path, is_sim):
""" Run FuseSoC for simulation or synthesis. """
fusesoc_library_command = "fusesoc library add {0} {1}".format(library_name,
path)
fusesoc_run_command = "fusesoc run --target={0} --no-export {1}".format("sim" if is_sim else "syn",
core_name)
debug.info(1, "Adding {} core as library...".format("simulation" if is_sim else "synthesis"))
debug.info(1, "Running the {}...".format("simulation" if is_sim else "synthesis"))
# Add the CORE file as a library
if call(fusesoc_library_command,
cwd=path,
shell=True,
stdout=self.stdout,
stderr=self.stderr) != 0:
debug.error("FuseSoC failed to add library!", -1)
# Run the library for simulation or synthesis
if call(fusesoc_run_command,
cwd=path,
shell=True,
stdout=self.stdout,
stderr=self.stderr) != 0:
debug.error("FuseSoC failed to run!", -1)
# Delete the temporary CONF file.
# If this file is not deleted, it can cause syntheses to fail in the
# future.
os.remove(path + "fusesoc.conf")
def copy_config_file(self, file_name, dest):
""" Copy and modify the config file for simulation and synthesis. """
new_file = open(dest + file_name, "w")
with open(OPTS.output_path + file_name) as f:
for line in f:
if line.startswith("output_path"):
new_file.write("output_path = \"{}\"\n".format(dest))
else:
new_file.write(line)
# Verification needs only the Verilog files.
# This option will decrease OpenRAM's runtime (hopefully).
new_file.write("netlist_only = True\n")
new_file.close()
def convert_to_blacbox(self, file_path):
""" Convert the given Verilog module file to blackbox. """
keep = []
# Save blackbox file as "filename_bb.v"
bb_file_path = file_path[:-2] + "_bb.v"
with open(file_path, "r") as f:
delete = False
for line in f:
if line.lstrip().startswith("reg"):
delete = True
if not delete:
keep.append(line)
keep.append("endmodule\n")
f = open(bb_file_path, "w")
f.writelines(keep)
f.close()
def check_synth_result(self, path, file_name):
""" Read the log file of the simulation. """
error_prefix = "found and reported"
# Check the error count lines
with open("{0}build/{1}/syn-yosys/{2}".format(path,
self.core.core_name.replace(":", "_"),
file_name)) as f:
for line in f:
# TODO: How to check whether the synthesis was successful?
# Check if error count is nonzero
if line.find(error_prefix) != -1 and int(findall(r"\d+", line)[0]) != 0:
debug.error("Synthesis failed!", -1)
# Check if there is an "ERROR"
if line.find("ERROR") != -1:
debug.error("Synthesis failed!", -1)
debug.info(1, "Synthesis successful.")
def check_sim_result(self, path, file_name):
""" Read the log file of the simulation. """
# Result of the simulation is supposed to be at the end of the log file
with open("{0}build/{1}/sim-icarus/{2}".format(path,
self.core.core_name.replace(":", "_"),
file_name)) as f:
for line in f:
pass
if line.rstrip() == self.tb.success_message:
debug.info(1, "Simulation successful.")
else:
debug.error("Simulation failed!", -1) | [
2,
4091,
38559,
24290,
329,
15665,
1321,
13,
198,
2,
198,
2,
15069,
357,
66,
8,
33448,
3310,
658,
286,
262,
2059,
286,
3442,
290,
383,
5926,
198,
2,
286,
3310,
658,
329,
262,
10433,
36694,
290,
19663,
5535,
198,
2,
357,
27362,
329,
290,
319,
8378,
286,
10433,
1812,
2059,
8,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
11748,
28686,
198,
11748,
4818,
8079,
198,
6738,
4423,
346,
1330,
4866,
7753,
198,
6738,
850,
14681,
1330,
869,
11,
5550,
53,
33991,
11,
48571,
12425,
198,
6738,
302,
1330,
1064,
439,
198,
6738,
764,
7295,
1330,
4755,
198,
6738,
764,
9288,
62,
26968,
1330,
1332,
62,
26968,
198,
6738,
764,
9288,
62,
7890,
1330,
1332,
62,
7890,
198,
6738,
764,
14323,
62,
23870,
1330,
985,
62,
23870,
198,
11748,
14257,
198,
6738,
15095,
874,
1330,
13349,
4694,
11,
3601,
62,
2435,
628,
198,
4871,
19637,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5016,
284,
7716,
3696,
329,
19637,
290,
11767,
262,
1486,
416,
2491,
198,
220,
220,
220,
412,
5631,
4899,
13,
198,
220,
220,
220,
37227,
628,
198,
220,
220,
220,
825,
11767,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
5660,
262,
3326,
7483,
13,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
4798,
62,
1831,
7203,
24243,
2890,
19637,
9313,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
46012,
533,
62,
16624,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
13349,
4694,
13,
14323,
5039,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
14323,
5039,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
13349,
4694,
13,
1837,
429,
956,
1096,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1837,
429,
956,
1096,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
4798,
62,
1831,
7203,
13414,
2649,
5668,
19570,
628,
198,
220,
220,
220,
825,
29308,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
12793,
2672,
3696,
290,
29308,
262,
1486,
416,
2491,
281,
412,
5631,
2891,
338,
198,
220,
220,
220,
220,
220,
220,
220,
35375,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
24243,
2890,
18640,
9313,
8,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
33874,
18640,
3696,
9313,
8,
628,
220,
220,
220,
220,
220,
220,
220,
923,
62,
2435,
796,
4818,
8079,
13,
19608,
8079,
13,
2197,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
19430,
262,
10560,
2390,
2393,
198,
220,
220,
220,
220,
220,
220,
220,
4850,
62,
6978,
796,
13349,
4694,
13,
29510,
62,
6978,
1343,
366,
67,
859,
13,
85,
1,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
13414,
346,
519,
357,
7707,
2390,
2599,
22183,
284,
23884,
1911,
18982,
7,
67,
859,
62,
6978,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
14323,
62,
23870,
13,
67,
859,
13,
14323,
62,
67,
859,
62,
13564,
7,
67,
859,
62,
6978,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
19430,
262,
1332,
7624,
2393,
198,
220,
220,
220,
220,
220,
220,
220,
256,
65,
62,
6978,
796,
13349,
4694,
13,
29510,
62,
6978,
1343,
366,
9288,
62,
26968,
13,
85,
1,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
13414,
346,
519,
357,
14402,
7624,
2599,
22183,
284,
23884,
1911,
18982,
7,
83,
65,
62,
6978,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
83,
65,
13,
9288,
62,
26968,
62,
13564,
7,
83,
65,
62,
6978,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
19430,
262,
1332,
1366,
2393,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
62,
6978,
796,
13349,
4694,
13,
29510,
62,
6978,
1343,
366,
9288,
62,
7890,
13,
85,
1,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
13414,
346,
519,
357,
14402,
1366,
2599,
22183,
284,
23884,
1911,
18982,
7,
7890,
62,
6978,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7890,
13,
8612,
378,
62,
7890,
7,
3185,
4694,
13,
14323,
62,
7857,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7890,
13,
9288,
62,
7890,
62,
13564,
7,
7890,
62,
6978,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
5660,
376,
1904,
37949,
329,
18640,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
28768,
376,
1904,
2396,
34,
329,
18640,
9313,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5143,
62,
69,
2664,
420,
7,
944,
13,
3672,
11,
2116,
13,
7295,
13,
7295,
62,
3672,
11,
13349,
4694,
13,
29510,
62,
6978,
11,
6407,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
6822,
262,
1255,
286,
262,
18640,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
9122,
62,
14323,
62,
20274,
7,
3185,
4694,
13,
29510,
62,
6978,
11,
366,
291,
20272,
13,
6404,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
3601,
62,
2435,
7203,
8890,
1741,
1600,
4818,
8079,
13,
19608,
8079,
13,
2197,
22784,
923,
62,
2435,
8,
628,
198,
220,
220,
220,
825,
24983,
1096,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
12793,
2672,
3696,
290,
24983,
1096,
262,
1486,
416,
2491,
281,
412,
5631,
2891,
338,
198,
220,
220,
220,
220,
220,
220,
220,
24983,
7509,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
24243,
2890,
21263,
9313,
8,
628,
220,
220,
220,
220,
220,
220,
220,
923,
62,
2435,
796,
4818,
8079,
13,
19608,
8079,
13,
2197,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
38240,
16808,
2390,
13103,
284,
2042,
3524,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
3103,
48820,
4946,
24115,
13103,
284,
2042,
3524,
9313,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1102,
1851,
62,
1462,
62,
2436,
330,
3524,
7,
3185,
4694,
13,
29510,
62,
6978,
1343,
13349,
4694,
13,
12985,
62,
18747,
62,
3672,
1343,
27071,
85,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1102,
1851,
62,
1462,
62,
2436,
330,
3524,
7,
3185,
4694,
13,
29510,
62,
6978,
1343,
13349,
4694,
13,
7890,
62,
18747,
62,
3672,
1343,
27071,
85,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
611,
13349,
4694,
13,
35666,
5592,
62,
30586,
13,
10134,
62,
82,
859,
62,
18747,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1102,
1851,
62,
1462,
62,
2436,
330,
3524,
7,
3185,
4694,
13,
29510,
62,
6978,
1343,
13349,
4694,
13,
1904,
62,
18747,
62,
3672,
1343,
27071,
85,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
5660,
376,
1904,
37949,
329,
21263,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
28768,
376,
1904,
2396,
34,
329,
21263,
9313,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5143,
62,
69,
2664,
420,
7,
944,
13,
3672,
11,
2116,
13,
7295,
13,
7295,
62,
3672,
11,
13349,
4694,
13,
29510,
62,
6978,
11,
10352,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
6822,
262,
1255,
286,
262,
21263,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
9122,
62,
28869,
400,
62,
20274,
7,
3185,
4694,
13,
29510,
62,
6978,
11,
366,
88,
418,
893,
13,
6404,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
3601,
62,
2435,
7203,
13940,
429,
8497,
1600,
4818,
8079,
13,
19608,
8079,
13,
2197,
22784,
923,
62,
2435,
8,
628,
198,
220,
220,
220,
825,
8335,
62,
16624,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
43426,
2219,
3696,
1871,
18640,
290,
21263,
13,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
19430,
262,
327,
6965,
2393,
198,
220,
220,
220,
220,
220,
220,
220,
4755,
62,
6978,
796,
13349,
4694,
13,
29510,
62,
6978,
1343,
366,
332,
1958,
13,
7295,
1,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
34,
6965,
25,
22183,
284,
23884,
1911,
18982,
7,
7295,
62,
6978,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7295,
13,
7295,
62,
13564,
7,
7295,
62,
6978,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
17393,
262,
7560,
12940,
4643,
346,
519,
2393,
198,
220,
220,
220,
220,
220,
220,
220,
12940,
62,
6978,
796,
13349,
4694,
13,
29510,
62,
6978,
1343,
2116,
13,
3672,
1343,
27071,
85,
1,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
13379,
1112,
262,
12940,
1486,
2393,
284,
262,
20218,
850,
43551,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
4866,
7753,
7,
3185,
4694,
13,
22915,
62,
6978,
1343,
2116,
13,
3672,
1343,
27071,
85,
1600,
12940,
62,
6978,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
13349,
4694,
13,
5143,
62,
9654,
859,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
17393,
262,
8398,
3696,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
13379,
1112,
262,
4566,
3696,
284,
262,
20218,
850,
43551,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30073,
62,
11250,
62,
7753,
7,
3185,
4694,
13,
7890,
62,
18747,
62,
3672,
1343,
45434,
11250,
13,
9078,
1600,
13349,
4694,
13,
29510,
62,
6978,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30073,
62,
11250,
62,
7753,
7,
3185,
4694,
13,
12985,
62,
18747,
62,
3672,
1343,
45434,
11250,
13,
9078,
1600,
13349,
4694,
13,
29510,
62,
6978,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
14534,
9014,
2450,
1595,
470,
761,
257,
4553,
16808,
2390,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
13349,
4694,
13,
35666,
5592,
62,
30586,
13,
10134,
62,
82,
859,
62,
18747,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30073,
62,
11250,
62,
7753,
7,
3185,
4694,
13,
1904,
62,
18747,
62,
3672,
1343,
45434,
11250,
13,
9078,
1600,
13349,
4694,
13,
29510,
62,
6978,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
5660,
4946,
24115,
284,
7716,
4643,
346,
519,
3696,
286,
16808,
2390,
82,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
28768,
4946,
24115,
329,
262,
1366,
7177,
9313,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5143,
62,
9654,
859,
7203,
90,
92,
62,
11250,
13,
9078,
1911,
18982,
7,
3185,
4694,
13,
29510,
62,
6978,
1343,
13349,
4694,
13,
7890,
62,
18747,
62,
3672,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
28768,
4946,
24115,
329,
262,
7621,
7177,
9313,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5143,
62,
9654,
859,
7203,
90,
92,
62,
11250,
13,
9078,
1911,
18982,
7,
3185,
4694,
13,
29510,
62,
6978,
1343,
13349,
4694,
13,
12985,
62,
18747,
62,
3672,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
14534,
9014,
2450,
1595,
470,
761,
257,
4553,
16808,
2390,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
13349,
4694,
13,
35666,
5592,
62,
30586,
13,
10134,
62,
82,
859,
62,
18747,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
28768,
4946,
24115,
329,
262,
779,
7177,
9313,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5143,
62,
9654,
859,
7203,
90,
92,
62,
11250,
13,
9078,
1911,
18982,
7,
3185,
4694,
13,
29510,
62,
6978,
1343,
13349,
4694,
13,
1904,
62,
18747,
62,
3672,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
50,
4106,
2105,
284,
1057,
4946,
24115,
4943,
628,
198,
220,
220,
220,
825,
1057,
62,
9654,
859,
7,
944,
11,
4566,
62,
6978,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
5660,
4946,
24115,
284,
7716,
4643,
346,
519,
13103,
13,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1280,
859,
62,
21812,
796,
366,
29412,
18,
720,
3185,
1677,
24115,
62,
39069,
14,
9654,
859,
13,
9078,
1,
628,
220,
220,
220,
220,
220,
220,
220,
611,
869,
7203,
90,
15,
92,
1391,
16,
92,
1911,
18982,
7,
9654,
859,
62,
21812,
11,
4566,
62,
6978,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
16993,
28,
3185,
4694,
13,
29510,
62,
6978,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7582,
28,
17821,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14367,
448,
28,
944,
13,
19282,
448,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
336,
1082,
81,
28,
944,
13,
301,
1082,
81,
8,
14512,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
18224,
7203,
11505,
24115,
4054,
40754,
532,
16,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
407,
13349,
4694,
13,
14894,
62,
9654,
859,
62,
16624,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
2393,
287,
28686,
13,
4868,
15908,
7,
3185,
4694,
13,
29510,
62,
6978,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2393,
62,
6978,
796,
13349,
4694,
13,
29510,
62,
6978,
1343,
2393,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
9409,
343,
7,
7753,
62,
6978,
8,
290,
477,
26933,
87,
407,
287,
2393,
329,
2124,
287,
685,
1911,
85,
1600,
27071,
9078,
1600,
27071,
7295,
8973,
60,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
28956,
7,
7753,
62,
6978,
8,
628,
198,
220,
220,
220,
825,
1057,
62,
69,
2664,
420,
7,
944,
11,
5888,
62,
3672,
11,
4755,
62,
3672,
11,
3108,
11,
318,
62,
14323,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
5660,
376,
1904,
2396,
34,
329,
18640,
393,
21263,
13,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
277,
2664,
420,
62,
32016,
62,
21812,
796,
366,
69,
2664,
420,
5888,
751,
1391,
15,
92,
1391,
16,
92,
1911,
18982,
7,
32016,
62,
3672,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3108,
8,
198,
220,
220,
220,
220,
220,
220,
220,
277,
2664,
420,
62,
5143,
62,
21812,
796,
366,
69,
2664,
420,
1057,
1377,
16793,
34758,
15,
92,
1377,
3919,
12,
39344,
1391,
16,
92,
1911,
18982,
7203,
14323,
1,
611,
318,
62,
14323,
2073,
366,
28869,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4755,
62,
3672,
8,
628,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
32901,
23884,
4755,
355,
5888,
9313,
13,
18982,
7203,
14323,
1741,
1,
611,
318,
62,
14323,
2073,
366,
1837,
429,
8497,
48774,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
28768,
262,
23884,
9313,
13,
18982,
7203,
14323,
1741,
1,
611,
318,
62,
14323,
2073,
366,
1837,
429,
8497,
48774,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
262,
327,
6965,
2393,
355,
257,
5888,
198,
220,
220,
220,
220,
220,
220,
220,
611,
869,
7,
69,
2664,
420,
62,
32016,
62,
21812,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
16993,
28,
6978,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7582,
28,
17821,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14367,
448,
28,
944,
13,
19282,
448,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
336,
1082,
81,
28,
944,
13,
301,
1082,
81,
8,
14512,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
18224,
7203,
37,
1904,
2396,
34,
4054,
284,
751,
5888,
40754,
532,
16,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
5660,
262,
5888,
329,
18640,
393,
21263,
198,
220,
220,
220,
220,
220,
220,
220,
611,
869,
7,
69,
2664,
420,
62,
5143,
62,
21812,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
16993,
28,
6978,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7582,
28,
17821,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14367,
448,
28,
944,
13,
19282,
448,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
336,
1082,
81,
28,
944,
13,
301,
1082,
81,
8,
14512,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
18224,
7203,
37,
1904,
2396,
34,
4054,
284,
1057,
40754,
532,
16,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
23520,
262,
8584,
7102,
37,
2393,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1002,
428,
2393,
318,
407,
13140,
11,
340,
460,
2728,
24983,
274,
284,
2038,
287,
262,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2003,
13,
198,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
28956,
7,
6978,
1343,
366,
69,
2664,
420,
13,
10414,
4943,
628,
198,
220,
220,
220,
825,
4866,
62,
11250,
62,
7753,
7,
944,
11,
2393,
62,
3672,
11,
2244,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
17393,
290,
13096,
262,
4566,
2393,
329,
18640,
290,
21263,
13,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
649,
62,
7753,
796,
1280,
7,
16520,
1343,
2393,
62,
3672,
11,
366,
86,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
3185,
4694,
13,
22915,
62,
6978,
1343,
2393,
62,
3672,
8,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1627,
287,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1627,
13,
9688,
2032,
342,
7203,
22915,
62,
6978,
1,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
649,
62,
7753,
13,
13564,
7203,
22915,
62,
6978,
796,
19990,
90,
92,
7879,
59,
77,
1911,
18982,
7,
16520,
4008,
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,
649,
62,
7753,
13,
13564,
7,
1370,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
4643,
2649,
2476,
691,
262,
4643,
346,
519,
3696,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
770,
3038,
481,
10070,
4946,
24115,
338,
19124,
357,
8548,
7549,
737,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
7753,
13,
13564,
7203,
3262,
4868,
62,
8807,
796,
6407,
59,
77,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
649,
62,
7753,
13,
19836,
3419,
628,
198,
220,
220,
220,
825,
10385,
62,
1462,
62,
2436,
330,
3524,
7,
944,
11,
2393,
62,
6978,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38240,
262,
1813,
4643,
346,
519,
8265,
2393,
284,
2042,
3524,
13,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1394,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
12793,
2042,
3524,
2393,
355,
366,
34345,
62,
11848,
13,
85,
1,
198,
220,
220,
220,
220,
220,
220,
220,
275,
65,
62,
7753,
62,
6978,
796,
2393,
62,
6978,
58,
21912,
17,
60,
1343,
45434,
11848,
13,
85,
1,
628,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
7753,
62,
6978,
11,
366,
81,
4943,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12233,
796,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1627,
287,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1627,
13,
75,
36311,
22446,
9688,
2032,
342,
7203,
2301,
1,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12233,
796,
6407,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
12233,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1394,
13,
33295,
7,
1370,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1394,
13,
33295,
7203,
437,
21412,
59,
77,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
277,
796,
1280,
7,
11848,
62,
7753,
62,
6978,
11,
366,
86,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
277,
13,
8933,
20655,
7,
14894,
8,
198,
220,
220,
220,
220,
220,
220,
220,
277,
13,
19836,
3419,
628,
198,
220,
220,
220,
825,
2198,
62,
28869,
400,
62,
20274,
7,
944,
11,
3108,
11,
2393,
62,
3672,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
4149,
262,
2604,
2393,
286,
262,
18640,
13,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
40290,
796,
366,
9275,
290,
2098,
1,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
6822,
262,
4049,
954,
3951,
198,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7203,
90,
15,
92,
11249,
14,
90,
16,
92,
14,
28869,
12,
88,
418,
893,
14,
90,
17,
92,
1911,
18982,
7,
6978,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7295,
13,
7295,
62,
3672,
13,
33491,
7,
1298,
1600,
45434,
12340,
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,
2393,
62,
3672,
4008,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1627,
287,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
16926,
46,
25,
1374,
284,
2198,
1771,
262,
21263,
373,
4388,
30,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
6822,
611,
4049,
954,
318,
1729,
22570,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1627,
13,
19796,
7,
18224,
62,
40290,
8,
14512,
532,
16,
290,
493,
7,
19796,
439,
7,
81,
1,
59,
67,
10,
1600,
1627,
38381,
15,
12962,
14512,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
18224,
7203,
13940,
429,
8497,
4054,
40754,
532,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
6822,
611,
612,
318,
281,
366,
24908,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1627,
13,
19796,
7203,
24908,
4943,
14512,
532,
16,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
18224,
7203,
13940,
429,
8497,
4054,
40754,
532,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
13940,
429,
8497,
4388,
19570,
628,
198,
220,
220,
220,
825,
2198,
62,
14323,
62,
20274,
7,
944,
11,
3108,
11,
2393,
62,
3672,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
4149,
262,
2604,
2393,
286,
262,
18640,
13,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
25414,
286,
262,
18640,
318,
4385,
284,
307,
379,
262,
886,
286,
262,
2604,
2393,
198,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7203,
90,
15,
92,
11249,
14,
90,
16,
92,
14,
14323,
12,
291,
20272,
14,
90,
17,
92,
1911,
18982,
7,
6978,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7295,
13,
7295,
62,
3672,
13,
33491,
7,
1298,
1600,
45434,
12340,
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,
2393,
62,
3672,
4008,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1627,
287,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1627,
13,
81,
36311,
3419,
6624,
2116,
13,
83,
65,
13,
13138,
62,
20500,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14257,
13,
10951,
7,
16,
11,
366,
8890,
1741,
4388,
19570,
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,
14257,
13,
18224,
7203,
8890,
1741,
4054,
40754,
532,
16,
8
] | 2.130776 | 4,718 |
import os
import time
import logging
import numpy
from . import unittest
from sarpy.io.complex.sentinel import SentinelReader
from sarpy.deprecated.io.complex.sentinel import Reader as DepReader
| [
11748,
28686,
198,
11748,
640,
198,
11748,
18931,
198,
11748,
299,
32152,
198,
198,
6738,
764,
1330,
555,
715,
395,
198,
198,
6738,
264,
5117,
88,
13,
952,
13,
41887,
13,
34086,
20538,
1330,
26716,
33634,
198,
6738,
264,
5117,
88,
13,
10378,
31023,
13,
952,
13,
41887,
13,
34086,
20538,
1330,
25342,
355,
2129,
33634,
628,
198
] | 3.431034 | 58 |
from keras.preprocessing.text import Tokenizer
from keras.utils import to_categorical
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from keras.layers import Embedding
from keras.preprocessing.sequence import pad_sequences
from keras.utils import plot_model
# model summary
##train model
## save models
## generate return_sequences
| [
6738,
41927,
292,
13,
3866,
36948,
13,
5239,
1330,
29130,
7509,
198,
6738,
41927,
292,
13,
26791,
1330,
284,
62,
66,
2397,
12409,
198,
6738,
41927,
292,
13,
27530,
1330,
24604,
1843,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
360,
1072,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
406,
2257,
44,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
13302,
6048,
278,
198,
6738,
41927,
292,
13,
3866,
36948,
13,
43167,
1330,
14841,
62,
3107,
3007,
198,
6738,
41927,
292,
13,
26791,
1330,
7110,
62,
19849,
628,
628,
198,
220,
220,
220,
1303,
2746,
10638,
628,
198,
220,
220,
220,
22492,
27432,
2746,
628,
220,
220,
220,
22492,
3613,
4981,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
22492,
7716,
1441,
62,
3107,
3007,
198
] | 3.136364 | 132 |
import argparse
| [
11748,
1822,
29572,
198
] | 4 | 4 |
# -*- coding: utf-8 -*-
from collections import defaultdict
import re
import numpy as np
from pyfr.readers import BaseReader, NodalMeshAssembler
from pyfr.readers.nodemaps import GmshNodeMaps
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
17268,
1330,
4277,
11600,
198,
11748,
302,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
12972,
8310,
13,
961,
364,
1330,
7308,
33634,
11,
399,
375,
282,
37031,
1722,
4428,
1754,
198,
6738,
12972,
8310,
13,
961,
364,
13,
77,
375,
368,
1686,
1330,
402,
907,
71,
19667,
47010,
628,
198
] | 2.855072 | 69 |
# -*- encoding: utf-8 -*-
# Copyright (c) 2019 Stephen Bunn <[email protected]>
# ISC License <https://opensource.org/licenses/isc>
"""
"""
import pytest
from tomlark.parser import Parser
@pytest.fixture
| [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
13130,
7970,
347,
20935,
1279,
9662,
831,
31,
65,
20935,
13,
952,
29,
198,
2,
3180,
34,
13789,
1279,
5450,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
2304,
29,
198,
198,
37811,
198,
37811,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
284,
4029,
668,
13,
48610,
1330,
23042,
263,
628,
198,
31,
9078,
9288,
13,
69,
9602,
198
] | 2.5875 | 80 |
VERSION = 1 # The version number of the format
SECTION_COUNT = 14
| [
43717,
796,
352,
220,
1303,
383,
2196,
1271,
286,
262,
5794,
198,
50,
24565,
62,
34,
28270,
796,
1478,
198
] | 3.35 | 20 |
import subprocess as sp
| [
11748,
850,
14681,
355,
599,
628,
628
] | 3.857143 | 7 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198
] | 1.909091 | 22 |
"""A decorator that allows users to run SQL queries natively in Airflow."""
__version__ = "0.9.1"
# The following line is an import work-around to avoid raising a circular dependency issue related to `create_database`
# Without this, if we run the following imports, in this specific order:
# from astro.databases import create_database
# from astro.sql.table import Metadata, Table, create_unique_table_name
# We face ImportError, as it happened in:
# https://github.com/astronomer/astro-sdk/pull/396/commits/fbe73bdbe46d65777258a5f79f461ef69f08a673
# https://github.com/astronomer/astro-sdk/actions/runs/2378526135
# Although astro.database does not depend on astro.sql, it depends on astro.sql.table - and, unless astro.sql was
# imported beforehand, it will also load astro.sql. In astro.sql we import lots of operators which depend on
# astro.database, and this is what leads to the circular dependency.
import astro.sql # noqa: F401
# This is needed to allow Airflow to pick up specific metadata fields it needs
# for certain features. We recognize it's a bit unclean to define these in
# multiple places, but at this point it's the only workaround if you'd like
# your custom conn type to show up in the Airflow UI.
| [
37811,
32,
11705,
1352,
326,
3578,
2985,
284,
1057,
16363,
20743,
6868,
306,
287,
3701,
11125,
526,
15931,
198,
198,
834,
9641,
834,
796,
366,
15,
13,
24,
13,
16,
1,
198,
198,
2,
383,
1708,
1627,
318,
281,
1330,
670,
12,
14145,
284,
3368,
8620,
257,
18620,
20203,
2071,
3519,
284,
4600,
17953,
62,
48806,
63,
198,
2,
9170,
428,
11,
611,
356,
1057,
262,
1708,
17944,
11,
287,
428,
2176,
1502,
25,
198,
2,
220,
220,
422,
6468,
305,
13,
19608,
18826,
1330,
2251,
62,
48806,
198,
2,
220,
220,
422,
6468,
305,
13,
25410,
13,
11487,
1330,
3395,
14706,
11,
8655,
11,
2251,
62,
34642,
62,
11487,
62,
3672,
198,
2,
775,
1986,
17267,
12331,
11,
355,
340,
3022,
287,
25,
198,
2,
3740,
1378,
12567,
13,
785,
14,
459,
1313,
12057,
14,
459,
305,
12,
21282,
74,
14,
31216,
14,
34107,
14,
9503,
896,
14,
69,
1350,
4790,
17457,
1350,
3510,
67,
2996,
29331,
25600,
64,
20,
69,
3720,
69,
40652,
891,
3388,
69,
2919,
64,
45758,
198,
2,
3740,
1378,
12567,
13,
785,
14,
459,
1313,
12057,
14,
459,
305,
12,
21282,
74,
14,
4658,
14,
48381,
14,
1954,
41172,
2075,
17059,
198,
2,
4900,
6468,
305,
13,
48806,
857,
407,
4745,
319,
6468,
305,
13,
25410,
11,
340,
8338,
319,
6468,
305,
13,
25410,
13,
11487,
532,
290,
11,
4556,
6468,
305,
13,
25410,
373,
198,
2,
17392,
27091,
11,
340,
481,
635,
3440,
6468,
305,
13,
25410,
13,
554,
6468,
305,
13,
25410,
356,
1330,
6041,
286,
12879,
543,
4745,
319,
198,
2,
6468,
305,
13,
48806,
11,
290,
428,
318,
644,
5983,
284,
262,
18620,
20203,
13,
198,
11748,
6468,
305,
13,
25410,
220,
1303,
645,
20402,
25,
376,
21844,
628,
198,
2,
770,
318,
2622,
284,
1249,
3701,
11125,
284,
2298,
510,
2176,
20150,
7032,
340,
2476,
198,
2,
329,
1728,
3033,
13,
775,
7564,
340,
338,
257,
1643,
7711,
272,
284,
8160,
777,
287,
198,
2,
3294,
4113,
11,
475,
379,
428,
966,
340,
338,
262,
691,
46513,
611,
345,
1549,
588,
198,
2,
534,
2183,
48260,
2099,
284,
905,
510,
287,
262,
3701,
11125,
12454,
13,
198
] | 3.441341 | 358 |
# This sample tests the case where a variadic TypeVar is used in
# conjunction with a keyword-only parameter. It also tests protocol
# invariance validation when a TypeVarTuple is used in the protocol
# along with a non-variadic TypeVar.
# pyright: strict
from typing import Protocol, TypeVar
from typing_extensions import TypeVarTuple, Unpack
T = TypeVar("T")
Ts = TypeVarTuple("Ts")
a: CallbackA[int, str, bool] = example
reveal_type(a, expected_text="(a: int, b: str, *, keyed: bool) -> tuple[int, str, bool]")
| [
2,
770,
6291,
5254,
262,
1339,
810,
257,
5553,
23876,
5994,
19852,
318,
973,
287,
198,
2,
17856,
351,
257,
21179,
12,
8807,
11507,
13,
632,
635,
5254,
8435,
198,
2,
25275,
590,
21201,
618,
257,
5994,
19852,
51,
29291,
318,
973,
287,
262,
8435,
198,
2,
1863,
351,
257,
1729,
12,
25641,
23876,
5994,
19852,
13,
198,
198,
2,
279,
4766,
25,
7646,
198,
198,
6738,
19720,
1330,
20497,
11,
5994,
19852,
198,
6738,
19720,
62,
2302,
5736,
1330,
5994,
19852,
51,
29291,
11,
791,
8002,
198,
198,
51,
796,
5994,
19852,
7203,
51,
4943,
198,
33758,
796,
5994,
19852,
51,
29291,
7203,
33758,
4943,
628,
628,
198,
64,
25,
4889,
1891,
32,
58,
600,
11,
965,
11,
20512,
60,
796,
1672,
198,
198,
36955,
282,
62,
4906,
7,
64,
11,
2938,
62,
5239,
2625,
7,
64,
25,
493,
11,
275,
25,
965,
11,
1635,
11,
1994,
276,
25,
20512,
8,
4613,
46545,
58,
600,
11,
965,
11,
20512,
60,
4943,
198
] | 3.202454 | 163 |
import unittest
import responses
from dnsimple import DNSimpleException
from dnsimple.response import Pagination
from dnsimple.struct import Contact
from tests.helpers import DNSimpleMockResponse, DNSimpleTest
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
198,
11748,
9109,
198,
198,
6738,
288,
5907,
320,
1154,
1330,
18538,
320,
1154,
16922,
198,
6738,
288,
5907,
320,
1154,
13,
26209,
1330,
31525,
1883,
198,
6738,
288,
5907,
320,
1154,
13,
7249,
1330,
14039,
198,
6738,
5254,
13,
16794,
364,
1330,
18538,
320,
1154,
44,
735,
31077,
11,
18538,
320,
1154,
14402,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 3.156627 | 83 |
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'replacedata.views',
# url(r'^$', 'oms.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^repair/history/$', 'repairHistoryData', name='repair_data'),
url(r'^api/history/$', 'repairHistoryDataAPI', name='repair_data_api'),
)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
2291,
11,
19016,
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,
260,
21820,
1045,
13,
33571,
3256,
198,
220,
220,
220,
1303,
19016,
7,
81,
6,
61,
3,
3256,
705,
3150,
13,
33571,
13,
11195,
3256,
1438,
11639,
11195,
33809,
198,
220,
220,
220,
1303,
19016,
7,
81,
6,
61,
14036,
14,
3256,
2291,
10786,
14036,
13,
6371,
82,
11537,
828,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
49932,
14,
23569,
32624,
3256,
705,
49932,
18122,
6601,
3256,
1438,
11639,
49932,
62,
7890,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
15042,
14,
23569,
32624,
3256,
705,
49932,
18122,
6601,
17614,
3256,
1438,
11639,
49932,
62,
7890,
62,
15042,
33809,
198,
8,
198
] | 2.595092 | 163 |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2019 Kyoto University (Hirofumi Inaguma)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""Zoneout regularization."""
import torch.nn as nn
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
15069,
13130,
36298,
2059,
357,
39,
7058,
69,
12994,
554,
363,
7487,
8,
198,
2,
220,
24843,
362,
13,
15,
220,
357,
4023,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
8,
198,
198,
37811,
26961,
448,
3218,
1634,
526,
15931,
198,
198,
11748,
28034,
13,
20471,
355,
299,
77,
628,
198
] | 2.477273 | 88 |
##Problem Description
##The program takes in a number and finds the sum of digits in a number.
print("-------------------Method 1----------------------------------")
temp=n=int(input("Enter a number: "))
total = 0
while n>0 :
total = total+(n%10)
n=n//10
print("The total sum of digits in the number {0} is: {1} ".format(temp,total))
print("--------------------------------------------------------------")
print("-------------------Method 2----------------------------------")
l=[]
temp=n=int(input("Enter a number: "))
sum_digits(n)
print("The total sum of digits in the number {0} is: {1} ".format(temp,sum(l)))
print("--------------------------------------------------------------")
| [
2235,
40781,
12489,
201,
198,
2235,
464,
1430,
2753,
287,
257,
1271,
290,
7228,
262,
2160,
286,
19561,
287,
257,
1271,
13,
201,
198,
4798,
7203,
1783,
6329,
17410,
352,
3880,
438,
4943,
201,
198,
29510,
28,
77,
28,
600,
7,
15414,
7203,
17469,
257,
1271,
25,
366,
4008,
201,
198,
23350,
796,
657,
201,
198,
4514,
299,
29,
15,
1058,
201,
198,
220,
220,
220,
2472,
796,
2472,
33747,
77,
4,
940,
8,
201,
198,
220,
220,
220,
299,
28,
77,
1003,
940,
201,
198,
4798,
7203,
464,
2472,
2160,
286,
19561,
287,
262,
1271,
1391,
15,
92,
318,
25,
1391,
16,
92,
27071,
18982,
7,
29510,
11,
23350,
4008,
201,
198,
4798,
7203,
47232,
26171,
4943,
201,
198,
201,
198,
4798,
7203,
1783,
6329,
17410,
362,
3880,
438,
4943,
201,
198,
75,
28,
21737,
201,
198,
29510,
28,
77,
28,
600,
7,
15414,
7203,
17469,
257,
1271,
25,
366,
4008,
201,
198,
16345,
62,
12894,
896,
7,
77,
8,
201,
198,
4798,
7203,
464,
2472,
2160,
286,
19561,
287,
262,
1271,
1391,
15,
92,
318,
25,
1391,
16,
92,
27071,
18982,
7,
29510,
11,
16345,
7,
75,
22305,
201,
198,
4798,
7203,
47232,
26171,
4943,
201,
198,
201,
198
] | 3.552239 | 201 |
from rest_framework import exceptions, filters
| [
6738,
1334,
62,
30604,
1330,
13269,
11,
16628,
628
] | 5.333333 | 9 |
"""
AML writer module.
"""
from pymarlin.utils.logger.logging_utils import getlogger
from .base import Writer
class Aml(Writer):
"""
This class implements the Azure ML writer for stats.
"""
def log_scalar(self, k, v, step):
"""
Log metric to AML.
"""
kwargs = {
'global_step': step,
k: v
}
if self.run is not None:
self.run.log_row(k, **kwargs)
def log_multi(self, k, v, step):
"""
Log metrics to stdout.
"""
for key, val in v.items():
key = k+'/'+key
self.log_scalar(key, val, step)
| [
37811,
198,
2390,
43,
6260,
8265,
13,
198,
37811,
198,
6738,
12972,
3876,
2815,
13,
26791,
13,
6404,
1362,
13,
6404,
2667,
62,
26791,
1330,
651,
6404,
1362,
198,
6738,
764,
8692,
1330,
26606,
198,
198,
4871,
1703,
75,
7,
34379,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
770,
1398,
23986,
262,
22134,
10373,
6260,
329,
9756,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
2604,
62,
1416,
282,
283,
7,
944,
11,
479,
11,
410,
11,
2239,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
5972,
18663,
284,
3001,
43,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
479,
86,
22046,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
20541,
62,
9662,
10354,
2239,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
25,
410,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
5143,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5143,
13,
6404,
62,
808,
7,
74,
11,
12429,
46265,
22046,
8,
628,
220,
220,
220,
825,
2604,
62,
41684,
7,
944,
11,
479,
11,
410,
11,
2239,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
5972,
20731,
284,
14367,
448,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1994,
11,
1188,
287,
410,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1994,
796,
479,
10,
26488,
6,
10,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
62,
1416,
282,
283,
7,
2539,
11,
1188,
11,
2239,
8,
198
] | 1.960843 | 332 |
# Definition for singly-linked list.
| [
2,
30396,
329,
1702,
306,
12,
25614,
1351,
13,
628
] | 3.8 | 10 |
for _ in range(int(input())):
n = int(input())
temp = (n - 1) // 26
temp2 = n % 26
ans = 2**temp
if n == 0: print(1,0,0)
elif temp2 > 0 and temp2 < 3: print(ans,0,0)
elif temp2 > 2 and temp2 < 11: print(0,ans,0)
else: print(0,0,ans) | [
1640,
4808,
287,
2837,
7,
600,
7,
15414,
28955,
2599,
198,
197,
77,
796,
493,
7,
15414,
28955,
198,
197,
29510,
796,
357,
77,
532,
352,
8,
3373,
2608,
198,
197,
29510,
17,
796,
299,
4064,
2608,
198,
197,
504,
796,
362,
1174,
29510,
198,
197,
361,
299,
6624,
657,
25,
3601,
7,
16,
11,
15,
11,
15,
8,
198,
197,
417,
361,
20218,
17,
1875,
657,
290,
20218,
17,
1279,
513,
25,
3601,
7,
504,
11,
15,
11,
15,
8,
198,
197,
417,
361,
20218,
17,
1875,
362,
290,
20218,
17,
1279,
1367,
25,
3601,
7,
15,
11,
504,
11,
15,
8,
198,
197,
17772,
25,
3601,
7,
15,
11,
15,
11,
504,
8
] | 2.086957 | 115 |
# The problem to be solved:
# We have trucks located in different cities and each truck brings a profit or loss. We have the historical data and determined that the profit depends on the city's population. We want to find this relation.
import numpy as np
print('Welcome to Machine Learning with Python!')
print('Lesson 1: Linear regression')
print('\n'+40*'=')
# data contains the city population (in 10,000s) in the first column
# and the profit/loss (in 10,000$) in the second columns
# the data was rescaled to save on calculations and resources consumption
# Based on the first entry, a truck in a city of population of 61,101 brought a profit of $175,920
data =\
[
[6.1101,17.592],
[5.5277,9.1302],
[8.5186,13.662],
[7.0032,11.854],
[5.8598,6.8233],
[8.3829,11.886],
[7.4764,4.3483],
[8.5781,12],
[6.4862,6.5987],
[5.0546,3.8166],
[5.7107,3.2522],
[14.164,15.505],
[5.734,3.1551],
[8.4084,7.2258],
[5.6407,0.71618],
[5.3794,3.5129],
[6.3654,5.3048],
[5.1301,0.56077],
[6.4296,3.6518],
[7.0708,5.3893],
[6.1891,3.1386],
[20.27,21.767],
[5.4901,4.263],
[6.3261,5.1875],
[5.5649,3.0825],
[18.945,22.638],
[12.828,13.501],
[10.957,7.0467],
[13.176,14.692],
[22.203,24.147],
[5.2524,-1.22],
[6.5894,5.9966],
[9.2482,12.134],
[5.8918,1.8495],
[8.2111,6.5426],
[7.9334,4.5623],
[8.0959,4.1164],
[5.6063,3.3928],
[12.836,10.117],
[6.3534,5.4974],
[5.4069,0.55657],
[6.8825,3.9115],
[11.708,5.3854],
[5.7737,2.4406],
[7.8247,6.7318],
[7.0931,1.0463],
[5.0702,5.1337],
[5.8014,1.844],
[11.7,8.0043],
[5.5416,1.0179],
[7.5402,6.7504],
[5.3077,1.8396],
[7.4239,4.2885],
[7.6031,4.9981],
[6.3328,1.4233],
[6.3589,-1.4211],
[6.2742,2.4756],
[5.6397,4.6042],
[9.3102,3.9624],
[9.4536,5.4141],
[8.8254,5.1694],
[5.1793,-0.74279],
[21.279,17.929],
[14.908,12.054],
[18.959,17.054],
[7.2182,4.8852],
[8.2951,5.7442],
[10.236,7.7754],
[5.4994,1.0173],
[20.341,20.992],
[10.136,6.6799],
[7.3345,4.0259],
[6.0062,1.2784],
[7.2259,3.3411],
[5.0269,-2.6807],
[6.5479,0.29678],
[7.5386,3.8845],
[5.0365,5.7014],
[10.274,6.7526],
[5.1077,2.0576],
[5.7292,0.47953],
[5.1884,0.20421],
[6.3557,0.67861],
[9.7687,7.5435],
[6.5159,5.3436],
[8.5172,4.2415],
[9.1802,6.7981],
[6.002,0.92695],
[5.5204,0.152],
[5.0594,2.8214],
[5.7077,1.8451],
[7.6366,4.2959],
[5.8707,7.2029],
[5.3054,1.9869],
[8.2934,0.14454],
[13.394,9.0551],
[5.4369,0.61705]
]
# We want to make a model able to predict the profit/loss, based on a given population. In order to do some machine learning, the data has to be of a matrix type.
# X matrix will hold city population
X = np.matrix(data)[:,0]
# y matrix will hold the profit/loss information
y = np.matrix(data)[:,1]
'''
Basically, we are looking for a function f(x) returning the _output_ value y based on its _input_ x. We assume a linear y = ax + b dependence, but it as well might have been a polynominal or any other function. So, we are looking for such a and b values that give us a function that will somehow reflect the profit based on the population. Like this:
predicted_profit = a * city_population + b
A quick look at the data shows that it is impossible to find a line which would cross all the datapoints. So, we want to have the best possible fit. How do we measure the quality of it? The best possible fit is such that makes the smallest prediction error on the whole dataset. The single error is calculated as the square of the difference between the real and predicted value, so the total error will simply be the sum of all single ones.
We thus need a so-called cost function which would return the average error of a given f(x) when trying to explain the datapoints and make predictions. In order to make things quicker, we will look for a vector 'theta', containing the 'a' and 'b' (or more, for more complicated models - theta0, theta1, theta2,...) parameters.
'''
print('\nLooking for y=a*x+b function (a,b=theta)')
# function J calculates the cost under a given set of theta parameters
# the transformation below adds a column of ones to the left of the X matrix, for calculation reasons
dataX = np.matrix(data)[:,0:1]
X = np.ones((len(dataX),2))
X[:,1:] = dataX
# let's check the cost if we would assume theta at two different values
print('\nChecking two example cases of theta:')
for t in [0,0], [-1,2]:
print('Assuming theta vector at {}, the cost would be {:.2f}'.format(t, J(X, y, t).item())) # 32.073, 54.242
'''
Now, how to find the optimal theta vector for our model to predict with the smallest possible error?
Assuming that J is a cost function, this is an optimization problem - we need to find the minimum of J.
We will use a technique called gradient descent - we will initialize theta at all-zeros and gradually move along the J curve updating all thetas (simultaneously) by small fractions. If J increases - we are going the wrong way, if it decreases - we are moving along this way.
'''
# gradient descent function will iteratively update theta by a small fraction alpha (also called the learning rate) for a number of iterations
print('\n'+40*'=')
# we have the function ready, let's do some machine learning!
theta = np.matrix([np.random.random(),np.random.random()]) # we initialize theta at random values
alpha = 0.01 # learning rate - if too low, the algorithm will not converge, if too high, it can "explode"
iters = 2000 # number of iterations - reduce if "Time limit exceeded"
print('\n== Model summary ==\nLearning rate: {}\nIterations: {}\nInitial theta: {}\nInitial J: {:.2f}\n'.format(alpha, iters, theta, J(X,y,theta).item()))
print('Training the model... ')
# this actually trains our model and finds the optimal theta value
J_history, theta_min = gradient(X, y, alpha, theta, iters)
print('Done.')
print('\nFinal theta: {}\nFinal J: {:.2f}'.format(theta_min.T, J(X,y,theta_min.T).item()))
'''
Now that we have the model trained, we can use it to predict the profit/loss
Usually, since we want to solve a real problem, we define our function to accept real numbers, not rescaled ones. However, we have to remember, that the model itself is trained on rescaled data, so we have to provide it.
'''
# This function will calculate the predicted profit
# Now, let's check for a random city
p = 50000 + 100000 * np.random.random()
print('\n'+40*'=')
print('\nBased on learned data, predicted profit for a city of population of {:,.0f} is ${:,.2f}.\n'.format(p, predict_profit(p).item()))
# For the business decision, it would also be good to know what is the minimal population of a city to start the profitable business (predicted value is at least positive)
p_min = -theta_min[0].item() / theta_min[1].item() * 10000
print('In order for the business to be profitable, it has to be started in a city with population greater than {:,.0f}.'.format(p_min))
print('\n'+40*'=')
print('\nNOTE: The code initializes the model with different theta each time, thus the model predicts different minimal viable population at each runtime.')
| [
198,
2,
383,
1917,
284,
307,
16019,
25,
198,
2,
775,
423,
13960,
5140,
287,
1180,
4736,
290,
1123,
7779,
6774,
257,
7630,
393,
2994,
13,
775,
423,
262,
6754,
1366,
290,
5295,
326,
262,
7630,
8338,
319,
262,
1748,
338,
3265,
13,
775,
765,
284,
1064,
428,
8695,
13,
198,
198,
11748,
299,
32152,
355,
45941,
198,
4798,
10786,
14618,
284,
10850,
18252,
351,
11361,
0,
11537,
198,
4798,
10786,
22058,
261,
352,
25,
44800,
20683,
11537,
198,
4798,
10786,
59,
77,
6,
10,
1821,
9,
6,
28,
11537,
198,
198,
2,
1366,
4909,
262,
1748,
3265,
357,
259,
838,
11,
830,
82,
8,
287,
262,
717,
5721,
198,
2,
290,
262,
7630,
14,
22462,
357,
259,
838,
11,
830,
3,
8,
287,
262,
1218,
15180,
198,
2,
262,
1366,
373,
6811,
3021,
284,
3613,
319,
16765,
290,
4133,
7327,
198,
198,
2,
13403,
319,
262,
717,
5726,
11,
257,
7779,
287,
257,
1748,
286,
3265,
286,
8454,
11,
8784,
3181,
257,
7630,
286,
720,
17430,
11,
37128,
198,
7890,
796,
59,
198,
58,
198,
58,
21,
13,
1157,
486,
11,
1558,
13,
45839,
4357,
198,
58,
20,
13,
20,
27019,
11,
24,
13,
12952,
17,
4357,
198,
58,
23,
13,
20,
25096,
11,
1485,
13,
39380,
4357,
198,
58,
22,
13,
405,
2624,
11,
1157,
13,
23,
4051,
4357,
198,
58,
20,
13,
23,
41292,
11,
21,
13,
23,
25429,
4357,
198,
58,
23,
13,
2548,
1959,
11,
1157,
13,
44980,
4357,
198,
58,
22,
13,
2857,
2414,
11,
19,
13,
2682,
5999,
4357,
198,
58,
23,
13,
3553,
6659,
11,
1065,
4357,
198,
58,
21,
13,
2780,
5237,
11,
21,
13,
3270,
5774,
4357,
198,
58,
20,
13,
2713,
3510,
11,
18,
13,
23,
23055,
4357,
198,
58,
20,
13,
22,
15982,
11,
18,
13,
1495,
1828,
4357,
198,
58,
1415,
13,
23237,
11,
1314,
13,
31654,
4357,
198,
58,
20,
13,
22,
2682,
11,
18,
13,
1314,
4349,
4357,
198,
58,
23,
13,
1821,
5705,
11,
22,
13,
18182,
23,
4357,
198,
58,
20,
13,
21,
30120,
11,
15,
13,
22,
1433,
1507,
4357,
198,
58,
20,
13,
2718,
5824,
11,
18,
13,
20,
18741,
4357,
198,
58,
21,
13,
2623,
4051,
11,
20,
13,
1270,
2780,
4357,
198,
58,
20,
13,
1485,
486,
11,
15,
13,
34135,
3324,
4357,
198,
58,
21,
13,
11785,
21,
11,
18,
13,
2996,
1507,
4357,
198,
58,
22,
13,
15,
32583,
11,
20,
13,
2548,
6052,
4357,
198,
58,
21,
13,
1507,
6420,
11,
18,
13,
1485,
4521,
4357,
198,
58,
1238,
13,
1983,
11,
2481,
13,
32059,
4357,
198,
58,
20,
13,
2920,
486,
11,
19,
13,
29558,
4357,
198,
58,
21,
13,
18,
30057,
11,
20,
13,
1507,
2425,
4357,
198,
58,
20,
13,
20,
33300,
11,
18,
13,
2919,
1495,
4357,
198,
58,
1507,
13,
24,
2231,
11,
1828,
13,
21,
2548,
4357,
198,
58,
1065,
13,
23,
2078,
11,
1485,
13,
33548,
4357,
198,
58,
940,
13,
24,
3553,
11,
22,
13,
3023,
3134,
4357,
198,
58,
1485,
13,
24096,
11,
1415,
13,
46589,
4357,
198,
58,
1828,
13,
22416,
11,
1731,
13,
20198,
4357,
198,
58,
20,
13,
1495,
1731,
12095,
16,
13,
1828,
4357,
198,
58,
21,
13,
3365,
5824,
11,
20,
13,
2079,
2791,
4357,
198,
58,
24,
13,
1731,
6469,
11,
1065,
13,
19880,
4357,
198,
58,
20,
13,
4531,
1507,
11,
16,
13,
23,
33781,
4357,
198,
58,
23,
13,
17,
16243,
11,
21,
13,
4051,
2075,
4357,
198,
58,
22,
13,
24,
31380,
11,
19,
13,
3980,
1954,
4357,
198,
58,
23,
13,
2931,
3270,
11,
19,
13,
1157,
2414,
4357,
198,
58,
20,
13,
1899,
5066,
11,
18,
13,
2670,
2078,
4357,
198,
58,
1065,
13,
23,
2623,
11,
940,
13,
17657,
4357,
198,
58,
21,
13,
2327,
2682,
11,
20,
13,
2920,
4524,
4357,
198,
58,
20,
13,
1821,
3388,
11,
15,
13,
2816,
37680,
4357,
198,
58,
21,
13,
3459,
1495,
11,
18,
13,
24,
15363,
4357,
198,
58,
1157,
13,
32583,
11,
20,
13,
2548,
4051,
4357,
198,
58,
20,
13,
3324,
2718,
11,
17,
13,
25644,
21,
4357,
198,
58,
22,
13,
23,
23753,
11,
21,
13,
4790,
1507,
4357,
198,
58,
22,
13,
2931,
3132,
11,
16,
13,
3023,
5066,
4357,
198,
58,
20,
13,
15,
36680,
11,
20,
13,
1485,
2718,
4357,
198,
58,
20,
13,
23,
28645,
11,
16,
13,
23,
2598,
4357,
198,
58,
1157,
13,
22,
11,
23,
13,
405,
3559,
4357,
198,
58,
20,
13,
4051,
1433,
11,
16,
13,
486,
3720,
4357,
198,
58,
22,
13,
20,
32531,
11,
21,
13,
15426,
19,
4357,
198,
58,
20,
13,
1270,
3324,
11,
16,
13,
23,
34107,
4357,
198,
58,
22,
13,
19,
23516,
11,
19,
13,
2078,
5332,
4357,
198,
58,
22,
13,
1899,
3132,
11,
19,
13,
2079,
6659,
4357,
198,
58,
21,
13,
2091,
2078,
11,
16,
13,
19,
25429,
4357,
198,
58,
21,
13,
2327,
4531,
12095,
16,
13,
3682,
1157,
4357,
198,
58,
21,
13,
1983,
3682,
11,
17,
13,
32576,
21,
4357,
198,
58,
20,
13,
21,
33372,
11,
19,
13,
1899,
3682,
4357,
198,
58,
24,
13,
18,
15377,
11,
18,
13,
4846,
1731,
4357,
198,
58,
24,
13,
2231,
2623,
11,
20,
13,
19,
23756,
4357,
198,
58,
23,
13,
23,
24970,
11,
20,
13,
1433,
5824,
4357,
198,
58,
20,
13,
1558,
6052,
12095,
15,
13,
4524,
26050,
4357,
198,
58,
2481,
13,
26050,
11,
1558,
13,
24,
1959,
4357,
198,
58,
1415,
13,
24,
2919,
11,
1065,
13,
2713,
19,
4357,
198,
58,
1507,
13,
24,
3270,
11,
1558,
13,
2713,
19,
4357,
198,
58,
22,
13,
17,
24294,
11,
19,
13,
3459,
4309,
4357,
198,
58,
23,
13,
1959,
4349,
11,
20,
13,
22,
39506,
4357,
198,
58,
940,
13,
24940,
11,
22,
13,
34483,
19,
4357,
198,
58,
20,
13,
28324,
19,
11,
16,
13,
486,
4790,
4357,
198,
58,
1238,
13,
33660,
11,
1238,
13,
41561,
4357,
198,
58,
940,
13,
20809,
11,
21,
13,
3134,
2079,
4357,
198,
58,
22,
13,
2091,
2231,
11,
19,
13,
15,
25191,
4357,
198,
58,
21,
13,
405,
5237,
11,
16,
13,
1983,
5705,
4357,
198,
58,
22,
13,
18182,
24,
11,
18,
13,
2682,
1157,
4357,
198,
58,
20,
13,
15,
26276,
12095,
17,
13,
21,
36928,
4357,
198,
58,
21,
13,
20,
31714,
11,
15,
13,
1959,
30924,
4357,
198,
58,
22,
13,
20,
21734,
11,
18,
13,
3459,
2231,
4357,
198,
58,
20,
13,
15,
24760,
11,
20,
13,
22,
28645,
4357,
198,
58,
940,
13,
28857,
11,
21,
13,
2425,
2075,
4357,
198,
58,
20,
13,
940,
3324,
11,
17,
13,
2713,
4304,
4357,
198,
58,
20,
13,
22,
32759,
11,
15,
13,
2857,
49649,
4357,
198,
58,
20,
13,
1507,
5705,
11,
15,
13,
18638,
2481,
4357,
198,
58,
21,
13,
2327,
3553,
11,
15,
13,
3134,
4521,
16,
4357,
198,
58,
24,
13,
30610,
22,
11,
22,
13,
4051,
2327,
4357,
198,
58,
21,
13,
20,
19707,
11,
20,
13,
2682,
2623,
4357,
198,
58,
23,
13,
20,
23628,
11,
19,
13,
1731,
1314,
4357,
198,
58,
24,
13,
1507,
2999,
11,
21,
13,
3720,
6659,
4357,
198,
58,
21,
13,
21601,
11,
15,
13,
24,
2075,
3865,
4357,
198,
58,
20,
13,
20,
18638,
11,
15,
13,
17827,
4357,
198,
58,
20,
13,
2713,
5824,
11,
17,
13,
6469,
1415,
4357,
198,
58,
20,
13,
2154,
3324,
11,
16,
13,
23,
36330,
4357,
198,
58,
22,
13,
21,
32459,
11,
19,
13,
1959,
3270,
4357,
198,
58,
20,
13,
23,
24038,
11,
22,
13,
1238,
1959,
4357,
198,
58,
20,
13,
1270,
4051,
11,
16,
13,
4089,
3388,
4357,
198,
58,
23,
13,
1959,
2682,
11,
15,
13,
1415,
34229,
4357,
198,
58,
1485,
13,
34626,
11,
24,
13,
2713,
4349,
4357,
198,
58,
20,
13,
19,
30803,
11,
15,
13,
47941,
2713,
60,
198,
60,
198,
198,
2,
775,
765,
284,
787,
257,
2746,
1498,
284,
4331,
262,
7630,
14,
22462,
11,
1912,
319,
257,
1813,
3265,
13,
554,
1502,
284,
466,
617,
4572,
4673,
11,
262,
1366,
468,
284,
307,
286,
257,
17593,
2099,
13,
198,
198,
2,
1395,
17593,
481,
1745,
1748,
3265,
198,
55,
796,
45941,
13,
6759,
8609,
7,
7890,
38381,
45299,
15,
60,
198,
198,
2,
331,
17593,
481,
1745,
262,
7630,
14,
22462,
1321,
198,
88,
796,
45941,
13,
6759,
8609,
7,
7890,
38381,
45299,
16,
60,
198,
198,
7061,
6,
198,
31524,
11,
356,
389,
2045,
329,
257,
2163,
277,
7,
87,
8,
8024,
262,
4808,
22915,
62,
1988,
331,
1912,
319,
663,
4808,
15414,
62,
2124,
13,
775,
7048,
257,
14174,
331,
796,
7877,
1343,
275,
21403,
11,
475,
340,
355,
880,
1244,
423,
587,
257,
745,
6213,
296,
1292,
393,
597,
584,
2163,
13,
1406,
11,
356,
389,
2045,
329,
884,
257,
290,
275,
3815,
326,
1577,
514,
257,
2163,
326,
481,
7599,
4079,
262,
7630,
1912,
319,
262,
3265,
13,
4525,
428,
25,
628,
220,
220,
220,
11001,
62,
9183,
796,
257,
1635,
1748,
62,
39748,
1343,
275,
198,
198,
32,
2068,
804,
379,
262,
1366,
2523,
326,
340,
318,
5340,
284,
1064,
257,
1627,
543,
561,
3272,
477,
262,
4818,
499,
1563,
82,
13,
1406,
11,
356,
765,
284,
423,
262,
1266,
1744,
4197,
13,
1374,
466,
356,
3953,
262,
3081,
286,
340,
30,
383,
1266,
1744,
4197,
318,
884,
326,
1838,
262,
18197,
17724,
4049,
319,
262,
2187,
27039,
13,
383,
2060,
4049,
318,
10488,
355,
262,
6616,
286,
262,
3580,
1022,
262,
1103,
290,
11001,
1988,
11,
523,
262,
2472,
4049,
481,
2391,
307,
262,
2160,
286,
477,
2060,
3392,
13,
198,
198,
1135,
4145,
761,
257,
523,
12,
7174,
1575,
2163,
543,
561,
1441,
262,
2811,
4049,
286,
257,
1813,
277,
7,
87,
8,
618,
2111,
284,
4727,
262,
4818,
499,
1563,
82,
290,
787,
16277,
13,
554,
1502,
284,
787,
1243,
20061,
11,
356,
481,
804,
329,
257,
15879,
705,
1169,
8326,
3256,
7268,
262,
705,
64,
6,
290,
705,
65,
6,
357,
273,
517,
11,
329,
517,
8253,
4981,
532,
262,
8326,
15,
11,
262,
8326,
16,
11,
262,
8326,
17,
11,
23029,
10007,
13,
198,
7061,
6,
198,
198,
4798,
10786,
59,
77,
15784,
329,
331,
28,
64,
9,
87,
10,
65,
2163,
357,
64,
11,
65,
28,
1169,
8326,
8,
11537,
198,
198,
2,
2163,
449,
43707,
262,
1575,
739,
257,
1813,
900,
286,
262,
8326,
10007,
628,
198,
2,
262,
13389,
2174,
6673,
257,
5721,
286,
3392,
284,
262,
1364,
286,
262,
1395,
17593,
11,
329,
17952,
3840,
198,
7890,
55,
796,
45941,
13,
6759,
8609,
7,
7890,
38381,
45299,
15,
25,
16,
60,
198,
55,
796,
45941,
13,
1952,
19510,
11925,
7,
7890,
55,
828,
17,
4008,
198,
55,
58,
45299,
16,
47715,
796,
1366,
55,
198,
198,
2,
1309,
338,
2198,
262,
1575,
611,
356,
561,
7048,
262,
8326,
379,
734,
1180,
3815,
198,
4798,
10786,
59,
77,
9787,
278,
734,
1672,
2663,
286,
262,
8326,
25,
11537,
198,
1640,
256,
287,
685,
15,
11,
15,
4357,
25915,
16,
11,
17,
5974,
198,
220,
220,
220,
3601,
10786,
48142,
262,
8326,
15879,
379,
1391,
5512,
262,
1575,
561,
307,
46110,
13,
17,
69,
92,
4458,
18982,
7,
83,
11,
449,
7,
55,
11,
331,
11,
256,
737,
9186,
3419,
4008,
220,
1303,
3933,
13,
2998,
18,
11,
7175,
13,
27877,
198,
198,
7061,
6,
198,
3844,
11,
703,
284,
1064,
262,
16586,
262,
8326,
15879,
329,
674,
2746,
284,
4331,
351,
262,
18197,
1744,
4049,
30,
198,
48142,
326,
449,
318,
257,
1575,
2163,
11,
428,
318,
281,
23989,
1917,
532,
356,
761,
284,
1064,
262,
5288,
286,
449,
13,
198,
1135,
481,
779,
257,
8173,
1444,
31312,
18598,
532,
356,
481,
41216,
262,
8326,
379,
477,
12,
9107,
418,
290,
11835,
1445,
1863,
262,
449,
12133,
19698,
477,
262,
83,
292,
357,
14323,
9560,
3481,
8,
416,
1402,
49876,
13,
1002,
449,
5732,
532,
356,
389,
1016,
262,
2642,
835,
11,
611,
340,
20638,
532,
356,
389,
3867,
1863,
428,
835,
13,
198,
7061,
6,
198,
198,
2,
31312,
18598,
2163,
481,
11629,
9404,
4296,
262,
8326,
416,
257,
1402,
13390,
17130,
357,
14508,
1444,
262,
4673,
2494,
8,
329,
257,
1271,
286,
34820,
198,
198,
4798,
10786,
59,
77,
6,
10,
1821,
9,
6,
28,
11537,
198,
198,
2,
356,
423,
262,
2163,
3492,
11,
1309,
338,
466,
617,
4572,
4673,
0,
198,
1169,
8326,
796,
45941,
13,
6759,
8609,
26933,
37659,
13,
25120,
13,
25120,
22784,
37659,
13,
25120,
13,
25120,
3419,
12962,
1303,
356,
41216,
262,
8326,
379,
4738,
3815,
198,
26591,
796,
657,
13,
486,
1303,
4673,
2494,
532,
611,
1165,
1877,
11,
262,
11862,
481,
407,
47873,
11,
611,
1165,
1029,
11,
340,
460,
366,
20676,
1098,
1,
198,
270,
364,
796,
4751,
1303,
1271,
286,
34820,
532,
4646,
611,
366,
7575,
4179,
20672,
1,
628,
198,
198,
4798,
10786,
59,
77,
855,
9104,
10638,
6624,
59,
77,
41730,
2494,
25,
23884,
59,
77,
29993,
602,
25,
23884,
59,
77,
24243,
262,
8326,
25,
23884,
59,
77,
24243,
449,
25,
46110,
13,
17,
69,
32239,
77,
4458,
18982,
7,
26591,
11,
340,
364,
11,
262,
8326,
11,
449,
7,
55,
11,
88,
11,
1169,
8326,
737,
9186,
3419,
4008,
198,
198,
4798,
10786,
44357,
262,
2746,
986,
705,
8,
198,
2,
428,
1682,
13404,
674,
2746,
290,
7228,
262,
16586,
262,
8326,
1988,
198,
41,
62,
23569,
11,
262,
8326,
62,
1084,
796,
31312,
7,
55,
11,
331,
11,
17130,
11,
262,
8326,
11,
340,
364,
8,
198,
4798,
10786,
45677,
2637,
8,
198,
198,
4798,
10786,
59,
77,
19006,
262,
8326,
25,
23884,
59,
77,
19006,
449,
25,
46110,
13,
17,
69,
92,
4458,
18982,
7,
1169,
8326,
62,
1084,
13,
51,
11,
449,
7,
55,
11,
88,
11,
1169,
8326,
62,
1084,
13,
51,
737,
9186,
3419,
4008,
198,
198,
7061,
6,
198,
3844,
326,
356,
423,
262,
2746,
8776,
11,
356,
460,
779,
340,
284,
4331,
262,
7630,
14,
22462,
198,
198,
37887,
11,
1201,
356,
765,
284,
8494,
257,
1103,
1917,
11,
356,
8160,
674,
2163,
284,
2453,
1103,
3146,
11,
407,
6811,
3021,
3392,
13,
2102,
11,
356,
423,
284,
3505,
11,
326,
262,
2746,
2346,
318,
8776,
319,
6811,
3021,
1366,
11,
523,
356,
423,
284,
2148,
340,
13,
198,
7061,
6,
198,
198,
2,
770,
2163,
481,
15284,
262,
11001,
7630,
198,
198,
2,
2735,
11,
1309,
338,
2198,
329,
257,
4738,
1748,
198,
79,
796,
642,
2388,
1343,
1802,
830,
1635,
45941,
13,
25120,
13,
25120,
3419,
198,
4798,
10786,
59,
77,
6,
10,
1821,
9,
6,
28,
11537,
198,
4798,
10786,
59,
77,
15001,
319,
4499,
1366,
11,
11001,
7630,
329,
257,
1748,
286,
3265,
286,
46110,
38508,
15,
69,
92,
318,
25597,
25,
38508,
17,
69,
27422,
59,
77,
4458,
18982,
7,
79,
11,
4331,
62,
9183,
7,
79,
737,
9186,
3419,
4008,
198,
198,
2,
1114,
262,
1597,
2551,
11,
340,
561,
635,
307,
922,
284,
760,
644,
318,
262,
10926,
3265,
286,
257,
1748,
284,
923,
262,
17967,
1597,
357,
28764,
5722,
1988,
318,
379,
1551,
3967,
8,
198,
79,
62,
1084,
796,
532,
1169,
8326,
62,
1084,
58,
15,
4083,
9186,
3419,
1220,
262,
8326,
62,
1084,
58,
16,
4083,
9186,
3419,
1635,
33028,
198,
4798,
10786,
818,
1502,
329,
262,
1597,
284,
307,
17967,
11,
340,
468,
284,
307,
2067,
287,
257,
1748,
351,
3265,
3744,
621,
46110,
38508,
15,
69,
92,
2637,
13,
18982,
7,
79,
62,
1084,
4008,
198,
4798,
10786,
59,
77,
6,
10,
1821,
9,
6,
28,
11537,
198,
4798,
10786,
59,
77,
16580,
25,
383,
2438,
4238,
4340,
262,
2746,
351,
1180,
262,
8326,
1123,
640,
11,
4145,
262,
2746,
26334,
1180,
10926,
13971,
3265,
379,
1123,
19124,
2637,
8,
198
] | 2.63671 | 2,626 |
import os
import sys
import colorama
from . import metadata
# project metadata
METADATA = metadata
# paths
PATHS = {}
PATHS["home"] = os.path.expanduser("~")
PATHS["db_file"] = os.path.join(PATHS["home"], ".remindme.db")
PATHS["config_file"] = os.path.join(PATHS["home"], ".remindme")
# colors
colorama.init()
COLORS = {}
COLORS["default"] = colorama.Fore.WHITE
COLORS["error"] = colorama.Fore.RED
COLORS["info"] = colorama.Fore.MAGENTA
COLORS["reset"] = colorama.Style.RESET_ALL
COLORS["success"] = colorama.Fore.GREEN
# python version
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
# cryptography settings
CRYPTO = {}
CRYPTO["kdf_iterations"] = 100000
CRYPTO["kdf_length"] = 32
# default user settings
USER_SETTINGS = {}
USER_SETTINGS["editor"] = None
USER_SETTINGS["disable_encryption"] = False
USER_SETTINGS["encrypt_by_default"] = True
USER_SETTINGS["retry_password_match"] = True
USER_SETTINGS["retry_decryption"] = False
USER_SETTINGS["end_line"] = ":end"
| [
11748,
28686,
198,
11748,
25064,
198,
11748,
3124,
1689,
198,
6738,
764,
1330,
20150,
628,
198,
2,
1628,
20150,
198,
47123,
2885,
13563,
796,
20150,
628,
198,
2,
13532,
198,
47,
1404,
7998,
796,
23884,
198,
47,
1404,
7998,
14692,
11195,
8973,
796,
28686,
13,
6978,
13,
11201,
392,
7220,
7203,
93,
4943,
198,
47,
1404,
7998,
14692,
9945,
62,
7753,
8973,
796,
28686,
13,
6978,
13,
22179,
7,
47,
1404,
7998,
14692,
11195,
33116,
27071,
2787,
521,
1326,
13,
9945,
4943,
198,
47,
1404,
7998,
14692,
11250,
62,
7753,
8973,
796,
28686,
13,
6978,
13,
22179,
7,
47,
1404,
7998,
14692,
11195,
33116,
27071,
2787,
521,
1326,
4943,
628,
198,
2,
7577,
198,
8043,
1689,
13,
15003,
3419,
198,
25154,
20673,
796,
23884,
198,
25154,
20673,
14692,
12286,
8973,
796,
3124,
1689,
13,
16351,
13,
12418,
12709,
198,
25154,
20673,
14692,
18224,
8973,
796,
3124,
1689,
13,
16351,
13,
22083,
198,
25154,
20673,
14692,
10951,
8973,
796,
3124,
1689,
13,
16351,
13,
45820,
3525,
32,
198,
25154,
20673,
14692,
42503,
8973,
796,
3124,
1689,
13,
21466,
13,
19535,
2767,
62,
7036,
198,
25154,
20673,
14692,
13138,
8973,
796,
3124,
1689,
13,
16351,
13,
43016,
628,
198,
2,
21015,
2196,
198,
47,
56,
17,
796,
25064,
13,
9641,
62,
10951,
58,
15,
60,
6624,
362,
198,
47,
56,
18,
796,
25064,
13,
9641,
62,
10951,
58,
15,
60,
6624,
513,
628,
198,
2,
45898,
6460,
198,
9419,
48232,
10468,
796,
23884,
198,
9419,
48232,
10468,
14692,
74,
7568,
62,
2676,
602,
8973,
796,
1802,
830,
198,
9419,
48232,
10468,
14692,
74,
7568,
62,
13664,
8973,
796,
3933,
198,
198,
2,
4277,
2836,
6460,
198,
29904,
62,
28480,
51,
20754,
796,
23884,
198,
29904,
62,
28480,
51,
20754,
14692,
35352,
8973,
796,
6045,
198,
29904,
62,
28480,
51,
20754,
14692,
40223,
62,
12685,
13168,
8973,
796,
10352,
198,
29904,
62,
28480,
51,
20754,
14692,
12685,
6012,
62,
1525,
62,
12286,
8973,
796,
6407,
198,
29904,
62,
28480,
51,
20754,
14692,
1186,
563,
62,
28712,
62,
15699,
8973,
796,
6407,
198,
29904,
62,
28480,
51,
20754,
14692,
1186,
563,
62,
12501,
13168,
8973,
796,
10352,
198,
29904,
62,
28480,
51,
20754,
14692,
437,
62,
1370,
8973,
796,
366,
25,
437,
1,
198
] | 2.672973 | 370 |
# 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.
from __future__ import absolute_import
import unittest
import mock
from telemetry.core import platform as platform_module
from telemetry.internal.platform import platform_backend
from telemetry.internal.browser import possible_browser
| [
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,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
11748,
555,
715,
395,
198,
11748,
15290,
198,
198,
6738,
5735,
41935,
13,
7295,
1330,
3859,
355,
3859,
62,
21412,
198,
6738,
5735,
41935,
13,
32538,
13,
24254,
1330,
3859,
62,
1891,
437,
198,
6738,
5735,
41935,
13,
32538,
13,
40259,
1330,
1744,
62,
40259,
628
] | 4.123711 | 97 |
#!/usr/bin/env python
import pprint
import os
from django.conf.locale import LANG_INFO
from django.utils import translation
HORIZON_DIR = '/opt/stack/horizon'
langs_horizon = os.listdir(os.path.join(HORIZON_DIR, 'horizon', 'locale'))
langs_dashboard = os.listdir(os.path.join(HORIZON_DIR, 'openstack_dashboard', 'locale'))
# Pick up languages with both horizon and openstack_dashboard translations
langs = set(langs_horizon) & set(langs_dashboard)
lang_list = [get_django_lang_name(l, langs) for l in sorted(langs)]
print 'LANGUAGES = ',
pprint.pprint(tuple(lang_list))
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
279,
4798,
198,
11748,
28686,
198,
198,
6738,
42625,
14208,
13,
10414,
13,
17946,
1000,
1330,
406,
15567,
62,
10778,
198,
6738,
42625,
14208,
13,
26791,
1330,
11059,
628,
198,
198,
39,
1581,
14887,
1340,
62,
34720,
796,
31051,
8738,
14,
25558,
14,
17899,
8637,
6,
198,
198,
17204,
82,
62,
17899,
8637,
796,
28686,
13,
4868,
15908,
7,
418,
13,
6978,
13,
22179,
7,
39,
1581,
14887,
1340,
62,
34720,
11,
705,
17899,
8637,
3256,
705,
17946,
1000,
6,
4008,
198,
17204,
82,
62,
42460,
3526,
796,
28686,
13,
4868,
15908,
7,
418,
13,
6978,
13,
22179,
7,
39,
1581,
14887,
1340,
62,
34720,
11,
705,
9654,
25558,
62,
42460,
3526,
3256,
705,
17946,
1000,
6,
4008,
198,
2,
12346,
510,
8950,
351,
1111,
17810,
290,
1280,
25558,
62,
42460,
3526,
25231,
198,
17204,
82,
796,
900,
7,
17204,
82,
62,
17899,
8637,
8,
1222,
900,
7,
17204,
82,
62,
42460,
3526,
8,
198,
198,
17204,
62,
4868,
796,
685,
1136,
62,
28241,
14208,
62,
17204,
62,
3672,
7,
75,
11,
300,
27725,
8,
329,
300,
287,
23243,
7,
17204,
82,
15437,
198,
4798,
705,
43,
15567,
52,
25552,
796,
46083,
198,
381,
22272,
13,
381,
22272,
7,
83,
29291,
7,
17204,
62,
4868,
4008,
198
] | 2.646789 | 218 |
_ = input()
m = map(int, input().split())
m = sorted(m)
#print(m)
l=[]
for i in range(len(m)):
if(i%2==0):
l.append(str(m[i]))
for i in range(len(m)-1,0,-1):
if(i%2!=0):
l.append(str(m[i]))
print(' '.join(l)) | [
62,
796,
5128,
3419,
198,
76,
796,
3975,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
76,
796,
23243,
7,
76,
8,
198,
2,
4798,
7,
76,
8,
198,
198,
75,
28,
21737,
198,
1640,
1312,
287,
2837,
7,
11925,
7,
76,
8,
2599,
198,
220,
220,
220,
611,
7,
72,
4,
17,
855,
15,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
300,
13,
33295,
7,
2536,
7,
76,
58,
72,
60,
4008,
198,
198,
1640,
1312,
287,
2837,
7,
11925,
7,
76,
13219,
16,
11,
15,
12095,
16,
2599,
198,
220,
220,
220,
611,
7,
72,
4,
17,
0,
28,
15,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
300,
13,
33295,
7,
2536,
7,
76,
58,
72,
60,
4008,
198,
198,
4798,
10786,
45302,
22179,
7,
75,
4008
] | 1.766917 | 133 |
#!/usr/bin/env python3
import os
import numpy as np
import pygsp as gsp
import matplotlib.pyplot as plt
from matplotlib.patches import Arc
# plt.rc('font', family='Latin Modern Roman')
plt.rc('text', usetex=True)
plt.rc('text.latex', preamble=r'\usepackage{lmodern}')
fig = plt.figure(figsize = (3, 3))
ax = fig.add_subplot(1, 1, 1)
G = gsp.graphs.ring.Ring(8)
G.plot(edges=True, ax=ax, title='', vertex_color='r', edge_color='b')
circle = plt.Circle((0, 0), radius=1, color='g', fill=False, LineWidth=3)
ax.add_artist(circle)
angle = 45*1.5
line_1 = plt.Line2D([1, 0], [0, 0], linewidth=2, linestyle="-", color="black")
line_2 = plt.Line2D([np.cos(angle/360*2*np.pi), 0], [np.sin(angle/360*2*np.pi), 0], linewidth=2, linestyle = "--", color="black")
ax.add_line(line_1)
ax.add_line(line_2)
angle_plot = Arc((0,0), 0.8, 0.8, 0, 0, angle, color='black', linewidth=2)
ax.add_patch(angle_plot)
ax.text(0.5*np.cos(angle/2/360*2*np.pi), 0.5*np.sin(angle/2/360*2*np.pi), r"$\theta$", fontsize=18)
ax.axis('off')
ax.axis('equal')
fig.tight_layout()
filename = os.path.splitext(os.path.basename(__file__))[0] + '.pdf'
fig.savefig(filename)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
28686,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
70,
2777,
355,
308,
2777,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
2603,
29487,
8019,
13,
8071,
2052,
1330,
10173,
198,
198,
2,
458,
83,
13,
6015,
10786,
10331,
3256,
1641,
11639,
49022,
12495,
7993,
11537,
198,
489,
83,
13,
6015,
10786,
5239,
3256,
514,
316,
1069,
28,
17821,
8,
198,
489,
83,
13,
6015,
10786,
5239,
13,
17660,
87,
3256,
662,
321,
903,
28,
81,
6,
59,
1904,
26495,
90,
75,
23922,
92,
11537,
198,
198,
5647,
796,
458,
83,
13,
26875,
7,
5647,
7857,
796,
357,
18,
11,
513,
4008,
198,
897,
796,
2336,
13,
2860,
62,
7266,
29487,
7,
16,
11,
352,
11,
352,
8,
198,
198,
38,
796,
308,
2777,
13,
34960,
82,
13,
1806,
13,
39687,
7,
23,
8,
198,
38,
13,
29487,
7,
276,
3212,
28,
17821,
11,
7877,
28,
897,
11,
3670,
11639,
3256,
37423,
62,
8043,
11639,
81,
3256,
5743,
62,
8043,
11639,
65,
11537,
198,
198,
45597,
796,
458,
83,
13,
31560,
293,
19510,
15,
11,
657,
828,
16874,
28,
16,
11,
3124,
11639,
70,
3256,
6070,
28,
25101,
11,
6910,
30916,
28,
18,
8,
198,
897,
13,
2860,
62,
49016,
7,
45597,
8,
198,
198,
9248,
796,
4153,
9,
16,
13,
20,
198,
198,
1370,
62,
16,
796,
458,
83,
13,
13949,
17,
35,
26933,
16,
11,
657,
4357,
685,
15,
11,
657,
4357,
9493,
413,
5649,
28,
17,
11,
9493,
10992,
2625,
12,
1600,
3124,
2625,
13424,
4943,
198,
1370,
62,
17,
796,
458,
83,
13,
13949,
17,
35,
26933,
37659,
13,
6966,
7,
9248,
14,
15277,
9,
17,
9,
37659,
13,
14415,
828,
657,
4357,
685,
37659,
13,
31369,
7,
9248,
14,
15277,
9,
17,
9,
37659,
13,
14415,
828,
657,
4357,
9493,
413,
5649,
28,
17,
11,
9493,
10992,
796,
366,
438,
1600,
3124,
2625,
13424,
4943,
198,
897,
13,
2860,
62,
1370,
7,
1370,
62,
16,
8,
198,
897,
13,
2860,
62,
1370,
7,
1370,
62,
17,
8,
198,
198,
9248,
62,
29487,
796,
10173,
19510,
15,
11,
15,
828,
657,
13,
23,
11,
657,
13,
23,
11,
657,
11,
657,
11,
9848,
11,
3124,
11639,
13424,
3256,
9493,
413,
5649,
28,
17,
8,
198,
897,
13,
2860,
62,
17147,
7,
9248,
62,
29487,
8,
198,
198,
897,
13,
5239,
7,
15,
13,
20,
9,
37659,
13,
6966,
7,
9248,
14,
17,
14,
15277,
9,
17,
9,
37659,
13,
14415,
828,
657,
13,
20,
9,
37659,
13,
31369,
7,
9248,
14,
17,
14,
15277,
9,
17,
9,
37659,
13,
14415,
828,
374,
1,
3,
59,
1169,
8326,
3,
1600,
10369,
7857,
28,
1507,
8,
198,
198,
897,
13,
22704,
10786,
2364,
11537,
198,
897,
13,
22704,
10786,
40496,
11537,
198,
198,
5647,
13,
33464,
62,
39786,
3419,
198,
34345,
796,
28686,
13,
6978,
13,
22018,
578,
742,
7,
418,
13,
6978,
13,
12093,
12453,
7,
834,
7753,
834,
4008,
58,
15,
60,
1343,
45302,
12315,
6,
198,
5647,
13,
21928,
5647,
7,
34345,
8,
198
] | 2.208494 | 518 |
# By Justin Walgran
# Copyright (c) 2012 Azavea, 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.
import unittest
from blend import Configuration
from blend import Analyzer
from blend.Resource import Resource
from blend.SizeAnalyzer import SizeAnalyzer
from blend import Minifier
from blend.YUICompressorMinifier import YUICompressorMinifier
import os
import shutil
import tempfile
from helpers import clean_output, create_file_with_content
| [
2,
2750,
10799,
6445,
46324,
198,
2,
15069,
357,
66,
8,
2321,
7578,
1015,
64,
11,
3457,
13,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
198,
2,
16727,
257,
4866,
286,
428,
3788,
290,
3917,
10314,
198,
2,
3696,
357,
1169,
366,
25423,
12340,
284,
1730,
287,
262,
10442,
1231,
198,
2,
17504,
11,
1390,
1231,
17385,
262,
2489,
284,
779,
11,
198,
2,
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,
198,
2,
10442,
318,
30760,
284,
466,
523,
11,
2426,
284,
262,
1708,
198,
2,
3403,
25,
198,
2,
198,
2,
383,
2029,
6634,
4003,
290,
428,
7170,
4003,
2236,
307,
198,
2,
3017,
287,
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,
198,
2,
7788,
32761,
6375,
8959,
49094,
11,
47783,
2751,
21728,
5626,
40880,
5390,
3336,
34764,
11015,
198,
2,
3963,
34482,
3398,
1565,
5603,
25382,
11,
376,
46144,
7473,
317,
16652,
2149,
37232,
33079,
48933,
5357,
198,
2,
44521,
1268,
10913,
2751,
12529,
13,
3268,
8005,
49261,
50163,
3336,
37195,
20673,
6375,
27975,
38162,
9947,
198,
2,
367,
15173,
4877,
9348,
43031,
19146,
7473,
15529,
47666,
3955,
11,
29506,
25552,
6375,
25401,
43031,
25382,
11,
198,
2,
7655,
2767,
16879,
3268,
3537,
40282,
3963,
27342,
10659,
11,
309,
9863,
6375,
25401,
54,
24352,
11,
5923,
1797,
2751,
198,
2,
16034,
11,
16289,
3963,
6375,
3268,
7102,
45,
24565,
13315,
3336,
47466,
6375,
3336,
23210,
6375,
198,
2,
25401,
5550,
1847,
20754,
3268,
3336,
47466,
13,
198,
198,
11748,
555,
715,
395,
198,
198,
6738,
13516,
1330,
28373,
198,
6738,
13516,
1330,
16213,
9107,
198,
6738,
13516,
13,
26198,
1330,
20857,
198,
6738,
13516,
13,
10699,
37702,
9107,
1330,
12849,
37702,
9107,
198,
6738,
13516,
1330,
1855,
7483,
198,
6738,
13516,
13,
56,
52,
2149,
3361,
44292,
9452,
7483,
1330,
575,
52,
2149,
3361,
44292,
9452,
7483,
198,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
20218,
7753,
198,
198,
6738,
49385,
1330,
3424,
62,
22915,
11,
2251,
62,
7753,
62,
4480,
62,
11299,
628
] | 3.795337 | 386 |
class EditorAttribute(Attribute,_Attribute):
"""
Specifies the editor to use to change a property. This class cannot be inherited.
EditorAttribute()
EditorAttribute(typeName: str,baseTypeName: str)
EditorAttribute(typeName: str,baseType: Type)
EditorAttribute(type: Type,baseType: Type)
"""
def Equals(self,obj):
"""
Equals(self: EditorAttribute,obj: object) -> bool
Returns whether the value of the given object is equal to the current
System.ComponentModel.EditorAttribute.
obj: The object to test the value equality of.
Returns: true if the value of the given object is equal to that of the current object; otherwise,false.
"""
pass
def GetHashCode(self):
""" GetHashCode(self: EditorAttribute) -> int """
pass
def __eq__(self,*args):
""" x.__eq__(y) <==> x==y """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,*__args):
"""
__new__(cls: type)
__new__(cls: type,typeName: str,baseTypeName: str)
__new__(cls: type,typeName: str,baseType: Type)
__new__(cls: type,type: Type,baseType: Type)
"""
pass
EditorBaseTypeName=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets the name of the base class or interface serving as a lookup key for this editor.
Get: EditorBaseTypeName(self: EditorAttribute) -> str
"""
EditorTypeName=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets the name of the editor class in the System.Type.AssemblyQualifiedName format.
Get: EditorTypeName(self: EditorAttribute) -> str
"""
TypeId=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets a unique ID for this attribute type.
Get: TypeId(self: EditorAttribute) -> object
"""
| [
4871,
12058,
33682,
7,
33682,
11,
62,
33682,
2599,
201,
198,
37227,
201,
198,
18291,
6945,
262,
5464,
284,
779,
284,
1487,
257,
3119,
13,
770,
1398,
2314,
307,
19552,
13,
201,
198,
201,
198,
220,
201,
198,
201,
198,
12058,
33682,
3419,
201,
198,
201,
198,
12058,
33682,
7,
4906,
5376,
25,
965,
11,
8692,
6030,
5376,
25,
965,
8,
201,
198,
201,
198,
12058,
33682,
7,
4906,
5376,
25,
965,
11,
8692,
6030,
25,
5994,
8,
201,
198,
201,
198,
12058,
33682,
7,
4906,
25,
5994,
11,
8692,
6030,
25,
5994,
8,
201,
198,
37227,
201,
198,
825,
7889,
874,
7,
944,
11,
26801,
2599,
201,
198,
220,
37227,
201,
198,
220,
7889,
874,
7,
944,
25,
12058,
33682,
11,
26801,
25,
2134,
8,
4613,
20512,
201,
198,
201,
198,
220,
220,
201,
198,
201,
198,
220,
220,
16409,
1771,
262,
1988,
286,
262,
1813,
2134,
318,
4961,
284,
262,
1459,
220,
201,
198,
201,
198,
220,
220,
220,
4482,
13,
21950,
17633,
13,
17171,
33682,
13,
201,
198,
201,
198,
220,
220,
201,
198,
201,
198,
220,
220,
201,
198,
201,
198,
220,
220,
26181,
25,
383,
2134,
284,
1332,
262,
1988,
10537,
286,
13,
201,
198,
201,
198,
220,
220,
16409,
25,
2081,
611,
262,
1988,
286,
262,
1813,
2134,
318,
4961,
284,
326,
286,
262,
1459,
2134,
26,
4306,
11,
9562,
13,
201,
198,
220,
37227,
201,
198,
220,
1208,
201,
198,
825,
3497,
26257,
10669,
7,
944,
2599,
201,
198,
220,
37227,
3497,
26257,
10669,
7,
944,
25,
12058,
33682,
8,
4613,
493,
37227,
201,
198,
220,
1208,
201,
198,
825,
11593,
27363,
834,
7,
944,
11,
9,
22046,
2599,
201,
198,
220,
37227,
2124,
13,
834,
27363,
834,
7,
88,
8,
1279,
855,
29,
2124,
855,
88,
37227,
201,
198,
220,
1208,
201,
198,
825,
11593,
15003,
834,
7,
944,
11,
9,
22046,
2599,
201,
198,
220,
37227,
2124,
13,
834,
15003,
834,
7,
23029,
4238,
4340,
2124,
26,
766,
2124,
13,
834,
4871,
834,
13,
834,
15390,
834,
329,
9877,
87,
13,
834,
15003,
834,
7,
23029,
4238,
4340,
2124,
26,
766,
2124,
13,
834,
4871,
834,
13,
834,
15390,
834,
329,
9877,
87,
13,
834,
15003,
834,
7,
23029,
4238,
4340,
2124,
26,
766,
2124,
13,
834,
4871,
834,
13,
834,
15390,
834,
329,
9877,
37227,
201,
198,
220,
1208,
201,
198,
2488,
12708,
24396,
201,
198,
825,
11593,
3605,
834,
7,
944,
11,
9,
834,
22046,
2599,
201,
198,
220,
37227,
201,
198,
220,
11593,
3605,
834,
7,
565,
82,
25,
2099,
8,
201,
198,
201,
198,
220,
11593,
3605,
834,
7,
565,
82,
25,
2099,
11,
4906,
5376,
25,
965,
11,
8692,
6030,
5376,
25,
965,
8,
201,
198,
201,
198,
220,
11593,
3605,
834,
7,
565,
82,
25,
2099,
11,
4906,
5376,
25,
965,
11,
8692,
6030,
25,
5994,
8,
201,
198,
201,
198,
220,
11593,
3605,
834,
7,
565,
82,
25,
2099,
11,
4906,
25,
5994,
11,
8692,
6030,
25,
5994,
8,
201,
198,
220,
37227,
201,
198,
220,
1208,
201,
198,
12058,
14881,
6030,
5376,
28,
26745,
7,
50033,
2116,
25,
2134,
22784,
50033,
2116,
11,
85,
25,
6045,
11,
50033,
2116,
25,
6045,
8,
201,
198,
37227,
38,
1039,
262,
1438,
286,
262,
2779,
1398,
393,
7071,
7351,
355,
257,
35847,
1994,
329,
428,
5464,
13,
201,
198,
201,
198,
201,
198,
201,
198,
3855,
25,
12058,
14881,
6030,
5376,
7,
944,
25,
12058,
33682,
8,
4613,
965,
201,
198,
201,
198,
201,
198,
201,
198,
37811,
201,
198,
201,
198,
12058,
6030,
5376,
28,
26745,
7,
50033,
2116,
25,
2134,
22784,
50033,
2116,
11,
85,
25,
6045,
11,
50033,
2116,
25,
6045,
8,
201,
198,
37227,
38,
1039,
262,
1438,
286,
262,
5464,
1398,
287,
262,
4482,
13,
6030,
13,
49670,
46181,
1431,
5376,
5794,
13,
201,
198,
201,
198,
201,
198,
201,
198,
3855,
25,
12058,
6030,
5376,
7,
944,
25,
12058,
33682,
8,
4613,
965,
201,
198,
201,
198,
201,
198,
201,
198,
37811,
201,
198,
201,
198,
5994,
7390,
28,
26745,
7,
50033,
2116,
25,
2134,
22784,
50033,
2116,
11,
85,
25,
6045,
11,
50033,
2116,
25,
6045,
8,
201,
198,
37227,
38,
1039,
257,
3748,
4522,
329,
428,
11688,
2099,
13,
201,
198,
201,
198,
201,
198,
201,
198,
3855,
25,
5994,
7390,
7,
944,
25,
12058,
33682,
8,
4613,
2134,
201,
198,
201,
198,
201,
198,
201,
198,
37811,
201,
198,
201,
198,
201,
198
] | 2.811141 | 736 |
#!/usr/bin/python3
import math
def mysqrt(a):
"""Compute the square root of a using Newton's method: start with an
approximate answer and iteratively improving it
"""
estimate = a / 2 + 1 # Arbitrary estimae of the square root of a
epsilon = 0.0000001
while True:
approx = (estimate + a / estimate)/2
if abs(approx-estimate) < epsilon:
return approx
estimate = approx
def test_square_root(a):
"""Print a table that, for all the numbers in the range a,
compares the square roots calculated with the
Newton's method with those calculated with the built in function math.sqrt()
and display the absolute error between the two.
"""
n = float(1)
print('n', ' '*10, 'mysqrt(n)', ' '*10, 'math.swrt(n)', ' '*10, 'diff')
print('-', ' '*10, '---------', ' '*10, '------------', ' '*10, '----')
for i in range(a):
my_square = mysqrt(n)
math_square = math.sqrt(n)
abs_error = abs(math_square - my_square)
x = str(n)
if (len(x) >= 4):
val = x + (' '*(9-(len(x)-3)))
else:
val = x + ' '*9
perfect_square = math_square*math_square == n
my_square = format(my_square, '.12f')
math_square = format(math_square, '.12f')
abs_error = format(abs_error, '.12g')
if (perfect_square):
my_square = my_square[:3]
math_square = math_square[:3]
space1 = ' '*16
space2 = ' '*19
else:
space1 = ' '*5
space2 = ' '*8
print(val, my_square, space1, math_square, space2, abs_error)
n += 1
def ask_user():
"""Prompt the user to enter how many numbers to be calculated"""
a = int(input('Enter how many numbers you want to calculate: '))
test_square_root(a)
ask_user()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
11748,
10688,
198,
198,
4299,
616,
31166,
17034,
7,
64,
2599,
198,
220,
220,
220,
37227,
7293,
1133,
262,
6616,
6808,
286,
257,
1262,
17321,
338,
2446,
25,
923,
351,
281,
198,
220,
220,
220,
27665,
3280,
290,
11629,
9404,
10068,
340,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8636,
796,
257,
1220,
362,
1343,
352,
1303,
33619,
11619,
3959,
3609,
286,
262,
6616,
6808,
286,
257,
198,
220,
220,
220,
304,
862,
33576,
796,
657,
13,
2388,
8298,
198,
220,
220,
220,
981,
6407,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5561,
796,
357,
395,
1920,
1343,
257,
1220,
8636,
20679,
17,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2352,
7,
1324,
13907,
12,
395,
1920,
8,
1279,
304,
862,
33576,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
5561,
198,
220,
220,
220,
220,
220,
220,
220,
8636,
796,
5561,
198,
198,
4299,
1332,
62,
23415,
62,
15763,
7,
64,
2599,
198,
220,
220,
220,
37227,
18557,
257,
3084,
326,
11,
329,
477,
262,
3146,
287,
262,
2837,
257,
11,
220,
198,
220,
220,
220,
23008,
262,
6616,
11135,
10488,
351,
262,
220,
198,
220,
220,
220,
17321,
338,
2446,
351,
883,
10488,
351,
262,
3170,
287,
2163,
10688,
13,
31166,
17034,
3419,
198,
220,
220,
220,
290,
3359,
262,
4112,
4049,
1022,
262,
734,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
299,
796,
12178,
7,
16,
8,
198,
220,
220,
220,
3601,
10786,
77,
3256,
705,
705,
9,
940,
11,
705,
28744,
80,
17034,
7,
77,
8,
3256,
705,
705,
9,
940,
11,
705,
11018,
13,
2032,
17034,
7,
77,
8,
3256,
705,
705,
9,
940,
11,
705,
26069,
11537,
198,
220,
220,
220,
3601,
10786,
12,
3256,
705,
705,
9,
940,
11,
705,
45537,
3256,
705,
705,
9,
940,
11,
705,
10541,
3256,
705,
705,
9,
940,
11,
705,
650,
11537,
628,
220,
220,
220,
329,
1312,
287,
2837,
7,
64,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
616,
62,
23415,
796,
616,
31166,
17034,
7,
77,
8,
198,
220,
220,
220,
220,
220,
220,
220,
10688,
62,
23415,
796,
10688,
13,
31166,
17034,
7,
77,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2352,
62,
18224,
796,
2352,
7,
11018,
62,
23415,
532,
616,
62,
23415,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
796,
965,
7,
77,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
11925,
7,
87,
8,
18189,
604,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1188,
796,
2124,
1343,
19203,
705,
9,
7,
24,
30420,
11925,
7,
87,
13219,
18,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1188,
796,
2124,
1343,
705,
705,
9,
24,
628,
220,
220,
220,
220,
220,
220,
220,
2818,
62,
23415,
796,
10688,
62,
23415,
9,
11018,
62,
23415,
6624,
299,
198,
220,
220,
220,
220,
220,
220,
220,
616,
62,
23415,
796,
5794,
7,
1820,
62,
23415,
11,
45302,
1065,
69,
11537,
220,
198,
220,
220,
220,
220,
220,
220,
220,
10688,
62,
23415,
796,
5794,
7,
11018,
62,
23415,
11,
45302,
1065,
69,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
2352,
62,
18224,
796,
5794,
7,
8937,
62,
18224,
11,
45302,
1065,
70,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
611,
357,
25833,
62,
23415,
2599,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
616,
62,
23415,
796,
616,
62,
23415,
58,
25,
18,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10688,
62,
23415,
796,
10688,
62,
23415,
58,
25,
18,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2272,
16,
796,
705,
705,
9,
1433,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2272,
17,
796,
705,
705,
9,
1129,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2272,
16,
796,
705,
705,
9,
20,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2272,
17,
796,
705,
705,
9,
23,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
2100,
11,
616,
62,
23415,
11,
2272,
16,
11,
10688,
62,
23415,
11,
2272,
17,
11,
2352,
62,
18224,
8,
220,
198,
220,
220,
220,
220,
220,
220,
220,
299,
15853,
352,
198,
198,
4299,
1265,
62,
7220,
33529,
198,
220,
220,
220,
37227,
24129,
457,
262,
2836,
284,
3802,
703,
867,
3146,
284,
307,
10488,
37811,
198,
220,
220,
220,
257,
796,
493,
7,
15414,
10786,
17469,
703,
867,
3146,
345,
765,
284,
15284,
25,
705,
4008,
198,
220,
220,
220,
1332,
62,
23415,
62,
15763,
7,
64,
8,
198,
198,
2093,
62,
7220,
3419,
198
] | 2.212264 | 848 |
from utils import log
from utils import correlate
import random
| [
6738,
3384,
4487,
1330,
2604,
198,
198,
6738,
3384,
4487,
1330,
39684,
198,
11748,
4738,
198
] | 4.0625 | 16 |
from pathlib import Path
from tests.simulations import BaseSimulationTest
from src.epjson_handler import EPJSON
test_dir = Path(__file__).parent.parent.parent
hot_water_objects = {
"HVACTemplate:Plant:Boiler": {
"Main Boiler": {
"boiler_type": "HotWaterBoiler",
"capacity": "Autosize",
"efficiency": 0.8,
"fuel_type": "NaturalGas",
"priority": "1"
}
},
"HVACTemplate:Plant:HotWaterLoop": {
"Hot Water Loop": {
"hot_water_design_setpoint": 82,
"hot_water_plant_operation_scheme_type": "Default",
"hot_water_pump_configuration": "ConstantFlow",
"hot_water_pump_rated_head": 179352,
"hot_water_reset_outdoor_dry_bulb_high": 10,
"hot_water_reset_outdoor_dry_bulb_low": -6.7,
"hot_water_setpoint_at_outdoor_dry_bulb_high": 65.6,
"hot_water_setpoint_at_outdoor_dry_bulb_low": 82.2,
"hot_water_setpoint_reset_type": "OutdoorAirTemperatureReset",
"pump_control_type": "Intermittent"
}
}
}
schedule_objects = {
"Schedule:Compact": {
"Always0.8": {
"data": [
{
"field": "Through: 12/31"
},
{
"field": "For: AllDays"
},
{
"field": "Until: 24:00"
},
{
"field": 0.8
}
],
"schedule_type_limits_name": "Any Number"
},
"Always6.8": {
"data": [
{
"field": "Through: 12/31"
},
{
"field": "For: AllDays"
},
{
"field": "Until: 24:00"
},
{
"field": 6.8
}
],
"schedule_type_limits_name": "Any Number"
},
"Always12.5": {
"data": [
{
"field": "Through: 12/31"
},
{
"field": "For: AllDays"
},
{
"field": "Until: 24:00"
},
{
"field": 12.5
}
],
"schedule_type_limits_name": "Any Number"
},
"Always15.5": {
"data": [
{
"field": "Through: 12/31"
},
{
"field": "For: AllDays"
},
{
"field": "Until: 24:00"
},
{
"field": 15.5
}
],
"schedule_type_limits_name": "Any Number"
},
"Always62": {
"data": [
{
"field": "Through: 12/31"
},
{
"field": "For: AllDays"
},
{
"field": "Until: 24:00"
},
{
"field": 62.0
}
],
"schedule_type_limits_name": "Any Number"
},
"Always29": {
"data": [
{
"field": "Through: 12/31"
},
{
"field": "For: AllDays"
},
{
"field": "Until: 24:00"
},
{
"field": 29.0
}
],
"schedule_type_limits_name": "Any Number"
}
}
}
| [
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
5254,
13,
14323,
5768,
1330,
7308,
8890,
1741,
14402,
198,
6738,
12351,
13,
538,
17752,
62,
30281,
1330,
14724,
40386,
198,
198,
9288,
62,
15908,
796,
10644,
7,
834,
7753,
834,
737,
8000,
13,
8000,
13,
8000,
198,
198,
8940,
62,
7050,
62,
48205,
796,
1391,
198,
220,
220,
220,
366,
39,
53,
10659,
368,
6816,
25,
3646,
415,
25,
16635,
5329,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
13383,
3248,
5329,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
2127,
5329,
62,
4906,
1298,
366,
21352,
19184,
16635,
5329,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
42404,
1298,
366,
16541,
418,
1096,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
45888,
1298,
657,
13,
23,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
25802,
62,
4906,
1298,
366,
35364,
39699,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
49336,
1298,
366,
16,
1,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
8964,
198,
220,
220,
220,
366,
39,
53,
10659,
368,
6816,
25,
3646,
415,
25,
21352,
19184,
39516,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
21352,
5638,
26304,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8940,
62,
7050,
62,
26124,
62,
2617,
4122,
1298,
9415,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8940,
62,
7050,
62,
15060,
62,
27184,
62,
15952,
1326,
62,
4906,
1298,
366,
19463,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8940,
62,
7050,
62,
79,
931,
62,
11250,
3924,
1298,
366,
3103,
18797,
37535,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8940,
62,
7050,
62,
79,
931,
62,
4111,
62,
2256,
1298,
27228,
33394,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8940,
62,
7050,
62,
42503,
62,
448,
9424,
62,
39140,
62,
15065,
65,
62,
8929,
1298,
838,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8940,
62,
7050,
62,
42503,
62,
448,
9424,
62,
39140,
62,
15065,
65,
62,
9319,
1298,
532,
21,
13,
22,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8940,
62,
7050,
62,
2617,
4122,
62,
265,
62,
448,
9424,
62,
39140,
62,
15065,
65,
62,
8929,
1298,
6135,
13,
21,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8940,
62,
7050,
62,
2617,
4122,
62,
265,
62,
448,
9424,
62,
39140,
62,
15065,
65,
62,
9319,
1298,
9415,
13,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8940,
62,
7050,
62,
2617,
4122,
62,
42503,
62,
4906,
1298,
366,
7975,
9424,
16170,
42492,
4965,
316,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
79,
931,
62,
13716,
62,
4906,
1298,
366,
818,
4354,
715,
298,
1,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
1782,
198,
92,
198,
198,
15952,
5950,
62,
48205,
796,
1391,
198,
220,
220,
220,
366,
27054,
5950,
25,
7293,
529,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
30374,
15,
13,
23,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7890,
1298,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
15046,
25,
1105,
14,
3132,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
1890,
25,
1439,
38770,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
18273,
25,
1987,
25,
405,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
657,
13,
23,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16589,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15952,
5950,
62,
4906,
62,
49196,
62,
3672,
1298,
366,
7149,
7913,
1,
198,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
366,
30374,
21,
13,
23,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7890,
1298,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
15046,
25,
1105,
14,
3132,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
1890,
25,
1439,
38770,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
18273,
25,
1987,
25,
405,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
718,
13,
23,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16589,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15952,
5950,
62,
4906,
62,
49196,
62,
3672,
1298,
366,
7149,
7913,
1,
198,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
366,
30374,
1065,
13,
20,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7890,
1298,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
15046,
25,
1105,
14,
3132,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
1890,
25,
1439,
38770,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
18273,
25,
1987,
25,
405,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
1105,
13,
20,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16589,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15952,
5950,
62,
4906,
62,
49196,
62,
3672,
1298,
366,
7149,
7913,
1,
198,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
366,
30374,
1314,
13,
20,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7890,
1298,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
15046,
25,
1105,
14,
3132,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
1890,
25,
1439,
38770,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
18273,
25,
1987,
25,
405,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
1315,
13,
20,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16589,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15952,
5950,
62,
4906,
62,
49196,
62,
3672,
1298,
366,
7149,
7913,
1,
198,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
366,
30374,
5237,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7890,
1298,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
15046,
25,
1105,
14,
3132,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
1890,
25,
1439,
38770,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
18273,
25,
1987,
25,
405,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
8190,
13,
15,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16589,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15952,
5950,
62,
4906,
62,
49196,
62,
3672,
1298,
366,
7149,
7913,
1,
198,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
366,
30374,
1959,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7890,
1298,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
15046,
25,
1105,
14,
3132,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
1890,
25,
1439,
38770,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
366,
18273,
25,
1987,
25,
405,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
1298,
2808,
13,
15,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16589,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15952,
5950,
62,
4906,
62,
49196,
62,
3672,
1298,
366,
7149,
7913,
1,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
1782,
198,
92,
628
] | 1.487881 | 2,558 |
# Generated by Django 2.0 on 2019-01-31 07:28
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
319,
13130,
12,
486,
12,
3132,
8753,
25,
2078,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.892857 | 28 |
"""
Test suite for BibKey formatting sequences.
Tests the generation of key contents based on the author entry
"""
from zotero_bibtize.bibkey_formatter import KeyFormatter
#
# Test lower author formatting
#
#
# Test upper author formatting
#
#
# Test capitalized author formatting
#
#
# Test abbreviated author formatting
#
def test_missing_author():
"""Test editor is used if author is missing"""
key_format = '[author]'
# check that editor is used if author not present
editors = 'Surname, Firstname and Prefix Surname, Firstname'
authors = ''
key_formatter = KeyFormatter({'author': authors, 'editor': editors})
assert key_formatter.generate_key(key_format) == 'Surname'
# check authors take precedence over editors
editors = 'Editor, Firstname and Prefix Author, Firstname'
authors = 'Author, Firstname and Prefix Author, Firstname'
key_formatter = KeyFormatter({'author': authors, 'editor': editors})
assert key_formatter.generate_key(key_format) == 'Author'
# check No Name author is used if none is present
editors = ''
authors = ''
key_formatter = KeyFormatter({'author': authors, 'editor': editors})
assert key_formatter.generate_key(key_format) == 'NoName'
def test_author_list_split_for_name_containing_and():
"""Test that author lists are only split at and that is not part of a name"""
key_format = '[author]'
authors = 'Ackland, G. J. and Bacon, D. J. and Calder, A. F.'
key_formatter = KeyFormatter({'author': authors})
assert key_formatter.generate_key(key_format) == 'Ackland'
| [
37811,
198,
14402,
18389,
329,
43278,
9218,
33313,
16311,
13,
198,
198,
51,
3558,
262,
5270,
286,
1994,
10154,
1912,
319,
262,
1772,
5726,
198,
37811,
198,
198,
6738,
1976,
313,
3529,
62,
65,
571,
83,
1096,
13,
65,
571,
2539,
62,
687,
1436,
1330,
7383,
8479,
1436,
198,
198,
2,
198,
2,
6208,
2793,
1772,
33313,
198,
2,
628,
628,
198,
198,
2,
198,
2,
6208,
6727,
1772,
33313,
198,
2,
628,
628,
198,
198,
2,
198,
2,
6208,
3139,
1143,
1772,
33313,
198,
2,
628,
628,
198,
198,
2,
198,
2,
6208,
37640,
515,
1772,
33313,
198,
2,
628,
628,
198,
198,
4299,
1332,
62,
45688,
62,
9800,
33529,
198,
220,
220,
220,
37227,
14402,
5464,
318,
973,
611,
1772,
318,
4814,
37811,
198,
220,
220,
220,
1994,
62,
18982,
796,
44438,
9800,
49946,
198,
220,
220,
220,
1303,
2198,
326,
5464,
318,
973,
611,
1772,
407,
1944,
198,
220,
220,
220,
15719,
796,
705,
50,
700,
480,
11,
3274,
3672,
290,
3771,
13049,
311,
700,
480,
11,
3274,
3672,
6,
198,
220,
220,
220,
7035,
796,
10148,
220,
198,
220,
220,
220,
1994,
62,
687,
1436,
796,
7383,
8479,
1436,
15090,
6,
9800,
10354,
7035,
11,
705,
35352,
10354,
15719,
30072,
198,
220,
220,
220,
6818,
1994,
62,
687,
1436,
13,
8612,
378,
62,
2539,
7,
2539,
62,
18982,
8,
6624,
705,
50,
700,
480,
6,
198,
220,
220,
220,
1303,
2198,
7035,
1011,
38177,
625,
15719,
198,
220,
220,
220,
15719,
796,
705,
17171,
11,
3274,
3672,
290,
3771,
13049,
6434,
11,
3274,
3672,
6,
198,
220,
220,
220,
7035,
796,
705,
13838,
11,
3274,
3672,
290,
3771,
13049,
6434,
11,
3274,
3672,
6,
198,
220,
220,
220,
1994,
62,
687,
1436,
796,
7383,
8479,
1436,
15090,
6,
9800,
10354,
7035,
11,
705,
35352,
10354,
15719,
30072,
198,
220,
220,
220,
6818,
1994,
62,
687,
1436,
13,
8612,
378,
62,
2539,
7,
2539,
62,
18982,
8,
6624,
705,
13838,
6,
198,
220,
220,
220,
1303,
2198,
1400,
6530,
1772,
318,
973,
611,
4844,
318,
1944,
198,
220,
220,
220,
15719,
796,
10148,
198,
220,
220,
220,
7035,
796,
10148,
220,
198,
220,
220,
220,
1994,
62,
687,
1436,
796,
7383,
8479,
1436,
15090,
6,
9800,
10354,
7035,
11,
705,
35352,
10354,
15719,
30072,
198,
220,
220,
220,
6818,
1994,
62,
687,
1436,
13,
8612,
378,
62,
2539,
7,
2539,
62,
18982,
8,
6624,
705,
2949,
5376,
6,
628,
198,
4299,
1332,
62,
9800,
62,
4868,
62,
35312,
62,
1640,
62,
3672,
62,
38301,
62,
392,
33529,
198,
220,
220,
220,
37227,
14402,
326,
1772,
8341,
389,
691,
6626,
379,
290,
326,
318,
407,
636,
286,
257,
1438,
37811,
198,
220,
220,
220,
1994,
62,
18982,
796,
44438,
9800,
49946,
198,
220,
220,
220,
7035,
796,
705,
32,
694,
1044,
11,
402,
13,
449,
13,
290,
28548,
11,
360,
13,
449,
13,
290,
36468,
11,
317,
13,
376,
2637,
198,
220,
220,
220,
1994,
62,
687,
1436,
796,
7383,
8479,
1436,
15090,
6,
9800,
10354,
7035,
30072,
198,
220,
220,
220,
6818,
1994,
62,
687,
1436,
13,
8612,
378,
62,
2539,
7,
2539,
62,
18982,
8,
6624,
705,
32,
694,
1044,
6,
198
] | 3.058935 | 526 |
"""
Classes for exporting entities.
So far only one implementation
"""
import re
external_taxon = re.compile("taxon:([0-9]+)")
internal_taxon = re.compile("NCBITaxon:([0-9]+)")
class EntityWriter():
"""
Abstract superclass of all association writer objects (Gpad, GAF)
"""
# TODO: add to superclass
# TODO: add to superclass
# TODO: add to superclass
def write_entity(self, e):
"""
Write a single entity
"""
pass ## Implemented in subclasses
def write(self, entities, meta=None):
"""
Write a complete set of entities to a file
Arguments
---------
entities: list[dict]
A list of entity dict objects
meta: Meta
metadata about association set (not yet implemented)
"""
for e in entities:
self.write_entity(e)
class GpiWriter(EntityWriter):
"""
Writes entities in GPI format
Takes an entity dictionary:
{
'id': id, (String)
'label': db_object_symbol, (String)
'full_name': db_object_name, (String)
'synonyms': synonyms, (List[str])
'type': db_object_type, (String)
'parents': parents, (List[Str])
'xrefs': xref_ids, (List[Str])
'taxon': {
'id': self._taxon_id(taxon) (String)
}
}
"""
def write_entity(self, entity):
"""
Write a single entity to a line in the output file
"""
db, db_object_id = self._split_prefix(entity)
taxon = normalize_taxon(entity["taxon"]["id"])
vals = [
db,
db_object_id,
entity.get('label'),
entity.get('full_name'),
entity.get('synonyms'),
entity.get('type'),
taxon,
entity.get('parents'),
entity.get('xrefs'),
entity.get('properties')
]
self._write_row(vals)
| [
37811,
198,
9487,
274,
329,
39133,
12066,
13,
198,
198,
2396,
1290,
691,
530,
7822,
198,
37811,
198,
11748,
302,
198,
198,
22615,
62,
19290,
261,
796,
302,
13,
5589,
576,
7203,
19290,
261,
25,
26933,
15,
12,
24,
60,
28988,
4943,
198,
32538,
62,
19290,
261,
796,
302,
13,
5589,
576,
7203,
7792,
26094,
897,
261,
25,
26933,
15,
12,
24,
60,
28988,
4943,
628,
198,
4871,
20885,
34379,
33529,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
27741,
2208,
4871,
286,
477,
8112,
6260,
5563,
357,
38,
15636,
11,
402,
8579,
8,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1303,
16926,
46,
25,
751,
284,
2208,
4871,
628,
220,
220,
220,
1303,
16926,
46,
25,
751,
284,
2208,
4871,
628,
220,
220,
220,
1303,
16926,
46,
25,
751,
284,
2208,
4871,
198,
220,
220,
220,
825,
3551,
62,
26858,
7,
944,
11,
304,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
19430,
257,
2060,
9312,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
220,
22492,
1846,
1154,
12061,
287,
850,
37724,
628,
220,
220,
220,
825,
3551,
7,
944,
11,
12066,
11,
13634,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
19430,
257,
1844,
900,
286,
12066,
284,
257,
2393,
628,
220,
220,
220,
220,
220,
220,
220,
20559,
2886,
198,
220,
220,
220,
220,
220,
220,
220,
45337,
198,
220,
220,
220,
220,
220,
220,
220,
12066,
25,
1351,
58,
11600,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
317,
1351,
286,
9312,
8633,
5563,
198,
220,
220,
220,
220,
220,
220,
220,
13634,
25,
30277,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
20150,
546,
8112,
900,
357,
1662,
1865,
9177,
8,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
329,
304,
287,
12066,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
13564,
62,
26858,
7,
68,
8,
198,
198,
4871,
402,
14415,
34379,
7,
32398,
34379,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
12257,
274,
12066,
287,
402,
11901,
5794,
628,
220,
220,
220,
33687,
281,
9312,
22155,
25,
198,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
312,
10354,
4686,
11,
357,
10100,
8,
198,
220,
220,
220,
220,
220,
220,
220,
705,
18242,
10354,
20613,
62,
15252,
62,
1837,
23650,
11,
357,
10100,
8,
198,
220,
220,
220,
220,
220,
220,
220,
705,
12853,
62,
3672,
10354,
20613,
62,
15252,
62,
3672,
11,
357,
10100,
8,
198,
220,
220,
220,
220,
220,
220,
220,
705,
28869,
43612,
10354,
6171,
43612,
11,
357,
8053,
58,
2536,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
705,
4906,
10354,
20613,
62,
15252,
62,
4906,
11,
357,
10100,
8,
198,
220,
220,
220,
220,
220,
220,
220,
705,
23743,
10354,
3397,
11,
357,
8053,
58,
13290,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
705,
87,
5420,
82,
10354,
2124,
5420,
62,
2340,
11,
357,
8053,
58,
13290,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
705,
19290,
261,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
312,
10354,
2116,
13557,
19290,
261,
62,
312,
7,
19290,
261,
8,
357,
10100,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
1782,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
3551,
62,
26858,
7,
944,
11,
9312,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
19430,
257,
2060,
9312,
284,
257,
1627,
287,
262,
5072,
2393,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
11,
20613,
62,
15252,
62,
312,
796,
2116,
13557,
35312,
62,
40290,
7,
26858,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1687,
261,
796,
3487,
1096,
62,
19290,
261,
7,
26858,
14692,
19290,
261,
1,
7131,
1,
312,
8973,
8,
628,
220,
220,
220,
220,
220,
220,
220,
410,
874,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
20613,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
20613,
62,
15252,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9312,
13,
1136,
10786,
18242,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9312,
13,
1136,
10786,
12853,
62,
3672,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9312,
13,
1136,
10786,
28869,
43612,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9312,
13,
1136,
10786,
4906,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1687,
261,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9312,
13,
1136,
10786,
23743,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9312,
13,
1136,
10786,
87,
5420,
82,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9312,
13,
1136,
10786,
48310,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
2361,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
13564,
62,
808,
7,
12786,
8,
198
] | 2.129489 | 919 |
"""Train a network."""
from .args import Args
from .stats import Stats
from .main import main, train
| [
37811,
44077,
257,
3127,
526,
15931,
198,
6738,
764,
22046,
1330,
943,
14542,
198,
6738,
764,
34242,
1330,
20595,
198,
6738,
764,
12417,
1330,
1388,
11,
4512,
198
] | 3.607143 | 28 |
# Generated by Django 2.2.4 on 2019-10-09 13:20
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
19,
319,
13130,
12,
940,
12,
2931,
1511,
25,
1238,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
#!/usr/bin/python3
if __name__ == '__main__': run()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
1057,
3419,
198
] | 2.304348 | 23 |
#Copyright (C) 2020 Xiao Wang
#License: MIT for academic use.
#Contact: Xiao Wang ([email protected], [email protected])
#Some codes adopted from https://github.com/facebookresearch/moco
import os
from ops.argparser import argparser
from ops.Config_Environment import Config_Environment
import torch.multiprocessing as mp
from training.main_worker import main_worker
if __name__ == '__main__':
#use_cuda = torch.cuda.is_available()
#print("starting check cuda status",use_cuda)
#if use_cuda:
parser = argparser()
args = parser.parse_args()
main(args)
| [
2,
15269,
357,
34,
8,
12131,
28249,
15233,
198,
2,
34156,
25,
17168,
329,
8233,
779,
13,
198,
2,
17829,
25,
28249,
15233,
357,
47562,
20167,
17,
31,
79,
30345,
13,
15532,
11,
2124,
544,
322,
648,
4967,
18005,
31,
14816,
13,
785,
8,
198,
198,
2,
4366,
12416,
8197,
422,
3740,
1378,
12567,
13,
785,
14,
19024,
34033,
14,
76,
25634,
198,
11748,
28686,
198,
6738,
39628,
13,
853,
48610,
1330,
220,
1822,
48610,
198,
6738,
39628,
13,
16934,
62,
31441,
1330,
17056,
62,
31441,
198,
11748,
28034,
13,
16680,
541,
305,
919,
278,
355,
29034,
198,
6738,
3047,
13,
12417,
62,
28816,
1330,
1388,
62,
28816,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1303,
1904,
62,
66,
15339,
796,
28034,
13,
66,
15339,
13,
271,
62,
15182,
3419,
198,
220,
220,
220,
1303,
4798,
7203,
38690,
2198,
269,
15339,
3722,
1600,
1904,
62,
66,
15339,
8,
198,
220,
220,
220,
1303,
361,
779,
62,
66,
15339,
25,
198,
220,
220,
220,
30751,
796,
1822,
48610,
3419,
198,
220,
220,
220,
26498,
796,
30751,
13,
29572,
62,
22046,
3419,
198,
220,
220,
220,
1388,
7,
22046,
8,
198
] | 2.979798 | 198 |
import hashlib
import hmac
from time import time
from typing import Optional, Union
| [
11748,
12234,
8019,
198,
11748,
289,
20285,
198,
6738,
640,
1330,
640,
198,
6738,
19720,
1330,
32233,
11,
4479,
628,
198
] | 4.095238 | 21 |
"""Image parser module.
"""
import os
import base64
def parse_image(image) -> str:
"""Check whether the image is a string or a file path or a file-like object.
:param image:
A base64 string or a file path or a file-like object representing an image.
:return:
Image as a base64 string.
"""
data = None
if hasattr(image, 'read'): # When image is a file-like object.
data = image.read()
elif os.path.isfile(image): # When image is a file path.
with open(image, 'rb') as file:
data = file.read()
return base64.b64encode(data).decode('utf-8') if data else image
| [
37811,
5159,
30751,
8265,
13,
198,
37811,
198,
11748,
28686,
198,
11748,
2779,
2414,
628,
198,
4299,
21136,
62,
9060,
7,
9060,
8,
4613,
965,
25,
198,
220,
220,
220,
37227,
9787,
1771,
262,
2939,
318,
257,
4731,
393,
257,
2393,
3108,
393,
257,
2393,
12,
2339,
2134,
13,
198,
220,
220,
220,
1058,
17143,
2939,
25,
198,
220,
220,
220,
220,
220,
220,
220,
317,
2779,
2414,
4731,
393,
257,
2393,
3108,
393,
257,
2393,
12,
2339,
2134,
10200,
281,
2939,
13,
198,
220,
220,
220,
1058,
7783,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7412,
355,
257,
2779,
2414,
4731,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1366,
796,
6045,
198,
220,
220,
220,
611,
468,
35226,
7,
9060,
11,
705,
961,
6,
2599,
220,
1303,
1649,
2939,
318,
257,
2393,
12,
2339,
2134,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
2939,
13,
961,
3419,
198,
220,
220,
220,
1288,
361,
28686,
13,
6978,
13,
4468,
576,
7,
9060,
2599,
220,
1303,
1649,
2939,
318,
257,
2393,
3108,
13,
198,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
9060,
11,
705,
26145,
11537,
355,
2393,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
2393,
13,
961,
3419,
628,
220,
220,
220,
1441,
2779,
2414,
13,
65,
2414,
268,
8189,
7,
7890,
737,
12501,
1098,
10786,
40477,
12,
23,
11537,
611,
1366,
2073,
2939,
198
] | 2.614754 | 244 |
# Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
#
# -------------------------------------------------------------------------------
#
# This file is intended to provide the same functions as
# https://github.com/carla-simulator/driving-benchmarks/blob/master/version084/benchmark_tools/experiment_suites/experiment_suite.py
# but working with CARLA 0.9.11 and gym
import abc
from collections import OrderedDict
from gym_carla.converters.observations.sensors.camera.rgb import RGBCameraSensorObservations
from carla import Transform, Location, Rotation
| [
2,
15069,
357,
66,
8,
2177,
13851,
19009,
3337,
357,
34,
15922,
8,
379,
262,
26986,
270,
265,
5231,
261,
6086,
390,
198,
2,
15142,
357,
52,
6242,
737,
198,
2,
198,
2,
770,
670,
318,
11971,
739,
262,
2846,
286,
262,
17168,
5964,
13,
198,
2,
1114,
257,
4866,
11,
766,
1279,
5450,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
36393,
28401,
198,
2,
198,
2,
16529,
24305,
198,
2,
198,
2,
770,
2393,
318,
5292,
284,
2148,
262,
976,
5499,
355,
198,
2,
3740,
1378,
12567,
13,
785,
14,
7718,
5031,
12,
14323,
8927,
14,
24255,
12,
26968,
14306,
14,
2436,
672,
14,
9866,
14,
9641,
2919,
19,
14,
26968,
4102,
62,
31391,
14,
23100,
3681,
62,
2385,
2737,
14,
23100,
3681,
62,
2385,
578,
13,
9078,
198,
2,
475,
1762,
351,
17368,
13534,
657,
13,
24,
13,
1157,
290,
11550,
198,
198,
11748,
450,
66,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
11550,
62,
7718,
5031,
13,
1102,
332,
1010,
13,
672,
3168,
602,
13,
82,
641,
669,
13,
25695,
13,
81,
22296,
1330,
34359,
2749,
18144,
47864,
31310,
712,
602,
198,
6738,
1097,
5031,
1330,
26981,
11,
13397,
11,
371,
14221,
628
] | 3.606965 | 201 |
import argparse
import json
from os.path import basename, join, split, splitext
import sys
from w4_tiled_converter import converters
# Convert a tiled tmx tilemap to source files
if __name__ == "__main__":
main()
| [
11748,
1822,
29572,
198,
11748,
33918,
198,
6738,
28686,
13,
6978,
1330,
1615,
12453,
11,
4654,
11,
6626,
11,
4328,
578,
742,
198,
11748,
25064,
198,
198,
6738,
266,
19,
62,
83,
3902,
62,
1102,
332,
353,
1330,
6718,
1010,
198,
198,
2,
38240,
257,
256,
3902,
256,
36802,
17763,
8899,
284,
2723,
3696,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.986667 | 75 |
# Generated by Django 2.1.1 on 2018-10-05 22:33
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
16,
319,
2864,
12,
940,
12,
2713,
2534,
25,
2091,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from flask import Blueprint
db_manage_bp = Blueprint('db_manage_cmd', __name__, cli_group=None)
from book_library_app.commands import db_manage_commands | [
6738,
42903,
1330,
39932,
198,
198,
9945,
62,
805,
496,
62,
46583,
796,
39932,
10786,
9945,
62,
805,
496,
62,
28758,
3256,
11593,
3672,
834,
11,
537,
72,
62,
8094,
28,
14202,
8,
198,
198,
6738,
1492,
62,
32016,
62,
1324,
13,
9503,
1746,
1330,
20613,
62,
805,
496,
62,
9503,
1746
] | 2.961538 | 52 |
#importing the library
#nn requires matrix2d.py and the math module and random module for dependencies
import nn
import random
#create the neural network to solve the XOR problem
#takes an array of arrays for argument
#the 2, 4 and 1 represent two nodes in the input and 4 nodes in the hidden layer and 1 node in the output layer
#you can add more layers by adding an array to the larger array with a number in it for the number of nodes you want like [[2],[3],[3],[4]]
#you can set the learning rate and the network's weights and biases after you give it its shape (0.1 is default for learning rate)
example_neural_network = nn.NeuralNetwork([[2],[4],[1]], learning_rate = 0.2)
#have your inputs and targets in an array which match the number of inputs and outputs specificed in the initialization of the neural network
#if you want to use backpropagation and gradient descent in supervised learning
inputs = [[1,0.01],[0.01,1],[1,1],[0.01,0.01]]
targets = [[0.99],[0.99],[0.01],[0.01]]
#train the network on the inputs and the targets
for i in range(20000):
index = random.randint(0,3)
example_neural_network.train(inputs[index], targets[index])
#check what the network outputs after it has been trained
#this should be close to the targets
print(example_neural_network.feedforward(inputs[0]))
print(example_neural_network.feedforward(inputs[1]))
print(example_neural_network.feedforward(inputs[2]))
print(example_neural_network.feedforward(inputs[3]))
#print out some of the information in the network
example_neural_network.print()
| [
2,
11748,
278,
262,
5888,
198,
2,
20471,
4433,
17593,
17,
67,
13,
9078,
290,
262,
10688,
8265,
290,
4738,
8265,
329,
20086,
198,
11748,
299,
77,
198,
11748,
4738,
198,
198,
2,
17953,
262,
17019,
3127,
284,
8494,
262,
1395,
1581,
1917,
198,
2,
83,
1124,
281,
7177,
286,
26515,
329,
4578,
198,
2,
1169,
362,
11,
604,
290,
352,
2380,
734,
13760,
287,
262,
5128,
290,
604,
13760,
287,
262,
7104,
7679,
290,
352,
10139,
287,
262,
5072,
7679,
198,
2,
5832,
460,
751,
517,
11685,
416,
4375,
281,
7177,
284,
262,
4025,
7177,
351,
257,
1271,
287,
340,
329,
262,
1271,
286,
13760,
345,
765,
588,
16410,
17,
38430,
18,
38430,
18,
38430,
19,
11907,
198,
2,
5832,
460,
900,
262,
4673,
2494,
290,
262,
3127,
338,
19590,
290,
29275,
706,
345,
1577,
340,
663,
5485,
357,
15,
13,
16,
318,
4277,
329,
4673,
2494,
8,
198,
20688,
62,
710,
1523,
62,
27349,
796,
299,
77,
13,
8199,
1523,
26245,
26933,
58,
17,
38430,
19,
38430,
16,
60,
4357,
4673,
62,
4873,
796,
657,
13,
17,
8,
198,
198,
2,
14150,
534,
17311,
290,
6670,
287,
281,
7177,
543,
2872,
262,
1271,
286,
17311,
290,
23862,
2176,
276,
287,
262,
37588,
286,
262,
17019,
3127,
198,
2,
361,
345,
765,
284,
779,
736,
22930,
363,
341,
290,
31312,
18598,
287,
28679,
4673,
198,
15414,
82,
796,
16410,
16,
11,
15,
13,
486,
38430,
15,
13,
486,
11,
16,
38430,
16,
11,
16,
38430,
15,
13,
486,
11,
15,
13,
486,
11907,
198,
83,
853,
1039,
796,
16410,
15,
13,
2079,
38430,
15,
13,
2079,
38430,
15,
13,
486,
38430,
15,
13,
486,
11907,
198,
198,
2,
27432,
262,
3127,
319,
262,
17311,
290,
262,
6670,
198,
1640,
1312,
287,
2837,
7,
2167,
405,
2599,
198,
220,
220,
220,
6376,
796,
4738,
13,
25192,
600,
7,
15,
11,
18,
8,
198,
220,
220,
220,
1672,
62,
710,
1523,
62,
27349,
13,
27432,
7,
15414,
82,
58,
9630,
4357,
6670,
58,
9630,
12962,
198,
198,
2,
9122,
644,
262,
3127,
23862,
706,
340,
468,
587,
8776,
198,
2,
5661,
815,
307,
1969,
284,
262,
6670,
198,
4798,
7,
20688,
62,
710,
1523,
62,
27349,
13,
12363,
11813,
7,
15414,
82,
58,
15,
60,
4008,
198,
4798,
7,
20688,
62,
710,
1523,
62,
27349,
13,
12363,
11813,
7,
15414,
82,
58,
16,
60,
4008,
198,
4798,
7,
20688,
62,
710,
1523,
62,
27349,
13,
12363,
11813,
7,
15414,
82,
58,
17,
60,
4008,
198,
4798,
7,
20688,
62,
710,
1523,
62,
27349,
13,
12363,
11813,
7,
15414,
82,
58,
18,
60,
4008,
198,
198,
2,
4798,
503,
617,
286,
262,
1321,
287,
262,
3127,
198,
20688,
62,
710,
1523,
62,
27349,
13,
4798,
3419,
198
] | 3.404396 | 455 |
from django.db import models
from django.core.exceptions import ObjectDoesNotExist
from rest_framework import status
from guilds.models import Guild
from dmessages.models import Message
from users.models import User
from channels.models import Channel
from .utils import create_error_response
from .utils import create_success_response
# Create your models here.
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
9515,
13921,
3673,
3109,
396,
198,
6738,
1334,
62,
30604,
1330,
3722,
198,
198,
6738,
19806,
82,
13,
27530,
1330,
16446,
198,
6738,
288,
37348,
1095,
13,
27530,
1330,
16000,
198,
6738,
2985,
13,
27530,
1330,
11787,
198,
6738,
9619,
13,
27530,
1330,
11102,
198,
6738,
764,
26791,
1330,
2251,
62,
18224,
62,
26209,
198,
6738,
764,
26791,
1330,
2251,
62,
13138,
62,
26209,
198,
198,
2,
13610,
534,
4981,
994,
13,
628
] | 4.066667 | 90 |
from urllib.parse import urlencode
from urllib.request import Request, urlopen
import json
import argparse
import configparser
main()
| [
6738,
2956,
297,
571,
13,
29572,
1330,
2956,
11925,
8189,
198,
6738,
2956,
297,
571,
13,
25927,
1330,
19390,
11,
19016,
9654,
198,
11748,
33918,
198,
11748,
1822,
29572,
198,
11748,
4566,
48610,
198,
198,
12417,
3419,
198
] | 3.552632 | 38 |
# -*- coding: utf-8 -*-
"""
Copyright (C) 2015, MuChu Hsu
Contributed by Muchu Hsu ([email protected])
This file is part of BSD license
<https://opensource.org/licenses/BSD-3-Clause>
"""
import json
from flask import Flask
from flask import request
from flask import render_template
from flask import jsonify
from story_chain.localdb import LocalDbForStoryChain
app = Flask(__name__.split(".")[0])
#啟動 server
#建立 jsonp response
#在指定的段落之後 加入新的故事段落 (return 新段落 id)
@app.route("/story_chain/api_post/story", methods=["GET"])
#取得指定段落內容
@app.route("/story_chain/api_get/story/<int:intStoryId>", methods=["GET"])
#修改指定段落內容 (按贊/按噓)
@app.route("/story_chain/api_put/story/<int:intStoryId>", methods=["GET"])
#取得 前 or 後 故事段 列表 (return 段落 id list)
@app.route("/story_chain/api_get/story", methods=["GET"])
#讀取書籤
@app.route("/story_chain/api_get/tag/<strTagName>", methods=["GET"])
#新增書籤 (書籤有時限)
@app.route("/story_chain/api_post/tag", methods=["GET"])
#= Flask 範例 =
#GET POST參數範例
@app.route("/hello/<username>/<int:num>", methods=["GET", "POST"])
#template範例
@app.route("/template/")
@app.route("/template/<name>")
#post json範例
@app.route("/jsonpapi", methods=["GET"])
if __name__ == "__main__":
start_flask_server() | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
15269,
357,
34,
8,
1853,
11,
8252,
1925,
84,
367,
2385,
198,
4264,
6169,
416,
13111,
84,
367,
2385,
357,
29482,
84,
29279,
31,
14816,
13,
785,
8,
198,
1212,
2393,
318,
636,
286,
347,
10305,
5964,
198,
198,
27,
5450,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
21800,
12,
18,
12,
2601,
682,
29,
198,
37811,
198,
11748,
33918,
198,
6738,
42903,
1330,
46947,
198,
6738,
42903,
1330,
2581,
198,
6738,
42903,
1330,
8543,
62,
28243,
198,
6738,
42903,
1330,
33918,
1958,
198,
6738,
1621,
62,
7983,
13,
17946,
1940,
65,
1330,
10714,
43832,
1890,
11605,
35491,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
13,
35312,
7203,
19570,
58,
15,
12962,
198,
198,
2,
161,
243,
253,
47947,
243,
4382,
198,
220,
220,
220,
220,
198,
2,
161,
119,
118,
44165,
233,
33918,
79,
2882,
198,
220,
220,
220,
220,
198,
2,
28839,
101,
162,
234,
229,
22522,
248,
21410,
162,
106,
113,
164,
238,
121,
45298,
36181,
234,
10263,
232,
254,
17739,
98,
23877,
108,
21410,
46763,
227,
12859,
233,
162,
106,
113,
164,
238,
121,
357,
7783,
10545,
244,
108,
162,
106,
113,
164,
238,
121,
4686,
8,
198,
31,
1324,
13,
38629,
7203,
14,
13571,
62,
7983,
14,
15042,
62,
7353,
14,
13571,
1600,
5050,
28,
14692,
18851,
8973,
8,
198,
220,
220,
220,
220,
198,
2,
20998,
244,
36181,
245,
162,
234,
229,
22522,
248,
162,
106,
113,
164,
238,
121,
17739,
100,
22522,
117,
198,
31,
1324,
13,
38629,
7203,
14,
13571,
62,
7983,
14,
15042,
62,
1136,
14,
13571,
14,
27,
600,
25,
600,
11605,
7390,
29,
1600,
5050,
28,
14692,
18851,
8973,
8,
198,
220,
220,
220,
220,
198,
2,
46479,
106,
162,
242,
117,
162,
234,
229,
22522,
248,
162,
106,
113,
164,
238,
121,
17739,
100,
22522,
117,
357,
162,
234,
231,
164,
112,
232,
14,
162,
234,
231,
161,
247,
241,
8,
198,
31,
1324,
13,
38629,
7203,
14,
13571,
62,
7983,
14,
15042,
62,
1996,
14,
13571,
14,
27,
600,
25,
600,
11605,
7390,
29,
1600,
5050,
28,
14692,
18851,
8973,
8,
198,
220,
220,
220,
220,
198,
2,
20998,
244,
36181,
245,
10263,
231,
235,
393,
10263,
122,
234,
10545,
243,
227,
12859,
233,
162,
106,
113,
10263,
230,
245,
26193,
101,
357,
7783,
10545,
106,
113,
164,
238,
121,
4686,
1351,
8,
198,
31,
1324,
13,
38629,
7203,
14,
13571,
62,
7983,
14,
15042,
62,
1136,
14,
13571,
1600,
5050,
28,
14692,
18851,
8973,
8,
198,
2,
164,
106,
222,
20998,
244,
162,
249,
116,
163,
109,
97,
198,
31,
1324,
13,
38629,
7203,
14,
13571,
62,
7983,
14,
15042,
62,
1136,
14,
12985,
14,
27,
2536,
24835,
5376,
29,
1600,
5050,
28,
14692,
18851,
8973,
8,
198,
220,
220,
220,
220,
198,
198,
2,
23877,
108,
161,
95,
252,
162,
249,
116,
163,
109,
97,
357,
162,
249,
116,
163,
109,
97,
17312,
231,
162,
25081,
165,
247,
238,
8,
198,
31,
1324,
13,
38629,
7203,
14,
13571,
62,
7983,
14,
15042,
62,
7353,
14,
12985,
1600,
5050,
28,
14692,
18851,
8973,
8,
198,
198,
2,
28,
46947,
13328,
107,
226,
160,
122,
233,
796,
198,
2,
18851,
24582,
20998,
225,
46763,
116,
163,
107,
226,
160,
122,
233,
198,
31,
1324,
13,
38629,
7203,
14,
31373,
14,
27,
29460,
29,
14,
27,
600,
25,
22510,
29,
1600,
5050,
28,
14692,
18851,
1600,
366,
32782,
8973,
8,
198,
220,
220,
220,
220,
198,
2,
28243,
163,
107,
226,
160,
122,
233,
198,
31,
1324,
13,
38629,
7203,
14,
28243,
14,
4943,
198,
31,
1324,
13,
38629,
7203,
14,
28243,
14,
27,
3672,
29,
4943,
198,
220,
220,
220,
220,
198,
2,
7353,
33918,
163,
107,
226,
160,
122,
233,
198,
31,
1324,
13,
38629,
7203,
14,
17752,
79,
15042,
1600,
5050,
28,
14692,
18851,
8973,
8,
198,
220,
220,
220,
220,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
923,
62,
2704,
2093,
62,
15388,
3419
] | 1.861357 | 678 |
# coding: utf-8
"""
Xero Accounting API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
from xero_python.models import BaseModel
class ReportFields(BaseModel):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {"field_id": "str", "description": "str", "value": "str"}
attribute_map = {
"field_id": "FieldID",
"description": "Description",
"value": "Value",
}
def __init__(self, field_id=None, description=None, value=None): # noqa: E501
"""ReportFields - a model defined in OpenAPI""" # noqa: E501
self._field_id = None
self._description = None
self._value = None
self.discriminator = None
if field_id is not None:
self.field_id = field_id
if description is not None:
self.description = description
if value is not None:
self.value = value
@property
def field_id(self):
"""Gets the field_id of this ReportFields. # noqa: E501
:return: The field_id of this ReportFields. # noqa: E501
:rtype: str
"""
return self._field_id
@field_id.setter
def field_id(self, field_id):
"""Sets the field_id of this ReportFields.
:param field_id: The field_id of this ReportFields. # noqa: E501
:type: str
"""
self._field_id = field_id
@property
def description(self):
"""Gets the description of this ReportFields. # noqa: E501
:return: The description of this ReportFields. # noqa: E501
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this ReportFields.
:param description: The description of this ReportFields. # noqa: E501
:type: str
"""
self._description = description
@property
def value(self):
"""Gets the value of this ReportFields. # noqa: E501
:return: The value of this ReportFields. # noqa: E501
:rtype: str
"""
return self._value
@value.setter
def value(self, value):
"""Sets the value of this ReportFields.
:param value: The value of this ReportFields. # noqa: E501
:type: str
"""
self._value = value
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
1395,
3529,
40964,
7824,
628,
220,
220,
220,
1400,
6764,
2810,
357,
27568,
416,
4946,
15042,
35986,
3740,
1378,
12567,
13,
785,
14,
9654,
499,
270,
10141,
14,
9654,
15042,
12,
8612,
1352,
8,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
14039,
25,
40391,
31,
87,
3529,
13,
785,
198,
220,
220,
220,
2980,
515,
416,
25,
3740,
1378,
9654,
15042,
12,
8612,
1352,
13,
13670,
198,
37811,
628,
198,
11748,
302,
220,
1303,
645,
20402,
25,
376,
21844,
198,
198,
6738,
2124,
3529,
62,
29412,
13,
27530,
1330,
7308,
17633,
628,
198,
4871,
6358,
15878,
82,
7,
14881,
17633,
2599,
198,
220,
220,
220,
37227,
16580,
25,
770,
1398,
318,
8295,
7560,
416,
4946,
17614,
35986,
13,
198,
220,
220,
220,
6524,
25,
3740,
1378,
9654,
15042,
12,
8612,
1352,
13,
13670,
628,
220,
220,
220,
2141,
407,
4370,
262,
1398,
14500,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
220,
220,
1280,
15042,
62,
19199,
357,
11600,
2599,
383,
1994,
318,
11688,
1438,
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,
262,
1988,
318,
11688,
2099,
13,
198,
220,
220,
220,
220,
220,
11688,
62,
8899,
357,
11600,
2599,
383,
1994,
318,
11688,
1438,
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,
262,
1988,
318,
33918,
1994,
287,
6770,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1280,
15042,
62,
19199,
796,
19779,
3245,
62,
312,
1298,
366,
2536,
1600,
366,
11213,
1298,
366,
2536,
1600,
366,
8367,
1298,
366,
2536,
20662,
628,
220,
220,
220,
11688,
62,
8899,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
3245,
62,
312,
1298,
366,
15878,
2389,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
11213,
1298,
366,
11828,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
8367,
1298,
366,
11395,
1600,
198,
220,
220,
220,
1782,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
2214,
62,
312,
28,
14202,
11,
6764,
28,
14202,
11,
1988,
28,
14202,
2599,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
19100,
15878,
82,
532,
257,
2746,
5447,
287,
4946,
17614,
37811,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
3245,
62,
312,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
11213,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
8367,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15410,
3036,
20900,
796,
6045,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2214,
62,
312,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3245,
62,
312,
796,
2214,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
611,
6764,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
11213,
796,
6764,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1988,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
8367,
796,
1988,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
2214,
62,
312,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
2214,
62,
312,
286,
428,
6358,
15878,
82,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
2214,
62,
312,
286,
428,
6358,
15878,
82,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
3245,
62,
312,
628,
220,
220,
220,
2488,
3245,
62,
312,
13,
2617,
353,
198,
220,
220,
220,
825,
2214,
62,
312,
7,
944,
11,
2214,
62,
312,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
2214,
62,
312,
286,
428,
6358,
15878,
82,
13,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
2214,
62,
312,
25,
383,
2214,
62,
312,
286,
428,
6358,
15878,
82,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
3245,
62,
312,
796,
2214,
62,
312,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
6764,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
6764,
286,
428,
6358,
15878,
82,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
6764,
286,
428,
6358,
15878,
82,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
11213,
628,
220,
220,
220,
2488,
11213,
13,
2617,
353,
198,
220,
220,
220,
825,
6764,
7,
944,
11,
6764,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
6764,
286,
428,
6358,
15878,
82,
13,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
6764,
25,
383,
6764,
286,
428,
6358,
15878,
82,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
11213,
796,
6764,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
1988,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
1988,
286,
428,
6358,
15878,
82,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
1988,
286,
428,
6358,
15878,
82,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
8367,
628,
220,
220,
220,
2488,
8367,
13,
2617,
353,
198,
220,
220,
220,
825,
1988,
7,
944,
11,
1988,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
1988,
286,
428,
6358,
15878,
82,
13,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
1988,
25,
383,
1988,
286,
428,
6358,
15878,
82,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
8367,
796,
1988,
198
] | 2.37602 | 1,226 |
from scipy import stats
import numpy as np
############################
# CALCULATING CORRELATIONS #
############################
array_1 = np.array([1,2,3,4,5,6]) # Create a numpy array from a list
array_2 = array_1 # Create another array with the same values
print(stats.pearsonr(array_1, array_2)) # Calculate the correlation which will be 1 since the values are the same
#######################
# NORMAL DISTRIBUTION #
#######################
x = stats.norm.rvs(loc=0, scale=10, size=10) # Generate 10 values randomly sampled from a normal distribution with mean 0 and standard deviation of 10
print(x)
################################
# PROBABILITY DENSITY FUNCTION #
################################
p1 = stats.norm.pdf(x=-100, loc=0, scale=10) # Get probability of sampling a value of -100
p2 = stats.norm.pdf(x=0, loc=0, scale=10) # Get probability of sampling a value of 0
print(p1)
print(p2)
####################################
# CUMULATIVE DISTRIBUTION FUNCTION #
####################################
p1 = stats.norm.cdf(x=0, loc=0, scale=10) # Get probability of sampling a value less than or equal to 0
print(p1)
######################################
# CALCULATING DESCRIPTIVE STATISTICS #
######################################
print(stats.describe(stats.norm.rvs(loc=0, scale=1, size=500))) # Calculate descriptive statistics for 500 data points sampled from normal distribution with mean 0 and standard deviation of 1
| [
6738,
629,
541,
88,
1330,
9756,
198,
11748,
299,
32152,
355,
45941,
198,
198,
14468,
7804,
4242,
198,
2,
33290,
34,
6239,
33881,
23929,
16448,
18421,
1303,
198,
14468,
7804,
4242,
198,
198,
18747,
62,
16,
796,
45941,
13,
18747,
26933,
16,
11,
17,
11,
18,
11,
19,
11,
20,
11,
21,
12962,
220,
1303,
13610,
257,
299,
32152,
7177,
422,
257,
1351,
198,
18747,
62,
17,
796,
7177,
62,
16,
220,
1303,
13610,
1194,
7177,
351,
262,
976,
3815,
198,
198,
4798,
7,
34242,
13,
431,
12613,
81,
7,
18747,
62,
16,
11,
7177,
62,
17,
4008,
220,
1303,
27131,
378,
262,
16096,
543,
481,
307,
352,
1201,
262,
3815,
389,
262,
976,
220,
198,
198,
14468,
4242,
21017,
198,
2,
25273,
42126,
34957,
9865,
35354,
1303,
198,
14468,
4242,
21017,
198,
87,
796,
9756,
13,
27237,
13,
81,
14259,
7,
17946,
28,
15,
11,
5046,
28,
940,
11,
2546,
28,
940,
8,
220,
1303,
2980,
378,
838,
3815,
15456,
35846,
422,
257,
3487,
6082,
351,
1612,
657,
290,
3210,
28833,
286,
838,
198,
198,
4798,
7,
87,
8,
198,
198,
29113,
198,
2,
21965,
4339,
25382,
360,
16938,
9050,
29397,
4177,
2849,
1303,
198,
29113,
198,
79,
16,
796,
9756,
13,
27237,
13,
12315,
7,
87,
10779,
3064,
11,
1179,
28,
15,
11,
5046,
28,
940,
8,
220,
1303,
3497,
12867,
286,
19232,
257,
1988,
286,
532,
3064,
198,
79,
17,
796,
9756,
13,
27237,
13,
12315,
7,
87,
28,
15,
11,
1179,
28,
15,
11,
5046,
28,
940,
8,
220,
220,
220,
220,
1303,
3497,
12867,
286,
19232,
257,
1988,
286,
657,
198,
198,
4798,
7,
79,
16,
8,
198,
4798,
7,
79,
17,
8,
198,
198,
29113,
4242,
198,
2,
327,
5883,
6239,
37045,
34957,
9865,
35354,
29397,
4177,
2849,
1303,
198,
29113,
4242,
198,
79,
16,
796,
9756,
13,
27237,
13,
66,
7568,
7,
87,
28,
15,
11,
1179,
28,
15,
11,
5046,
28,
940,
8,
220,
1303,
3497,
12867,
286,
19232,
257,
1988,
1342,
621,
393,
4961,
284,
657,
198,
198,
4798,
7,
79,
16,
8,
198,
198,
29113,
4242,
2235,
198,
2,
33290,
34,
6239,
33881,
22196,
36584,
51,
9306,
15486,
8808,
19505,
1303,
198,
29113,
4242,
2235,
198,
4798,
7,
34242,
13,
20147,
4892,
7,
34242,
13,
27237,
13,
81,
14259,
7,
17946,
28,
15,
11,
5046,
28,
16,
11,
2546,
28,
4059,
22305,
220,
1303,
27131,
378,
35644,
7869,
329,
5323,
1366,
2173,
35846,
422,
3487,
6082,
351,
1612,
657,
290,
3210,
28833,
286,
352,
198
] | 3.513253 | 415 |
from PySide.QtCore import *
from PySide.QtGui import *
from PySide.QtSql import *
import DarunGrimDatabase
import DiffEngine
from Graphs import *
import FlowGrapher
import FileStoreBrowser
import FileStoreDatabase
import DarunGrimEngine
import pprint
from multiprocessing import Process
from multiprocessing import Queue
import time
import os
import operator
import subprocess
from Log import *
RedirectStdOutErr=True
if __name__=='__main__':
multiprocessing.freeze_support()
import sys
import time
if len(sys.argv)>1:
database_name=sys.argv[1]
else:
database_name=''
app=QApplication(sys.argv)
pixmap=QPixmap('DarunGrimSplash.png')
splash=QSplashScreen(pixmap)
splash.show()
app.processEvents()
time.sleep(0.5)
window=MainWindow(database_name)
window.show()
splash.finish(window)
sys.exit(app.exec_())
| [
6738,
9485,
24819,
13,
48,
83,
14055,
1330,
1635,
198,
6738,
9485,
24819,
13,
48,
83,
8205,
72,
1330,
1635,
198,
6738,
9485,
24819,
13,
48,
83,
50,
13976,
1330,
1635,
198,
198,
11748,
7491,
403,
38,
3036,
38105,
198,
11748,
10631,
13798,
198,
6738,
29681,
82,
1330,
1635,
198,
11748,
27782,
38,
2416,
372,
198,
11748,
9220,
22658,
46532,
198,
11748,
9220,
22658,
38105,
198,
11748,
7491,
403,
38,
3036,
13798,
198,
198,
11748,
279,
4798,
198,
6738,
18540,
305,
919,
278,
1330,
10854,
198,
6738,
18540,
305,
919,
278,
1330,
4670,
518,
198,
11748,
640,
198,
11748,
28686,
198,
11748,
10088,
198,
11748,
850,
14681,
198,
198,
6738,
5972,
1330,
1635,
198,
198,
7738,
1060,
1273,
67,
7975,
9139,
81,
28,
17821,
198,
198,
361,
11593,
3672,
834,
855,
6,
834,
12417,
834,
10354,
198,
197,
16680,
541,
305,
919,
278,
13,
5787,
2736,
62,
11284,
3419,
198,
197,
11748,
25064,
198,
197,
11748,
640,
628,
197,
361,
18896,
7,
17597,
13,
853,
85,
8,
29,
16,
25,
198,
197,
197,
48806,
62,
3672,
28,
17597,
13,
853,
85,
58,
16,
60,
198,
197,
17772,
25,
198,
197,
197,
48806,
62,
3672,
28,
7061,
628,
197,
1324,
28,
48,
23416,
7,
17597,
13,
853,
85,
8,
198,
197,
79,
844,
8899,
28,
48,
47,
844,
8899,
10786,
32708,
403,
38,
3036,
26568,
1077,
13,
11134,
11537,
198,
197,
22018,
1077,
28,
48,
26568,
1077,
23901,
7,
79,
844,
8899,
8,
198,
197,
22018,
1077,
13,
12860,
3419,
198,
197,
1324,
13,
14681,
37103,
3419,
198,
197,
2435,
13,
42832,
7,
15,
13,
20,
8,
198,
197,
17497,
28,
13383,
27703,
7,
48806,
62,
3672,
8,
198,
197,
17497,
13,
12860,
3419,
198,
197,
22018,
1077,
13,
15643,
680,
7,
17497,
8,
198,
197,
17597,
13,
37023,
7,
1324,
13,
18558,
62,
28955,
198
] | 2.718033 | 305 |
import asyncio
import logging
from Esipraisal.Esipraisal import Esipraisal
ep_log = logging.getLogger("Esipraisal")
ep_log.setLevel(logging.INFO)
ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
ep_log.addHandler(ch)
ep = Esipraisal()
region_ids=[10000002, 10000043, 10000032, 10000016, 10000042, 10000030, 10000064, 10000033, 10000068, 10000020, 10000040, 10000013, 10000039, 10000058]
app = asyncio.run(ep.appraise(29988, region_ids))
print(app) | [
11748,
30351,
952,
198,
11748,
18931,
198,
6738,
8678,
541,
430,
28456,
13,
23041,
541,
430,
28456,
1330,
8678,
541,
430,
28456,
198,
198,
538,
62,
6404,
796,
18931,
13,
1136,
11187,
1362,
7203,
23041,
541,
430,
28456,
4943,
198,
538,
62,
6404,
13,
2617,
4971,
7,
6404,
2667,
13,
10778,
8,
198,
354,
796,
18931,
13,
12124,
25060,
3419,
198,
354,
13,
2617,
4971,
7,
6404,
2667,
13,
10778,
8,
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,
354,
13,
2617,
8479,
1436,
7,
687,
1436,
8,
198,
538,
62,
6404,
13,
2860,
25060,
7,
354,
8,
628,
198,
538,
796,
8678,
541,
430,
28456,
3419,
198,
36996,
62,
2340,
41888,
16,
10535,
17,
11,
1802,
830,
3559,
11,
1802,
830,
2624,
11,
1802,
18005,
21,
11,
1802,
830,
3682,
11,
1802,
830,
1270,
11,
1802,
830,
2414,
11,
1802,
830,
2091,
11,
1802,
830,
3104,
11,
1802,
830,
1238,
11,
1802,
830,
1821,
11,
1802,
18005,
18,
11,
1802,
830,
2670,
11,
1802,
830,
3365,
60,
198,
1324,
796,
30351,
952,
13,
5143,
7,
538,
13,
1324,
40225,
7,
22579,
3459,
11,
3814,
62,
2340,
4008,
198,
198,
4798,
7,
1324,
8
] | 2.556054 | 223 |
#encoding:utf-8
subreddit = 'goodanimemes'
t_channel = '@r_goodanimemes'
| [
2,
12685,
7656,
25,
40477,
12,
23,
198,
198,
7266,
10748,
796,
705,
11274,
11227,
368,
274,
6,
198,
83,
62,
17620,
796,
705,
31,
81,
62,
11274,
11227,
368,
274,
6,
628
] | 2.272727 | 33 |
import numpy as np
import matplotlib.pyplot as plt
plt.rc('font', family='serif')
X1 , X2 = np.meshgrid(np.linspace(-2,2,500),np.linspace(-2,2,500))
F1 = X1**2 + X2**2
F2 = (X1-1)**2+X2**2
G = X1**2 - X1 + 3/16
G1 = 2 * (X1[0] - 0.1) * (X1[0] - 0.9)
G2 = 20 * (X1[0] - 0.4) * (X1[0] - 0.6)
levels = [0.02, 0.1 , 0.25 , 0.5 , 0.8]
plt.figure(figsize=(7,5))
CS = plt.contour(X1,X2,F1,levels,linestyles="dashed",color="black", alpha = 0.5)
CS.collections[0].set_label("$f_1(x)$")
CS = plt.contour(X1, X2, F2, levels, linestyles="dashed", colors='black', alpha=0.5)
CS.collections[0].set_label("$f_2(x)$")
plt.plot(X1[0], G1, linewidth=2.0, color="green", linestyle='dotted')
plt.plot(X1[0][G1<0], G1[G1<0], label="$g_1(x)$", linewidth=2.0, color="green")
plt.plot(X1[0], G2, linewidth=2.0, color="blue", linestyle='dotted')
plt.plot(X1[0][X1[0]>0.6], G2[X1[0]>0.6], label="$g_2(x)$",linewidth=2.0, color="blue")
plt.plot(X1[0][X1[0]<0.4], G2[X1[0]<0.4], linewidth=2.0, color="blue")
plt.plot(np.linspace(0.1,0.4,100), np.zeros(100),linewidth=3.0, color="orange")
plt.plot(np.linspace(0.6,0.9,100), np.zeros(100),linewidth=3.0, color="orange")
plt.xlim(-0.5, 1.5)
plt.ylim(-0.5, 1)
plt.xlabel("$x_1$")
plt.ylabel("$x_2$")
plt.legend(loc='upper center', bbox_to_anchor=(0.5, 1.12),
ncol=4, fancybox=True, shadow=False)
plt.tight_layout()
plt.show() | [
11748,
299,
32152,
355,
45941,
198,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
489,
83,
13,
6015,
10786,
10331,
3256,
1641,
11639,
2655,
361,
11537,
628,
198,
55,
16,
837,
1395,
17,
796,
45941,
13,
76,
5069,
25928,
7,
37659,
13,
21602,
10223,
32590,
17,
11,
17,
11,
4059,
828,
37659,
13,
21602,
10223,
32590,
17,
11,
17,
11,
4059,
4008,
198,
198,
37,
16,
796,
1395,
16,
1174,
17,
1343,
1395,
17,
1174,
17,
198,
37,
17,
796,
357,
55,
16,
12,
16,
8,
1174,
17,
10,
55,
17,
1174,
17,
198,
38,
796,
1395,
16,
1174,
17,
532,
1395,
16,
1343,
513,
14,
1433,
198,
198,
38,
16,
796,
362,
1635,
357,
55,
16,
58,
15,
60,
532,
657,
13,
16,
8,
1635,
357,
55,
16,
58,
15,
60,
532,
657,
13,
24,
8,
198,
198,
38,
17,
796,
1160,
1635,
357,
55,
16,
58,
15,
60,
532,
657,
13,
19,
8,
1635,
357,
55,
16,
58,
15,
60,
532,
657,
13,
21,
8,
198,
198,
46170,
796,
685,
15,
13,
2999,
11,
657,
13,
16,
837,
657,
13,
1495,
837,
657,
13,
20,
837,
657,
13,
23,
60,
198,
198,
489,
83,
13,
26875,
7,
5647,
7857,
16193,
22,
11,
20,
4008,
198,
198,
7902,
796,
458,
83,
13,
3642,
454,
7,
55,
16,
11,
55,
17,
11,
37,
16,
11,
46170,
11,
2815,
42530,
2625,
67,
5263,
1600,
8043,
2625,
13424,
1600,
17130,
796,
657,
13,
20,
8,
198,
7902,
13,
4033,
26448,
58,
15,
4083,
2617,
62,
18242,
7203,
3,
69,
62,
16,
7,
87,
8,
3,
4943,
198,
198,
7902,
796,
458,
83,
13,
3642,
454,
7,
55,
16,
11,
1395,
17,
11,
376,
17,
11,
2974,
11,
9493,
42530,
2625,
67,
5263,
1600,
7577,
11639,
13424,
3256,
17130,
28,
15,
13,
20,
8,
198,
7902,
13,
4033,
26448,
58,
15,
4083,
2617,
62,
18242,
7203,
3,
69,
62,
17,
7,
87,
8,
3,
4943,
198,
198,
489,
83,
13,
29487,
7,
55,
16,
58,
15,
4357,
402,
16,
11,
9493,
413,
5649,
28,
17,
13,
15,
11,
3124,
2625,
14809,
1600,
9493,
10992,
11639,
67,
8426,
11537,
198,
489,
83,
13,
29487,
7,
55,
16,
58,
15,
7131,
38,
16,
27,
15,
4357,
402,
16,
58,
38,
16,
27,
15,
4357,
6167,
2625,
3,
70,
62,
16,
7,
87,
8,
3,
1600,
9493,
413,
5649,
28,
17,
13,
15,
11,
3124,
2625,
14809,
4943,
198,
198,
489,
83,
13,
29487,
7,
55,
16,
58,
15,
4357,
402,
17,
11,
9493,
413,
5649,
28,
17,
13,
15,
11,
3124,
2625,
17585,
1600,
9493,
10992,
11639,
67,
8426,
11537,
198,
489,
83,
13,
29487,
7,
55,
16,
58,
15,
7131,
55,
16,
58,
15,
60,
29,
15,
13,
21,
4357,
402,
17,
58,
55,
16,
58,
15,
60,
29,
15,
13,
21,
4357,
6167,
2625,
3,
70,
62,
17,
7,
87,
8,
3,
1600,
2815,
413,
5649,
28,
17,
13,
15,
11,
3124,
2625,
17585,
4943,
198,
489,
83,
13,
29487,
7,
55,
16,
58,
15,
7131,
55,
16,
58,
15,
60,
27,
15,
13,
19,
4357,
402,
17,
58,
55,
16,
58,
15,
60,
27,
15,
13,
19,
4357,
9493,
413,
5649,
28,
17,
13,
15,
11,
3124,
2625,
17585,
4943,
198,
198,
489,
83,
13,
29487,
7,
37659,
13,
21602,
10223,
7,
15,
13,
16,
11,
15,
13,
19,
11,
3064,
828,
45941,
13,
9107,
418,
7,
3064,
828,
2815,
413,
5649,
28,
18,
13,
15,
11,
3124,
2625,
43745,
4943,
198,
489,
83,
13,
29487,
7,
37659,
13,
21602,
10223,
7,
15,
13,
21,
11,
15,
13,
24,
11,
3064,
828,
45941,
13,
9107,
418,
7,
3064,
828,
2815,
413,
5649,
28,
18,
13,
15,
11,
3124,
2625,
43745,
4943,
198,
198,
489,
83,
13,
87,
2475,
32590,
15,
13,
20,
11,
352,
13,
20,
8,
198,
489,
83,
13,
88,
2475,
32590,
15,
13,
20,
11,
352,
8,
198,
489,
83,
13,
87,
18242,
7203,
3,
87,
62,
16,
3,
4943,
198,
489,
83,
13,
2645,
9608,
7203,
3,
87,
62,
17,
3,
4943,
198,
198,
489,
83,
13,
1455,
437,
7,
17946,
11639,
45828,
3641,
3256,
275,
3524,
62,
1462,
62,
3702,
273,
16193,
15,
13,
20,
11,
352,
13,
1065,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
4033,
28,
19,
11,
14996,
3524,
28,
17821,
11,
9082,
28,
25101,
8,
198,
198,
489,
83,
13,
33464,
62,
39786,
3419,
198,
489,
83,
13,
12860,
3419
] | 1.835121 | 746 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TransactionTestCase
from django.utils.translation import ugettext_lazy as _
from test_addon.models import Complex, Simple, Unconventional
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
9288,
1330,
45389,
14402,
20448,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
355,
4808,
198,
198,
6738,
1332,
62,
48078,
13,
27530,
1330,
19157,
11,
17427,
11,
791,
1102,
20405,
628
] | 3.285714 | 70 |
from core.model import ModelWrapper
from flask_restplus import fields, abort
from werkzeug.datastructures import FileStorage
from maxfw.core import MAX_API, PredictAPI
input_parser = MAX_API.parser()
input_parser.add_argument('image', type=FileStorage, location='files', required=True,
help='An image file encoded as PNG with the size 64*64')
label_prediction = MAX_API.model('LabelPrediction', {
'probability': fields.Float(required=True, description='Probability of the image containing mitosis')
})
predict_response = MAX_API.model('ModelPredictResponse', {
'status': fields.String(required=True, description='Response status message'),
'predictions': fields.List(fields.Nested(label_prediction), description='Predicted labels and probabilities')
})
| [
6738,
4755,
13,
19849,
1330,
9104,
36918,
2848,
198,
6738,
42903,
62,
2118,
9541,
1330,
7032,
11,
15614,
198,
6738,
266,
9587,
2736,
1018,
13,
19608,
459,
1356,
942,
1330,
9220,
31425,
198,
6738,
3509,
44482,
13,
7295,
1330,
25882,
62,
17614,
11,
49461,
17614,
198,
198,
15414,
62,
48610,
796,
25882,
62,
17614,
13,
48610,
3419,
198,
15414,
62,
48610,
13,
2860,
62,
49140,
10786,
9060,
3256,
2099,
28,
8979,
31425,
11,
4067,
11639,
16624,
3256,
2672,
28,
17821,
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,
1037,
11639,
2025,
2939,
2393,
30240,
355,
36182,
351,
262,
2546,
5598,
9,
2414,
11537,
198,
198,
18242,
62,
28764,
2867,
796,
25882,
62,
17614,
13,
19849,
10786,
33986,
39156,
2867,
3256,
1391,
198,
220,
220,
220,
705,
1676,
65,
1799,
10354,
7032,
13,
43879,
7,
35827,
28,
17821,
11,
6764,
11639,
2964,
65,
1799,
286,
262,
2939,
7268,
10255,
5958,
11537,
198,
30072,
198,
198,
79,
17407,
62,
26209,
796,
25882,
62,
17614,
13,
19849,
10786,
17633,
47,
17407,
31077,
3256,
1391,
198,
220,
220,
220,
705,
13376,
10354,
7032,
13,
10100,
7,
35827,
28,
17821,
11,
6764,
11639,
31077,
3722,
3275,
33809,
198,
220,
220,
220,
705,
28764,
9278,
10354,
7032,
13,
8053,
7,
25747,
13,
45,
7287,
7,
18242,
62,
28764,
2867,
828,
6764,
11639,
39156,
5722,
14722,
290,
39522,
11537,
198,
30072,
628
] | 3.258197 | 244 |
# Add the upper directory (where the nodebox module is) to the search path.
import os, sys; sys.path.insert(0, os.path.join("..",".."))
from nodebox.graphics import *
img = Image("creature.png")
# The image.quad property describes the four-sided polygon
# on which an image texture is "mounted".
# This is not necessarily a rectangle, the corners can be distorted:
img.quad.dx1 = 200
img.quad.dy1 = 100
img.quad.dx2 = 100
img.quad.dy2 = -100
# This flushes the image cache, so it is a costly operation.
canvas.size = 500, 500
canvas.run(draw) | [
2,
3060,
262,
6727,
8619,
357,
3003,
262,
10139,
3524,
8265,
318,
8,
284,
262,
2989,
3108,
13,
198,
11748,
28686,
11,
25064,
26,
25064,
13,
6978,
13,
28463,
7,
15,
11,
28686,
13,
6978,
13,
22179,
7203,
492,
2430,
492,
48774,
198,
198,
6738,
10139,
3524,
13,
70,
11549,
1330,
1635,
198,
198,
9600,
796,
7412,
7203,
20123,
495,
13,
11134,
4943,
198,
198,
2,
383,
2939,
13,
47003,
3119,
8477,
262,
1440,
12,
22339,
7514,
14520,
220,
198,
2,
319,
543,
281,
2939,
11743,
318,
366,
29728,
1911,
198,
2,
770,
318,
407,
6646,
257,
35991,
11,
262,
14371,
460,
307,
26987,
25,
198,
9600,
13,
47003,
13,
34350,
16,
796,
220,
939,
198,
9600,
13,
47003,
13,
9892,
16,
796,
220,
1802,
198,
9600,
13,
47003,
13,
34350,
17,
796,
220,
1802,
198,
9600,
13,
47003,
13,
9892,
17,
796,
532,
3064,
198,
198,
2,
770,
781,
17237,
262,
2939,
12940,
11,
523,
340,
318,
257,
16378,
4905,
13,
198,
220,
220,
220,
220,
198,
5171,
11017,
13,
7857,
796,
5323,
11,
5323,
198,
5171,
11017,
13,
5143,
7,
19334,
8
] | 3.016304 | 184 |
#############################################################################
#
# Copyright (c) 2008 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
from five.grok import components, interfaces
from grokcore.view.meta.directoryresource import _get_resource_path
from zope import interface
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
import five.grok
import grokcore.component
import grokcore.security
import grokcore.view
import martian
from AccessControl.security import protectClass, protectName
from App.class_init import InitializeClass as initializeClass
if interfaces.HAVE_FORMLIB:
from five.grok import formlib
if interfaces.HAVE_LAYOUT:
import grokcore.layout
| [
29113,
29113,
7804,
4242,
2,
198,
2,
198,
2,
15069,
357,
66,
8,
3648,
1168,
3008,
5693,
290,
25767,
669,
13,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
770,
3788,
318,
2426,
284,
262,
8617,
286,
262,
1168,
3008,
5094,
13789,
11,
198,
2,
10628,
362,
13,
16,
357,
57,
6489,
737,
220,
317,
4866,
286,
262,
1168,
6489,
815,
13873,
428,
6082,
13,
198,
2,
12680,
47466,
3180,
36592,
2389,
1961,
366,
1921,
3180,
1,
5357,
15529,
5357,
11096,
7788,
32761,
6375,
8959,
49094,
198,
2,
34764,
11015,
15986,
13954,
48778,
1961,
11,
47783,
2751,
11,
21728,
5626,
40880,
5390,
11,
3336,
8959,
49094,
198,
2,
34764,
11015,
3963,
37977,
2538,
11,
34482,
3398,
1565,
5603,
25382,
11,
36218,
38604,
3268,
10913,
2751,
12529,
11,
5357,
376,
46144,
198,
2,
7473,
317,
16652,
2149,
37232,
33079,
48933,
13,
198,
2,
198,
29113,
29113,
7804,
4242,
2235,
198,
198,
6738,
1936,
13,
27333,
74,
1330,
6805,
11,
20314,
198,
6738,
7128,
74,
7295,
13,
1177,
13,
28961,
13,
34945,
31092,
1330,
4808,
1136,
62,
31092,
62,
6978,
198,
6738,
1976,
3008,
1330,
7071,
198,
6738,
1976,
3008,
13,
12984,
8191,
13,
3849,
32186,
13,
40259,
1330,
4522,
891,
1721,
46532,
49925,
198,
198,
11748,
1936,
13,
27333,
74,
198,
11748,
7128,
74,
7295,
13,
42895,
198,
11748,
7128,
74,
7295,
13,
12961,
198,
11748,
7128,
74,
7295,
13,
1177,
198,
11748,
11277,
666,
198,
198,
6738,
8798,
15988,
13,
12961,
1330,
1805,
9487,
11,
1805,
5376,
198,
6738,
2034,
13,
4871,
62,
15003,
1330,
20768,
1096,
9487,
355,
41216,
9487,
628,
198,
361,
20314,
13,
7801,
6089,
62,
13775,
5805,
9865,
25,
198,
220,
220,
220,
422,
1936,
13,
27333,
74,
1330,
1296,
8019,
628,
198,
198,
361,
20314,
13,
7801,
6089,
62,
43,
4792,
12425,
25,
198,
220,
220,
220,
1330,
7128,
74,
7295,
13,
39786,
628,
628,
198
] | 3.824281 | 313 |
"""
configure jax at startup
"""
from jax.config import config
| [
37811,
198,
11250,
495,
474,
897,
379,
13693,
198,
37811,
198,
198,
6738,
474,
897,
13,
11250,
1330,
4566,
628,
198
] | 3.142857 | 21 |
from enum import Enum, unique
Month = Enum('Month', ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'))
for name, member in Month.__members__.items():
print(name, '=>', member, ',', member.value)
# Jan => Month.Jan , 1
# Feb => Month.Feb , 2
# Mar => Month.Mar , 3
# Apr => Month.Apr , 4
# May => Month.May , 5
# Jun => Month.Jun , 6
# Jul => Month.Jul , 7
# Aug => Month.Aug , 8
# Sep => Month.Sep , 9
# Oct => Month.Oct , 10
# Nov => Month.Nov , 11
# Dec => Month.Dec , 12
# 自定义枚举类
@unique
day1 = Weekday.Mon
print(day1)
print(Weekday.Tue)
print(Weekday['Tue'])
print(Weekday.Tue.value)
print(day1 == Weekday.Mon)
for name, member in Weekday.__members__.items():
print(name, '=>', member)
# Sun => Weekday.Sun
# Mon => Weekday.Mon
# Tue => Weekday.Tue
# Wed => Weekday.Wed
# Thu => Weekday.Thu
# Fri => Weekday.Fri
# Sat => Weekday.Sat | [
198,
6738,
33829,
1330,
2039,
388,
11,
3748,
198,
198,
31948,
796,
2039,
388,
10786,
31948,
3256,
19203,
12128,
3256,
705,
15146,
3256,
705,
7676,
3256,
705,
13680,
3256,
705,
6747,
3256,
705,
22396,
3256,
705,
16980,
3256,
705,
12512,
3256,
705,
19117,
3256,
705,
12349,
3256,
705,
20795,
3256,
705,
10707,
6,
4008,
198,
198,
1640,
1438,
11,
2888,
287,
16061,
13,
834,
30814,
834,
13,
23814,
33529,
198,
197,
4798,
7,
3672,
11,
705,
14804,
3256,
2888,
11,
46083,
3256,
2888,
13,
8367,
8,
198,
198,
2,
2365,
5218,
16061,
13,
12128,
837,
352,
198,
2,
3158,
5218,
16061,
13,
15146,
837,
362,
198,
2,
1526,
5218,
16061,
13,
7676,
837,
513,
198,
2,
2758,
5218,
16061,
13,
13680,
837,
604,
198,
2,
1737,
5218,
16061,
13,
6747,
837,
642,
198,
2,
7653,
5218,
16061,
13,
22396,
837,
718,
198,
2,
5979,
5218,
16061,
13,
16980,
837,
767,
198,
2,
2447,
5218,
16061,
13,
12512,
837,
807,
198,
2,
8621,
5218,
16061,
13,
19117,
837,
860,
198,
2,
2556,
5218,
16061,
13,
12349,
837,
838,
198,
2,
5267,
5218,
16061,
13,
20795,
837,
1367,
198,
2,
4280,
5218,
16061,
13,
10707,
837,
1105,
198,
198,
2,
5525,
229,
103,
22522,
248,
20046,
231,
162,
252,
248,
10310,
122,
163,
109,
119,
198,
31,
34642,
198,
198,
820,
16,
796,
6119,
820,
13,
9069,
198,
4798,
7,
820,
16,
8,
198,
198,
4798,
7,
20916,
820,
13,
41392,
8,
198,
198,
4798,
7,
20916,
820,
17816,
41392,
6,
12962,
198,
198,
4798,
7,
20916,
820,
13,
41392,
13,
8367,
8,
198,
4798,
7,
820,
16,
6624,
6119,
820,
13,
9069,
8,
198,
198,
1640,
1438,
11,
2888,
287,
6119,
820,
13,
834,
30814,
834,
13,
23814,
33529,
198,
197,
4798,
7,
3672,
11,
705,
14804,
3256,
2888,
8,
198,
198,
2,
3825,
5218,
6119,
820,
13,
16012,
198,
2,
2892,
5218,
6119,
820,
13,
9069,
198,
2,
30030,
5218,
6119,
820,
13,
41392,
198,
2,
3300,
5218,
6119,
820,
13,
19864,
198,
2,
26223,
5218,
6119,
820,
13,
39902,
198,
2,
19480,
5218,
6119,
820,
13,
30214,
198,
2,
7031,
5218,
6119,
820,
13,
20245
] | 2.483146 | 356 |
import os
import cv2
| [
11748,
28686,
198,
11748,
269,
85,
17,
628,
198
] | 2.555556 | 9 |
# (C) Copyright 2010-2020 Enthought, Inc., Austin, TX
# All rights reserved.
from envisage.core_plugin import CorePlugin
from envisage.ui.tasks.tasks_plugin import TasksPlugin
from force_wfmanager.tests.dummy_classes.dummy_data_view import (
DummyExtensionPluginWithDataView
)
from force_wfmanager.tests.dummy_classes.dummy_contributed_ui import (
DummyUIPlugin, DummyUIPluginOld
)
from force_wfmanager.wfmanager import WfManager
class DummyUIWfManager(WfManager):
"""A workflow manager with a plugin contributing a UI"""
| [
2,
220,
357,
34,
8,
15069,
3050,
12,
42334,
2039,
28895,
11,
3457,
1539,
9533,
11,
15326,
198,
2,
220,
1439,
2489,
10395,
13,
198,
198,
6738,
45633,
496,
13,
7295,
62,
33803,
1330,
7231,
37233,
198,
6738,
45633,
496,
13,
9019,
13,
83,
6791,
13,
83,
6791,
62,
33803,
1330,
309,
6791,
37233,
198,
198,
6738,
2700,
62,
86,
35826,
3536,
13,
41989,
13,
67,
13513,
62,
37724,
13,
67,
13513,
62,
7890,
62,
1177,
1330,
357,
198,
220,
220,
220,
360,
13513,
11627,
3004,
37233,
3152,
6601,
7680,
198,
8,
198,
6738,
2700,
62,
86,
35826,
3536,
13,
41989,
13,
67,
13513,
62,
37724,
13,
67,
13513,
62,
3642,
6169,
62,
9019,
1330,
357,
198,
220,
220,
220,
360,
13513,
10080,
37233,
11,
360,
13513,
10080,
37233,
19620,
198,
8,
198,
6738,
2700,
62,
86,
35826,
3536,
13,
86,
35826,
3536,
1330,
370,
69,
13511,
628,
628,
198,
4871,
360,
13513,
10080,
54,
69,
13511,
7,
54,
69,
13511,
2599,
198,
220,
220,
220,
37227,
32,
30798,
4706,
351,
257,
13877,
14329,
257,
12454,
37811,
198
] | 3.044944 | 178 |
from unittest import TestCase
from ...services.remote import get_broker_address, send_internal_signal
from pika import BlockingConnection, ConnectionParameters
from simplejson import loads
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
2644,
30416,
13,
47960,
1330,
651,
62,
7957,
6122,
62,
21975,
11,
3758,
62,
32538,
62,
12683,
282,
198,
6738,
279,
9232,
1330,
1086,
8629,
32048,
11,
26923,
48944,
198,
6738,
2829,
17752,
1330,
15989,
628,
198
] | 4.152174 | 46 |
from __future__ import division, print_function, unicode_literals
from liberapay.testing import EUR, USD, Harness
| [
6738,
11593,
37443,
834,
1330,
7297,
11,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
3655,
499,
323,
13,
33407,
1330,
27526,
11,
11403,
11,
2113,
1108,
628
] | 3.625 | 32 |
from flask.ext.sqlalchemy import SQLAlchemy
from sqlalchemy import ForeignKey
from sqlalchemy.sql import select
from sqlalchemy.orm import relationship
from sqlalchemy.dialects.postgresql import JSON, TEXT
db = SQLAlchemy()
#Column('user_id', Integer, ForeignKey("user.user_id"), nullable=False),
| [
6738,
42903,
13,
2302,
13,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
6738,
44161,
282,
26599,
1330,
8708,
9218,
198,
6738,
44161,
282,
26599,
13,
25410,
1330,
2922,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
2776,
198,
6738,
44161,
282,
26599,
13,
38969,
478,
82,
13,
7353,
34239,
13976,
1330,
19449,
11,
40383,
198,
198,
9945,
796,
16363,
2348,
26599,
3419,
198,
198,
2,
39470,
10786,
7220,
62,
312,
3256,
34142,
11,
8708,
9218,
7203,
7220,
13,
7220,
62,
312,
12340,
9242,
540,
28,
25101,
828,
198
] | 3.359551 | 89 |
# lista de dicionario dado
listDict = [
{1 : 1, 2 : "oi", "nome" : "obrigado"},
{"Bolo" : "Cenoura", "Camarão" : "Verde", "nome" : "Sagrado"},
{1 : 10, "nome" : "oi", "caracol" : "obrigado"},
{"nome":"obrigado"}
]
# a chave que será procurada
nome = "nome"
# inicializando a lista vazia
lista = []
# verifico para cada nome se ele está ou não no dicionário
for dict1 in listDict:
# se a chave nome estiver no dicionário
# e o valor dela não tiver sido adicionado a lista, só adicionar na lista
if nome in dict1 and dict1[nome] not in lista:
lista.append(dict1[nome])
# printa a lista
print(lista) | [
2,
1351,
64,
390,
288,
47430,
4982,
288,
4533,
198,
4868,
35,
713,
796,
685,
198,
220,
220,
220,
1391,
16,
1058,
352,
11,
362,
1058,
366,
23013,
1600,
366,
77,
462,
1,
1058,
366,
672,
4359,
4533,
25719,
198,
220,
220,
220,
19779,
33,
14057,
1,
1058,
366,
34,
268,
280,
430,
1600,
366,
21701,
283,
28749,
1,
1058,
366,
13414,
2934,
1600,
366,
77,
462,
1,
1058,
366,
50,
363,
81,
4533,
25719,
198,
220,
220,
220,
1391,
16,
1058,
838,
11,
366,
77,
462,
1,
1058,
366,
23013,
1600,
366,
7718,
330,
349,
1,
1058,
366,
672,
4359,
4533,
25719,
198,
220,
220,
220,
19779,
77,
462,
2404,
672,
4359,
4533,
20662,
198,
60,
198,
198,
2,
257,
442,
1015,
8358,
1055,
6557,
13834,
333,
4763,
198,
77,
462,
796,
366,
77,
462,
1,
198,
198,
2,
287,
6652,
528,
25440,
257,
1351,
64,
410,
1031,
544,
220,
198,
4868,
64,
796,
17635,
198,
198,
2,
3326,
811,
78,
31215,
269,
4763,
299,
462,
384,
9766,
1556,
6557,
267,
84,
299,
28749,
645,
288,
47430,
6557,
27250,
198,
1640,
8633,
16,
287,
1351,
35,
713,
25,
198,
220,
220,
220,
1303,
384,
257,
442,
1015,
299,
462,
1556,
1428,
645,
288,
47430,
6557,
27250,
198,
220,
220,
220,
1303,
304,
267,
1188,
273,
1619,
64,
299,
28749,
256,
1428,
9785,
78,
512,
47430,
4533,
257,
1351,
64,
11,
264,
10205,
512,
47430,
283,
12385,
1351,
64,
198,
220,
220,
220,
611,
299,
462,
287,
8633,
16,
290,
8633,
16,
58,
77,
462,
60,
407,
287,
1351,
64,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
64,
13,
33295,
7,
11600,
16,
58,
77,
462,
12962,
198,
198,
2,
3601,
64,
257,
1351,
64,
198,
4798,
7,
4868,
64,
8
] | 2.166667 | 294 |
from rest_framework import status, exceptions
from rest_framework.generics import RetrieveUpdateAPIView
from rest_framework.permissions import AllowAny, IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView
from django.conf import settings
from .models import User
from itsdangerous import URLSafeTimedSerializer, exc
from django.core.mail import send_mail
import os, re
from rest_framework import exceptions
from .renderers import UserJSONRenderer
from .serializers import (
LoginSerializer, RegistrationSerializer, UserSerializer,
ResetPasswordSerializer, SetNewPasswordSerializer,
FacebookAndGoogleSerializer, TwitterSerializer
)
import facebook
import twitter
from google.auth.transport import requests
from google.oauth2 import id_token
from drf_yasg.utils import swagger_auto_schema
from .backends import (
AccountVerification
)
from authors.apps.profiles.models import Profile
from .social_auth import ValidateSocialUser
check_user = ValidateSocialUser()
class UserRetrieveUpdateAPIView(RetrieveUpdateAPIView):
"""
retrieve: Get User Details
Update: Update User Details
"""
permission_classes = (IsAuthenticated,)
renderer_classes = (UserJSONRenderer,)
serializer_class = UserSerializer
@swagger_auto_schema(
operation_id='Retrieve User Details',
request_body=serializer_class,
responses={201: serializer_class(many=False), 400: 'BAD REQUEST'},
)
@swagger_auto_schema(
operation_id='Update User Details',
request_body=serializer_class,
responses={201: serializer_class(many=False), 400: 'BAD REQUEST'},
)
| [
6738,
1334,
62,
30604,
1330,
3722,
11,
13269,
198,
6738,
1334,
62,
30604,
13,
8612,
873,
1330,
4990,
30227,
10260,
2969,
3824,
769,
198,
6738,
1334,
62,
30604,
13,
525,
8481,
1330,
22507,
7149,
11,
1148,
47649,
3474,
198,
6738,
1334,
62,
30604,
13,
26209,
1330,
18261,
198,
6738,
1334,
62,
30604,
13,
33571,
1330,
3486,
3824,
769,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
764,
27530,
1330,
11787,
198,
198,
6738,
663,
38537,
516,
1330,
37902,
6561,
8635,
14967,
276,
32634,
7509,
11,
2859,
198,
6738,
42625,
14208,
13,
7295,
13,
4529,
1330,
3758,
62,
4529,
198,
198,
11748,
28686,
11,
302,
198,
6738,
1334,
62,
30604,
1330,
13269,
198,
198,
6738,
764,
10920,
19288,
1330,
11787,
40386,
49,
437,
11882,
198,
6738,
764,
46911,
11341,
1330,
357,
198,
220,
220,
220,
23093,
32634,
7509,
11,
24610,
32634,
7509,
11,
11787,
32634,
7509,
11,
198,
220,
220,
220,
30027,
35215,
32634,
7509,
11,
5345,
3791,
35215,
32634,
7509,
11,
198,
220,
220,
220,
3203,
1870,
11708,
32634,
7509,
11,
3009,
32634,
7509,
198,
8,
198,
198,
11748,
23960,
198,
11748,
17044,
198,
6738,
23645,
13,
18439,
13,
7645,
634,
1330,
7007,
198,
6738,
23645,
13,
12162,
1071,
17,
1330,
4686,
62,
30001,
198,
6738,
1553,
69,
62,
88,
292,
70,
13,
26791,
1330,
1509,
7928,
62,
23736,
62,
15952,
2611,
198,
198,
6738,
764,
1891,
2412,
1330,
357,
198,
220,
220,
220,
10781,
13414,
2649,
198,
8,
198,
6738,
7035,
13,
18211,
13,
5577,
2915,
13,
27530,
1330,
13118,
198,
6738,
764,
14557,
62,
18439,
1330,
3254,
20540,
20636,
12982,
628,
198,
9122,
62,
7220,
796,
3254,
20540,
20636,
12982,
3419,
628,
198,
198,
4871,
11787,
9781,
30227,
10260,
2969,
3824,
769,
7,
9781,
30227,
10260,
2969,
3824,
769,
2599,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
19818,
25,
3497,
11787,
14890,
198,
220,
220,
220,
10133,
25,
10133,
11787,
14890,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
7170,
62,
37724,
796,
357,
3792,
47649,
3474,
35751,
198,
220,
220,
220,
9851,
11882,
62,
37724,
796,
357,
12982,
40386,
49,
437,
11882,
35751,
198,
220,
220,
220,
11389,
7509,
62,
4871,
796,
11787,
32634,
7509,
628,
220,
220,
220,
2488,
2032,
7928,
62,
23736,
62,
15952,
2611,
7,
198,
220,
220,
220,
220,
220,
220,
220,
4905,
62,
312,
11639,
9781,
30227,
11787,
14890,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
62,
2618,
28,
46911,
7509,
62,
4871,
11,
198,
220,
220,
220,
220,
220,
220,
220,
9109,
34758,
1264,
25,
11389,
7509,
62,
4871,
7,
21834,
28,
25101,
828,
7337,
25,
705,
33,
2885,
4526,
35780,
6,
5512,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
2488,
2032,
7928,
62,
23736,
62,
15952,
2611,
7,
198,
220,
220,
220,
220,
220,
220,
220,
4905,
62,
312,
11639,
10260,
11787,
14890,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
62,
2618,
28,
46911,
7509,
62,
4871,
11,
198,
220,
220,
220,
220,
220,
220,
220,
9109,
34758,
1264,
25,
11389,
7509,
62,
4871,
7,
21834,
28,
25101,
828,
7337,
25,
705,
33,
2885,
4526,
35780,
6,
5512,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
220,
628,
628,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220
] | 3.086486 | 555 |
"""
Calculate additional parameters or recalculate parameters.
"""
from visual_phenomics_py.parameters import *
from visual_phenomics_py.parameters_additional import *
def calculate(df=None, param='', *, fm='fm', f0='f0', fmp='fmp', f0p='f0p', fs='fs', fmpp='fmpp', f0pp='f0pp', fmf0=4.88, alias=None):
"""Calculate photosynthetic parameters
Calculate photosynthetic parameters from basic fluorescence parameters
:param df: The DataFrame to add the calculated parameters to.
:param param: Parameter to calculate ('Fvfm','NPQ', 'NPQt','Phi2','PhiNO','PhiNPQ','qE','qEsv','qEt','qI','qIt','qL','qP')
:param fm: fm column name (default 'fm')
:param f0: f0 column name (default 'f0')
:param fmp: fmp column name (default 'fmp')
:param f0p: f0p column name (default 'f0p')
:param fs: fs column name (default 'fs')
:param fmpp: fmpp column name (default 'fmpp')
:param f0pp: f0pp column name (default 'f0pp')
:param fmf0: Fm/F0 for t parameter (default 4.88)
:param alias: rename the selected parameter (default None)
:returns: a dataframe column for the calculated parameter
"""
# Parameter Names
parameters = ['Fvfm', 'NPQ', 'NPQt', 'Phi2', 'PhiNO', 'PhiNOt',
'PhiNPQ', 'PhiNPQt', 'qE', 'qEsv', 'qEt', 'qI', 'qIt', 'qL', 'qP']
if df is None:
raise Exception('No DataFrame selected.')
if (param in parameters):
alias_txt = ""
if alias is not None:
alias_txt = " as {0}".format(alias)
print('Calculating {0}{1}'.format(param, alias_txt))
for row in df.sort_values(by=['sample', 'time'], ascending=True).fillna(method="ffill").itertuples():
if param == 'Fvfm':
if {fm, f0}.issubset(df.columns):
df.at[row.Index, alias or param] = fvfm(
getattr(row, fm), getattr(row, f0))
else:
raise Exception(
'Missing parameter(s). Define columns for fm and f0')
elif param == 'NPQ':
if {fm, fmp}.issubset(df.columns):
df.at[row.Index, alias or param] = npq(
getattr(row, fm), getattr(row, fmp))
else:
raise Exception(
'Missing parameter(s). Define columns for fm and fmp')
elif param == 'NPQt':
if {fmp, f0p}.issubset(df.columns):
df.at[row.Index, alias or param] = npqt(
getattr(row, fmp), getattr(row, f0p), fmf0)
else:
raise Exception(
'Missing parameter(s). Define columns for fmp and f0p')
elif param == 'Phi2':
if {fmp, fs}.issubset(df.columns):
df.at[row.Index, alias or param] = phi2(
getattr(row, fmp), getattr(row, fs))
else:
raise Exception(
'Missing parameter(s). Define columns for fmp and fs')
elif param == 'PhiNO':
if {fmp, fs, f0p, fm, f0}.issubset(df.columns):
df.at[row.Index, alias or param] = phino(getattr(row, fmp), getattr(
row, fs), getattr(row, f0p), getattr(row, fm), getattr(row, f0))
else:
raise Exception(
'Missing parameter(s). Define columns for fmp, fs, fm, and f0')
elif param == 'PhiNOt':
if {fmp, fs, f0p}.issubset(df.columns):
df.at[row.Index, alias or param] = phinot(
getattr(row, fmp), getattr(row, fs), getattr(row, f0p), fmf0)
else:
raise Exception(
'Missing parameter(s). Define columns for fmp, fs, and f0p')
elif param == 'PhiNPQ':
if {fmp, fs, f0p, fm, f0}.issubset(df.columns):
df.at[row.Index, alias or param] = phinpq(getattr(row, fmp), getattr(
row, fs), getattr(row, f0p), getattr(row, fm), getattr(row, f0))
else:
raise Exception(
'Missing parameter(s). Define columns for fmp, fs, f0p, fm, and f0')
elif param == 'PhiNPQt':
if {fmp, fs, f0p}.issubset(df.columns):
df.at[row.Index, alias or param] = phinpqt(
getattr(row, fmp), getattr(row, fs), getattr(row, f0p), fmf0)
else:
raise Exception(
'Missing parameter(s). Define columns for fmp, fs, and f0p')
elif param == 'qE':
if {fmpp, fmp}.issubset(df.columns):
df.at[row.Index, alias or param] = qe(
getattr(row, fmpp), getattr(row, fmp))
else:
raise Exception(
'Missing parameter(s). Define columns for fmpp and fmp')
elif param == 'qEsv':
if {fm, fmp, fmpp}.issubset(df.columns):
df.at[row.Index, alias or param] = qesv(
getattr(row, fm), getattr(row, fmp), getattr(row, fmpp))
else:
raise Exception(
'Missing parameter(s). Define columns for fm, fmp, and fmpp')
elif param == 'qEt':
if {fmp, f0p, fmpp, f0pp}.issubset(df.columns):
df.at[row.Index, alias or param] = qet(getattr(row, fmp), getattr(
row, f0p), getattr(row, fmpp), getattr(row, f0pp), fmf0)
else:
raise Exception(
'Missing parameter(s). Define columns for fmp, f0p, fmpp, and f0pp')
elif param == 'qI':
if {fm, fmpp}.issubset(df.columns):
df.at[row.Index, alias or param] = qi(
getattr(row, fm), getattr(row, fmpp))
else:
raise Exception(
'Missing parameter(s). Define columns for fm and fmpp')
elif param == 'qIt':
if {fmpp, f0pp}.issubset(df.columns):
df.at[row.Index, alias or param] = qit(
getattr(row, fmpp), getattr(row, f0pp), fmf0)
else:
raise Exception(
'Missing parameter(s). Define columns for fmpp and f0pp')
elif param == 'qL':
if {fmp, fs, f0p}.issubset(df.columns):
df.at[row.Index, alias or param] = ql(
getattr(row, fmp), getattr(row, fs), getattr(row, f0p))
else:
raise Exception(
'Missing parameter(s). Define columns for fmp, fs, and f0p')
elif param == 'qP':
if {fmp, fs, f0p}.issubset(df.columns):
df.at[row.Index, alias or param] = qp(
getattr(row, fmp), getattr(row, fs), getattr(row, f0p))
else:
raise Exception(
'Missing parameter(s). Define columns for fmp, fs, and f0p')
else:
raise Exception("No matching parameter found.")
else:
raise Exception('Unknown parameter. Available parameters are: {0}'.format(
", ".join(parameters)))
def calculate_additional(df=None, param='', *, v_phino='PhiNOt', v_phi2='Phi2', v_ql='qL', v_par='light_intensity', phinoopt=0.2, absorptivity=0.5, fmf0=4.88, alias=None):
"""Calculate additional Parameters
Calculate additional photosynthetic parameters based on calculated standard parameters
:param df: The DataFrame to add the calculated parameters to.
:param param: Parameter to calculate ('LEF', 'Vx', 'SPhi2', 'SNPQ', 'deltaNPQ')
:param v_phino: PhiNO column name (default 'PhiNOt')
:param v_phi2: Phi2 column name (default 'Phi2')
:param v_ql: qL column name (default 'qL')
:param phinoopt: Optimal PhiNO (default 0.2)
:param absorptivity: Absorptivity for Vx parameter (default 0.5)
:param fmf0: Fm/F0 for t parameter (default 4.88)
:param alias: rename the selected parameter (default None)
:returns: a dataframe column for the calculated parameter
"""
# Parameter Names
parameters = ['LEF', 'Vx', 'SPhi2', 'SNPQ', 'deltaNPQ']
if df is None:
raise Exception('No DataFrame selected.')
if (param in parameters):
alias_txt = ""
if alias is not None:
alias_txt = " as {0}".format(alias)
print('Calculating {0}{1}'.format(param, alias_txt))
for row in df.sort_values(by=['sample', 'time'], ascending=True).fillna(method="ffill").itertuples():
if param == 'LEF':
if {v_phi2, v_par}.issubset(df.columns):
df.at[row.Index, alias or param] = lef(
getattr(row, v_phi2), getattr(row, v_par), absorptivity)
else:
raise Exception(
'Missing parameter(s). Define columns for v_phi2 and v_par')
elif param == 'Vx':
if {v_phino, v_phi2, v_par}.issubset(df.columns):
df.at[row.Index, alias or param] = vx(
getattr(row, v_phino), getattr(row, v_phi2), getattr(row, v_par), absorptivity)
else:
raise Exception(
'Missing parameter(s). Define columns for v_phino, v_phi2, and v_par')
elif param == 'SPhi2':
if {v_phino, v_phi2, v_ql}.issubset(df.columns):
df.at[row.Index, alias or param] = sphi2(
getattr(row, v_phi2), getattr(row, v_phino), getattr(row, v_ql), phinoopt, fmf0)
else:
raise Exception(
'Missing parameter(s). Define columns for v_phino, v_phi2, and v_ql')
elif param == 'SNPQ':
if {v_phino, v_phi2}.issubset(df.columns):
df.at[row.Index, alias or param] = sphinpq(
getattr(row, v_phi2), getattr(row, v_phino), getattr(row, v_ql), phinoopt, fmf0)
else:
raise Exception(
'Missing parameter(s). Define columns for v_phino, v_phi2, and v_ql')
elif param == 'deltaNPQ':
if {v_phino}.issubset(df.columns):
df.at[row.Index, alias or param] = deltanpq(
getattr(row, v_phino), phinoopt)
else:
raise Exception(
'Missing parameter(s). Define columns for fmp, fs, and f0p')
else:
raise Exception("No matching parameter found.")
else:
raise Exception('Unknown parameter. Available parameters are: {0}'.format(
", ".join(parameters)))
def calculate_custom(df=None, name='', fn=None, *, cols=[], params={}):
"""Calculate additional Parameters
Use a custom function to calculate a custom parameter.
:param df: The DataFrame to add the calculated parameters to.
:param name: Parameter name
:param fn: Function name for the calculation
:param cols: Column names for parameters passed to function. (*args)
:param params: Parameters passed on to the function (**kwargs)
:returns: a dataframe column for the custom calculated parameter
"""
if df is None:
raise Exception('No DataFrame selected.')
if name == '' or name is None:
raise Exception('No parameter name defined.')
if (fn is None):
raise Exception('No function defined.')
if hasattr(fn, '__call__'):
for row in df.sort_values(by=['sample', 'time'], ascending=True).fillna(method="ffill").itertuples():
df.at[row.Index, name] = fn(
*[getattr(row, n) for n in cols], **params)
else:
raise Exception('No function defined.')
| [
37811,
198,
9771,
3129,
378,
3224,
10007,
393,
42653,
3129,
378,
10007,
13,
198,
37811,
198,
198,
6738,
5874,
62,
31024,
31994,
62,
9078,
13,
17143,
7307,
1330,
1635,
198,
6738,
5874,
62,
31024,
31994,
62,
9078,
13,
17143,
7307,
62,
2860,
1859,
1330,
1635,
628,
198,
4299,
15284,
7,
7568,
28,
14202,
11,
5772,
11639,
3256,
1635,
11,
277,
76,
11639,
38353,
3256,
277,
15,
11639,
69,
15,
3256,
277,
3149,
11639,
69,
3149,
3256,
277,
15,
79,
11639,
69,
15,
79,
3256,
43458,
11639,
9501,
3256,
277,
76,
381,
11639,
38353,
381,
3256,
277,
15,
381,
11639,
69,
15,
381,
3256,
277,
76,
69,
15,
28,
19,
13,
3459,
11,
16144,
28,
14202,
2599,
198,
220,
220,
220,
37227,
9771,
3129,
378,
5205,
33567,
6587,
10007,
628,
220,
220,
220,
27131,
378,
5205,
33567,
6587,
10007,
422,
4096,
6562,
48699,
10007,
628,
220,
220,
220,
1058,
17143,
47764,
25,
383,
6060,
19778,
284,
751,
262,
10488,
10007,
284,
13,
198,
220,
220,
220,
1058,
17143,
5772,
25,
25139,
2357,
284,
15284,
19203,
37,
85,
38353,
41707,
22182,
48,
3256,
705,
22182,
48,
83,
41707,
2725,
72,
17,
41707,
2725,
72,
15285,
41707,
2725,
72,
22182,
48,
41707,
80,
36,
41707,
80,
36,
21370,
41707,
80,
36,
83,
41707,
80,
40,
41707,
80,
1026,
41707,
80,
43,
41707,
80,
47,
11537,
198,
220,
220,
220,
1058,
17143,
277,
76,
25,
277,
76,
5721,
1438,
357,
12286,
705,
38353,
11537,
198,
220,
220,
220,
1058,
17143,
277,
15,
25,
277,
15,
5721,
1438,
357,
12286,
705,
69,
15,
11537,
198,
220,
220,
220,
1058,
17143,
277,
3149,
25,
277,
3149,
5721,
1438,
357,
12286,
705,
69,
3149,
11537,
198,
220,
220,
220,
1058,
17143,
277,
15,
79,
25,
277,
15,
79,
5721,
1438,
357,
12286,
705,
69,
15,
79,
11537,
198,
220,
220,
220,
1058,
17143,
43458,
25,
43458,
5721,
1438,
357,
12286,
705,
9501,
11537,
198,
220,
220,
220,
1058,
17143,
277,
76,
381,
25,
277,
76,
381,
5721,
1438,
357,
12286,
705,
38353,
381,
11537,
198,
220,
220,
220,
1058,
17143,
277,
15,
381,
25,
277,
15,
381,
5721,
1438,
357,
12286,
705,
69,
15,
381,
11537,
198,
220,
220,
220,
1058,
17143,
277,
76,
69,
15,
25,
376,
76,
14,
37,
15,
329,
256,
11507,
357,
12286,
604,
13,
3459,
8,
198,
220,
220,
220,
1058,
17143,
16144,
25,
36265,
262,
6163,
11507,
357,
12286,
6045,
8,
198,
220,
220,
220,
1058,
7783,
82,
25,
257,
1366,
14535,
5721,
329,
262,
10488,
11507,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1303,
25139,
2357,
28531,
198,
220,
220,
220,
10007,
796,
37250,
37,
85,
38353,
3256,
705,
22182,
48,
3256,
705,
22182,
48,
83,
3256,
705,
2725,
72,
17,
3256,
705,
2725,
72,
15285,
3256,
705,
2725,
72,
15285,
83,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
2725,
72,
22182,
48,
3256,
705,
2725,
72,
22182,
48,
83,
3256,
705,
80,
36,
3256,
705,
80,
36,
21370,
3256,
705,
80,
36,
83,
3256,
705,
80,
40,
3256,
705,
80,
1026,
3256,
705,
80,
43,
3256,
705,
80,
47,
20520,
628,
220,
220,
220,
611,
47764,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
10786,
2949,
6060,
19778,
6163,
2637,
8,
198,
220,
220,
220,
611,
357,
17143,
287,
10007,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
16144,
62,
14116,
796,
13538,
198,
220,
220,
220,
220,
220,
220,
220,
611,
16144,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16144,
62,
14116,
796,
366,
355,
1391,
15,
92,
1911,
18982,
7,
26011,
8,
628,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
9771,
3129,
803,
1391,
15,
18477,
16,
92,
4458,
18982,
7,
17143,
11,
16144,
62,
14116,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
329,
5752,
287,
47764,
13,
30619,
62,
27160,
7,
1525,
28,
17816,
39873,
3256,
705,
2435,
6,
4357,
41988,
28,
17821,
737,
20797,
2616,
7,
24396,
2625,
487,
359,
11074,
270,
861,
84,
2374,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5772,
6624,
705,
37,
85,
38353,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
38353,
11,
277,
15,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
277,
85,
38353,
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,
651,
35226,
7,
808,
11,
277,
76,
828,
651,
35226,
7,
808,
11,
277,
15,
4008,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
76,
290,
277,
15,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
22182,
48,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
38353,
11,
277,
3149,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
45941,
80,
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,
651,
35226,
7,
808,
11,
277,
76,
828,
651,
35226,
7,
808,
11,
277,
3149,
4008,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
76,
290,
277,
3149,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
22182,
48,
83,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
69,
3149,
11,
277,
15,
79,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
45941,
39568,
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,
651,
35226,
7,
808,
11,
277,
3149,
828,
651,
35226,
7,
808,
11,
277,
15,
79,
828,
277,
76,
69,
15,
8,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
3149,
290,
277,
15,
79,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
2725,
72,
17,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
69,
3149,
11,
43458,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
872,
72,
17,
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,
651,
35226,
7,
808,
11,
277,
3149,
828,
651,
35226,
7,
808,
11,
43458,
4008,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
3149,
290,
43458,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
2725,
72,
15285,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
69,
3149,
11,
43458,
11,
277,
15,
79,
11,
277,
76,
11,
277,
15,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
872,
2879,
7,
1136,
35226,
7,
808,
11,
277,
3149,
828,
651,
35226,
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,
5752,
11,
43458,
828,
651,
35226,
7,
808,
11,
277,
15,
79,
828,
651,
35226,
7,
808,
11,
277,
76,
828,
651,
35226,
7,
808,
11,
277,
15,
4008,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
3149,
11,
43458,
11,
277,
76,
11,
290,
277,
15,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
2725,
72,
15285,
83,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
69,
3149,
11,
43458,
11,
277,
15,
79,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
872,
259,
313,
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,
651,
35226,
7,
808,
11,
277,
3149,
828,
220,
651,
35226,
7,
808,
11,
43458,
828,
651,
35226,
7,
808,
11,
277,
15,
79,
828,
277,
76,
69,
15,
8,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
3149,
11,
43458,
11,
290,
277,
15,
79,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
2725,
72,
22182,
48,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
69,
3149,
11,
43458,
11,
277,
15,
79,
11,
277,
76,
11,
277,
15,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
872,
259,
79,
80,
7,
1136,
35226,
7,
808,
11,
277,
3149,
828,
651,
35226,
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,
5752,
11,
43458,
828,
651,
35226,
7,
808,
11,
277,
15,
79,
828,
651,
35226,
7,
808,
11,
277,
76,
828,
651,
35226,
7,
808,
11,
277,
15,
4008,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
3149,
11,
43458,
11,
277,
15,
79,
11,
277,
76,
11,
290,
277,
15,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
2725,
72,
22182,
48,
83,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
69,
3149,
11,
43458,
11,
277,
15,
79,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
872,
259,
79,
39568,
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,
651,
35226,
7,
808,
11,
277,
3149,
828,
651,
35226,
7,
808,
11,
43458,
828,
651,
35226,
7,
808,
11,
277,
15,
79,
828,
277,
76,
69,
15,
8,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
3149,
11,
43458,
11,
290,
277,
15,
79,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
80,
36,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
38353,
381,
11,
277,
3149,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
10662,
68,
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,
651,
35226,
7,
808,
11,
277,
76,
381,
828,
651,
35226,
7,
808,
11,
277,
3149,
4008,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
76,
381,
290,
277,
3149,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
80,
36,
21370,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
38353,
11,
277,
3149,
11,
277,
76,
381,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
10662,
274,
85,
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,
651,
35226,
7,
808,
11,
277,
76,
828,
651,
35226,
7,
808,
11,
277,
3149,
828,
651,
35226,
7,
808,
11,
277,
76,
381,
4008,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
76,
11,
277,
3149,
11,
290,
277,
76,
381,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
80,
36,
83,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
69,
3149,
11,
277,
15,
79,
11,
277,
76,
381,
11,
277,
15,
381,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
10662,
316,
7,
1136,
35226,
7,
808,
11,
277,
3149,
828,
651,
35226,
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,
5752,
11,
277,
15,
79,
828,
651,
35226,
7,
808,
11,
277,
76,
381,
828,
651,
35226,
7,
808,
11,
277,
15,
381,
828,
277,
76,
69,
15,
8,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
3149,
11,
277,
15,
79,
11,
277,
76,
381,
11,
290,
277,
15,
381,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
80,
40,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
38353,
11,
277,
76,
381,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
10662,
72,
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,
651,
35226,
7,
808,
11,
277,
76,
828,
651,
35226,
7,
808,
11,
277,
76,
381,
4008,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
76,
290,
277,
76,
381,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
80,
1026,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
38353,
381,
11,
277,
15,
381,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
10662,
270,
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,
651,
35226,
7,
808,
11,
277,
76,
381,
828,
651,
35226,
7,
808,
11,
277,
15,
381,
828,
277,
76,
69,
15,
8,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
76,
381,
290,
277,
15,
381,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
80,
43,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
69,
3149,
11,
43458,
11,
277,
15,
79,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
10662,
75,
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,
651,
35226,
7,
808,
11,
277,
3149,
828,
651,
35226,
7,
808,
11,
43458,
828,
651,
35226,
7,
808,
11,
277,
15,
79,
4008,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
3149,
11,
43458,
11,
290,
277,
15,
79,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
80,
47,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
69,
3149,
11,
43458,
11,
277,
15,
79,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
10662,
79,
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,
651,
35226,
7,
808,
11,
277,
3149,
828,
651,
35226,
7,
808,
11,
43458,
828,
651,
35226,
7,
808,
11,
277,
15,
79,
4008,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
3149,
11,
43458,
11,
290,
277,
15,
79,
11537,
628,
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,
5298,
35528,
7203,
2949,
12336,
11507,
1043,
19570,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
10786,
20035,
11507,
13,
14898,
10007,
389,
25,
1391,
15,
92,
4458,
18982,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33172,
27071,
22179,
7,
17143,
7307,
22305,
628,
198,
4299,
15284,
62,
2860,
1859,
7,
7568,
28,
14202,
11,
5772,
11639,
3256,
1635,
11,
410,
62,
746,
2879,
11639,
2725,
72,
15285,
83,
3256,
410,
62,
34846,
17,
11639,
2725,
72,
17,
3256,
410,
62,
13976,
11639,
80,
43,
3256,
410,
62,
1845,
11639,
2971,
62,
47799,
3256,
872,
2879,
8738,
28,
15,
13,
17,
11,
8256,
457,
3458,
28,
15,
13,
20,
11,
277,
76,
69,
15,
28,
19,
13,
3459,
11,
16144,
28,
14202,
2599,
198,
220,
220,
220,
37227,
9771,
3129,
378,
3224,
40117,
628,
220,
220,
220,
27131,
378,
3224,
5205,
33567,
6587,
10007,
1912,
319,
10488,
3210,
10007,
628,
220,
220,
220,
1058,
17143,
47764,
25,
383,
6060,
19778,
284,
751,
262,
10488,
10007,
284,
13,
198,
220,
220,
220,
1058,
17143,
5772,
25,
25139,
2357,
284,
15284,
19203,
2538,
37,
3256,
705,
53,
87,
3256,
705,
50,
2725,
72,
17,
3256,
705,
15571,
47,
48,
3256,
705,
67,
12514,
22182,
48,
11537,
198,
220,
220,
220,
1058,
17143,
410,
62,
746,
2879,
25,
47256,
15285,
5721,
1438,
357,
12286,
705,
2725,
72,
15285,
83,
11537,
198,
220,
220,
220,
1058,
17143,
410,
62,
34846,
17,
25,
47256,
17,
5721,
1438,
357,
12286,
705,
2725,
72,
17,
11537,
198,
220,
220,
220,
1058,
17143,
410,
62,
13976,
25,
10662,
43,
5721,
1438,
357,
12286,
705,
80,
43,
11537,
198,
220,
220,
220,
1058,
17143,
872,
2879,
8738,
25,
13123,
4402,
47256,
15285,
357,
12286,
657,
13,
17,
8,
198,
220,
220,
220,
1058,
17143,
8256,
457,
3458,
25,
13051,
273,
457,
3458,
329,
569,
87,
11507,
357,
12286,
657,
13,
20,
8,
198,
220,
220,
220,
1058,
17143,
277,
76,
69,
15,
25,
376,
76,
14,
37,
15,
329,
256,
11507,
357,
12286,
604,
13,
3459,
8,
198,
220,
220,
220,
1058,
17143,
16144,
25,
36265,
262,
6163,
11507,
357,
12286,
6045,
8,
198,
220,
220,
220,
1058,
7783,
82,
25,
257,
1366,
14535,
5721,
329,
262,
10488,
11507,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1303,
25139,
2357,
28531,
198,
220,
220,
220,
10007,
796,
37250,
2538,
37,
3256,
705,
53,
87,
3256,
705,
50,
2725,
72,
17,
3256,
705,
15571,
47,
48,
3256,
705,
67,
12514,
22182,
48,
20520,
628,
220,
220,
220,
611,
47764,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
10786,
2949,
6060,
19778,
6163,
2637,
8,
628,
220,
220,
220,
611,
357,
17143,
287,
10007,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
16144,
62,
14116,
796,
13538,
198,
220,
220,
220,
220,
220,
220,
220,
611,
16144,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16144,
62,
14116,
796,
366,
355,
1391,
15,
92,
1911,
18982,
7,
26011,
8,
628,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
9771,
3129,
803,
1391,
15,
18477,
16,
92,
4458,
18982,
7,
17143,
11,
16144,
62,
14116,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
329,
5752,
287,
47764,
13,
30619,
62,
27160,
7,
1525,
28,
17816,
39873,
3256,
705,
2435,
6,
4357,
41988,
28,
17821,
737,
20797,
2616,
7,
24396,
2625,
487,
359,
11074,
270,
861,
84,
2374,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5772,
6624,
705,
2538,
37,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
85,
62,
34846,
17,
11,
410,
62,
1845,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
443,
69,
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,
651,
35226,
7,
808,
11,
410,
62,
34846,
17,
828,
651,
35226,
7,
808,
11,
410,
62,
1845,
828,
8256,
457,
3458,
8,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
410,
62,
34846,
17,
290,
410,
62,
1845,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
53,
87,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
85,
62,
746,
2879,
11,
410,
62,
34846,
17,
11,
410,
62,
1845,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
410,
87,
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,
651,
35226,
7,
808,
11,
410,
62,
746,
2879,
828,
651,
35226,
7,
808,
11,
410,
62,
34846,
17,
828,
651,
35226,
7,
808,
11,
410,
62,
1845,
828,
8256,
457,
3458,
8,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
410,
62,
746,
2879,
11,
410,
62,
34846,
17,
11,
290,
410,
62,
1845,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
50,
2725,
72,
17,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
85,
62,
746,
2879,
11,
410,
62,
34846,
17,
11,
410,
62,
13976,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
599,
5303,
17,
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,
651,
35226,
7,
808,
11,
410,
62,
34846,
17,
828,
651,
35226,
7,
808,
11,
410,
62,
746,
2879,
828,
651,
35226,
7,
808,
11,
410,
62,
13976,
828,
872,
2879,
8738,
11,
277,
76,
69,
15,
8,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
410,
62,
746,
2879,
11,
410,
62,
34846,
17,
11,
290,
410,
62,
13976,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
15571,
47,
48,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
85,
62,
746,
2879,
11,
410,
62,
34846,
17,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
599,
20079,
79,
80,
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,
651,
35226,
7,
808,
11,
410,
62,
34846,
17,
828,
651,
35226,
7,
808,
11,
410,
62,
746,
2879,
828,
651,
35226,
7,
808,
11,
410,
62,
13976,
828,
872,
2879,
8738,
11,
277,
76,
69,
15,
8,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
410,
62,
746,
2879,
11,
410,
62,
34846,
17,
11,
290,
410,
62,
13976,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
5772,
6624,
705,
67,
12514,
22182,
48,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1391,
85,
62,
746,
2879,
27422,
747,
549,
2617,
7,
7568,
13,
28665,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
16144,
393,
5772,
60,
796,
1619,
38006,
79,
80,
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,
651,
35226,
7,
808,
11,
410,
62,
746,
2879,
828,
872,
2879,
8738,
8,
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,
5298,
35528,
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,
705,
43730,
11507,
7,
82,
737,
2896,
500,
15180,
329,
277,
3149,
11,
43458,
11,
290,
277,
15,
79,
11537,
628,
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,
5298,
35528,
7203,
2949,
12336,
11507,
1043,
19570,
628,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
10786,
20035,
11507,
13,
14898,
10007,
389,
25,
1391,
15,
92,
4458,
18982,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33172,
27071,
22179,
7,
17143,
7307,
22305,
628,
198,
4299,
15284,
62,
23144,
7,
7568,
28,
14202,
11,
1438,
11639,
3256,
24714,
28,
14202,
11,
1635,
11,
951,
82,
41888,
4357,
42287,
34758,
92,
2599,
198,
220,
220,
220,
37227,
9771,
3129,
378,
3224,
40117,
628,
220,
220,
220,
5765,
257,
2183,
2163,
284,
15284,
257,
2183,
11507,
13,
628,
220,
220,
220,
1058,
17143,
47764,
25,
383,
6060,
19778,
284,
751,
262,
10488,
10007,
284,
13,
198,
220,
220,
220,
1058,
17143,
1438,
25,
25139,
2357,
1438,
198,
220,
220,
220,
1058,
17143,
24714,
25,
15553,
1438,
329,
262,
17952,
198,
220,
220,
220,
1058,
17143,
951,
82,
25,
29201,
3891,
329,
10007,
3804,
284,
2163,
13,
20789,
22046,
8,
198,
220,
220,
220,
1058,
17143,
42287,
25,
40117,
3804,
319,
284,
262,
2163,
357,
1174,
46265,
22046,
8,
198,
220,
220,
220,
1058,
7783,
82,
25,
257,
1366,
14535,
5721,
329,
262,
2183,
10488,
11507,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
611,
47764,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
10786,
2949,
6060,
19778,
6163,
2637,
8,
628,
220,
220,
220,
611,
1438,
6624,
10148,
393,
1438,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
10786,
2949,
11507,
1438,
5447,
2637,
8,
628,
220,
220,
220,
611,
357,
22184,
318,
6045,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
10786,
2949,
2163,
5447,
2637,
8,
628,
220,
220,
220,
611,
468,
35226,
7,
22184,
11,
705,
834,
13345,
834,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
329,
5752,
287,
47764,
13,
30619,
62,
27160,
7,
1525,
28,
17816,
39873,
3256,
705,
2435,
6,
4357,
41988,
28,
17821,
737,
20797,
2616,
7,
24396,
2625,
487,
359,
11074,
270,
861,
84,
2374,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
13,
265,
58,
808,
13,
15732,
11,
1438,
60,
796,
24714,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
58,
1136,
35226,
7,
808,
11,
299,
8,
329,
299,
287,
951,
82,
4357,
12429,
37266,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
10786,
2949,
2163,
5447,
2637,
8,
198
] | 1.914304 | 6,348 |
from peewee import *
db = SqliteDatabase(':memory:')
db.create_tables([Node])
tree = ('root', (
('n1', (
('c11', ()),
('c12', ()))),
('n2', (
('c21', ()),
('c22', (
('g221', ()),
('g222', ()))),
('c23', ()),
('c24', (
('g241', ()),
('g242', ()),
('g243', ())))))))
stack = [(None, tree)]
while stack:
parent, (name, children) = stack.pop()
node = Node.create(name=name, parent=parent)
for child_tree in children:
stack.insert(0, (node, child_tree))
# Now that we have created the stack, let's eagerly load 4 levels of children.
# To show that it works, we'll turn on the query debugger so you can see which
# queries are executed.
import logging; logger = logging.getLogger('peewee')
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.DEBUG)
C = Node.alias('c')
G = Node.alias('g')
GG = Node.alias('gg')
GGG = Node.alias('ggg')
roots = Node.select().where(Node.parent.is_null())
pf = prefetch(roots, C, (G, C), (GG, G), (GGG, GG))
for root in pf:
print(root.dump())
| [
6738,
613,
413,
1453,
1330,
1635,
628,
198,
9945,
796,
311,
13976,
578,
38105,
7,
10354,
31673,
25,
11537,
198,
198,
9945,
13,
17953,
62,
83,
2977,
26933,
19667,
12962,
198,
198,
21048,
796,
19203,
15763,
3256,
357,
198,
220,
220,
220,
19203,
77,
16,
3256,
357,
198,
220,
220,
220,
220,
220,
220,
220,
19203,
66,
1157,
3256,
7499,
828,
198,
220,
220,
220,
220,
220,
220,
220,
19203,
66,
1065,
3256,
357,
22305,
828,
198,
220,
220,
220,
19203,
77,
17,
3256,
357,
198,
220,
220,
220,
220,
220,
220,
220,
19203,
66,
2481,
3256,
7499,
828,
198,
220,
220,
220,
220,
220,
220,
220,
19203,
66,
1828,
3256,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
70,
26115,
3256,
7499,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
70,
23148,
3256,
357,
22305,
828,
198,
220,
220,
220,
220,
220,
220,
220,
19203,
66,
1954,
3256,
7499,
828,
198,
220,
220,
220,
220,
220,
220,
220,
19203,
66,
1731,
3256,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
70,
28872,
3256,
7499,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
70,
27877,
3256,
7499,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
70,
26660,
3256,
32865,
35514,
4008,
198,
25558,
796,
47527,
14202,
11,
5509,
15437,
198,
4514,
8931,
25,
198,
220,
220,
220,
2560,
11,
357,
3672,
11,
1751,
8,
796,
8931,
13,
12924,
3419,
198,
220,
220,
220,
10139,
796,
19081,
13,
17953,
7,
3672,
28,
3672,
11,
2560,
28,
8000,
8,
198,
220,
220,
220,
329,
1200,
62,
21048,
287,
1751,
25,
198,
220,
220,
220,
220,
220,
220,
220,
8931,
13,
28463,
7,
15,
11,
357,
17440,
11,
1200,
62,
21048,
4008,
198,
198,
2,
2735,
326,
356,
423,
2727,
262,
8931,
11,
1309,
338,
30130,
3440,
604,
2974,
286,
1751,
13,
198,
2,
1675,
905,
326,
340,
2499,
11,
356,
1183,
1210,
319,
262,
12405,
49518,
523,
345,
460,
766,
543,
198,
2,
20743,
389,
10945,
13,
198,
11748,
18931,
26,
49706,
796,
18931,
13,
1136,
11187,
1362,
10786,
431,
413,
1453,
11537,
198,
6404,
1362,
13,
2860,
25060,
7,
6404,
2667,
13,
12124,
25060,
28955,
198,
6404,
1362,
13,
2617,
4971,
7,
6404,
2667,
13,
30531,
8,
198,
198,
34,
796,
19081,
13,
26011,
10786,
66,
11537,
198,
38,
796,
19081,
13,
26011,
10786,
70,
11537,
198,
11190,
796,
19081,
13,
26011,
10786,
1130,
11537,
198,
11190,
38,
796,
19081,
13,
26011,
10786,
1130,
70,
11537,
198,
198,
19150,
796,
19081,
13,
19738,
22446,
3003,
7,
19667,
13,
8000,
13,
271,
62,
8423,
28955,
198,
79,
69,
796,
7694,
7569,
7,
19150,
11,
327,
11,
357,
38,
11,
327,
828,
357,
11190,
11,
402,
828,
357,
11190,
38,
11,
37442,
4008,
198,
1640,
6808,
287,
279,
69,
25,
198,
220,
220,
220,
3601,
7,
15763,
13,
39455,
28955,
198
] | 2.267068 | 498 |
# -*- coding: utf-8
import numpy as np
import wx
from ihna.kozhukhov.imageanalysis import ImagingMap
from ihna.kozhukhov.imageanalysis.mapprocessing import spatial_filter
from ihna.kozhukhov.imageanalysis.gui.complexmapviewerdlg import ComplexMapViewerDlg
from .datatodataprocessor import DataToDataProcessor
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
266,
87,
198,
6738,
1312,
71,
2616,
13,
7204,
23548,
2724,
28026,
13,
9060,
20930,
1330,
48656,
13912,
198,
6738,
1312,
71,
2616,
13,
7204,
23548,
2724,
28026,
13,
9060,
20930,
13,
76,
21064,
919,
278,
1330,
21739,
62,
24455,
198,
6738,
1312,
71,
2616,
13,
7204,
23548,
2724,
28026,
13,
9060,
20930,
13,
48317,
13,
41887,
8899,
1177,
263,
25404,
70,
1330,
19157,
13912,
7680,
263,
35,
75,
70,
198,
6738,
764,
19608,
265,
375,
265,
499,
305,
919,
273,
1330,
6060,
2514,
6601,
18709,
273,
628
] | 2.906542 | 107 |
from django.db import models
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
628
] | 3.75 | 8 |
# PyAlgoTrade
#
# Copyright 2011 Gabriel Martin Becedillas Ruiz
#
# 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.
"""
.. moduleauthor:: Gabriel Martin Becedillas Ruiz <[email protected]>
"""
from pyalgotrade import technical
# This is the formula I'm using to calculate the averages based on previous ones.
# 1 2 3 4
# x x x
# x x x
#
# avg0 = (a + b + c) / 3
# avg1 = (b + c + d) / 3
#
# avg0 = avg1 + x
# (a + b + c) / 3 = (b + c + d) / 3 + x
# a/3 + b/3 + c/3 = b/3 + c/3 + d/3 + x
# a/3 = d/3 + x
# x = a/3 - d/3
# avg1 = avg0 - x
# avg1 = avg0 + d/3 - a/3
class SMA(technical.DataSeriesFilter):
"""Simple Moving Average filter.
:param dataSeries: The DataSeries instance being filtered.
:type dataSeries: :class:`pyalgotrade.dataseries.DataSeries`.
:param period: The number of values to use to calculate the SMA.
:type period: int.
"""
class EMA(technical.DataSeriesFilter):
"""Exponential Moving Average filter.
:param dataSeries: The DataSeries instance being filtered.
:type dataSeries: :class:`pyalgotrade.dataseries.DataSeries`.
:param period: The number of values to use to calculate the EMA.
:type period: int.
"""
# Finds the last available (value, position) starting from pos.
class WMA(technical.DataSeriesFilter):
"""Weighted Moving Average filter.
:param dataSeries: The DataSeries instance being filtered.
:type dataSeries: :class:`pyalgotrade.dataseries.DataSeries`.
:param weights: A list of int/float with the weights.
:type weights: list.
"""
| [
2,
9485,
2348,
2188,
35965,
198,
2,
198,
2,
15069,
2813,
17371,
5780,
15780,
276,
25314,
11667,
528,
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,
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,
492,
8265,
9800,
3712,
17371,
5780,
15780,
276,
25314,
11667,
528,
1279,
70,
397,
11719,
13,
9423,
276,
25314,
31,
14816,
13,
785,
29,
198,
37811,
198,
198,
6738,
12972,
14016,
313,
27585,
1330,
6276,
198,
198,
2,
770,
318,
262,
10451,
314,
1101,
1262,
284,
15284,
262,
25694,
1912,
319,
2180,
3392,
13,
198,
2,
352,
362,
513,
604,
198,
2,
2124,
2124,
2124,
198,
2,
220,
220,
2124,
2124,
2124,
198,
2,
198,
2,
42781,
15,
796,
357,
64,
1343,
275,
1343,
269,
8,
1220,
513,
198,
2,
42781,
16,
796,
357,
65,
1343,
269,
1343,
288,
8,
1220,
513,
198,
2,
198,
2,
42781,
15,
796,
42781,
16,
1343,
2124,
198,
2,
357,
64,
1343,
275,
1343,
269,
8,
1220,
513,
796,
357,
65,
1343,
269,
1343,
288,
8,
1220,
513,
1343,
2124,
198,
2,
257,
14,
18,
1343,
275,
14,
18,
1343,
269,
14,
18,
796,
275,
14,
18,
1343,
269,
14,
18,
1343,
288,
14,
18,
1343,
2124,
198,
2,
257,
14,
18,
796,
288,
14,
18,
1343,
2124,
198,
2,
2124,
796,
257,
14,
18,
532,
288,
14,
18,
198,
198,
2,
42781,
16,
796,
42781,
15,
532,
2124,
198,
2,
42781,
16,
796,
42781,
15,
1343,
288,
14,
18,
532,
257,
14,
18,
198,
198,
4871,
311,
5673,
7,
47944,
13,
6601,
27996,
22417,
2599,
198,
220,
220,
220,
37227,
26437,
26768,
13475,
8106,
13,
628,
220,
220,
220,
1058,
17143,
1366,
27996,
25,
383,
6060,
27996,
4554,
852,
29083,
13,
198,
220,
220,
220,
1058,
4906,
1366,
27996,
25,
1058,
4871,
25,
63,
9078,
14016,
313,
27585,
13,
19608,
6005,
444,
13,
6601,
27996,
44646,
198,
220,
220,
220,
1058,
17143,
2278,
25,
383,
1271,
286,
3815,
284,
779,
284,
15284,
262,
311,
5673,
13,
198,
220,
220,
220,
1058,
4906,
2278,
25,
493,
13,
198,
220,
220,
220,
37227,
198,
198,
4871,
412,
5673,
7,
47944,
13,
6601,
27996,
22417,
2599,
198,
220,
220,
220,
37227,
16870,
35470,
26768,
13475,
8106,
13,
628,
220,
220,
220,
1058,
17143,
1366,
27996,
25,
383,
6060,
27996,
4554,
852,
29083,
13,
198,
220,
220,
220,
1058,
4906,
1366,
27996,
25,
1058,
4871,
25,
63,
9078,
14016,
313,
27585,
13,
19608,
6005,
444,
13,
6601,
27996,
44646,
198,
220,
220,
220,
1058,
17143,
2278,
25,
383,
1271,
286,
3815,
284,
779,
284,
15284,
262,
412,
5673,
13,
198,
220,
220,
220,
1058,
4906,
2278,
25,
493,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1303,
9938,
82,
262,
938,
1695,
357,
8367,
11,
2292,
8,
3599,
422,
1426,
13,
198,
198,
4871,
370,
5673,
7,
47944,
13,
6601,
27996,
22417,
2599,
198,
220,
220,
220,
37227,
25844,
276,
26768,
13475,
8106,
13,
628,
220,
220,
220,
1058,
17143,
1366,
27996,
25,
383,
6060,
27996,
4554,
852,
29083,
13,
198,
220,
220,
220,
1058,
4906,
1366,
27996,
25,
1058,
4871,
25,
63,
9078,
14016,
313,
27585,
13,
19608,
6005,
444,
13,
6601,
27996,
44646,
198,
220,
220,
220,
1058,
17143,
19590,
25,
317,
1351,
286,
493,
14,
22468,
351,
262,
19590,
13,
198,
220,
220,
220,
1058,
4906,
19590,
25,
1351,
13,
628,
220,
220,
220,
37227,
198
] | 3.004373 | 686 |
from typing import Any
| [
6738,
19720,
1330,
4377,
628,
628,
198
] | 3.857143 | 7 |
# Copyright 2017 The TensorFlow Authors. 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.
"""Convolutional Neural Network Estimator for MNIST, built with tf.layers."""
from nninst import mode
from nninst.backend.tensorflow.dataset.config import (
CIFAR10_TRAIN,
IMAGENET_RAW_TRAIN,
IMAGENET_TRAIN,
)
from nninst.backend.tensorflow.model.config import RESNET_18_CIFAR10, RESNET_50
from nninst.backend.tensorflow.trace.common import (
class_trace,
class_trace_compact,
class_trace_growth,
full_trace,
save_class_traces,
save_class_traces_low_latency,
save_full_trace_growth,
self_similarity,
)
from nninst.utils.ray import ray_init
__all__ = ["resnet_18_cifar10_class_trace", "resnet_18_cifar10_self_similarity"]
name = "resnet_18_cifar10"
resnet_18_cifar10_class_trace = class_trace(
name=name, model_config=RESNET_18_CIFAR10, data_config=CIFAR10_TRAIN
)
resnet_18_cifar10_class_trace_growth = class_trace_growth(
name=name, model_config=RESNET_18_CIFAR10, data_config=CIFAR10_TRAIN
)
resnet_18_cifar10_class_trace_compact = class_trace_compact(
resnet_18_cifar10_class_trace, name=name, model_config=RESNET_18_CIFAR10
)
save_resnet_18_cifar10_class_traces_low_latency = save_class_traces_low_latency(
name=name, model_config=RESNET_18_CIFAR10, data_config=CIFAR10_TRAIN
)
resnet_18_cifar10_trace = full_trace(
name=name, class_trace_fn=resnet_18_cifar10_class_trace
)
save_resnet_18_cifar10_trace_growth = save_full_trace_growth(
name=name, class_trace_fn=resnet_18_cifar10_class_trace
)
resnet_18_cifar10_self_similarity = self_similarity(
name=name, trace_fn=resnet_18_cifar10_class_trace, class_ids=range(0, 10)
)
if __name__ == "__main__":
# mode.check(False)
# mode.debug()
# mode.local()
mode.distributed()
# ray_init("dell")
# ray_init("gpu")
ray_init()
threshold = 0.5
# threshold = 1
# threshold = 0.8
label = None
# label = "train_50"
# label = "train_start"
# label = "train_start_more"
# save_class_traces(resnet_18_cifar10_class_trace, range(0, 10), threshold=threshold, label=label,
# example_num=5000, example_upperbound=5000,
# )
save_resnet_18_cifar10_class_traces_low_latency(
range(0, 10), threshold=threshold, label=label, example_num=5000, batch_size=8
)
save_class_traces(
resnet_18_cifar10_class_trace_compact,
range(0, 10),
threshold=threshold,
label=label,
)
resnet_18_cifar10_self_similarity(threshold=threshold, label=label).save()
| [
2,
220,
15069,
2177,
383,
309,
22854,
37535,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
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,
220,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
220,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
220,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
220,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
220,
11247,
739,
262,
13789,
13,
198,
37811,
3103,
85,
2122,
282,
47986,
7311,
10062,
320,
1352,
329,
29060,
8808,
11,
3170,
351,
48700,
13,
75,
6962,
526,
15931,
198,
198,
6738,
299,
77,
8625,
1330,
4235,
198,
6738,
299,
77,
8625,
13,
1891,
437,
13,
83,
22854,
11125,
13,
19608,
292,
316,
13,
11250,
1330,
357,
198,
220,
220,
220,
327,
5064,
1503,
940,
62,
51,
3861,
1268,
11,
198,
220,
220,
220,
8959,
4760,
1677,
2767,
62,
20530,
62,
51,
3861,
1268,
11,
198,
220,
220,
220,
8959,
4760,
1677,
2767,
62,
51,
3861,
1268,
11,
198,
8,
198,
6738,
299,
77,
8625,
13,
1891,
437,
13,
83,
22854,
11125,
13,
19849,
13,
11250,
1330,
15731,
12884,
62,
1507,
62,
34,
5064,
1503,
940,
11,
15731,
12884,
62,
1120,
198,
6738,
299,
77,
8625,
13,
1891,
437,
13,
83,
22854,
11125,
13,
40546,
13,
11321,
1330,
357,
198,
220,
220,
220,
1398,
62,
40546,
11,
198,
220,
220,
220,
1398,
62,
40546,
62,
5589,
529,
11,
198,
220,
220,
220,
1398,
62,
40546,
62,
27922,
11,
198,
220,
220,
220,
1336,
62,
40546,
11,
198,
220,
220,
220,
3613,
62,
4871,
62,
2213,
2114,
11,
198,
220,
220,
220,
3613,
62,
4871,
62,
2213,
2114,
62,
9319,
62,
15460,
1387,
11,
198,
220,
220,
220,
3613,
62,
12853,
62,
40546,
62,
27922,
11,
198,
220,
220,
220,
2116,
62,
38610,
414,
11,
198,
8,
198,
6738,
299,
77,
8625,
13,
26791,
13,
2433,
1330,
26842,
62,
15003,
198,
198,
834,
439,
834,
796,
14631,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
40546,
1600,
366,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
944,
62,
38610,
414,
8973,
198,
198,
3672,
796,
366,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
1,
198,
198,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
40546,
796,
1398,
62,
40546,
7,
198,
220,
220,
220,
1438,
28,
3672,
11,
2746,
62,
11250,
28,
19535,
12884,
62,
1507,
62,
34,
5064,
1503,
940,
11,
1366,
62,
11250,
28,
34,
5064,
1503,
940,
62,
51,
3861,
1268,
198,
8,
198,
198,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
40546,
62,
27922,
796,
1398,
62,
40546,
62,
27922,
7,
198,
220,
220,
220,
1438,
28,
3672,
11,
2746,
62,
11250,
28,
19535,
12884,
62,
1507,
62,
34,
5064,
1503,
940,
11,
1366,
62,
11250,
28,
34,
5064,
1503,
940,
62,
51,
3861,
1268,
198,
8,
198,
198,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
40546,
62,
5589,
529,
796,
1398,
62,
40546,
62,
5589,
529,
7,
198,
220,
220,
220,
581,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
40546,
11,
1438,
28,
3672,
11,
2746,
62,
11250,
28,
19535,
12884,
62,
1507,
62,
34,
5064,
1503,
940,
198,
8,
198,
198,
21928,
62,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
2213,
2114,
62,
9319,
62,
15460,
1387,
796,
3613,
62,
4871,
62,
2213,
2114,
62,
9319,
62,
15460,
1387,
7,
198,
220,
220,
220,
1438,
28,
3672,
11,
2746,
62,
11250,
28,
19535,
12884,
62,
1507,
62,
34,
5064,
1503,
940,
11,
1366,
62,
11250,
28,
34,
5064,
1503,
940,
62,
51,
3861,
1268,
198,
8,
198,
198,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
40546,
796,
1336,
62,
40546,
7,
198,
220,
220,
220,
1438,
28,
3672,
11,
1398,
62,
40546,
62,
22184,
28,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
40546,
198,
8,
198,
198,
21928,
62,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
40546,
62,
27922,
796,
3613,
62,
12853,
62,
40546,
62,
27922,
7,
198,
220,
220,
220,
1438,
28,
3672,
11,
1398,
62,
40546,
62,
22184,
28,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
40546,
198,
8,
198,
198,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
944,
62,
38610,
414,
796,
2116,
62,
38610,
414,
7,
198,
220,
220,
220,
1438,
28,
3672,
11,
12854,
62,
22184,
28,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
40546,
11,
1398,
62,
2340,
28,
9521,
7,
15,
11,
838,
8,
198,
8,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1303,
4235,
13,
9122,
7,
25101,
8,
198,
220,
220,
220,
1303,
4235,
13,
24442,
3419,
198,
220,
220,
220,
1303,
4235,
13,
12001,
3419,
198,
220,
220,
220,
4235,
13,
17080,
6169,
3419,
198,
220,
220,
220,
1303,
26842,
62,
15003,
7203,
67,
695,
4943,
198,
220,
220,
220,
1303,
26842,
62,
15003,
7203,
46999,
4943,
198,
220,
220,
220,
26842,
62,
15003,
3419,
628,
220,
220,
220,
11387,
796,
657,
13,
20,
198,
220,
220,
220,
1303,
11387,
796,
352,
198,
220,
220,
220,
1303,
11387,
796,
657,
13,
23,
628,
220,
220,
220,
6167,
796,
6045,
198,
220,
220,
220,
1303,
6167,
796,
366,
27432,
62,
1120,
1,
198,
220,
220,
220,
1303,
6167,
796,
366,
27432,
62,
9688,
1,
198,
220,
220,
220,
1303,
6167,
796,
366,
27432,
62,
9688,
62,
3549,
1,
628,
220,
220,
220,
1303,
3613,
62,
4871,
62,
2213,
2114,
7,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
40546,
11,
2837,
7,
15,
11,
838,
828,
11387,
28,
400,
10126,
11,
6167,
28,
18242,
11,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1672,
62,
22510,
28,
27641,
11,
1672,
62,
45828,
7784,
28,
27641,
11,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
3613,
62,
411,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
2213,
2114,
62,
9319,
62,
15460,
1387,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2837,
7,
15,
11,
838,
828,
11387,
28,
400,
10126,
11,
6167,
28,
18242,
11,
1672,
62,
22510,
28,
27641,
11,
15458,
62,
7857,
28,
23,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
3613,
62,
4871,
62,
2213,
2114,
7,
198,
220,
220,
220,
220,
220,
220,
220,
581,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
4871,
62,
40546,
62,
5589,
529,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2837,
7,
15,
11,
838,
828,
198,
220,
220,
220,
220,
220,
220,
220,
11387,
28,
400,
10126,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6167,
28,
18242,
11,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
581,
3262,
62,
1507,
62,
66,
361,
283,
940,
62,
944,
62,
38610,
414,
7,
400,
10126,
28,
400,
10126,
11,
6167,
28,
18242,
737,
21928,
3419,
198
] | 2.411222 | 1,301 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.