content
stringlengths 1
1.04M
| input_ids
sequencelengths 1
774k
| ratio_char_token
float64 0.38
22.9
| token_count
int64 1
774k
|
---|---|---|---|
import pytest
from html_form_to_dict import html_form_to_dict
| [
11748,
12972,
9288,
198,
6738,
27711,
62,
687,
62,
1462,
62,
11600,
1330,
27711,
62,
687,
62,
1462,
62,
11600,
628,
628,
628,
628,
628,
198
] | 2.769231 | 26 |
import os
from asgan.output_generator import pretty_number
| [
11748,
28686,
198,
6738,
355,
1030,
13,
22915,
62,
8612,
1352,
1330,
2495,
62,
17618,
628,
628
] | 3.647059 | 17 |
from asyncio import sleep
from datetime import datetime
from traitlets.config import LoggingConfigurable
from traitlets import Any, Bool, Integer
from tornado.log import app_log
class Builder(LoggingConfigurable):
"""Base class for building a dashboard, e.g. by cloning an existing server which is a Docker container.
Subclass this, and override the following methods:
- start
"""
dashboard = None
cdsconfig = None
# private attributes for tracking status
_build_pending = False
_build_future = None
event_queue = []
@property
def _failed(self):
"""Did the last build fail?"""
return (
not self.active
and self._build_future
and self._build_future.done()
and self._build_future.exception()
)
@property
def _log_name(self):
"""Return username:dashboard_urlname
"""
if self.dashboard:
return '%s:%s' % (self.dashboard.user.name, self.dashboard.urlname)
else:
return 'Dashboard Builder {}'.format(self)
@property
def pending(self):
"""Return the current pending event, if any
Return False if nothing is pending.
"""
if self._build_pending:
return 'build'
return None
@property
def ready(self):
"""Is this builder finished, up to assigning a spawner (which may still be starting up)
A builder is not ready if an event is pending.
"""
if self.pending:
return False
if self.dashboard is None:
return False
if self.dashboard.final_spawner is None:
return False
if self._build_future and self._build_future.done() and self._build_future.exception():
return False
return True
@property
def active(self):
"""Return True if the server is active.
This includes fully running and ready or any pending start/stop event.
"""
return bool(self.pending or self.ready)
# options passed by constructor
orm_builder = Any()
db = Any()
log = Any(default_value=app_log).tag(config=True)
user = Any()
@property
consecutive_failure_limit = Integer(
0,
help="""
Maximum number of consecutive failures to allow before
shutting down JupyterHub.
This helps JupyterHub recover from a certain class of problem preventing launch
in contexts where the Hub is automatically restarted (e.g. systemd, docker, kubernetes).
A limit of 0 means no limit and consecutive failures will not be tracked.
""",
).tag(config=True)
start_timeout = Integer(
60,
help="""
Timeout (in seconds) before giving up on starting of single-user server.
This is the timeout for start to return, not the timeout for the server to respond.
Callers of spawner.start will assume that startup has failed if it takes longer than this.
start should return when the server process is started and its location is known.
""",
).tag(config=True)
debug = Bool(False, help="Enable debug-logging of the single-user server").tag(
config=True
)
async def _generate_progress(self):
"""Private wrapper of progress generator
This method is always an async generator and will always yield at least one event.
"""
if not self._build_pending:
self.log.warning(
#"Build not pending, can't generate progress for %s", self._log_name
"Build not pending, can't generate progress"
)
return
yield {"progress": 0, "message": "Builder requested"}
from async_generator import aclosing
async with aclosing(self.progress()) as progress:
async for event in progress:
yield event
async def progress(self):
"""Async generator for progress events
Must be an async generator
Should yield messages of the form:
::
{
"progress": 80, # integer, out of 100
"message": text, # text message (will be escaped for HTML)
"html_message": html_text, # optional html-formatted message (may have links)
}
In HTML contexts, html_message will be displayed instead of message if present.
Progress will be updated if defined.
To update messages without progress omit the progress field.
"""
next_event = 0
break_while_loop = False
while True:
# Ensure we always capture events following the start_future
# signal has fired.
if self._build_future.done():
break_while_loop = True
event_queue = self.event_queue
len_events = len(event_queue)
if next_event < len_events:
for i in range(next_event, len_events):
event = event_queue[i]
yield event
next_event = len_events
if break_while_loop:
break
await sleep(1)
async def start(self, dashboard, dashboard_user, db):
"""Start the dashboard
Returns:
(str, str): the (new_server_name, new_server_options) of the new dashboard server.
"""
raise NotImplementedError(
"You must specify a c.CDSDashboardsConfig.builder_class in your JupyterHub jupyterhub_config.py file."
)
allow_named_servers = True # TODO take from main app config
def template_namespace(self):
"""Return the template namespace for format-string formatting.
Subclasses may add items to the available namespace.
The default implementation includes::
{
'urlname': dashboard.urlname,
'date': <current date in YYmmdd format>,
'time': <current date in HHMMSS format>,
}
Returns:
ns (dict): namespace for string formatting.
"""
date = datetime.today().strftime('%Y%m%d')
time = datetime.today().strftime('%H%M%S')
d = {
'urlname': self.dashboard.urlname,
'date': date,
'time': time
}
return d
def format_string(self, s, ns=None):
"""Render a Python format string
Uses :meth:`Builder.template_namespace` to populate format namespace, based on self.dashboard.
Optionally provide the namespace as ns.
Args:
s (str): Python format-string to be formatted.
Returns:
str: Formatted string, rendered
"""
if ns is None:
ns = self.template_namespace()
return s.format(**ns)
| [
6738,
30351,
952,
1330,
3993,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
1291,
2578,
912,
13,
11250,
1330,
5972,
2667,
16934,
11970,
198,
6738,
1291,
2578,
912,
1330,
4377,
11,
347,
970,
11,
34142,
198,
6738,
33718,
13,
6404,
1330,
598,
62,
6404,
628,
198,
4871,
35869,
7,
11187,
2667,
16934,
11970,
2599,
198,
220,
220,
220,
37227,
14881,
1398,
329,
2615,
257,
30415,
11,
304,
13,
70,
13,
416,
45973,
281,
4683,
4382,
543,
318,
257,
25716,
9290,
13,
628,
220,
220,
220,
3834,
4871,
428,
11,
290,
20957,
262,
1708,
5050,
25,
628,
220,
220,
220,
532,
923,
628,
220,
220,
220,
37227,
628,
220,
220,
220,
30415,
796,
6045,
628,
220,
220,
220,
269,
9310,
11250,
796,
6045,
628,
220,
220,
220,
1303,
2839,
12608,
329,
9646,
3722,
198,
220,
220,
220,
4808,
11249,
62,
79,
1571,
796,
10352,
198,
220,
220,
220,
4808,
11249,
62,
37443,
796,
6045,
628,
220,
220,
220,
1785,
62,
36560,
796,
17635,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
4808,
47904,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
11633,
262,
938,
1382,
2038,
1701,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
407,
2116,
13,
5275,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
2116,
13557,
11249,
62,
37443,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
2116,
13557,
11249,
62,
37443,
13,
28060,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
2116,
13557,
11249,
62,
37443,
13,
1069,
4516,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
4808,
6404,
62,
3672,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
13615,
20579,
25,
42460,
3526,
62,
6371,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
42460,
3526,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
705,
4,
82,
25,
4,
82,
6,
4064,
357,
944,
13,
42460,
3526,
13,
7220,
13,
3672,
11,
2116,
13,
42460,
3526,
13,
6371,
3672,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
705,
43041,
3526,
35869,
23884,
4458,
18982,
7,
944,
8,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
13310,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
13615,
262,
1459,
13310,
1785,
11,
611,
597,
628,
220,
220,
220,
220,
220,
220,
220,
8229,
10352,
611,
2147,
318,
13310,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13557,
11249,
62,
79,
1571,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
705,
11249,
6,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
6045,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
3492,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3792,
428,
27098,
5201,
11,
510,
284,
38875,
257,
10922,
263,
357,
4758,
743,
991,
307,
3599,
510,
8,
628,
220,
220,
220,
220,
220,
220,
220,
317,
27098,
318,
407,
3492,
611,
281,
1785,
318,
13310,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
79,
1571,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
42460,
3526,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
42460,
3526,
13,
20311,
62,
48183,
263,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13557,
11249,
62,
37443,
290,
2116,
13557,
11249,
62,
37443,
13,
28060,
3419,
290,
2116,
13557,
11249,
62,
37443,
13,
1069,
4516,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
6407,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
4075,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
13615,
6407,
611,
262,
4382,
318,
4075,
13,
628,
220,
220,
220,
220,
220,
220,
220,
770,
3407,
3938,
2491,
290,
3492,
393,
597,
13310,
923,
14,
11338,
1785,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
20512,
7,
944,
13,
79,
1571,
393,
2116,
13,
1493,
8,
628,
220,
220,
220,
1303,
3689,
3804,
416,
23772,
198,
220,
220,
220,
393,
76,
62,
38272,
796,
4377,
3419,
198,
220,
220,
220,
20613,
796,
4377,
3419,
628,
220,
220,
220,
2604,
796,
4377,
7,
12286,
62,
8367,
28,
1324,
62,
6404,
737,
12985,
7,
11250,
28,
17821,
8,
628,
220,
220,
220,
2836,
796,
4377,
3419,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
12785,
62,
32165,
495,
62,
32374,
796,
34142,
7,
198,
220,
220,
220,
220,
220,
220,
220,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
22246,
1271,
286,
12785,
15536,
284,
1249,
878,
198,
220,
220,
220,
220,
220,
220,
220,
25136,
866,
449,
929,
88,
353,
16066,
13,
628,
220,
220,
220,
220,
220,
220,
220,
770,
5419,
449,
929,
88,
353,
16066,
8551,
422,
257,
1728,
1398,
286,
1917,
12174,
4219,
198,
220,
220,
220,
220,
220,
220,
220,
287,
26307,
810,
262,
14699,
318,
6338,
15765,
276,
357,
68,
13,
70,
13,
31490,
11,
36253,
11,
479,
18478,
3262,
274,
737,
628,
220,
220,
220,
220,
220,
220,
220,
317,
4179,
286,
657,
1724,
645,
4179,
290,
12785,
15536,
481,
407,
307,
18283,
13,
198,
220,
220,
220,
220,
220,
220,
220,
13538,
1600,
198,
220,
220,
220,
6739,
12985,
7,
11250,
28,
17821,
8,
628,
220,
220,
220,
923,
62,
48678,
796,
34142,
7,
198,
220,
220,
220,
220,
220,
220,
220,
3126,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
3862,
448,
357,
259,
4201,
8,
878,
3501,
510,
319,
3599,
286,
2060,
12,
7220,
4382,
13,
628,
220,
220,
220,
220,
220,
220,
220,
770,
318,
262,
26827,
329,
923,
284,
1441,
11,
407,
262,
26827,
329,
262,
4382,
284,
3031,
13,
198,
220,
220,
220,
220,
220,
220,
220,
4889,
364,
286,
10922,
263,
13,
9688,
481,
7048,
326,
13693,
468,
4054,
611,
340,
2753,
2392,
621,
428,
13,
198,
220,
220,
220,
220,
220,
220,
220,
923,
815,
1441,
618,
262,
4382,
1429,
318,
2067,
290,
663,
4067,
318,
1900,
13,
198,
220,
220,
220,
220,
220,
220,
220,
13538,
1600,
198,
220,
220,
220,
6739,
12985,
7,
11250,
28,
17821,
8,
628,
220,
220,
220,
14257,
796,
347,
970,
7,
25101,
11,
1037,
2625,
36695,
14257,
12,
6404,
2667,
286,
262,
2060,
12,
7220,
4382,
11074,
12985,
7,
198,
220,
220,
220,
220,
220,
220,
220,
4566,
28,
17821,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
30351,
825,
4808,
8612,
378,
62,
33723,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
29067,
29908,
286,
4371,
17301,
628,
220,
220,
220,
220,
220,
220,
220,
770,
2446,
318,
1464,
281,
30351,
17301,
290,
481,
1464,
7800,
379,
1551,
530,
1785,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
2116,
13557,
11249,
62,
79,
1571,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
13,
43917,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1,
15580,
407,
13310,
11,
460,
470,
7716,
4371,
329,
4064,
82,
1600,
2116,
13557,
6404,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15580,
407,
13310,
11,
460,
470,
7716,
4371,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
628,
220,
220,
220,
220,
220,
220,
220,
7800,
19779,
33723,
1298,
657,
11,
366,
20500,
1298,
366,
32875,
9167,
20662,
198,
220,
220,
220,
220,
220,
220,
220,
422,
30351,
62,
8612,
1352,
1330,
257,
565,
2752,
628,
220,
220,
220,
220,
220,
220,
220,
30351,
351,
257,
565,
2752,
7,
944,
13,
33723,
28955,
355,
4371,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30351,
329,
1785,
287,
4371,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7800,
1785,
628,
220,
220,
220,
30351,
825,
4371,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
42367,
17301,
329,
4371,
2995,
628,
220,
220,
220,
220,
220,
220,
220,
12039,
307,
281,
30351,
17301,
628,
220,
220,
220,
220,
220,
220,
220,
10358,
7800,
6218,
286,
262,
1296,
25,
628,
220,
220,
220,
220,
220,
220,
220,
7904,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
33723,
1298,
4019,
11,
1303,
18253,
11,
503,
286,
1802,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
20500,
1298,
2420,
11,
1303,
2420,
3275,
357,
10594,
307,
13537,
329,
11532,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
6494,
62,
20500,
1298,
27711,
62,
5239,
11,
1303,
11902,
27711,
12,
687,
16898,
3275,
357,
11261,
423,
6117,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
220,
220,
220,
220,
554,
11532,
26307,
11,
27711,
62,
20500,
481,
307,
9066,
2427,
286,
3275,
611,
1944,
13,
198,
220,
220,
220,
220,
220,
220,
220,
18387,
481,
307,
6153,
611,
5447,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1675,
4296,
6218,
1231,
4371,
42848,
262,
4371,
2214,
13,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1306,
62,
15596,
796,
657,
628,
220,
220,
220,
220,
220,
220,
220,
2270,
62,
4514,
62,
26268,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
981,
6407,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
48987,
356,
1464,
8006,
2995,
1708,
262,
923,
62,
37443,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
6737,
468,
6294,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13557,
11249,
62,
37443,
13,
28060,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
62,
4514,
62,
26268,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1785,
62,
36560,
796,
2116,
13,
15596,
62,
36560,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18896,
62,
31534,
796,
18896,
7,
15596,
62,
36560,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1306,
62,
15596,
1279,
18896,
62,
31534,
25,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2837,
7,
19545,
62,
15596,
11,
18896,
62,
31534,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1785,
796,
1785,
62,
36560,
58,
72,
60,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7800,
1785,
220,
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,
220,
220,
220,
220,
220,
220,
220,
220,
1306,
62,
15596,
796,
18896,
62,
31534,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2270,
62,
4514,
62,
26268,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25507,
3993,
7,
16,
8,
628,
220,
220,
220,
30351,
825,
923,
7,
944,
11,
30415,
11,
30415,
62,
7220,
11,
20613,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
10434,
262,
30415,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
2536,
11,
965,
2599,
262,
357,
3605,
62,
15388,
62,
3672,
11,
649,
62,
15388,
62,
25811,
8,
286,
262,
649,
30415,
4382,
13,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
1892,
3546,
1154,
12061,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1639,
1276,
11986,
257,
269,
13,
34,
5258,
43041,
12821,
16934,
13,
38272,
62,
4871,
287,
534,
449,
929,
88,
353,
16066,
474,
929,
88,
353,
40140,
62,
11250,
13,
9078,
2393,
526,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
1249,
62,
13190,
62,
2655,
690,
796,
6407,
1303,
16926,
46,
1011,
422,
1388,
598,
4566,
628,
220,
220,
220,
825,
11055,
62,
14933,
10223,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
13615,
262,
11055,
25745,
329,
5794,
12,
8841,
33313,
13,
628,
220,
220,
220,
220,
220,
220,
220,
3834,
37724,
743,
751,
3709,
284,
262,
1695,
25745,
13,
628,
220,
220,
220,
220,
220,
220,
220,
383,
4277,
7822,
3407,
3712,
628,
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,
705,
6371,
3672,
10354,
30415,
13,
6371,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
4475,
10354,
1279,
14421,
3128,
287,
575,
56,
3020,
1860,
5794,
22330,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
2435,
10354,
1279,
14421,
3128,
287,
47138,
12038,
5432,
5794,
22330,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36545,
357,
11600,
2599,
25745,
329,
4731,
33313,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
3128,
796,
4818,
8079,
13,
40838,
22446,
2536,
31387,
10786,
4,
56,
4,
76,
4,
67,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
640,
796,
4818,
8079,
13,
40838,
22446,
2536,
31387,
10786,
4,
39,
4,
44,
4,
50,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
288,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
6371,
3672,
10354,
2116,
13,
42460,
3526,
13,
6371,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
4475,
10354,
3128,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
2435,
10354,
640,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
288,
628,
220,
220,
220,
825,
5794,
62,
8841,
7,
944,
11,
264,
11,
36545,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
45819,
257,
11361,
5794,
4731,
628,
220,
220,
220,
220,
220,
220,
220,
36965,
1058,
76,
2788,
25,
63,
32875,
13,
28243,
62,
14933,
10223,
63,
284,
48040,
5794,
25745,
11,
1912,
319,
2116,
13,
42460,
3526,
13,
628,
220,
220,
220,
220,
220,
220,
220,
16018,
453,
2148,
262,
25745,
355,
36545,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
357,
2536,
2599,
11361,
5794,
12,
8841,
284,
307,
39559,
13,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
965,
25,
5178,
16898,
4731,
11,
15111,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
36545,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36545,
796,
2116,
13,
28243,
62,
14933,
10223,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
264,
13,
18982,
7,
1174,
5907,
8,
628,
198
] | 2.423699 | 2,844 |
from typing import Dict
from feast.entity import Entity
from feast.feature_view import FeatureView
from google.protobuf.json_format import MessageToDict
from more_itertools import flatten
from odd_models.models import DataEntity, DataSet, DataEntityType
from oddrn_generator import FeastGenerator
from . import metadata_extractor, dataset_field_mapper
| [
6738,
19720,
1330,
360,
713,
198,
198,
6738,
26951,
13,
26858,
1330,
20885,
198,
6738,
26951,
13,
30053,
62,
1177,
1330,
27018,
7680,
198,
6738,
23645,
13,
11235,
672,
3046,
13,
17752,
62,
18982,
1330,
16000,
2514,
35,
713,
198,
6738,
517,
62,
270,
861,
10141,
1330,
27172,
268,
198,
6738,
5629,
62,
27530,
13,
27530,
1330,
6060,
32398,
11,
6060,
7248,
11,
6060,
32398,
6030,
198,
6738,
5629,
35906,
62,
8612,
1352,
1330,
42936,
8645,
1352,
198,
198,
6738,
764,
1330,
20150,
62,
2302,
40450,
11,
27039,
62,
3245,
62,
76,
11463,
628
] | 3.776596 | 94 |
#!python
import sqlite3
import time,datetime
import traceback
import cgi
hide_column = 1
print("content-type:text/html")
print("")
print("<meta http-equiv = 'refresh' content = 30 />")
ddns_count_show()
| [
2,
0,
29412,
198,
11748,
44161,
578,
18,
198,
11748,
640,
11,
19608,
8079,
198,
11748,
12854,
1891,
198,
11748,
269,
12397,
198,
198,
24717,
62,
28665,
796,
352,
198,
4798,
7203,
11299,
12,
4906,
25,
5239,
14,
6494,
4943,
198,
4798,
7203,
4943,
198,
4798,
7203,
27,
28961,
2638,
12,
4853,
452,
796,
705,
5420,
3447,
6,
2695,
796,
1542,
11037,
4943,
198,
1860,
5907,
62,
9127,
62,
12860,
3419,
198
] | 2.833333 | 72 |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Tests for array_ops."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import tensorflow.python.platform
import numpy as np
from tensorflow.python.framework import test_util
from tensorflow.python.ops import array_ops
from tensorflow.python.platform import googletest
if __name__ == '__main__':
googletest.main()
| [
2,
15069,
1853,
3012,
3457,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
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,
38093,
25609,
28,
198,
198,
37811,
51,
3558,
329,
7177,
62,
2840,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
10688,
198,
198,
11748,
11192,
273,
11125,
13,
29412,
13,
24254,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
11192,
273,
11125,
13,
29412,
13,
30604,
1330,
1332,
62,
22602,
198,
6738,
11192,
273,
11125,
13,
29412,
13,
2840,
1330,
7177,
62,
2840,
198,
6738,
11192,
273,
11125,
13,
29412,
13,
24254,
1330,
467,
519,
1616,
395,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
467,
519,
1616,
395,
13,
12417,
3419,
198
] | 3.877698 | 278 |
##########################################################################
# Copyright (c) 2017, ETH Zurich.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
##########################################################################
import re, datetime
import debug, tests
import subprocess
import os
import socket, struct, fcntl
import thread
from common import TestCommon, TimeoutError
from results import RowResults, PassFailResult
TEST_TIMEOUT = datetime.timedelta(minutes=8)
mac = {'babybel1': 130587495626,
'babybel2': 130587510022,
'babybel3': 130587512798,
'babybel4': 130589790232,
'ziger2': 65817495764,
'ziger1': 116527143012, }
# Fallback if gethostip does not work
ip = {'babybel1': 174982272,
'babybel2': 174982270,
'babybel3': 174982271,
'ziger2': 174982183,
'ziger1': 174982183, }
@tests.add_test
class DevifNetTxSF(DevifTests):
''' Devif Net TX Test'''
name = "devif_nettx_sf"
OP = "net_tx"
CARD = "sfn5122f"
@tests.add_test
class DevifNetTxE10k(DevifTests):
''' Devif Net TX Test'''
name = "devif_nettx_e10k"
OP = "net_tx"
CARD = "e10k"
@tests.add_test
class DevifNetRxSF(DevifTests):
''' Devif Net RX Test'''
name = "devif_netrx_sf"
OP = "net_rx"
CARD = "sfn5122f"
@tests.add_test
class DevifNetRxE10k(DevifTests):
''' Devif Net RX Test'''
name = "devif_netrx_e10k"
OP = "net_rx"
CARD = "e10k"
@tests.add_test
class DevifIdcTest(DevifTests):
''' Devif IDC Test'''
name = "devif_idc_test"
OP = "idc"
CARD = "none"
@tests.add_test
class DevifDebug(DevifTests):
''' Devif Debug Backend Test'''
name = "devif_debug"
@tests.add_test
class DevifUDP(DevifTests):
''' Devif UDP Backend Test'''
name = "devif_udp"
data = ("Data Data Data Data")
#@tests.add_test
#class DevifUPDecho(DevifUDP):
# ''' Devif Debug Backend Test'''
# name = "devif_udp_echo"
#
# def get_module_name(self):
# return "devif_echo"
| [
29113,
29113,
7804,
2235,
198,
2,
15069,
357,
66,
8,
2177,
11,
35920,
43412,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
2393,
318,
9387,
739,
262,
2846,
287,
262,
7223,
38559,
24290,
2393,
13,
198,
2,
1002,
345,
466,
407,
1064,
428,
2393,
11,
9088,
460,
307,
1043,
416,
3597,
284,
25,
198,
2,
35920,
43412,
360,
12,
1268,
26236,
11,
367,
1940,
1734,
1130,
4169,
328,
604,
11,
5870,
12,
1795,
5892,
43412,
13,
3460,
77,
25,
11998,
4912,
13,
198,
29113,
29113,
7804,
2235,
198,
198,
11748,
302,
11,
4818,
8079,
198,
11748,
14257,
11,
5254,
198,
11748,
850,
14681,
198,
11748,
28686,
198,
11748,
17802,
11,
2878,
11,
277,
66,
429,
75,
198,
11748,
4704,
198,
6738,
2219,
1330,
6208,
17227,
11,
3862,
448,
12331,
198,
6738,
2482,
1330,
11314,
25468,
11,
6251,
39044,
23004,
198,
198,
51,
6465,
62,
34694,
12425,
796,
4818,
8079,
13,
16514,
276,
12514,
7,
1084,
1769,
28,
23,
8,
198,
198,
20285,
796,
1391,
6,
40252,
6667,
16,
10354,
11323,
44617,
2920,
3980,
2075,
11,
220,
198,
220,
220,
220,
220,
220,
220,
705,
40252,
6667,
17,
10354,
11323,
3365,
2425,
3064,
1828,
11,
198,
220,
220,
220,
220,
220,
220,
705,
40252,
6667,
18,
10354,
11323,
3365,
2425,
1065,
43240,
11,
198,
220,
220,
220,
220,
220,
220,
705,
40252,
6667,
19,
10354,
11323,
44169,
37750,
24339,
11,
198,
220,
220,
220,
220,
220,
220,
705,
89,
8254,
17,
10354,
718,
3365,
1558,
2920,
3553,
2414,
11,
198,
220,
220,
220,
220,
220,
220,
705,
89,
8254,
16,
10354,
1367,
2996,
1983,
1415,
18938,
17,
11,
1782,
198,
198,
2,
7218,
1891,
611,
651,
4774,
541,
857,
407,
670,
198,
541,
796,
1391,
6,
40252,
6667,
16,
10354,
1596,
36260,
1828,
4761,
11,
220,
198,
220,
220,
220,
220,
220,
220,
705,
40252,
6667,
17,
10354,
1596,
36260,
1828,
2154,
11,
198,
220,
220,
220,
220,
220,
220,
705,
40252,
6667,
18,
10354,
1596,
36260,
1828,
4869,
11,
198,
220,
220,
220,
220,
220,
220,
705,
89,
8254,
17,
10354,
1596,
2920,
6469,
24839,
11,
198,
220,
220,
220,
220,
220,
220,
705,
89,
8254,
16,
10354,
1596,
2920,
6469,
24839,
11,
1782,
628,
628,
198,
198,
31,
41989,
13,
2860,
62,
9288,
198,
4871,
6245,
361,
7934,
46047,
20802,
7,
13603,
361,
51,
3558,
2599,
198,
220,
220,
220,
705,
7061,
6245,
361,
3433,
15326,
6208,
7061,
6,
198,
220,
220,
220,
1438,
796,
366,
7959,
361,
62,
77,
3087,
87,
62,
28202,
1,
198,
220,
220,
220,
13349,
796,
366,
3262,
62,
17602,
1,
198,
220,
220,
220,
48731,
796,
366,
82,
22184,
20,
18376,
69,
1,
198,
198,
31,
41989,
13,
2860,
62,
9288,
198,
4871,
6245,
361,
7934,
46047,
36,
940,
74,
7,
13603,
361,
51,
3558,
2599,
198,
220,
220,
220,
705,
7061,
6245,
361,
3433,
15326,
6208,
7061,
6,
198,
220,
220,
220,
1438,
796,
366,
7959,
361,
62,
77,
3087,
87,
62,
68,
940,
74,
1,
198,
220,
220,
220,
13349,
796,
366,
3262,
62,
17602,
1,
198,
220,
220,
220,
48731,
796,
366,
68,
940,
74,
1,
628,
198,
31,
41989,
13,
2860,
62,
9288,
198,
4871,
6245,
361,
7934,
49,
87,
20802,
7,
13603,
361,
51,
3558,
2599,
198,
220,
220,
220,
705,
7061,
6245,
361,
3433,
24202,
6208,
7061,
6,
198,
220,
220,
220,
1438,
796,
366,
7959,
361,
62,
3262,
40914,
62,
28202,
1,
198,
220,
220,
220,
13349,
796,
366,
3262,
62,
40914,
1,
198,
220,
220,
220,
48731,
796,
366,
82,
22184,
20,
18376,
69,
1,
198,
198,
31,
41989,
13,
2860,
62,
9288,
198,
4871,
6245,
361,
7934,
49,
87,
36,
940,
74,
7,
13603,
361,
51,
3558,
2599,
198,
220,
220,
220,
705,
7061,
6245,
361,
3433,
24202,
6208,
7061,
6,
198,
220,
220,
220,
1438,
796,
366,
7959,
361,
62,
3262,
40914,
62,
68,
940,
74,
1,
198,
220,
220,
220,
13349,
796,
366,
3262,
62,
40914,
1,
198,
220,
220,
220,
48731,
796,
366,
68,
940,
74,
1,
198,
198,
31,
41989,
13,
2860,
62,
9288,
198,
4871,
6245,
361,
7390,
66,
14402,
7,
13603,
361,
51,
3558,
2599,
198,
220,
220,
220,
705,
7061,
6245,
361,
4522,
34,
6208,
7061,
6,
198,
220,
220,
220,
1438,
796,
366,
7959,
361,
62,
312,
66,
62,
9288,
1,
198,
220,
220,
220,
13349,
796,
366,
312,
66,
1,
198,
220,
220,
220,
48731,
796,
366,
23108,
1,
198,
198,
31,
41989,
13,
2860,
62,
9288,
198,
4871,
6245,
361,
27509,
7,
13603,
361,
51,
3558,
2599,
198,
220,
220,
220,
705,
7061,
6245,
361,
31687,
5157,
437,
6208,
7061,
6,
198,
220,
220,
220,
1438,
796,
366,
7959,
361,
62,
24442,
1,
198,
198,
31,
41989,
13,
2860,
62,
9288,
198,
4871,
6245,
361,
52,
6322,
7,
13603,
361,
51,
3558,
2599,
198,
220,
220,
220,
705,
7061,
6245,
361,
36428,
5157,
437,
6208,
7061,
6,
198,
220,
220,
220,
1438,
796,
366,
7959,
361,
62,
463,
79,
1,
198,
220,
220,
220,
1366,
796,
5855,
6601,
6060,
6060,
6060,
4943,
198,
198,
2,
31,
41989,
13,
2860,
62,
9288,
198,
2,
4871,
6245,
361,
52,
5760,
30328,
7,
13603,
361,
52,
6322,
2599,
198,
2,
220,
220,
220,
705,
7061,
6245,
361,
31687,
5157,
437,
6208,
7061,
6,
198,
2,
220,
220,
220,
1438,
796,
366,
7959,
361,
62,
463,
79,
62,
30328,
1,
198,
2,
198,
2,
220,
220,
220,
825,
651,
62,
21412,
62,
3672,
7,
944,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
1441,
366,
7959,
361,
62,
30328,
1,
628,
628
] | 2.375269 | 930 |
from google.appengine.ext import db
from models import User
# Blog db
# check if blog exist, if so return blog
| [
6738,
23645,
13,
1324,
18392,
13,
2302,
1330,
20613,
198,
6738,
4981,
1330,
11787,
628,
198,
2,
14001,
20613,
628,
198,
2,
2198,
611,
4130,
2152,
11,
611,
523,
1441,
4130,
628,
198
] | 3.545455 | 33 |
"""textanalyzerpy URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
import django
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from django.urls import path, include, re_path
from django.contrib.auth import views as auth_views
from . import views
from django.views.static import serve
admin.site.site_header="Text Analyzer Admin"
admin.site.site_title="Text Analyzer Admin Panel"
admin.site.index_title="Welcome to Text Analyzer Admin Panel"
urlpatterns = [
# ADMIN
path('admin/', admin.site.urls),
# STATIC AND MEDIA
re_path(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}),
re_path(r'^media/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT}),
# MAIN WEBSITE PAGES AND LOGICS
path('', views.index, name='index'),
path('about/', views.about, name='about'),
path('analyzer/', views.analyzer, name='analyzer'),
path('analyzed', views.analyzed, name='analyzed'),
path('editor/', views.designer, name='editor'),
path('styler/', views.styler, name='styler'),
path('contact/', views.contact, name='contact'),
path('submit', views.submit, name='submit'),
# BLOGS RELATED
path('blog/', include('blog.urls')),
path('search', views.search, name="search"),
# LOGIN, LOGOUT, REGISTER
path('signup', views.handleSignUp, name="handleSignUp"),
path('login', views.handeLogin, name="handeLogin"),
path('logout', views.handelLogout, name="handelLogout"),
# PROFILE AND ACCOUNT DETAILS UPDATION
path('profile/', views.UserEditingView.as_view(), name="profile"),
path('profile/v2', views.profilev2, name="profilev2"),
path('password/', views.UpdatingPasswordView.as_view(), name="password"),
path('password_success/', views.password_success, name="password_sucess"),
# DELETE ACCOUNT FUNCTION
path("delete_account", views.delete_account, name="delete_account"),
# ADDITIONAL PROFILE DETAILS CHANGER
path('change_photo', views.change_photo, name="change_photo"),
# FORGOT PASSWORD
path('password_reset/', auth_views.PasswordResetView.as_view(template_name="auth/password-reset.html"), name='password_reset'),
path('password_reset/done/', auth_views.PasswordResetDoneView.as_view(template_name="auth/password-reset-sent.html"), name='password_reset_done'),
path('reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(template_name='auth/password_confirm.html'), name='password_reset_confirm'),
path('reset/done/', auth_views.PasswordResetCompleteView.as_view(template_name="auth/password_changed.html"), name='password_reset_complete'),
]
handler404 = 'textanalyzerpy.views.error_404_views'
handler500 = 'textanalyzerpy.views.error_500_views'
| [
37811,
5239,
38200,
9107,
9078,
10289,
28373,
198,
198,
464,
4600,
6371,
33279,
82,
63,
1351,
11926,
32336,
284,
5009,
13,
1114,
517,
1321,
3387,
766,
25,
198,
220,
220,
220,
3740,
1378,
31628,
13,
28241,
648,
404,
305,
752,
13,
785,
14,
268,
14,
18,
13,
17,
14,
4852,
873,
14,
4023,
14,
6371,
82,
14,
198,
27730,
25,
198,
22203,
5009,
198,
220,
220,
220,
352,
13,
3060,
281,
1330,
25,
220,
422,
616,
62,
1324,
1330,
5009,
198,
220,
220,
220,
362,
13,
3060,
257,
10289,
284,
19016,
33279,
82,
25,
220,
3108,
10786,
3256,
5009,
13,
11195,
11,
1438,
11639,
11195,
11537,
198,
9487,
12,
3106,
5009,
198,
220,
220,
220,
352,
13,
3060,
281,
1330,
25,
220,
422,
584,
62,
1324,
13,
33571,
1330,
5995,
198,
220,
220,
220,
362,
13,
3060,
257,
10289,
284,
19016,
33279,
82,
25,
220,
3108,
10786,
3256,
5995,
13,
292,
62,
1177,
22784,
1438,
11639,
11195,
11537,
198,
818,
6360,
1194,
10289,
10414,
198,
220,
220,
220,
352,
13,
17267,
262,
2291,
3419,
2163,
25,
422,
42625,
14208,
13,
6371,
82,
1330,
2291,
11,
3108,
198,
220,
220,
220,
362,
13,
3060,
257,
10289,
284,
19016,
33279,
82,
25,
220,
3108,
10786,
14036,
14,
3256,
2291,
10786,
14036,
13,
6371,
82,
6,
4008,
198,
37811,
198,
11748,
42625,
14208,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12708,
1330,
9037,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
11,
302,
62,
6978,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
5009,
355,
6284,
62,
33571,
198,
6738,
764,
1330,
5009,
198,
6738,
42625,
14208,
13,
33571,
13,
12708,
1330,
4691,
198,
198,
28482,
13,
15654,
13,
15654,
62,
25677,
2625,
8206,
16213,
9107,
32053,
1,
198,
28482,
13,
15654,
13,
15654,
62,
7839,
2625,
8206,
16213,
9107,
32053,
18810,
1,
198,
28482,
13,
15654,
13,
9630,
62,
7839,
2625,
14618,
284,
8255,
16213,
9107,
32053,
18810,
1,
628,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
1303,
5984,
23678,
198,
220,
220,
220,
3108,
10786,
28482,
14,
3256,
13169,
13,
15654,
13,
6371,
82,
828,
628,
220,
220,
220,
1303,
15486,
2149,
5357,
26112,
3539,
198,
220,
220,
220,
302,
62,
6978,
7,
81,
6,
61,
12708,
29006,
30,
47,
27,
6978,
29,
15885,
8,
3,
3256,
4691,
11,
90,
6,
22897,
62,
15763,
10354,
6460,
13,
35744,
2149,
62,
13252,
2394,
92,
828,
198,
220,
220,
220,
302,
62,
6978,
7,
81,
6,
61,
11431,
29006,
30,
47,
27,
6978,
29,
15885,
8,
3,
3256,
4691,
11,
90,
6,
22897,
62,
15763,
10354,
6460,
13,
30733,
3539,
62,
13252,
2394,
92,
828,
628,
220,
220,
220,
1303,
8779,
1268,
12887,
4462,
12709,
350,
25552,
5357,
41605,
19505,
198,
220,
220,
220,
3108,
10786,
3256,
5009,
13,
9630,
11,
1438,
11639,
9630,
33809,
628,
220,
220,
220,
3108,
10786,
10755,
14,
3256,
5009,
13,
10755,
11,
1438,
11639,
10755,
33809,
628,
220,
220,
220,
3108,
10786,
38200,
9107,
14,
3256,
5009,
13,
38200,
9107,
11,
1438,
11639,
38200,
9107,
33809,
628,
220,
220,
220,
3108,
10786,
38200,
8863,
3256,
5009,
13,
38200,
8863,
11,
1438,
11639,
38200,
8863,
33809,
628,
220,
220,
220,
3108,
10786,
35352,
14,
3256,
5009,
13,
26124,
263,
11,
1438,
11639,
35352,
33809,
628,
220,
220,
220,
3108,
10786,
34365,
1754,
14,
3256,
5009,
13,
34365,
1754,
11,
1438,
11639,
34365,
1754,
33809,
628,
220,
220,
220,
3108,
10786,
32057,
14,
3256,
5009,
13,
32057,
11,
1438,
11639,
32057,
33809,
628,
220,
220,
220,
3108,
10786,
46002,
3256,
5009,
13,
46002,
11,
1438,
11639,
46002,
33809,
628,
220,
220,
220,
1303,
9878,
7730,
50,
29749,
11617,
198,
220,
220,
220,
3108,
10786,
14036,
14,
3256,
2291,
10786,
14036,
13,
6371,
82,
11537,
828,
628,
220,
220,
220,
3108,
10786,
12947,
3256,
5009,
13,
12947,
11,
1438,
2625,
12947,
12340,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
41605,
1268,
11,
41605,
12425,
11,
23337,
41517,
198,
220,
220,
220,
3108,
10786,
12683,
929,
3256,
5009,
13,
28144,
11712,
4933,
11,
1438,
2625,
28144,
11712,
4933,
12340,
628,
220,
220,
220,
3108,
10786,
38235,
3256,
5009,
13,
4993,
68,
47790,
11,
1438,
2625,
4993,
68,
47790,
12340,
628,
220,
220,
220,
3108,
10786,
6404,
448,
3256,
5009,
13,
4993,
417,
11187,
448,
11,
1438,
2625,
4993,
417,
11187,
448,
12340,
628,
220,
220,
220,
1303,
21965,
25664,
5357,
15859,
28270,
360,
20892,
45484,
471,
5760,
6234,
198,
220,
220,
220,
3108,
10786,
13317,
14,
3256,
5009,
13,
12982,
7407,
1780,
7680,
13,
292,
62,
1177,
22784,
1438,
2625,
13317,
12340,
628,
220,
220,
220,
3108,
10786,
13317,
14,
85,
17,
3256,
5009,
13,
13317,
85,
17,
11,
1438,
2625,
13317,
85,
17,
12340,
628,
220,
220,
220,
3108,
10786,
28712,
14,
3256,
5009,
13,
4933,
38734,
35215,
7680,
13,
292,
62,
1177,
22784,
1438,
2625,
28712,
12340,
628,
220,
220,
220,
3108,
10786,
28712,
62,
13138,
14,
3256,
5009,
13,
28712,
62,
13138,
11,
1438,
2625,
28712,
62,
2385,
919,
12340,
628,
220,
220,
220,
1303,
5550,
2538,
9328,
15859,
28270,
29397,
4177,
2849,
198,
220,
220,
220,
3108,
7203,
33678,
62,
23317,
1600,
5009,
13,
33678,
62,
23317,
11,
1438,
2625,
33678,
62,
23317,
12340,
198,
220,
220,
220,
198,
220,
220,
220,
1303,
27841,
17941,
1847,
21965,
25664,
360,
20892,
45484,
5870,
15567,
1137,
198,
220,
220,
220,
3108,
10786,
3803,
62,
23074,
3256,
5009,
13,
3803,
62,
23074,
11,
1438,
2625,
3803,
62,
23074,
12340,
628,
220,
220,
220,
1303,
7473,
38,
2394,
41752,
54,
12532,
198,
220,
220,
220,
3108,
10786,
28712,
62,
42503,
14,
3256,
6284,
62,
33571,
13,
35215,
4965,
316,
7680,
13,
292,
62,
1177,
7,
28243,
62,
3672,
2625,
18439,
14,
28712,
12,
42503,
13,
6494,
12340,
1438,
11639,
28712,
62,
42503,
33809,
628,
220,
220,
220,
3108,
10786,
28712,
62,
42503,
14,
28060,
14,
3256,
6284,
62,
33571,
13,
35215,
4965,
316,
45677,
7680,
13,
292,
62,
1177,
7,
28243,
62,
3672,
2625,
18439,
14,
28712,
12,
42503,
12,
34086,
13,
6494,
12340,
1438,
11639,
28712,
62,
42503,
62,
28060,
33809,
628,
220,
220,
220,
3108,
10786,
42503,
14,
27,
27112,
65,
2414,
29,
14,
27,
30001,
29,
14,
3256,
6284,
62,
33571,
13,
35215,
4965,
316,
18546,
2533,
7680,
13,
292,
62,
1177,
7,
28243,
62,
3672,
11639,
18439,
14,
28712,
62,
10414,
2533,
13,
6494,
33809,
1438,
11639,
28712,
62,
42503,
62,
10414,
2533,
33809,
628,
220,
220,
220,
3108,
10786,
42503,
14,
28060,
14,
3256,
6284,
62,
33571,
13,
35215,
4965,
316,
20988,
7680,
13,
292,
62,
1177,
7,
28243,
62,
3672,
2625,
18439,
14,
28712,
62,
40985,
13,
6494,
12340,
1438,
11639,
28712,
62,
42503,
62,
20751,
33809,
628,
2361,
198,
198,
30281,
26429,
796,
705,
5239,
38200,
9107,
9078,
13,
33571,
13,
18224,
62,
26429,
62,
33571,
6,
198,
30281,
4059,
796,
705,
5239,
38200,
9107,
9078,
13,
33571,
13,
18224,
62,
4059,
62,
33571,
6,
628
] | 2.88491 | 1,173 |
# template for "Guess the number" mini-project
# input will come from buttons and an input field
# all output for the game will be printed in the console
import simplegui
import random
import math
number_range = 100
player_guess = 0
secret_number = 0
number_of_guesses = 7
counter = 7
# helper function to start and restart the game
# define event handlers for control panel
# create frame
f = simplegui.create_frame('Guess the Number', 200, 200)
# register event handlers for control elements and start frame
f.add_button('Range is [0, 100)', range100, 200)
f.add_button('Range is [0, 1000)', range1000, 200)
f.add_input('Enter a guess', input_guess, 200)
# call new_game
new_game()
# always remember to check your completed program against the grading rubric
| [
2,
11055,
329,
366,
8205,
408,
262,
1271,
1,
9927,
12,
16302,
201,
198,
2,
5128,
481,
1282,
422,
12163,
290,
281,
5128,
2214,
201,
198,
2,
477,
5072,
329,
262,
983,
481,
307,
10398,
287,
262,
8624,
201,
198,
201,
198,
11748,
2829,
48317,
201,
198,
11748,
4738,
201,
198,
11748,
10688,
201,
198,
201,
198,
17618,
62,
9521,
796,
1802,
201,
198,
7829,
62,
5162,
408,
796,
657,
201,
198,
21078,
62,
17618,
796,
657,
201,
198,
17618,
62,
1659,
62,
5162,
44667,
796,
767,
201,
198,
24588,
796,
767,
201,
198,
2,
31904,
2163,
284,
923,
290,
15765,
262,
983,
201,
198,
201,
198,
201,
198,
2,
8160,
1785,
32847,
329,
1630,
6103,
201,
198,
220,
220,
220,
220,
201,
198,
2,
2251,
5739,
201,
198,
69,
796,
2829,
48317,
13,
17953,
62,
14535,
10786,
8205,
408,
262,
7913,
3256,
939,
11,
939,
8,
201,
198,
201,
198,
2,
7881,
1785,
32847,
329,
1630,
4847,
290,
923,
5739,
201,
198,
69,
13,
2860,
62,
16539,
10786,
17257,
318,
685,
15,
11,
1802,
8,
3256,
2837,
3064,
11,
939,
8,
201,
198,
69,
13,
2860,
62,
16539,
10786,
17257,
318,
685,
15,
11,
8576,
8,
3256,
2837,
12825,
11,
939,
8,
201,
198,
69,
13,
2860,
62,
15414,
10786,
17469,
257,
4724,
3256,
5128,
62,
5162,
408,
11,
939,
8,
201,
198,
201,
198,
2,
869,
649,
62,
6057,
220,
201,
198,
3605,
62,
6057,
3419,
201,
198,
201,
198,
201,
198,
2,
1464,
3505,
284,
2198,
534,
5668,
1430,
1028,
262,
43165,
6437,
1173,
201,
198
] | 3.111969 | 259 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
# @file rootshelve.py
#
# This is shelve-like database with ROOT.TFile as internal storage
#
# @see zipshelve
# @see sqliteshelve
#
#
# Create new DB:
#
# @code
#
# >>> import rootshelve as DBASE ## import the RootShelve module
# >>> db = DBASE.open ('a_db', 'n') ## create new DB
# ...
# >>> abcde = ...
# >>> db['some_key'] = abcde ## add information to DB
# ...
# >>> db.close()
#
# @endcode
#
# Access to DB in read-only mode :
#
# @code
#
# >>> import rootshelve as DBASE ## import the ZipShelve module
# >>> db = DBASE.open ('a_db' , 'r' ) ## access existing dbase in read-only mode
# ...
# >>> for key in db : print(key)
# ...
# >>> abcd = db['some_key']
#
# @endcode
#
# Access existing DB in update mode :
#
# @code
#
# >>> import rootshelve as DBASE ## import the ZipShelve module
# >>> db = DBASE.open ('a_db' ) ## access existing dbase in update mode
# ...
# >>> for key in db : print(key)
# ...
# >>> abcd = db['some_key']
#
# @endcode
#
# @attention: When one tries to read the database with pickled ROOT object using newer
# version of ROOT, one could get a ROOT read error,
# in case of evoltuion in ROOT streamers for some classes, e.g. <code>ROOT.TH1D</code>>
# @code
# Error in <TBufferFile::ReadClassBuffer>: Could not find the StreamerInfo for version 2 of the class TH1D, object skipped at offset 19
# Error in <TBufferFile::CheckByteCount>: object of class TH1D read too few bytes: 2 instead of 878
# @endcode
# The solution is simple and described in file ostap.io.dump_root
# @see ostap.io.dump_root
#
# @author Vanya BELYAEV [email protected]
# @date 2015-07-31
#
# =============================================================================
""" This is ROOT-based version of shelve database.
Create new DB:
>>> import rootshelve as DBASE ## import the ZipShelve module
>>> db = DBASE.open ('a_db', 'n') ## create new DB
...
>>> abcde = ...
>>> db['some_key'] = abcde ## add information to DB
...
>>> db.close()
Access to DB in read-only mode :
>>> import rootshelve as DBASE ## import the ZipShelve module
>>> db = DBASE.open ('a_db' , 'r' ) ## access existing dbase in read-only mode
...
>>> for key in db : print(key)
...
>>> abcd = db['some_key']
Access existing DB in update mode :
>>> import rootshelve as DBASE ## import the RootShelve module
>>> db = DBASE.open ('a_db' ) ## access existing dbase in update mode
...
>>> for key in db : print(key)
...
>>> abcd = db['some_key']
Attention: When one tries to read the database with pickled ROOT object using newer
version of ROOT, one could get a ROOT read error,
in case of evoltuion in ROOT streamers for some classes, e.g. ROOT.TH1D
> Error in <TBufferFile::ReadClassBuffer>: Could not find the StreamerInfo for version 2 of the class TH1D, object skipped at offset 19
> Error in <TBufferFile::CheckByteCount>: object of class TH1D read too few bytes: 2 instead of 878
The solution is simple and described in file ostap.io.dump_root
- see ostap.io.dump_root
"""
# =============================================================================
__author__ = "Vanya BELYAEV [email protected]"
__date__ = "2015-07-31"
__version__ = "$Revision$"
# =============================================================================
__all__ = (
'RootShelf' , ## The DB-itself
'RootOnlyShelf' , ## "data base" for ROOT-only objects
'open' , ## helper function to hide the actual DB
'tmpdb' , ## helper function to create TEMPORARY RootShelve database
)
# =============================================================================
import ROOT, shelve, zlib, os
import ostap.io.root_file
from sys import version_info as python_version
# =============================================================================
try :
from cPickle import Pickler, Unpickler, HIGHEST_PROTOCOL
except ImportError :
from pickle import Pickler, Unpickler, HIGHEST_PROTOCOL
# =============================================================================
try :
from io import BytesIO
except ImportError :
from shelve import StringIO as BytesIO
# =============================================================================
from ostap.io.dbase import TmpDB
# =============================================================================
from ostap.logger.logger import getLogger
if '__main__' == __name__ : logger = getLogger ( 'ostap.io.rootshelve' )
else : logger = getLogger ( __name__ )
logger.debug ( "Simple generic ROOT-based shelve-like-database" )
# =============================================================================
PROTOCOL = 2
# =============================================================================
## @class RootOnlyShelf
# Plain vanilla DBASE for ROOT-object (only)
# essentially it is nothing more than just shelve-like interface for ROOT-files
# @author Vanya BELYAEV [email protected]
# @date 2015-07-31
# @attention It CRUCIALLY depends on the proper TFile-decorations
# from ostap.io.root_file module
# @code
# db = RootOnlyShelf('mydb.root','c')
# h1 = ...
# db ['histogram'] = h1
# db.ls()
# @endcode
# @see Ostap.TFileDeco
class RootOnlyShelf(shelve.Shelf):
"""Plain vanilla DBASE for ROOT-object (only)
Essentially it is nothing more than just shelve-like
interface for ROOT-files
Attention: It CRUCIALLY depends on the proper
TFile-decorations from ostap.io.root_file module
>>> db = RooOnlyShelf('mydb.root','c')
>>> h1 = ...
>>> db ['histogram'] = h1
>>> db.ls()
"""
## constructors
# @attention it depends on proper TFile-decorations in ostap.io.root_file module
def __init__( self ,
filename ,
mode ,
writeback = False ,
args = () ) :
""" Create Root-only database
>>> db = RooOnlyShelf('mydb.root','c')
>>> h1 = ...
"""
self.__filename = filename
from ostap.io.root_file import ROOTCWD, open_mode
with ROOTCWD() : ## NB: preserve current directory in ROOT!
rfile = ROOT.TFile.Open ( filename , open_mode ( mode ) , *args )
shelve.Shelf.__init__ ( self , rfile , writeback )
self.nominal_dbname = filename
# =========================================================================
## clone the database into new one
# @code
# db = ...
# ndb = db.clone ( 'new_file.db' )
# @endcode
def clone ( self , new_name , keys = () ) :
""" Clone the database into new one
>>> old_db = ...
>>> new_db = new_db.clone ( 'new_file.db' )
"""
new_db = RootOnlyShelf ( new_name ,
mode = 'c' ,
writeback = self.writeback )
## copy the content
if keys :
for key in self.keys () :
if key in keys : new_db [ key ] = self [ key ]
else :
for key in self.keys () : new_db [ key ] = self [ key ]
new_db.sync ()
return new_db
# =========================================================================
## Iterator over avilable keys (patterns included).
# Pattern matching is performed accoriding to
# fnmatch/glob/shell rules (default) or regex
# @code
# db = ...
# for k in db.ikeys('*MC*') : print(k)
# @endcode
def ikeys ( self , pattern = '' , regex = False ) :
"""Iterator over avilable keys (patterns included).
Pattern matching is performed according to
fnmatch/glob/shell rules (default) or regex
>>> db = ...
>>> for k in db.ikeys('*MC*') : print(k)
"""
keys_ = self.keys()
if not pattern :
good = lambda k : True
elif regex :
import re
re_cmp = re.compile ( pattern )
good = lambda k : re_cmp.match ( k )
else :
import fnmatch
good = lambda s : fnmatch.fnmatchcase ( k , pattern )
keys_ = self.keys()
for k in sorted ( keys_ ) :
if good ( k ) : yield k
@property
def filename ( self ) :
"""``filename'' : the file name for root-database"""
return self.__filename
# =============================================================================
## get item from ROOT-file
# @code
# obj = db['A/B/C/histo']
# @endcode
# @author Vanya BELYAEV [email protected]
# @date 2015-07-31
def __getitem__ ( self , key ) :
"""Get the item from ROOT-file
>>> obj = db['A/B/C/histo']
"""
try:
value = self.cache [ key ]
except KeyError:
value = self.dict [ key ]
if self.writeback:
self.cache [ key ] = value
return value
# =============================================================================
## put item into ROOT-file
# @code
# db['A/B/C/histo'] = obj
# @endcode
# @author Vanya BELYAEV [email protected]
# @date 2015-07-31
def __setitem__ ( self , key , value ) :
""" Put item into ROOT-file
>>> db ['A/B/C/histo'] = obj
"""
if self.writeback : self.cache [ key ] = value
self.dict [ key ] = value
## close the database
def close ( self ) :
"""Close the database
"""
shelve.Shelf.close ( self )
# =============================================================================
## need to disable endcode/decode for the keys
if python_version.major > 2 :
RootOnlyShelf.__iter__ = _ros_iter_
RootOnlyShelf.__contains__ = _ros_contains_
RootOnlyShelf.__ros_get__ = _ros_get_
RootOnlyShelf.__delitem__ = _ros_delitem_
# =============================================================================
## @class RootShelf
# The actual class for ROOT-based shelve-like data base
# it implement shelve-interface with underlying ROOT-file as storage
# - ROOT-objects are stored directly in the ROOT-file,
# - other objects are pickled and stored via ROOT.TObjString
# @code
# db = RootShelf( 'mydb.root' , 'c' )
# db['histo'] = h1
# db['tuple'] = ('a',1,h1)
# @endcode
# @see RootOnlyShelf
# @author Vanya BELYAEV [email protected]
# @date 2015-07-31
class RootShelf(RootOnlyShelf):
""" The actual class for ROOT-based shelve-like data base
it implement shelve-interface with underlyinog ROOT-fiel storage
- ROOT-object are store ddirectly in the ROOT-file,
- other objects are pickled and stored in ROOT.TObjString
>>> db = RootShelf( 'mydb.root' , 'c' )
>>> db['histo'] = h1
>>> db['tuple'] = ('a',1,h1)
"""
# =========================================================================
## clone the database into new one
# @code
# db = ...
# ndb = db.clone ( 'new_file.db' )
# @endcode
def clone ( self , new_name , keys = () ) :
""" Clone the database into new one
>>> old_db = ...
>>> new_db = new_db.clone ( 'new_file.db' )
"""
new_db = RootShelf ( new_name ,
mode = 'c' ,
protocol = self.protocol ,
compress = self.compresslevel )
## copy the content
if keys :
for key in self.keys() :
if key in keys : new_db [ key ] = self [ key ]
else :
for key in self.keys() : new_db [ key ] = self [ key ]
new_db.sync ()
return new_db
@property
def protocol ( self ) :
"""``protocol'' : pickle protocol"""
return self.__protocol
@property
def compresslevel ( self ) :
"""``compresslevel'' : zlib compression level
"""
return self.__compresslevel
# =============================================================================
## get object (unpickle if needed) from dbase
# @code
# obj = db['A/B/C']
# @endcode
# @author Vanya BELYAEV [email protected]
# @date 2015-07-31
def __getitem__ ( self , key ):
""" Get object (unpickle if needed) from dbase
>>> obj = db['A/B/C']
"""
try:
value = self.cache [ key ]
except KeyError:
## value = self.dict [ key ]
tkey , value = self.dict.get_key_object ( key )
self.__sizes [ key ] = tkey.GetNbytes()
## blob ?
from ostap.core.core import Ostap
if isinstance ( value , Ostap.BLOB ) :
## unpack it!
z = Ostap.blob_to_bytes ( value )
u = zlib.decompress ( z )
## unpickle it!
f = BytesIO ( u )
value = Unpickler(f).load()
del z , u , f
if self.writeback:
self.cache[key] = value
return value
# =============================================================================
## Add object (pickle if needed) to dbase
# @code
# db['A/B/C'] = obj
# @endcode
# @author Vanya BELYAEV [email protected]
# @date 2015-07-31
def __setitem__ ( self , key , value ) :
""" Add object (pickle if needed) to dbase
>>> db['A/B/C'] = obj
"""
if self.writeback:
self.cache [ key ] = value
## not TObject? pickle it and convert to Ostap.BLOB
if not isinstance ( value , ROOT.TObject ) :
## (1) pickle it
f = BytesIO ( )
p = Pickler ( f , self.protocol )
p.dump ( value )
## (2) zip it
z = zlib.compress ( f.getvalue() , self.compresslevel )
self.__sizes [ key ] = len ( z )
## (3) put it into BLOB
from ostap.core.core import Ostap
blob = Ostap.BLOB ( key )
status = Ostap.blob_from_bytes ( blob , z )
value = blob
del z , f , p
## finally use ROOT
self.dict [ key ] = value
# =========================================================================
## list the avilable keys
def ls ( self , pattern = '' , load = True ) :
"""List the available keys (patterns included).
Pattern matching is performed accoriding to
fnmatch/glob/shell rules [it is not regex!]
>>> db = ...
>>> db.ls() ## all keys
>>> db.ls ('*MC*')
"""
n = os.path.basename ( self.filename )
ap = os.path.abspath ( self.filename )
try :
fs = os.path.getsize ( self.filename )
except :
fs = -1
if fs < 0 : size = "???"
elif fs < 1024 : size = str(fs)
elif fs < 1024 * 1024 :
size = '%.2fkB' % ( float ( fs ) / 1024 )
elif fs < 1024 * 1024 * 1024 :
size = '%.2fMB' % ( float ( fs ) / ( 1024 * 1024 ) )
else :
size = '%.2fGB' % ( float ( fs ) / ( 1024 * 1024 * 1024 ) )
keys = []
for k in self.ikeys ( pattern ): keys.append ( k )
keys.sort()
if keys : mlen = max ( [ len(k) for k in keys] ) + 2
else : mlen = 2
fmt = ' --> %%-%ds : %%s' % mlen
table = [ ( 'Key' , 'type' , ' size ') ]
for k in keys :
size = ''
ss = self.__sizes.get ( k , -1 )
if ss < 0 : size = ''
elif ss < 1024 : size = '%7d ' % ss
elif ss < 1024 * 1024 :
size = '%7.2f kB' % ( float ( ss ) / 1024 )
elif ss < 1024 * 1024 * 1024 :
size = '%7.2f MB' % ( float ( ss ) / ( 1024 * 1024 ) )
else :
size = '%7.2f GB' % ( float ( ss ) / ( 1024 * 1024 * 1024 ) )
ot = type ( self [ k ] )
otype = ot.__cppname__ if hasattr ( ot , '__cppname__' ) else ot.__name__
row = '{:15}'.format ( k ) , '{:15}'.format ( otype ) , size
table.append ( row )
import ostap.logger.table as T
t = self.__class__.__name__
title = '%s:%s' % ( t , n )
maxlen = 0
for row in table :
rowlen = 0
for i in row : rowlen += len ( i )
maxlen = max ( maxlen, rowlen )
if maxlen + 3 <= len ( title ) :
title = '<.>' + title [ -maxlen : ]
table = T.table ( table , title = title , prefix = '# ' )
ll = getLogger ( n )
line = 'Database %s:%s #keys: %d size: %s' % ( t , ap , len ( self ) , size )
ll.info ( '%s\n%s' % ( line , table ) )
## close the database
def close ( self ) :
"""Close the database
"""
RootOnlyShelf.close ( self )
# =============================================================================
## helper function to open RootShelve data base
# @code
# import RootShelve as DBASE
# db = DBASE.open ( 'mydb.root' , 'c' )
# @endcode
# @author Vanya BELYAEV [email protected]
# @date 2010-04-30
def open ( filename ,
mode = 'c' ,
writeback = False , *args ) :
"""
Helper function to open RootShelve data base
>>> import RootShelve as DBASE
>>> db = DBASE.open ( 'mydb.root' , 'c' )
"""
return RootShelf ( filename ,
mode ,
writeback , * args )
# =============================================================================
## @class TmpRootShelf
# TEMPORARY The actual class for ROOT-based shelve-like data base
# it implements shelve-interface with underlying ROOT-file as a storage
# - ROOT-objects are stored directly in the ROOT-file,
# - other objects are pickled and stored in ROOT.TObjString
# @code
# db = TmmRootShelf()
# db['histo'] = h1
# db['tuple'] = ('a',1,h1)
# @endcode
# @see RootShelf
# @author Vanya BELYAEV [email protected]
# @date 2015-07-31
class TmpRootShelf(RootShelf,TmpDB):
"""The actual class for TEMPORARY ROOT-based shelve-like data base
it implement shelve-intergase with underlyinog ROOT-fiel storage
- ROOT-object are stored directly in the ROOT-file,
- other objects are pickled and stored via ROOT.TObjString
see RootShelf
"""
## close and delete the file
# =============================================================================
## helper function to open RootShelve data base
# @code
# import RootShelve as DBASE
# db = DBASE.open ( 'mydb.root' , 'c' )
# @endcode
# @author Vanya BELYAEV [email protected]
# @date 2010-04-30
def tmpdb ( protocol = HIGHEST_PROTOCOL ,
compress = zlib.Z_DEFAULT_COMPRESSION ,
remove = True , ## immediate remove
keep = False ,
*args ) : ## keep it
""" Helper function to open TEMPPORARY RootShelve data base
>>> import RootShelve as DBASE
>>> db = DBASE.tmpdb()
"""
return TmpRootShelf ( protocol = protocol ,
compress = compress ,
remove = remove ,
keep = keep , *args )
# =============================================================================
if '__main__' == __name__ :
from ostap.utils.docme import docme
docme ( __name__ , logger = logger )
# =============================================================================
## The END
# =============================================================================
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
38093,
25609,
198,
2,
2488,
7753,
11135,
2978,
303,
13,
9078,
198,
2,
220,
198,
2,
770,
318,
7497,
303,
12,
2339,
6831,
351,
15107,
2394,
13,
51,
8979,
355,
5387,
6143,
220,
198,
2,
198,
2,
2488,
3826,
1976,
2419,
2978,
303,
198,
2,
2488,
3826,
44161,
2737,
2978,
303,
198,
2,
198,
2,
198,
2,
13610,
649,
20137,
25,
198,
2,
198,
2,
2488,
8189,
198,
2,
198,
2,
13163,
1330,
11135,
2978,
303,
355,
20137,
11159,
220,
220,
22492,
1330,
262,
20410,
50,
2978,
303,
8265,
220,
198,
2,
13163,
20613,
796,
20137,
11159,
13,
9654,
19203,
64,
62,
9945,
3256,
705,
77,
11537,
220,
220,
220,
22492,
2251,
649,
20137,
198,
2,
2644,
198,
2,
13163,
450,
66,
2934,
796,
2644,
198,
2,
13163,
20613,
17816,
11246,
62,
2539,
20520,
796,
220,
450,
66,
2934,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
751,
1321,
284,
20137,
198,
2,
2644,
198,
2,
13163,
20613,
13,
19836,
3419,
198,
2,
198,
2,
2488,
437,
8189,
220,
198,
2,
198,
2,
8798,
284,
20137,
287,
1100,
12,
8807,
4235,
1058,
198,
2,
198,
2,
2488,
8189,
198,
2,
198,
2,
13163,
1330,
11135,
2978,
303,
220,
355,
20137,
11159,
22492,
1330,
262,
38636,
50,
2978,
303,
8265,
220,
198,
2,
13163,
20613,
796,
20137,
11159,
13,
9654,
19203,
64,
62,
9945,
6,
837,
705,
81,
6,
1267,
220,
220,
220,
22492,
1895,
4683,
288,
8692,
287,
1100,
12,
8807,
4235,
198,
2,
2644,
198,
2,
13163,
329,
1994,
287,
20613,
1058,
3601,
7,
2539,
8,
198,
2,
2644,
198,
2,
13163,
450,
10210,
796,
20613,
17816,
11246,
62,
2539,
20520,
198,
2,
198,
2,
2488,
437,
8189,
220,
198,
2,
198,
2,
8798,
4683,
20137,
287,
4296,
4235,
1058,
198,
2,
198,
2,
2488,
8189,
198,
2,
198,
2,
13163,
1330,
11135,
2978,
303,
355,
20137,
11159,
220,
22492,
1330,
262,
38636,
50,
2978,
303,
8265,
220,
198,
2,
13163,
20613,
796,
20137,
11159,
13,
9654,
19203,
64,
62,
9945,
6,
1267,
220,
220,
220,
22492,
1895,
4683,
288,
8692,
287,
4296,
4235,
198,
2,
2644,
198,
2,
13163,
329,
1994,
287,
20613,
1058,
3601,
7,
2539,
8,
198,
2,
2644,
198,
2,
13163,
450,
10210,
796,
20613,
17816,
11246,
62,
2539,
20520,
198,
2,
198,
2,
2488,
437,
8189,
220,
198,
2,
198,
2,
2488,
1078,
1463,
25,
1649,
530,
8404,
284,
1100,
262,
6831,
351,
2298,
992,
15107,
2394,
2134,
1262,
15064,
198,
2,
2196,
286,
15107,
2394,
11,
530,
714,
651,
257,
15107,
2394,
1100,
4049,
11,
198,
2,
287,
1339,
286,
819,
5978,
84,
295,
287,
15107,
2394,
4269,
364,
329,
617,
220,
6097,
11,
304,
13,
70,
13,
1279,
8189,
29,
13252,
2394,
13,
4221,
16,
35,
3556,
8189,
4211,
198,
2,
2488,
8189,
220,
198,
2,
13047,
287,
1279,
22737,
13712,
8979,
3712,
5569,
9487,
28632,
31175,
10347,
407,
1064,
262,
13860,
263,
12360,
329,
2196,
362,
286,
262,
1398,
2320,
16,
35,
11,
2134,
26684,
379,
11677,
678,
198,
2,
13047,
287,
1279,
22737,
13712,
8979,
3712,
9787,
40778,
12332,
31175,
2134,
286,
1398,
2320,
16,
35,
1100,
1165,
1178,
9881,
25,
362,
2427,
286,
807,
3695,
198,
2,
2488,
437,
8189,
198,
2,
383,
4610,
318,
2829,
290,
3417,
287,
220,
2393,
23619,
499,
13,
952,
13,
39455,
62,
15763,
198,
2,
2488,
3826,
23619,
499,
13,
952,
13,
39455,
62,
15763,
198,
2,
220,
198,
2,
2488,
9800,
569,
34183,
29991,
56,
14242,
53,
21798,
13,
3856,
306,
64,
1990,
31,
30903,
13,
354,
198,
2,
2488,
4475,
220,
220,
1853,
12,
2998,
12,
3132,
198,
2,
220,
198,
2,
38093,
25609,
198,
37811,
770,
318,
15107,
2394,
12,
3106,
2196,
286,
7497,
303,
6831,
13,
628,
13610,
649,
20137,
25,
628,
13163,
1330,
11135,
2978,
303,
355,
20137,
11159,
22492,
1330,
262,
38636,
50,
2978,
303,
8265,
220,
198,
13163,
20613,
796,
20137,
11159,
13,
9654,
19203,
64,
62,
9945,
3256,
705,
77,
11537,
220,
220,
220,
22492,
2251,
649,
20137,
198,
2644,
198,
13163,
450,
66,
2934,
796,
2644,
198,
13163,
20613,
17816,
11246,
62,
2539,
20520,
796,
220,
450,
66,
2934,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
751,
1321,
284,
20137,
198,
2644,
198,
13163,
20613,
13,
19836,
3419,
628,
8798,
284,
20137,
287,
1100,
12,
8807,
4235,
1058,
628,
13163,
1330,
11135,
2978,
303,
355,
20137,
11159,
220,
22492,
1330,
262,
38636,
50,
2978,
303,
8265,
220,
198,
13163,
20613,
796,
20137,
11159,
13,
9654,
19203,
64,
62,
9945,
6,
837,
705,
81,
6,
1267,
220,
220,
220,
22492,
1895,
4683,
288,
8692,
287,
1100,
12,
8807,
4235,
198,
2644,
198,
13163,
329,
1994,
287,
20613,
1058,
3601,
7,
2539,
8,
198,
2644,
198,
13163,
450,
10210,
796,
20613,
17816,
11246,
62,
2539,
20520,
628,
8798,
4683,
20137,
287,
4296,
4235,
1058,
628,
13163,
1330,
11135,
2978,
303,
355,
20137,
11159,
220,
220,
22492,
1330,
262,
20410,
50,
2978,
303,
8265,
220,
198,
13163,
20613,
796,
20137,
11159,
13,
9654,
19203,
64,
62,
9945,
6,
1267,
220,
220,
220,
22492,
1895,
4683,
288,
8692,
287,
4296,
4235,
198,
2644,
198,
13163,
329,
1994,
287,
20613,
1058,
3601,
7,
2539,
8,
198,
2644,
198,
13163,
450,
10210,
796,
20613,
17816,
11246,
62,
2539,
20520,
628,
47406,
25,
1649,
530,
8404,
284,
1100,
262,
6831,
351,
2298,
992,
15107,
2394,
2134,
1262,
15064,
198,
2196,
286,
15107,
2394,
11,
530,
714,
651,
257,
15107,
2394,
1100,
4049,
11,
198,
287,
1339,
286,
819,
5978,
84,
295,
287,
15107,
2394,
4269,
364,
329,
617,
220,
6097,
11,
304,
13,
70,
13,
15107,
2394,
13,
4221,
16,
35,
198,
1875,
13047,
287,
1279,
22737,
13712,
8979,
3712,
5569,
9487,
28632,
31175,
10347,
407,
1064,
262,
13860,
263,
12360,
329,
2196,
362,
286,
262,
1398,
2320,
16,
35,
11,
2134,
26684,
379,
11677,
678,
198,
1875,
13047,
287,
1279,
22737,
13712,
8979,
3712,
9787,
40778,
12332,
31175,
2134,
286,
1398,
2320,
16,
35,
1100,
1165,
1178,
9881,
25,
362,
2427,
286,
807,
3695,
198,
383,
4610,
318,
2829,
290,
3417,
287,
220,
2393,
23619,
499,
13,
952,
13,
39455,
62,
15763,
198,
532,
766,
23619,
499,
13,
952,
13,
39455,
62,
15763,
220,
198,
37811,
198,
2,
38093,
25609,
198,
834,
9800,
834,
220,
796,
366,
53,
34183,
29991,
56,
14242,
53,
21798,
13,
3856,
306,
64,
1990,
31,
270,
538,
13,
622,
1,
198,
834,
4475,
834,
220,
220,
220,
796,
366,
4626,
12,
2998,
12,
3132,
1,
198,
834,
9641,
834,
796,
17971,
18009,
1166,
3,
1,
220,
198,
2,
38093,
25609,
198,
834,
439,
834,
796,
357,
198,
220,
220,
220,
705,
30016,
3347,
1652,
6,
220,
220,
220,
220,
837,
22492,
383,
20137,
12,
270,
944,
198,
220,
220,
220,
705,
30016,
10049,
3347,
1652,
6,
837,
22492,
366,
7890,
2779,
1,
329,
15107,
2394,
12,
8807,
5563,
198,
220,
220,
220,
705,
9654,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
22492,
31904,
2163,
284,
7808,
262,
4036,
20137,
198,
220,
220,
220,
705,
22065,
9945,
6,
220,
220,
220,
220,
220,
220,
220,
220,
837,
22492,
31904,
2163,
284,
2251,
309,
39494,
1581,
13153,
220,
20410,
50,
2978,
303,
6831,
220,
198,
220,
220,
220,
1267,
198,
2,
38093,
25609,
198,
11748,
15107,
2394,
11,
7497,
303,
11,
1976,
8019,
11,
28686,
220,
198,
11748,
23619,
499,
13,
952,
13,
15763,
62,
7753,
198,
6738,
220,
220,
25064,
1330,
2196,
62,
10951,
355,
21015,
62,
9641,
220,
198,
2,
38093,
25609,
198,
28311,
1058,
220,
198,
220,
220,
220,
422,
269,
31686,
293,
1330,
12346,
1754,
11,
791,
27729,
1754,
11,
34677,
6465,
62,
4805,
2394,
4503,
3535,
198,
16341,
17267,
12331,
1058,
220,
198,
220,
220,
220,
422,
220,
2298,
293,
1330,
12346,
1754,
11,
791,
27729,
1754,
11,
34677,
6465,
62,
4805,
2394,
4503,
3535,
198,
2,
38093,
25609,
220,
220,
220,
220,
198,
28311,
1058,
198,
220,
220,
220,
422,
33245,
220,
220,
220,
220,
1330,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2750,
4879,
9399,
220,
198,
16341,
17267,
12331,
1058,
220,
198,
220,
220,
220,
422,
7497,
303,
1330,
10903,
9399,
355,
2750,
4879,
9399,
198,
2,
38093,
25609,
198,
6738,
220,
220,
23619,
499,
13,
952,
13,
67,
8692,
1330,
309,
3149,
11012,
220,
198,
2,
38093,
25609,
198,
6738,
23619,
499,
13,
6404,
1362,
13,
6404,
1362,
1330,
651,
11187,
1362,
198,
361,
705,
834,
12417,
834,
6,
6624,
11593,
3672,
834,
1058,
49706,
796,
651,
11187,
1362,
357,
705,
455,
499,
13,
952,
13,
19150,
2978,
303,
6,
1267,
198,
17772,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
49706,
796,
651,
11187,
1362,
357,
11593,
3672,
834,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
6404,
1362,
13,
24442,
357,
366,
26437,
14276,
15107,
2394,
12,
3106,
7497,
303,
12,
2339,
12,
48806,
1,
1267,
198,
2,
38093,
25609,
198,
4805,
2394,
4503,
3535,
796,
362,
198,
2,
38093,
25609,
198,
2235,
2488,
4871,
20410,
10049,
3347,
1652,
198,
2,
220,
28847,
16858,
20137,
11159,
329,
15107,
2394,
12,
15252,
357,
8807,
8,
198,
2,
220,
6986,
340,
318,
2147,
517,
621,
655,
7497,
303,
12,
2339,
7071,
329,
15107,
2394,
12,
16624,
198,
2,
220,
2488,
9800,
569,
34183,
29991,
56,
14242,
53,
21798,
13,
3856,
306,
64,
1990,
31,
30903,
13,
354,
198,
2,
220,
2488,
4475,
220,
220,
1853,
12,
2998,
12,
3132,
198,
2,
220,
2488,
1078,
1463,
632,
8740,
9598,
40,
19807,
8338,
319,
262,
1774,
309,
8979,
12,
12501,
273,
602,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
422,
23619,
499,
13,
952,
13,
15763,
62,
7753,
8265,
198,
2,
220,
2488,
8189,
198,
2,
220,
20613,
796,
20410,
10049,
3347,
1652,
10786,
1820,
9945,
13,
15763,
41707,
66,
11537,
198,
2,
220,
289,
16,
796,
2644,
198,
2,
220,
20613,
37250,
10034,
21857,
20520,
796,
289,
16,
198,
2,
220,
20613,
13,
7278,
3419,
198,
2,
220,
2488,
437,
8189,
220,
198,
2,
220,
2488,
3826,
38919,
499,
13,
51,
8979,
10707,
78,
198,
4871,
20410,
10049,
3347,
1652,
7,
82,
2978,
303,
13,
3347,
1652,
2599,
198,
220,
220,
220,
37227,
3646,
391,
16858,
20137,
11159,
329,
15107,
2394,
12,
15252,
357,
8807,
8,
198,
220,
220,
220,
34039,
340,
318,
2147,
517,
621,
655,
7497,
303,
12,
2339,
198,
220,
220,
220,
7071,
329,
15107,
2394,
12,
16624,
198,
220,
220,
220,
47406,
25,
632,
8740,
9598,
40,
19807,
8338,
319,
262,
1774,
198,
220,
220,
220,
309,
8979,
12,
12501,
273,
602,
422,
23619,
499,
13,
952,
13,
15763,
62,
7753,
8265,
198,
220,
220,
220,
220,
198,
220,
220,
220,
13163,
20613,
796,
371,
2238,
10049,
3347,
1652,
10786,
1820,
9945,
13,
15763,
41707,
66,
11537,
198,
220,
220,
220,
13163,
289,
16,
796,
2644,
198,
220,
220,
220,
13163,
20613,
37250,
10034,
21857,
20520,
796,
289,
16,
198,
220,
220,
220,
13163,
20613,
13,
7278,
3419,
198,
220,
220,
220,
37227,
220,
198,
220,
220,
220,
22492,
5678,
669,
220,
198,
220,
220,
220,
1303,
220,
2488,
1078,
1463,
340,
8338,
319,
1774,
309,
8979,
12,
12501,
273,
602,
287,
23619,
499,
13,
952,
13,
15763,
62,
7753,
8265,
198,
220,
220,
220,
825,
11593,
15003,
834,
7,
2116,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29472,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4235,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3551,
1891,
220,
220,
796,
10352,
220,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26498,
220,
220,
220,
220,
220,
220,
220,
796,
7499,
220,
220,
220,
220,
220,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
13610,
20410,
12,
8807,
6831,
220,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
20613,
796,
371,
2238,
10049,
3347,
1652,
10786,
1820,
9945,
13,
15763,
41707,
66,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
289,
16,
796,
2644,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
834,
34345,
796,
29472,
220,
198,
220,
220,
220,
220,
220,
220,
220,
422,
23619,
499,
13,
952,
13,
15763,
62,
7753,
1330,
15107,
2394,
34,
22332,
11,
1280,
62,
14171,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
351,
15107,
2394,
34,
22332,
3419,
1058,
22492,
41354,
25,
12201,
1459,
8619,
287,
15107,
2394,
0,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
7753,
796,
15107,
2394,
13,
51,
8979,
13,
11505,
357,
29472,
220,
220,
837,
1280,
62,
14171,
357,
4235,
1267,
837,
1635,
22046,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7497,
303,
13,
3347,
1652,
13,
834,
15003,
834,
357,
2116,
837,
374,
7753,
837,
3551,
1891,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
26601,
1292,
62,
9945,
3672,
796,
29472,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
38093,
2559,
198,
220,
220,
220,
22492,
17271,
262,
6831,
656,
649,
530,
198,
220,
220,
220,
1303,
220,
2488,
8189,
198,
220,
220,
220,
1303,
220,
20613,
220,
796,
2644,
198,
220,
220,
220,
1303,
220,
299,
9945,
796,
20613,
13,
21018,
357,
705,
3605,
62,
7753,
13,
9945,
6,
1267,
198,
220,
220,
220,
1303,
220,
2488,
437,
8189,
198,
220,
220,
220,
825,
17271,
357,
2116,
837,
649,
62,
3672,
837,
8251,
796,
7499,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
30698,
262,
6831,
656,
649,
530,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
1468,
62,
9945,
796,
2644,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
649,
62,
9945,
796,
649,
62,
9945,
13,
21018,
357,
705,
3605,
62,
7753,
13,
9945,
6,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
9945,
796,
20410,
10049,
3347,
1652,
357,
649,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
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,
4235,
220,
220,
220,
220,
220,
220,
220,
796,
220,
705,
66,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
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,
3551,
1891,
220,
220,
796,
2116,
13,
13564,
1891,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
22492,
4866,
262,
2695,
198,
220,
220,
220,
220,
220,
220,
220,
611,
8251,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1994,
287,
2116,
13,
13083,
7499,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1994,
287,
8251,
220,
220,
220,
220,
220,
1058,
649,
62,
9945,
685,
1994,
2361,
796,
2116,
685,
1994,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
1058,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1994,
287,
2116,
13,
13083,
7499,
1058,
649,
62,
9945,
685,
1994,
2361,
796,
2116,
685,
1994,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
9945,
13,
27261,
7499,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
649,
62,
9945,
220,
628,
220,
220,
220,
1303,
38093,
2559,
198,
220,
220,
220,
22492,
220,
40806,
1352,
625,
1196,
346,
540,
8251,
357,
33279,
82,
3017,
737,
198,
220,
220,
220,
1303,
220,
220,
23939,
12336,
318,
6157,
697,
273,
2530,
284,
198,
220,
220,
220,
1303,
220,
220,
24714,
15699,
14,
4743,
672,
14,
29149,
3173,
357,
12286,
8,
393,
40364,
220,
198,
220,
220,
220,
1303,
220,
220,
2488,
8189,
220,
220,
198,
220,
220,
220,
1303,
220,
220,
20613,
796,
2644,
198,
220,
220,
220,
1303,
220,
220,
329,
479,
287,
20613,
13,
522,
893,
10786,
9,
9655,
9,
11537,
1058,
3601,
7,
74,
8,
198,
220,
220,
220,
1303,
220,
220,
2488,
437,
8189,
220,
220,
198,
220,
220,
220,
825,
220,
522,
893,
357,
2116,
837,
3912,
796,
10148,
837,
40364,
796,
10352,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
37787,
625,
1196,
346,
540,
8251,
357,
33279,
82,
3017,
737,
198,
220,
220,
220,
220,
220,
220,
220,
23939,
12336,
318,
6157,
1864,
284,
198,
220,
220,
220,
220,
220,
220,
220,
24714,
15699,
14,
4743,
672,
14,
29149,
3173,
357,
12286,
8,
393,
40364,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
20613,
796,
2644,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
329,
479,
287,
20613,
13,
522,
893,
10786,
9,
9655,
9,
11537,
1058,
3601,
7,
74,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
8251,
62,
796,
2116,
13,
13083,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
3912,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
922,
796,
37456,
479,
1058,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
40364,
1058,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1330,
302,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
302,
62,
48991,
796,
302,
13,
5589,
576,
357,
3912,
1267,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
922,
796,
37456,
479,
220,
1058,
302,
62,
48991,
13,
15699,
357,
479,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1330,
24714,
15699,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
922,
796,
37456,
264,
1058,
24714,
15699,
13,
22184,
15699,
7442,
357,
479,
837,
3912,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
8251,
62,
796,
2116,
13,
13083,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
329,
479,
287,
23243,
357,
8251,
62,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
922,
357,
479,
1267,
1058,
7800,
479,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
29472,
220,
220,
220,
357,
2116,
220,
220,
220,
220,
220,
220,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
15506,
34345,
7061,
1058,
262,
2393,
1438,
329,
6808,
12,
48806,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
834,
34345,
628,
220,
220,
220,
1303,
38093,
25609,
198,
220,
220,
220,
22492,
651,
2378,
422,
15107,
2394,
12,
7753,
198,
220,
220,
220,
1303,
220,
2488,
8189,
198,
220,
220,
220,
1303,
220,
26181,
796,
20613,
17816,
32,
14,
33,
14,
34,
14,
10034,
78,
20520,
198,
220,
220,
220,
1303,
220,
2488,
437,
8189,
220,
198,
220,
220,
220,
1303,
220,
2488,
9800,
569,
34183,
29991,
56,
14242,
53,
21798,
13,
3856,
306,
64,
1990,
31,
30903,
13,
354,
198,
220,
220,
220,
1303,
220,
2488,
4475,
220,
220,
1853,
12,
2998,
12,
3132,
220,
198,
220,
220,
220,
825,
11593,
1136,
9186,
834,
357,
2116,
837,
1994,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3855,
262,
2378,
422,
15107,
2394,
12,
7753,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
26181,
796,
20613,
17816,
32,
14,
33,
14,
34,
14,
10034,
78,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
2116,
13,
23870,
685,
1994,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
7383,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
2116,
13,
11600,
685,
1994,
2361,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
13564,
1891,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
23870,
685,
1994,
2361,
796,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
1988,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
38093,
25609,
198,
220,
220,
220,
22492,
1234,
2378,
656,
15107,
2394,
12,
7753,
220,
198,
220,
220,
220,
1303,
220,
2488,
8189,
198,
220,
220,
220,
1303,
220,
20613,
17816,
32,
14,
33,
14,
34,
14,
10034,
78,
20520,
796,
26181,
198,
220,
220,
220,
1303,
220,
2488,
437,
8189,
220,
198,
220,
220,
220,
1303,
220,
2488,
9800,
569,
34183,
29991,
56,
14242,
53,
21798,
13,
3856,
306,
64,
1990,
31,
30903,
13,
354,
198,
220,
220,
220,
1303,
220,
2488,
4475,
220,
220,
1853,
12,
2998,
12,
3132,
220,
198,
220,
220,
220,
825,
11593,
2617,
9186,
834,
357,
2116,
837,
1994,
837,
1988,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
5930,
2378,
656,
15107,
2394,
12,
7753,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
20613,
37250,
32,
14,
33,
14,
34,
14,
10034,
78,
20520,
796,
26181,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
13564,
1891,
1058,
2116,
13,
23870,
685,
1994,
2361,
796,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
11600,
685,
1994,
2361,
796,
1988,
220,
628,
220,
220,
220,
22492,
1969,
262,
6831,
220,
198,
220,
220,
220,
825,
1969,
357,
2116,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
26125,
262,
6831,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
7497,
303,
13,
3347,
1652,
13,
19836,
357,
2116,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
2,
38093,
25609,
198,
2235,
761,
284,
15560,
886,
8189,
14,
12501,
1098,
329,
262,
8251,
220,
198,
361,
21015,
62,
9641,
13,
22478,
1875,
362,
1058,
628,
220,
220,
220,
20410,
10049,
3347,
1652,
13,
834,
2676,
834,
220,
220,
220,
220,
796,
4808,
4951,
62,
2676,
62,
220,
198,
220,
220,
220,
20410,
10049,
3347,
1652,
13,
834,
3642,
1299,
834,
796,
4808,
4951,
62,
3642,
1299,
62,
198,
220,
220,
220,
20410,
10049,
3347,
1652,
13,
834,
4951,
62,
1136,
834,
220,
796,
4808,
4951,
62,
1136,
62,
198,
220,
220,
220,
20410,
10049,
3347,
1652,
13,
834,
12381,
9186,
834,
220,
796,
4808,
4951,
62,
12381,
9186,
62,
198,
220,
220,
220,
220,
198,
2,
38093,
25609,
198,
2235,
2488,
4871,
20410,
3347,
1652,
198,
2,
220,
383,
4036,
1398,
329,
15107,
2394,
12,
3106,
7497,
303,
12,
2339,
1366,
2779,
198,
2,
220,
340,
3494,
7497,
303,
12,
39994,
351,
10238,
15107,
2394,
12,
7753,
355,
6143,
198,
2,
220,
532,
15107,
2394,
12,
48205,
389,
8574,
3264,
287,
262,
15107,
2394,
12,
7753,
11,
198,
2,
220,
532,
584,
5563,
389,
2298,
992,
290,
8574,
2884,
15107,
2394,
13,
51,
49201,
10100,
198,
2,
220,
2488,
8189,
198,
2,
220,
20613,
796,
20410,
3347,
1652,
7,
705,
1820,
9945,
13,
15763,
6,
837,
705,
66,
6,
1267,
198,
2,
220,
20613,
17816,
10034,
78,
20520,
796,
289,
16,
198,
2,
220,
20613,
17816,
83,
29291,
20520,
796,
19203,
64,
3256,
16,
11,
71,
16,
8,
220,
198,
2,
220,
2488,
437,
8189,
198,
2,
220,
2488,
3826,
20410,
10049,
3347,
1652,
220,
198,
2,
220,
2488,
9800,
569,
34183,
29991,
56,
14242,
53,
21798,
13,
3856,
306,
64,
1990,
31,
30903,
13,
354,
198,
2,
220,
2488,
4475,
220,
220,
1853,
12,
2998,
12,
3132,
220,
198,
4871,
20410,
3347,
1652,
7,
30016,
10049,
3347,
1652,
2599,
198,
220,
220,
220,
37227,
383,
4036,
1398,
329,
15107,
2394,
12,
3106,
7497,
303,
12,
2339,
1366,
2779,
198,
220,
220,
220,
340,
3494,
7497,
303,
12,
39994,
351,
739,
306,
259,
519,
15107,
2394,
12,
69,
8207,
6143,
198,
220,
220,
220,
532,
15107,
2394,
12,
15252,
389,
3650,
288,
12942,
306,
287,
262,
15107,
2394,
12,
7753,
11,
198,
220,
220,
220,
532,
584,
5563,
389,
2298,
992,
290,
8574,
287,
15107,
2394,
13,
51,
49201,
10100,
198,
220,
220,
220,
220,
198,
220,
220,
220,
13163,
20613,
796,
20410,
3347,
1652,
7,
705,
1820,
9945,
13,
15763,
6,
837,
705,
66,
6,
1267,
198,
220,
220,
220,
13163,
20613,
17816,
10034,
78,
20520,
796,
289,
16,
198,
220,
220,
220,
13163,
20613,
17816,
83,
29291,
20520,
796,
19203,
64,
3256,
16,
11,
71,
16,
8,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
38093,
2559,
198,
220,
220,
220,
22492,
17271,
262,
6831,
656,
649,
530,
198,
220,
220,
220,
1303,
220,
2488,
8189,
198,
220,
220,
220,
1303,
220,
20613,
220,
796,
2644,
198,
220,
220,
220,
1303,
220,
299,
9945,
796,
20613,
13,
21018,
357,
705,
3605,
62,
7753,
13,
9945,
6,
1267,
198,
220,
220,
220,
1303,
220,
2488,
437,
8189,
198,
220,
220,
220,
825,
17271,
357,
2116,
837,
649,
62,
3672,
837,
8251,
796,
7499,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
30698,
262,
6831,
656,
649,
530,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
1468,
62,
9945,
796,
2644,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
649,
62,
9945,
796,
649,
62,
9945,
13,
21018,
357,
705,
3605,
62,
7753,
13,
9945,
6,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
9945,
796,
20410,
3347,
1652,
357,
649,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
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,
4235,
220,
220,
220,
220,
220,
220,
220,
796,
220,
705,
66,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
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,
8435,
220,
220,
220,
796,
2116,
13,
11235,
4668,
220,
220,
220,
220,
220,
837,
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,
27413,
220,
220,
220,
796,
2116,
13,
5589,
601,
5715,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
22492,
4866,
262,
2695,
198,
220,
220,
220,
220,
220,
220,
220,
611,
8251,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1994,
287,
2116,
13,
13083,
3419,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1994,
287,
8251,
220,
220,
220,
220,
1058,
649,
62,
9945,
685,
1994,
2361,
796,
2116,
685,
1994,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
1058,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1994,
287,
2116,
13,
13083,
3419,
1058,
649,
62,
9945,
685,
1994,
2361,
796,
2116,
685,
1994,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
9945,
13,
27261,
7499,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
649,
62,
9945,
220,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
8435,
357,
2116,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
15506,
11235,
4668,
7061,
1058,
2298,
293,
8435,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
834,
11235,
4668,
198,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
27413,
5715,
357,
2116,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
15506,
5589,
601,
5715,
7061,
1058,
1976,
8019,
19794,
1241,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
834,
5589,
601,
5715,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
38093,
25609,
198,
220,
220,
220,
22492,
220,
651,
2134,
357,
403,
27729,
293,
611,
2622,
8,
220,
422,
288,
8692,
198,
220,
220,
220,
1303,
220,
220,
2488,
8189,
198,
220,
220,
220,
1303,
220,
220,
26181,
796,
20613,
17816,
32,
14,
33,
14,
34,
20520,
198,
220,
220,
220,
1303,
220,
220,
2488,
437,
8189,
198,
220,
220,
220,
1303,
220,
220,
2488,
9800,
569,
34183,
29991,
56,
14242,
53,
21798,
13,
3856,
306,
64,
1990,
31,
30903,
13,
354,
198,
220,
220,
220,
1303,
220,
220,
2488,
4475,
220,
220,
1853,
12,
2998,
12,
3132,
220,
198,
220,
220,
220,
825,
11593,
1136,
9186,
834,
357,
2116,
837,
1994,
15179,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3497,
2134,
357,
403,
27729,
293,
611,
2622,
8,
220,
422,
288,
8692,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
26181,
796,
20613,
17816,
32,
14,
33,
14,
34,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
2116,
13,
23870,
685,
1994,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
7383,
12331,
25,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
1988,
796,
2116,
13,
11600,
685,
1994,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
2539,
837,
1988,
796,
2116,
13,
11600,
13,
1136,
62,
2539,
62,
15252,
357,
1994,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
834,
82,
4340,
685,
1994,
2361,
796,
256,
2539,
13,
3855,
45,
33661,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
44812,
5633,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
422,
220,
23619,
499,
13,
7295,
13,
7295,
1330,
220,
38919,
499,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
357,
1988,
837,
38919,
499,
13,
9148,
9864,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
555,
8002,
340,
0,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
220,
220,
220,
220,
796,
38919,
499,
13,
2436,
672,
62,
1462,
62,
33661,
357,
1988,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
334,
220,
220,
220,
220,
796,
1976,
8019,
13,
12501,
3361,
601,
357,
1976,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
8593,
39423,
340,
0,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
220,
220,
220,
220,
796,
2750,
4879,
9399,
357,
334,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
791,
27729,
1754,
7,
69,
737,
2220,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1619,
1976,
837,
334,
837,
277,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
13564,
1891,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
23870,
58,
2539,
60,
796,
1988,
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,
1441,
1988,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
38093,
25609,
198,
220,
220,
220,
22492,
220,
3060,
2134,
357,
27729,
293,
611,
2622,
8,
220,
284,
288,
8692,
198,
220,
220,
220,
1303,
220,
220,
2488,
8189,
198,
220,
220,
220,
1303,
220,
220,
20613,
17816,
32,
14,
33,
14,
34,
20520,
796,
26181,
198,
220,
220,
220,
1303,
220,
220,
2488,
437,
8189,
198,
220,
220,
220,
1303,
220,
220,
2488,
9800,
569,
34183,
29991,
56,
14242,
53,
21798,
13,
3856,
306,
64,
1990,
31,
30903,
13,
354,
198,
220,
220,
220,
1303,
220,
220,
2488,
4475,
220,
220,
1853,
12,
2998,
12,
3132,
220,
198,
220,
220,
220,
825,
11593,
2617,
9186,
834,
357,
2116,
837,
1994,
837,
1988,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3060,
2134,
357,
27729,
293,
611,
2622,
8,
220,
284,
288,
8692,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
20613,
17816,
32,
14,
33,
14,
34,
20520,
796,
26181,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
13564,
1891,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
23870,
685,
1994,
2361,
796,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
22492,
407,
5390,
65,
752,
30,
2298,
293,
340,
290,
10385,
284,
38919,
499,
13,
9148,
9864,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
318,
39098,
220,
357,
1988,
837,
15107,
2394,
13,
51,
10267,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
357,
16,
8,
2298,
293,
340,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
796,
2750,
4879,
9399,
220,
220,
220,
357,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
796,
12346,
1754,
220,
220,
220,
357,
277,
837,
2116,
13,
11235,
4668,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
13,
39455,
357,
1988,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
357,
17,
8,
19974,
340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
220,
220,
220,
220,
220,
796,
1976,
8019,
13,
5589,
601,
357,
277,
13,
1136,
8367,
3419,
837,
2116,
13,
5589,
601,
5715,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
834,
82,
4340,
685,
1994,
2361,
796,
18896,
357,
1976,
1267,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
357,
18,
8,
1234,
340,
656,
220,
9878,
9864,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
422,
220,
23619,
499,
13,
7295,
13,
7295,
1330,
220,
38919,
499,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
44812,
220,
220,
796,
38919,
499,
13,
9148,
9864,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
1994,
220,
220,
220,
220,
220,
1267,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3722,
796,
38919,
499,
13,
2436,
672,
62,
6738,
62,
33661,
357,
44812,
837,
1976,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
220,
796,
44812,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1619,
1976,
837,
277,
837,
279,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
22492,
3443,
779,
15107,
2394,
220,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
11600,
685,
1994,
2361,
796,
1988,
628,
220,
220,
220,
1303,
38093,
2559,
198,
220,
220,
220,
22492,
1351,
262,
1196,
346,
540,
8251,
220,
198,
220,
220,
220,
825,
43979,
220,
220,
220,
357,
2116,
837,
3912,
796,
10148,
837,
3440,
796,
6407,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
8053,
262,
1695,
8251,
357,
33279,
82,
3017,
737,
198,
220,
220,
220,
220,
220,
220,
220,
23939,
12336,
318,
6157,
697,
273,
2530,
284,
198,
220,
220,
220,
220,
220,
220,
220,
24714,
15699,
14,
4743,
672,
14,
29149,
3173,
685,
270,
318,
407,
40364,
36463,
220,
628,
220,
220,
220,
220,
220,
220,
220,
13163,
20613,
796,
2644,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
20613,
13,
7278,
3419,
22492,
477,
8251,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
20613,
13,
7278,
19203,
9,
9655,
9,
11537,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
299,
220,
796,
28686,
13,
6978,
13,
12093,
12453,
357,
2116,
13,
34345,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
2471,
796,
28686,
13,
6978,
13,
397,
2777,
776,
220,
357,
2116,
13,
34345,
1267,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43458,
796,
28686,
13,
6978,
13,
11407,
1096,
357,
2116,
13,
34345,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43458,
796,
532,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
611,
220,
220,
220,
43458,
1279,
657,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
2546,
796,
366,
3548,
1701,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
220,
43458,
1279,
28119,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
2546,
796,
965,
7,
9501,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
220,
43458,
1279,
28119,
220,
1635,
28119,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2546,
796,
705,
7225,
17,
69,
38841,
6,
4064,
357,
12178,
357,
43458,
1267,
1220,
28119,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
220,
43458,
1279,
28119,
220,
1635,
28119,
1635,
28119,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2546,
796,
705,
7225,
17,
69,
10744,
6,
4064,
357,
12178,
357,
43458,
1267,
1220,
357,
28119,
1635,
28119,
1267,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2546,
796,
705,
7225,
17,
69,
4579,
6,
4064,
357,
12178,
357,
43458,
1267,
1220,
357,
28119,
1635,
28119,
1635,
28119,
1267,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
8251,
796,
17635,
220,
198,
220,
220,
220,
220,
220,
220,
220,
329,
479,
287,
2116,
13,
522,
893,
357,
3912,
15179,
8251,
13,
33295,
357,
479,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
8251,
13,
30619,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
8251,
1058,
285,
11925,
796,
3509,
357,
685,
18896,
7,
74,
8,
329,
479,
287,
8251,
60,
1267,
1343,
362,
220,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
220,
220,
220,
1058,
285,
11925,
796,
362,
220,
198,
220,
220,
220,
220,
220,
220,
220,
46996,
796,
705,
14610,
4064,
33963,
4,
9310,
1058,
43313,
82,
6,
4064,
285,
11925,
628,
220,
220,
220,
220,
220,
220,
220,
3084,
796,
685,
357,
705,
9218,
6,
837,
705,
4906,
6,
837,
705,
220,
220,
2546,
220,
220,
705,
8,
2361,
220,
198,
220,
220,
220,
220,
220,
220,
220,
329,
479,
287,
8251,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2546,
796,
10148,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37786,
220,
220,
796,
220,
220,
2116,
13,
834,
82,
4340,
13,
1136,
357,
479,
837,
532,
16,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
220,
220,
220,
37786,
1279,
657,
220,
220,
220,
1058,
2546,
796,
10148,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
220,
37786,
1279,
28119,
1058,
2546,
796,
705,
4,
22,
67,
220,
220,
705,
4064,
37786,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
220,
37786,
1279,
28119,
1635,
28119,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2546,
796,
705,
4,
22,
13,
17,
69,
479,
33,
6,
4064,
220,
357,
12178,
357,
37786,
1267,
1220,
28119,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
220,
37786,
1279,
28119,
1635,
28119,
1635,
28119,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2546,
796,
705,
4,
22,
13,
17,
69,
10771,
6,
4064,
220,
357,
12178,
357,
37786,
1267,
1220,
357,
28119,
1635,
28119,
1267,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2546,
796,
705,
4,
22,
13,
17,
69,
13124,
6,
4064,
220,
357,
12178,
357,
37786,
1267,
1220,
357,
28119,
1635,
28119,
1635,
28119,
1267,
1267,
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,
220,
220,
220,
220,
30972,
220,
220,
220,
796,
2099,
357,
2116,
685,
479,
2361,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
267,
4906,
796,
30972,
13,
834,
20322,
3672,
834,
611,
468,
35226,
357,
30972,
837,
705,
834,
20322,
3672,
834,
6,
1267,
2073,
30972,
13,
834,
3672,
834,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
796,
705,
90,
25,
1314,
92,
4458,
18982,
357,
479,
1267,
837,
705,
90,
25,
1314,
92,
4458,
18982,
357,
267,
4906,
1267,
837,
2546,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3084,
13,
33295,
357,
5752,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
1330,
23619,
499,
13,
6404,
1362,
13,
11487,
355,
309,
198,
220,
220,
220,
220,
220,
220,
220,
256,
220,
220,
220,
220,
220,
796,
2116,
13,
834,
4871,
834,
13,
834,
3672,
834,
198,
220,
220,
220,
220,
220,
220,
220,
3670,
220,
796,
705,
4,
82,
25,
4,
82,
6,
4064,
357,
256,
220,
837,
299,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
3509,
11925,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
329,
5752,
287,
3084,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
11925,
796,
657,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
5752,
1058,
5752,
11925,
15853,
18896,
357,
1312,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3509,
11925,
796,
3509,
357,
3509,
11925,
11,
5752,
11925,
1267,
220,
198,
220,
220,
220,
220,
220,
220,
220,
611,
3509,
11925,
1343,
513,
19841,
18896,
357,
3670,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3670,
796,
705,
27,
13,
29,
6,
1343,
3670,
685,
532,
9806,
11925,
1058,
2361,
220,
198,
220,
220,
220,
220,
220,
220,
220,
3084,
796,
309,
13,
11487,
357,
3084,
837,
3670,
796,
3670,
837,
21231,
796,
705,
2,
705,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
32660,
220,
220,
220,
796,
651,
11187,
1362,
357,
299,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
1627,
220,
796,
705,
38105,
4064,
82,
25,
4,
82,
1303,
13083,
25,
4064,
67,
2546,
25,
4064,
82,
6,
4064,
357,
256,
837,
2471,
837,
18896,
357,
2116,
1267,
837,
2546,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
32660,
13,
10951,
357,
220,
705,
4,
82,
59,
77,
4,
82,
6,
4064,
220,
357,
1627,
837,
3084,
1267,
1267,
628,
220,
220,
220,
22492,
1969,
262,
6831,
220,
198,
220,
220,
220,
825,
1969,
357,
2116,
1267,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
26125,
262,
6831,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
20410,
10049,
3347,
1652,
13,
19836,
357,
2116,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
2,
38093,
25609,
198,
2235,
31904,
2163,
284,
1280,
20410,
50,
2978,
303,
1366,
2779,
198,
2,
220,
2488,
8189,
198,
2,
220,
1330,
20410,
50,
2978,
303,
355,
20137,
11159,
198,
2,
220,
20613,
796,
20137,
11159,
13,
9654,
357,
705,
1820,
9945,
13,
15763,
6,
837,
705,
66,
6,
1267,
198,
2,
220,
2488,
437,
8189,
220,
198,
2,
220,
2488,
9800,
569,
34183,
29991,
56,
14242,
53,
21798,
13,
3856,
306,
64,
1990,
31,
30903,
13,
354,
198,
2,
220,
2488,
4475,
220,
220,
3050,
12,
3023,
12,
1270,
198,
4299,
1280,
357,
29472,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4235,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
66,
6,
220,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3551,
1891,
220,
220,
220,
220,
796,
10352,
837,
1635,
22046,
1267,
1058,
220,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5053,
525,
2163,
284,
1280,
20410,
50,
2978,
303,
1366,
2779,
198,
220,
220,
220,
13163,
1330,
20410,
50,
2978,
303,
355,
20137,
11159,
198,
220,
220,
220,
13163,
20613,
796,
20137,
11159,
13,
9654,
357,
705,
1820,
9945,
13,
15763,
6,
837,
705,
66,
6,
1267,
198,
220,
220,
220,
37227,
220,
220,
220,
220,
198,
220,
220,
220,
1441,
20410,
3347,
1652,
357,
29472,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4235,
220,
220,
220,
220,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3551,
1891,
837,
1635,
26498,
1267,
198,
198,
2,
38093,
25609,
198,
2235,
2488,
4871,
309,
3149,
30016,
3347,
1652,
198,
2,
220,
309,
39494,
1581,
13153,
383,
4036,
1398,
329,
15107,
2394,
12,
3106,
7497,
303,
12,
2339,
1366,
2779,
198,
2,
220,
340,
23986,
7497,
303,
12,
39994,
351,
10238,
15107,
2394,
12,
7753,
355,
257,
6143,
198,
2,
220,
532,
15107,
2394,
12,
48205,
389,
8574,
3264,
287,
262,
15107,
2394,
12,
7753,
11,
198,
2,
220,
532,
584,
5563,
389,
2298,
992,
290,
8574,
287,
15107,
2394,
13,
51,
49201,
10100,
198,
2,
220,
2488,
8189,
198,
2,
220,
20613,
796,
309,
3020,
30016,
3347,
1652,
3419,
198,
2,
220,
20613,
17816,
10034,
78,
20520,
796,
289,
16,
198,
2,
220,
20613,
17816,
83,
29291,
20520,
796,
19203,
64,
3256,
16,
11,
71,
16,
8,
220,
198,
2,
220,
2488,
437,
8189,
198,
2,
220,
2488,
3826,
20410,
3347,
1652,
220,
198,
2,
220,
2488,
9800,
569,
34183,
29991,
56,
14242,
53,
21798,
13,
3856,
306,
64,
1990,
31,
30903,
13,
354,
198,
2,
220,
2488,
4475,
220,
220,
1853,
12,
2998,
12,
3132,
220,
198,
4871,
309,
3149,
30016,
3347,
1652,
7,
30016,
3347,
1652,
11,
51,
3149,
11012,
2599,
198,
220,
220,
220,
37227,
464,
4036,
1398,
329,
309,
39494,
1581,
13153,
15107,
2394,
12,
3106,
7497,
303,
12,
2339,
1366,
2779,
198,
220,
220,
220,
340,
3494,
7497,
303,
12,
3849,
70,
589,
351,
739,
306,
259,
519,
15107,
2394,
12,
69,
8207,
6143,
198,
220,
220,
220,
532,
15107,
2394,
12,
15252,
389,
8574,
3264,
287,
262,
15107,
2394,
12,
7753,
11,
198,
220,
220,
220,
532,
584,
5563,
389,
2298,
992,
290,
8574,
2884,
220,
15107,
2394,
13,
51,
49201,
10100,
198,
220,
220,
220,
766,
20410,
3347,
1652,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
22492,
1969,
290,
12233,
262,
2393,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
2,
38093,
25609,
198,
2235,
31904,
2163,
284,
1280,
20410,
50,
2978,
303,
1366,
2779,
198,
2,
220,
2488,
8189,
198,
2,
220,
1330,
20410,
50,
2978,
303,
355,
20137,
11159,
198,
2,
220,
20613,
796,
20137,
11159,
13,
9654,
357,
705,
1820,
9945,
13,
15763,
6,
837,
705,
66,
6,
1267,
198,
2,
220,
2488,
437,
8189,
220,
198,
2,
220,
2488,
9800,
569,
34183,
29991,
56,
14242,
53,
21798,
13,
3856,
306,
64,
1990,
31,
30903,
13,
354,
198,
2,
220,
2488,
4475,
220,
220,
3050,
12,
3023,
12,
1270,
198,
4299,
45218,
9945,
357,
8435,
220,
796,
34677,
6465,
62,
4805,
2394,
4503,
3535,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27413,
220,
796,
1976,
8019,
13,
57,
62,
7206,
38865,
62,
9858,
32761,
2849,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4781,
220,
220,
220,
796,
6407,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
7103,
4781,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1394,
220,
220,
220,
220,
220,
796,
10352,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
22046,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
1058,
22492,
1394,
340,
220,
198,
220,
220,
220,
37227,
5053,
525,
2163,
284,
1280,
309,
3620,
10246,
1581,
13153,
20410,
50,
2978,
303,
1366,
2779,
198,
220,
220,
220,
13163,
1330,
20410,
50,
2978,
303,
355,
20137,
11159,
198,
220,
220,
220,
13163,
20613,
796,
20137,
11159,
13,
22065,
9945,
3419,
198,
220,
220,
220,
37227,
220,
220,
220,
220,
198,
220,
220,
220,
1441,
309,
3149,
30016,
3347,
1652,
357,
8435,
796,
8435,
837,
220,
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,
27413,
796,
27413,
837,
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,
4781,
220,
220,
796,
4781,
220,
220,
837,
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,
1394,
220,
220,
220,
220,
796,
1394,
220,
220,
220,
220,
837,
1635,
22046,
1267,
220,
628,
198,
198,
2,
38093,
25609,
198,
361,
705,
834,
12417,
834,
6,
6624,
11593,
3672,
834,
1058,
198,
220,
220,
220,
220,
198,
220,
220,
220,
422,
23619,
499,
13,
26791,
13,
15390,
1326,
1330,
2205,
1326,
198,
220,
220,
220,
2205,
1326,
357,
11593,
3672,
834,
837,
49706,
796,
49706,
1267,
198,
220,
220,
220,
220,
198,
2,
38093,
25609,
198,
2235,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
23578,
220,
198,
2,
38093,
25609,
198
] | 2.300311 | 9,004 |
pytest_plugins = ["model_runner.validator._tests.validator_test_fixtures"]
| [
9078,
9288,
62,
37390,
796,
14631,
19849,
62,
16737,
13,
12102,
1352,
13557,
41989,
13,
12102,
1352,
62,
9288,
62,
69,
25506,
8973,
198
] | 3.125 | 24 |
#!/usr/bin/python
"""
INPUT: A file named specified from the command line
The file is a single line JSON format like this:
["424344455354X738492939495", "424344535463X738492939495"]
each element represents a game canvass map
INTERMEDIATE OUTPUT: a series of png files numbered from 0
like 0.png, 1.png, 2.png, etc.
OUTPUT: an animated GIF named 'animated.gif'
with 1 frame per sec and infinite play loop
EXAMPLE: ./gen_gif.py
TODO:
1. output file naem through comand line argument
2. list through command line argument
3. a switch to save/not-save intermediate results
"""
import os
import sys
import json
from PIL import Image, ImageSequence
FILENAME = sys.argv[1]
with open(FILENAME) as fp:
for line in fp:
line = line.strip()
map_list = json.loads(line)
n = len(map_list)
idx = 0
for mapkey in map_list:
print 'Generating %d of %d canvass maps...' % (idx+1, n)
os.system('./draw_canvass.R %s %s.png %d %d &>/dev/null' % (mapkey, idx, n, idx))
#os.system('./draw_canvass.R %s %s.png %d %d' % (mapkey, idx, n, idx))
idx += 1
print 'Generating animated GIF for the %d canvass maps...' % n
os.system('convert -delay 100 -loop 0 *.png animated.gif')
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
37811,
198,
1268,
30076,
25,
317,
2393,
3706,
7368,
422,
262,
3141,
1627,
198,
220,
220,
220,
220,
220,
220,
383,
2393,
318,
257,
2060,
1627,
19449,
5794,
588,
428,
25,
198,
220,
220,
220,
220,
220,
220,
14631,
19,
26660,
2598,
30505,
32182,
55,
22,
2548,
2920,
1959,
2670,
33781,
1600,
366,
40090,
2682,
2231,
2327,
38380,
55,
22,
2548,
2920,
1959,
2670,
33781,
8973,
198,
220,
220,
220,
220,
220,
220,
1123,
5002,
6870,
257,
983,
39614,
562,
3975,
198,
198,
41358,
30733,
40,
6158,
16289,
30076,
25,
257,
2168,
286,
279,
782,
3696,
25840,
422,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
588,
657,
13,
11134,
11,
352,
13,
11134,
11,
362,
13,
11134,
11,
3503,
13,
198,
198,
2606,
7250,
3843,
25,
281,
15108,
24984,
3706,
705,
11227,
515,
13,
27908,
6,
198,
220,
220,
220,
220,
220,
220,
220,
351,
352,
5739,
583,
792,
290,
15541,
711,
9052,
198,
198,
6369,
2390,
16437,
25,
24457,
5235,
62,
27908,
13,
9078,
198,
198,
51,
3727,
46,
25,
220,
198,
220,
352,
13,
5072,
2393,
12385,
368,
832,
401,
392,
1627,
4578,
198,
220,
362,
13,
1351,
832,
3141,
1627,
4578,
198,
220,
513,
13,
257,
5078,
284,
3613,
14,
1662,
12,
21928,
19898,
2482,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
33918,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
44015,
594,
198,
198,
46700,
1677,
10067,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
198,
4480,
1280,
7,
46700,
1677,
10067,
8,
355,
277,
79,
25,
198,
220,
329,
1627,
287,
277,
79,
25,
198,
220,
220,
220,
1627,
796,
1627,
13,
36311,
3419,
198,
220,
220,
220,
3975,
62,
4868,
796,
33918,
13,
46030,
7,
1370,
8,
628,
220,
220,
220,
299,
796,
18896,
7,
8899,
62,
4868,
8,
198,
220,
220,
220,
4686,
87,
796,
657,
628,
220,
220,
220,
329,
3975,
2539,
287,
3975,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
3601,
705,
8645,
803,
4064,
67,
286,
4064,
67,
39614,
562,
8739,
986,
6,
4064,
357,
312,
87,
10,
16,
11,
299,
8,
198,
220,
220,
220,
220,
220,
28686,
13,
10057,
7,
4458,
14,
19334,
62,
5171,
85,
562,
13,
49,
4064,
82,
4064,
82,
13,
11134,
4064,
67,
4064,
67,
1222,
29,
14,
7959,
14,
8423,
6,
4064,
357,
8899,
2539,
11,
4686,
87,
11,
299,
11,
4686,
87,
4008,
198,
220,
220,
220,
220,
220,
1303,
418,
13,
10057,
7,
4458,
14,
19334,
62,
5171,
85,
562,
13,
49,
4064,
82,
4064,
82,
13,
11134,
4064,
67,
4064,
67,
6,
4064,
357,
8899,
2539,
11,
4686,
87,
11,
299,
11,
4686,
87,
4008,
198,
220,
220,
220,
220,
220,
4686,
87,
15853,
352,
628,
220,
220,
220,
3601,
705,
8645,
803,
15108,
24984,
329,
262,
4064,
67,
39614,
562,
8739,
986,
6,
4064,
299,
198,
220,
220,
220,
28686,
13,
10057,
10786,
1102,
1851,
532,
40850,
1802,
532,
26268,
657,
46866,
11134,
15108,
13,
27908,
11537,
628
] | 2.444231 | 520 |
import sys
import argparse
from transtory.flight import logger, switch_to_test_mode
from transtory.flight import get_public_data_app
from transtory.flight import FlightRecorder, FlightTripStats, FlightPlaneStats
parser = argparse.ArgumentParser(description="Flight database command.")
parser.add_argument("--testmode", action="store_const", const=True, default=False)
parser.add_argument("--record", action="store_const", const=True, default=False)
parser.add_argument("--update", action="store_const", const=True, default=False)
parser.add_argument("--stat", action="store_const", const=True, default=False)
parser.add_argument("--publicdata", action="store_const", const=True, default=False)
args = parser.parse_args(sys.argv[1:])
if args.testmode:
logger.info("Running test mode")
switch_to_test_mode()
if args.record:
pass
recorder = FlightRecorder()
recorder.record_trips_from_json()
save_all_stats()
elif args.update:
# TODO: add update functionality
pass
elif args.stat:
save_all_stats()
elif args.publicdata:
app = get_public_data_app()
app.save_public_data()
else:
logger.info("Flight module did nothing.")
| [
11748,
25064,
198,
11748,
1822,
29572,
198,
198,
6738,
491,
272,
13571,
13,
22560,
1330,
49706,
11,
5078,
62,
1462,
62,
9288,
62,
14171,
198,
6738,
491,
272,
13571,
13,
22560,
1330,
651,
62,
11377,
62,
7890,
62,
1324,
198,
6738,
491,
272,
13571,
13,
22560,
1330,
13365,
6690,
2875,
11,
13365,
51,
5528,
29668,
11,
13365,
3646,
1531,
29668,
628,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
2625,
43069,
6831,
3141,
19570,
198,
48610,
13,
2860,
62,
49140,
7203,
438,
9288,
14171,
1600,
2223,
2625,
8095,
62,
9979,
1600,
1500,
28,
17821,
11,
4277,
28,
25101,
8,
198,
48610,
13,
2860,
62,
49140,
7203,
438,
22105,
1600,
2223,
2625,
8095,
62,
9979,
1600,
1500,
28,
17821,
11,
4277,
28,
25101,
8,
198,
48610,
13,
2860,
62,
49140,
7203,
438,
19119,
1600,
2223,
2625,
8095,
62,
9979,
1600,
1500,
28,
17821,
11,
4277,
28,
25101,
8,
198,
48610,
13,
2860,
62,
49140,
7203,
438,
14269,
1600,
2223,
2625,
8095,
62,
9979,
1600,
1500,
28,
17821,
11,
4277,
28,
25101,
8,
198,
48610,
13,
2860,
62,
49140,
7203,
438,
11377,
7890,
1600,
2223,
2625,
8095,
62,
9979,
1600,
1500,
28,
17821,
11,
4277,
28,
25101,
8,
198,
22046,
796,
30751,
13,
29572,
62,
22046,
7,
17597,
13,
853,
85,
58,
16,
25,
12962,
198,
198,
361,
26498,
13,
9288,
14171,
25,
198,
220,
220,
220,
49706,
13,
10951,
7203,
28768,
1332,
4235,
4943,
198,
220,
220,
220,
5078,
62,
1462,
62,
9288,
62,
14171,
3419,
198,
198,
361,
26498,
13,
22105,
25,
198,
220,
220,
220,
1208,
198,
220,
220,
220,
38156,
796,
13365,
6690,
2875,
3419,
198,
220,
220,
220,
38156,
13,
22105,
62,
28461,
862,
62,
6738,
62,
17752,
3419,
198,
220,
220,
220,
3613,
62,
439,
62,
34242,
3419,
198,
417,
361,
26498,
13,
19119,
25,
198,
220,
220,
220,
1303,
16926,
46,
25,
751,
4296,
11244,
198,
220,
220,
220,
1208,
198,
417,
361,
26498,
13,
14269,
25,
198,
220,
220,
220,
3613,
62,
439,
62,
34242,
3419,
198,
417,
361,
26498,
13,
11377,
7890,
25,
198,
220,
220,
220,
598,
796,
651,
62,
11377,
62,
7890,
62,
1324,
3419,
198,
220,
220,
220,
598,
13,
21928,
62,
11377,
62,
7890,
3419,
198,
17772,
25,
198,
220,
220,
220,
49706,
13,
10951,
7203,
43069,
8265,
750,
2147,
19570,
198
] | 3.023256 | 387 |
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.select import Select
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
import selenium.webdriver.chrome.service as service
import traceback
import inspect
import time
from postman_tests import PostmanTests
# https://github.com/a85/POSTMan-Chrome-Extension/issues/174
# https://github.com/a85/POSTMan-Chrome-Extension/issues/165
PostmanTestsRequests().run()
| [
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11284,
13,
9019,
1330,
5313,
32103,
21321,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11284,
13,
19738,
1330,
9683,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
2673,
62,
38861,
1330,
7561,
1925,
1299,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
13083,
1330,
26363,
198,
11748,
384,
11925,
1505,
13,
12384,
26230,
13,
46659,
13,
15271,
355,
2139,
198,
11748,
12854,
1891,
220,
220,
220,
220,
220,
198,
11748,
10104,
198,
11748,
640,
198,
6738,
1281,
805,
62,
41989,
1330,
2947,
805,
51,
3558,
628,
628,
220,
220,
220,
1303,
3740,
1378,
12567,
13,
785,
14,
64,
5332,
14,
32782,
5124,
12,
1925,
5998,
12,
11627,
3004,
14,
37165,
14,
22985,
628,
220,
220,
220,
1303,
3740,
1378,
12567,
13,
785,
14,
64,
5332,
14,
32782,
5124,
12,
1925,
5998,
12,
11627,
3004,
14,
37165,
14,
20986,
198,
198,
6307,
805,
51,
3558,
16844,
3558,
22446,
5143,
3419,
198
] | 3.201149 | 174 |
import hugectr
from mpi4py import MPI
solver = hugectr.CreateSolver(max_eval_batches = 1000,
batchsize_eval = 2770,
batchsize = 17548,
lr = 0.0045,
vvgpu = [[0]],
metrics_spec = {hugectr.MetricsType.HitRate: 0.8,
hugectr.MetricsType.AverageLoss:0.0,
hugectr.MetricsType.AUC: 1.0},
repeat_dataset = True)
reader = hugectr.DataReaderParams(data_reader_type = hugectr.DataReaderType_t.Norm,
source = ["./data/ml-20m/train_filelist.txt"],
eval_source = "./data/ml-20m/test_filelist.txt",
check_type = hugectr.Check_t.Non,
num_workers = 10)
optimizer = hugectr.CreateOptimizer(optimizer_type = hugectr.Optimizer_t.Adam,
update_type = hugectr.Update_t.Global,
beta1 = 0.25,
beta2 = 0.5,
epsilon = 0.0000001)
model = hugectr.Model(solver, reader, optimizer)
model.add(hugectr.Input(label_dim = 1, label_name = "label",
dense_dim = 1, dense_name = "dense",
data_reader_sparse_param_array =
[hugectr.DataReaderSparseParam("data", 1, True, 2)]))
model.add(hugectr.SparseEmbedding(embedding_type = hugectr.Embedding_t.DistributedSlotSparseEmbeddingHash,
workspace_size_per_gpu_in_mb = 20,
embedding_vec_size = 16,
combiner = "sum",
sparse_embedding_name = "gmf_embedding",
bottom_name = "data",
optimizer = optimizer))
model.add(hugectr.DenseLayer(layer_type = hugectr.Layer_t.Reshape,
bottom_names = ["gmf_embedding"],
top_names = ["reshape1"],
leading_dim=32))
model.add(hugectr.DenseLayer(layer_type = hugectr.Layer_t.Slice,
bottom_names = ["reshape1"],
top_names = ["user", "item"],
ranges=[(0,15),(16,31)]))
model.add(hugectr.DenseLayer(layer_type = hugectr.Layer_t.ElementwiseMultiply,
bottom_names = ["user", "item"],
top_names = ["multiply1"]))
model.add(hugectr.DenseLayer(layer_type = hugectr.Layer_t.InnerProduct,
bottom_names = ["multiply1"],
top_names = ["gmf_out"],
num_output=1))
model.add(hugectr.DenseLayer(layer_type = hugectr.Layer_t.BinaryCrossEntropyLoss,
bottom_names = ["gmf_out", "label"],
top_names = ["loss"]))
model.graph_to_json("/onnx_converter/graph_files/gmf.json")
model.compile()
model.summary()
model.fit(max_iter = 2100, display = 200, eval_interval = 1000, snapshot = 2000, snapshot_prefix = "/onnx_converter/hugectr_models//gmf")
| [
11748,
3236,
24087,
198,
6738,
285,
14415,
19,
9078,
1330,
4904,
40,
198,
82,
14375,
796,
3236,
24087,
13,
16447,
50,
14375,
7,
9806,
62,
18206,
62,
8664,
2052,
796,
8576,
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,
15458,
7857,
62,
18206,
796,
2681,
2154,
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,
15458,
7857,
796,
19038,
2780,
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,
300,
81,
796,
657,
13,
405,
2231,
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,
410,
45119,
19944,
796,
16410,
15,
60,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
20731,
62,
16684,
796,
1391,
40878,
24087,
13,
9171,
10466,
6030,
13,
17889,
32184,
25,
657,
13,
23,
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,
3236,
24087,
13,
9171,
10466,
6030,
13,
26287,
43,
793,
25,
15,
13,
15,
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,
3236,
24087,
13,
9171,
10466,
6030,
13,
32,
9598,
25,
352,
13,
15,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9585,
62,
19608,
292,
316,
796,
6407,
8,
198,
46862,
796,
3236,
24087,
13,
6601,
33634,
10044,
4105,
7,
7890,
62,
46862,
62,
4906,
796,
3236,
24087,
13,
6601,
33634,
6030,
62,
83,
13,
35393,
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,
2723,
796,
685,
1911,
14,
7890,
14,
4029,
12,
1238,
76,
14,
27432,
62,
7753,
4868,
13,
14116,
33116,
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,
5418,
62,
10459,
796,
366,
19571,
7890,
14,
4029,
12,
1238,
76,
14,
9288,
62,
7753,
4868,
13,
14116,
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,
2198,
62,
4906,
796,
3236,
24087,
13,
9787,
62,
83,
13,
15419,
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,
997,
62,
22896,
796,
838,
8,
198,
40085,
7509,
796,
3236,
24087,
13,
16447,
27871,
320,
7509,
7,
40085,
7509,
62,
4906,
796,
3236,
24087,
13,
27871,
320,
7509,
62,
83,
13,
23159,
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,
4296,
62,
4906,
796,
3236,
24087,
13,
10260,
62,
83,
13,
22289,
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,
12159,
16,
796,
657,
13,
1495,
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,
12159,
17,
796,
657,
13,
20,
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,
304,
862,
33576,
796,
657,
13,
2388,
8298,
8,
198,
19849,
796,
3236,
24087,
13,
17633,
7,
82,
14375,
11,
9173,
11,
6436,
7509,
8,
198,
19849,
13,
2860,
7,
40878,
24087,
13,
20560,
7,
18242,
62,
27740,
796,
352,
11,
6167,
62,
3672,
796,
366,
18242,
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,
15715,
62,
27740,
796,
352,
11,
15715,
62,
3672,
796,
366,
67,
1072,
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,
1366,
62,
46862,
62,
82,
29572,
62,
17143,
62,
18747,
796,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
40878,
24087,
13,
6601,
33634,
50,
29572,
22973,
7203,
7890,
1600,
352,
11,
6407,
11,
362,
15437,
4008,
198,
19849,
13,
2860,
7,
40878,
24087,
13,
50,
29572,
31567,
6048,
278,
7,
20521,
12083,
62,
4906,
796,
3236,
24087,
13,
31567,
6048,
278,
62,
83,
13,
20344,
6169,
38963,
50,
29572,
31567,
6048,
278,
26257,
11,
220,
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,
44573,
62,
7857,
62,
525,
62,
46999,
62,
259,
62,
2022,
796,
1160,
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,
11525,
12083,
62,
35138,
62,
7857,
796,
1467,
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,
1974,
7274,
796,
366,
16345,
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,
29877,
62,
20521,
12083,
62,
3672,
796,
366,
39870,
69,
62,
20521,
12083,
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,
4220,
62,
3672,
796,
366,
7890,
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,
6436,
7509,
796,
6436,
7509,
4008,
198,
19849,
13,
2860,
7,
40878,
24087,
13,
35,
1072,
49925,
7,
29289,
62,
4906,
796,
3236,
24087,
13,
49925,
62,
83,
13,
4965,
71,
1758,
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,
4220,
62,
14933,
796,
14631,
39870,
69,
62,
20521,
12083,
33116,
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,
1353,
62,
14933,
796,
14631,
3447,
1758,
16,
33116,
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,
3756,
62,
27740,
28,
2624,
4008,
198,
19849,
13,
2860,
7,
40878,
24087,
13,
35,
1072,
49925,
7,
29289,
62,
4906,
796,
3236,
24087,
13,
49925,
62,
83,
13,
11122,
501,
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,
4220,
62,
14933,
796,
14631,
3447,
1758,
16,
33116,
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,
1353,
62,
14933,
796,
14631,
7220,
1600,
366,
9186,
33116,
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,
16069,
41888,
7,
15,
11,
1314,
828,
7,
1433,
11,
3132,
15437,
4008,
198,
19849,
13,
2860,
7,
40878,
24087,
13,
35,
1072,
49925,
7,
29289,
62,
4906,
796,
3236,
24087,
13,
49925,
62,
83,
13,
20180,
3083,
15205,
541,
306,
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,
4220,
62,
14933,
796,
14631,
7220,
1600,
366,
9186,
33116,
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,
1353,
62,
14933,
796,
14631,
16680,
541,
306,
16,
8973,
4008,
198,
19849,
13,
2860,
7,
40878,
24087,
13,
35,
1072,
49925,
7,
29289,
62,
4906,
796,
3236,
24087,
13,
49925,
62,
83,
13,
818,
1008,
15667,
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,
4220,
62,
14933,
796,
14631,
16680,
541,
306,
16,
33116,
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,
1353,
62,
14933,
796,
14631,
39870,
69,
62,
448,
33116,
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,
997,
62,
22915,
28,
16,
4008,
198,
19849,
13,
2860,
7,
40878,
24087,
13,
35,
1072,
49925,
7,
29289,
62,
4906,
796,
3236,
24087,
13,
49925,
62,
83,
13,
33,
3219,
21544,
14539,
28338,
43,
793,
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,
4220,
62,
14933,
796,
14631,
39870,
69,
62,
448,
1600,
366,
18242,
33116,
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,
1353,
62,
14933,
796,
14631,
22462,
8973,
4008,
198,
19849,
13,
34960,
62,
1462,
62,
17752,
7203,
14,
261,
77,
87,
62,
1102,
332,
353,
14,
34960,
62,
16624,
14,
39870,
69,
13,
17752,
4943,
220,
198,
19849,
13,
5589,
576,
3419,
198,
19849,
13,
49736,
3419,
198,
19849,
13,
11147,
7,
9806,
62,
2676,
796,
38123,
11,
3359,
796,
939,
11,
5418,
62,
3849,
2100,
796,
8576,
11,
27479,
796,
4751,
11,
27479,
62,
40290,
796,
12813,
261,
77,
87,
62,
1102,
332,
353,
14,
40878,
24087,
62,
27530,
1003,
39870,
69,
4943,
198
] | 1.694785 | 1,956 |
from django.conf.urls import patterns, url, include
from dajaxice.core import dajaxice_autodiscover, dajaxice_config
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
dajaxice_autodiscover()
urlpatterns = patterns('',
url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
url(r'^$', 'Brownian.view.views.query', name='query'),
url(r'^notices/$', 'Brownian.view.views.alerts', name='alerts'),
url(r'^health/$', 'Brownian.view.views.health', name='health'),
)
urlpatterns += staticfiles_urlpatterns() | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
19016,
11,
2291,
198,
6738,
288,
1228,
897,
501,
13,
7295,
1330,
288,
1228,
897,
501,
62,
2306,
375,
29392,
11,
288,
1228,
897,
501,
62,
11250,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
12708,
16624,
13,
6371,
82,
1330,
9037,
16624,
62,
6371,
33279,
82,
198,
198,
67,
1228,
897,
501,
62,
2306,
375,
29392,
3419,
198,
198,
6371,
33279,
82,
796,
7572,
10786,
3256,
198,
220,
220,
220,
19016,
7,
67,
1228,
897,
501,
62,
11250,
13,
67,
1228,
897,
501,
62,
6371,
11,
2291,
10786,
67,
1228,
897,
501,
13,
6371,
82,
11537,
828,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
3,
3256,
705,
20644,
666,
13,
1177,
13,
33571,
13,
22766,
3256,
1438,
11639,
22766,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
1662,
1063,
32624,
3256,
705,
20644,
666,
13,
1177,
13,
33571,
13,
44598,
82,
3256,
1438,
11639,
44598,
82,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
13948,
32624,
3256,
705,
20644,
666,
13,
1177,
13,
33571,
13,
13948,
3256,
1438,
11639,
13948,
33809,
198,
8,
198,
198,
6371,
33279,
82,
15853,
9037,
16624,
62,
6371,
33279,
82,
3419
] | 2.656863 | 204 |
#!/usr/bin/env python
# coding:utf-8
from gevent import monkey
monkey.patch_all()
from gevent.pool import Pool
from app.libs.PyMysqlPool import PyMysqlPool
from app.script.config import *
import pymysql
import time
from bs4 import BeautifulSoup
import re
thread_number = 40
pool = Pool(size=thread_number)
netflix_pool = PyMysqlPool(netflix_config, initial_size=1, max_size=thread_number * 2)
if __name__ == '__main__':
parse_main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
40477,
12,
23,
198,
6738,
4903,
1151,
1330,
21657,
198,
198,
49572,
13,
17147,
62,
439,
3419,
198,
198,
6738,
4903,
1151,
13,
7742,
1330,
19850,
198,
6738,
598,
13,
8019,
82,
13,
20519,
44,
893,
13976,
27201,
1330,
9485,
44,
893,
13976,
27201,
198,
6738,
598,
13,
12048,
13,
11250,
1330,
1635,
198,
11748,
279,
4948,
893,
13976,
198,
11748,
640,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
302,
198,
198,
16663,
62,
17618,
796,
2319,
198,
7742,
796,
19850,
7,
7857,
28,
16663,
62,
17618,
8,
198,
198,
36977,
62,
7742,
796,
9485,
44,
893,
13976,
27201,
7,
36977,
62,
11250,
11,
4238,
62,
7857,
28,
16,
11,
3509,
62,
7857,
28,
16663,
62,
17618,
1635,
362,
8,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
21136,
62,
12417,
3419,
198
] | 2.805031 | 159 |
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
description = "reconstruct the shape of a 2D point cloud."
setup(name="alpha_shapes",
description=description,
author="Panagiotis Zestanakis",
author_email="[email protected]",
packages=find_packages(),
version='0.0.1',
install_requires=['numpy',
'shapely',
'matplotlib'],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
],
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/panosz/alpha_shapes",
python_requires='>=3.7',
)
| [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
11213,
796,
366,
260,
41571,
262,
5485,
286,
257,
362,
35,
966,
6279,
526,
198,
198,
40406,
7,
3672,
2625,
26591,
62,
1477,
7916,
1600,
198,
220,
220,
220,
220,
220,
6764,
28,
11213,
11,
198,
220,
220,
220,
220,
220,
1772,
2625,
15730,
363,
5151,
271,
1168,
395,
272,
27321,
1600,
198,
220,
220,
220,
220,
220,
1772,
62,
12888,
2625,
6839,
418,
89,
31,
14816,
13,
785,
1600,
198,
220,
220,
220,
220,
220,
10392,
28,
19796,
62,
43789,
22784,
198,
220,
220,
220,
220,
220,
2196,
11639,
15,
13,
15,
13,
16,
3256,
198,
220,
220,
220,
220,
220,
2721,
62,
47911,
28,
17816,
77,
32152,
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,
705,
43358,
306,
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,
705,
6759,
29487,
8019,
6,
4357,
198,
220,
220,
220,
220,
220,
1398,
13350,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15167,
2229,
15417,
7904,
11361,
7904,
513,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
34156,
7904,
7294,
40,
20010,
1079,
7904,
17168,
13789,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
18843,
803,
4482,
7904,
7294,
13362,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
41206,
12678,
7904,
513,
532,
12995,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5317,
1631,
7591,
1240,
7904,
5800,
14,
25104,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
33221,
7904,
22060,
14,
13798,
1586,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
33221,
7904,
22060,
14,
13798,
1586,
7904,
6188,
14691,
1600,
198,
220,
220,
220,
220,
220,
16589,
198,
220,
220,
220,
220,
220,
890,
62,
11213,
28,
6511,
62,
11213,
11,
198,
220,
220,
220,
220,
220,
890,
62,
11213,
62,
11299,
62,
4906,
2625,
5239,
14,
4102,
2902,
1600,
198,
220,
220,
220,
220,
220,
19016,
2625,
5450,
1378,
12567,
13,
785,
14,
6839,
418,
89,
14,
26591,
62,
1477,
7916,
1600,
198,
220,
220,
220,
220,
220,
21015,
62,
47911,
11639,
29,
28,
18,
13,
22,
3256,
198,
220,
220,
220,
220,
220,
1267,
198
] | 2.367347 | 441 |
from lxml import etree
import glob
from collections import defaultdict, Counter
import json
def get_entries(xmlfile):
"Get entries from an XML file."
root = etree.parse(xmlfile)
return root.xpath('//entry')
def count_templates(filename):
"Count the templates for each predicate in a file."
template_counter = defaultdict(list)
entries = get_entries(filename)
for entry in entries:
otriples = entry.xpath('./originaltripleset/otriple')
assert len(otriples) == 1 # check to make sure we don't miss anything.
otriple = otriples[0]
predicate = otriple.text.split(' | ')[1]
templates = [template.text for template in entry.xpath('.//template')]
template_counter[predicate].extend(templates)
return template_counter
def gather_all(xmlfiles):
"Gather all templates in one index."
main_index = defaultdict(list)
for filename in xmlfiles:
result = count_templates(filename)
for predicate, templates in result.items():
main_index[predicate].extend(templates)
return main_index
def compute_ratios(index):
"Compute ratio of unique templates to total templates."
rows = []
for predicate, templates in index.items():
unique_templates = len(set(templates))
all_templates = len(templates)
ratio = unique_templates/all_templates
row = [predicate, unique_templates, all_templates, f"{ratio:.2f}"]
rows.append(row)
rows = sorted(rows, key=lambda row:row[-1], reverse=True)
return rows
def select_ratios(rows, max_per_category, add_last):
"Select rows with ratios along the entire range of ratios."
selection = []
last = None
for row in rows:
ratio = row[-1]
relevant_digit = ratio[-2]
if relevant_digit != last:
selection.append(row)
count = 1
last = relevant_digit
elif count < max_per_category:
selection.append(row)
count += 1
if add_last:
selection.append(rows[-1])
return selection
def make_latex(table):
"""
Quick and dirty LaTeX solution to generate the contents of a table.
"""
lines = [' & '.join(map(str,row))+'\\\\' for row in table]
table = '\n'.join(lines)
print(table)
if __name__=="__main__":
xmlfiles = glob.glob('./webnlg-master/final/en/train/1triples/*.xml')
index = gather_all(xmlfiles)
ratios = compute_ratios(index)
selected_ratios = select_ratios(ratios, max_per_category=2, add_last=True)
make_latex(selected_ratios)
| [
6738,
300,
19875,
1330,
2123,
631,
198,
11748,
15095,
198,
6738,
17268,
1330,
4277,
11600,
11,
15034,
198,
11748,
33918,
628,
198,
4299,
651,
62,
298,
1678,
7,
87,
76,
1652,
576,
2599,
198,
220,
220,
220,
366,
3855,
12784,
422,
281,
23735,
2393,
526,
198,
220,
220,
220,
6808,
796,
2123,
631,
13,
29572,
7,
87,
76,
1652,
576,
8,
198,
220,
220,
220,
1441,
6808,
13,
87,
6978,
10786,
1003,
13000,
11537,
628,
198,
4299,
954,
62,
11498,
17041,
7,
34345,
2599,
198,
220,
220,
220,
366,
12332,
262,
24019,
329,
1123,
44010,
287,
257,
2393,
526,
198,
220,
220,
220,
11055,
62,
24588,
796,
4277,
11600,
7,
4868,
8,
198,
220,
220,
220,
12784,
796,
651,
62,
298,
1678,
7,
34345,
8,
198,
220,
220,
220,
329,
5726,
287,
12784,
25,
198,
220,
220,
220,
220,
220,
220,
220,
267,
28461,
2374,
796,
5726,
13,
87,
6978,
7,
4458,
14,
14986,
28461,
2374,
316,
14,
313,
380,
1154,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
18896,
7,
313,
380,
2374,
8,
6624,
352,
1303,
2198,
284,
787,
1654,
356,
836,
470,
2051,
1997,
13,
198,
220,
220,
220,
220,
220,
220,
220,
267,
28461,
1154,
796,
267,
28461,
2374,
58,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
44010,
796,
267,
28461,
1154,
13,
5239,
13,
35312,
10786,
930,
705,
38381,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
24019,
796,
685,
28243,
13,
5239,
329,
11055,
287,
5726,
13,
87,
6978,
7,
4458,
1003,
28243,
11537,
60,
198,
220,
220,
220,
220,
220,
220,
220,
11055,
62,
24588,
58,
28764,
5344,
4083,
2302,
437,
7,
11498,
17041,
8,
198,
220,
220,
220,
1441,
11055,
62,
24588,
628,
198,
4299,
6431,
62,
439,
7,
87,
76,
1652,
2915,
2599,
198,
220,
220,
220,
366,
38,
1032,
477,
24019,
287,
530,
6376,
526,
198,
220,
220,
220,
1388,
62,
9630,
796,
4277,
11600,
7,
4868,
8,
198,
220,
220,
220,
329,
29472,
287,
2124,
76,
1652,
2915,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
954,
62,
11498,
17041,
7,
34345,
8,
198,
220,
220,
220,
220,
220,
220,
220,
329,
44010,
11,
24019,
287,
1255,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1388,
62,
9630,
58,
28764,
5344,
4083,
2302,
437,
7,
11498,
17041,
8,
198,
220,
220,
220,
1441,
1388,
62,
9630,
628,
198,
4299,
24061,
62,
10366,
4267,
7,
9630,
2599,
198,
220,
220,
220,
366,
7293,
1133,
8064,
286,
3748,
24019,
284,
2472,
24019,
526,
198,
220,
220,
220,
15274,
796,
17635,
198,
220,
220,
220,
329,
44010,
11,
24019,
287,
6376,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
3748,
62,
11498,
17041,
796,
18896,
7,
2617,
7,
11498,
17041,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
477,
62,
11498,
17041,
796,
18896,
7,
11498,
17041,
8,
198,
220,
220,
220,
220,
220,
220,
220,
8064,
796,
3748,
62,
11498,
17041,
14,
439,
62,
11498,
17041,
198,
220,
220,
220,
220,
220,
220,
220,
5752,
796,
685,
28764,
5344,
11,
3748,
62,
11498,
17041,
11,
477,
62,
11498,
17041,
11,
277,
1,
90,
10366,
952,
25,
13,
17,
69,
92,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
15274,
13,
33295,
7,
808,
8,
198,
220,
220,
220,
15274,
796,
23243,
7,
8516,
11,
1994,
28,
50033,
5752,
25,
808,
58,
12,
16,
4357,
9575,
28,
17821,
8,
198,
220,
220,
220,
1441,
15274,
628,
198,
4299,
2922,
62,
10366,
4267,
7,
8516,
11,
3509,
62,
525,
62,
22872,
11,
751,
62,
12957,
2599,
198,
220,
220,
220,
366,
17563,
15274,
351,
22423,
1863,
262,
2104,
2837,
286,
22423,
526,
198,
220,
220,
220,
6356,
796,
17635,
198,
220,
220,
220,
938,
796,
6045,
198,
220,
220,
220,
329,
5752,
287,
15274,
25,
198,
220,
220,
220,
220,
220,
220,
220,
8064,
796,
5752,
58,
12,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
5981,
62,
27003,
796,
8064,
58,
12,
17,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5981,
62,
27003,
14512,
938,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6356,
13,
33295,
7,
808,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
954,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
938,
796,
5981,
62,
27003,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
954,
1279,
3509,
62,
525,
62,
22872,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6356,
13,
33295,
7,
808,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
954,
15853,
352,
198,
220,
220,
220,
611,
751,
62,
12957,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6356,
13,
33295,
7,
8516,
58,
12,
16,
12962,
198,
220,
220,
220,
1441,
6356,
628,
198,
4299,
787,
62,
17660,
87,
7,
11487,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
12029,
290,
11841,
4689,
49568,
4610,
284,
7716,
262,
10154,
286,
257,
3084,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3951,
796,
37250,
1222,
45302,
22179,
7,
8899,
7,
2536,
11,
808,
4008,
10,
6,
13426,
6,
329,
5752,
287,
3084,
60,
198,
220,
220,
220,
3084,
796,
705,
59,
77,
4458,
22179,
7,
6615,
8,
198,
220,
220,
220,
3601,
7,
11487,
8,
628,
198,
361,
11593,
3672,
834,
855,
1,
834,
12417,
834,
1298,
198,
220,
220,
220,
2124,
76,
1652,
2915,
796,
15095,
13,
4743,
672,
7,
4458,
14,
732,
9374,
75,
70,
12,
9866,
14,
20311,
14,
268,
14,
27432,
14,
16,
28461,
2374,
15211,
13,
19875,
11537,
198,
220,
220,
220,
6376,
796,
6431,
62,
439,
7,
87,
76,
1652,
2915,
8,
198,
220,
220,
220,
22423,
796,
24061,
62,
10366,
4267,
7,
9630,
8,
198,
220,
220,
220,
6163,
62,
10366,
4267,
796,
2922,
62,
10366,
4267,
7,
10366,
4267,
11,
3509,
62,
525,
62,
22872,
28,
17,
11,
751,
62,
12957,
28,
17821,
8,
198,
220,
220,
220,
787,
62,
17660,
87,
7,
34213,
62,
10366,
4267,
8,
198
] | 2.507752 | 1,032 |
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Rate
from car.tests.test_cars_api import sample_car
RATE_URL = reverse('car:rate-list')
class PublicRateApiTests(TestCase):
"""Test the publicly available rate API"""
def test_create_rate_successful(self):
"""Test a new rate creation successful"""
payload = {"car": sample_car(), "rate": 4}
self.client.post(RATE_URL, payload)
exists = Rate.objects.filter(
car=payload['car']
).exists
self.assertTrue(exists)
def test_create_rate_invalid(self):
"""Test a new rate creation failed"""
payload = {"car": None, "rate": 4}
res = self.client.post(RATE_URL, payload)
self.assertEqual(res.status_code, status.HTTP_400_BAD_REQUEST)
def test_rate_value_validation(self):
"""Test validation rate is between 1-5"""
payload = {
"car": sample_car(),
"rate": 7
}
res = self.client.post(RATE_URL, payload)
self.assertEqual(res.status_code, status.HTTP_400_BAD_REQUEST) | [
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
198,
6738,
1334,
62,
30604,
1330,
3722,
198,
6738,
1334,
62,
30604,
13,
9288,
1330,
3486,
2149,
75,
1153,
198,
198,
6738,
4755,
13,
27530,
1330,
14806,
198,
198,
6738,
1097,
13,
41989,
13,
9288,
62,
37993,
62,
15042,
1330,
6291,
62,
7718,
198,
198,
49,
6158,
62,
21886,
796,
9575,
10786,
7718,
25,
4873,
12,
4868,
11537,
628,
198,
4871,
5094,
32184,
32,
14415,
51,
3558,
7,
14402,
20448,
2599,
198,
220,
220,
220,
37227,
14402,
262,
7271,
1695,
2494,
7824,
37811,
628,
220,
220,
220,
825,
1332,
62,
17953,
62,
4873,
62,
17212,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
14402,
257,
649,
2494,
6282,
4388,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
21437,
796,
19779,
7718,
1298,
6291,
62,
7718,
22784,
366,
4873,
1298,
604,
92,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
16366,
13,
7353,
7,
49,
6158,
62,
21886,
11,
21437,
8,
628,
220,
220,
220,
220,
220,
220,
220,
7160,
796,
14806,
13,
48205,
13,
24455,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1097,
28,
15577,
2220,
17816,
7718,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
6739,
1069,
1023,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
17821,
7,
1069,
1023,
8,
628,
220,
220,
220,
825,
1332,
62,
17953,
62,
4873,
62,
259,
12102,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
14402,
257,
649,
2494,
6282,
4054,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
21437,
796,
19779,
7718,
1298,
6045,
11,
366,
4873,
1298,
604,
92,
628,
220,
220,
220,
220,
220,
220,
220,
581,
796,
2116,
13,
16366,
13,
7353,
7,
49,
6158,
62,
21886,
11,
21437,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
411,
13,
13376,
62,
8189,
11,
3722,
13,
40717,
62,
7029,
62,
33,
2885,
62,
2200,
35780,
8,
628,
220,
220,
220,
825,
1332,
62,
4873,
62,
8367,
62,
12102,
341,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
14402,
21201,
2494,
318,
1022,
352,
12,
20,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
21437,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7718,
1298,
6291,
62,
7718,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
4873,
1298,
767,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
220,
220,
220,
220,
581,
796,
2116,
13,
16366,
13,
7353,
7,
49,
6158,
62,
21886,
11,
21437,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
411,
13,
13376,
62,
8189,
11,
3722,
13,
40717,
62,
7029,
62,
33,
2885,
62,
2200,
35780,
8
] | 2.467213 | 488 |
# Copyright 2012 Google Inc. All Rights Reserved.
"""Project representation.
A project is a module (or set of modules) that provides a namespace of rules.
Rules may refer to each other and will be resolved in the project namespace.
"""
__author__ = '[email protected] (Ben Vanik)'
import base64
import os
import pickle
import re
import stat
import string
from anvil.module import ModuleLoader
from anvil.rule import RuleNamespace
import anvil.util
class Project(object):
"""Project type that contains rules.
Projects, once constructed, are designed to be immutable. Many duplicate
build processes may run over the same project instance and all expect it to
be in the state it was when first created.
"""
def __init__(self, name='Project', rule_namespace=None, module_resolver=None,
modules=None):
"""Initializes an empty project.
Args:
name: A human-readable name for the project that will be used for
logging.
rule_namespace: Rule namespace to use when loading modules. If omitted a
default one is used.
module_resolver: A module resolver to use when attempt to dynamically
resolve modules by path.
modules: A list of modules to add to the project.
Raises:
NameError: The name given is not valid.
"""
self.name = name
if rule_namespace:
self.rule_namespace = rule_namespace
else:
self.rule_namespace = RuleNamespace()
self.rule_namespace.discover()
if module_resolver:
self.module_resolver = module_resolver
else:
self.module_resolver = StaticModuleResolver()
self.modules = {}
if modules and len(modules):
self.add_modules(modules)
def add_module(self, module):
"""Adds a module to the project.
Args:
module: A module to add.
Raises:
KeyError: A module with the given name already exists in the project.
"""
self.add_modules([module])
def add_modules(self, modules):
"""Adds a list of modules to the project.
Args:
modules: A list of modules to add.
Raises:
KeyError: A module with the given name already exists in the project.
"""
for module in modules:
if self.modules.get(module.path, None):
raise KeyError('A module with the path "%s" is already defined' % (
module.path))
for module in modules:
self.modules[module.path] = module
def get_module(self, module_path):
"""Gets a module by path.
Args:
module_path: Name of the module to find.
Returns:
The module with the given path or None if it was not found.
"""
return self.modules.get(module_path, None)
def module_list(self):
"""Gets a list of all modules in the project.
Returns:
A list of all modules.
"""
return self.modules.values()
def module_iter(self):
"""Iterates over all modules in the project."""
for module_path in self.modules:
yield self.modules[module_path]
def resolve_rule(self, rule_path, requesting_module=None):
"""Gets a rule by path, supporting module lookup and dynamic loading.
Args:
rule_path: Path of the rule to find. Must include a semicolon.
requesting_module: The module that is requesting the given rule. If not
provided then no local rule paths (':foo') or relative paths are
allowed.
Returns:
The rule with the given name or None if it was not found.
Raises:
NameError: The given rule name was not valid.
KeyError: The given rule was not found.
IOError: Unable to load referenced module.
"""
if not anvil.util.is_rule_path(rule_path):
raise NameError('The rule path "%s" is missing a semicolon' % (rule_path))
(module_path, rule_name) = string.rsplit(rule_path, ':', 1)
if self.module_resolver.can_resolve_local:
if not len(module_path) and not requesting_module:
module_path = '.'
if not len(module_path) and not requesting_module:
raise KeyError('Local rule "%s" given when no resolver defined' % (
rule_path))
module = requesting_module
if len(module_path):
requesting_path = None
if requesting_module:
requesting_path = os.path.dirname(requesting_module.path)
full_path = self.module_resolver.resolve_module_path(
module_path, requesting_path)
module = self.modules.get(full_path, None)
if not module:
# Module not yet loaded - need to grab it
module = self.module_resolver.load_module(
full_path, self.rule_namespace)
if module:
self.add_module(module)
else:
raise IOError('Module "%s" not found', module_path)
return module.get_rule(rule_name)
class ModuleResolver(object):
"""A type to use for resolving modules.
This is used to get a module when a project tries to resolve a rule in a
module that has not yet been loaded.
"""
def __init__(self, *args, **kwargs):
"""Initializes a module resolver."""
self.can_resolve_local = False
def resolve_module_path(self, path, working_path=None):
"""Resolves a module path to its full, absolute path.
This is used by the project system to disambugate modules and check the
cache before actually performing a load.
The path returned from this will be passed to load_module.
Args:
path: Path of the module (may be relative/etc).
working_path: Path relative paths should be pased off of. If not provided
then relative paths may fail.
Returns:
An absolute path that can be used as a cache key and passed to
load_module.
"""
raise NotImplementedError()
def load_module(self, full_path, rule_namespace):
"""Loads a module from the given path.
Args:
full_path: Absolute path of the module as returned by resolve_module_path.
rule_namespace: Rule namespace to use when loading modules.
Returns:
A Module representing the given path or None if it could not be found.
Raises:
IOError: The module could not be found.
"""
raise NotImplementedError()
class StaticModuleResolver(ModuleResolver):
"""A static module resolver that can resolve from a list of modules.
"""
def __init__(self, modules=None, *args, **kwargs):
"""Initializes a static module resolver.
Args:
modules: A list of modules that can be resolved.
"""
super(StaticModuleResolver, self).__init__(*args, **kwargs)
self.modules = {}
if modules:
for module in modules:
self.modules[os.path.normpath(module.path)] = module
class FileModuleResolver(ModuleResolver):
"""A file-system backed module resolver.
Rules are searched for with relative paths from a defined root path.
If the module path given is a directory, the resolver will attempt to load
a BUILD file from that directory - otherwise the file specified will be
treated as the module.
"""
def __init__(self, root_path, *args, **kwargs):
"""Initializes a file-system module resolver.
Args:
root_path: Root filesystem path to treat as the base for all resolutions.
Raises:
IOError: The given root path is not found or is not a directory.
"""
super(FileModuleResolver, self).__init__(*args, **kwargs)
self.can_resolve_local = True
self.root_path = os.path.normpath(root_path)
if not os.path.isdir(self.root_path):
raise IOError('Root path "%s" not found' % (self.root_path))
| [
2,
15069,
2321,
3012,
3457,
13,
1439,
6923,
33876,
13,
198,
198,
37811,
16775,
10552,
13,
198,
198,
32,
1628,
318,
257,
8265,
357,
273,
900,
286,
13103,
8,
326,
3769,
257,
25745,
286,
3173,
13,
198,
37766,
743,
3522,
284,
1123,
584,
290,
481,
307,
12939,
287,
262,
1628,
25745,
13,
198,
37811,
198,
198,
834,
9800,
834,
796,
705,
11722,
10438,
1134,
31,
13297,
13,
785,
357,
11696,
6656,
1134,
33047,
628,
198,
11748,
2779,
2414,
198,
11748,
28686,
198,
11748,
2298,
293,
198,
11748,
302,
198,
11748,
1185,
198,
11748,
4731,
198,
198,
6738,
281,
2991,
13,
21412,
1330,
19937,
17401,
198,
6738,
281,
2991,
13,
25135,
1330,
14330,
36690,
10223,
198,
11748,
281,
2991,
13,
22602,
628,
198,
4871,
4935,
7,
15252,
2599,
198,
220,
37227,
16775,
2099,
326,
4909,
3173,
13,
198,
220,
29898,
11,
1752,
12006,
11,
389,
3562,
284,
307,
40139,
13,
4650,
23418,
198,
220,
1382,
7767,
743,
1057,
625,
262,
976,
1628,
4554,
290,
477,
1607,
340,
284,
198,
220,
307,
287,
262,
1181,
340,
373,
618,
717,
2727,
13,
198,
220,
37227,
628,
220,
825,
11593,
15003,
834,
7,
944,
11,
1438,
11639,
16775,
3256,
3896,
62,
14933,
10223,
28,
14202,
11,
8265,
62,
411,
14375,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13103,
28,
14202,
2599,
198,
220,
220,
220,
37227,
24243,
4340,
281,
6565,
1628,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
1438,
25,
317,
1692,
12,
46155,
1438,
329,
262,
1628,
326,
481,
307,
973,
329,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
198,
220,
220,
220,
220,
220,
3896,
62,
14933,
10223,
25,
14330,
25745,
284,
779,
618,
11046,
13103,
13,
1002,
22532,
257,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4277,
530,
318,
973,
13,
198,
220,
220,
220,
220,
220,
8265,
62,
411,
14375,
25,
317,
8265,
581,
14375,
284,
779,
618,
2230,
284,
32366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10568,
13103,
416,
3108,
13,
198,
220,
220,
220,
220,
220,
13103,
25,
317,
1351,
286,
13103,
284,
751,
284,
262,
1628,
13,
628,
220,
220,
220,
7567,
2696,
25,
198,
220,
220,
220,
220,
220,
6530,
12331,
25,
383,
1438,
1813,
318,
407,
4938,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2116,
13,
3672,
796,
1438,
628,
220,
220,
220,
611,
3896,
62,
14933,
10223,
25,
198,
220,
220,
220,
220,
220,
2116,
13,
25135,
62,
14933,
10223,
796,
3896,
62,
14933,
10223,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
2116,
13,
25135,
62,
14933,
10223,
796,
14330,
36690,
10223,
3419,
198,
220,
220,
220,
220,
220,
2116,
13,
25135,
62,
14933,
10223,
13,
67,
29392,
3419,
628,
220,
220,
220,
611,
8265,
62,
411,
14375,
25,
198,
220,
220,
220,
220,
220,
2116,
13,
21412,
62,
411,
14375,
796,
8265,
62,
411,
14375,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
2116,
13,
21412,
62,
411,
14375,
796,
36125,
26796,
4965,
14375,
3419,
628,
220,
220,
220,
2116,
13,
18170,
796,
23884,
198,
220,
220,
220,
611,
13103,
290,
18896,
7,
18170,
2599,
198,
220,
220,
220,
220,
220,
2116,
13,
2860,
62,
18170,
7,
18170,
8,
628,
220,
825,
751,
62,
21412,
7,
944,
11,
8265,
2599,
198,
220,
220,
220,
37227,
46245,
257,
8265,
284,
262,
1628,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
8265,
25,
317,
8265,
284,
751,
13,
628,
220,
220,
220,
7567,
2696,
25,
198,
220,
220,
220,
220,
220,
7383,
12331,
25,
317,
8265,
351,
262,
1813,
1438,
1541,
7160,
287,
262,
1628,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2116,
13,
2860,
62,
18170,
26933,
21412,
12962,
628,
220,
825,
751,
62,
18170,
7,
944,
11,
13103,
2599,
198,
220,
220,
220,
37227,
46245,
257,
1351,
286,
13103,
284,
262,
1628,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
13103,
25,
317,
1351,
286,
13103,
284,
751,
13,
628,
220,
220,
220,
7567,
2696,
25,
198,
220,
220,
220,
220,
220,
7383,
12331,
25,
317,
8265,
351,
262,
1813,
1438,
1541,
7160,
287,
262,
1628,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
329,
8265,
287,
13103,
25,
198,
220,
220,
220,
220,
220,
611,
2116,
13,
18170,
13,
1136,
7,
21412,
13,
6978,
11,
6045,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
7383,
12331,
10786,
32,
8265,
351,
262,
3108,
36521,
82,
1,
318,
1541,
5447,
6,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8265,
13,
6978,
4008,
198,
220,
220,
220,
329,
8265,
287,
13103,
25,
198,
220,
220,
220,
220,
220,
2116,
13,
18170,
58,
21412,
13,
6978,
60,
796,
8265,
628,
220,
825,
651,
62,
21412,
7,
944,
11,
8265,
62,
6978,
2599,
198,
220,
220,
220,
37227,
38,
1039,
257,
8265,
416,
3108,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
8265,
62,
6978,
25,
6530,
286,
262,
8265,
284,
1064,
13,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
383,
8265,
351,
262,
1813,
3108,
393,
6045,
611,
340,
373,
407,
1043,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
2116,
13,
18170,
13,
1136,
7,
21412,
62,
6978,
11,
6045,
8,
628,
220,
825,
8265,
62,
4868,
7,
944,
2599,
198,
220,
220,
220,
37227,
38,
1039,
257,
1351,
286,
477,
13103,
287,
262,
1628,
13,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
317,
1351,
286,
477,
13103,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
2116,
13,
18170,
13,
27160,
3419,
628,
220,
825,
8265,
62,
2676,
7,
944,
2599,
198,
220,
220,
220,
37227,
29993,
689,
625,
477,
13103,
287,
262,
1628,
526,
15931,
198,
220,
220,
220,
329,
8265,
62,
6978,
287,
2116,
13,
18170,
25,
198,
220,
220,
220,
220,
220,
7800,
2116,
13,
18170,
58,
21412,
62,
6978,
60,
628,
220,
825,
10568,
62,
25135,
7,
944,
11,
3896,
62,
6978,
11,
20623,
62,
21412,
28,
14202,
2599,
198,
220,
220,
220,
37227,
38,
1039,
257,
3896,
416,
3108,
11,
6493,
8265,
35847,
290,
8925,
11046,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
3896,
62,
6978,
25,
10644,
286,
262,
3896,
284,
1064,
13,
12039,
2291,
257,
5026,
27045,
261,
13,
198,
220,
220,
220,
220,
220,
20623,
62,
21412,
25,
383,
8265,
326,
318,
20623,
262,
1813,
3896,
13,
1002,
407,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2810,
788,
645,
1957,
3896,
13532,
357,
10354,
21943,
11537,
393,
3585,
13532,
389,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3142,
13,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
383,
3896,
351,
262,
1813,
1438,
393,
6045,
611,
340,
373,
407,
1043,
13,
628,
220,
220,
220,
7567,
2696,
25,
198,
220,
220,
220,
220,
220,
6530,
12331,
25,
383,
1813,
3896,
1438,
373,
407,
4938,
13,
198,
220,
220,
220,
220,
220,
7383,
12331,
25,
383,
1813,
3896,
373,
407,
1043,
13,
198,
220,
220,
220,
220,
220,
24418,
12331,
25,
27319,
284,
3440,
20717,
8265,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
407,
281,
2991,
13,
22602,
13,
271,
62,
25135,
62,
6978,
7,
25135,
62,
6978,
2599,
198,
220,
220,
220,
220,
220,
5298,
6530,
12331,
10786,
464,
3896,
3108,
36521,
82,
1,
318,
4814,
257,
5026,
27045,
261,
6,
4064,
357,
25135,
62,
6978,
4008,
198,
220,
220,
220,
357,
21412,
62,
6978,
11,
3896,
62,
3672,
8,
796,
4731,
13,
3808,
489,
270,
7,
25135,
62,
6978,
11,
705,
25,
3256,
352,
8,
198,
220,
220,
220,
611,
2116,
13,
21412,
62,
411,
14375,
13,
5171,
62,
411,
6442,
62,
12001,
25,
198,
220,
220,
220,
220,
220,
611,
407,
18896,
7,
21412,
62,
6978,
8,
290,
407,
20623,
62,
21412,
25,
198,
220,
220,
220,
220,
220,
220,
220,
8265,
62,
6978,
796,
705,
2637,
198,
220,
220,
220,
611,
407,
18896,
7,
21412,
62,
6978,
8,
290,
407,
20623,
62,
21412,
25,
198,
220,
220,
220,
220,
220,
5298,
7383,
12331,
10786,
14565,
3896,
36521,
82,
1,
1813,
618,
645,
581,
14375,
5447,
6,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3896,
62,
6978,
4008,
628,
220,
220,
220,
8265,
796,
20623,
62,
21412,
198,
220,
220,
220,
611,
18896,
7,
21412,
62,
6978,
2599,
198,
220,
220,
220,
220,
220,
20623,
62,
6978,
796,
6045,
198,
220,
220,
220,
220,
220,
611,
20623,
62,
21412,
25,
198,
220,
220,
220,
220,
220,
220,
220,
20623,
62,
6978,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
25927,
278,
62,
21412,
13,
6978,
8,
198,
220,
220,
220,
220,
220,
1336,
62,
6978,
796,
2116,
13,
21412,
62,
411,
14375,
13,
411,
6442,
62,
21412,
62,
6978,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8265,
62,
6978,
11,
20623,
62,
6978,
8,
198,
220,
220,
220,
220,
220,
8265,
796,
2116,
13,
18170,
13,
1136,
7,
12853,
62,
6978,
11,
6045,
8,
198,
220,
220,
220,
220,
220,
611,
407,
8265,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
19937,
407,
1865,
9639,
532,
761,
284,
5552,
340,
198,
220,
220,
220,
220,
220,
220,
220,
8265,
796,
2116,
13,
21412,
62,
411,
14375,
13,
2220,
62,
21412,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1336,
62,
6978,
11,
2116,
13,
25135,
62,
14933,
10223,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
8265,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2860,
62,
21412,
7,
21412,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
24418,
12331,
10786,
26796,
36521,
82,
1,
407,
1043,
3256,
8265,
62,
6978,
8,
628,
220,
220,
220,
1441,
8265,
13,
1136,
62,
25135,
7,
25135,
62,
3672,
8,
628,
198,
4871,
19937,
4965,
14375,
7,
15252,
2599,
198,
220,
37227,
32,
2099,
284,
779,
329,
31038,
13103,
13,
198,
220,
770,
318,
973,
284,
651,
257,
8265,
618,
257,
1628,
8404,
284,
10568,
257,
3896,
287,
257,
198,
220,
8265,
326,
468,
407,
1865,
587,
9639,
13,
198,
220,
37227,
628,
220,
825,
11593,
15003,
834,
7,
944,
11,
1635,
22046,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
24243,
4340,
257,
8265,
581,
14375,
526,
15931,
198,
220,
220,
220,
2116,
13,
5171,
62,
411,
6442,
62,
12001,
796,
10352,
628,
220,
825,
10568,
62,
21412,
62,
6978,
7,
944,
11,
3108,
11,
1762,
62,
6978,
28,
14202,
2599,
198,
220,
220,
220,
37227,
4965,
9010,
257,
8265,
3108,
284,
663,
1336,
11,
4112,
3108,
13,
198,
220,
220,
220,
770,
318,
973,
416,
262,
1628,
1080,
284,
595,
4131,
1018,
378,
13103,
290,
2198,
262,
198,
220,
220,
220,
12940,
878,
1682,
9489,
257,
3440,
13,
198,
220,
220,
220,
383,
3108,
4504,
422,
428,
481,
307,
3804,
284,
3440,
62,
21412,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
3108,
25,
10644,
286,
262,
8265,
357,
11261,
307,
3585,
14,
14784,
737,
198,
220,
220,
220,
220,
220,
1762,
62,
6978,
25,
10644,
3585,
13532,
815,
307,
279,
839,
572,
286,
13,
1002,
407,
2810,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
788,
3585,
13532,
743,
2038,
13,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
1052,
4112,
3108,
326,
460,
307,
973,
355,
257,
12940,
1994,
290,
3804,
284,
198,
220,
220,
220,
220,
220,
3440,
62,
21412,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5298,
1892,
3546,
1154,
12061,
12331,
3419,
628,
220,
825,
3440,
62,
21412,
7,
944,
11,
1336,
62,
6978,
11,
3896,
62,
14933,
10223,
2599,
198,
220,
220,
220,
37227,
8912,
82,
257,
8265,
422,
262,
1813,
3108,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
1336,
62,
6978,
25,
36532,
3108,
286,
262,
8265,
355,
4504,
416,
10568,
62,
21412,
62,
6978,
13,
198,
220,
220,
220,
220,
220,
3896,
62,
14933,
10223,
25,
14330,
25745,
284,
779,
618,
11046,
13103,
13,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
317,
19937,
10200,
262,
1813,
3108,
393,
6045,
611,
340,
714,
407,
307,
1043,
13,
628,
220,
220,
220,
7567,
2696,
25,
198,
220,
220,
220,
220,
220,
24418,
12331,
25,
383,
8265,
714,
407,
307,
1043,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5298,
1892,
3546,
1154,
12061,
12331,
3419,
628,
198,
4871,
36125,
26796,
4965,
14375,
7,
26796,
4965,
14375,
2599,
198,
220,
37227,
32,
9037,
8265,
581,
14375,
326,
460,
10568,
422,
257,
1351,
286,
13103,
13,
198,
220,
37227,
628,
220,
825,
11593,
15003,
834,
7,
944,
11,
13103,
28,
14202,
11,
1635,
22046,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
24243,
4340,
257,
9037,
8265,
581,
14375,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
13103,
25,
317,
1351,
286,
13103,
326,
460,
307,
12939,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2208,
7,
45442,
26796,
4965,
14375,
11,
2116,
737,
834,
15003,
834,
46491,
22046,
11,
12429,
46265,
22046,
8,
628,
220,
220,
220,
2116,
13,
18170,
796,
23884,
198,
220,
220,
220,
611,
13103,
25,
198,
220,
220,
220,
220,
220,
329,
8265,
287,
13103,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
18170,
58,
418,
13,
6978,
13,
27237,
6978,
7,
21412,
13,
6978,
15437,
796,
8265,
628,
198,
4871,
9220,
26796,
4965,
14375,
7,
26796,
4965,
14375,
2599,
198,
220,
37227,
32,
2393,
12,
10057,
9763,
8265,
581,
14375,
13,
628,
220,
14252,
389,
16499,
329,
351,
3585,
13532,
422,
257,
5447,
6808,
3108,
13,
198,
220,
1002,
262,
8265,
3108,
1813,
318,
257,
8619,
11,
262,
581,
14375,
481,
2230,
284,
3440,
198,
220,
257,
20571,
26761,
2393,
422,
326,
8619,
532,
4306,
262,
2393,
7368,
481,
307,
198,
220,
5716,
355,
262,
8265,
13,
198,
220,
37227,
628,
220,
825,
11593,
15003,
834,
7,
944,
11,
6808,
62,
6978,
11,
1635,
22046,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
24243,
4340,
257,
2393,
12,
10057,
8265,
581,
14375,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
6808,
62,
6978,
25,
20410,
29905,
3108,
284,
2190,
355,
262,
2779,
329,
477,
21811,
13,
628,
220,
220,
220,
7567,
2696,
25,
198,
220,
220,
220,
220,
220,
24418,
12331,
25,
383,
1813,
6808,
3108,
318,
407,
1043,
393,
318,
407,
257,
8619,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2208,
7,
8979,
26796,
4965,
14375,
11,
2116,
737,
834,
15003,
834,
46491,
22046,
11,
12429,
46265,
22046,
8,
628,
220,
220,
220,
2116,
13,
5171,
62,
411,
6442,
62,
12001,
796,
6407,
628,
220,
220,
220,
2116,
13,
15763,
62,
6978,
796,
28686,
13,
6978,
13,
27237,
6978,
7,
15763,
62,
6978,
8,
198,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
9409,
343,
7,
944,
13,
15763,
62,
6978,
2599,
198,
220,
220,
220,
220,
220,
5298,
24418,
12331,
10786,
30016,
3108,
36521,
82,
1,
407,
1043,
6,
4064,
357,
944,
13,
15763,
62,
6978,
4008,
198
] | 2.885736 | 2,608 |
from talon import Module, ui, registry, skia, actions, cron
from talon.canvas import Canvas
import re
import webbrowser
import math
mod = Module()
mod.mode("cursorless_cheat_sheet", "Mode for showing cursorless cheat sheet gui")
cheat_sheet = None
instructions_url = "https://github.com/pokey/cursorless-talon/tree/master/docs"
instructions_text = "Full docs"
line_height = 34
outer_padding = 27
text_size = 16
url_text_size = 30
close_size = 24
header_size = 22
padding = 4
command_font = "monospace"
text_font = ""
background_color = "fafafa"
border_color = "000000"
text_color = "444444"
header_color = "000000"
command_background_color = "e9e9e9"
command_text_color = "282828"
url_color = "0046c9"
@mod.action_class
| [
6738,
3305,
261,
1330,
19937,
11,
334,
72,
11,
20478,
11,
1341,
544,
11,
4028,
11,
1067,
261,
198,
6738,
3305,
261,
13,
5171,
11017,
1330,
1680,
11017,
198,
11748,
302,
198,
11748,
3992,
40259,
198,
11748,
10688,
198,
198,
4666,
796,
19937,
3419,
198,
4666,
13,
14171,
7203,
66,
21471,
1203,
62,
46799,
62,
21760,
1600,
366,
19076,
329,
4478,
23493,
1203,
22705,
9629,
11774,
4943,
198,
46799,
62,
21760,
796,
6045,
198,
198,
259,
7249,
507,
62,
6371,
796,
366,
5450,
1378,
12567,
13,
785,
14,
35924,
88,
14,
66,
21471,
1203,
12,
39240,
261,
14,
21048,
14,
9866,
14,
31628,
1,
198,
259,
7249,
507,
62,
5239,
796,
366,
13295,
34165,
1,
198,
1370,
62,
17015,
796,
4974,
198,
39605,
62,
39231,
796,
2681,
198,
5239,
62,
7857,
796,
1467,
198,
6371,
62,
5239,
62,
7857,
796,
1542,
198,
19836,
62,
7857,
796,
1987,
198,
25677,
62,
7857,
796,
2534,
198,
39231,
796,
604,
198,
198,
21812,
62,
10331,
796,
366,
2144,
24912,
1,
198,
5239,
62,
10331,
796,
13538,
198,
198,
25249,
62,
8043,
796,
366,
69,
1878,
28485,
1,
198,
20192,
62,
8043,
796,
366,
10535,
1,
198,
5239,
62,
8043,
796,
366,
2598,
2598,
2598,
1,
198,
25677,
62,
8043,
796,
366,
10535,
1,
198,
21812,
62,
25249,
62,
8043,
796,
366,
68,
24,
68,
24,
68,
24,
1,
198,
21812,
62,
5239,
62,
8043,
796,
366,
2078,
2078,
2078,
1,
198,
6371,
62,
8043,
796,
366,
405,
3510,
66,
24,
1,
628,
198,
198,
31,
4666,
13,
2673,
62,
4871,
628,
628,
628,
628,
628,
198
] | 2.802281 | 263 |
# -*- coding:utf-8 -*-
import logging
from multiprocessing import Pool
from operator import itemgetter
from collections import OrderedDict
from service.doc_etl import doc_etl
from service.api.tencent_ai import tencent_ai
from service.api.baidu_ai import baidu_ai
from service.api.jd_ai import jd_ai
from service.api.faceplusplus_ai import faceplusplus_ai
from service.api.netease_ai import netease_ai
from settings import FACEPLUSPLUS_TEMPLATE
from util.readImage import readImage
from util.text_connector import TextConnector
from templates.loadTemplate import ocrTemplate
| [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
11748,
18931,
198,
6738,
18540,
305,
919,
278,
1330,
19850,
198,
6738,
10088,
1330,
2378,
1136,
353,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
2139,
13,
15390,
62,
316,
75,
1330,
2205,
62,
316,
75,
198,
6738,
2139,
13,
15042,
13,
1452,
1087,
62,
1872,
1330,
3478,
1087,
62,
1872,
198,
6738,
2139,
13,
15042,
13,
65,
1698,
84,
62,
1872,
1330,
275,
1698,
84,
62,
1872,
198,
6738,
2139,
13,
15042,
13,
73,
67,
62,
1872,
1330,
474,
67,
62,
1872,
198,
6738,
2139,
13,
15042,
13,
2550,
9541,
9541,
62,
1872,
1330,
1986,
9541,
9541,
62,
1872,
198,
6738,
2139,
13,
15042,
13,
3262,
68,
589,
62,
1872,
1330,
2010,
68,
589,
62,
1872,
198,
6738,
6460,
1330,
46587,
6489,
2937,
6489,
2937,
62,
51,
3620,
6489,
6158,
198,
6738,
7736,
13,
961,
5159,
1330,
1100,
5159,
198,
6738,
7736,
13,
5239,
62,
8443,
273,
1330,
8255,
34525,
198,
6738,
24019,
13,
2220,
30800,
1330,
267,
6098,
30800,
628
] | 3.248588 | 177 |
from PIL import ImageGrab
import numpy as np
import cv2
from win32api import GetSystemMetrics
width = GetSystemMetrics(0)
height = GetSystemMetrics(1)
forcecc = cv2.VideoWriter_fourcc('m','p','4','v')
captured_video = cv2.VideoWriter('output.mp4', forcecc, 20.0, (width, height))
while True:
img = ImageGrab.grab(bbox=(0, 0 ,width, height))
img_np = np.array(img)
img_final = cv2.cvtColor(img_np, cv2.COLOR_BGR2RGB)
cv2.imshow('Secrete Capture', img_final)
captured_video.write(img_final)
if cv2.waitKey(10) == ord('q'):
break | [
6738,
350,
4146,
1330,
7412,
48400,
201,
198,
11748,
299,
32152,
355,
45941,
220,
201,
198,
11748,
269,
85,
17,
201,
198,
6738,
1592,
2624,
15042,
1330,
3497,
11964,
9171,
10466,
201,
198,
201,
198,
10394,
796,
3497,
11964,
9171,
10466,
7,
15,
8,
201,
198,
17015,
796,
3497,
11964,
9171,
10466,
7,
16,
8,
201,
198,
3174,
535,
796,
269,
85,
17,
13,
10798,
34379,
62,
14337,
535,
10786,
76,
41707,
79,
41707,
19,
41707,
85,
11537,
201,
198,
27144,
1522,
62,
15588,
796,
269,
85,
17,
13,
10798,
34379,
10786,
22915,
13,
3149,
19,
3256,
2700,
535,
11,
1160,
13,
15,
11,
357,
10394,
11,
6001,
4008,
201,
198,
4514,
6407,
25,
201,
198,
220,
220,
220,
33705,
796,
7412,
48400,
13,
32393,
7,
65,
3524,
16193,
15,
11,
657,
837,
10394,
11,
6001,
4008,
201,
198,
220,
220,
220,
33705,
62,
37659,
796,
45941,
13,
18747,
7,
9600,
8,
201,
198,
220,
220,
220,
33705,
62,
20311,
796,
269,
85,
17,
13,
33967,
83,
10258,
7,
9600,
62,
37659,
11,
269,
85,
17,
13,
46786,
62,
33,
10761,
17,
36982,
8,
201,
198,
220,
220,
220,
269,
85,
17,
13,
320,
12860,
10786,
6558,
8374,
31793,
3256,
33705,
62,
20311,
8,
201,
198,
220,
220,
220,
7907,
62,
15588,
13,
13564,
7,
9600,
62,
20311,
8,
201,
198,
220,
220,
220,
611,
269,
85,
17,
13,
17077,
9218,
7,
940,
8,
6624,
2760,
10786,
80,
6,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2270
] | 2.304 | 250 |
import random
from java.lang import String
from org.myrobotlab.net import BareBonesBrowserLaunch
holygrail = Runtime.createAndStart("holygrail", "WebGui")
wksr = Runtime.createAndStart("webkitspeechrecognition", "WebkitSpeechRecognition")
alice2 = Runtime.createAndStart("alice2", "ProgramAB")
alice2.startSession("C:/mrl2/myrobotlab/ProgramAB", "default", "alice2")
htmlfilter = Runtime.createAndStart("htmlfilter", "HtmlFilter")
mouth = Runtime.createAndStart("i01.mouth", "MarySpeech")
wksr.addTextListener(alice2)
alice2.addTextListener(htmlfilter)
htmlfilter.addTextListener(mouth)
meco1 = 0
meco2 = 0
meco3 = 0
| [
11748,
4738,
198,
6738,
20129,
13,
17204,
1330,
10903,
198,
6738,
8745,
13,
1820,
305,
13645,
23912,
13,
3262,
1330,
38234,
33,
1952,
46532,
38296,
198,
44287,
70,
30224,
796,
43160,
13,
17953,
1870,
10434,
7203,
44287,
70,
30224,
1600,
366,
13908,
8205,
72,
4943,
198,
86,
591,
81,
796,
43160,
13,
17953,
1870,
10434,
7203,
12384,
74,
896,
431,
3055,
26243,
653,
1600,
366,
13908,
15813,
5248,
3055,
6690,
2360,
653,
4943,
198,
282,
501,
17,
796,
43160,
13,
17953,
1870,
10434,
7203,
282,
501,
17,
1600,
366,
15167,
6242,
4943,
198,
282,
501,
17,
13,
9688,
36044,
7203,
34,
14079,
43395,
75,
17,
14,
1820,
305,
13645,
23912,
14,
15167,
6242,
1600,
366,
12286,
1600,
366,
282,
501,
17,
4943,
198,
19211,
1652,
346,
353,
796,
43160,
13,
17953,
1870,
10434,
7203,
19211,
1652,
346,
353,
1600,
366,
39,
20369,
22417,
4943,
198,
14775,
796,
43160,
13,
17953,
1870,
10434,
7203,
72,
486,
13,
14775,
1600,
366,
24119,
5248,
3055,
4943,
198,
86,
591,
81,
13,
2860,
8206,
33252,
7,
282,
501,
17,
8,
198,
282,
501,
17,
13,
2860,
8206,
33252,
7,
19211,
1652,
346,
353,
8,
198,
19211,
1652,
346,
353,
13,
2860,
8206,
33252,
7,
14775,
8,
198,
198,
76,
47704,
16,
796,
657,
198,
76,
47704,
17,
796,
657,
198,
76,
47704,
18,
796,
657,
198
] | 2.783784 | 222 |
# Lint as: python3
# pylint: disable=g-bad-file-header
# Copyright 2020 DeepMind Technologies 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.
# ============================================================================
"""Simple matplotlib rendering of a rollout prediction against ground truth.
Usage (from parent directory):
`python -m learning_to_simulate.render_rollout --rollout_path={OUTPUT_PATH}/rollout_test_1.pkl`
Where {OUTPUT_PATH} is the output path passed to `train.py` in "eval_rollout"
mode.
It may require installing Tkinter with `sudo apt-get install python3.7-tk`.
""" # pylint: disable=line-too-long
import pickle
from absl import app
from absl import flags
from matplotlib import animation
import matplotlib.pyplot as plt
import numpy as np
flags.DEFINE_string("rollout_path", None, help="Path to rollout pickle file")
flags.DEFINE_integer("step_stride", 3, help="Stride of steps to skip.")
flags.DEFINE_boolean("block_on_show", True, help="For test purposes.")
FLAGS = flags.FLAGS
TYPE_TO_COLOR = {
3: "black", # Boundary particles.
0: "green", # Rigid solids.
7: "magenta", # Goop.
6: "gold", # Sand.
5: "blue", # Water.
}
if __name__ == "__main__":
app.run(main)
| [
2,
406,
600,
355,
25,
21015,
18,
198,
2,
279,
2645,
600,
25,
15560,
28,
70,
12,
14774,
12,
7753,
12,
25677,
198,
2,
15069,
12131,
10766,
28478,
21852,
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,
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,
220,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
2,
38093,
2559,
18604,
198,
37811,
26437,
2603,
29487,
8019,
14837,
286,
257,
38180,
17724,
1028,
2323,
3872,
13,
198,
198,
28350,
357,
6738,
2560,
8619,
2599,
198,
198,
63,
29412,
532,
76,
4673,
62,
1462,
62,
14323,
5039,
13,
13287,
62,
2487,
448,
1377,
2487,
448,
62,
6978,
34758,
2606,
7250,
3843,
62,
34219,
92,
14,
2487,
448,
62,
9288,
62,
16,
13,
79,
41582,
63,
198,
198,
8496,
1391,
2606,
7250,
3843,
62,
34219,
92,
318,
262,
5072,
3108,
3804,
284,
4600,
27432,
13,
9078,
63,
287,
366,
18206,
62,
2487,
448,
1,
198,
14171,
13,
198,
198,
1026,
743,
2421,
15975,
309,
74,
3849,
351,
4600,
24032,
15409,
12,
1136,
2721,
21015,
18,
13,
22,
12,
30488,
44646,
198,
198,
37811,
220,
1303,
279,
2645,
600,
25,
15560,
28,
1370,
12,
18820,
12,
6511,
198,
198,
11748,
2298,
293,
198,
198,
6738,
2352,
75,
1330,
598,
198,
6738,
2352,
75,
1330,
9701,
198,
198,
6738,
2603,
29487,
8019,
1330,
11034,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
198,
33152,
13,
7206,
29940,
62,
8841,
7203,
2487,
448,
62,
6978,
1600,
6045,
11,
1037,
2625,
15235,
284,
38180,
2298,
293,
2393,
4943,
198,
33152,
13,
7206,
29940,
62,
41433,
7203,
9662,
62,
2536,
485,
1600,
513,
11,
1037,
2625,
1273,
13154,
286,
4831,
284,
14267,
19570,
198,
33152,
13,
7206,
29940,
62,
2127,
21052,
7203,
9967,
62,
261,
62,
12860,
1600,
6407,
11,
1037,
2625,
1890,
1332,
4959,
19570,
198,
198,
38948,
50,
796,
9701,
13,
38948,
50,
198,
198,
25216,
62,
10468,
62,
46786,
796,
1391,
198,
220,
220,
220,
513,
25,
366,
13424,
1600,
220,
1303,
30149,
560,
13166,
13,
198,
220,
220,
220,
657,
25,
366,
14809,
1600,
220,
1303,
24666,
312,
1540,
2340,
13,
198,
220,
220,
220,
767,
25,
366,
19726,
29188,
1600,
220,
1303,
1514,
404,
13,
198,
220,
220,
220,
718,
25,
366,
24267,
1600,
220,
1303,
3837,
13,
198,
220,
220,
220,
642,
25,
366,
17585,
1600,
220,
1303,
5638,
13,
198,
92,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
598,
13,
5143,
7,
12417,
8,
198
] | 3.231618 | 544 |
# encoding: utf-8
from six import text_type
from sqlalchemy import orm, types, Column, Table, ForeignKey
from sqlalchemy.ext.associationproxy import association_proxy
import meta
import core
import package as _package
import extension
import domain_object
import types as _types
import ckan.lib.dictization
import activity
__all__ = ['PackageExtra', 'package_extra_table']
package_extra_table = Table('package_extra', meta.metadata,
Column('id', types.UnicodeText, primary_key=True, default=_types.make_uuid),
# NB: only (package, key) pair is unique
Column('package_id', types.UnicodeText, ForeignKey('package.id')),
Column('key', types.UnicodeText),
Column('value', types.UnicodeText),
Column('state', types.UnicodeText, default=core.State.ACTIVE),
)
meta.mapper(PackageExtra, package_extra_table, properties={
'package': orm.relation(_package.Package,
backref=orm.backref('_extras',
collection_class=orm.collections.attribute_mapped_collection(u'key'),
cascade='all, delete, delete-orphan',
),
),
},
order_by=[package_extra_table.c.package_id, package_extra_table.c.key],
extension=[extension.PluginMapperExtension()],
)
_package.Package.extras = association_proxy(
'_extras', 'value', creator=_create_extra)
| [
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
6738,
2237,
1330,
2420,
62,
4906,
198,
6738,
44161,
282,
26599,
1330,
393,
76,
11,
3858,
11,
29201,
11,
8655,
11,
8708,
9218,
198,
6738,
44161,
282,
26599,
13,
2302,
13,
562,
41003,
36436,
1330,
8112,
62,
36436,
198,
198,
11748,
13634,
198,
11748,
4755,
198,
11748,
5301,
355,
4808,
26495,
198,
11748,
7552,
198,
11748,
7386,
62,
15252,
198,
11748,
3858,
355,
4808,
19199,
198,
11748,
269,
27541,
13,
8019,
13,
11600,
1634,
198,
11748,
3842,
198,
198,
834,
439,
834,
796,
37250,
27813,
27726,
3256,
705,
26495,
62,
26086,
62,
11487,
20520,
198,
198,
26495,
62,
26086,
62,
11487,
796,
8655,
10786,
26495,
62,
26086,
3256,
13634,
13,
38993,
11,
198,
220,
220,
220,
29201,
10786,
312,
3256,
3858,
13,
3118,
291,
1098,
8206,
11,
4165,
62,
2539,
28,
17821,
11,
4277,
28,
62,
19199,
13,
15883,
62,
12303,
312,
828,
198,
220,
220,
220,
1303,
41354,
25,
691,
357,
26495,
11,
1994,
8,
5166,
318,
3748,
198,
220,
220,
220,
29201,
10786,
26495,
62,
312,
3256,
3858,
13,
3118,
291,
1098,
8206,
11,
8708,
9218,
10786,
26495,
13,
312,
11537,
828,
198,
220,
220,
220,
29201,
10786,
2539,
3256,
3858,
13,
3118,
291,
1098,
8206,
828,
198,
220,
220,
220,
29201,
10786,
8367,
3256,
3858,
13,
3118,
291,
1098,
8206,
828,
198,
220,
220,
220,
29201,
10786,
5219,
3256,
3858,
13,
3118,
291,
1098,
8206,
11,
4277,
28,
7295,
13,
9012,
13,
10659,
9306,
828,
198,
8,
628,
198,
198,
28961,
13,
76,
11463,
7,
27813,
27726,
11,
5301,
62,
26086,
62,
11487,
11,
6608,
34758,
198,
220,
220,
220,
705,
26495,
10354,
393,
76,
13,
49501,
28264,
26495,
13,
27813,
11,
198,
220,
220,
220,
220,
220,
220,
220,
736,
5420,
28,
579,
13,
1891,
5420,
10786,
62,
2302,
8847,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4947,
62,
4871,
28,
579,
13,
4033,
26448,
13,
42348,
62,
76,
6320,
62,
43681,
7,
84,
6,
2539,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
44847,
11639,
439,
11,
12233,
11,
12233,
12,
13425,
272,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
8964,
198,
220,
220,
220,
1502,
62,
1525,
41888,
26495,
62,
26086,
62,
11487,
13,
66,
13,
26495,
62,
312,
11,
5301,
62,
26086,
62,
11487,
13,
66,
13,
2539,
4357,
198,
220,
220,
220,
7552,
41888,
2302,
3004,
13,
37233,
44,
11463,
11627,
3004,
3419,
4357,
198,
8,
628,
198,
62,
26495,
13,
27813,
13,
2302,
8847,
796,
8112,
62,
36436,
7,
198,
220,
220,
220,
705,
62,
2302,
8847,
3256,
705,
8367,
3256,
13172,
28,
62,
17953,
62,
26086,
8,
198
] | 2.814103 | 468 |
from .NamedObject import NamedObject
from ..enums import AudioType, AudioCompressionFormat, AUDIO_TYPE_EXTEMSION
from ..export import AudioClipConverter
from ..helpers.ResourceReader import get_resource_data
| [
6738,
764,
45,
2434,
10267,
1330,
34441,
10267,
198,
6738,
11485,
268,
5700,
1330,
13491,
6030,
11,
13491,
7293,
2234,
26227,
11,
41260,
9399,
62,
25216,
62,
13918,
39201,
2849,
198,
6738,
11485,
39344,
1330,
13491,
2601,
541,
3103,
332,
353,
198,
6738,
11485,
16794,
364,
13,
26198,
33634,
1330,
651,
62,
31092,
62,
7890,
628
] | 3.732143 | 56 |
import unittest
from core_lib.core_lib import CoreLib
from core_lib.data_layers.data_access.data_access import DataAccess
from core_lib.core_lib_listener import CoreLibListener
from core_lib.data_layers.service.service import Service
| [
11748,
555,
715,
395,
198,
198,
6738,
4755,
62,
8019,
13,
7295,
62,
8019,
1330,
7231,
25835,
198,
6738,
4755,
62,
8019,
13,
7890,
62,
75,
6962,
13,
7890,
62,
15526,
13,
7890,
62,
15526,
1330,
6060,
15457,
198,
6738,
4755,
62,
8019,
13,
7295,
62,
8019,
62,
4868,
877,
1330,
7231,
25835,
33252,
198,
6738,
4755,
62,
8019,
13,
7890,
62,
75,
6962,
13,
15271,
13,
15271,
1330,
4809,
628,
628,
198
] | 3.273973 | 73 |
# coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# 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 datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Union
from pydantic import BaseModel, Field, root_validator, validator
from rubrix.server.commons.helpers import flatten_dict
from rubrix.server.datasets.model import UpdateDatasetRequest
from rubrix.server.tasks.commons.api.model import (
BaseAnnotation,
BaseRecord,
PredictionStatus,
ScoreRange,
SortableField,
TaskStatus,
TaskType,
)
from rubrix._constants import MAX_KEYWORD_LENGTH
class ClassPrediction(BaseModel):
"""
Single class prediction
Attributes:
-----------
class_label: Union[str, int]
the predicted class
score: float
the predicted class score. For human-supervised annotations,
this probability should be 1.0
"""
class_label: Union[str, int] = Field(alias="class")
score: float = Field(default=1.0, ge=0.0, le=1.0)
@validator("class_label")
# See <https://pydantic-docs.helpmanual.io/usage/model_config>
class TextClassificationAnnotation(BaseAnnotation):
"""
Annotation class for text classification tasks
Attributes:
-----------
labels: List[LabelPrediction]
list of annotated labels with score
"""
labels: List[ClassPrediction]
@validator("labels")
def sort_labels(cls, labels: List[ClassPrediction]):
"""Sort provided labels by score"""
return sorted(labels, key=lambda x: x.score, reverse=True)
class TokenAttributions(BaseModel):
"""
The token attributions explaining predicted labels
Attributes:
-----------
token: str
The input token
attributions: Dict[str, float]
A dictionary containing label class-attribution pairs
"""
token: str
attributions: Dict[str, float] = Field(default_factory=dict)
class CreationTextClassificationRecord(BaseRecord[TextClassificationAnnotation]):
"""
Text classification record
Attributes:
-----------
inputs: Dict[str, Union[str, List[str]]]
The input data text
multi_label: bool
Enable text classification with multiple predicted/annotated labels.
Default=False
explanation: Dict[str, List[TokenAttributions]]
Token attribution list explaining predicted classes per token input.
The dictionary key must be aligned with provided record text. Optional
"""
inputs: Dict[str, Union[str, List[str]]]
multi_label: bool = False
explanation: Dict[str, List[TokenAttributions]] = None
_SCORE_DEVIATION_ERROR: ClassVar[float] = 0.001
@root_validator
def validate_record(cls, values):
"""fastapi validator method"""
prediction = values.get("prediction", None)
multi_label = values.get("multi_label", False)
cls._check_score_integrity(prediction, multi_label)
return values
@classmethod
def _check_score_integrity(
cls, prediction: TextClassificationAnnotation, multi_label: bool
):
"""
Checks the score value integrity
Parameters
----------
prediction:
The prediction annotation
multi_label:
If multi label
"""
if prediction and not multi_label:
assert sum([label.score for label in prediction.labels]) <= (
1.0 + cls._SCORE_DEVIATION_ERROR
), f"Wrong score distributions: {prediction.labels}"
@classmethod
def task(cls) -> TaskType:
"""The task type"""
return TaskType.text_classification
@property
@property
@property
@property
@property
def scores(self) -> List[float]:
"""Values of prediction scores"""
if not self.prediction:
return []
return (
[label.score for label in self.prediction.labels]
if self.multi_label
else [
prediction_class.score
for prediction_class in [
self._max_class_prediction(
self.prediction, multi_label=self.multi_label
)
]
if prediction_class
]
)
@validator("inputs")
def validate_inputs(cls, text: Dict[str, Any]):
"""Applies validation over input text"""
assert len(text) > 0, "No inputs provided"
for t in text.values():
assert t is not None, "Cannot include None fields"
return text
@validator("inputs")
def flatten_text(cls, text: Dict[str, Any]):
"""Normalizes input text to dict of strings"""
flat_dict = flatten_dict(text)
return flat_dict
@classmethod
def _labels_from_annotation(
cls, annotation: TextClassificationAnnotation, multi_label: bool
) -> Union[List[str], List[int]]:
"""
Extracts labels values from annotation
Parameters
----------
annotation:
The annotation
multi_label
Enable/Disable multi label model
Returns
-------
Label values for a given annotation
"""
if not annotation:
return []
if multi_label:
return [
label.class_label for label in annotation.labels if label.score > 0.5
]
class_prediction = cls._max_class_prediction(
annotation, multi_label=multi_label
)
if class_prediction is None:
return []
return [class_prediction.class_label]
@staticmethod
def _max_class_prediction(
p: TextClassificationAnnotation, multi_label: bool
) -> Optional[ClassPrediction]:
"""
Gets the max class prediction for annotation
Parameters
----------
p:
The annotation
multi_label:
Enable/Disable multi_label mode
Returns
-------
The max class prediction in terms of prediction score if
prediction has labels and no multi label is enabled. None, otherwise
"""
if multi_label or p is None or not p.labels:
return None
return p.labels[0]
class TextClassificationRecord(CreationTextClassificationRecord):
"""
The main text classification task record
Attributes:
-----------
last_updated: datetime
Last record update (read only)
predicted: Optional[PredictionStatus]
The record prediction status. Optional
"""
last_updated: datetime = None
_predicted: Optional[PredictionStatus] = Field(alias="predicted")
class TextClassificationBulkData(UpdateDatasetRequest):
"""
API bulk data for text classification
Attributes:
-----------
records: List[TextClassificationRecord]
The text classification record list
"""
records: List[CreationTextClassificationRecord]
class TextClassificationQuery(BaseModel):
"""
API Filters for text classification
Attributes:
-----------
ids: Optional[List[Union[str, int]]]
Record ids list
query_text: str
Text query over inputs
metadata: Optional[Dict[str, Union[str, List[str]]]]
Text query over metadata fields. Default=None
predicted_as: List[str]
List of predicted terms
annotated_as: List[str]
List of annotated terms
annotated_by: List[str]
List of annotation agents
predicted_by: List[str]
List of predicted agents
status: List[TaskStatus]
List of task status
predicted: Optional[PredictionStatus]
The task prediction status
"""
ids: Optional[List[Union[str, int]]]
query_text: str = Field(default=None, alias="query_inputs")
metadata: Optional[Dict[str, Union[str, List[str]]]] = None
predicted_as: List[str] = Field(default_factory=list)
annotated_as: List[str] = Field(default_factory=list)
annotated_by: List[str] = Field(default_factory=list)
predicted_by: List[str] = Field(default_factory=list)
score: Optional[ScoreRange] = Field(default=None)
status: List[TaskStatus] = Field(default_factory=list)
predicted: Optional[PredictionStatus] = Field(default=None, nullable=True)
class TextClassificationSearchRequest(BaseModel):
"""
API SearchRequest request
Attributes:
-----------
query: TextClassificationQuery
The search query configuration
sort:
The sort order list
"""
query: TextClassificationQuery = Field(default_factory=TextClassificationQuery)
sort: List[SortableField] = Field(default_factory=list)
class TextClassificationSearchAggregations(BaseModel):
"""
API for result aggregations
Attributes:
-----------
predicted_as: Dict[str, int]
Occurrence info about more relevant predicted terms
annotated_as: Dict[str, int]
Occurrence info about more relevant annotated terms
annotated_by: Dict[str, int]
Occurrence info about more relevant annotation agent terms
predicted_by: Dict[str, int]
Occurrence info about more relevant prediction agent terms
status: Dict[str, int]
Occurrence info about task status
predicted: Dict[str, int]
Occurrence info about task prediction status
words: Dict[str, int]
The word cloud aggregations
metadata: Dict[str, Dict[str, Any]]
The metadata fields aggregations
"""
predicted_as: Dict[str, int] = Field(default_factory=dict)
annotated_as: Dict[str, int] = Field(default_factory=dict)
annotated_by: Dict[str, int] = Field(default_factory=dict)
predicted_by: Dict[str, int] = Field(default_factory=dict)
status: Dict[str, int] = Field(default_factory=dict)
predicted: Dict[str, int] = Field(default_factory=dict)
score: Dict[str, int] = Field(default_factory=dict)
words: Dict[str, int] = Field(default_factory=dict)
metadata: Dict[str, Dict[str, Any]] = Field(default_factory=dict)
class TextClassificationSearchResults(BaseModel):
"""
API search results
Attributes:
-----------
total: int
The total number of records
records: List[TextClassificationRecord]
The selected records to return
aggregations: TextClassificationAggregations
SearchRequest aggregations (if no pagination)
"""
total: int = 0
records: List[TextClassificationRecord] = Field(default_factory=list)
aggregations: TextClassificationSearchAggregations = None
| [
2,
220,
19617,
28,
40477,
12,
23,
198,
2,
220,
15069,
33448,
12,
25579,
11,
262,
31517,
1872,
311,
13,
43,
13,
1074,
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,
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,
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,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
19720,
1330,
4377,
11,
5016,
19852,
11,
360,
713,
11,
7343,
11,
32233,
11,
4479,
198,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
11,
7663,
11,
6808,
62,
12102,
1352,
11,
4938,
1352,
198,
6738,
6437,
8609,
13,
15388,
13,
9503,
684,
13,
16794,
364,
1330,
27172,
268,
62,
11600,
198,
6738,
6437,
8609,
13,
15388,
13,
19608,
292,
1039,
13,
19849,
1330,
10133,
27354,
292,
316,
18453,
198,
6738,
6437,
8609,
13,
15388,
13,
83,
6791,
13,
9503,
684,
13,
15042,
13,
19849,
1330,
357,
198,
220,
220,
220,
7308,
2025,
38983,
11,
198,
220,
220,
220,
7308,
23739,
11,
198,
220,
220,
220,
46690,
19580,
11,
198,
220,
220,
220,
15178,
17257,
11,
198,
220,
220,
220,
33947,
540,
15878,
11,
198,
220,
220,
220,
15941,
19580,
11,
198,
220,
220,
220,
15941,
6030,
11,
198,
8,
198,
6738,
6437,
8609,
13557,
9979,
1187,
1330,
25882,
62,
20373,
54,
12532,
62,
43,
49494,
628,
198,
4871,
5016,
39156,
2867,
7,
14881,
17633,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
14206,
1398,
17724,
628,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
24200,
6329,
628,
220,
220,
220,
1398,
62,
18242,
25,
4479,
58,
2536,
11,
493,
60,
198,
220,
220,
220,
220,
220,
220,
220,
262,
11001,
1398,
628,
220,
220,
220,
4776,
25,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
262,
11001,
1398,
4776,
13,
1114,
1692,
12,
16668,
16149,
37647,
11,
198,
220,
220,
220,
220,
220,
220,
220,
428,
12867,
815,
307,
352,
13,
15,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1398,
62,
18242,
25,
4479,
58,
2536,
11,
493,
60,
796,
7663,
7,
26011,
2625,
4871,
4943,
198,
220,
220,
220,
4776,
25,
12178,
796,
7663,
7,
12286,
28,
16,
13,
15,
11,
4903,
28,
15,
13,
15,
11,
443,
28,
16,
13,
15,
8,
628,
220,
220,
220,
2488,
12102,
1352,
7203,
4871,
62,
18242,
4943,
628,
220,
220,
220,
1303,
4091,
1279,
5450,
1378,
79,
5173,
5109,
12,
31628,
13,
16794,
805,
723,
13,
952,
14,
26060,
14,
19849,
62,
11250,
29,
628,
198,
4871,
8255,
9487,
2649,
2025,
38983,
7,
14881,
2025,
38983,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1052,
38983,
1398,
329,
2420,
17923,
8861,
628,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
24200,
6329,
628,
220,
220,
220,
14722,
25,
7343,
58,
33986,
39156,
2867,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
286,
24708,
515,
14722,
351,
4776,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
14722,
25,
7343,
58,
9487,
39156,
2867,
60,
628,
220,
220,
220,
2488,
12102,
1352,
7203,
23912,
1424,
4943,
198,
220,
220,
220,
825,
3297,
62,
23912,
1424,
7,
565,
82,
11,
14722,
25,
7343,
58,
9487,
39156,
2867,
60,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
42758,
2810,
14722,
416,
4776,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
23243,
7,
23912,
1424,
11,
1994,
28,
50033,
2124,
25,
2124,
13,
26675,
11,
9575,
28,
17821,
8,
628,
198,
4871,
29130,
8086,
2455,
507,
7,
14881,
17633,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
383,
11241,
24548,
507,
11170,
11001,
14722,
628,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
24200,
6329,
628,
220,
220,
220,
11241,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
5128,
11241,
198,
220,
220,
220,
24548,
507,
25,
360,
713,
58,
2536,
11,
12178,
60,
198,
220,
220,
220,
220,
220,
220,
220,
317,
22155,
7268,
6167,
1398,
12,
1078,
3890,
14729,
628,
220,
220,
220,
37227,
628,
220,
220,
220,
11241,
25,
965,
198,
220,
220,
220,
24548,
507,
25,
360,
713,
58,
2536,
11,
12178,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
11600,
8,
628,
198,
4871,
21582,
8206,
9487,
2649,
23739,
7,
14881,
23739,
58,
8206,
9487,
2649,
2025,
38983,
60,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8255,
17923,
1700,
628,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
24200,
6329,
628,
220,
220,
220,
17311,
25,
360,
713,
58,
2536,
11,
4479,
58,
2536,
11,
7343,
58,
2536,
11907,
60,
198,
220,
220,
220,
220,
220,
220,
220,
383,
5128,
1366,
2420,
628,
220,
220,
220,
5021,
62,
18242,
25,
20512,
198,
220,
220,
220,
220,
220,
220,
220,
27882,
2420,
17923,
351,
3294,
11001,
14,
34574,
515,
14722,
13,
198,
220,
220,
220,
220,
220,
220,
220,
15161,
28,
25101,
628,
220,
220,
220,
7468,
25,
360,
713,
58,
2536,
11,
7343,
58,
30642,
8086,
2455,
507,
11907,
198,
220,
220,
220,
220,
220,
220,
220,
29130,
39629,
1351,
11170,
11001,
6097,
583,
11241,
5128,
13,
198,
220,
220,
220,
220,
220,
220,
220,
383,
22155,
1994,
1276,
307,
19874,
351,
2810,
1700,
2420,
13,
32233,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
17311,
25,
360,
713,
58,
2536,
11,
4479,
58,
2536,
11,
7343,
58,
2536,
11907,
60,
198,
220,
220,
220,
5021,
62,
18242,
25,
20512,
796,
10352,
198,
220,
220,
220,
7468,
25,
360,
713,
58,
2536,
11,
7343,
58,
30642,
8086,
2455,
507,
11907,
796,
6045,
628,
220,
220,
220,
4808,
6173,
6965,
62,
7206,
12861,
6234,
62,
24908,
25,
5016,
19852,
58,
22468,
60,
796,
657,
13,
8298,
628,
220,
220,
220,
2488,
15763,
62,
12102,
1352,
198,
220,
220,
220,
825,
26571,
62,
22105,
7,
565,
82,
11,
3815,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
7217,
15042,
4938,
1352,
2446,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
17724,
796,
3815,
13,
1136,
7203,
28764,
2867,
1600,
6045,
8,
198,
220,
220,
220,
220,
220,
220,
220,
5021,
62,
18242,
796,
3815,
13,
1136,
7203,
41684,
62,
18242,
1600,
10352,
8,
628,
220,
220,
220,
220,
220,
220,
220,
537,
82,
13557,
9122,
62,
26675,
62,
18908,
10138,
7,
28764,
2867,
11,
5021,
62,
18242,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
3815,
628,
220,
220,
220,
2488,
4871,
24396,
198,
220,
220,
220,
825,
4808,
9122,
62,
26675,
62,
18908,
10138,
7,
198,
220,
220,
220,
220,
220,
220,
220,
537,
82,
11,
17724,
25,
8255,
9487,
2649,
2025,
38983,
11,
5021,
62,
18242,
25,
20512,
198,
220,
220,
220,
15179,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
47719,
262,
4776,
1988,
11540,
628,
220,
220,
220,
220,
220,
220,
220,
40117,
198,
220,
220,
220,
220,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
220,
220,
220,
220,
17724,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
17724,
23025,
198,
220,
220,
220,
220,
220,
220,
220,
5021,
62,
18242,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1002,
5021,
6167,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
17724,
290,
407,
5021,
62,
18242,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6818,
2160,
26933,
18242,
13,
26675,
329,
6167,
287,
17724,
13,
23912,
1424,
12962,
19841,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
352,
13,
15,
1343,
537,
82,
13557,
6173,
6965,
62,
7206,
12861,
6234,
62,
24908,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10612,
277,
1,
39213,
506,
4776,
24570,
25,
1391,
28764,
2867,
13,
23912,
1424,
36786,
628,
220,
220,
220,
2488,
4871,
24396,
198,
220,
220,
220,
825,
4876,
7,
565,
82,
8,
4613,
15941,
6030,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
464,
4876,
2099,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
15941,
6030,
13,
5239,
62,
4871,
2649,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
8198,
7,
944,
8,
4613,
7343,
58,
22468,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
40161,
286,
17724,
8198,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
2116,
13,
28764,
2867,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
18242,
13,
26675,
329,
6167,
287,
2116,
13,
28764,
2867,
13,
23912,
1424,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
41684,
62,
18242,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17724,
62,
4871,
13,
26675,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
17724,
62,
4871,
287,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
9806,
62,
4871,
62,
28764,
2867,
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,
2116,
13,
28764,
2867,
11,
5021,
62,
18242,
28,
944,
13,
41684,
62,
18242,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
17724,
62,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
2488,
12102,
1352,
7203,
15414,
82,
4943,
198,
220,
220,
220,
825,
26571,
62,
15414,
82,
7,
565,
82,
11,
2420,
25,
360,
713,
58,
2536,
11,
4377,
60,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
4677,
13508,
21201,
625,
5128,
2420,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
18896,
7,
5239,
8,
1875,
657,
11,
366,
2949,
17311,
2810,
1,
628,
220,
220,
220,
220,
220,
220,
220,
329,
256,
287,
2420,
13,
27160,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6818,
256,
318,
407,
6045,
11,
366,
34,
34574,
2291,
6045,
7032,
1,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2420,
628,
220,
220,
220,
2488,
12102,
1352,
7203,
15414,
82,
4943,
198,
220,
220,
220,
825,
27172,
268,
62,
5239,
7,
565,
82,
11,
2420,
25,
360,
713,
58,
2536,
11,
4377,
60,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
26447,
4340,
5128,
2420,
284,
8633,
286,
13042,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
6228,
62,
11600,
796,
27172,
268,
62,
11600,
7,
5239,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
6228,
62,
11600,
628,
220,
220,
220,
2488,
4871,
24396,
198,
220,
220,
220,
825,
4808,
23912,
1424,
62,
6738,
62,
1236,
14221,
7,
198,
220,
220,
220,
220,
220,
220,
220,
537,
82,
11,
23025,
25,
8255,
9487,
2649,
2025,
38983,
11,
5021,
62,
18242,
25,
20512,
198,
220,
220,
220,
1267,
4613,
4479,
58,
8053,
58,
2536,
4357,
7343,
58,
600,
60,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
29677,
82,
14722,
3815,
422,
23025,
628,
220,
220,
220,
220,
220,
220,
220,
40117,
198,
220,
220,
220,
220,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
220,
220,
220,
220,
23025,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
23025,
198,
220,
220,
220,
220,
220,
220,
220,
5021,
62,
18242,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27882,
14,
48893,
5021,
6167,
2746,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
198,
220,
220,
220,
220,
220,
220,
220,
35656,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36052,
3815,
329,
257,
1813,
23025,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
23025,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
17635,
628,
220,
220,
220,
220,
220,
220,
220,
611,
5021,
62,
18242,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6167,
13,
4871,
62,
18242,
329,
6167,
287,
23025,
13,
23912,
1424,
611,
6167,
13,
26675,
1875,
657,
13,
20,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2361,
628,
220,
220,
220,
220,
220,
220,
220,
1398,
62,
28764,
2867,
796,
537,
82,
13557,
9806,
62,
4871,
62,
28764,
2867,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23025,
11,
5021,
62,
18242,
28,
41684,
62,
18242,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1398,
62,
28764,
2867,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
17635,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
685,
4871,
62,
28764,
2867,
13,
4871,
62,
18242,
60,
628,
220,
220,
220,
2488,
12708,
24396,
198,
220,
220,
220,
825,
4808,
9806,
62,
4871,
62,
28764,
2867,
7,
198,
220,
220,
220,
220,
220,
220,
220,
279,
25,
8255,
9487,
2649,
2025,
38983,
11,
5021,
62,
18242,
25,
20512,
198,
220,
220,
220,
1267,
4613,
32233,
58,
9487,
39156,
2867,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
29620,
262,
3509,
1398,
17724,
329,
23025,
628,
220,
220,
220,
220,
220,
220,
220,
40117,
198,
220,
220,
220,
220,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
220,
220,
220,
220,
279,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
23025,
198,
220,
220,
220,
220,
220,
220,
220,
5021,
62,
18242,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27882,
14,
48893,
5021,
62,
18242,
4235,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
198,
220,
220,
220,
220,
220,
220,
220,
35656,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
3509,
1398,
17724,
287,
2846,
286,
17724,
4776,
611,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17724,
468,
14722,
290,
645,
5021,
6167,
318,
9343,
13,
6045,
11,
4306,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5021,
62,
18242,
393,
279,
318,
6045,
393,
407,
279,
13,
23912,
1424,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
279,
13,
23912,
1424,
58,
15,
60,
628,
198,
4871,
8255,
9487,
2649,
23739,
7,
12443,
341,
8206,
9487,
2649,
23739,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
383,
1388,
2420,
17923,
4876,
1700,
628,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
24200,
6329,
628,
220,
220,
220,
938,
62,
43162,
25,
4818,
8079,
198,
220,
220,
220,
220,
220,
220,
220,
4586,
1700,
4296,
357,
961,
691,
8,
198,
220,
220,
220,
11001,
25,
32233,
58,
39156,
2867,
19580,
60,
198,
220,
220,
220,
220,
220,
220,
220,
383,
1700,
17724,
3722,
13,
32233,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
938,
62,
43162,
25,
4818,
8079,
796,
6045,
198,
220,
220,
220,
4808,
28764,
5722,
25,
32233,
58,
39156,
2867,
19580,
60,
796,
7663,
7,
26011,
2625,
28764,
5722,
4943,
628,
198,
4871,
8255,
9487,
2649,
33,
12171,
6601,
7,
10260,
27354,
292,
316,
18453,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7824,
11963,
1366,
329,
2420,
17923,
628,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
24200,
6329,
628,
220,
220,
220,
4406,
25,
7343,
58,
8206,
9487,
2649,
23739,
60,
198,
220,
220,
220,
220,
220,
220,
220,
383,
2420,
17923,
1700,
1351,
628,
220,
220,
220,
37227,
628,
220,
220,
220,
4406,
25,
7343,
58,
12443,
341,
8206,
9487,
2649,
23739,
60,
628,
198,
4871,
8255,
9487,
2649,
20746,
7,
14881,
17633,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7824,
7066,
1010,
329,
2420,
17923,
628,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
24200,
6329,
198,
220,
220,
220,
220,
2340,
25,
32233,
58,
8053,
58,
38176,
58,
2536,
11,
493,
11907,
60,
198,
220,
220,
220,
220,
220,
220,
220,
13266,
220,
2340,
1351,
628,
220,
220,
220,
12405,
62,
5239,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
8255,
12405,
625,
17311,
198,
220,
220,
220,
20150,
25,
32233,
58,
35,
713,
58,
2536,
11,
4479,
58,
2536,
11,
7343,
58,
2536,
11907,
11907,
198,
220,
220,
220,
220,
220,
220,
220,
8255,
12405,
625,
20150,
7032,
13,
15161,
28,
14202,
628,
220,
220,
220,
11001,
62,
292,
25,
7343,
58,
2536,
60,
198,
220,
220,
220,
220,
220,
220,
220,
7343,
286,
11001,
2846,
198,
220,
220,
220,
24708,
515,
62,
292,
25,
7343,
58,
2536,
60,
198,
220,
220,
220,
220,
220,
220,
220,
7343,
286,
24708,
515,
2846,
198,
220,
220,
220,
24708,
515,
62,
1525,
25,
7343,
58,
2536,
60,
198,
220,
220,
220,
220,
220,
220,
220,
7343,
286,
23025,
6554,
198,
220,
220,
220,
11001,
62,
1525,
25,
7343,
58,
2536,
60,
198,
220,
220,
220,
220,
220,
220,
220,
7343,
286,
11001,
6554,
198,
220,
220,
220,
3722,
25,
7343,
58,
25714,
19580,
60,
198,
220,
220,
220,
220,
220,
220,
220,
7343,
286,
4876,
3722,
198,
220,
220,
220,
11001,
25,
32233,
58,
39156,
2867,
19580,
60,
198,
220,
220,
220,
220,
220,
220,
220,
383,
4876,
17724,
3722,
628,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
2340,
25,
32233,
58,
8053,
58,
38176,
58,
2536,
11,
493,
11907,
60,
628,
220,
220,
220,
12405,
62,
5239,
25,
965,
796,
7663,
7,
12286,
28,
14202,
11,
16144,
2625,
22766,
62,
15414,
82,
4943,
198,
220,
220,
220,
20150,
25,
32233,
58,
35,
713,
58,
2536,
11,
4479,
58,
2536,
11,
7343,
58,
2536,
11907,
11907,
796,
6045,
628,
220,
220,
220,
11001,
62,
292,
25,
7343,
58,
2536,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
4868,
8,
198,
220,
220,
220,
24708,
515,
62,
292,
25,
7343,
58,
2536,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
4868,
8,
198,
220,
220,
220,
24708,
515,
62,
1525,
25,
7343,
58,
2536,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
4868,
8,
198,
220,
220,
220,
11001,
62,
1525,
25,
7343,
58,
2536,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
4868,
8,
198,
220,
220,
220,
4776,
25,
32233,
58,
26595,
17257,
60,
796,
7663,
7,
12286,
28,
14202,
8,
198,
220,
220,
220,
3722,
25,
7343,
58,
25714,
19580,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
4868,
8,
198,
220,
220,
220,
11001,
25,
32233,
58,
39156,
2867,
19580,
60,
796,
7663,
7,
12286,
28,
14202,
11,
9242,
540,
28,
17821,
8,
628,
198,
4871,
8255,
9487,
2649,
18243,
18453,
7,
14881,
17633,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7824,
11140,
18453,
2581,
628,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
24200,
6329,
628,
220,
220,
220,
12405,
25,
8255,
9487,
2649,
20746,
198,
220,
220,
220,
220,
220,
220,
220,
383,
2989,
12405,
8398,
628,
220,
220,
220,
3297,
25,
198,
220,
220,
220,
220,
220,
220,
220,
383,
3297,
1502,
1351,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
12405,
25,
8255,
9487,
2649,
20746,
796,
7663,
7,
12286,
62,
69,
9548,
28,
8206,
9487,
2649,
20746,
8,
198,
220,
220,
220,
3297,
25,
7343,
58,
42758,
540,
15878,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
4868,
8,
628,
198,
4871,
8255,
9487,
2649,
18243,
46384,
2301,
602,
7,
14881,
17633,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7824,
329,
1255,
13262,
602,
628,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
24200,
6329,
198,
220,
220,
220,
11001,
62,
292,
25,
360,
713,
58,
2536,
11,
493,
60,
198,
220,
220,
220,
220,
220,
220,
220,
10775,
33928,
7508,
546,
517,
5981,
11001,
2846,
198,
220,
220,
220,
24708,
515,
62,
292,
25,
360,
713,
58,
2536,
11,
493,
60,
198,
220,
220,
220,
220,
220,
220,
220,
10775,
33928,
7508,
546,
517,
5981,
24708,
515,
2846,
198,
220,
220,
220,
24708,
515,
62,
1525,
25,
360,
713,
58,
2536,
11,
493,
60,
198,
220,
220,
220,
220,
220,
220,
220,
10775,
33928,
7508,
546,
517,
5981,
23025,
5797,
2846,
198,
220,
220,
220,
11001,
62,
1525,
25,
360,
713,
58,
2536,
11,
493,
60,
198,
220,
220,
220,
220,
220,
220,
220,
10775,
33928,
7508,
546,
517,
5981,
17724,
5797,
2846,
198,
220,
220,
220,
3722,
25,
360,
713,
58,
2536,
11,
493,
60,
198,
220,
220,
220,
220,
220,
220,
220,
10775,
33928,
7508,
546,
4876,
3722,
198,
220,
220,
220,
11001,
25,
360,
713,
58,
2536,
11,
493,
60,
198,
220,
220,
220,
220,
220,
220,
220,
10775,
33928,
7508,
546,
4876,
17724,
3722,
198,
220,
220,
220,
2456,
25,
360,
713,
58,
2536,
11,
493,
60,
198,
220,
220,
220,
220,
220,
220,
220,
383,
1573,
6279,
13262,
602,
198,
220,
220,
220,
20150,
25,
360,
713,
58,
2536,
11,
360,
713,
58,
2536,
11,
4377,
11907,
198,
220,
220,
220,
220,
220,
220,
220,
383,
20150,
7032,
13262,
602,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
11001,
62,
292,
25,
360,
713,
58,
2536,
11,
493,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
11600,
8,
198,
220,
220,
220,
24708,
515,
62,
292,
25,
360,
713,
58,
2536,
11,
493,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
11600,
8,
198,
220,
220,
220,
24708,
515,
62,
1525,
25,
360,
713,
58,
2536,
11,
493,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
11600,
8,
198,
220,
220,
220,
11001,
62,
1525,
25,
360,
713,
58,
2536,
11,
493,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
11600,
8,
198,
220,
220,
220,
3722,
25,
360,
713,
58,
2536,
11,
493,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
11600,
8,
198,
220,
220,
220,
11001,
25,
360,
713,
58,
2536,
11,
493,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
11600,
8,
198,
220,
220,
220,
4776,
25,
360,
713,
58,
2536,
11,
493,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
11600,
8,
198,
220,
220,
220,
2456,
25,
360,
713,
58,
2536,
11,
493,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
11600,
8,
198,
220,
220,
220,
20150,
25,
360,
713,
58,
2536,
11,
360,
713,
58,
2536,
11,
4377,
11907,
796,
7663,
7,
12286,
62,
69,
9548,
28,
11600,
8,
628,
198,
4871,
8255,
9487,
2649,
18243,
25468,
7,
14881,
17633,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7824,
2989,
2482,
628,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
24200,
6329,
628,
220,
220,
220,
2472,
25,
493,
198,
220,
220,
220,
220,
220,
220,
220,
383,
2472,
1271,
286,
4406,
198,
220,
220,
220,
4406,
25,
7343,
58,
8206,
9487,
2649,
23739,
60,
198,
220,
220,
220,
220,
220,
220,
220,
383,
6163,
4406,
284,
1441,
198,
220,
220,
220,
13262,
602,
25,
8255,
9487,
2649,
46384,
2301,
602,
198,
220,
220,
220,
220,
220,
220,
220,
11140,
18453,
13262,
602,
357,
361,
645,
42208,
1883,
8,
628,
220,
220,
220,
37227,
628,
220,
220,
220,
2472,
25,
493,
796,
657,
198,
220,
220,
220,
4406,
25,
7343,
58,
8206,
9487,
2649,
23739,
60,
796,
7663,
7,
12286,
62,
69,
9548,
28,
4868,
8,
198,
220,
220,
220,
13262,
602,
25,
8255,
9487,
2649,
18243,
46384,
2301,
602,
796,
6045,
198
] | 2.638594 | 4,239 |
from .startr import Startr
| [
6738,
764,
9688,
81,
1330,
7253,
81,
198
] | 3.375 | 8 |
import io
import numpy as np
import json
import datetime
from pathlib import Path
# http://stackoverflow.com/a/27050186
class SummaryEncoder(Encoder):
"""
Often, you may want a very short summary, just containing some shapes of
numpy arrays in a Jupyter Notebook.
Example usage:
>>> import numpy as np
>>> example = dict(a=np.random.uniform(size=(3, 4)))
>>> print(json.dumps(example, cls=SummaryEncoder, indent=2))
{
"a": "ndarray: shape (3, 4), dtype float64"
}
alternative:
>>> np.set_string_function(lambda a: f'array(shape={a.shape}, dtype={a.dtype})')
>>> example
{'a': array(shape=(3, 4), dtype=float64)}
>>> np.set_string_function(None) # needed for pytest. np.set_string_function is not properly reseted.
"""
def dump_json(
obj, path, *, indent=2, create_path=True, sort_keys=True, **kwargs):
"""
Numpy types will be converted to the equivalent Python type for dumping the
object.
:param obj: Arbitrary object that is JSON serializable,
where Numpy is allowed.
:param path: String or ``pathlib.Path`` object.
:param indent: See ``json.dump()``.
:param kwargs: See ``json.dump()``.
"""
if isinstance(path, io.IOBase):
json.dump(obj, path, cls=Encoder, indent=indent,
sort_keys=sort_keys, **kwargs)
elif isinstance(path, (str, Path)):
path = Path(path).expanduser()
if create_path:
path.parent.mkdir(parents=True, exist_ok=True)
with path.open('w') as f:
json.dump(obj, f, cls=Encoder, indent=indent,
sort_keys=sort_keys, **kwargs)
else:
raise TypeError(path)
def load_json(path, **kwargs):
""" Loads a JSON file and returns it as a dict.
:param path: String or ``pathlib.Path`` object.
:param kwargs: See ``json.dump()``.
:return: Content of the JSON file.
"""
assert isinstance(path, (str, Path)), path
path = Path(path).expanduser()
with path.open() as fid:
return json.load(fid, **kwargs)
def loads_json(fid, **kwargs):
""" Loads a JSON file and returns it as a dict.
:param path: String or another object that is accepted by json.loads
:param kwargs: See ``json.dump()``.
:return: Content of the JSON file.
"""
assert isinstance(fid, str), fid
return json.loads(fid, **kwargs)
| [
198,
11748,
33245,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
33918,
198,
11748,
4818,
8079,
198,
6738,
3108,
8019,
1330,
10644,
628,
198,
2,
2638,
1378,
25558,
2502,
11125,
13,
785,
14,
64,
14,
1983,
2713,
486,
4521,
628,
198,
4871,
21293,
27195,
12342,
7,
27195,
12342,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
18023,
11,
345,
743,
765,
257,
845,
1790,
10638,
11,
655,
7268,
617,
15268,
286,
198,
220,
220,
220,
299,
32152,
26515,
287,
257,
449,
929,
88,
353,
5740,
2070,
13,
628,
220,
220,
220,
17934,
8748,
25,
198,
220,
220,
220,
13163,
1330,
299,
32152,
355,
45941,
198,
220,
220,
220,
13163,
1672,
796,
8633,
7,
64,
28,
37659,
13,
25120,
13,
403,
6933,
7,
7857,
16193,
18,
11,
604,
22305,
198,
220,
220,
220,
13163,
3601,
7,
17752,
13,
67,
8142,
7,
20688,
11,
537,
82,
28,
22093,
27195,
12342,
11,
33793,
28,
17,
4008,
198,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
366,
64,
1298,
366,
358,
18747,
25,
5485,
357,
18,
11,
604,
828,
288,
4906,
12178,
2414,
1,
198,
220,
220,
220,
1782,
628,
220,
220,
220,
5559,
25,
198,
220,
220,
220,
13163,
45941,
13,
2617,
62,
8841,
62,
8818,
7,
50033,
257,
25,
277,
6,
18747,
7,
43358,
34758,
64,
13,
43358,
5512,
288,
4906,
34758,
64,
13,
67,
4906,
30072,
11537,
198,
220,
220,
220,
13163,
1672,
198,
220,
220,
220,
1391,
6,
64,
10354,
7177,
7,
43358,
16193,
18,
11,
604,
828,
288,
4906,
28,
22468,
2414,
38165,
198,
220,
220,
220,
13163,
45941,
13,
2617,
62,
8841,
62,
8818,
7,
14202,
8,
220,
1303,
2622,
329,
12972,
9288,
13,
45941,
13,
2617,
62,
8841,
62,
8818,
318,
407,
6105,
13259,
276,
13,
198,
220,
220,
220,
37227,
628,
198,
198,
4299,
10285,
62,
17752,
7,
198,
220,
220,
220,
220,
220,
220,
220,
26181,
11,
3108,
11,
1635,
11,
33793,
28,
17,
11,
2251,
62,
6978,
28,
17821,
11,
3297,
62,
13083,
28,
17821,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
399,
32152,
3858,
481,
307,
11513,
284,
262,
7548,
11361,
2099,
329,
30231,
262,
198,
220,
220,
220,
2134,
13,
628,
220,
220,
220,
1058,
17143,
26181,
25,
33619,
11619,
2134,
326,
318,
19449,
11389,
13821,
11,
198,
220,
220,
220,
220,
220,
220,
220,
810,
399,
32152,
318,
3142,
13,
198,
220,
220,
220,
1058,
17143,
3108,
25,
10903,
393,
7559,
6978,
8019,
13,
15235,
15506,
2134,
13,
198,
220,
220,
220,
1058,
17143,
33793,
25,
4091,
7559,
17752,
13,
39455,
3419,
15506,
13,
198,
220,
220,
220,
1058,
17143,
479,
86,
22046,
25,
4091,
7559,
17752,
13,
39455,
3419,
15506,
13,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
318,
39098,
7,
6978,
11,
33245,
13,
9399,
14881,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
33918,
13,
39455,
7,
26801,
11,
3108,
11,
537,
82,
28,
27195,
12342,
11,
33793,
28,
521,
298,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3297,
62,
13083,
28,
30619,
62,
13083,
11,
12429,
46265,
22046,
8,
198,
220,
220,
220,
1288,
361,
318,
39098,
7,
6978,
11,
357,
2536,
11,
10644,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
3108,
796,
10644,
7,
6978,
737,
11201,
392,
7220,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2251,
62,
6978,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3108,
13,
8000,
13,
28015,
15908,
7,
23743,
28,
17821,
11,
2152,
62,
482,
28,
17821,
8,
628,
220,
220,
220,
220,
220,
220,
220,
351,
3108,
13,
9654,
10786,
86,
11537,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33918,
13,
39455,
7,
26801,
11,
277,
11,
537,
82,
28,
27195,
12342,
11,
33793,
28,
521,
298,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3297,
62,
13083,
28,
30619,
62,
13083,
11,
12429,
46265,
22046,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
7,
6978,
8,
628,
198,
4299,
3440,
62,
17752,
7,
6978,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
8778,
82,
257,
19449,
2393,
290,
5860,
340,
355,
257,
8633,
13,
628,
220,
220,
220,
1058,
17143,
3108,
25,
10903,
393,
7559,
6978,
8019,
13,
15235,
15506,
2134,
13,
198,
220,
220,
220,
1058,
17143,
479,
86,
22046,
25,
4091,
7559,
17752,
13,
39455,
3419,
15506,
13,
198,
220,
220,
220,
1058,
7783,
25,
14041,
286,
262,
19449,
2393,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6818,
318,
39098,
7,
6978,
11,
357,
2536,
11,
10644,
36911,
3108,
198,
220,
220,
220,
3108,
796,
10644,
7,
6978,
737,
11201,
392,
7220,
3419,
628,
220,
220,
220,
351,
3108,
13,
9654,
3419,
355,
49909,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
33918,
13,
2220,
7,
69,
312,
11,
12429,
46265,
22046,
8,
628,
198,
4299,
15989,
62,
17752,
7,
69,
312,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
8778,
82,
257,
19449,
2393,
290,
5860,
340,
355,
257,
8633,
13,
628,
220,
220,
220,
1058,
17143,
3108,
25,
10903,
393,
1194,
2134,
326,
318,
6292,
416,
33918,
13,
46030,
198,
220,
220,
220,
1058,
17143,
479,
86,
22046,
25,
4091,
7559,
17752,
13,
39455,
3419,
15506,
13,
198,
220,
220,
220,
1058,
7783,
25,
14041,
286,
262,
19449,
2393,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6818,
318,
39098,
7,
69,
312,
11,
965,
828,
49909,
628,
220,
220,
220,
1441,
33918,
13,
46030,
7,
69,
312,
11,
12429,
46265,
22046,
8,
198
] | 2.479424 | 972 |
import ctypes
from matplotlib.backends.backend_qt5 import _BackendQT5, FigureCanvasQT
from matplotlib.backends.qt_compat import QtGui
from . import _util
from .base import FigureCanvasCairo
@_BackendQT5.export
| [
11748,
269,
19199,
198,
198,
6738,
2603,
29487,
8019,
13,
1891,
2412,
13,
1891,
437,
62,
39568,
20,
1330,
4808,
7282,
437,
48,
51,
20,
11,
11291,
6090,
11017,
48,
51,
198,
6738,
2603,
29487,
8019,
13,
1891,
2412,
13,
39568,
62,
5589,
265,
1330,
33734,
8205,
72,
198,
198,
6738,
764,
1330,
4808,
22602,
198,
6738,
764,
8692,
1330,
11291,
6090,
11017,
34,
18131,
628,
198,
198,
31,
62,
7282,
437,
48,
51,
20,
13,
39344,
198
] | 2.75641 | 78 |
"""
pyrad.graph.plot_timeseries
===========================
Functions to plot Pyrad datasets
.. autosummary::
:toctree: generated/
plot_timeseries
plot_timeseries_comp
plot_monitoring_ts
plot_intercomp_scores_ts
plot_ml_ts
plot_sun_retrieval_ts
"""
from warnings import warn
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
# Increase a bit font size
mpl.rcParams.update({'font.size': 16})
mpl.rcParams.update({'font.family': "sans-serif"})
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import pyart
def plot_timeseries(tvec, data_list, fname_list, labelx='Time [UTC]',
labely='Value', labels=['Sensor'], title='Time Series',
period=0, timeformat=None, colors=None, linestyles=None,
markers=None, ymin=None, ymax=None, dpi=72):
"""
plots a time series
Parameters
----------
tvec : datetime object
time of the time series
data_list : list of float array
values of the time series
fname_list : list of str
list of names of the files where to store the plot
labelx : str
The label of the X axis
labely : str
The label of the Y axis
labels : array of str
The label of the legend
title : str
The figure title
period : float
measurement period in seconds used to compute accumulation. If 0 no
accumulation is computed
timeformat : str
Specifies the tvec and time format on the x axis
colors : array of str
Specifies the colors of each line
linestyles : array of str
Specifies the line style of each line
markers: array of str
Specify the markers to be used for each line
ymin, ymax: float
Lower/Upper limit of y axis
dpi : int
dots per inch
Returns
-------
fname_list : list of str
list of names of the created plots
History
--------
201?.??.?? -fvj- creation
2017.08.21 -jgr- modified margins and grid + minor graphical updates
2018.03.05 -jgr- added x-limit of x axis to avoid unwanted error messages
"""
if period > 0:
for i, data in enumerate(data_list):
data *= (period/3600.)
data_list[i] = np.ma.cumsum(data)
fig, ax = plt.subplots(figsize=[10, 6], dpi=dpi)
lab = None
col = None
lstyle = '--'
marker = 'o'
for i, data in enumerate(data_list):
if labels is not None:
lab = labels[i]
if colors is not None:
col = colors[i]
if linestyles is not None:
lstyle = linestyles[i]
if markers is not None:
marker = markers[i]
ax.plot(tvec, data, label=lab, color=col, linestyle=lstyle,
marker=marker)
ax.set_title(title)
ax.set_xlabel(labelx)
ax.set_ylabel(labely)
ax.set_ylim(bottom=ymin, top=ymax)
ax.set_xlim([tvec[0], tvec[-1]])
# Turn on the grid
ax.grid()
if timeformat is not None:
ax.xaxis.set_major_formatter(mdates.DateFormatter(timeformat))
# rotates and right aligns the x labels, and moves the bottom of the
# axes up to make room for them
fig.autofmt_xdate()
# Make a tight layout
fig.tight_layout()
for fname in fname_list:
fig.savefig(fname, dpi=dpi)
plt.close(fig)
return fname_list
def plot_timeseries_comp(date1, value1, date2, value2, fname_list,
labelx='Time [UTC]', labely='Value',
label1='Sensor 1', label2='Sensor 2',
titl='Time Series Comparison', period1=0, period2=0,
ymin=None, ymax=None, dpi=72):
"""
plots 2 time series in the same graph
Parameters
----------
date1 : datetime object
time of the first time series
value1 : float array
values of the first time series
date2 : datetime object
time of the second time series
value2 : float array
values of the second time series
fname_list : list of str
list of names of the files where to store the plot
labelx : str
The label of the X axis
labely : str
The label of the Y axis
label1, label2 : str
legend label for each time series
titl : str
The figure title
period1, period2 : float
measurement period in seconds used to compute accumulation. If 0 no
accumulation is computed
dpi : int
dots per inch
ymin, ymax : float
The limits of the Y-axis. None will keep the default limit.
Returns
-------
fname_list : list of str
list of names of the created plots
History
--------
201?.??.?? -fvj- created
2017.08.21 -jgr- changed some graphical aspects
"""
if (period1 > 0) and (period2 > 0):
# TODO: document this and check (sometimes artefacts)
value1 *= (period1/3600.)
value1 = np.ma.cumsum(value1)
value2 *= (period2/3600.)
value2 = np.ma.cumsum(value2)
fig, ax = plt.subplots(figsize=[10, 6.5], dpi=dpi)
ax.plot(date1, value1, 'b', label=label1, linestyle='--', marker='o')
ax.plot(date2, value2, 'r', label=label2, linestyle='--', marker='s')
ax.legend(loc='best')
ax.set_xlabel(labelx)
ax.set_ylabel(labely)
ax.set_title(titl)
ax.grid()
ax.set_ylim(bottom=ymin, top=ymax)
ax.set_xlim([date2[0], date2[-1]])
# rotates and right aligns the x labels, and moves the bottom of the
# axes up to make room for them
fig.autofmt_xdate()
# Make a tight layout
fig.tight_layout()
for fname in fname_list:
fig.savefig(fname, dpi=dpi)
plt.close(fig)
return fname_list
def plot_monitoring_ts(date, np_t, cquant, lquant, hquant, field_name,
fname_list, ref_value=None, vmin=None, vmax=None,
np_min=0, labelx='Time [UTC]', labely='Value',
titl='Time Series', dpi=72):
"""
plots a time series of monitoring data
Parameters
----------
date : datetime object
time of the time series
np_t : int array
number of points
cquant, lquant, hquant : float array
values of the central, low and high quantiles
field_name : str
name of the field
fname_list : list of str
list of names of the files where to store the plot
ref_value : float
the reference value
vmin, vmax : float
The limits of the y axis
np_min : int
minimum number of points to consider the sample plotable
labelx : str
The label of the X axis
labely : str
The label of the Y axis
titl : str
The figure title
dpi : int
dots per inch
Returns
-------
fname_list : list of str
list of names of the created plots
"""
vmin_pyart, vmax_pyart = pyart.config.get_field_limits(field_name)
if vmin is None:
vmin = vmin_pyart
if vmax is None:
vmax = vmax_pyart
# plot only valid data (but keep first and last date)
date2 = np.array(date)
isvalid = np.logical_not(np.ma.getmaskarray(cquant))
if np_min > 0:
has_np = np_t > np_min
isvalid = np.logical_and(isvalid, has_np)
cquant_plt = cquant[isvalid]
lquant_plt = lquant[isvalid]
hquant_plt = hquant[isvalid]
date_plt = date2[isvalid]
if not isvalid[0]:
cquant_plt = np.ma.append(np.ma.masked, cquant_plt)
lquant_plt = np.ma.append(np.ma.masked, lquant_plt)
hquant_plt = np.ma.append(np.ma.masked, hquant_plt)
date_plt = np.ma.append(date2[0], date_plt)
if not isvalid[-1]:
cquant_plt = np.ma.append(cquant_plt, np.ma.masked)
lquant_plt = np.ma.append(lquant_plt, np.ma.masked)
hquant_plt = np.ma.append(hquant_plt, np.ma.masked)
date_plt = np.ma.append(date_plt, date2[-1])
fig = plt.figure(figsize=[15, 13], dpi=dpi)
ax = fig.add_subplot(2, 1, 1)
ax.plot(date_plt, cquant_plt, 'x-')
ax.plot(date_plt, lquant_plt, 'rx-')
ax.plot(date_plt, hquant_plt, 'rx-')
if ref_value is not None:
ax.plot(date_plt, np.zeros(len(date_plt))+ref_value, 'k--')
ax.set_ylabel(labely)
ax.set_title(titl)
ax.set_ylim([vmin, vmax])
# tight x axis
ax.autoscale(enable=True, axis='x', tight=True)
ax.grid(True)
ax = fig.add_subplot(2, 1, 2)
ax.plot(date, np_t, 'x-')
if np_min is not None:
ax.plot(date, np.zeros(len(date))+np_min, 'k--')
ax.set_ylabel('Number of Samples')
ax.set_xlabel(labelx)
# rotates and right aligns the x labels, and moves the bottom of the
# axes up to make room for them
fig.autofmt_xdate()
# tight x axis
ax.autoscale(enable=True, axis='x', tight=True)
for fname in fname_list:
fig.savefig(fname, dpi=dpi)
plt.close(fig)
return fname_list
def plot_intercomp_scores_ts(date_vec, np_vec, meanbias_vec, medianbias_vec,
quant25bias_vec, quant75bias_vec, modebias_vec,
corr_vec, slope_vec, intercep_vec,
intercep_slope1_vec, fname_list, ref_value=0.,
np_min=0, corr_min=0.,
labelx='Time UTC',
titl='RADAR001-RADAR002 intercomparison',
dpi=72):
"""
plots a time series of radar intercomparison scores
Parameters
----------
date_vec : datetime object
time of the time series
np_vec : int array
number of points
meanbias_vec, medianbias_vec, modebias_vec : float array
mean, median and mode bias
quant25bias_vec, quant75bias_vec: 25th and 75th percentile of the bias
corr_vec : float array
correlation
slope_vec, intercep_vec : float array
slope and intercep of a linear regression
intercep_slope1_vec : float
the intercep point of a inear regression of slope 1
ref_value : float
the reference value
np_min : int
The minimum number of points to consider the result valid
corr_min : float
The minimum correlation to consider the results valid
labelx : str
The label of the X axis
titl : str
The figure title
Returns
-------
fname_list : list of str
list of names of the created plots
"""
# plot only valid data (but keep first and last date)
date2 = np.array(date_vec)
isvalid = np.logical_not(np.ma.getmaskarray(meanbias_vec))
isvalid_corr = np.logical_not(np.ma.getmaskarray(corr_vec))
if np_min > 0:
has_np = np_vec > np_min
isvalid = np.logical_and(isvalid, has_np)
if corr_min > 0:
has_corr_min = corr_vec > corr_min
isvalid = np.logical_and(isvalid, has_corr_min)
meanbias_plt = meanbias_vec[isvalid]
medianbias_plt = medianbias_vec[isvalid]
quant25bias_plt = quant25bias_vec[isvalid]
quant75bias_plt = quant75bias_vec[isvalid]
modebias_plt = modebias_vec[isvalid]
intercep_plt = intercep_slope1_vec[isvalid]
corr_plt = corr_vec[isvalid_corr]
date_corr = date2[isvalid_corr]
date_plt = date2[isvalid]
if not isvalid[0]:
meanbias_plt = np.ma.append(np.ma.masked, meanbias_plt)
medianbias_plt = np.ma.append(np.ma.masked, medianbias_plt)
quant25bias_plt = np.ma.append(np.ma.masked, quant25bias_plt)
quant75bias_plt = np.ma.append(np.ma.masked, quant75bias_plt)
modebias_plt = np.ma.append(np.ma.masked, modebias_plt)
intercep_plt = np.ma.append(np.ma.masked, intercep_plt)
date_plt = np.ma.append(date2[0], date_plt)
if not isvalid[-1]:
meanbias_plt = np.ma.append(meanbias_plt, np.ma.masked)
medianbias_plt = np.ma.append(medianbias_plt, np.ma.masked)
quant25bias_plt = np.ma.append(quant25bias_plt, np.ma.masked)
quant75bias_plt = np.ma.append(quant75bias_plt, np.ma.masked)
modebias_plt = np.ma.append(modebias_plt, np.ma.masked)
intercep_plt = np.ma.append(intercep_plt, np.ma.masked)
date_plt = np.ma.append(date_plt, date2[-1])
if not isvalid_corr[0]:
corr_plt = np.ma.append(np.ma.masked, corr_plt)
date_corr = np.ma.append(date2[0], date_corr)
if not isvalid_corr[-1]:
corr_plt = np.ma.append(corr_plt, np.ma.masked)
date_corr = np.ma.append(date_corr, date2[-1])
fig = plt.figure(figsize=[10, 20], dpi=dpi)
ax = fig.add_subplot(4, 1, 1)
ax.plot(date_plt, medianbias_plt, 'bx-', label='median')
ax.plot(date_plt, meanbias_plt, 'rx-', label='mean')
ax.plot(date_plt, modebias_plt, 'gx-', label='mode')
ax.plot(date_plt, intercep_plt, 'yx-', label='intercep of slope 1 LR')
if ref_value is not None:
ax.plot(date_plt, np.zeros(len(date_plt))+ref_value, 'k--')
# plt.legend(loc='best')
ax.set_ylabel('bias [dB]')
ax.set_title(titl)
ax.set_ylim([-5., 5.])
# tight x axis
ax.autoscale(enable=True, axis='x', tight=True)
ax.grid(True)
ax = fig.add_subplot(4, 1, 2)
ax.plot(date_plt, medianbias_plt, 'bx-', label='median')
ax.plot(date_plt, quant25bias_plt, 'rx-', label='25-percentile')
ax.plot(date_plt, quant75bias_plt, 'rx-', label='75-percentile')
if ref_value is not None:
ax.plot(date_plt, np.zeros(len(date_plt))+ref_value, 'k--')
# plt.legend(loc='best')
ax.set_ylabel('bias [dB]')
ax.set_ylim([-5., 5.])
# tight x axis
ax.autoscale(enable=True, axis='x', tight=True)
ax.grid(True)
ax = fig.add_subplot(4, 1, 3)
ax.plot(date_corr, corr_plt, 'bx-')
if corr_min > 0:
ax.plot(date_corr, np.zeros(len(date_corr))+corr_min, 'k--')
ax.set_ylabel('correlation')
ax.set_ylim([0., 1.])
# tight x axis
ax.autoscale(enable=True, axis='x', tight=True)
ax.grid(True)
ax = fig.add_subplot(4, 1, 4)
ax.plot(date2, np_vec, 'bx-')
if np_min > 0:
ax.plot(date2, np.zeros(len(date2))+np_min, 'k--')
ax.set_ylabel('Number of Samples')
ax.set_xlabel(labelx)
# tight x axis
ax.autoscale(enable=True, axis='x', tight=True)
# rotates and right aligns the x labels, and moves the bottom of the
# axes up to make room for them
fig.autofmt_xdate()
for fname in fname_list:
fig.savefig(fname, dpi=dpi)
plt.close(fig)
return fname_list
def plot_ml_ts(dt_ml_arr, ml_top_avg_arr, ml_top_std_arr, thick_avg_arr,
thick_std_arr, nrays_valid_arr, nrays_total_arr, fname_list,
labelx='Time UTC', titl='Melting layer time series', dpi=72):
"""
plots a time series of melting layer data
Parameters
----------
dt_ml_arr : datetime object
time of the time series
np_vec : int array
number of points
meanbias_vec, medianbias_vec, modebias_vec : float array
mean, median and mode bias
quant25bias_vec, quant75bias_vec: 25th and 75th percentile of the bias
corr_vec : float array
correlation
slope_vec, intercep_vec : float array
slope and intercep of a linear regression
intercep_slope1_vec : float
the intercep point of a inear regression of slope 1
ref_value : float
the reference value
np_min : int
The minimum number of points to consider the result valid
corr_min : float
The minimum correlation to consider the results valid
labelx : str
The label of the X axis
titl : str
The figure title
Returns
-------
fname_list : list of str
list of names of the created plots
"""
fig = plt.figure(figsize=[10, 15], dpi=dpi)
ax = fig.add_subplot(3, 1, 1)
ax.plot(dt_ml_arr, ml_top_avg_arr, 'bx-', label='avg')
ax.plot(dt_ml_arr, ml_top_avg_arr+ml_top_std_arr, 'rx-', label='avg+std')
ax.plot(dt_ml_arr, ml_top_avg_arr-ml_top_std_arr, 'rx-', label='avg-std')
# plt.legend(loc='best')
ax.set_ylabel('Top height [m MSL]')
ax.set_title(titl)
ax.set_ylim([0., 6000.])
ax.set_xlim([dt_ml_arr[0], dt_ml_arr[-1]])
# tight x axis
ax.autoscale(enable=True, axis='x', tight=True)
ax.grid(True)
ax = fig.add_subplot(3, 1, 2)
ax.plot(dt_ml_arr, thick_avg_arr, 'bx-', label='avg')
ax.plot(dt_ml_arr, thick_avg_arr+thick_std_arr, 'rx-', label='avg+std')
ax.plot(dt_ml_arr, thick_avg_arr-thick_std_arr, 'rx-', label='avg-std')
# plt.legend(loc='best')
ax.set_ylabel('Thickness [m]')
ax.set_ylim([0., 3000.])
ax.set_xlim([dt_ml_arr[0], dt_ml_arr[-1]])
# tight x axis
ax.autoscale(enable=True, axis='x', tight=True)
ax.grid(True)
ax = fig.add_subplot(3, 1, 3)
ax.plot(dt_ml_arr, nrays_valid_arr, 'bx-', label='N valid rays')
ax.plot(dt_ml_arr, nrays_total_arr, 'rx-', label='rays total')
# plt.legend(loc='best')
ax.set_ylabel('Rays')
ax.set_xlabel(labelx)
ax.set_ylim([0, np.max(nrays_total_arr)+5])
ax.set_xlim([dt_ml_arr[0], dt_ml_arr[-1]])
# tight x axis
ax.autoscale(enable=True, axis='x', tight=True)
ax.grid(True)
# rotates and right aligns the x labels, and moves the bottom of the
# axes up to make room for them
fig.autofmt_xdate()
for fname in fname_list:
fig.savefig(fname, dpi=dpi)
plt.close(fig)
return fname_list
def plot_sun_retrieval_ts(sun_retrieval, data_type, fname_list, labelx='Date',
titl='Sun retrieval Time Series', dpi=72):
"""
plots sun retrieval time series series
Parameters
----------
sun_retrieval : tuple
tuple containing the retrieved parameters
data_type : str
parameter to be plotted
fname_list : list of str
list of names of the files where to store the plot
labelx : str
the x label
titl : str
the title of the plot
dpi : int
dots per inch
Returns
-------
fname_list : list of str
list of names of the created plots
"""
value_std = None
ref = None
date = sun_retrieval[1]
if data_type == 'nhits_h':
value = sun_retrieval[2]
labely = 'Number of sun hits H channel'
vmin = 0
vmax = np.max(sun_retrieval[2])+1
elif data_type == 'el_width_h':
value = sun_retrieval[3]
labely = 'Elevation beamwidth H channel (Deg)'
vmin = 0.
vmax = 4.
elif data_type == 'az_width_h':
value = sun_retrieval[4]
labely = 'Azimuth beamwidth H channel (Deg)'
vmin = 0.
vmax = 4.
elif data_type == 'el_bias_h':
value = sun_retrieval[5]
ref = np.zeros(len(value))
labely = 'Elevation pointing bias H channel (Deg)'
vmin = -2.
vmax = 2.
elif data_type == 'az_bias_h':
value = sun_retrieval[6]
ref = np.zeros(len(value))
labely = 'Azimuth pointing bias H channel (Deg)'
vmin = -2.
vmax = 2.
elif data_type == 'dBm_sun_est':
value = sun_retrieval[7]
value_std = sun_retrieval[8]
labely = 'Sun Power H channel (dBm)'
vmin = -110.
vmax = -90.
elif data_type == 'rx_bias_h':
value = (10.*np.ma.log10(sun_retrieval[9]) -
10.*np.ma.log10(sun_retrieval[21]))
value_std = sun_retrieval[8]
ref = np.zeros(len(value))
labely = 'Receiver bias H channel (dB)'
vmin = -5.
vmax = 5.
elif data_type == 'sf_h':
value = 10.*np.ma.log10(sun_retrieval[9])
# value_std = sun_retrieval[8]
ref = 10.*np.ma.log10(sun_retrieval[21])
labely = 'Observed solar flux H channel (dB(sfu))'
vmin = 15.
vmax = 30.
elif data_type == 'nhits_v':
value = sun_retrieval[10]
labely = 'Number of sun hits V channel'
vmin = 0
vmax = np.max(sun_retrieval[10])+1
elif data_type == 'el_width_v':
value = sun_retrieval[11]
labely = 'Elevation beamwidth V channel (Deg)'
vmin = 0.
vmax = 4.
elif data_type == 'az_width_v':
value = sun_retrieval[12]
labely = 'Azimuth beamwidth V channel (Deg)'
vmin = 0.
vmax = 4.
elif data_type == 'el_bias_v':
value = sun_retrieval[13]
ref = np.zeros(len(value))
labely = 'Elevation pointing bias V channel (Deg)'
vmin = -2.
vmax = 2.
elif data_type == 'az_bias_v':
value = sun_retrieval[14]
ref = np.zeros(len(value))
labely = 'Azimuth pointing bias V channel (Deg)'
vmin = -2.
vmax = 2.
elif data_type == 'dBmv_sun_est':
value = sun_retrieval[15]
value_std = sun_retrieval[16]
labely = 'Sun Power V channel (dBm)'
vmin = -110.
vmax = -90.
elif data_type == 'rx_bias_v':
value = (10.*np.ma.log10(sun_retrieval[17]) -
10.*np.ma.log10(sun_retrieval[21]))
value_std = sun_retrieval[16]
ref = np.zeros(len(value))
labely = 'Receiver bias V channel (dB)'
vmin = -5.
vmax = 5.
elif data_type == 'sf_v':
value = 10.*np.ma.log10(sun_retrieval[17])
# value_std = sun_retrieval[16]
ref = 10.*np.ma.log10(sun_retrieval[21])
labely = 'Observed solar flux V channel (dB(sfu))'
vmin = 15.
vmax = 30.
elif data_type == 'nhits_zdr':
value = sun_retrieval[18]
labely = 'Number of sun hits ZDR'
vmin = 0
vmax = np.max(sun_retrieval[18])+1
elif data_type == 'ZDR_sun_est':
value = sun_retrieval[19]
value_std = sun_retrieval[20]
ref = np.zeros(len(value))
labely = 'Sun ZDR (dB)'
vmin = -2.
vmax = 2.
mask = np.ma.getmaskarray(value)
if mask.all():
warn('Unable to create figure '+' '.join(fname_list) +
'. No valid data')
return None
# plot only valid data (but keep first and last date)
isvalid = np.logical_not(mask)
date2 = np.array(date)
value_plt = value[isvalid]
date_plt = date2[isvalid]
if not isvalid[0]:
value_plt = np.ma.append(np.ma.masked, value_plt)
date_plt = np.ma.append(date2[0], date_plt)
if not isvalid[-1]:
value_plt = np.ma.append(value_plt, np.ma.masked)
date_plt = np.ma.append(date_plt, date2[-1])
fig, ax = plt.subplots(figsize=[10, 6], dpi=dpi)
ax.plot(date_plt, value_plt, 'x-')
if value_std is not None:
value_std_plt = value_std[isvalid]
if not isvalid[0]:
value_std_plt = np.ma.append(np.ma.masked, value_std_plt)
if not isvalid[-1]:
value_std_plt = np.ma.append(value_std_plt, np.ma.masked)
ax.plot(date_plt, value_plt+value_std_plt, 'rx-')
ax.plot(date_plt, value_plt-value_std_plt, 'rx-')
if ref is not None:
ref_plt = ref[isvalid]
if not isvalid[0]:
ref_plt = np.ma.append(ref[0], ref_plt)
if not isvalid[-1]:
ref_plt = np.ma.append(ref_plt, ref[-1])
ax.plot(date_plt, ref_plt, 'k--')
ax.set_xlabel(labelx)
ax.set_ylabel(labely)
ax.set_title(titl)
ax.set_ylim([vmin, vmax])
ax.set_xlim([date_plt[0], date_plt[-1]])
# tight x axis
ax.autoscale(enable=True, axis='x', tight=True)
ax.grid(True)
# rotates and right aligns the x labels, and moves the bottom of the
# axes up to make room for them
fig.autofmt_xdate()
for fname in fname_list:
fig.savefig(fname, dpi=dpi)
plt.close(fig)
return fname_list
| [
37811,
198,
79,
2417,
324,
13,
34960,
13,
29487,
62,
22355,
10640,
198,
4770,
2559,
18604,
198,
198,
24629,
2733,
284,
7110,
27958,
324,
40522,
198,
198,
492,
44619,
388,
6874,
3712,
198,
220,
220,
220,
1058,
1462,
310,
631,
25,
7560,
14,
628,
220,
220,
220,
7110,
62,
22355,
10640,
198,
220,
220,
220,
7110,
62,
22355,
10640,
62,
5589,
198,
220,
220,
220,
7110,
62,
41143,
278,
62,
912,
198,
220,
220,
220,
7110,
62,
3849,
5589,
62,
1416,
2850,
62,
912,
198,
220,
220,
220,
7110,
62,
4029,
62,
912,
198,
220,
220,
220,
7110,
62,
19155,
62,
1186,
380,
18206,
62,
912,
198,
198,
37811,
198,
198,
6738,
14601,
1330,
9828,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
2603,
29487,
8019,
355,
285,
489,
198,
76,
489,
13,
1904,
10786,
46384,
11537,
198,
198,
2,
25285,
257,
1643,
10369,
2546,
198,
76,
489,
13,
6015,
10044,
4105,
13,
19119,
15090,
6,
10331,
13,
7857,
10354,
1467,
30072,
198,
76,
489,
13,
6015,
10044,
4105,
13,
19119,
15090,
6,
10331,
13,
17989,
10354,
220,
366,
82,
504,
12,
2655,
361,
20662,
8,
198,
198,
11748,
2603,
29487,
8019,
13,
19581,
355,
285,
19581,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
11748,
12972,
433,
628,
198,
4299,
7110,
62,
22355,
10640,
7,
83,
35138,
11,
1366,
62,
4868,
11,
277,
3672,
62,
4868,
11,
6167,
87,
11639,
7575,
685,
17429,
60,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
11639,
11395,
3256,
14722,
28,
17816,
47864,
6,
4357,
3670,
11639,
7575,
7171,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2278,
28,
15,
11,
640,
18982,
28,
14202,
11,
7577,
28,
14202,
11,
9493,
42530,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19736,
28,
14202,
11,
331,
1084,
28,
14202,
11,
331,
9806,
28,
14202,
11,
288,
14415,
28,
4761,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
21528,
257,
640,
2168,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
256,
35138,
1058,
4818,
8079,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
640,
286,
262,
640,
2168,
198,
220,
220,
220,
1366,
62,
4868,
1058,
1351,
286,
12178,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
3815,
286,
262,
640,
2168,
198,
220,
220,
220,
277,
3672,
62,
4868,
1058,
1351,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
286,
3891,
286,
262,
3696,
810,
284,
3650,
262,
7110,
198,
220,
220,
220,
6167,
87,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
6167,
286,
262,
1395,
16488,
198,
220,
220,
220,
2248,
68,
306,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
6167,
286,
262,
575,
16488,
198,
220,
220,
220,
14722,
1058,
7177,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
6167,
286,
262,
8177,
198,
220,
220,
220,
3670,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
3785,
3670,
198,
220,
220,
220,
2278,
1058,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
15558,
2278,
287,
4201,
973,
284,
24061,
24106,
13,
1002,
657,
645,
198,
220,
220,
220,
220,
220,
220,
220,
24106,
318,
29231,
198,
220,
220,
220,
640,
18982,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
18291,
6945,
262,
256,
35138,
290,
640,
5794,
319,
262,
2124,
16488,
198,
220,
220,
220,
7577,
1058,
7177,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
18291,
6945,
262,
7577,
286,
1123,
1627,
198,
220,
220,
220,
9493,
42530,
1058,
7177,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
18291,
6945,
262,
1627,
3918,
286,
1123,
1627,
198,
220,
220,
220,
19736,
25,
7177,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
18291,
1958,
262,
19736,
284,
307,
973,
329,
1123,
1627,
198,
220,
220,
220,
331,
1084,
11,
331,
9806,
25,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
16048,
14,
52,
2848,
4179,
286,
331,
16488,
198,
220,
220,
220,
288,
14415,
1058,
493,
198,
220,
220,
220,
220,
220,
220,
220,
22969,
583,
11111,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
277,
3672,
62,
4868,
1058,
1351,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
286,
3891,
286,
262,
2727,
21528,
628,
220,
220,
220,
7443,
198,
220,
220,
220,
24200,
198,
220,
220,
220,
580,
30,
13,
3548,
13,
3548,
532,
69,
85,
73,
12,
6282,
198,
220,
220,
220,
2177,
13,
2919,
13,
2481,
532,
73,
2164,
12,
9518,
20241,
290,
10706,
1343,
4159,
27831,
5992,
198,
220,
220,
220,
2864,
13,
3070,
13,
2713,
532,
73,
2164,
12,
2087,
2124,
12,
32374,
286,
2124,
16488,
284,
3368,
19125,
4049,
6218,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
2278,
1875,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
11,
1366,
287,
27056,
378,
7,
7890,
62,
4868,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
1635,
28,
357,
41007,
14,
2623,
405,
2014,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
62,
4868,
58,
72,
60,
796,
45941,
13,
2611,
13,
66,
5700,
388,
7,
7890,
8,
628,
220,
220,
220,
2336,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
7,
5647,
7857,
41888,
940,
11,
718,
4357,
288,
14415,
28,
67,
14415,
8,
628,
220,
220,
220,
2248,
796,
6045,
198,
220,
220,
220,
951,
796,
6045,
198,
220,
220,
220,
300,
7635,
796,
705,
438,
6,
198,
220,
220,
220,
18364,
796,
705,
78,
6,
628,
220,
220,
220,
329,
1312,
11,
1366,
287,
27056,
378,
7,
7890,
62,
4868,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
611,
14722,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2248,
796,
14722,
58,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
7577,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
796,
7577,
58,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
9493,
42530,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
7635,
796,
9493,
42530,
58,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
19736,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18364,
796,
19736,
58,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
29487,
7,
83,
35138,
11,
1366,
11,
6167,
28,
23912,
11,
3124,
28,
4033,
11,
9493,
10992,
28,
75,
7635,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18364,
28,
4102,
263,
8,
628,
220,
220,
220,
7877,
13,
2617,
62,
7839,
7,
7839,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
7,
18242,
87,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
7,
75,
11231,
306,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
88,
2475,
7,
22487,
28,
88,
1084,
11,
1353,
28,
4948,
897,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
2475,
26933,
83,
35138,
58,
15,
4357,
256,
35138,
58,
12,
16,
11907,
8,
628,
220,
220,
220,
1303,
6756,
319,
262,
10706,
198,
220,
220,
220,
7877,
13,
25928,
3419,
628,
220,
220,
220,
611,
640,
18982,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
22478,
62,
687,
1436,
7,
9132,
689,
13,
10430,
8479,
1436,
7,
2435,
18982,
4008,
628,
220,
220,
220,
1303,
5724,
689,
290,
826,
10548,
82,
262,
2124,
14722,
11,
290,
6100,
262,
4220,
286,
262,
198,
220,
220,
220,
1303,
34197,
510,
284,
787,
2119,
329,
606,
198,
220,
220,
220,
2336,
13,
2306,
1659,
16762,
62,
87,
4475,
3419,
628,
220,
220,
220,
1303,
6889,
257,
5381,
12461,
198,
220,
220,
220,
2336,
13,
33464,
62,
39786,
3419,
628,
220,
220,
220,
329,
277,
3672,
287,
277,
3672,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2336,
13,
21928,
5647,
7,
69,
3672,
11,
288,
14415,
28,
67,
14415,
8,
198,
220,
220,
220,
458,
83,
13,
19836,
7,
5647,
8,
628,
220,
220,
220,
1441,
277,
3672,
62,
4868,
628,
198,
4299,
7110,
62,
22355,
10640,
62,
5589,
7,
4475,
16,
11,
1988,
16,
11,
3128,
17,
11,
1988,
17,
11,
277,
3672,
62,
4868,
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,
6167,
87,
11639,
7575,
685,
17429,
60,
3256,
2248,
68,
306,
11639,
11395,
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,
6167,
16,
11639,
47864,
352,
3256,
6167,
17,
11639,
47864,
362,
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,
5259,
75,
11639,
7575,
7171,
34420,
3256,
2278,
16,
28,
15,
11,
2278,
17,
28,
15,
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,
331,
1084,
28,
14202,
11,
331,
9806,
28,
14202,
11,
288,
14415,
28,
4761,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
21528,
362,
640,
2168,
287,
262,
976,
4823,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
3128,
16,
1058,
4818,
8079,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
640,
286,
262,
717,
640,
2168,
198,
220,
220,
220,
1988,
16,
1058,
12178,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
3815,
286,
262,
717,
640,
2168,
198,
220,
220,
220,
3128,
17,
1058,
4818,
8079,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
640,
286,
262,
1218,
640,
2168,
198,
220,
220,
220,
1988,
17,
1058,
12178,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
3815,
286,
262,
1218,
640,
2168,
198,
220,
220,
220,
277,
3672,
62,
4868,
1058,
1351,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
286,
3891,
286,
262,
3696,
810,
284,
3650,
262,
7110,
198,
220,
220,
220,
6167,
87,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
6167,
286,
262,
1395,
16488,
198,
220,
220,
220,
2248,
68,
306,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
6167,
286,
262,
575,
16488,
198,
220,
220,
220,
6167,
16,
11,
6167,
17,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
8177,
6167,
329,
1123,
640,
2168,
198,
220,
220,
220,
5259,
75,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
3785,
3670,
198,
220,
220,
220,
220,
2278,
16,
11,
2278,
17,
1058,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
15558,
2278,
287,
4201,
973,
284,
24061,
24106,
13,
1002,
657,
645,
198,
220,
220,
220,
220,
220,
220,
220,
24106,
318,
29231,
198,
220,
220,
220,
288,
14415,
1058,
493,
198,
220,
220,
220,
220,
220,
220,
220,
22969,
583,
11111,
198,
220,
220,
220,
331,
1084,
11,
331,
9806,
1058,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
383,
7095,
286,
262,
575,
12,
22704,
13,
6045,
481,
1394,
262,
4277,
4179,
13,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
277,
3672,
62,
4868,
1058,
1351,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
286,
3891,
286,
262,
2727,
21528,
628,
220,
220,
220,
7443,
198,
220,
220,
220,
24200,
198,
220,
220,
220,
580,
30,
13,
3548,
13,
3548,
532,
69,
85,
73,
12,
2727,
198,
220,
220,
220,
2177,
13,
2919,
13,
2481,
532,
73,
2164,
12,
3421,
617,
27831,
7612,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
357,
41007,
16,
1875,
657,
8,
290,
357,
41007,
17,
1875,
657,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
16926,
46,
25,
3188,
428,
290,
2198,
357,
29810,
46252,
37473,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
16,
1635,
28,
357,
41007,
16,
14,
2623,
405,
2014,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
16,
796,
45941,
13,
2611,
13,
66,
5700,
388,
7,
8367,
16,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1988,
17,
1635,
28,
357,
41007,
17,
14,
2623,
405,
2014,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
17,
796,
45941,
13,
2611,
13,
66,
5700,
388,
7,
8367,
17,
8,
628,
220,
220,
220,
2336,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
7,
5647,
7857,
41888,
940,
11,
718,
13,
20,
4357,
288,
14415,
28,
67,
14415,
8,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
16,
11,
1988,
16,
11,
705,
65,
3256,
6167,
28,
18242,
16,
11,
9493,
10992,
11639,
438,
3256,
18364,
11639,
78,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
17,
11,
1988,
17,
11,
705,
81,
3256,
6167,
28,
18242,
17,
11,
9493,
10992,
11639,
438,
3256,
18364,
11639,
82,
11537,
198,
220,
220,
220,
7877,
13,
1455,
437,
7,
17946,
11639,
13466,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
7,
18242,
87,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
7,
75,
11231,
306,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
7839,
7,
83,
270,
75,
8,
628,
220,
220,
220,
7877,
13,
25928,
3419,
628,
220,
220,
220,
7877,
13,
2617,
62,
88,
2475,
7,
22487,
28,
88,
1084,
11,
1353,
28,
4948,
897,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
2475,
26933,
4475,
17,
58,
15,
4357,
3128,
17,
58,
12,
16,
11907,
8,
628,
220,
220,
220,
1303,
5724,
689,
290,
826,
10548,
82,
262,
2124,
14722,
11,
290,
6100,
262,
4220,
286,
262,
198,
220,
220,
220,
1303,
34197,
510,
284,
787,
2119,
329,
606,
198,
220,
220,
220,
2336,
13,
2306,
1659,
16762,
62,
87,
4475,
3419,
628,
220,
220,
220,
1303,
6889,
257,
5381,
12461,
198,
220,
220,
220,
2336,
13,
33464,
62,
39786,
3419,
628,
220,
220,
220,
329,
277,
3672,
287,
277,
3672,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2336,
13,
21928,
5647,
7,
69,
3672,
11,
288,
14415,
28,
67,
14415,
8,
198,
220,
220,
220,
458,
83,
13,
19836,
7,
5647,
8,
628,
220,
220,
220,
1441,
277,
3672,
62,
4868,
628,
198,
4299,
7110,
62,
41143,
278,
62,
912,
7,
4475,
11,
45941,
62,
83,
11,
269,
40972,
11,
300,
40972,
11,
289,
40972,
11,
2214,
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,
277,
3672,
62,
4868,
11,
1006,
62,
8367,
28,
14202,
11,
410,
1084,
28,
14202,
11,
410,
9806,
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,
45941,
62,
1084,
28,
15,
11,
6167,
87,
11639,
7575,
685,
17429,
60,
3256,
2248,
68,
306,
11639,
11395,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5259,
75,
11639,
7575,
7171,
3256,
288,
14415,
28,
4761,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
21528,
257,
640,
2168,
286,
9904,
1366,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
3128,
1058,
4818,
8079,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
640,
286,
262,
640,
2168,
198,
220,
220,
220,
45941,
62,
83,
1058,
493,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
1271,
286,
2173,
198,
220,
220,
220,
269,
40972,
11,
300,
40972,
11,
289,
40972,
1058,
12178,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
3815,
286,
262,
4318,
11,
1877,
290,
1029,
5554,
2915,
198,
220,
220,
220,
2214,
62,
3672,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
286,
262,
2214,
198,
220,
220,
220,
277,
3672,
62,
4868,
1058,
1351,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
286,
3891,
286,
262,
3696,
810,
284,
3650,
262,
7110,
198,
220,
220,
220,
1006,
62,
8367,
1058,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
262,
4941,
1988,
198,
220,
220,
220,
410,
1084,
11,
410,
9806,
1058,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
383,
7095,
286,
262,
331,
16488,
198,
220,
220,
220,
45941,
62,
1084,
1058,
493,
198,
220,
220,
220,
220,
220,
220,
220,
5288,
1271,
286,
2173,
284,
2074,
262,
6291,
7110,
540,
198,
220,
220,
220,
6167,
87,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
6167,
286,
262,
1395,
16488,
198,
220,
220,
220,
2248,
68,
306,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
6167,
286,
262,
575,
16488,
198,
220,
220,
220,
5259,
75,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
3785,
3670,
198,
220,
220,
220,
288,
14415,
1058,
493,
198,
220,
220,
220,
220,
220,
220,
220,
22969,
583,
11111,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
277,
3672,
62,
4868,
1058,
1351,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
286,
3891,
286,
262,
2727,
21528,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
410,
1084,
62,
9078,
433,
11,
410,
9806,
62,
9078,
433,
796,
12972,
433,
13,
11250,
13,
1136,
62,
3245,
62,
49196,
7,
3245,
62,
3672,
8,
198,
220,
220,
220,
611,
410,
1084,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
410,
1084,
62,
9078,
433,
198,
220,
220,
220,
611,
410,
9806,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
410,
9806,
62,
9078,
433,
628,
220,
220,
220,
1303,
7110,
691,
4938,
1366,
357,
4360,
1394,
717,
290,
938,
3128,
8,
198,
220,
220,
220,
3128,
17,
796,
45941,
13,
18747,
7,
4475,
8,
198,
220,
220,
220,
318,
12102,
796,
45941,
13,
6404,
605,
62,
1662,
7,
37659,
13,
2611,
13,
1136,
27932,
18747,
7,
66,
40972,
4008,
198,
220,
220,
220,
611,
45941,
62,
1084,
1875,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
468,
62,
37659,
796,
45941,
62,
83,
1875,
45941,
62,
1084,
198,
220,
220,
220,
220,
220,
220,
220,
318,
12102,
796,
45941,
13,
6404,
605,
62,
392,
7,
271,
12102,
11,
468,
62,
37659,
8,
628,
220,
220,
220,
269,
40972,
62,
489,
83,
796,
269,
40972,
58,
271,
12102,
60,
198,
220,
220,
220,
300,
40972,
62,
489,
83,
796,
300,
40972,
58,
271,
12102,
60,
198,
220,
220,
220,
289,
40972,
62,
489,
83,
796,
289,
40972,
58,
271,
12102,
60,
198,
220,
220,
220,
3128,
62,
489,
83,
796,
3128,
17,
58,
271,
12102,
60,
198,
220,
220,
220,
611,
407,
318,
12102,
58,
15,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
269,
40972,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
269,
40972,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
300,
40972,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
300,
40972,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
289,
40972,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
289,
40972,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3128,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
4475,
17,
58,
15,
4357,
3128,
62,
489,
83,
8,
198,
220,
220,
220,
611,
407,
318,
12102,
58,
12,
16,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
269,
40972,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
66,
40972,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
220,
220,
300,
40972,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
75,
40972,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
220,
220,
289,
40972,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
71,
40972,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3128,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
4475,
62,
489,
83,
11,
3128,
17,
58,
12,
16,
12962,
628,
220,
220,
220,
2336,
796,
458,
83,
13,
26875,
7,
5647,
7857,
41888,
1314,
11,
1511,
4357,
288,
14415,
28,
67,
14415,
8,
628,
220,
220,
220,
7877,
796,
2336,
13,
2860,
62,
7266,
29487,
7,
17,
11,
352,
11,
352,
8,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
269,
40972,
62,
489,
83,
11,
705,
87,
12,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
300,
40972,
62,
489,
83,
11,
705,
40914,
12,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
289,
40972,
62,
489,
83,
11,
705,
40914,
12,
11537,
198,
220,
220,
220,
611,
1006,
62,
8367,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
45941,
13,
9107,
418,
7,
11925,
7,
4475,
62,
489,
83,
4008,
10,
5420,
62,
8367,
11,
705,
74,
438,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
7,
75,
11231,
306,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
7839,
7,
83,
270,
75,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
88,
2475,
26933,
85,
1084,
11,
410,
9806,
12962,
628,
220,
220,
220,
1303,
5381,
2124,
16488,
198,
220,
220,
220,
7877,
13,
2306,
17500,
1000,
7,
21633,
28,
17821,
11,
16488,
11639,
87,
3256,
5381,
28,
17821,
8,
198,
220,
220,
220,
7877,
13,
25928,
7,
17821,
8,
628,
220,
220,
220,
7877,
796,
2336,
13,
2860,
62,
7266,
29487,
7,
17,
11,
352,
11,
362,
8,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
11,
45941,
62,
83,
11,
705,
87,
12,
11537,
628,
220,
220,
220,
611,
45941,
62,
1084,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
29487,
7,
4475,
11,
45941,
13,
9107,
418,
7,
11925,
7,
4475,
4008,
10,
37659,
62,
1084,
11,
705,
74,
438,
11537,
628,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
15057,
286,
3409,
2374,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
7,
18242,
87,
8,
628,
220,
220,
220,
1303,
5724,
689,
290,
826,
10548,
82,
262,
2124,
14722,
11,
290,
6100,
262,
4220,
286,
262,
198,
220,
220,
220,
1303,
34197,
510,
284,
787,
2119,
329,
606,
198,
220,
220,
220,
2336,
13,
2306,
1659,
16762,
62,
87,
4475,
3419,
628,
220,
220,
220,
1303,
5381,
2124,
16488,
198,
220,
220,
220,
7877,
13,
2306,
17500,
1000,
7,
21633,
28,
17821,
11,
16488,
11639,
87,
3256,
5381,
28,
17821,
8,
628,
220,
220,
220,
329,
277,
3672,
287,
277,
3672,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2336,
13,
21928,
5647,
7,
69,
3672,
11,
288,
14415,
28,
67,
14415,
8,
198,
220,
220,
220,
458,
83,
13,
19836,
7,
5647,
8,
628,
220,
220,
220,
1441,
277,
3672,
62,
4868,
628,
198,
4299,
7110,
62,
3849,
5589,
62,
1416,
2850,
62,
912,
7,
4475,
62,
35138,
11,
45941,
62,
35138,
11,
1612,
65,
4448,
62,
35138,
11,
14288,
65,
4448,
62,
35138,
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,
5554,
1495,
65,
4448,
62,
35138,
11,
5554,
2425,
65,
4448,
62,
35138,
11,
953,
1765,
4448,
62,
35138,
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,
1162,
81,
62,
35138,
11,
22638,
62,
35138,
11,
987,
344,
79,
62,
35138,
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,
987,
344,
79,
62,
6649,
3008,
16,
62,
35138,
11,
277,
3672,
62,
4868,
11,
1006,
62,
8367,
28,
15,
1539,
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,
45941,
62,
1084,
28,
15,
11,
1162,
81,
62,
1084,
28,
15,
1539,
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,
6167,
87,
11639,
7575,
18119,
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,
5259,
75,
11639,
49,
2885,
1503,
8298,
12,
49,
2885,
1503,
21601,
987,
785,
1845,
1653,
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,
288,
14415,
28,
4761,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
21528,
257,
640,
2168,
286,
13428,
987,
785,
1845,
1653,
8198,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
3128,
62,
35138,
1058,
4818,
8079,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
640,
286,
262,
640,
2168,
198,
220,
220,
220,
45941,
62,
35138,
1058,
493,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
1271,
286,
2173,
198,
220,
220,
220,
1612,
65,
4448,
62,
35138,
11,
14288,
65,
4448,
62,
35138,
11,
953,
1765,
4448,
62,
35138,
1058,
12178,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
1612,
11,
14288,
290,
4235,
10690,
198,
220,
220,
220,
5554,
1495,
65,
4448,
62,
35138,
11,
5554,
2425,
65,
4448,
62,
35138,
25,
1679,
400,
290,
5441,
400,
37894,
286,
262,
10690,
198,
220,
220,
220,
1162,
81,
62,
35138,
1058,
12178,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
16096,
198,
220,
220,
220,
22638,
62,
35138,
11,
987,
344,
79,
62,
35138,
1058,
12178,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
22638,
290,
987,
344,
79,
286,
257,
14174,
20683,
198,
220,
220,
220,
987,
344,
79,
62,
6649,
3008,
16,
62,
35138,
1058,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
262,
987,
344,
79,
966,
286,
257,
287,
451,
20683,
286,
22638,
352,
198,
220,
220,
220,
1006,
62,
8367,
1058,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
262,
4941,
1988,
198,
220,
220,
220,
45941,
62,
1084,
1058,
493,
198,
220,
220,
220,
220,
220,
220,
220,
383,
5288,
1271,
286,
2173,
284,
2074,
262,
1255,
4938,
198,
220,
220,
220,
1162,
81,
62,
1084,
1058,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
383,
5288,
16096,
284,
2074,
262,
2482,
4938,
198,
220,
220,
220,
6167,
87,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
6167,
286,
262,
1395,
16488,
198,
220,
220,
220,
5259,
75,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
3785,
3670,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
277,
3672,
62,
4868,
1058,
1351,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
286,
3891,
286,
262,
2727,
21528,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
7110,
691,
4938,
1366,
357,
4360,
1394,
717,
290,
938,
3128,
8,
198,
220,
220,
220,
3128,
17,
796,
45941,
13,
18747,
7,
4475,
62,
35138,
8,
198,
220,
220,
220,
318,
12102,
796,
45941,
13,
6404,
605,
62,
1662,
7,
37659,
13,
2611,
13,
1136,
27932,
18747,
7,
32604,
65,
4448,
62,
35138,
4008,
198,
220,
220,
220,
318,
12102,
62,
10215,
81,
796,
45941,
13,
6404,
605,
62,
1662,
7,
37659,
13,
2611,
13,
1136,
27932,
18747,
7,
10215,
81,
62,
35138,
4008,
198,
220,
220,
220,
611,
45941,
62,
1084,
1875,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
468,
62,
37659,
796,
45941,
62,
35138,
1875,
45941,
62,
1084,
198,
220,
220,
220,
220,
220,
220,
220,
318,
12102,
796,
45941,
13,
6404,
605,
62,
392,
7,
271,
12102,
11,
468,
62,
37659,
8,
198,
220,
220,
220,
611,
1162,
81,
62,
1084,
1875,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
468,
62,
10215,
81,
62,
1084,
796,
1162,
81,
62,
35138,
1875,
1162,
81,
62,
1084,
198,
220,
220,
220,
220,
220,
220,
220,
318,
12102,
796,
45941,
13,
6404,
605,
62,
392,
7,
271,
12102,
11,
468,
62,
10215,
81,
62,
1084,
8,
628,
220,
220,
220,
1612,
65,
4448,
62,
489,
83,
796,
1612,
65,
4448,
62,
35138,
58,
271,
12102,
60,
198,
220,
220,
220,
14288,
65,
4448,
62,
489,
83,
796,
14288,
65,
4448,
62,
35138,
58,
271,
12102,
60,
198,
220,
220,
220,
5554,
1495,
65,
4448,
62,
489,
83,
796,
5554,
1495,
65,
4448,
62,
35138,
58,
271,
12102,
60,
198,
220,
220,
220,
5554,
2425,
65,
4448,
62,
489,
83,
796,
5554,
2425,
65,
4448,
62,
35138,
58,
271,
12102,
60,
198,
220,
220,
220,
953,
1765,
4448,
62,
489,
83,
796,
953,
1765,
4448,
62,
35138,
58,
271,
12102,
60,
198,
220,
220,
220,
987,
344,
79,
62,
489,
83,
796,
987,
344,
79,
62,
6649,
3008,
16,
62,
35138,
58,
271,
12102,
60,
198,
220,
220,
220,
1162,
81,
62,
489,
83,
796,
1162,
81,
62,
35138,
58,
271,
12102,
62,
10215,
81,
60,
198,
220,
220,
220,
3128,
62,
10215,
81,
796,
3128,
17,
58,
271,
12102,
62,
10215,
81,
60,
198,
220,
220,
220,
3128,
62,
489,
83,
796,
3128,
17,
58,
271,
12102,
60,
198,
220,
220,
220,
611,
407,
318,
12102,
58,
15,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
1612,
65,
4448,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
1612,
65,
4448,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
14288,
65,
4448,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
14288,
65,
4448,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
5554,
1495,
65,
4448,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
5554,
1495,
65,
4448,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
5554,
2425,
65,
4448,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
5554,
2425,
65,
4448,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
953,
1765,
4448,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
953,
1765,
4448,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
987,
344,
79,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
987,
344,
79,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3128,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
4475,
17,
58,
15,
4357,
3128,
62,
489,
83,
8,
198,
220,
220,
220,
611,
407,
318,
12102,
58,
12,
16,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
1612,
65,
4448,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
32604,
65,
4448,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
220,
220,
14288,
65,
4448,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
1150,
666,
65,
4448,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
220,
220,
5554,
1495,
65,
4448,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
40972,
1495,
65,
4448,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
220,
220,
5554,
2425,
65,
4448,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
40972,
2425,
65,
4448,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
220,
220,
953,
1765,
4448,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
14171,
65,
4448,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
220,
220,
987,
344,
79,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
3849,
344,
79,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3128,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
4475,
62,
489,
83,
11,
3128,
17,
58,
12,
16,
12962,
628,
220,
220,
220,
611,
407,
318,
12102,
62,
10215,
81,
58,
15,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
1162,
81,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
1162,
81,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3128,
62,
10215,
81,
796,
45941,
13,
2611,
13,
33295,
7,
4475,
17,
58,
15,
4357,
3128,
62,
10215,
81,
8,
198,
220,
220,
220,
611,
407,
318,
12102,
62,
10215,
81,
58,
12,
16,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
1162,
81,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
10215,
81,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3128,
62,
10215,
81,
796,
45941,
13,
2611,
13,
33295,
7,
4475,
62,
10215,
81,
11,
3128,
17,
58,
12,
16,
12962,
628,
220,
220,
220,
2336,
796,
458,
83,
13,
26875,
7,
5647,
7857,
41888,
940,
11,
1160,
4357,
288,
14415,
28,
67,
14415,
8,
628,
220,
220,
220,
7877,
796,
2336,
13,
2860,
62,
7266,
29487,
7,
19,
11,
352,
11,
352,
8,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
14288,
65,
4448,
62,
489,
83,
11,
705,
65,
87,
12,
3256,
6167,
11639,
1150,
666,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
1612,
65,
4448,
62,
489,
83,
11,
705,
40914,
12,
3256,
6167,
11639,
32604,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
953,
1765,
4448,
62,
489,
83,
11,
705,
70,
87,
12,
3256,
6167,
11639,
14171,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
987,
344,
79,
62,
489,
83,
11,
705,
28391,
12,
3256,
6167,
11639,
3849,
344,
79,
286,
22638,
352,
37491,
11537,
198,
220,
220,
220,
611,
1006,
62,
8367,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
45941,
13,
9107,
418,
7,
11925,
7,
4475,
62,
489,
83,
4008,
10,
5420,
62,
8367,
11,
705,
74,
438,
11537,
198,
220,
220,
220,
1303,
458,
83,
13,
1455,
437,
7,
17946,
11639,
13466,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
65,
4448,
685,
36077,
60,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
7839,
7,
83,
270,
75,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
88,
2475,
26933,
12,
20,
1539,
642,
8183,
8,
628,
220,
220,
220,
1303,
5381,
2124,
16488,
198,
220,
220,
220,
7877,
13,
2306,
17500,
1000,
7,
21633,
28,
17821,
11,
16488,
11639,
87,
3256,
5381,
28,
17821,
8,
198,
220,
220,
220,
7877,
13,
25928,
7,
17821,
8,
628,
220,
220,
220,
7877,
796,
2336,
13,
2860,
62,
7266,
29487,
7,
19,
11,
352,
11,
362,
8,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
14288,
65,
4448,
62,
489,
83,
11,
705,
65,
87,
12,
3256,
6167,
11639,
1150,
666,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
5554,
1495,
65,
4448,
62,
489,
83,
11,
705,
40914,
12,
3256,
6167,
11639,
1495,
12,
25067,
576,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
5554,
2425,
65,
4448,
62,
489,
83,
11,
705,
40914,
12,
3256,
6167,
11639,
2425,
12,
25067,
576,
11537,
198,
220,
220,
220,
611,
1006,
62,
8367,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
45941,
13,
9107,
418,
7,
11925,
7,
4475,
62,
489,
83,
4008,
10,
5420,
62,
8367,
11,
705,
74,
438,
11537,
198,
220,
220,
220,
1303,
458,
83,
13,
1455,
437,
7,
17946,
11639,
13466,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
65,
4448,
685,
36077,
60,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
88,
2475,
26933,
12,
20,
1539,
642,
8183,
8,
628,
220,
220,
220,
1303,
5381,
2124,
16488,
198,
220,
220,
220,
7877,
13,
2306,
17500,
1000,
7,
21633,
28,
17821,
11,
16488,
11639,
87,
3256,
5381,
28,
17821,
8,
198,
220,
220,
220,
7877,
13,
25928,
7,
17821,
8,
628,
220,
220,
220,
7877,
796,
2336,
13,
2860,
62,
7266,
29487,
7,
19,
11,
352,
11,
513,
8,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
10215,
81,
11,
1162,
81,
62,
489,
83,
11,
705,
65,
87,
12,
11537,
628,
220,
220,
220,
611,
1162,
81,
62,
1084,
1875,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
10215,
81,
11,
45941,
13,
9107,
418,
7,
11925,
7,
4475,
62,
10215,
81,
4008,
10,
10215,
81,
62,
1084,
11,
705,
74,
438,
11537,
628,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
10215,
49501,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
88,
2475,
26933,
15,
1539,
352,
8183,
8,
628,
220,
220,
220,
1303,
5381,
2124,
16488,
198,
220,
220,
220,
7877,
13,
2306,
17500,
1000,
7,
21633,
28,
17821,
11,
16488,
11639,
87,
3256,
5381,
28,
17821,
8,
198,
220,
220,
220,
7877,
13,
25928,
7,
17821,
8,
628,
220,
220,
220,
7877,
796,
2336,
13,
2860,
62,
7266,
29487,
7,
19,
11,
352,
11,
604,
8,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
17,
11,
45941,
62,
35138,
11,
705,
65,
87,
12,
11537,
628,
220,
220,
220,
611,
45941,
62,
1084,
1875,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
29487,
7,
4475,
17,
11,
45941,
13,
9107,
418,
7,
11925,
7,
4475,
17,
4008,
10,
37659,
62,
1084,
11,
705,
74,
438,
11537,
628,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
15057,
286,
3409,
2374,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
7,
18242,
87,
8,
628,
220,
220,
220,
1303,
5381,
2124,
16488,
198,
220,
220,
220,
7877,
13,
2306,
17500,
1000,
7,
21633,
28,
17821,
11,
16488,
11639,
87,
3256,
5381,
28,
17821,
8,
628,
220,
220,
220,
1303,
5724,
689,
290,
826,
10548,
82,
262,
2124,
14722,
11,
290,
6100,
262,
4220,
286,
262,
198,
220,
220,
220,
1303,
34197,
510,
284,
787,
2119,
329,
606,
198,
220,
220,
220,
2336,
13,
2306,
1659,
16762,
62,
87,
4475,
3419,
628,
220,
220,
220,
329,
277,
3672,
287,
277,
3672,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2336,
13,
21928,
5647,
7,
69,
3672,
11,
288,
14415,
28,
67,
14415,
8,
198,
220,
220,
220,
458,
83,
13,
19836,
7,
5647,
8,
628,
220,
220,
220,
1441,
277,
3672,
62,
4868,
628,
198,
4299,
7110,
62,
4029,
62,
912,
7,
28664,
62,
4029,
62,
3258,
11,
25962,
62,
4852,
62,
615,
70,
62,
3258,
11,
25962,
62,
4852,
62,
19282,
62,
3258,
11,
6546,
62,
615,
70,
62,
3258,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6546,
62,
19282,
62,
3258,
11,
299,
20477,
62,
12102,
62,
3258,
11,
299,
20477,
62,
23350,
62,
3258,
11,
277,
3672,
62,
4868,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6167,
87,
11639,
7575,
18119,
3256,
5259,
75,
11639,
21102,
889,
7679,
640,
2168,
3256,
288,
14415,
28,
4761,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
21528,
257,
640,
2168,
286,
24203,
7679,
1366,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
288,
83,
62,
4029,
62,
3258,
1058,
4818,
8079,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
640,
286,
262,
640,
2168,
198,
220,
220,
220,
45941,
62,
35138,
1058,
493,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
1271,
286,
2173,
198,
220,
220,
220,
1612,
65,
4448,
62,
35138,
11,
14288,
65,
4448,
62,
35138,
11,
953,
1765,
4448,
62,
35138,
1058,
12178,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
1612,
11,
14288,
290,
4235,
10690,
198,
220,
220,
220,
5554,
1495,
65,
4448,
62,
35138,
11,
5554,
2425,
65,
4448,
62,
35138,
25,
1679,
400,
290,
5441,
400,
37894,
286,
262,
10690,
198,
220,
220,
220,
1162,
81,
62,
35138,
1058,
12178,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
16096,
198,
220,
220,
220,
22638,
62,
35138,
11,
987,
344,
79,
62,
35138,
1058,
12178,
7177,
198,
220,
220,
220,
220,
220,
220,
220,
22638,
290,
987,
344,
79,
286,
257,
14174,
20683,
198,
220,
220,
220,
987,
344,
79,
62,
6649,
3008,
16,
62,
35138,
1058,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
262,
987,
344,
79,
966,
286,
257,
287,
451,
20683,
286,
22638,
352,
198,
220,
220,
220,
1006,
62,
8367,
1058,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
262,
4941,
1988,
198,
220,
220,
220,
45941,
62,
1084,
1058,
493,
198,
220,
220,
220,
220,
220,
220,
220,
383,
5288,
1271,
286,
2173,
284,
2074,
262,
1255,
4938,
198,
220,
220,
220,
1162,
81,
62,
1084,
1058,
12178,
198,
220,
220,
220,
220,
220,
220,
220,
383,
5288,
16096,
284,
2074,
262,
2482,
4938,
198,
220,
220,
220,
6167,
87,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
6167,
286,
262,
1395,
16488,
198,
220,
220,
220,
5259,
75,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
3785,
3670,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
277,
3672,
62,
4868,
1058,
1351,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
286,
3891,
286,
262,
2727,
21528,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
2336,
796,
458,
83,
13,
26875,
7,
5647,
7857,
41888,
940,
11,
1315,
4357,
288,
14415,
28,
67,
14415,
8,
628,
220,
220,
220,
7877,
796,
2336,
13,
2860,
62,
7266,
29487,
7,
18,
11,
352,
11,
352,
8,
198,
220,
220,
220,
7877,
13,
29487,
7,
28664,
62,
4029,
62,
3258,
11,
25962,
62,
4852,
62,
615,
70,
62,
3258,
11,
705,
65,
87,
12,
3256,
6167,
11639,
615,
70,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
28664,
62,
4029,
62,
3258,
11,
25962,
62,
4852,
62,
615,
70,
62,
3258,
10,
4029,
62,
4852,
62,
19282,
62,
3258,
11,
705,
40914,
12,
3256,
6167,
11639,
615,
70,
10,
19282,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
28664,
62,
4029,
62,
3258,
11,
25962,
62,
4852,
62,
615,
70,
62,
3258,
12,
4029,
62,
4852,
62,
19282,
62,
3258,
11,
705,
40914,
12,
3256,
6167,
11639,
615,
70,
12,
19282,
11537,
198,
220,
220,
220,
1303,
458,
83,
13,
1455,
437,
7,
17946,
11639,
13466,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
9126,
6001,
685,
76,
6579,
43,
60,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
7839,
7,
83,
270,
75,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
88,
2475,
26933,
15,
1539,
39064,
8183,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
2475,
26933,
28664,
62,
4029,
62,
3258,
58,
15,
4357,
288,
83,
62,
4029,
62,
3258,
58,
12,
16,
11907,
8,
628,
220,
220,
220,
1303,
5381,
2124,
16488,
198,
220,
220,
220,
7877,
13,
2306,
17500,
1000,
7,
21633,
28,
17821,
11,
16488,
11639,
87,
3256,
5381,
28,
17821,
8,
198,
220,
220,
220,
7877,
13,
25928,
7,
17821,
8,
628,
220,
220,
220,
7877,
796,
2336,
13,
2860,
62,
7266,
29487,
7,
18,
11,
352,
11,
362,
8,
198,
220,
220,
220,
7877,
13,
29487,
7,
28664,
62,
4029,
62,
3258,
11,
6546,
62,
615,
70,
62,
3258,
11,
705,
65,
87,
12,
3256,
6167,
11639,
615,
70,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
28664,
62,
4029,
62,
3258,
11,
6546,
62,
615,
70,
62,
3258,
10,
400,
624,
62,
19282,
62,
3258,
11,
705,
40914,
12,
3256,
6167,
11639,
615,
70,
10,
19282,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
28664,
62,
4029,
62,
3258,
11,
6546,
62,
615,
70,
62,
3258,
12,
400,
624,
62,
19282,
62,
3258,
11,
705,
40914,
12,
3256,
6167,
11639,
615,
70,
12,
19282,
11537,
198,
220,
220,
220,
1303,
458,
83,
13,
1455,
437,
7,
17946,
11639,
13466,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
817,
624,
1108,
685,
76,
60,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
88,
2475,
26933,
15,
1539,
20343,
8183,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
2475,
26933,
28664,
62,
4029,
62,
3258,
58,
15,
4357,
288,
83,
62,
4029,
62,
3258,
58,
12,
16,
11907,
8,
628,
220,
220,
220,
1303,
5381,
2124,
16488,
198,
220,
220,
220,
7877,
13,
2306,
17500,
1000,
7,
21633,
28,
17821,
11,
16488,
11639,
87,
3256,
5381,
28,
17821,
8,
198,
220,
220,
220,
7877,
13,
25928,
7,
17821,
8,
628,
220,
220,
220,
7877,
796,
2336,
13,
2860,
62,
7266,
29487,
7,
18,
11,
352,
11,
513,
8,
198,
220,
220,
220,
7877,
13,
29487,
7,
28664,
62,
4029,
62,
3258,
11,
299,
20477,
62,
12102,
62,
3258,
11,
705,
65,
87,
12,
3256,
6167,
11639,
45,
4938,
24823,
11537,
198,
220,
220,
220,
7877,
13,
29487,
7,
28664,
62,
4029,
62,
3258,
11,
299,
20477,
62,
23350,
62,
3258,
11,
705,
40914,
12,
3256,
6167,
11639,
20477,
2472,
11537,
198,
220,
220,
220,
1303,
458,
83,
13,
1455,
437,
7,
17946,
11639,
13466,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
49,
592,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
7,
18242,
87,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
88,
2475,
26933,
15,
11,
45941,
13,
9806,
7,
77,
20477,
62,
23350,
62,
3258,
47762,
20,
12962,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
2475,
26933,
28664,
62,
4029,
62,
3258,
58,
15,
4357,
288,
83,
62,
4029,
62,
3258,
58,
12,
16,
11907,
8,
628,
220,
220,
220,
1303,
5381,
2124,
16488,
198,
220,
220,
220,
7877,
13,
2306,
17500,
1000,
7,
21633,
28,
17821,
11,
16488,
11639,
87,
3256,
5381,
28,
17821,
8,
198,
220,
220,
220,
7877,
13,
25928,
7,
17821,
8,
628,
220,
220,
220,
1303,
5724,
689,
290,
826,
10548,
82,
262,
2124,
14722,
11,
290,
6100,
262,
4220,
286,
262,
198,
220,
220,
220,
1303,
34197,
510,
284,
787,
2119,
329,
606,
198,
220,
220,
220,
2336,
13,
2306,
1659,
16762,
62,
87,
4475,
3419,
628,
220,
220,
220,
329,
277,
3672,
287,
277,
3672,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2336,
13,
21928,
5647,
7,
69,
3672,
11,
288,
14415,
28,
67,
14415,
8,
198,
220,
220,
220,
458,
83,
13,
19836,
7,
5647,
8,
628,
220,
220,
220,
1441,
277,
3672,
62,
4868,
628,
198,
4299,
7110,
62,
19155,
62,
1186,
380,
18206,
62,
912,
7,
19155,
62,
1186,
380,
18206,
11,
1366,
62,
4906,
11,
277,
3672,
62,
4868,
11,
6167,
87,
11639,
10430,
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,
5259,
75,
11639,
16012,
45069,
3862,
7171,
3256,
288,
14415,
28,
4761,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
21528,
4252,
45069,
640,
2168,
2168,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
4252,
62,
1186,
380,
18206,
1058,
46545,
198,
220,
220,
220,
220,
220,
220,
220,
46545,
7268,
262,
29517,
10007,
198,
220,
220,
220,
1366,
62,
4906,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
11507,
284,
307,
37515,
198,
220,
220,
220,
277,
3672,
62,
4868,
1058,
1351,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
286,
3891,
286,
262,
3696,
810,
284,
3650,
262,
7110,
198,
220,
220,
220,
6167,
87,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
262,
2124,
6167,
198,
220,
220,
220,
5259,
75,
1058,
965,
198,
220,
220,
220,
220,
220,
220,
220,
262,
3670,
286,
262,
7110,
198,
220,
220,
220,
288,
14415,
1058,
493,
198,
220,
220,
220,
220,
220,
220,
220,
22969,
583,
11111,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
277,
3672,
62,
4868,
1058,
1351,
286,
965,
198,
220,
220,
220,
220,
220,
220,
220,
1351,
286,
3891,
286,
262,
2727,
21528,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
1988,
62,
19282,
796,
6045,
198,
220,
220,
220,
1006,
796,
6045,
198,
220,
220,
220,
3128,
796,
4252,
62,
1186,
380,
18206,
58,
16,
60,
198,
220,
220,
220,
611,
1366,
62,
4906,
6624,
705,
77,
71,
896,
62,
71,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
17,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
15057,
286,
4252,
7127,
367,
6518,
6,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
45941,
13,
9806,
7,
19155,
62,
1186,
380,
18206,
58,
17,
12962,
10,
16,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
417,
62,
10394,
62,
71,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
18,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
36,
2768,
341,
15584,
10394,
367,
6518,
357,
35,
1533,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
604,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
1031,
62,
10394,
62,
71,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
19,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
26903,
320,
1071,
15584,
10394,
367,
6518,
357,
35,
1533,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
604,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
417,
62,
65,
4448,
62,
71,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
20,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
796,
45941,
13,
9107,
418,
7,
11925,
7,
8367,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
36,
2768,
341,
10609,
10690,
367,
6518,
357,
35,
1533,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
532,
17,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
362,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
1031,
62,
65,
4448,
62,
71,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
21,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
796,
45941,
13,
9107,
418,
7,
11925,
7,
8367,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
26903,
320,
1071,
10609,
10690,
367,
6518,
357,
35,
1533,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
532,
17,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
362,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
36077,
76,
62,
19155,
62,
395,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
22,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
62,
19282,
796,
4252,
62,
1186,
380,
18206,
58,
23,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
16012,
4333,
367,
6518,
357,
36077,
76,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
532,
11442,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
532,
3829,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
40914,
62,
65,
4448,
62,
71,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
357,
940,
15885,
37659,
13,
2611,
13,
6404,
940,
7,
19155,
62,
1186,
380,
18206,
58,
24,
12962,
532,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
838,
15885,
37659,
13,
2611,
13,
6404,
940,
7,
19155,
62,
1186,
380,
18206,
58,
2481,
60,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
62,
19282,
796,
4252,
62,
1186,
380,
18206,
58,
23,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
796,
45941,
13,
9107,
418,
7,
11925,
7,
8367,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
3041,
39729,
10690,
367,
6518,
357,
36077,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
532,
20,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
642,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
28202,
62,
71,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
838,
15885,
37659,
13,
2611,
13,
6404,
940,
7,
19155,
62,
1186,
380,
18206,
58,
24,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1988,
62,
19282,
796,
4252,
62,
1186,
380,
18206,
58,
23,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
796,
838,
15885,
37659,
13,
2611,
13,
6404,
940,
7,
19155,
62,
1186,
380,
18206,
58,
2481,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
31310,
8520,
6591,
28462,
367,
6518,
357,
36077,
7,
82,
20942,
4008,
6,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
1315,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
1542,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
77,
71,
896,
62,
85,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
940,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
15057,
286,
4252,
7127,
569,
6518,
6,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
45941,
13,
9806,
7,
19155,
62,
1186,
380,
18206,
58,
940,
12962,
10,
16,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
417,
62,
10394,
62,
85,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
1157,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
36,
2768,
341,
15584,
10394,
569,
6518,
357,
35,
1533,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
604,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
1031,
62,
10394,
62,
85,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
1065,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
26903,
320,
1071,
15584,
10394,
569,
6518,
357,
35,
1533,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
604,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
417,
62,
65,
4448,
62,
85,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
1485,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
796,
45941,
13,
9107,
418,
7,
11925,
7,
8367,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
36,
2768,
341,
10609,
10690,
569,
6518,
357,
35,
1533,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
532,
17,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
362,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
1031,
62,
65,
4448,
62,
85,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
1415,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
796,
45941,
13,
9107,
418,
7,
11925,
7,
8367,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
26903,
320,
1071,
10609,
10690,
569,
6518,
357,
35,
1533,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
532,
17,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
362,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
36077,
76,
85,
62,
19155,
62,
395,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
1314,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
62,
19282,
796,
4252,
62,
1186,
380,
18206,
58,
1433,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
16012,
4333,
569,
6518,
357,
36077,
76,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
532,
11442,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
532,
3829,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
40914,
62,
65,
4448,
62,
85,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
357,
940,
15885,
37659,
13,
2611,
13,
6404,
940,
7,
19155,
62,
1186,
380,
18206,
58,
1558,
12962,
532,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
838,
15885,
37659,
13,
2611,
13,
6404,
940,
7,
19155,
62,
1186,
380,
18206,
58,
2481,
60,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
62,
19282,
796,
4252,
62,
1186,
380,
18206,
58,
1433,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
796,
45941,
13,
9107,
418,
7,
11925,
7,
8367,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
3041,
39729,
10690,
569,
6518,
357,
36077,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
532,
20,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
642,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
28202,
62,
85,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
838,
15885,
37659,
13,
2611,
13,
6404,
940,
7,
19155,
62,
1186,
380,
18206,
58,
1558,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1988,
62,
19282,
796,
4252,
62,
1186,
380,
18206,
58,
1433,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
796,
838,
15885,
37659,
13,
2611,
13,
6404,
940,
7,
19155,
62,
1186,
380,
18206,
58,
2481,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
31310,
8520,
6591,
28462,
569,
6518,
357,
36077,
7,
82,
20942,
4008,
6,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
1315,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
1542,
13,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
77,
71,
896,
62,
89,
7109,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
1507,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
15057,
286,
4252,
7127,
1168,
7707,
6,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
45941,
13,
9806,
7,
19155,
62,
1186,
380,
18206,
58,
1507,
12962,
10,
16,
198,
220,
220,
220,
1288,
361,
1366,
62,
4906,
6624,
705,
57,
7707,
62,
19155,
62,
395,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
4252,
62,
1186,
380,
18206,
58,
1129,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
62,
19282,
796,
4252,
62,
1186,
380,
18206,
58,
1238,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
796,
45941,
13,
9107,
418,
7,
11925,
7,
8367,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2248,
68,
306,
796,
705,
16012,
1168,
7707,
357,
36077,
33047,
198,
220,
220,
220,
220,
220,
220,
220,
410,
1084,
796,
532,
17,
13,
198,
220,
220,
220,
220,
220,
220,
220,
410,
9806,
796,
362,
13,
628,
220,
220,
220,
9335,
796,
45941,
13,
2611,
13,
1136,
27932,
18747,
7,
8367,
8,
198,
220,
220,
220,
611,
9335,
13,
439,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
9828,
10786,
3118,
540,
284,
2251,
3785,
705,
10,
6,
45302,
22179,
7,
69,
3672,
62,
4868,
8,
1343,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45302,
1400,
4938,
1366,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
6045,
628,
220,
220,
220,
1303,
7110,
691,
4938,
1366,
357,
4360,
1394,
717,
290,
938,
3128,
8,
198,
220,
220,
220,
318,
12102,
796,
45941,
13,
6404,
605,
62,
1662,
7,
27932,
8,
198,
220,
220,
220,
3128,
17,
796,
45941,
13,
18747,
7,
4475,
8,
628,
220,
220,
220,
1988,
62,
489,
83,
796,
1988,
58,
271,
12102,
60,
198,
220,
220,
220,
3128,
62,
489,
83,
796,
3128,
17,
58,
271,
12102,
60,
198,
220,
220,
220,
611,
407,
318,
12102,
58,
15,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
1988,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3128,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
4475,
17,
58,
15,
4357,
3128,
62,
489,
83,
8,
198,
220,
220,
220,
611,
407,
318,
12102,
58,
12,
16,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
8367,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3128,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
4475,
62,
489,
83,
11,
3128,
17,
58,
12,
16,
12962,
628,
220,
220,
220,
2336,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
7,
5647,
7857,
41888,
940,
11,
718,
4357,
288,
14415,
28,
67,
14415,
8,
198,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
1988,
62,
489,
83,
11,
705,
87,
12,
11537,
198,
220,
220,
220,
611,
1988,
62,
19282,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
62,
19282,
62,
489,
83,
796,
1988,
62,
19282,
58,
271,
12102,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
318,
12102,
58,
15,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
62,
19282,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
37659,
13,
2611,
13,
27932,
276,
11,
1988,
62,
19282,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
318,
12102,
58,
12,
16,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
62,
19282,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
8367,
62,
19282,
62,
489,
83,
11,
45941,
13,
2611,
13,
27932,
276,
8,
628,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
1988,
62,
489,
83,
10,
8367,
62,
19282,
62,
489,
83,
11,
705,
40914,
12,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
1988,
62,
489,
83,
12,
8367,
62,
19282,
62,
489,
83,
11,
705,
40914,
12,
11537,
198,
220,
220,
220,
611,
1006,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1006,
62,
489,
83,
796,
1006,
58,
271,
12102,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
318,
12102,
58,
15,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1006,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
5420,
58,
15,
4357,
1006,
62,
489,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
318,
12102,
58,
12,
16,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1006,
62,
489,
83,
796,
45941,
13,
2611,
13,
33295,
7,
5420,
62,
489,
83,
11,
1006,
58,
12,
16,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
29487,
7,
4475,
62,
489,
83,
11,
1006,
62,
489,
83,
11,
705,
74,
438,
11537,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
7,
18242,
87,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
7,
75,
11231,
306,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
7839,
7,
83,
270,
75,
8,
198,
220,
220,
220,
7877,
13,
2617,
62,
88,
2475,
26933,
85,
1084,
11,
410,
9806,
12962,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
2475,
26933,
4475,
62,
489,
83,
58,
15,
4357,
3128,
62,
489,
83,
58,
12,
16,
11907,
8,
198,
220,
220,
220,
1303,
5381,
2124,
16488,
198,
220,
220,
220,
7877,
13,
2306,
17500,
1000,
7,
21633,
28,
17821,
11,
16488,
11639,
87,
3256,
5381,
28,
17821,
8,
198,
220,
220,
220,
7877,
13,
25928,
7,
17821,
8,
628,
220,
220,
220,
1303,
5724,
689,
290,
826,
10548,
82,
262,
2124,
14722,
11,
290,
6100,
262,
4220,
286,
262,
198,
220,
220,
220,
1303,
34197,
510,
284,
787,
2119,
329,
606,
198,
220,
220,
220,
2336,
13,
2306,
1659,
16762,
62,
87,
4475,
3419,
628,
220,
220,
220,
329,
277,
3672,
287,
277,
3672,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2336,
13,
21928,
5647,
7,
69,
3672,
11,
288,
14415,
28,
67,
14415,
8,
198,
220,
220,
220,
458,
83,
13,
19836,
7,
5647,
8,
628,
220,
220,
220,
1441,
277,
3672,
62,
4868,
198
] | 2.088328 | 11,378 |
# Copyright (c) 2012, James Hensman and Ricardo Andrade
# Licensed under the BSD 3-clause license (see LICENSE.txt)
from .kern import Kern
import numpy as np
from ...core.parameterization import Param
from ...core.parameterization.transformations import Logexp
from ...util.config import config # for assesing whether to use cython
try:
from . import coregionalize_cython
config.set('cython', 'working', 'True')
except ImportError:
config.set('cython', 'working', 'False')
class Coregionalize(Kern):
"""
Covariance function for intrinsic/linear coregionalization models
This covariance has the form:
.. math::
\mathbf{B} = \mathbf{W}\mathbf{W}^\top + \text{diag}(kappa)
An intrinsic/linear coregionalization covariance function of the form:
.. math::
k_2(x, y)=\mathbf{B} k(x, y)
it is obtained as the tensor product between a covariance function
k(x, y) and B.
:param output_dim: number of outputs to coregionalize
:type output_dim: int
:param rank: number of columns of the W matrix (this parameter is ignored if parameter W is not None)
:type rank: int
:param W: a low rank matrix that determines the correlations between the different outputs, together with kappa it forms the coregionalization matrix B
:type W: numpy array of dimensionality (num_outpus, W_columns)
:param kappa: a vector which allows the outputs to behave independently
:type kappa: numpy array of dimensionality (output_dim, )
.. note: see coregionalization examples in GPy.examples.regression for some usage.
"""
| [
2,
15069,
357,
66,
8,
2321,
11,
3700,
367,
641,
805,
290,
38847,
843,
27585,
198,
2,
49962,
739,
262,
347,
10305,
513,
12,
565,
682,
5964,
357,
3826,
38559,
24290,
13,
14116,
8,
198,
198,
6738,
764,
74,
1142,
1330,
49132,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
2644,
7295,
13,
17143,
2357,
1634,
1330,
25139,
198,
6738,
2644,
7295,
13,
17143,
2357,
1634,
13,
35636,
602,
1330,
6706,
25636,
79,
198,
6738,
2644,
22602,
13,
11250,
1330,
4566,
1303,
329,
50201,
278,
1771,
284,
779,
3075,
400,
261,
198,
28311,
25,
198,
220,
220,
220,
422,
764,
1330,
4755,
70,
1538,
1096,
62,
948,
400,
261,
198,
220,
220,
220,
4566,
13,
2617,
10786,
948,
400,
261,
3256,
705,
16090,
3256,
705,
17821,
11537,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
4566,
13,
2617,
10786,
948,
400,
261,
3256,
705,
16090,
3256,
705,
25101,
11537,
198,
198,
4871,
7231,
70,
1538,
1096,
7,
42,
1142,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
39751,
2743,
590,
2163,
329,
28327,
14,
29127,
4755,
70,
1538,
1634,
4981,
628,
220,
220,
220,
770,
44829,
590,
468,
262,
1296,
25,
198,
220,
220,
220,
11485,
10688,
3712,
198,
220,
220,
220,
220,
220,
220,
3467,
11018,
19881,
90,
33,
92,
796,
3467,
11018,
19881,
90,
54,
32239,
11018,
19881,
90,
54,
92,
61,
59,
4852,
1343,
3467,
5239,
90,
10989,
363,
92,
7,
74,
20975,
8,
628,
220,
220,
220,
1052,
28327,
14,
29127,
4755,
70,
1538,
1634,
44829,
590,
2163,
286,
262,
1296,
25,
198,
220,
220,
220,
11485,
10688,
3712,
628,
220,
220,
220,
220,
220,
220,
479,
62,
17,
7,
87,
11,
331,
47505,
59,
11018,
19881,
90,
33,
92,
479,
7,
87,
11,
331,
8,
628,
220,
220,
220,
340,
318,
6492,
355,
262,
11192,
273,
1720,
1022,
257,
44829,
590,
2163,
198,
220,
220,
220,
479,
7,
87,
11,
331,
8,
290,
347,
13,
628,
220,
220,
220,
1058,
17143,
5072,
62,
27740,
25,
1271,
286,
23862,
284,
4755,
70,
1538,
1096,
198,
220,
220,
220,
1058,
4906,
5072,
62,
27740,
25,
493,
198,
220,
220,
220,
1058,
17143,
4279,
25,
1271,
286,
15180,
286,
262,
370,
17593,
357,
5661,
11507,
318,
9514,
611,
11507,
370,
318,
407,
6045,
8,
198,
220,
220,
220,
1058,
4906,
4279,
25,
493,
198,
220,
220,
220,
1058,
17143,
370,
25,
257,
1877,
4279,
17593,
326,
15947,
262,
35811,
1022,
262,
1180,
23862,
11,
1978,
351,
479,
20975,
340,
5107,
262,
4755,
70,
1538,
1634,
17593,
347,
198,
220,
220,
220,
1058,
4906,
370,
25,
299,
32152,
7177,
286,
15793,
1483,
357,
22510,
62,
448,
79,
385,
11,
370,
62,
28665,
82,
8,
198,
220,
220,
220,
1058,
17143,
479,
20975,
25,
257,
15879,
543,
3578,
262,
23862,
284,
17438,
14799,
198,
220,
220,
220,
1058,
4906,
479,
20975,
25,
299,
32152,
7177,
286,
15793,
1483,
220,
357,
22915,
62,
27740,
11,
1267,
628,
220,
220,
220,
11485,
3465,
25,
766,
4755,
70,
1538,
1634,
6096,
287,
14714,
88,
13,
1069,
12629,
13,
2301,
2234,
329,
617,
8748,
13,
198,
220,
220,
220,
37227,
628,
628
] | 3.067179 | 521 |
import os
import numpy as np
import pandas as pd
import torch
from torch import nn
from torch import optim
from torch.utils import data
import matplotlib
import matplotlib.pyplot as plt
import GEV
import display
from config import config
import selection
from train import train
from construct import construct
from sklearn.svm import SVC
from sklearn.naive_bayes import GaussianNB
from sklearn.tree import DecisionTreeClassifier
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import KFold
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
eps = 1e-8
FILE_LIST = os.listdir(config.DATA_PATH)
FILE_LIST.sort(key = lambda x: x[:-4])
file_num = 0
mAcc = 0
mG_mean = 0
Dict = {}
for i, FILE_NAME in enumerate(FILE_LIST):
if FILE_NAME == '.DS_Store' or FILE_NAME == 'process.py' or FILE_NAME == 'tmp.dat': continue
print(i, FILE_NAME)
if (i < 40): continue
dataset = sampleData(FILE_NAME)
dataloader = data.DataLoader(dataset, batch_size = config.batch_size,
shuffle = True, drop_last = False, **config.kwargs)
X_train = torch.from_numpy(dataset.train_data)
Y_train = torch.from_numpy(dataset.train_label)
X_test = torch.from_numpy(dataset.test_data)
Y_test = torch.from_numpy(dataset.test_label)
file_num += 1
sAcc = 0
sG_mean = 0
times = 0
for j in range(10):
# X1 = torch.rand(X_train.shape[0], 25)
# X2 = torch.rand(X_test.shape[0], 25)
# y_output = SVC().fit(X1, Y_train).predict(X1)
# TP, TN, FP, FN, P, R, mF1, Acc, G_mean = display.Eval(Y_train, y_output)
train(X_train, Y_train, X_test, Y_test)
X1, index = construct(X_train, Y_train)
X2, _ = construct(X_test, Y_test)
y_output = SVC().fit(X1[:, index], Y_train).predict(X2[:, index])
TP, TN, FP, FN, P, R, mF1, Acc, G_mean = display.Eval(Y_test, y_output)
print(TP, TN, FP, FN)
print('Acc:%.4lf' % Acc, 'G_mean:%.4lf' % G_mean)
if G_mean != 0:
sAcc += Acc
sG_mean += G_mean
# sAcc = max(sAcc, Acc)
# sG_mean = max(sG_mean, G_mean)
times += 1
times = max(times, 1)
sAcc /= times
sG_mean /= times
mAcc += sAcc
mG_mean += sG_mean
print('sAcc:%.4lf' % sAcc, 'sG_mean:%.4lf' % sG_mean)
Dict[FILE_NAME[ : -4]] = round(sG_mean, 4)
outcome = pd.read_csv('origin-outcome.csv')
output = outcome
for i in range(outcome.shape[0]):
if (output.iloc[i, 0] in Dict):
output.iloc[i, 2] = Dict[output.iloc[i, 0]]
output.iloc[i, 3] = round(output.iloc[i, 2] - output.iloc[i, 1], 4)
output.to_csv('outcome.csv')
print('mAcc:%.4lf' % (mAcc / file_num), 'mG_mean:%.4lf' % (mG_mean / file_num)) | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
28034,
1330,
6436,
198,
6738,
28034,
13,
26791,
1330,
1366,
198,
11748,
2603,
29487,
8019,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
402,
20114,
198,
11748,
3359,
198,
6738,
4566,
1330,
4566,
198,
11748,
6356,
198,
6738,
4512,
1330,
4512,
198,
6738,
5678,
1330,
5678,
198,
6738,
1341,
35720,
13,
82,
14761,
1330,
311,
15922,
198,
6738,
1341,
35720,
13,
2616,
425,
62,
24406,
274,
1330,
12822,
31562,
32819,
198,
6738,
1341,
35720,
13,
21048,
1330,
26423,
27660,
9487,
7483,
198,
6738,
1341,
35720,
13,
710,
394,
32289,
1330,
509,
46445,
32289,
9487,
7483,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
509,
37,
727,
198,
198,
25202,
796,
28034,
13,
25202,
7203,
66,
15339,
25,
15,
1,
611,
28034,
13,
66,
15339,
13,
271,
62,
15182,
3419,
2073,
366,
36166,
4943,
198,
198,
25386,
796,
352,
68,
12,
23,
198,
198,
25664,
62,
45849,
796,
28686,
13,
4868,
15908,
7,
11250,
13,
26947,
62,
34219,
8,
198,
25664,
62,
45849,
13,
30619,
7,
2539,
796,
37456,
2124,
25,
2124,
58,
21912,
19,
12962,
198,
7753,
62,
22510,
796,
657,
198,
76,
17320,
796,
657,
198,
76,
38,
62,
32604,
796,
657,
198,
35,
713,
796,
23884,
198,
198,
1640,
1312,
11,
45811,
62,
20608,
287,
27056,
378,
7,
25664,
62,
45849,
2599,
198,
197,
361,
45811,
62,
20608,
6624,
45302,
5258,
62,
22658,
6,
393,
45811,
62,
20608,
6624,
705,
14681,
13,
9078,
6,
393,
45811,
62,
20608,
6624,
705,
22065,
13,
19608,
10354,
2555,
198,
197,
4798,
7,
72,
11,
45811,
62,
20608,
8,
198,
197,
361,
357,
72,
1279,
2319,
2599,
2555,
198,
197,
19608,
292,
316,
796,
6291,
6601,
7,
25664,
62,
20608,
8,
198,
197,
67,
10254,
1170,
263,
796,
1366,
13,
6601,
17401,
7,
19608,
292,
316,
11,
15458,
62,
7857,
796,
4566,
13,
43501,
62,
7857,
11,
198,
197,
197,
1477,
18137,
796,
6407,
11,
4268,
62,
12957,
796,
10352,
11,
12429,
11250,
13,
46265,
22046,
8,
198,
197,
55,
62,
27432,
796,
28034,
13,
6738,
62,
77,
32152,
7,
19608,
292,
316,
13,
27432,
62,
7890,
8,
198,
197,
56,
62,
27432,
796,
28034,
13,
6738,
62,
77,
32152,
7,
19608,
292,
316,
13,
27432,
62,
18242,
8,
198,
197,
55,
62,
9288,
796,
28034,
13,
6738,
62,
77,
32152,
7,
19608,
292,
316,
13,
9288,
62,
7890,
8,
198,
197,
56,
62,
9288,
796,
28034,
13,
6738,
62,
77,
32152,
7,
19608,
292,
316,
13,
9288,
62,
18242,
8,
198,
197,
7753,
62,
22510,
15853,
352,
198,
197,
82,
17320,
796,
657,
198,
197,
82,
38,
62,
32604,
796,
657,
198,
197,
22355,
796,
657,
198,
197,
1640,
474,
287,
2837,
7,
940,
2599,
198,
197,
197,
2,
1395,
16,
796,
28034,
13,
25192,
7,
55,
62,
27432,
13,
43358,
58,
15,
4357,
1679,
8,
198,
197,
197,
2,
1395,
17,
796,
28034,
13,
25192,
7,
55,
62,
9288,
13,
43358,
58,
15,
4357,
1679,
8,
198,
197,
197,
2,
331,
62,
22915,
796,
311,
15922,
22446,
11147,
7,
55,
16,
11,
575,
62,
27432,
737,
79,
17407,
7,
55,
16,
8,
198,
197,
197,
2,
24525,
11,
29025,
11,
31459,
11,
44260,
11,
350,
11,
371,
11,
285,
37,
16,
11,
6366,
11,
402,
62,
32604,
796,
3359,
13,
36,
2100,
7,
56,
62,
27432,
11,
331,
62,
22915,
8,
198,
197,
197,
27432,
7,
55,
62,
27432,
11,
575,
62,
27432,
11,
1395,
62,
9288,
11,
575,
62,
9288,
8,
198,
197,
197,
55,
16,
11,
6376,
796,
5678,
7,
55,
62,
27432,
11,
575,
62,
27432,
8,
198,
197,
197,
55,
17,
11,
4808,
796,
5678,
7,
55,
62,
9288,
11,
575,
62,
9288,
8,
198,
197,
197,
88,
62,
22915,
796,
311,
15922,
22446,
11147,
7,
55,
16,
58,
45299,
6376,
4357,
575,
62,
27432,
737,
79,
17407,
7,
55,
17,
58,
45299,
6376,
12962,
198,
197,
197,
7250,
11,
29025,
11,
31459,
11,
44260,
11,
350,
11,
371,
11,
285,
37,
16,
11,
6366,
11,
402,
62,
32604,
796,
3359,
13,
36,
2100,
7,
56,
62,
9288,
11,
331,
62,
22915,
8,
198,
197,
197,
4798,
7,
7250,
11,
29025,
11,
31459,
11,
44260,
8,
198,
197,
197,
4798,
10786,
17320,
25,
7225,
19,
1652,
6,
4064,
6366,
11,
705,
38,
62,
32604,
25,
7225,
19,
1652,
6,
4064,
402,
62,
32604,
8,
198,
197,
197,
361,
402,
62,
32604,
14512,
657,
25,
198,
197,
197,
197,
82,
17320,
15853,
6366,
198,
197,
197,
197,
82,
38,
62,
32604,
15853,
402,
62,
32604,
198,
197,
197,
197,
2,
264,
17320,
796,
3509,
7,
82,
17320,
11,
6366,
8,
198,
197,
197,
197,
2,
264,
38,
62,
32604,
796,
3509,
7,
82,
38,
62,
32604,
11,
402,
62,
32604,
8,
198,
197,
197,
197,
22355,
15853,
352,
198,
197,
22355,
796,
3509,
7,
22355,
11,
352,
8,
198,
197,
82,
17320,
1220,
28,
1661,
198,
197,
82,
38,
62,
32604,
1220,
28,
1661,
198,
197,
76,
17320,
15853,
264,
17320,
198,
197,
76,
38,
62,
32604,
15853,
264,
38,
62,
32604,
198,
197,
4798,
10786,
82,
17320,
25,
7225,
19,
1652,
6,
4064,
264,
17320,
11,
705,
82,
38,
62,
32604,
25,
7225,
19,
1652,
6,
4064,
264,
38,
62,
32604,
8,
198,
197,
35,
713,
58,
25664,
62,
20608,
58,
1058,
532,
19,
11907,
796,
2835,
7,
82,
38,
62,
32604,
11,
604,
8,
198,
197,
448,
2958,
796,
279,
67,
13,
961,
62,
40664,
10786,
47103,
12,
448,
2958,
13,
40664,
11537,
198,
197,
22915,
796,
8055,
198,
197,
1640,
1312,
287,
2837,
7,
448,
2958,
13,
43358,
58,
15,
60,
2599,
198,
197,
197,
361,
357,
22915,
13,
346,
420,
58,
72,
11,
657,
60,
287,
360,
713,
2599,
198,
197,
197,
197,
22915,
13,
346,
420,
58,
72,
11,
362,
60,
796,
360,
713,
58,
22915,
13,
346,
420,
58,
72,
11,
657,
11907,
198,
197,
197,
197,
22915,
13,
346,
420,
58,
72,
11,
513,
60,
796,
2835,
7,
22915,
13,
346,
420,
58,
72,
11,
362,
60,
532,
5072,
13,
346,
420,
58,
72,
11,
352,
4357,
604,
8,
198,
197,
22915,
13,
1462,
62,
40664,
10786,
448,
2958,
13,
40664,
11537,
198,
198,
4798,
10786,
76,
17320,
25,
7225,
19,
1652,
6,
4064,
357,
76,
17320,
1220,
2393,
62,
22510,
828,
705,
76,
38,
62,
32604,
25,
7225,
19,
1652,
6,
4064,
357,
76,
38,
62,
32604,
1220,
2393,
62,
22510,
4008
] | 2.3379 | 1,095 |
#!/bin/env python3
#
# Build the amp-mgms tarball for distribution
#
import argparse
import logging
import tempfile
from pathlib import Path
import shutil
import sys
import yaml
from datetime import datetime
import os
import subprocess
from amp_bootstrap_utils import run_cmd, build_package
if __name__ == "__main__":
main()
| [
2,
48443,
8800,
14,
24330,
21015,
18,
198,
2,
198,
2,
10934,
262,
20766,
12,
11296,
907,
13422,
1894,
329,
6082,
198,
2,
198,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
20218,
7753,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
4423,
346,
198,
11748,
25064,
198,
11748,
331,
43695,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
6738,
20766,
62,
18769,
26418,
62,
26791,
1330,
1057,
62,
28758,
11,
1382,
62,
26495,
628,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 3.081081 | 111 |
import os
import cv2
from base_camera import BaseCamera
import numpy as np
import time
import threading
import imutils
'''
Set the color of the line, 255 is white line, 0 is black line
'''
lineColorSet = 255
'''
Set the reference horizontal position, the larger the value, the lower,
but it cannot be greater than the vertical resolution of the video (default 480)
'''
linePos = 380 | [
11748,
28686,
198,
11748,
269,
85,
17,
198,
6738,
2779,
62,
25695,
1330,
7308,
35632,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
11748,
4704,
278,
198,
11748,
545,
26791,
198,
198,
7061,
6,
198,
7248,
262,
3124,
286,
262,
1627,
11,
14280,
318,
2330,
1627,
11,
657,
318,
2042,
1627,
198,
7061,
6,
198,
1370,
10258,
7248,
796,
14280,
198,
7061,
6,
198,
7248,
262,
4941,
16021,
2292,
11,
262,
4025,
262,
1988,
11,
262,
2793,
11,
220,
198,
4360,
340,
2314,
307,
3744,
621,
262,
11723,
6323,
286,
262,
2008,
357,
12286,
23487,
8,
198,
7061,
6,
198,
1370,
21604,
796,
29101
] | 3.622642 | 106 |
from ..DB import NBADB
from ..Models import (DailyBoxScore, DailyFileManager, DailyMatchup, DailySchedule,
NBAPlayer, League, NBAReport)
################################################################################
################################################################################
currentSeason = 2021
################################################################################
################################################################################
| [
6738,
11485,
11012,
1330,
41354,
2885,
33,
198,
6738,
11485,
5841,
1424,
1330,
357,
28545,
14253,
26595,
11,
6714,
8979,
13511,
11,
6714,
23850,
929,
11,
6714,
27054,
5950,
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,
41354,
2969,
29289,
11,
4041,
11,
41354,
1503,
45813,
8,
628,
628,
198,
29113,
29113,
14468,
198,
29113,
29113,
14468,
198,
198,
14421,
18960,
796,
33448,
198,
198,
29113,
29113,
14468,
198,
29113,
29113,
14468,
628,
198
] | 5.648352 | 91 |
# coding=utf-8
"""
Makes a PDF document from a source folder
"""
import shutil
import urllib.parse
from pathlib import Path
import elib
from edlm import LOGGER
from edlm.convert import Context
from edlm.external_tools import PANDOC
from ._check_for_unused_images import check_for_unused_images
from ._get_includes import get_includes
from ._get_index import get_index_file
from ._get_media_folders import get_media_folders
from ._get_settings import get_settings
from ._get_template import get_template
from ._pdf_info import add_metadata_to_pdf, skip_file
from ._preprocessor import process_latex, process_markdown
from ._temp_folder import TempDir
WIDTH_MODIFIER = 0.8
PAPER_FORMATS_WIDTH = {
'a0': 841 * WIDTH_MODIFIER,
'a1': 594 * WIDTH_MODIFIER,
'a2': 420 * WIDTH_MODIFIER,
'a3': 29 * WIDTH_MODIFIER,
'a4': 210 * WIDTH_MODIFIER,
'a5': 148 * WIDTH_MODIFIER,
'a6': 105 * WIDTH_MODIFIER,
'a7': 74 * WIDTH_MODIFIER,
}
BASE_URL = r'http://132virtualwing.org/docs/'
def make_pdf(ctx: Context, source_folder: Path):
"""
Makes a PDF document from a source folder
Args:
ctx: Context
source_folder: source folder
"""
_remove_artifacts()
source_folder = elib.path.ensure_dir(source_folder).absolute()
LOGGER.info(f'analyzing folder: "{source_folder}"')
if _is_source_folder(source_folder):
ctx.source_folder = source_folder
_build_folder(ctx)
else:
for child in source_folder.iterdir():
if _is_source_folder(child):
ctx.source_folder = child.absolute()
_build_folder(ctx)
| [
2,
19617,
28,
40477,
12,
23,
198,
37811,
198,
44,
1124,
257,
12960,
3188,
422,
257,
2723,
9483,
198,
37811,
198,
198,
11748,
4423,
346,
198,
11748,
2956,
297,
571,
13,
29572,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
1288,
571,
198,
198,
6738,
1225,
75,
76,
1330,
41605,
30373,
198,
6738,
1225,
75,
76,
13,
1102,
1851,
1330,
30532,
198,
6738,
1225,
75,
76,
13,
22615,
62,
31391,
1330,
350,
6981,
4503,
198,
198,
6738,
47540,
9122,
62,
1640,
62,
403,
1484,
62,
17566,
1330,
2198,
62,
1640,
62,
403,
1484,
62,
17566,
198,
6738,
47540,
1136,
62,
42813,
1330,
651,
62,
42813,
198,
6738,
47540,
1136,
62,
9630,
1330,
651,
62,
9630,
62,
7753,
198,
6738,
47540,
1136,
62,
11431,
62,
11379,
364,
1330,
651,
62,
11431,
62,
11379,
364,
198,
6738,
47540,
1136,
62,
33692,
1330,
651,
62,
33692,
198,
6738,
47540,
1136,
62,
28243,
1330,
651,
62,
28243,
198,
6738,
47540,
12315,
62,
10951,
1330,
751,
62,
38993,
62,
1462,
62,
12315,
11,
14267,
62,
7753,
198,
6738,
47540,
3866,
41341,
1330,
1429,
62,
17660,
87,
11,
1429,
62,
4102,
2902,
198,
6738,
47540,
29510,
62,
43551,
1330,
24189,
35277,
198,
198,
54,
2389,
4221,
62,
33365,
5064,
38311,
796,
657,
13,
23,
198,
198,
47,
2969,
1137,
62,
21389,
33586,
62,
54,
2389,
4221,
796,
1391,
198,
220,
220,
220,
705,
64,
15,
10354,
807,
3901,
1635,
370,
2389,
4221,
62,
33365,
5064,
38311,
11,
198,
220,
220,
220,
705,
64,
16,
10354,
642,
5824,
1635,
370,
2389,
4221,
62,
33365,
5064,
38311,
11,
198,
220,
220,
220,
705,
64,
17,
10354,
28262,
1635,
370,
2389,
4221,
62,
33365,
5064,
38311,
11,
198,
220,
220,
220,
705,
64,
18,
10354,
2808,
1635,
370,
2389,
4221,
62,
33365,
5064,
38311,
11,
198,
220,
220,
220,
705,
64,
19,
10354,
20064,
1635,
370,
2389,
4221,
62,
33365,
5064,
38311,
11,
198,
220,
220,
220,
705,
64,
20,
10354,
22613,
1635,
370,
2389,
4221,
62,
33365,
5064,
38311,
11,
198,
220,
220,
220,
705,
64,
21,
10354,
13343,
1635,
370,
2389,
4221,
62,
33365,
5064,
38311,
11,
198,
220,
220,
220,
705,
64,
22,
10354,
8915,
1635,
370,
2389,
4221,
62,
33365,
5064,
38311,
11,
198,
92,
198,
198,
33,
11159,
62,
21886,
796,
374,
6,
4023,
1378,
19924,
32844,
5469,
13,
2398,
14,
31628,
14,
6,
628,
628,
628,
198,
198,
4299,
787,
62,
12315,
7,
49464,
25,
30532,
11,
2723,
62,
43551,
25,
10644,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
27433,
257,
12960,
3188,
422,
257,
2723,
9483,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
269,
17602,
25,
30532,
198,
220,
220,
220,
220,
220,
220,
220,
2723,
62,
43551,
25,
2723,
9483,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
4808,
28956,
62,
50179,
3419,
628,
220,
220,
220,
2723,
62,
43551,
796,
1288,
571,
13,
6978,
13,
641,
495,
62,
15908,
7,
10459,
62,
43551,
737,
48546,
3419,
628,
220,
220,
220,
41605,
30373,
13,
10951,
7,
69,
6,
38200,
9510,
9483,
25,
45144,
10459,
62,
43551,
36786,
11537,
628,
220,
220,
220,
611,
4808,
271,
62,
10459,
62,
43551,
7,
10459,
62,
43551,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
269,
17602,
13,
10459,
62,
43551,
796,
2723,
62,
43551,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
11249,
62,
43551,
7,
49464,
8,
628,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1200,
287,
2723,
62,
43551,
13,
2676,
15908,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
4808,
271,
62,
10459,
62,
43551,
7,
9410,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
17602,
13,
10459,
62,
43551,
796,
1200,
13,
48546,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
11249,
62,
43551,
7,
49464,
8,
198
] | 2.457958 | 666 |
import sys
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtPrintSupport import *
import urllib.request
class MainApp(QMainWindow):
""" the main class of our app """
def __init__(self):
""" init things here """
super().__init__() # parent class initializer
# window title
self.title = "NoteWord"
self.setWindowTitle(self.title)
# editor section
self.editor = QTextEdit(self)
self.setCentralWidget(self.editor)
# create menubar and toolbar first
self.create_menu_bar()
self.create_toolbar()
# after creating toolbar we can call and select font size
font = QFont('Times', 12)
self.editor.setFont(font)
self.editor.setFontPointSize(12)
# stores path
self.path = ''
app = QApplication(sys.argv)
window = MainApp()
window.show()
sys.exit(app.exec_())
| [
11748,
25064,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
8205,
72,
1330,
1635,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1635,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
1635,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
18557,
15514,
1330,
1635,
198,
11748,
2956,
297,
571,
13,
25927,
198,
198,
4871,
8774,
4677,
7,
48,
13383,
27703,
2599,
198,
220,
220,
220,
37227,
262,
1388,
1398,
286,
674,
598,
37227,
198,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
2315,
1243,
994,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2208,
22446,
834,
15003,
834,
3419,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2560,
1398,
4238,
7509,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
4324,
3670,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7839,
796,
366,
6425,
26449,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2617,
27703,
19160,
7,
944,
13,
7839,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
5464,
2665,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
35352,
796,
1195,
8206,
18378,
7,
944,
8,
220,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2617,
30645,
38300,
7,
944,
13,
35352,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
2251,
1450,
549,
283,
290,
50149,
717,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17953,
62,
26272,
62,
5657,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17953,
62,
25981,
5657,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
706,
4441,
50149,
356,
460,
869,
290,
2922,
10369,
2546,
198,
220,
220,
220,
220,
220,
220,
220,
10369,
796,
1195,
23252,
10786,
28595,
3256,
1105,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
35352,
13,
2617,
23252,
7,
10331,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
35352,
13,
2617,
23252,
12727,
10699,
7,
1065,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
7000,
3108,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6978,
796,
10148,
628,
220,
220,
220,
220,
198,
198,
1324,
796,
1195,
23416,
7,
17597,
13,
853,
85,
8,
198,
17497,
796,
8774,
4677,
3419,
198,
17497,
13,
12860,
3419,
198,
17597,
13,
37023,
7,
1324,
13,
18558,
62,
28955,
198
] | 2.264977 | 434 |
from YarrrmlUtils import Yarrrml
from SparqlUtils import Sparql
from SqlUtils import Sql
import json
import sys
dataset = "./test/gtfs/"
queryDir = "query2/"
if __name__ == '__main__':
main() | [
6738,
575,
3258,
81,
4029,
18274,
4487,
1330,
575,
3258,
81,
4029,
198,
6738,
1338,
283,
13976,
18274,
4487,
1330,
1338,
283,
13976,
198,
6738,
311,
13976,
18274,
4487,
1330,
311,
13976,
198,
11748,
33918,
198,
11748,
25064,
198,
19608,
292,
316,
796,
366,
19571,
9288,
14,
13655,
9501,
30487,
198,
22766,
35277,
220,
796,
366,
22766,
17,
30487,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419
] | 2.578947 | 76 |
default_app_config = 'django_rdkit.apps.DjangoRDKitConfig'
| [
12286,
62,
1324,
62,
11250,
796,
705,
28241,
14208,
62,
4372,
15813,
13,
18211,
13,
35,
73,
14208,
35257,
20827,
16934,
6,
198
] | 2.565217 | 23 |
from rest_framework import serializers
from ..serializers import TranslatedModelSerializer
from .models import Project, Activity, Markers, ChannelReported
| [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
6738,
11485,
46911,
11341,
1330,
3602,
17249,
17633,
32634,
7509,
198,
6738,
764,
27530,
1330,
4935,
11,
24641,
11,
2940,
364,
11,
11102,
6207,
9741,
628,
628,
628,
198
] | 4.351351 | 37 |
# A cryptarithm is a mathematical puzzle for which the goal is to find the correspondence between letters and digits, such that the given arithmetic equation consisting of letters holds true when the letters are converted to digits.
# You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which should be interpreted as the word1 + word2 = word3 cryptarithm.
# If crypt, when it is decoded by replacing all of the letters in the cryptarithm with digits using the mapping in solution, becomes a valid arithmetic equation containing no numbers with leading zeroes, the answer is true. If it does not become a valid arithmetic solution, the answer is false.
# Example
# For crypt = ["SEND", "MORE", "MONEY"] and
# solution = [['O', '0'],
# ['M', '1'],
# ['Y', '2'],
# ['E', '5'],
# ['N', '6'],
# ['D', '7'],
# ['R', '8'],
# ['S', '9']]
# the output should be
# isCryptSolution(crypt, solution) = true.
# When you decrypt "SEND", "MORE", and "MONEY" using the mapping given in crypt, you get 9567 + 1085 = 10652 which is correct and a valid arithmetic equation.
# For crypt = ["TEN", "TWO", "ONE"] and
# solution = [['O', '1'],
# ['T', '0'],
# ['W', '9'],
# ['E', '5'],
# ['N', '4']]
# the output should be
# isCryptSolution(crypt, solution) = false.
# Even though 054 + 091 = 145, 054 and 091 both contain leading zeroes, meaning that this is not a valid solution.
| [
2,
317,
8194,
283,
342,
76,
318,
257,
18069,
15027,
329,
543,
262,
3061,
318,
284,
1064,
262,
22440,
1022,
7475,
290,
19561,
11,
884,
326,
262,
1813,
34768,
16022,
17747,
286,
7475,
6622,
2081,
618,
262,
7475,
389,
11513,
284,
19561,
13,
198,
2,
921,
423,
281,
7177,
286,
13042,
8194,
11,
262,
8194,
283,
342,
76,
11,
290,
281,
281,
7177,
7268,
262,
16855,
286,
7475,
290,
19561,
11,
4610,
13,
383,
7177,
8194,
481,
3994,
1115,
1729,
12,
28920,
13042,
326,
1061,
262,
4645,
25,
685,
4775,
16,
11,
1573,
17,
11,
1573,
18,
4357,
543,
815,
307,
16173,
355,
262,
1573,
16,
1343,
1573,
17,
796,
1573,
18,
8194,
283,
342,
76,
13,
198,
2,
1002,
8194,
11,
618,
340,
318,
875,
9043,
416,
13586,
477,
286,
262,
7475,
287,
262,
8194,
283,
342,
76,
351,
19561,
1262,
262,
16855,
287,
4610,
11,
4329,
257,
4938,
34768,
16022,
7268,
645,
3146,
351,
3756,
1976,
263,
3028,
11,
262,
3280,
318,
2081,
13,
1002,
340,
857,
407,
1716,
257,
4938,
34768,
4610,
11,
262,
3280,
318,
3991,
13,
198,
2,
17934,
198,
2,
1114,
8194,
796,
14631,
50,
10619,
1600,
366,
23346,
1600,
366,
44,
48399,
8973,
290,
198,
2,
4610,
796,
16410,
6,
46,
3256,
705,
15,
6,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
44,
3256,
705,
16,
6,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
56,
3256,
705,
17,
6,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
36,
3256,
705,
20,
6,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
45,
3256,
705,
21,
6,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
35,
3256,
705,
22,
6,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
49,
3256,
705,
23,
6,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
50,
3256,
705,
24,
6,
11907,
198,
2,
262,
5072,
815,
307,
198,
2,
318,
23919,
46344,
7,
29609,
11,
4610,
8,
796,
2081,
13,
198,
2,
1649,
345,
42797,
366,
50,
10619,
1600,
366,
23346,
1600,
290,
366,
44,
48399,
1,
1262,
262,
16855,
1813,
287,
8194,
11,
345,
651,
6957,
3134,
1343,
838,
5332,
796,
838,
43193,
543,
318,
3376,
290,
257,
4938,
34768,
16022,
13,
198,
2,
1114,
8194,
796,
14631,
51,
1677,
1600,
366,
34551,
46,
1600,
366,
11651,
8973,
290,
198,
2,
4610,
796,
16410,
6,
46,
3256,
705,
16,
6,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
51,
3256,
705,
15,
6,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
54,
3256,
705,
24,
6,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
36,
3256,
705,
20,
6,
4357,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
45,
3256,
705,
19,
6,
11907,
198,
2,
262,
5072,
815,
307,
198,
2,
318,
23919,
46344,
7,
29609,
11,
4610,
8,
796,
3991,
13,
198,
2,
3412,
996,
657,
4051,
1343,
657,
6420,
796,
20299,
11,
657,
4051,
290,
657,
6420,
1111,
3994,
3756,
1976,
263,
3028,
11,
3616,
326,
428,
318,
407,
257,
4938,
4610,
13,
198
] | 2.836735 | 588 |
import os
import pathlib
import shutil
import tempfile
import unittest
from unittest.mock import patch
import anndata
import boto3
import numpy
import pandas
from moto import mock_s3
from backend.corpora.common.corpora_orm import (
CollectionVisibility,
DatasetArtifactType,
DatasetArtifactFileType,
UploadStatus,
ValidationStatus,
)
from backend.corpora.common.entities.collection import Collection
from backend.corpora.common.entities.dataset import Dataset
from backend.corpora.dataset_processing import process
| [
11748,
28686,
198,
11748,
3108,
8019,
198,
11748,
4423,
346,
198,
11748,
20218,
7753,
198,
11748,
555,
715,
395,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
198,
11748,
281,
358,
1045,
198,
11748,
275,
2069,
18,
198,
11748,
299,
32152,
198,
11748,
19798,
292,
198,
198,
6738,
285,
2069,
1330,
15290,
62,
82,
18,
198,
198,
6738,
30203,
13,
10215,
38851,
13,
11321,
13,
10215,
38851,
62,
579,
1330,
357,
198,
220,
220,
220,
12251,
15854,
2247,
11,
198,
220,
220,
220,
16092,
292,
316,
8001,
29660,
6030,
11,
198,
220,
220,
220,
16092,
292,
316,
8001,
29660,
8979,
6030,
11,
198,
220,
220,
220,
36803,
19580,
11,
198,
220,
220,
220,
3254,
24765,
19580,
11,
198,
8,
198,
6738,
30203,
13,
10215,
38851,
13,
11321,
13,
298,
871,
13,
43681,
1330,
12251,
198,
6738,
30203,
13,
10215,
38851,
13,
11321,
13,
298,
871,
13,
19608,
292,
316,
1330,
16092,
292,
316,
198,
198,
6738,
30203,
13,
10215,
38851,
13,
19608,
292,
316,
62,
36948,
1330,
1429,
628
] | 3.139535 | 172 |
import re
def stripped(text):
"""
Removes all whitespace from a string
"""
return re.sub(r'\s+', '', text)
| [
11748,
302,
628,
198,
4299,
18818,
7,
5239,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3982,
5241,
477,
13216,
10223,
422,
257,
4731,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
302,
13,
7266,
7,
81,
6,
59,
82,
10,
3256,
705,
3256,
2420,
8,
198
] | 2.45098 | 51 |
# @Author: Edmund Lam <edl>
# @Date: 18:44:31, 17-Apr-2018
# @Filename: __init__.py
# @Last modified by: edl
# @Last modified time: 10:05:18, 13-Oct-2019
# __all__=['settings', 'utilities', 'fun', 'economy', 'help', 'quiz', 'trivia', 'wolframalpha', 'ascii_art', 'regex_commands']
__all__=['moderation', 'help', 'utilities', 'wolframalpha']
| [
2,
2488,
13838,
25,
35646,
10923,
1279,
276,
75,
29,
198,
2,
2488,
10430,
25,
220,
220,
1248,
25,
2598,
25,
3132,
11,
1596,
12,
13680,
12,
7908,
198,
2,
2488,
35063,
25,
11593,
15003,
834,
13,
9078,
198,
2,
2488,
5956,
9518,
416,
25,
220,
220,
1225,
75,
198,
2,
2488,
5956,
9518,
640,
25,
838,
25,
2713,
25,
1507,
11,
1511,
12,
12349,
12,
23344,
628,
198,
2,
11593,
439,
834,
28,
17816,
33692,
3256,
705,
315,
2410,
3256,
705,
12543,
3256,
705,
13926,
88,
3256,
705,
16794,
3256,
705,
421,
528,
3256,
705,
28461,
8869,
3256,
705,
18829,
859,
26591,
3256,
705,
292,
979,
72,
62,
433,
3256,
705,
260,
25636,
62,
9503,
1746,
20520,
198,
834,
439,
834,
28,
17816,
4666,
263,
341,
3256,
705,
16794,
3256,
705,
315,
2410,
3256,
705,
18829,
859,
26591,
20520,
198
] | 2.460993 | 141 |
from io import open as io_open
import os
from setuptools import find_packages, setup
dirname = os.path.dirname(__file__)
readme_file = os.path.join(dirname, "README.md")
if os.path.exists(readme_file):
with io_open(readme_file, "r", encoding="utf-8") as f:
long_description = f.read()
else:
# When this is first installed in development Docker, README.md is not available
long_description = ""
# major, minor, patch
version_info = 0, 3, 11
# Nice string for the version
__version__ = ".".join(map(str, version_info))
setup(
name="localtileserver",
version=__version__,
description="Locally serve geospatial raster tiles in the Slippy Map standard.",
long_description=long_description,
long_description_content_type="text/markdown",
author="Bane Sullivan",
author_email="[email protected]",
url="https://github.com/banesullivan/localtileserver",
packages=find_packages(),
include_package_data=True,
zip_safe=False,
classifiers=[
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python",
],
python_requires=">=3.6",
install_requires=[
"click",
"flask>=2.0.0",
"Flask-Caching",
"GDAL",
"large_image",
"large_image_source_gdal",
"requests",
"scooby",
],
extras_require={
"leaflet": ["ipyleaflet"],
"folium": ["folium"],
"mpl": ["matplotlib"],
"sources": ["large-image-source-pil", "large-image-source-tiff"],
},
entry_points={
"console_scripts": [
"localtileserver = localtileserver.__main__:run_app",
],
},
)
| [
6738,
33245,
1330,
1280,
355,
33245,
62,
9654,
198,
11748,
28686,
198,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
15908,
3672,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
8,
198,
961,
1326,
62,
7753,
796,
28686,
13,
6978,
13,
22179,
7,
15908,
3672,
11,
366,
15675,
11682,
13,
9132,
4943,
198,
361,
28686,
13,
6978,
13,
1069,
1023,
7,
961,
1326,
62,
7753,
2599,
198,
220,
220,
220,
351,
33245,
62,
9654,
7,
961,
1326,
62,
7753,
11,
366,
81,
1600,
21004,
2625,
40477,
12,
23,
4943,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
890,
62,
11213,
796,
277,
13,
961,
3419,
198,
17772,
25,
198,
220,
220,
220,
1303,
1649,
428,
318,
717,
6589,
287,
2478,
25716,
11,
20832,
11682,
13,
9132,
318,
407,
1695,
198,
220,
220,
220,
890,
62,
11213,
796,
13538,
198,
198,
2,
1688,
11,
4159,
11,
8529,
198,
9641,
62,
10951,
796,
657,
11,
513,
11,
1367,
198,
2,
18460,
4731,
329,
262,
2196,
198,
834,
9641,
834,
796,
366,
526,
13,
22179,
7,
8899,
7,
2536,
11,
2196,
62,
10951,
4008,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
17946,
2501,
2915,
18497,
1600,
198,
220,
220,
220,
2196,
28,
834,
9641,
834,
11,
198,
220,
220,
220,
6764,
2625,
33711,
453,
4691,
4903,
2117,
34961,
374,
1603,
19867,
287,
262,
3454,
41214,
9347,
3210,
33283,
198,
220,
220,
220,
890,
62,
11213,
28,
6511,
62,
11213,
11,
198,
220,
220,
220,
890,
62,
11213,
62,
11299,
62,
4906,
2625,
5239,
14,
4102,
2902,
1600,
198,
220,
220,
220,
1772,
2625,
33,
1531,
18501,
1600,
198,
220,
220,
220,
1772,
62,
12888,
2625,
3820,
274,
16040,
31,
14816,
13,
785,
1600,
198,
220,
220,
220,
19016,
2625,
5450,
1378,
12567,
13,
785,
14,
3820,
274,
16040,
14,
17946,
2501,
2915,
18497,
1600,
198,
220,
220,
220,
10392,
28,
19796,
62,
43789,
22784,
198,
220,
220,
220,
2291,
62,
26495,
62,
7890,
28,
17821,
11,
198,
220,
220,
220,
19974,
62,
21230,
28,
25101,
11,
198,
220,
220,
220,
1398,
13350,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
366,
41206,
12678,
7904,
513,
532,
12995,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
34156,
7904,
7294,
40,
20010,
1079,
7904,
17168,
13789,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
18843,
803,
4482,
7904,
7294,
13362,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
15167,
2229,
15417,
7904,
11361,
7904,
513,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
15167,
2229,
15417,
7904,
11361,
7904,
513,
13,
23,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
15167,
2229,
15417,
7904,
11361,
1600,
198,
220,
220,
220,
16589,
198,
220,
220,
220,
21015,
62,
47911,
2625,
29,
28,
18,
13,
21,
1600,
198,
220,
220,
220,
2721,
62,
47911,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
366,
12976,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
2704,
2093,
29,
28,
17,
13,
15,
13,
15,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
7414,
2093,
12,
34,
8103,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
45113,
1847,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
11664,
62,
9060,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
11664,
62,
9060,
62,
10459,
62,
21287,
282,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
8897,
3558,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
82,
1073,
26730,
1600,
198,
220,
220,
220,
16589,
198,
220,
220,
220,
33849,
62,
46115,
34758,
198,
220,
220,
220,
220,
220,
220,
220,
366,
33201,
1616,
1298,
14631,
541,
2349,
1878,
1616,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
366,
9062,
1505,
1298,
14631,
9062,
1505,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
366,
76,
489,
1298,
14631,
6759,
29487,
8019,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
366,
82,
2203,
1298,
14631,
11664,
12,
9060,
12,
10459,
12,
79,
346,
1600,
366,
11664,
12,
9060,
12,
10459,
12,
83,
733,
33116,
198,
220,
220,
220,
8964,
198,
220,
220,
220,
5726,
62,
13033,
34758,
198,
220,
220,
220,
220,
220,
220,
220,
366,
41947,
62,
46521,
1298,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
17946,
2501,
2915,
18497,
796,
1957,
83,
2915,
18497,
13,
834,
12417,
834,
25,
5143,
62,
1324,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
16589,
198,
220,
220,
220,
8964,
198,
8,
198
] | 2.422425 | 767 |
from sense_hat import SenseHat
sense = SenseHat()
while True:
acceleration = sense.get_accelerometer_raw()
x = acceleration['x']
y = acceleration['y']
z = acceleration['z']
x=round(x, 0)
y=round(y, 0)
z=round(z, 0)
print("x={0}, y={1}, z={2}".format(x, y, z))
| [
6738,
2565,
62,
5183,
1330,
24956,
40483,
198,
198,
33819,
796,
24956,
40483,
3419,
198,
198,
4514,
6407,
25,
198,
197,
330,
7015,
341,
796,
2565,
13,
1136,
62,
330,
7015,
15635,
62,
1831,
3419,
198,
197,
87,
796,
20309,
17816,
87,
20520,
198,
197,
88,
796,
20309,
17816,
88,
20520,
198,
197,
89,
796,
20309,
17816,
89,
20520,
628,
197,
87,
28,
744,
7,
87,
11,
657,
8,
198,
197,
88,
28,
744,
7,
88,
11,
657,
8,
198,
197,
89,
28,
744,
7,
89,
11,
657,
8,
628,
197,
4798,
7203,
87,
34758,
15,
5512,
331,
34758,
16,
5512,
1976,
34758,
17,
92,
1911,
18982,
7,
87,
11,
331,
11,
1976,
4008,
198
] | 2.365217 | 115 |
"""Kata url: https://www.codewars.com/kata/57126304cdbf63c6770012bd."""
| [
37811,
42,
1045,
19016,
25,
3740,
1378,
2503,
13,
19815,
413,
945,
13,
785,
14,
74,
1045,
14,
3553,
19420,
21288,
66,
9945,
69,
5066,
66,
3134,
9879,
1065,
17457,
526,
15931,
628
] | 2.212121 | 33 |
import asyncio
import aioredis
import uvloop
from tqdm.asyncio import tqdm
uvloop.install()
asyncio.run(main())
| [
11748,
30351,
952,
198,
11748,
257,
72,
1850,
271,
198,
11748,
334,
85,
26268,
198,
6738,
256,
80,
36020,
13,
292,
13361,
952,
1330,
256,
80,
36020,
198,
198,
14795,
26268,
13,
17350,
3419,
628,
198,
292,
13361,
952,
13,
5143,
7,
12417,
28955,
198
] | 2.555556 | 45 |
import os
from app import ds_config
from flask import Flask
from flask_wtf.csrf import CSRFProtect
session_path = "/tmp/python_recipe_sessions"
app = Flask(__name__)
app.config.from_pyfile("config.py")
app.secret_key = ds_config.DS_CONFIG["session_secret"]
csrf = CSRFProtect(app) # See https://flask-wtf.readthedocs.io/en/stable/csrf.html
if "DYNO" in os.environ: # On Heroku?
import logging
stream_handler = logging.StreamHandler()
app.logger.addHandler(stream_handler)
app.logger.setLevel(logging.INFO)
app.logger.info("Recipe example startup")
app.config.update(dict(PREFERRED_URL_SCHEME = "https"))
from app import views
| [
11748,
28686,
198,
6738,
598,
1330,
288,
82,
62,
11250,
198,
6738,
42903,
1330,
46947,
198,
6738,
42903,
62,
86,
27110,
13,
6359,
41871,
1330,
9429,
32754,
41426,
628,
198,
29891,
62,
6978,
796,
12813,
22065,
14,
29412,
62,
29102,
431,
62,
82,
6202,
1,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
1324,
13,
11250,
13,
6738,
62,
9078,
7753,
7203,
11250,
13,
9078,
4943,
198,
1324,
13,
21078,
62,
2539,
796,
288,
82,
62,
11250,
13,
5258,
62,
10943,
16254,
14692,
29891,
62,
21078,
8973,
198,
6359,
41871,
796,
9429,
32754,
41426,
7,
1324,
8,
1303,
4091,
3740,
1378,
2704,
2093,
12,
86,
27110,
13,
961,
83,
704,
420,
82,
13,
952,
14,
268,
14,
31284,
14,
6359,
41871,
13,
6494,
198,
198,
361,
366,
35,
56,
15285,
1,
287,
28686,
13,
268,
2268,
25,
220,
1303,
1550,
2332,
11601,
30,
198,
220,
220,
220,
1330,
18931,
198,
220,
220,
220,
4269,
62,
30281,
796,
18931,
13,
12124,
25060,
3419,
198,
220,
220,
220,
598,
13,
6404,
1362,
13,
2860,
25060,
7,
5532,
62,
30281,
8,
198,
220,
220,
220,
598,
13,
6404,
1362,
13,
2617,
4971,
7,
6404,
2667,
13,
10778,
8,
198,
220,
220,
220,
598,
13,
6404,
1362,
13,
10951,
7203,
37523,
1672,
13693,
4943,
198,
220,
220,
220,
598,
13,
11250,
13,
19119,
7,
11600,
7,
46437,
24302,
22083,
62,
21886,
62,
50,
3398,
3620,
36,
796,
366,
5450,
48774,
198,
198,
6738,
598,
1330,
5009,
198
] | 2.666667 | 246 |
footer = "By: EJ Studios for>> EJ Studios" | [
5898,
263,
796,
366,
3886,
25,
412,
41,
13799,
329,
4211,
412,
41,
13799,
1
] | 2.8 | 15 |
from flask import after_this_request
from app.domain.permissions import company_admin
from app.helpers.authentication import (
current_user,
set_auth_cookies,
create_access_tokens_for,
AuthenticatedMutation,
require_auth_with_write_access,
)
import graphene
from datetime import datetime, date, timedelta
from sqlalchemy.orm import selectinload
from uuid import uuid4
from app import app, db, mailer
from app.controllers.utils import atomic_transaction, Void
from app.helpers.errors import (
InvalidParamsError,
InvalidTokenError,
InvalidResourceError,
)
from app.helpers.mail import MailjetError
from app.helpers.authorization import (
with_authorization_policy,
active,
AuthorizationError,
)
from app.models import Company, User
from app.models.employment import (
EmploymentOutput,
Employment,
EmploymentRequestValidationStatus,
)
from app.models.queries import query_activities
MAX_SIZE_OF_INVITATION_BATCH = 100
MAILJET_BATCH_SEND_LIMIT = 50
class CreateEmployment(AuthenticatedMutation):
"""
Invitation de rattachement d'un travailleur mobile à une entreprise. L'invitation doit être approuvée par le salarié pour être effective.
Retourne le rattachement.
"""
Output = EmploymentOutput
@classmethod
@with_authorization_policy(
company_admin,
get_target_from_args=lambda *args, **kwargs: kwargs["company_id"],
)
class CreateWorkerEmploymentsFromEmails(AuthenticatedMutation):
"""
Invitation de rattachement d'un travailleur mobile à une entreprise. L'invitation doit être approuvée par le salarié pour être effective.
Retourne le rattachement.
"""
Output = graphene.List(EmploymentOutput)
@classmethod
@with_authorization_policy(
company_admin,
get_target_from_args=lambda *args, **kwargs: kwargs["company_id"],
)
class ValidateEmployment(AuthenticatedMutation):
"""
Validation d'une invitation de rattachement par le salarié.
Retourne le rattachement validé.
"""
Output = EmploymentOutput
@classmethod
@with_authorization_policy(active)
class RejectEmployment(AuthenticatedMutation):
"""
Refus d'une invitation de rattachement par le salarié.
Retourne le rattachement rejeté.
"""
Output = EmploymentOutput
@classmethod
@with_authorization_policy(active)
class TerminateEmployment(AuthenticatedMutation):
"""
Fin du rattachement d'un salarié.
Retourne le rattachement.
"""
Output = EmploymentOutput
@classmethod
@with_authorization_policy(
company_admin,
get_target_from_args=lambda *args, **kwargs: Employment.query.get(
kwargs["employment_id"]
).company_id,
error_message="Actor is not authorized to terminate the employment",
)
class CancelEmployment(AuthenticatedMutation):
"""
Annulation du rattachement d'un salarié. Supprime le rattachement qu'il soit actif ou non.
Retourne le rattachement
"""
Output = Void
@classmethod
@with_authorization_policy(
company_admin,
get_target_from_args=lambda *args, **kwargs: Employment.query.get(
kwargs["employment_id"]
).company_id,
error_message="Actor is not authorized to cancel the employment",
)
| [
6738,
42903,
1330,
706,
62,
5661,
62,
25927,
198,
198,
6738,
598,
13,
27830,
13,
525,
8481,
1330,
1664,
62,
28482,
198,
6738,
598,
13,
16794,
364,
13,
41299,
3299,
1330,
357,
198,
220,
220,
220,
1459,
62,
7220,
11,
198,
220,
220,
220,
900,
62,
18439,
62,
27916,
444,
11,
198,
220,
220,
220,
2251,
62,
15526,
62,
83,
482,
641,
62,
1640,
11,
198,
220,
220,
220,
31885,
3474,
44,
7094,
11,
198,
220,
220,
220,
2421,
62,
18439,
62,
4480,
62,
13564,
62,
15526,
11,
198,
8,
198,
11748,
42463,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
3128,
11,
28805,
12514,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
2922,
259,
2220,
198,
6738,
334,
27112,
1330,
334,
27112,
19,
198,
198,
6738,
598,
1330,
598,
11,
20613,
11,
6920,
263,
198,
6738,
598,
13,
3642,
36667,
13,
26791,
1330,
17226,
62,
7645,
2673,
11,
18331,
198,
6738,
598,
13,
16794,
364,
13,
48277,
1330,
357,
198,
220,
220,
220,
17665,
10044,
4105,
12331,
11,
198,
220,
220,
220,
17665,
30642,
12331,
11,
198,
220,
220,
220,
17665,
26198,
12331,
11,
198,
8,
198,
6738,
598,
13,
16794,
364,
13,
4529,
1330,
11099,
31173,
12331,
198,
6738,
598,
13,
16794,
364,
13,
9800,
1634,
1330,
357,
198,
220,
220,
220,
351,
62,
9800,
1634,
62,
30586,
11,
198,
220,
220,
220,
4075,
11,
198,
220,
220,
220,
35263,
12331,
11,
198,
8,
198,
6738,
598,
13,
27530,
1330,
5834,
11,
11787,
198,
6738,
598,
13,
27530,
13,
28812,
1330,
357,
198,
220,
220,
220,
24656,
26410,
11,
198,
220,
220,
220,
24656,
11,
198,
220,
220,
220,
24656,
18453,
7762,
24765,
19580,
11,
198,
8,
198,
6738,
598,
13,
27530,
13,
421,
10640,
1330,
12405,
62,
15791,
871,
198,
198,
22921,
62,
33489,
62,
19238,
62,
1268,
53,
2043,
6234,
62,
33,
11417,
796,
1802,
198,
5673,
4146,
41,
2767,
62,
33,
11417,
62,
50,
10619,
62,
43,
3955,
2043,
796,
2026,
628,
198,
4871,
13610,
29733,
434,
7,
47649,
3474,
44,
7094,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
10001,
3780,
390,
27263,
4891,
434,
288,
6,
403,
1291,
85,
603,
293,
333,
5175,
28141,
17809,
920,
260,
7919,
13,
406,
6,
16340,
3780,
466,
270,
6184,
103,
33945,
598,
472,
85,
22161,
1582,
443,
3664,
2743,
2634,
12797,
6184,
103,
33945,
4050,
13,
628,
220,
220,
220,
4990,
454,
710,
443,
27263,
4891,
434,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
25235,
796,
24656,
26410,
628,
220,
220,
220,
2488,
4871,
24396,
198,
220,
220,
220,
2488,
4480,
62,
9800,
1634,
62,
30586,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1664,
62,
28482,
11,
198,
220,
220,
220,
220,
220,
220,
220,
651,
62,
16793,
62,
6738,
62,
22046,
28,
50033,
1635,
22046,
11,
12429,
46265,
22046,
25,
479,
86,
22046,
14692,
39722,
62,
312,
33116,
198,
220,
220,
220,
1267,
628,
198,
4871,
13610,
12468,
263,
29733,
902,
4863,
10161,
1768,
7,
47649,
3474,
44,
7094,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
10001,
3780,
390,
27263,
4891,
434,
288,
6,
403,
1291,
85,
603,
293,
333,
5175,
28141,
17809,
920,
260,
7919,
13,
406,
6,
16340,
3780,
466,
270,
6184,
103,
33945,
598,
472,
85,
22161,
1582,
443,
3664,
2743,
2634,
12797,
6184,
103,
33945,
4050,
13,
628,
220,
220,
220,
4990,
454,
710,
443,
27263,
4891,
434,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
25235,
796,
42463,
13,
8053,
7,
29733,
434,
26410,
8,
628,
220,
220,
220,
2488,
4871,
24396,
198,
220,
220,
220,
2488,
4480,
62,
9800,
1634,
62,
30586,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1664,
62,
28482,
11,
198,
220,
220,
220,
220,
220,
220,
220,
651,
62,
16793,
62,
6738,
62,
22046,
28,
50033,
1635,
22046,
11,
12429,
46265,
22046,
25,
479,
86,
22046,
14692,
39722,
62,
312,
33116,
198,
220,
220,
220,
1267,
628,
198,
198,
4871,
3254,
20540,
29733,
434,
7,
47649,
3474,
44,
7094,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3254,
24765,
288,
6,
1726,
17023,
390,
27263,
4891,
434,
1582,
443,
3664,
2743,
2634,
13,
628,
220,
220,
220,
4990,
454,
710,
443,
27263,
4891,
434,
4938,
2634,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
25235,
796,
24656,
26410,
628,
220,
220,
220,
2488,
4871,
24396,
198,
220,
220,
220,
2488,
4480,
62,
9800,
1634,
62,
30586,
7,
5275,
8,
628,
198,
4871,
797,
752,
29733,
434,
7,
47649,
3474,
44,
7094,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6524,
385,
288,
6,
1726,
17023,
390,
27263,
4891,
434,
1582,
443,
3664,
2743,
2634,
13,
628,
220,
220,
220,
4990,
454,
710,
443,
27263,
4891,
434,
302,
31173,
2634,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
25235,
796,
24656,
26410,
628,
220,
220,
220,
2488,
4871,
24396,
198,
220,
220,
220,
2488,
4480,
62,
9800,
1634,
62,
30586,
7,
5275,
8,
628,
628,
198,
198,
4871,
15527,
378,
29733,
434,
7,
47649,
3474,
44,
7094,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
4463,
7043,
27263,
4891,
434,
288,
6,
403,
3664,
2743,
2634,
13,
628,
220,
220,
220,
4990,
454,
710,
443,
27263,
4891,
434,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
25235,
796,
24656,
26410,
628,
220,
220,
220,
2488,
4871,
24396,
198,
220,
220,
220,
2488,
4480,
62,
9800,
1634,
62,
30586,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1664,
62,
28482,
11,
198,
220,
220,
220,
220,
220,
220,
220,
651,
62,
16793,
62,
6738,
62,
22046,
28,
50033,
1635,
22046,
11,
12429,
46265,
22046,
25,
24656,
13,
22766,
13,
1136,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
86,
22046,
14692,
28812,
62,
312,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
6739,
39722,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
20500,
2625,
40277,
318,
407,
10435,
284,
23654,
262,
7184,
1600,
198,
220,
220,
220,
1267,
628,
198,
4871,
27910,
29733,
434,
7,
47649,
3474,
44,
7094,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5506,
1741,
7043,
27263,
4891,
434,
288,
6,
403,
3664,
2743,
2634,
13,
8105,
81,
524,
443,
27263,
4891,
434,
627,
6,
346,
523,
270,
719,
361,
267,
84,
1729,
13,
628,
220,
220,
220,
4990,
454,
710,
443,
27263,
4891,
434,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
25235,
796,
18331,
628,
220,
220,
220,
2488,
4871,
24396,
198,
220,
220,
220,
2488,
4480,
62,
9800,
1634,
62,
30586,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1664,
62,
28482,
11,
198,
220,
220,
220,
220,
220,
220,
220,
651,
62,
16793,
62,
6738,
62,
22046,
28,
50033,
1635,
22046,
11,
12429,
46265,
22046,
25,
24656,
13,
22766,
13,
1136,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
86,
22046,
14692,
28812,
62,
312,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
6739,
39722,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
20500,
2625,
40277,
318,
407,
10435,
284,
14241,
262,
7184,
1600,
198,
220,
220,
220,
1267,
628
] | 2.776119 | 1,206 |
import pytest
from pheasant.renderers.number.number import Anchor, Header
@pytest.fixture(scope="module")
@pytest.fixture(scope="module")
@pytest.fixture()
| [
11748,
12972,
9288,
198,
198,
6738,
279,
258,
8775,
13,
10920,
19288,
13,
17618,
13,
17618,
1330,
29253,
273,
11,
48900,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
2625,
21412,
4943,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
2625,
21412,
4943,
628,
198,
31,
9078,
9288,
13,
69,
9602,
3419,
198
] | 2.859649 | 57 |
from gmodetector_py import regress
from gmodetector_py import find_desired_channel
from gmodetector_py import slice_desired_channel
from gmodetector_py import CLS_to_image
import h5py
import numpy as np
import pandas as pd
import os
class WeightArray:
"""A 3D array containing weights for each spectral component, obtained by regression of hybercube onto design matrix
:param test_matrix: An object of class XMatrix (containing normalized spectra for each known component, and intercept if applicable)
:param test_cube: An object of class Hypercube (containing spectra for each pixel)
:ivar wavelengths: contains the contents of ``wavelengths`` passed from ``test_matrix`` and ``test_cube`` (must be same, or will yield error)
:ivar weights: 3D array containing weight values
:ivar components: A list of spectral components (including intercept if applicable) – contains the contents of ``fluorophore_ID_vector`` passed through``test_matrix.components``
"""
def plot(self, desired_component, color, cap):
"""Plot a single channel selected from a weight array produced by regression
:param desired_component: A string matching the ID of the component to be plotted (e.g. 'GFP')
:param color: A string equal to 'red', 'blue', or 'green' – the color that the extracted band will be plotted in
:param cap: A numeric value of the spectral intensity value that will have maximum brightness in the plot. All with greater intensity will have the same level of brightness. Think of this as image exposure on a camera.
"""
index_of_desired_channel = find_desired_channel(self.components,
desired_component)
Weights_desired_peak_channel = slice_desired_channel(self.weights,
index_of_desired_channel)
Weights_desired_peak_channel = np.expand_dims(Weights_desired_peak_channel, axis=2)
plot_out = CLS_to_image(CLS_matrix = Weights_desired_peak_channel,
cap = cap, mode = 'opaque',
match_size=False, color=color)
return(plot_out)
| [
6738,
308,
4666,
316,
9250,
62,
9078,
1330,
50252,
198,
6738,
308,
4666,
316,
9250,
62,
9078,
1330,
1064,
62,
8906,
1202,
62,
17620,
198,
6738,
308,
4666,
316,
9250,
62,
9078,
1330,
16416,
62,
8906,
1202,
62,
17620,
198,
6738,
308,
4666,
316,
9250,
62,
9078,
1330,
39241,
62,
1462,
62,
9060,
198,
198,
11748,
289,
20,
9078,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
28686,
198,
198,
4871,
14331,
19182,
25,
198,
220,
220,
220,
37227,
32,
513,
35,
7177,
7268,
19590,
329,
1123,
37410,
7515,
11,
6492,
416,
20683,
286,
2537,
527,
40296,
4291,
1486,
17593,
628,
220,
220,
220,
1058,
17143,
1332,
62,
6759,
8609,
25,
1052,
2134,
286,
1398,
1395,
46912,
357,
38301,
39279,
5444,
430,
329,
1123,
1900,
7515,
11,
290,
15788,
611,
9723,
8,
198,
220,
220,
220,
1058,
17143,
1332,
62,
40296,
25,
1052,
2134,
286,
1398,
15079,
40296,
357,
38301,
5444,
430,
329,
1123,
17465,
8,
198,
220,
220,
220,
1058,
452,
283,
45656,
25,
4909,
262,
10154,
286,
7559,
10247,
26623,
82,
15506,
3804,
422,
7559,
9288,
62,
6759,
8609,
15506,
290,
7559,
9288,
62,
40296,
15506,
357,
27238,
307,
976,
11,
393,
481,
7800,
4049,
8,
198,
220,
220,
220,
1058,
452,
283,
19590,
25,
513,
35,
7177,
7268,
3463,
3815,
198,
220,
220,
220,
1058,
452,
283,
6805,
25,
317,
1351,
286,
37410,
6805,
357,
8201,
15788,
611,
9723,
8,
784,
1849,
3642,
1299,
262,
10154,
286,
7559,
35522,
273,
2522,
382,
62,
2389,
62,
31364,
15506,
3804,
832,
15506,
9288,
62,
6759,
8609,
13,
5589,
3906,
15506,
628,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
7110,
7,
944,
11,
10348,
62,
42895,
11,
3124,
11,
1451,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
43328,
257,
2060,
6518,
6163,
422,
257,
3463,
7177,
4635,
416,
20683,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
10348,
62,
42895,
25,
317,
4731,
12336,
262,
4522,
286,
262,
7515,
284,
307,
37515,
357,
68,
13,
70,
13,
705,
38,
5837,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
3124,
25,
317,
4731,
4961,
284,
705,
445,
3256,
705,
17585,
3256,
393,
705,
14809,
6,
784,
1849,
1169,
3124,
326,
262,
21242,
4097,
481,
307,
37515,
287,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
1451,
25,
317,
35575,
1988,
286,
262,
37410,
12245,
1988,
326,
481,
423,
5415,
22204,
287,
262,
7110,
13,
1439,
351,
3744,
12245,
481,
423,
262,
976,
1241,
286,
22204,
13,
11382,
286,
428,
355,
2939,
7111,
319,
257,
4676,
13,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
6376,
62,
1659,
62,
8906,
1202,
62,
17620,
796,
1064,
62,
8906,
1202,
62,
17620,
7,
944,
13,
5589,
3906,
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,
10348,
62,
42895,
8,
198,
220,
220,
220,
220,
220,
220,
220,
775,
2337,
62,
8906,
1202,
62,
36729,
62,
17620,
796,
16416,
62,
8906,
1202,
62,
17620,
7,
944,
13,
43775,
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,
6376,
62,
1659,
62,
8906,
1202,
62,
17620,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
775,
2337,
62,
8906,
1202,
62,
36729,
62,
17620,
796,
45941,
13,
11201,
392,
62,
67,
12078,
7,
1135,
2337,
62,
8906,
1202,
62,
36729,
62,
17620,
11,
16488,
28,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
7110,
62,
448,
796,
39241,
62,
1462,
62,
9060,
7,
5097,
50,
62,
6759,
8609,
796,
775,
2337,
62,
8906,
1202,
62,
36729,
62,
17620,
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,
1451,
796,
1451,
11,
4235,
796,
705,
404,
18251,
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,
2872,
62,
7857,
28,
25101,
11,
3124,
28,
8043,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
7,
29487,
62,
448,
8,
198
] | 2.670213 | 846 |
#!/usr/bin/python
import ldap, logging, shelve
import subprocess as sb
import xml.etree.ElementTree as ET
import os, time, sys, urllib2, ConfigParser, pwd
from datetime import datetime, timedelta
from base64 import b64encode
CONFIG_FILE_INI = '/opt/zimbra/conf/zbackup.ini'
ZIMBRA_ACCOUNT_STATUS = ['active', 'locked', 'closed', 'lockout', 'pending']
CONTENT_TYPES = ['message', 'contact', 'appointment', 'task', 'document']
logging_levels = {
'DEBUG' : logging.DEBUG,
'INFO' : logging.INFO,
'WARNING' : logging.WARNING,
'ERROR' : logging.ERROR,
'FATAL' : logging.FATAL
}
if __name__ == '__main__':
zbr = ZBackupRequest('admin@c403775bc8c8', '/opt/zimbra/backup')
zbr.run() | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
11748,
300,
67,
499,
11,
18931,
11,
7497,
303,
198,
11748,
850,
14681,
355,
264,
65,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
198,
11748,
28686,
11,
640,
11,
25064,
11,
2956,
297,
571,
17,
11,
17056,
46677,
11,
279,
16993,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
6738,
2779,
2414,
1330,
275,
2414,
268,
8189,
198,
198,
10943,
16254,
62,
25664,
62,
1268,
40,
796,
31051,
8738,
14,
89,
14107,
430,
14,
10414,
14,
89,
1891,
929,
13,
5362,
6,
198,
57,
3955,
33,
3861,
62,
26861,
28270,
62,
35744,
2937,
796,
37250,
5275,
3256,
705,
24162,
3256,
705,
20225,
3256,
705,
5354,
448,
3256,
705,
79,
1571,
20520,
198,
198,
37815,
3525,
62,
9936,
47,
1546,
796,
37250,
20500,
3256,
705,
32057,
3256,
705,
1324,
49805,
3256,
705,
35943,
3256,
705,
22897,
20520,
198,
198,
6404,
2667,
62,
46170,
796,
1391,
198,
220,
705,
30531,
6,
1058,
18931,
13,
30531,
11,
198,
220,
705,
10778,
6,
1058,
18931,
13,
10778,
11,
198,
220,
705,
31502,
6,
1058,
18931,
13,
31502,
11,
198,
220,
705,
24908,
6,
1058,
18931,
13,
24908,
11,
198,
220,
705,
37,
1404,
1847,
6,
1058,
18931,
13,
37,
1404,
1847,
198,
92,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
1976,
1671,
796,
1168,
7282,
929,
18453,
10786,
28482,
31,
66,
1821,
2718,
2425,
15630,
23,
66,
23,
3256,
31051,
8738,
14,
89,
14107,
430,
14,
1891,
929,
11537,
198,
220,
1976,
1671,
13,
5143,
3419
] | 2.617424 | 264 |
import unittest
import numpy as np
from preprocessing import split_data, principal_components
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
662,
36948,
1330,
6626,
62,
7890,
11,
10033,
62,
5589,
3906,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 3.086957 | 46 |
import pygame
import sys
import time
from threepy.core import *
import os
pwd = os.path.abspath(os.path.dirname(__file__))
# set window title
# WARNING: calling this method loses the original OpenGL context;
# only use before calling OpenGL functions
# implement by extending class
# implement by extending class
| [
11748,
12972,
6057,
198,
11748,
25064,
198,
11748,
640,
198,
198,
6738,
294,
260,
538,
88,
13,
7295,
1330,
1635,
198,
11748,
28686,
198,
79,
16993,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
628,
198,
220,
220,
220,
1303,
900,
4324,
3670,
628,
220,
220,
220,
1303,
39410,
25,
4585,
428,
2446,
14754,
262,
2656,
30672,
4732,
26,
198,
220,
220,
220,
1303,
220,
220,
691,
779,
878,
4585,
30672,
5499,
628,
220,
220,
220,
1303,
3494,
416,
16610,
1398,
628,
220,
220,
220,
1303,
3494,
416,
16610,
1398,
198
] | 3.31068 | 103 |
"""
Code to specify constraints on parameters of distributions.
:Authors: - Wilker Aziz
"""
import tensorflow as tf
class Parameter:
"""
This class helps predict parameters by setting an appropriate activation to convert from the real line
to some subset of it.
"""
class Location(Parameter):
"""
Location parameters live in the real line.
"""
class Scale(Parameter):
"""
Scale parameters live in the positive real line.
"""
class Rate(Parameter):
"""
Rate parameters live in the positive real line.
"""
class Shape(Parameter):
"""
Shape parameters live in the positive real line.
"""
class Probability(Parameter):
"""
Probability parameters live in the interval [0, 1]
"""
| [
37811,
198,
10669,
284,
11986,
17778,
319,
10007,
286,
24570,
13,
198,
198,
25,
30515,
669,
25,
532,
5187,
6122,
7578,
528,
198,
37811,
198,
11748,
11192,
273,
11125,
355,
48700,
628,
198,
4871,
25139,
2357,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
770,
1398,
5419,
4331,
10007,
416,
4634,
281,
5035,
14916,
284,
10385,
422,
262,
1103,
1627,
198,
220,
220,
220,
284,
617,
24637,
286,
340,
13,
198,
220,
220,
220,
37227,
628,
198,
4871,
13397,
7,
36301,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
13397,
10007,
2107,
287,
262,
1103,
1627,
13,
198,
220,
220,
220,
37227,
628,
198,
4871,
21589,
7,
36301,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
21589,
10007,
2107,
287,
262,
3967,
1103,
1627,
13,
198,
220,
220,
220,
37227,
628,
198,
4871,
14806,
7,
36301,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
14806,
10007,
2107,
287,
262,
3967,
1103,
1627,
13,
198,
220,
220,
220,
37227,
628,
198,
4871,
25959,
7,
36301,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
25959,
10007,
2107,
287,
262,
3967,
1103,
1627,
13,
198,
220,
220,
220,
37227,
628,
198,
4871,
30873,
1799,
7,
36301,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
30873,
1799,
10007,
2107,
287,
262,
16654,
685,
15,
11,
352,
60,
198,
220,
220,
220,
37227,
198
] | 3.30303 | 231 |
def obfuscate_API_key(API_key):
"""
Return a mostly obfuscated version of the API Key
:param API_key: input string
:return: str
"""
if API_key is not None:
return (len(API_key)-8)*'*'+API_key[-8:]
def assert_is_string(value):
"""
Checks if the provided value is a valid string instance
:param value: value to be checked
:return: None
"""
try: # Python 2.x
assert isinstance(value, basestring), "Value must be a string or unicode"
except NameError: # Python 3.x
assert isinstance(value, str), "Value must be a string"
def assert_is_string_or_unicode(value):
"""
Checks if the provided value is a valid string or unicode instance
On Python 3.x it just checks that the value is a string instance.
:param value: value to be checked
:return: None
"""
try:
assert isinstance(value, basestring) or isinstance(value, unicode), \
"Value must be a string or unicode"
except NameError:
assert isinstance(value, str), "Value must be a string"
def encode_to_utf8(value):
"""
Turns the provided value to UTF-8 encoding
:param value: input value
:return: UTF-8 encoded value
"""
try: # The OWM API expects UTF-8 encoding
if not isinstance(value, unicode):
return value.encode('utf8')
return value
except NameError:
return value
| [
4299,
44080,
378,
62,
17614,
62,
2539,
7,
17614,
62,
2539,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8229,
257,
4632,
44080,
515,
2196,
286,
262,
7824,
7383,
628,
220,
220,
220,
1058,
17143,
7824,
62,
2539,
25,
5128,
4731,
198,
220,
220,
220,
1058,
7783,
25,
965,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
7824,
62,
2539,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
11925,
7,
17614,
62,
2539,
13219,
23,
27493,
6,
9,
6,
10,
17614,
62,
2539,
58,
12,
23,
47715,
628,
198,
4299,
6818,
62,
271,
62,
8841,
7,
8367,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
47719,
611,
262,
2810,
1988,
318,
257,
4938,
4731,
4554,
628,
220,
220,
220,
1058,
17143,
1988,
25,
1988,
284,
307,
10667,
198,
220,
220,
220,
1058,
7783,
25,
6045,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1949,
25,
220,
1303,
11361,
362,
13,
87,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
318,
39098,
7,
8367,
11,
1615,
395,
1806,
828,
366,
11395,
1276,
307,
257,
4731,
393,
28000,
1098,
1,
198,
220,
220,
220,
2845,
6530,
12331,
25,
220,
1303,
11361,
513,
13,
87,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
318,
39098,
7,
8367,
11,
965,
828,
366,
11395,
1276,
307,
257,
4731,
1,
628,
198,
4299,
6818,
62,
271,
62,
8841,
62,
273,
62,
46903,
1098,
7,
8367,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
47719,
611,
262,
2810,
1988,
318,
257,
4938,
4731,
393,
28000,
1098,
4554,
198,
220,
220,
220,
1550,
11361,
513,
13,
87,
340,
655,
8794,
326,
262,
1988,
318,
257,
4731,
4554,
13,
198,
220,
220,
220,
1058,
17143,
1988,
25,
1988,
284,
307,
10667,
198,
220,
220,
220,
1058,
7783,
25,
6045,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
318,
39098,
7,
8367,
11,
1615,
395,
1806,
8,
393,
318,
39098,
7,
8367,
11,
28000,
1098,
828,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
11395,
1276,
307,
257,
4731,
393,
28000,
1098,
1,
198,
220,
220,
220,
2845,
6530,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
318,
39098,
7,
8367,
11,
965,
828,
366,
11395,
1276,
307,
257,
4731,
1,
628,
198,
4299,
37773,
62,
1462,
62,
40477,
23,
7,
8367,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
30875,
262,
2810,
1988,
284,
41002,
12,
23,
21004,
628,
220,
220,
220,
1058,
17143,
1988,
25,
5128,
1988,
198,
220,
220,
220,
1058,
7783,
25,
41002,
12,
23,
30240,
1988,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1949,
25,
220,
1303,
383,
440,
22117,
7824,
13423,
41002,
12,
23,
21004,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
318,
39098,
7,
8367,
11,
28000,
1098,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1988,
13,
268,
8189,
10786,
40477,
23,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
1988,
198,
220,
220,
220,
2845,
6530,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
1988,
628
] | 2.63586 | 541 |
from warnings import warn
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from modeltree.tree import trees
SORT_DIRECTIONS = ('asc', 'desc')
| [
6738,
14601,
1330,
9828,
198,
28311,
25,
198,
220,
220,
220,
422,
17268,
1330,
14230,
1068,
35,
713,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422,
6149,
11600,
1330,
14230,
1068,
35,
713,
198,
6738,
953,
2120,
631,
13,
21048,
1330,
7150,
628,
198,
50,
9863,
62,
17931,
23988,
11053,
796,
19203,
3372,
3256,
705,
20147,
11537,
628,
628,
198
] | 3.290323 | 62 |
# ### Problem 1
# Ask the user to enter a number.
# Using the provided list of numbers, use a for loop to iterate
# the array and print out all the values that are smaller than the user input and print
# out all the values that are larger than the number entered by the user.
# ```
# # Start with this List
list_of_many_numbers = [12, 24, 1, 34, 10, 2, 7]
# ```
# Example Input/Output if the user enters the number 9:
# ```
# The User entered 9
# 1 2 7 are smaller than 9
# 12 24 34 10 are larger than 9
# ```
#ASK USER FOR NUMBER and turns into an integer
userNumber = int(input("Enter a number"))
# initiates a new array for smaller and larger numbers
smallernumbers = []
largernumbers = []
# compares the value to each number in the original array and adds that value to its respective array (smaller or larger)
for eachnumber in list_of_many_numbers:
if eachnumber < userNumber:
smallernumbers.append(eachnumber)
if eachnumber > userNumber:
largernumbers.append(eachnumber)
print(f"{smallernumbers} are smaller than {userNumber}")
print(f"{largernumbers} are larger than {userNumber}")
| [
2,
44386,
20647,
352,
198,
2,
16981,
262,
2836,
284,
3802,
257,
1271,
13,
220,
198,
2,
8554,
262,
2810,
1351,
286,
3146,
11,
779,
257,
329,
9052,
284,
11629,
378,
198,
2,
262,
7177,
290,
3601,
503,
477,
262,
3815,
326,
389,
4833,
621,
262,
2836,
5128,
290,
3601,
198,
2,
503,
477,
262,
3815,
326,
389,
4025,
621,
262,
1271,
5982,
416,
262,
2836,
13,
198,
198,
2,
7559,
63,
198,
2,
1303,
7253,
351,
428,
7343,
198,
4868,
62,
1659,
62,
21834,
62,
77,
17024,
796,
685,
1065,
11,
1987,
11,
352,
11,
4974,
11,
838,
11,
362,
11,
767,
60,
198,
2,
7559,
63,
198,
2,
17934,
23412,
14,
26410,
611,
262,
2836,
14170,
262,
1271,
860,
25,
198,
2,
7559,
63,
198,
2,
383,
11787,
5982,
860,
198,
2,
352,
220,
362,
220,
767,
389,
4833,
621,
860,
198,
2,
1105,
220,
1987,
220,
4974,
220,
838,
389,
4025,
621,
860,
198,
2,
7559,
63,
198,
2,
1921,
42,
1294,
1137,
7473,
36871,
13246,
290,
4962,
656,
281,
18253,
198,
7220,
15057,
796,
493,
7,
15414,
7203,
17469,
257,
1271,
48774,
198,
198,
2,
5383,
689,
257,
649,
7177,
329,
4833,
290,
4025,
3146,
198,
17470,
1142,
17024,
796,
17635,
198,
15521,
1142,
17024,
796,
17635,
628,
198,
2,
23008,
262,
1988,
284,
1123,
1271,
287,
262,
2656,
7177,
290,
6673,
326,
1988,
284,
663,
11756,
7177,
357,
17470,
263,
393,
4025,
8,
198,
1640,
1123,
17618,
287,
1351,
62,
1659,
62,
21834,
62,
77,
17024,
25,
198,
220,
220,
220,
611,
1123,
17618,
1279,
2836,
15057,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1402,
1142,
17024,
13,
33295,
7,
27379,
17618,
8,
628,
220,
220,
220,
611,
1123,
17618,
1875,
2836,
15057,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2552,
1142,
17024,
13,
33295,
7,
27379,
17618,
8,
198,
4798,
7,
69,
1,
90,
17470,
1142,
17024,
92,
389,
4833,
621,
1391,
7220,
15057,
92,
4943,
198,
4798,
7,
69,
1,
90,
15521,
1142,
17024,
92,
389,
4025,
621,
1391,
7220,
15057,
92,
4943,
198
] | 3.26087 | 345 |
'''TCP ping.'''
import socket
import time
import cping.protocols
class Ping(cping.protocols.Ping):
'''TCP ping. The possible results:
* latency=x, error=False: successful TCP handshake
* latency=x, error=True: connection failure, like TCP-RST
* latency=-1, error=False: timeout
'''
def __init__(self, port, *args, **kwargs):
'''Constructor.
Args:
port (int): TCP port to ping.
*args (...): Arguments passed to `cping.protocols.Ping`.
**kwargs (x=y): Keyword arguments passed to `cping.protocols.Ping`.
Raises:
TypeError: If `port` is not a integer.
ValueError: If `port` is not between 1 and 65535.
'''
self.port = port
super().__init__(*args, **kwargs)
@property
def port(self):
'''TCP port to ping.'''
return self._port
@port.setter
| [
7061,
6,
4825,
47,
29400,
2637,
7061,
198,
11748,
17802,
198,
11748,
640,
198,
198,
11748,
269,
13886,
13,
11235,
4668,
82,
628,
198,
4871,
34263,
7,
13155,
278,
13,
11235,
4668,
82,
13,
49806,
2599,
198,
220,
220,
220,
705,
7061,
4825,
47,
29400,
13,
383,
1744,
2482,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1635,
24812,
28,
87,
11,
4049,
28,
25101,
25,
4388,
23633,
42231,
198,
220,
220,
220,
220,
220,
220,
220,
1635,
24812,
28,
87,
11,
4049,
28,
17821,
25,
4637,
5287,
11,
588,
23633,
12,
49,
2257,
198,
220,
220,
220,
220,
220,
220,
220,
1635,
24812,
10779,
16,
11,
4049,
28,
25101,
25,
26827,
198,
220,
220,
220,
705,
7061,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
2493,
11,
1635,
22046,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
42316,
273,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2493,
357,
600,
2599,
23633,
2493,
284,
29400,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
22046,
357,
986,
2599,
20559,
2886,
3804,
284,
4600,
13155,
278,
13,
11235,
4668,
82,
13,
49806,
44646,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12429,
46265,
22046,
357,
87,
28,
88,
2599,
7383,
4775,
7159,
3804,
284,
4600,
13155,
278,
13,
11235,
4668,
82,
13,
49806,
44646,
628,
220,
220,
220,
220,
220,
220,
220,
7567,
2696,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5994,
12331,
25,
1002,
4600,
634,
63,
318,
407,
257,
18253,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11052,
12331,
25,
1002,
4600,
634,
63,
318,
407,
1022,
352,
290,
45021,
2327,
13,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
634,
796,
2493,
198,
220,
220,
220,
220,
220,
220,
220,
2208,
22446,
834,
15003,
834,
46491,
22046,
11,
12429,
46265,
22046,
8,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
2493,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
4825,
47,
2493,
284,
29400,
2637,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
634,
628,
220,
220,
220,
2488,
634,
13,
2617,
353,
198
] | 2.237164 | 409 |
from collections import namedtuple
from modules.deco.constants import DecoConstants
import math
import copy
from modules.deco.utilities import *
| [
6738,
17268,
1330,
3706,
83,
29291,
198,
6738,
13103,
13,
12501,
78,
13,
9979,
1187,
1330,
4280,
78,
34184,
1187,
198,
11748,
10688,
198,
11748,
4866,
198,
6738,
13103,
13,
12501,
78,
13,
315,
2410,
1330,
1635,
198
] | 3.815789 | 38 |
from django.contrib import admin
from import_export.admin import ImportExportMixin
from dashboard.models import Inquerito, TipoSementeGerminou, TipoAreaGerminacao, VerificacaoSementes, RowControl, Sementeira
admin.site.site_header = 'Genesis App Administration'
admin.site.register(Inquerito, InqueritoAdmin)
admin.site.register(TipoAreaGerminacao, TipoAreaGerminacaoAdmin)
admin.site.register(TipoSementeGerminou, TipoSementeGerminouAdmin)
admin.site.register(VerificacaoSementes, VerificacaoSementesAdmin)
admin.site.register(Sementeira, SementeiraAdmin)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
1330,
62,
39344,
13,
28482,
1330,
17267,
43834,
35608,
259,
628,
198,
6738,
30415,
13,
27530,
1330,
554,
10819,
10094,
11,
23095,
34049,
972,
68,
38069,
1084,
280,
11,
23095,
78,
30547,
38069,
1084,
330,
5488,
11,
4643,
811,
330,
5488,
50,
972,
274,
11,
11314,
15988,
11,
311,
972,
68,
8704,
628,
628,
198,
28482,
13,
15654,
13,
15654,
62,
25677,
796,
705,
13746,
9339,
2034,
8694,
6,
198,
28482,
13,
15654,
13,
30238,
7,
818,
10819,
10094,
11,
554,
10819,
10094,
46787,
8,
198,
28482,
13,
15654,
13,
30238,
7,
28434,
78,
30547,
38069,
1084,
330,
5488,
11,
23095,
78,
30547,
38069,
1084,
330,
5488,
46787,
8,
198,
28482,
13,
15654,
13,
30238,
7,
28434,
34049,
972,
68,
38069,
1084,
280,
11,
23095,
34049,
972,
68,
38069,
1084,
280,
46787,
8,
198,
28482,
13,
15654,
13,
30238,
7,
13414,
811,
330,
5488,
50,
972,
274,
11,
4643,
811,
330,
5488,
50,
972,
274,
46787,
8,
198,
28482,
13,
15654,
13,
30238,
7,
50,
972,
68,
8704,
11,
311,
972,
68,
8704,
46787,
8,
198
] | 3.026882 | 186 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from rest_framework.views import exception_handler
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
1334,
62,
30604,
13,
33571,
1330,
6631,
62,
30281,
628
] | 3.162162 | 37 |
from django.urls import path
from twitter_data.views import HomeView
from . import views
urlpatterns = [
path('', HomeView.as_view(), name='home')
] | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
17044,
62,
7890,
13,
33571,
1330,
5995,
7680,
198,
6738,
764,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
3256,
5995,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
11195,
11537,
198,
60
] | 3.06 | 50 |
"""@file deepattractornetnoise_soft_loss.py
contains the DeepattractornetnoisesoftLoss"""
import loss_computer
from nabu.neuralnetworks.components import ops
class DeepattractornetnoisesoftLoss(loss_computer.LossComputer):
"""A loss computer that calculates the loss"""
def __call__(self, targets, logits, seq_length):
"""
Compute the loss
Creates the operation to compute the Deep attractor network loss with
adapted architecture and soft decissions
Args:
targets: a dictionary of [batch_size x time x ...] tensor containing
the targets
logits: a dictionary of [batch_size x time x ...] tensors containing the logits
seq_length: a dictionary of [batch_size] vectors containing
the sequence lengths
Returns:
loss: a scalar value containing the loss
norm: a scalar value indicating how to normalize the loss
"""
# To which class belongs bin
partioning = targets['partitioning']
# Clean spectograms of sources
spectrogram_targets=targets['spectogram_targets']
# Spectogram of the original mixture, used to mask for scoring
mix_to_mask = targets['mix_to_mask']
# Which bins contain enough energy
energybins = targets['energybins']
seq_length = seq_length['emb_vec']
emb_vec = logits['emb_vec']
alpha = logits['alpha']
loss, norm = ops.deepattractornetnoise_soft_loss(
partioning, spectrogram_targets, mix_to_mask, energybins, emb_vec, alpha, seq_length, self.batch_size)
return loss, norm
| [
37811,
31,
7753,
2769,
1078,
974,
1211,
316,
3919,
786,
62,
4215,
62,
22462,
13,
9078,
198,
3642,
1299,
262,
10766,
1078,
974,
1211,
316,
3919,
2696,
11205,
43,
793,
37811,
198,
198,
11748,
2994,
62,
33215,
198,
6738,
47822,
84,
13,
710,
1523,
3262,
5225,
13,
5589,
3906,
1330,
39628,
628,
198,
4871,
10766,
1078,
974,
1211,
316,
3919,
2696,
11205,
43,
793,
7,
22462,
62,
33215,
13,
43,
793,
34556,
2599,
198,
220,
220,
220,
37227,
32,
2994,
3644,
326,
43707,
262,
2994,
37811,
628,
220,
220,
220,
825,
11593,
13345,
834,
7,
944,
11,
6670,
11,
2604,
896,
11,
33756,
62,
13664,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
3082,
1133,
262,
2994,
628,
220,
220,
220,
220,
220,
220,
220,
7921,
274,
262,
4905,
284,
24061,
262,
10766,
4729,
273,
3127,
2994,
351,
198,
220,
220,
220,
220,
220,
220,
220,
16573,
10959,
290,
2705,
875,
7717,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6670,
25,
257,
22155,
286,
685,
43501,
62,
7857,
2124,
640,
2124,
2644,
60,
11192,
273,
7268,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
262,
6670,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
896,
25,
257,
22155,
286,
685,
43501,
62,
7857,
2124,
640,
2124,
2644,
60,
11192,
669,
7268,
262,
2604,
896,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33756,
62,
13664,
25,
257,
22155,
286,
685,
43501,
62,
7857,
60,
30104,
7268,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
262,
8379,
20428,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2994,
25,
257,
16578,
283,
1988,
7268,
262,
2994,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2593,
25,
257,
16578,
283,
1988,
12739,
703,
284,
3487,
1096,
262,
2994,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
1675,
543,
1398,
14448,
9874,
198,
220,
220,
220,
220,
220,
220,
220,
636,
295,
278,
796,
6670,
17816,
3911,
653,
278,
20520,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
5985,
5444,
26836,
286,
4237,
198,
220,
220,
220,
220,
220,
220,
220,
5444,
39529,
62,
83,
853,
1039,
28,
83,
853,
1039,
17816,
4443,
21857,
62,
83,
853,
1039,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
13058,
21857,
286,
262,
2656,
11710,
11,
973,
284,
9335,
329,
9689,
198,
220,
220,
220,
220,
220,
220,
220,
5022,
62,
1462,
62,
27932,
796,
6670,
17816,
19816,
62,
1462,
62,
27932,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
9022,
41701,
3994,
1576,
2568,
198,
220,
220,
220,
220,
220,
220,
220,
2568,
65,
1040,
796,
6670,
17816,
22554,
65,
1040,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
33756,
62,
13664,
796,
33756,
62,
13664,
17816,
24419,
62,
35138,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
4072,
62,
35138,
796,
2604,
896,
17816,
24419,
62,
35138,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
17130,
796,
2604,
896,
17816,
26591,
20520,
628,
220,
220,
220,
220,
220,
220,
220,
2994,
11,
2593,
796,
39628,
13,
22089,
1078,
974,
1211,
316,
3919,
786,
62,
4215,
62,
22462,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
636,
295,
278,
11,
5444,
39529,
62,
83,
853,
1039,
11,
5022,
62,
1462,
62,
27932,
11,
220,
2568,
65,
1040,
11,
4072,
62,
35138,
11,
17130,
11,
33756,
62,
13664,
11,
2116,
13,
43501,
62,
7857,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2994,
11,
2593,
198
] | 2.557427 | 653 |
import sys
from ..converter import Converter, ConversionError, ValidationError
class Ginkgo(Converter):
"""Convert Transcriptic samples.json to sample-set schema"""
VERSION = '0.0.2'
FILENAME = 'ginkgo_samples'
def convert(self, input_fp, output_fp=None, verbose=True, config={}, enforce_validation=True):
"""Do the conversion by running a method in runner.py"""
from .runner import convert_ginkgo
passed_config = config if config != {} else self.options
return convert_ginkgo(self.targetschema, self.encoding, input_fp,
verbose=verbose,
config=passed_config,
output_file=output_fp,
enforce_validation=enforce_validation)
| [
11748,
25064,
198,
6738,
11485,
1102,
332,
353,
1330,
35602,
353,
11,
44101,
12331,
11,
3254,
24765,
12331,
198,
198,
4871,
402,
676,
2188,
7,
3103,
332,
353,
2599,
198,
220,
220,
220,
37227,
3103,
1851,
42978,
291,
8405,
13,
17752,
284,
6291,
12,
2617,
32815,
37811,
198,
220,
220,
220,
44156,
2849,
796,
705,
15,
13,
15,
13,
17,
6,
198,
220,
220,
220,
34020,
1677,
10067,
796,
705,
70,
676,
2188,
62,
82,
12629,
6,
628,
220,
220,
220,
825,
10385,
7,
944,
11,
5128,
62,
46428,
11,
5072,
62,
46428,
28,
14202,
11,
15942,
577,
28,
17821,
11,
4566,
34758,
5512,
4605,
62,
12102,
341,
28,
17821,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
5211,
262,
11315,
416,
2491,
257,
2446,
287,
17490,
13,
9078,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
422,
764,
16737,
1330,
10385,
62,
70,
676,
2188,
198,
220,
220,
220,
220,
220,
220,
220,
3804,
62,
11250,
796,
4566,
611,
4566,
14512,
23884,
2073,
2116,
13,
25811,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
10385,
62,
70,
676,
2188,
7,
944,
13,
83,
853,
1039,
2395,
2611,
11,
2116,
13,
12685,
7656,
11,
5128,
62,
46428,
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,
15942,
577,
28,
19011,
577,
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,
4566,
28,
6603,
276,
62,
11250,
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,
5072,
62,
7753,
28,
22915,
62,
46428,
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,
4605,
62,
12102,
341,
28,
268,
3174,
62,
12102,
341,
8,
198
] | 2.230986 | 355 |
'''Module containing decoders for different websited
This module contains decoders for decoding information from
various websites. Any new website that needs to be added
will contain information about how a particular website is to
be decoded over here. You should include modules here as they
become important.
The functions within the files over here take an HTML encoded
string, and return a dictionary. This form is particularly
convinient because this can be generalized in any way required.
Currently the following decoders are present:
| module | website |
|--------|------------------------|
| drugs | https://www.drugs.com |
'''
| [
7061,
6,
26796,
7268,
875,
375,
364,
329,
1180,
2639,
863,
198,
198,
1212,
8265,
4909,
875,
375,
364,
329,
39938,
1321,
422,
198,
7785,
699,
9293,
13,
4377,
649,
3052,
326,
2476,
284,
307,
2087,
198,
10594,
3994,
1321,
546,
703,
257,
1948,
3052,
318,
284,
220,
198,
1350,
875,
9043,
625,
994,
13,
921,
815,
2291,
13103,
994,
355,
484,
198,
9423,
462,
1593,
13,
198,
198,
464,
5499,
1626,
262,
3696,
625,
994,
1011,
281,
11532,
30240,
198,
8841,
11,
290,
1441,
257,
22155,
13,
770,
1296,
318,
3573,
198,
1102,
7114,
1153,
780,
428,
460,
307,
38284,
287,
597,
835,
2672,
13,
198,
198,
21327,
262,
1708,
875,
375,
364,
389,
1944,
25,
198,
198,
91,
8265,
930,
3052,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
198,
91,
982,
91,
22369,
91,
198,
91,
5010,
220,
930,
3740,
1378,
2503,
13,
30349,
82,
13,
785,
220,
930,
628,
198,
198,
7061,
6,
628,
628
] | 3.988024 | 167 |
from .globals import Renderer, WidgetHandler
from .globals.constantes import *
| [
6738,
764,
4743,
672,
874,
1330,
28703,
11882,
11,
370,
17484,
25060,
198,
6738,
764,
4743,
672,
874,
13,
9979,
39781,
1330,
1635,
198
] | 3.291667 | 24 |
from listenerlibrary import listenerlibrary
| [
6738,
24783,
32016,
1330,
24783,
32016,
628
] | 6.428571 | 7 |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
| [
2,
30396,
329,
1702,
306,
12,
25614,
1351,
13,
198,
2,
1398,
7343,
19667,
25,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
1188,
28,
15,
11,
1306,
28,
14202,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2100,
796,
1188,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19545,
796,
1306,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198
] | 2.105263 | 76 |
from unittest import TestCase
from unittest.mock import Mock, patch
from telegram.ext import ConversationHandler
from civbot.commands import cmd_cancel
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
44123,
11,
8529,
198,
198,
6738,
573,
30536,
13,
2302,
1330,
42427,
25060,
198,
198,
6738,
36317,
13645,
13,
9503,
1746,
1330,
23991,
62,
66,
21130,
628
] | 3.604651 | 43 |
import numpy as np
from sysmpy.entity import *
from operator import add
# Test ###############################################################
# mn = MatrixForGraph(np.matrix([[1, 2, 3], [3, 4, 5], [6, 7, 8]]))
# print(mn.sum_column())
| [
11748,
299,
32152,
355,
45941,
198,
6738,
25064,
3149,
88,
13,
26858,
1330,
1635,
198,
6738,
10088,
1330,
751,
628,
198,
2,
6208,
1303,
29113,
14468,
7804,
4242,
2235,
198,
2,
285,
77,
796,
24936,
1890,
37065,
7,
37659,
13,
6759,
8609,
26933,
58,
16,
11,
362,
11,
513,
4357,
685,
18,
11,
604,
11,
642,
4357,
685,
21,
11,
767,
11,
807,
11907,
4008,
198,
2,
3601,
7,
10295,
13,
16345,
62,
28665,
28955,
628
] | 3.144737 | 76 |
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
"""Train a Fast R-CNN network."""
import caffe
from fast_rcnn.config import cfg
import roi_data_layer.roidb as rdl_roidb
from utils.timer import Timer
import numpy as np
import os
from fast_rcnn.test import im_detect
import cv2
import copy
import utils.cython_bbox
from utils.cython_bbox import bbox_overlaps
import matplotlib.pyplot as plt
from caffe.proto import caffe_pb2
import google.protobuf as pb2
# from fast_rcnn.test import vis_detections
import google.protobuf.text_format
from utils.cython_nms import nms
import random
try:
import cPickle as pickle
except:
import pickle
import shutil
CLASSES = ( '__background__','aeroplane', 'bicycle', 'bird', 'boat',
'bottle', 'bus', 'car', 'cat', 'chair',
'cow', 'diningtable', 'dog', 'horse',
'motorbike', 'person', 'pottedplant',
'sheep', 'sofa', 'train', 'tvmonitor')
global select_id
select_id = 0
class SolverWrapper(object):
"""A simple wrapper around Caffe's solver.
This wrapper gives us control over he snapshotting process, which we
use to unnormalize the learned bounding-box regression weights.
"""
def __init__(self, solver_prototxt, roidb,roidb_w, output_dir,
pretrained_model=None):
"""Initialize the SolverWrapper."""
self.output_dir = output_dir
self.solver = caffe.SGDSolver(solver_prototxt)
if pretrained_model is not None:
print ('Loading pretrained model '
'weights from {:s}').format(pretrained_model)
self.solver.net.copy_from(pretrained_model)
self.solver_param = caffe_pb2.SolverParameter()
with open(solver_prototxt, 'rt') as f:
pb2.text_format.Merge(f.read(), self.solver_param)
self.start_iters= 15000
self.step_iter= 5000
self.object_num= 1
self._n_classes= 21
self._step_num = 2
check_roidb(roidb, True)
check_roidb(roidb_w, True)
self._General_roidb= roidb
self._Weakly_roidb= roidb_w
self._Present_roidb=[]
curr_roidb= self.get_curr_roidb()
self.solver.net.layers[0].set_roidb(curr_roidb)
def vis_detections(self,image_name, im, class_name, dets,score, thresh=0.5):
"""Draw detected bounding boxes."""
# inds = np.where(dets[:, -1] >= thresh)[0]
# if len(inds) == 0:
# return
im = im[:, :, (2, 1, 0)]
fig, ax = plt.subplots(figsize=(12, 12))
ax.imshow(im, aspect='equal')
for i in xrange(1):
bbox = dets[i, :4]
score = dets[i, -1]
ax.add_patch(
plt.Rectangle((bbox[0], bbox[1]),
bbox[2] - bbox[0],
bbox[3] - bbox[1], fill=False,
edgecolor='red', linewidth=3.5)
)
ax.text(bbox[0], bbox[1] - 2,
'{:s} {:.3f}'.format(class_name, score),
bbox=dict(facecolor='blue', alpha=0.5),
fontsize=14, color='white')
ax.set_title(('{} detections with '
'p({} | box) >= {:.1f}').format(class_name, class_name,
thresh),
fontsize=14)
plt.axis('off')
plt.tight_layout()
plt.draw()
# save the image
fig = plt.gcf()
fig.savefig("images/output_"+image_name)
def snapshot(self):
"""Take a snapshot of the network after unnormalizing the learned
bounding-box regression weights. This enables easy use at test-time.
"""
net = self.solver.net
if cfg.TRAIN.BBOX_REG:
# save original values
orig_0 = net.params['bbox_pred'][0].data.copy()
orig_1 = net.params['bbox_pred'][1].data.copy()
# scale and shift with bbox reg unnormalization; then save snapshot
net.params['bbox_pred'][0].data[...] = \
(net.params['bbox_pred'][0].data *
self.bbox_stds[:, np.newaxis])
net.params['bbox_pred'][1].data[...] = \
(net.params['bbox_pred'][1].data *
self.bbox_stds + self.bbox_means)
if not os.path.exists(self.output_dir):
os.makedirs(self.output_dir)
infix = ('_' + cfg.TRAIN.SNAPSHOT_INFIX
if cfg.TRAIN.SNAPSHOT_INFIX != '' else '')
filename = (self.solver_param.snapshot_prefix + infix +
'_iter_{:d}'.format(self.solver.iter) + '.caffemodel')
filename = os.path.join(self.output_dir, filename)
net.save(str(filename))
print 'Wrote snapshot to: {:s}'.format(filename)
if cfg.TRAIN.BBOX_REG:
# restore net to original state
net.params['bbox_pred'][0].data[...] = orig_0
net.params['bbox_pred'][1].data[...] = orig_1
# def Roidb_vote(self):
def train_model(self, max_iters):
"""Network training loop."""
last_snapshot_iter = -1
timer = Timer()
while self.solver.iter < max_iters:
# Make one SGD update
timer.tic()
self.solver.step(1)
timer.toc()
if self.solver.iter % (10 * self.solver_param.display) == 0:
print 'speed: {:.3f}s / iter'.format(timer.average_time)
if self.solver.iter % 5000 ==0:
last_snapshot_iter = self.solver.iter
self.snapshot()
curr_roidb= self.get_curr_roidb()
check_roidb(curr_roidb, False)
self.solver.net.layers[0].set_roidb(curr_roidb)
if last_snapshot_iter != self.solver.iter: # last snapshot before exiting
self.snapshot()
def get_training_roidb(imdb):
"""Returns a roidb (Region of Interest database) for use in training."""
if cfg.TRAIN.USE_FLIPPED:
print 'Appending horizontally-flipped training examples...'
imdb.append_flipped_images()
print 'done'
print 'Preparing training data...'
rdl_roidb.prepare_roidb(imdb)
print 'done'
return imdb.roidb
def train_net(solver_prototxt, roidb,roidb_w,output_dir,
pretrained_model=None, max_iters=70000):
"""Train a Fast R-CNN network."""
sw = SolverWrapper(solver_prototxt, roidb,roidb_w, output_dir,
pretrained_model=pretrained_model)
print 'Solving...'
sw.train_model(max_iters)
print 'done solving'
| [
2,
20368,
22369,
201,
198,
2,
12549,
371,
12,
18474,
201,
198,
2,
15069,
357,
66,
8,
1853,
5413,
201,
198,
2,
49962,
739,
383,
17168,
13789,
685,
3826,
38559,
24290,
329,
3307,
60,
201,
198,
2,
22503,
416,
9847,
23837,
1477,
624,
197,
201,
198,
2,
20368,
22369,
201,
198,
37811,
44077,
257,
12549,
371,
12,
18474,
3127,
526,
15931,
201,
198,
201,
198,
11748,
21121,
201,
198,
6738,
3049,
62,
6015,
20471,
13,
11250,
1330,
30218,
70,
201,
198,
11748,
686,
72,
62,
7890,
62,
29289,
13,
3882,
65,
355,
374,
25404,
62,
3882,
65,
201,
198,
6738,
3384,
4487,
13,
45016,
1330,
5045,
263,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
28686,
201,
198,
6738,
3049,
62,
6015,
20471,
13,
9288,
1330,
545,
62,
15255,
478,
220,
201,
198,
11748,
269,
85,
17,
220,
220,
201,
198,
11748,
4866,
220,
220,
201,
198,
11748,
3384,
4487,
13,
948,
400,
261,
62,
65,
3524,
220,
220,
201,
198,
6738,
3384,
4487,
13,
948,
400,
261,
62,
65,
3524,
1330,
275,
3524,
62,
2502,
75,
1686,
220,
201,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
201,
198,
6738,
21121,
13,
1676,
1462,
1330,
21121,
62,
40842,
17,
201,
198,
11748,
23645,
13,
11235,
672,
3046,
355,
279,
65,
17,
201,
198,
2,
422,
3049,
62,
6015,
20471,
13,
9288,
1330,
1490,
62,
15255,
478,
507,
201,
198,
11748,
23645,
13,
11235,
672,
3046,
13,
5239,
62,
18982,
201,
198,
6738,
3384,
4487,
13,
948,
400,
261,
62,
77,
907,
1330,
299,
907,
201,
198,
11748,
4738,
201,
198,
28311,
25,
201,
198,
220,
220,
1330,
269,
31686,
293,
355,
2298,
293,
201,
198,
16341,
25,
201,
198,
220,
220,
1330,
2298,
293,
201,
198,
11748,
4423,
346,
201,
198,
31631,
1546,
796,
357,
705,
834,
25249,
834,
41707,
25534,
20106,
1531,
3256,
705,
65,
35298,
3256,
705,
16944,
3256,
705,
24482,
3256,
201,
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,
10985,
293,
3256,
705,
10885,
3256,
705,
7718,
3256,
705,
9246,
3256,
705,
16337,
3256,
201,
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,
8232,
3256,
705,
67,
3191,
11487,
3256,
705,
9703,
3256,
705,
30527,
3256,
201,
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,
76,
20965,
32256,
3256,
705,
6259,
3256,
705,
79,
8426,
15060,
3256,
201,
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,
7091,
538,
3256,
705,
568,
13331,
3256,
705,
27432,
3256,
705,
14981,
41143,
11537,
201,
198,
20541,
2922,
62,
312,
220,
201,
198,
19738,
62,
312,
796,
657,
201,
198,
4871,
4294,
332,
36918,
2848,
7,
15252,
2599,
201,
198,
220,
220,
220,
37227,
32,
2829,
29908,
1088,
327,
21223,
338,
1540,
332,
13,
201,
198,
220,
220,
220,
770,
29908,
3607,
514,
1630,
625,
339,
27479,
889,
1429,
11,
543,
356,
201,
198,
220,
220,
220,
779,
284,
555,
11265,
1096,
262,
4499,
5421,
278,
12,
3524,
20683,
19590,
13,
201,
198,
220,
220,
220,
37227,
201,
198,
201,
198,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
1540,
332,
62,
11235,
313,
742,
11,
686,
312,
65,
11,
3882,
65,
62,
86,
11,
5072,
62,
15908,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2181,
13363,
62,
19849,
28,
14202,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
24243,
1096,
262,
4294,
332,
36918,
2848,
526,
15931,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
22915,
62,
15908,
796,
5072,
62,
15908,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
82,
14375,
796,
21121,
13,
38475,
5258,
14375,
7,
82,
14375,
62,
11235,
313,
742,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2181,
13363,
62,
19849,
318,
407,
6045,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
19203,
19031,
2181,
13363,
2746,
705,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
43775,
422,
46110,
82,
92,
27691,
18982,
7,
5310,
13363,
62,
19849,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
82,
14375,
13,
3262,
13,
30073,
62,
6738,
7,
5310,
13363,
62,
19849,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
82,
14375,
62,
17143,
796,
21121,
62,
40842,
17,
13,
50,
14375,
36301,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
82,
14375,
62,
11235,
313,
742,
11,
705,
17034,
11537,
355,
277,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
65,
17,
13,
5239,
62,
18982,
13,
13102,
469,
7,
69,
13,
961,
22784,
2116,
13,
82,
14375,
62,
17143,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
9688,
62,
270,
364,
28,
1315,
830,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
9662,
62,
2676,
28,
23336,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15252,
62,
22510,
28,
352,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
77,
62,
37724,
28,
2310,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
9662,
62,
22510,
796,
362,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2198,
62,
3882,
65,
7,
3882,
65,
11,
6407,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2198,
62,
3882,
65,
7,
3882,
65,
62,
86,
11,
6407,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
12218,
62,
3882,
65,
28,
686,
312,
65,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
44898,
306,
62,
3882,
65,
28,
686,
312,
65,
62,
86,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
34695,
62,
3882,
65,
28,
21737,
201,
198,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1090,
81,
62,
3882,
65,
28,
2116,
13,
1136,
62,
22019,
81,
62,
3882,
65,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
82,
14375,
13,
3262,
13,
75,
6962,
58,
15,
4083,
2617,
62,
3882,
65,
7,
22019,
81,
62,
3882,
65,
8,
220,
201,
198,
220,
220,
220,
825,
1490,
62,
15255,
478,
507,
7,
944,
11,
9060,
62,
3672,
11,
545,
11,
1398,
62,
3672,
11,
288,
1039,
11,
26675,
11,
294,
3447,
28,
15,
13,
20,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
25302,
12326,
5421,
278,
10559,
526,
15931,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
773,
82,
796,
45941,
13,
3003,
7,
67,
1039,
58,
45299,
532,
16,
60,
18189,
294,
3447,
38381,
15,
60,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
611,
18896,
7,
521,
82,
8,
6624,
657,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
220,
220,
220,
1441,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
545,
796,
545,
58,
45299,
1058,
11,
357,
17,
11,
352,
11,
657,
15437,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2336,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
7,
5647,
7857,
16193,
1065,
11,
1105,
4008,
201,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
320,
12860,
7,
320,
11,
4843,
11639,
40496,
11537,
201,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2124,
9521,
7,
16,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
3524,
796,
288,
1039,
58,
72,
11,
1058,
19,
60,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4776,
796,
288,
1039,
58,
72,
11,
532,
16,
60,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
2860,
62,
17147,
7,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
45474,
9248,
19510,
65,
3524,
58,
15,
4357,
275,
3524,
58,
16,
46570,
201,
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,
275,
3524,
58,
17,
60,
532,
275,
3524,
58,
15,
4357,
201,
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,
275,
3524,
58,
18,
60,
532,
275,
3524,
58,
16,
4357,
6070,
28,
25101,
11,
201,
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,
5743,
8043,
11639,
445,
3256,
9493,
413,
5649,
28,
18,
13,
20,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
5239,
7,
65,
3524,
58,
15,
4357,
275,
3524,
58,
16,
60,
532,
362,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
90,
25,
82,
92,
46110,
13,
18,
69,
92,
4458,
18982,
7,
4871,
62,
3672,
11,
4776,
828,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
3524,
28,
11600,
7,
2550,
8043,
11639,
17585,
3256,
17130,
28,
15,
13,
20,
828,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10369,
7857,
28,
1415,
11,
3124,
11639,
11186,
11537,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
7877,
13,
2617,
62,
7839,
7,
10786,
90,
92,
4886,
507,
351,
705,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
79,
15090,
92,
930,
3091,
8,
18189,
46110,
13,
16,
69,
92,
27691,
18982,
7,
4871,
62,
3672,
11,
1398,
62,
3672,
11,
201,
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,
294,
3447,
828,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10369,
7857,
28,
1415,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
22704,
10786,
2364,
11537,
201,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
33464,
62,
39786,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
19334,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3613,
262,
2939,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2336,
796,
458,
83,
13,
70,
12993,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2336,
13,
21928,
5647,
7203,
17566,
14,
22915,
62,
1,
10,
9060,
62,
3672,
8,
201,
198,
220,
220,
220,
825,
27479,
7,
944,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
12322,
257,
27479,
286,
262,
3127,
706,
555,
11265,
2890,
262,
4499,
201,
198,
220,
220,
220,
220,
220,
220,
220,
5421,
278,
12,
3524,
20683,
19590,
13,
770,
13536,
2562,
779,
379,
1332,
12,
2435,
13,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2010,
796,
2116,
13,
82,
14375,
13,
3262,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
611,
30218,
70,
13,
51,
3861,
1268,
13,
33,
39758,
62,
31553,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3613,
2656,
3815,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1796,
62,
15,
796,
2010,
13,
37266,
17816,
65,
3524,
62,
28764,
6,
7131,
15,
4083,
7890,
13,
30073,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1796,
62,
16,
796,
2010,
13,
37266,
17816,
65,
3524,
62,
28764,
6,
7131,
16,
4083,
7890,
13,
30073,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
5046,
290,
6482,
351,
275,
3524,
842,
555,
11265,
1634,
26,
788,
3613,
27479,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2010,
13,
37266,
17816,
65,
3524,
62,
28764,
6,
7131,
15,
4083,
7890,
58,
22345,
796,
3467,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
3262,
13,
37266,
17816,
65,
3524,
62,
28764,
6,
7131,
15,
4083,
7890,
1635,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
65,
3524,
62,
301,
9310,
58,
45299,
45941,
13,
3605,
22704,
12962,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2010,
13,
37266,
17816,
65,
3524,
62,
28764,
6,
7131,
16,
4083,
7890,
58,
22345,
796,
3467,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
3262,
13,
37266,
17816,
65,
3524,
62,
28764,
6,
7131,
16,
4083,
7890,
1635,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
65,
3524,
62,
301,
9310,
1343,
2116,
13,
65,
3524,
62,
1326,
504,
8,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
1069,
1023,
7,
944,
13,
22915,
62,
15908,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
76,
4335,
17062,
7,
944,
13,
22915,
62,
15908,
8,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1167,
844,
796,
19203,
62,
6,
1343,
30218,
70,
13,
51,
3861,
1268,
13,
15571,
2969,
9693,
2394,
62,
1268,
47084,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
30218,
70,
13,
51,
3861,
1268,
13,
15571,
2969,
9693,
2394,
62,
1268,
47084,
14512,
10148,
2073,
10148,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
29472,
796,
357,
944,
13,
82,
14375,
62,
17143,
13,
45380,
9442,
62,
40290,
1343,
1167,
844,
1343,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
62,
2676,
23330,
25,
67,
92,
4458,
18982,
7,
944,
13,
82,
14375,
13,
2676,
8,
1343,
45302,
66,
2001,
368,
375,
417,
11537,
201,
198,
220,
220,
220,
220,
220,
220,
220,
29472,
796,
28686,
13,
6978,
13,
22179,
7,
944,
13,
22915,
62,
15908,
11,
29472,
8,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2010,
13,
21928,
7,
2536,
7,
34345,
4008,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
54,
2519,
27479,
284,
25,
46110,
82,
92,
4458,
18982,
7,
34345,
8,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
611,
30218,
70,
13,
51,
3861,
1268,
13,
33,
39758,
62,
31553,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
11169,
2010,
284,
2656,
1181,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2010,
13,
37266,
17816,
65,
3524,
62,
28764,
6,
7131,
15,
4083,
7890,
58,
22345,
796,
1796,
62,
15,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2010,
13,
37266,
17816,
65,
3524,
62,
28764,
6,
7131,
16,
4083,
7890,
58,
22345,
796,
1796,
62,
16,
201,
198,
220,
220,
220,
1303,
825,
371,
1868,
65,
62,
27257,
7,
944,
2599,
201,
198,
201,
198,
201,
198,
201,
198,
220,
220,
220,
825,
4512,
62,
19849,
7,
944,
11,
3509,
62,
270,
364,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
26245,
3047,
9052,
526,
15931,
201,
198,
220,
220,
220,
220,
220,
220,
220,
938,
62,
45380,
9442,
62,
2676,
796,
532,
16,
201,
198,
220,
220,
220,
220,
220,
220,
220,
19781,
796,
5045,
263,
3419,
201,
198,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
981,
2116,
13,
82,
14375,
13,
2676,
1279,
3509,
62,
270,
364,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
6889,
530,
26147,
35,
4296,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19781,
13,
13370,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
82,
14375,
13,
9662,
7,
16,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19781,
13,
40301,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
82,
14375,
13,
2676,
4064,
357,
940,
1635,
2116,
13,
82,
14375,
62,
17143,
13,
13812,
8,
6624,
657,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
12287,
25,
46110,
13,
18,
69,
92,
82,
1220,
11629,
4458,
18982,
7,
45016,
13,
23913,
62,
2435,
8,
201,
198,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
82,
14375,
13,
2676,
4064,
23336,
6624,
15,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
938,
62,
45380,
9442,
62,
2676,
796,
2116,
13,
82,
14375,
13,
2676,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
45380,
9442,
3419,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1090,
81,
62,
3882,
65,
28,
2116,
13,
1136,
62,
22019,
81,
62,
3882,
65,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2198,
62,
3882,
65,
7,
22019,
81,
62,
3882,
65,
11,
10352,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
82,
14375,
13,
3262,
13,
75,
6962,
58,
15,
4083,
2617,
62,
3882,
65,
7,
22019,
81,
62,
3882,
65,
8,
220,
220,
220,
220,
201,
198,
201,
198,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
611,
938,
62,
45380,
9442,
62,
2676,
14512,
2116,
13,
82,
14375,
13,
2676,
25,
1303,
938,
27479,
878,
33895,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
45380,
9442,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
201,
198,
197,
197,
197,
201,
198,
197,
197,
220,
201,
198,
201,
198,
201,
198,
4299,
651,
62,
34409,
62,
3882,
65,
7,
320,
9945,
2599,
220,
201,
198,
220,
220,
220,
37227,
35561,
257,
686,
312,
65,
357,
47371,
286,
12033,
6831,
8,
329,
779,
287,
3047,
526,
15931,
201,
198,
220,
220,
220,
611,
30218,
70,
13,
51,
3861,
1268,
13,
19108,
62,
3697,
31444,
1961,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
4677,
1571,
36774,
12,
2704,
3949,
3047,
6096,
986,
6,
201,
198,
220,
220,
220,
220,
220,
220,
220,
545,
9945,
13,
33295,
62,
2704,
3949,
62,
17566,
3419,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
28060,
6,
201,
198,
201,
198,
220,
220,
220,
3601,
705,
37534,
1723,
3047,
1366,
986,
6,
201,
198,
220,
220,
220,
374,
25404,
62,
3882,
65,
13,
46012,
533,
62,
3882,
65,
7,
320,
9945,
8,
201,
198,
220,
220,
220,
3601,
705,
28060,
6,
201,
198,
201,
198,
220,
220,
220,
1441,
545,
9945,
13,
3882,
65,
201,
198,
201,
198,
4299,
4512,
62,
3262,
7,
82,
14375,
62,
11235,
313,
742,
11,
686,
312,
65,
11,
3882,
65,
62,
86,
11,
22915,
62,
15908,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2181,
13363,
62,
19849,
28,
14202,
11,
3509,
62,
270,
364,
28,
22,
2388,
2599,
201,
198,
220,
220,
220,
37227,
44077,
257,
12549,
371,
12,
18474,
3127,
526,
15931,
201,
198,
220,
220,
220,
1509,
796,
4294,
332,
36918,
2848,
7,
82,
14375,
62,
11235,
313,
742,
11,
686,
312,
65,
11,
3882,
65,
62,
86,
11,
5072,
62,
15908,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2181,
13363,
62,
19849,
28,
5310,
13363,
62,
19849,
8,
201,
198,
201,
198,
220,
220,
220,
3601,
705,
50,
10890,
986,
6,
201,
198,
220,
220,
220,
1509,
13,
27432,
62,
19849,
7,
9806,
62,
270,
364,
8,
201,
198,
220,
220,
220,
3601,
705,
28060,
18120,
6,
201,
198
] | 1.938687 | 3,686 |
"""Program that monitors a Raspberry Pi attached to a minus 80 freezer.
Functions
---------
monitor(): Creates Board object to watch the state of an input pin.
"""
# Local application imports
from app.Board import Board
PIN = 11
def monitor():
"""Creates a Board object to monitor the state of an input pin."""
# Create a Board object
board = Board(PIN)
# Log Board IP and hostname
board.get_board_logger().info("IP: %s | Hostname: %s", \
str(board.get_ip()), str(board.get_hostname()))
# Setup board: Mode and input pin
board.setup()
# Monitor board for events
board.monitor()
if __name__ == "__main__":
monitor()
| [
37811,
15167,
326,
19374,
257,
24244,
13993,
7223,
284,
257,
20208,
4019,
30967,
13,
198,
198,
24629,
2733,
198,
45537,
198,
220,
220,
220,
5671,
33529,
7921,
274,
5926,
2134,
284,
2342,
262,
1181,
286,
281,
5128,
6757,
13,
198,
37811,
198,
198,
2,
10714,
3586,
17944,
198,
6738,
598,
13,
29828,
1330,
5926,
198,
198,
44032,
796,
1367,
198,
198,
4299,
5671,
33529,
198,
220,
220,
220,
37227,
16719,
274,
257,
5926,
2134,
284,
5671,
262,
1181,
286,
281,
5128,
6757,
526,
15931,
628,
220,
220,
220,
1303,
13610,
257,
5926,
2134,
198,
220,
220,
220,
3096,
796,
5926,
7,
44032,
8,
628,
220,
220,
220,
1303,
5972,
5926,
6101,
290,
2583,
3672,
198,
220,
220,
220,
3096,
13,
1136,
62,
3526,
62,
6404,
1362,
22446,
10951,
7203,
4061,
25,
4064,
82,
930,
14504,
3672,
25,
4064,
82,
1600,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
965,
7,
3526,
13,
1136,
62,
541,
3419,
828,
965,
7,
3526,
13,
1136,
62,
4774,
3672,
3419,
4008,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
31122,
3096,
25,
10363,
290,
5128,
6757,
198,
220,
220,
220,
3096,
13,
40406,
3419,
628,
220,
220,
220,
1303,
18289,
3096,
329,
2995,
198,
220,
220,
220,
3096,
13,
41143,
3419,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
5671,
3419,
198
] | 2.969432 | 229 |
import stop
stop.main()
| [
11748,
2245,
198,
198,
11338,
13,
12417,
3419,
628
] | 2.888889 | 9 |
from command import Command
| [
6738,
3141,
1330,
9455,
198
] | 5.6 | 5 |
# In Byteland they have a very strange monetary system.
#
# Each Bytelandian gold coin has an integer number written on it. A coin n can be exchanged in a bank into
# three coins: n/2, n/3 and n/4. But these numbers are all rounded down (the banks have to make a profit).
#
# You can also sell Bytelandian coins for American dollars. The exchange rate is 1:1. But you can not buy
# Bytelandian coins.
#
# You have one gold coin. What is the maximum amount of American dollars you can get for it?
#
# Input
# The input will contain several test cases (not more than 10). Each testcase is a single line with a number
# n, 0 <= n <= 1 000 000 000. It is the number written on your coin.
#
# Output
# For each test case output a single line, containing the maximum amount of American dollars you can make.
#
# Example
# Input:
# 12
# 2
#
# Output:
# 13
# 2
# You can change 12 into 6, 4 and 3, and then change these into $6+$4+$3 = $13. If you try changing the
# coin 2 into 3 smaller coins, you will get 1, 0 and 0, and later you can get no more than $1 out of them.
# It is better just to change the 2 coin directly into $2.
import sys
list={}
for case in sys.stdin:
n = int(case)
print(chk(n))
#Made by Sahil Saini | [
2,
554,
2750,
83,
8822,
484,
423,
257,
845,
6283,
15331,
1080,
13,
198,
2,
198,
2,
5501,
2750,
83,
8822,
666,
3869,
10752,
468,
281,
18253,
1271,
3194,
319,
340,
13,
317,
10752,
299,
460,
307,
22112,
287,
257,
3331,
656,
198,
2,
1115,
10796,
25,
299,
14,
17,
11,
299,
14,
18,
290,
299,
14,
19,
13,
887,
777,
3146,
389,
477,
19273,
866,
357,
1169,
6341,
423,
284,
787,
257,
7630,
737,
198,
2,
198,
2,
921,
460,
635,
3677,
2750,
83,
8822,
666,
10796,
329,
1605,
5054,
13,
383,
5163,
2494,
318,
352,
25,
16,
13,
887,
345,
460,
407,
2822,
198,
2,
2750,
83,
8822,
666,
10796,
13,
198,
2,
198,
2,
921,
423,
530,
3869,
10752,
13,
1867,
318,
262,
5415,
2033,
286,
1605,
5054,
345,
460,
651,
329,
340,
30,
198,
2,
198,
2,
23412,
198,
2,
383,
5128,
481,
3994,
1811,
1332,
2663,
357,
1662,
517,
621,
838,
737,
5501,
1332,
7442,
318,
257,
2060,
1627,
351,
257,
1271,
198,
2,
299,
11,
657,
19841,
299,
19841,
352,
12877,
12877,
12877,
13,
632,
318,
262,
1271,
3194,
319,
534,
10752,
13,
198,
2,
198,
2,
25235,
198,
2,
1114,
1123,
1332,
1339,
5072,
257,
2060,
1627,
11,
7268,
262,
5415,
2033,
286,
1605,
5054,
345,
460,
787,
13,
198,
2,
198,
2,
17934,
198,
2,
23412,
25,
198,
2,
1105,
198,
2,
362,
198,
2,
198,
2,
25235,
25,
198,
2,
1511,
198,
2,
362,
198,
2,
921,
460,
1487,
1105,
656,
718,
11,
604,
290,
513,
11,
290,
788,
1487,
777,
656,
720,
21,
10,
3,
19,
10,
3,
18,
796,
720,
1485,
13,
1002,
345,
1949,
5609,
262,
198,
2,
10752,
362,
656,
513,
4833,
10796,
11,
345,
481,
651,
352,
11,
657,
290,
657,
11,
290,
1568,
345,
460,
651,
645,
517,
621,
720,
16,
503,
286,
606,
13,
198,
2,
632,
318,
1365,
655,
284,
1487,
262,
362,
10752,
3264,
656,
720,
17,
13,
198,
198,
11748,
25064,
198,
198,
4868,
34758,
92,
198,
198,
1640,
1339,
287,
25064,
13,
19282,
259,
25,
198,
220,
220,
220,
299,
796,
493,
7,
7442,
8,
198,
220,
220,
220,
3601,
7,
354,
74,
7,
77,
4008,
198,
198,
2,
24616,
416,
22982,
346,
311,
391,
72
] | 3.257979 | 376 |
"""
QuestionsSet model
"""
from random import random
from django.db import models
from polymorphic.models import PolymorphicModel
class QuestionsSet(PolymorphicModel):
"""Abstract class, another way of regrouping question"""
name = models.CharField(max_length=100)
def get_branch_id(self):
"""get branch id, to manage diff between Branch and Questions Subset subclass"""
return self.id
def get_questions_shuffled(self):
"""return all questions from every subset, shuffled"""
questions = sorted(
self.get_real_instance().get_questions_set(), key=lambda x: random()
)
return questions
def get_user_trainings_ordered(self, request):
"""return all training linked to a givin user, ordered"""
user_trainings = self.get_real_instance().get_user_trainings(request)
if user_trainings is None:
return None
user_trainings = sorted(
user_trainings,
key=lambda training: training.training_date,
)
return user_trainings
| [
37811,
198,
35741,
7248,
2746,
198,
37811,
198,
198,
6738,
4738,
1330,
4738,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
34196,
291,
13,
27530,
1330,
12280,
24503,
291,
17633,
628,
198,
4871,
20396,
7248,
7,
34220,
24503,
291,
17633,
2599,
198,
220,
220,
220,
37227,
23839,
1398,
11,
1194,
835,
286,
842,
3233,
278,
1808,
37811,
628,
220,
220,
220,
1438,
796,
4981,
13,
12441,
15878,
7,
9806,
62,
13664,
28,
3064,
8,
628,
220,
220,
220,
825,
651,
62,
1671,
3702,
62,
312,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
1136,
8478,
4686,
11,
284,
6687,
814,
1022,
20551,
290,
20396,
3834,
2617,
47611,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
312,
628,
220,
220,
220,
825,
651,
62,
6138,
507,
62,
1477,
1648,
992,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
7783,
477,
2683,
422,
790,
24637,
11,
32299,
992,
37811,
628,
220,
220,
220,
220,
220,
220,
220,
2683,
796,
23243,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1136,
62,
5305,
62,
39098,
22446,
1136,
62,
6138,
507,
62,
2617,
22784,
1994,
28,
50033,
2124,
25,
4738,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2683,
628,
220,
220,
220,
825,
651,
62,
7220,
62,
27432,
654,
62,
24071,
7,
944,
11,
2581,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
7783,
477,
3047,
6692,
284,
257,
308,
452,
259,
2836,
11,
6149,
37811,
628,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
27432,
654,
796,
2116,
13,
1136,
62,
5305,
62,
39098,
22446,
1136,
62,
7220,
62,
27432,
654,
7,
25927,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2836,
62,
27432,
654,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
6045,
628,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
27432,
654,
796,
23243,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
27432,
654,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1994,
28,
50033,
3047,
25,
3047,
13,
34409,
62,
4475,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2836,
62,
27432,
654,
198
] | 2.671605 | 405 |
# python3 sort <http://github.com/Wind2esg/python3sort>
# Copyright 2018 Wind2esg
# Released under the MIT license <http://github.com/Wind2esg/python3sort/LICENSE>
from _comparer import int_comparer
| [
2,
21015,
18,
3297,
1279,
4023,
1378,
12567,
13,
785,
14,
8731,
17,
274,
70,
14,
29412,
18,
30619,
29,
198,
2,
15069,
2864,
3086,
17,
274,
70,
198,
2,
28728,
739,
262,
17168,
5964,
1279,
4023,
1378,
12567,
13,
785,
14,
8731,
17,
274,
70,
14,
29412,
18,
30619,
14,
43,
2149,
24290,
29,
198,
198,
6738,
4808,
5589,
11258,
1330,
493,
62,
5589,
11258,
628
] | 3 | 67 |
__author__ = "Michael Rippey @nahamike01"
__date__ = "2020/05/26"
"""
Author: Michael Rippey (c) 2020
Copyright 2020 Michael Rippey
See LICENSE.md for details
"""
import httpx
from bs4 import BeautifulSoup
import urllib
import sys
scrape_news_articles('https://cybersecurity-jp.com') | [
834,
9800,
834,
796,
366,
13256,
371,
3974,
2959,
2488,
40909,
321,
522,
486,
1,
198,
834,
4475,
834,
796,
366,
42334,
14,
2713,
14,
2075,
1,
198,
37811,
198,
13838,
25,
3899,
371,
3974,
2959,
357,
66,
8,
12131,
198,
198,
15269,
12131,
3899,
371,
3974,
2959,
198,
198,
6214,
38559,
24290,
13,
9132,
329,
3307,
198,
37811,
198,
198,
11748,
2638,
87,
220,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
2956,
297,
571,
198,
11748,
25064,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
628,
198,
1416,
13484,
62,
10827,
62,
26845,
10786,
5450,
1378,
948,
527,
12961,
12,
34523,
13,
785,
11537
] | 2.579832 | 119 |
#!/usr/bin/env python3
"""
A simple tool to send email by python
References
----------
[1] http://jingyan.baidu.com/article/b24f6c822784b886bfe5dabe.html
[2] email https://docs.python.org/3.4/library/email.mime.html
"""
import smtplib
from email.mime.text import MIMEText
import argparse
def send_mail(from_user, from_user_pw, to_user, mail_sub, mail_msg):
"""
Send email by python
Parameters
----------
from_user: str
Email address of the sender
from_user_pw: str
Password of the user
to_users: str list
Email address of the recievers
mail_sub: str
Mail subject
mail_msg: str
The message to be sent
Return
------
result: booling
If email is sent successfully, return True,
else, return False.
"""
# Basic parmaters
smtp_server_postfix = from_user.split("@")[-1]
smtp_server = "smtp." + smtp_server_postfix
smtp_port = 25
# Build message
msg = MIMEText(_text=mail_msg,_subtype='html',_charset='utf-8')
msg['Subject'] = mail_sub
msg['From'] = from_user
msg['To'] = ";".join(to_user) # Multiple recievers
# Try server
try:
server = smtplib.SMTP()
server.connect(smtp_server,port=smtp_port)
server.login(from_user.split("@")[0],from_user_pw)
server.sendmail(from_user,to_user,msg.as_string())
server.quit()
result = True
except Exception:
result = False
return result
def main():
"""
The main method
"""
# Init
parser = argparse.ArgumentParser(description='Send email by python.')
# parmaters
parser.add_argument("from_user", help="Email address of the sender.")
parser.add_argument("from_user_pw",help="Password of the sender.")
parser.add_argument("to_user", help="Email address list of the recievers.")
parser.add_argument("mail_sub", help="Subject of the mail.")
parser.add_argument("mail_msg", help="Content of the mail.")
args = parser.parse_args()
from_user = args.from_user
from_user_pw = args.from_user_pw
to_user = []
to_user.append(args.to_user)
mail_sub = args.mail_sub
mail_msg = args.mail_msg
# send email
print("Sending email from %s to %s..." % (from_user, to_user))
result = send_mail(from_user, from_user_pw, to_user, mail_sub, mail_msg)
if result == True:
print("Successfully sent the mail.")
else:
print("Error happend.")
if __name__=="__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
32,
2829,
2891,
284,
3758,
3053,
416,
21015,
198,
198,
19927,
198,
35937,
198,
58,
16,
60,
2638,
1378,
49940,
4121,
13,
65,
1698,
84,
13,
785,
14,
20205,
14,
65,
1731,
69,
21,
66,
23,
1828,
37688,
65,
44980,
65,
5036,
20,
67,
11231,
13,
6494,
198,
58,
17,
60,
3053,
3740,
1378,
31628,
13,
29412,
13,
2398,
14,
18,
13,
19,
14,
32016,
14,
12888,
13,
76,
524,
13,
6494,
198,
37811,
198,
198,
11748,
895,
83,
489,
571,
198,
6738,
3053,
13,
76,
524,
13,
5239,
1330,
337,
3955,
2767,
2302,
198,
11748,
1822,
29572,
198,
198,
4299,
3758,
62,
4529,
7,
6738,
62,
7220,
11,
422,
62,
7220,
62,
79,
86,
11,
284,
62,
7220,
11,
6920,
62,
7266,
11,
6920,
62,
19662,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
16290,
3053,
416,
21015,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
422,
62,
7220,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
9570,
2209,
286,
262,
29788,
198,
220,
220,
220,
422,
62,
7220,
62,
79,
86,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
30275,
286,
262,
2836,
198,
220,
220,
220,
284,
62,
18417,
25,
965,
1351,
198,
220,
220,
220,
220,
220,
220,
220,
9570,
2209,
286,
262,
664,
30296,
198,
220,
220,
220,
6920,
62,
7266,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
11099,
2426,
198,
220,
220,
220,
6920,
62,
19662,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
383,
3275,
284,
307,
1908,
628,
220,
220,
220,
8229,
198,
220,
220,
220,
40103,
198,
220,
220,
220,
1255,
25,
20512,
278,
198,
220,
220,
220,
220,
220,
220,
220,
1002,
3053,
318,
1908,
7675,
11,
1441,
6407,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
11,
1441,
10352,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
14392,
220,
1582,
6759,
364,
198,
220,
220,
220,
895,
34788,
62,
15388,
62,
7353,
13049,
796,
422,
62,
7220,
13,
35312,
7203,
31,
4943,
58,
12,
16,
60,
198,
220,
220,
220,
895,
34788,
62,
15388,
796,
366,
5796,
34788,
526,
1343,
895,
34788,
62,
15388,
62,
7353,
13049,
198,
220,
220,
220,
895,
34788,
62,
634,
796,
1679,
198,
220,
220,
220,
1303,
10934,
3275,
198,
220,
220,
220,
31456,
796,
337,
3955,
2767,
2302,
28264,
5239,
28,
4529,
62,
19662,
11,
62,
7266,
4906,
11639,
6494,
3256,
62,
354,
945,
316,
11639,
40477,
12,
23,
11537,
198,
220,
220,
220,
31456,
17816,
19776,
20520,
796,
6920,
62,
7266,
198,
220,
220,
220,
31456,
17816,
4863,
20520,
796,
422,
62,
7220,
198,
220,
220,
220,
31456,
17816,
2514,
20520,
796,
366,
26,
1911,
22179,
7,
1462,
62,
7220,
8,
220,
1303,
20401,
664,
30296,
198,
220,
220,
220,
1303,
9993,
4382,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
4382,
796,
895,
83,
489,
571,
13,
12310,
7250,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
4382,
13,
8443,
7,
5796,
34788,
62,
15388,
11,
634,
28,
5796,
34788,
62,
634,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4382,
13,
38235,
7,
6738,
62,
7220,
13,
35312,
7203,
31,
4943,
58,
15,
4357,
6738,
62,
7220,
62,
79,
86,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4382,
13,
21280,
4529,
7,
6738,
62,
7220,
11,
1462,
62,
7220,
11,
19662,
13,
292,
62,
8841,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
4382,
13,
47391,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
6407,
198,
220,
220,
220,
2845,
35528,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
10352,
628,
220,
220,
220,
1441,
1255,
198,
198,
4299,
1388,
33529,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
383,
1388,
2446,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
44707,
198,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
11639,
25206,
3053,
416,
21015,
2637,
8,
198,
220,
220,
220,
1303,
1582,
6759,
364,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
6738,
62,
7220,
1600,
1037,
2625,
15333,
2209,
286,
262,
29788,
19570,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
6738,
62,
7220,
62,
79,
86,
1600,
16794,
2625,
35215,
286,
262,
29788,
19570,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
1462,
62,
7220,
1600,
1037,
2625,
15333,
2209,
1351,
286,
262,
664,
30296,
19570,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
4529,
62,
7266,
1600,
1037,
2625,
19776,
286,
262,
6920,
19570,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
4529,
62,
19662,
1600,
1037,
2625,
19746,
286,
262,
6920,
19570,
198,
220,
220,
220,
26498,
796,
30751,
13,
29572,
62,
22046,
3419,
628,
220,
220,
220,
422,
62,
7220,
796,
26498,
13,
6738,
62,
7220,
198,
220,
220,
220,
422,
62,
7220,
62,
79,
86,
796,
26498,
13,
6738,
62,
7220,
62,
79,
86,
198,
220,
220,
220,
284,
62,
7220,
796,
17635,
198,
220,
220,
220,
284,
62,
7220,
13,
33295,
7,
22046,
13,
1462,
62,
7220,
8,
198,
220,
220,
220,
6920,
62,
7266,
796,
26498,
13,
4529,
62,
7266,
198,
220,
220,
220,
6920,
62,
19662,
796,
26498,
13,
4529,
62,
19662,
628,
220,
220,
220,
1303,
3758,
3053,
198,
220,
220,
220,
3601,
7203,
50,
1571,
3053,
422,
4064,
82,
284,
4064,
82,
9313,
4064,
357,
6738,
62,
7220,
11,
284,
62,
7220,
4008,
198,
220,
220,
220,
1255,
796,
3758,
62,
4529,
7,
6738,
62,
7220,
11,
422,
62,
7220,
62,
79,
86,
11,
284,
62,
7220,
11,
6920,
62,
7266,
11,
6920,
62,
19662,
8,
198,
220,
220,
220,
611,
1255,
6624,
6407,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
33244,
2759,
1908,
262,
6920,
19570,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
12331,
1147,
437,
19570,
198,
198,
361,
11593,
3672,
834,
855,
1,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.43314 | 1,032 |
"""
Functions that help the run 'pps' command
"""
import functools
import subprocess
import inquirer
import toml
from .message import (
FILE_NOT_FOUND_MSG,
INQUIRER_MSG,
KEYBOARD_INTERRUPT_MSG,
KEYWORD_NOT_FOUND_MSG,
)
def exception(function):
"""
A decorator that wraps the passed in function and logs
exceptions should one occur
"""
@functools.wraps(function)
return wrapper
def read_file(file_path):
"""
Read file
:param file_path: File path
:return: File content
"""
reader = open(file_path, 'r', encoding="utf8")
file_content = reader.read()
reader.close()
return file_content
def toml_parsing(toml_string):
"""
Parses the "toml" string and return dictionary format
:param toml_string: String that is a "toml" file format.
:return: Return dictionary format
"""
parsed_toml = toml.loads(toml_string)
return parsed_toml
def inquirer_prompt(choice):
"""
Return selected results from choices.
:param choice: choices
:return: Return selected result
"""
questions = [inquirer.List('cmd', message=INQUIRER_MSG, choices=choice)]
answer = inquirer.prompt(questions)
return answer
def run_script(script):
"""
Run the script.
:param script: Script to run.
:return: The result of the script execution.
"""
p_ret_code = subprocess.call(script, shell=True)
return p_ret_code
| [
37811,
198,
24629,
2733,
326,
1037,
262,
1057,
705,
41799,
6,
3141,
198,
37811,
198,
11748,
1257,
310,
10141,
198,
11748,
850,
14681,
198,
198,
11748,
38212,
81,
198,
11748,
284,
4029,
198,
198,
6738,
764,
20500,
1330,
357,
198,
220,
220,
220,
45811,
62,
11929,
62,
37,
15919,
62,
5653,
38,
11,
198,
220,
220,
220,
3268,
10917,
4663,
1137,
62,
5653,
38,
11,
198,
220,
220,
220,
35374,
8202,
9795,
62,
41358,
49,
8577,
51,
62,
5653,
38,
11,
198,
220,
220,
220,
35374,
54,
12532,
62,
11929,
62,
37,
15919,
62,
5653,
38,
11,
198,
8,
628,
198,
4299,
6631,
7,
8818,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
317,
11705,
1352,
326,
27521,
262,
3804,
287,
2163,
290,
17259,
198,
220,
220,
220,
13269,
815,
530,
3051,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
2488,
12543,
310,
10141,
13,
29988,
862,
7,
8818,
8,
628,
220,
220,
220,
1441,
29908,
628,
198,
4299,
1100,
62,
7753,
7,
7753,
62,
6978,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
4149,
2393,
198,
220,
220,
220,
1058,
17143,
2393,
62,
6978,
25,
9220,
3108,
198,
220,
220,
220,
1058,
7783,
25,
9220,
2695,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
9173,
796,
1280,
7,
7753,
62,
6978,
11,
705,
81,
3256,
21004,
2625,
40477,
23,
4943,
198,
220,
220,
220,
2393,
62,
11299,
796,
9173,
13,
961,
3419,
198,
220,
220,
220,
9173,
13,
19836,
3419,
628,
220,
220,
220,
1441,
2393,
62,
11299,
628,
198,
4299,
284,
4029,
62,
79,
945,
278,
7,
39532,
75,
62,
8841,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
23042,
274,
262,
366,
39532,
75,
1,
4731,
290,
1441,
22155,
5794,
198,
220,
220,
220,
1058,
17143,
284,
4029,
62,
8841,
25,
10903,
326,
318,
257,
366,
39532,
75,
1,
2393,
5794,
13,
198,
220,
220,
220,
1058,
7783,
25,
8229,
22155,
5794,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
44267,
62,
39532,
75,
796,
284,
4029,
13,
46030,
7,
39532,
75,
62,
8841,
8,
628,
220,
220,
220,
1441,
44267,
62,
39532,
75,
628,
198,
4299,
38212,
81,
62,
16963,
457,
7,
25541,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8229,
6163,
2482,
422,
7747,
13,
198,
220,
220,
220,
1058,
17143,
3572,
25,
7747,
198,
220,
220,
220,
1058,
7783,
25,
8229,
6163,
1255,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2683,
796,
685,
18934,
557,
81,
13,
8053,
10786,
28758,
3256,
3275,
28,
1268,
10917,
4663,
1137,
62,
5653,
38,
11,
7747,
28,
25541,
15437,
198,
220,
220,
220,
3280,
796,
38212,
81,
13,
16963,
457,
7,
6138,
507,
8,
198,
220,
220,
220,
1441,
3280,
628,
198,
4299,
1057,
62,
12048,
7,
12048,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5660,
262,
4226,
13,
198,
220,
220,
220,
1058,
17143,
4226,
25,
12327,
284,
1057,
13,
198,
220,
220,
220,
1058,
7783,
25,
383,
1255,
286,
262,
4226,
9706,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
279,
62,
1186,
62,
8189,
796,
850,
14681,
13,
13345,
7,
12048,
11,
7582,
28,
17821,
8,
628,
220,
220,
220,
1441,
279,
62,
1186,
62,
8189,
198
] | 2.674677 | 541 |
import ipaddress
import logging
import tld
from collections import UserList
from typing import Iterable, List, Union
from urlfinderlib.url import URL
from urllib.parse import urlsplit
from saq.constants import *
| [
11748,
20966,
21975,
198,
11748,
18931,
198,
11748,
256,
335,
198,
198,
6738,
17268,
1330,
11787,
8053,
198,
6738,
19720,
1330,
40806,
540,
11,
7343,
11,
4479,
198,
6738,
2956,
1652,
5540,
8019,
13,
6371,
1330,
10289,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
2956,
7278,
489,
270,
198,
198,
6738,
473,
80,
13,
9979,
1187,
1330,
1635,
628,
198
] | 3.540984 | 61 |
#
# Copyright 2015-2020 Andrey Galkin <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import print_function, absolute_import
import unittest
import subprocess
import os
import sys
import stat
import shutil
import json
import platform
from collections import OrderedDict
from futoin.cid.util import executil
CIDTEST_BIN = os.environ.get('CIDTEST_BIN', None)
if CIDTEST_BIN:
CIDTEST_BIN_EXT = False
else :
CIDTEST_BIN_EXT = True
CIDTEST_BIN = os.path.dirname( __file__ ) + '/../bin/cid'
| [
2,
198,
2,
15069,
1853,
12,
42334,
843,
4364,
402,
971,
259,
1279,
392,
4364,
31,
69,
9390,
259,
13,
2398,
29,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
220,
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,
220,
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,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
4112,
62,
11748,
198,
11748,
555,
715,
395,
198,
11748,
850,
14681,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
1185,
198,
11748,
4423,
346,
198,
11748,
33918,
198,
11748,
3859,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
277,
9390,
259,
13,
66,
312,
13,
22602,
1330,
3121,
346,
198,
198,
34,
2389,
51,
6465,
62,
33,
1268,
796,
28686,
13,
268,
2268,
13,
1136,
10786,
34,
2389,
51,
6465,
62,
33,
1268,
3256,
6045,
8,
198,
198,
361,
327,
2389,
51,
6465,
62,
33,
1268,
25,
198,
220,
220,
220,
327,
2389,
51,
6465,
62,
33,
1268,
62,
13918,
796,
10352,
198,
17772,
1058,
198,
220,
220,
220,
327,
2389,
51,
6465,
62,
33,
1268,
62,
13918,
796,
6407,
198,
220,
220,
220,
327,
2389,
51,
6465,
62,
33,
1268,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
11593,
7753,
834,
1267,
1343,
31051,
40720,
8800,
14,
66,
312,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198
] | 3.052478 | 343 |
# $Filename$
# $Authors$
# Last Changed: $Date$ $Committer$ $Revision-Id$
#
# Copyright (c) 2003-2011, German Aerospace Center (DLR)
# All rights reserved.
#
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are
#met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
#
# * Neither the name of the German Aerospace Center nor the names of
# its contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
#A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
#OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
#DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
#THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
Tests for the icon module.
"""
import unittest
from datafinder.core.configuration.icons import icon
from datafinder.core.error import ConfigurationError
from datafinder.persistence.error import PersistenceError
from datafinder_test.mocks import SimpleMock
__version__ = "$Revision-Id:$"
class IconTestCase(unittest.TestCase):
""" Tests the parsing of a specific directory for suitable icon files. """
def setUp(self):
""" Creates test setup. """
self._directoryFileStorer = SimpleMock(identifier="/test")
def testParsingSuccess(self):
""" Tests the successful parsing of a directory for icon files. """
self._directoryFileStorer.value = [SimpleMock(name="a16.png"), SimpleMock(name="a24.png"),
SimpleMock(name="b16.png"), SimpleMock(name="b24.png")]
self.assertEquals(len(icon.parseIconDirectory(self._directoryFileStorer)), 2)
self._directoryFileStorer.value = [SimpleMock(name="a6.png"), SimpleMock(name="a24.png"),
SimpleMock(name="b16.png"), SimpleMock(name="b24.png")]
self.assertEquals(len(icon.parseIconDirectory(self._directoryFileStorer)), 1)
self._directoryFileStorer.value = [SimpleMock(name="a6.png"), SimpleMock(name="a24.png"),
SimpleMock(name="b16.png"), SimpleMock(name="b24.ng")]
self.assertEquals(len(icon.parseIconDirectory(self._directoryFileStorer)), 1)
self._directoryFileStorer.value = [SimpleMock(name="a6.png"), SimpleMock(name="a24.png"),
SimpleMock(name="b6.png"), SimpleMock(name="b24.ng")]
self.assertEquals(len(icon.parseIconDirectory(self._directoryFileStorer)), 0)
def testErrorHandling(self):
""" Tests the error handling when parsing a directory for icon files. """
self._directoryFileStorer.value = [SimpleMock(name=""), SimpleMock(name="a24.png")]
self.assertEquals(len(icon.parseIconDirectory(self._directoryFileStorer)), 0)
self._directoryFileStorer.error = PersistenceError("")
self.assertRaises(ConfigurationError, icon.parseIconDirectory, self._directoryFileStorer)
def testIconComparison(self):
""" Tests the comparison of icons. """
anIcon = icon.Icon("a", "b", "c", "d")
self.assertEquals(anIcon, anIcon)
anotherIcon = icon.Icon("a", "b", "c", "d")
self.assertEquals(anIcon, anotherIcon)
anotherIcon.baseName = "d"
self.assertNotEquals(anIcon, anotherIcon)
self.assertNotEquals(anIcon, None)
| [
2,
720,
35063,
3,
220,
201,
198,
2,
720,
30515,
669,
3,
201,
198,
2,
4586,
32068,
25,
720,
10430,
3,
720,
6935,
1967,
3,
720,
18009,
1166,
12,
7390,
3,
201,
198,
2,
201,
198,
2,
15069,
357,
66,
8,
5816,
12,
9804,
11,
2679,
43226,
3337,
357,
19260,
49,
8,
201,
198,
2,
1439,
2489,
10395,
13,
201,
198,
2,
201,
198,
2,
201,
198,
2,
7738,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
1231,
201,
198,
2,
4666,
2649,
11,
389,
10431,
2810,
326,
262,
1708,
3403,
389,
201,
198,
2,
4164,
25,
201,
198,
2,
201,
198,
2,
1635,
2297,
396,
2455,
507,
286,
2723,
2438,
1276,
12377,
262,
2029,
6634,
220,
201,
198,
2,
220,
220,
4003,
11,
428,
1351,
286,
3403,
290,
262,
1708,
37592,
13,
220,
201,
198,
2,
201,
198,
2,
1635,
2297,
396,
2455,
507,
287,
13934,
1296,
1276,
22919,
262,
2029,
6634,
220,
201,
198,
2,
220,
220,
4003,
11,
428,
1351,
286,
3403,
290,
262,
1708,
37592,
287,
262,
220,
201,
198,
2,
220,
220,
10314,
290,
14,
273,
584,
5696,
2810,
351,
262,
220,
201,
198,
2,
220,
220,
6082,
13,
220,
201,
198,
2,
201,
198,
2,
1635,
16126,
262,
1438,
286,
262,
2679,
43226,
3337,
4249,
262,
3891,
286,
201,
198,
2,
220,
220,
663,
20420,
743,
307,
973,
284,
11438,
393,
7719,
3186,
10944,
201,
198,
2,
220,
220,
422,
428,
3788,
1231,
2176,
3161,
3194,
7170,
13,
201,
198,
2,
201,
198,
2,
43559,
47466,
3180,
36592,
2389,
1961,
11050,
3336,
27975,
38162,
9947,
367,
15173,
4877,
5357,
27342,
9865,
3843,
20673,
220,
201,
198,
2,
366,
1921,
3180,
1,
5357,
15529,
7788,
32761,
6375,
8959,
49094,
34764,
11015,
11,
47783,
2751,
11,
21728,
5626,
220,
201,
198,
2,
43,
3955,
22061,
5390,
11,
3336,
8959,
49094,
34764,
11015,
3963,
34482,
3398,
1565,
5603,
25382,
5357,
376,
46144,
7473,
220,
201,
198,
2,
32,
16652,
2149,
37232,
33079,
48933,
15986,
13954,
48778,
1961,
13,
3268,
8005,
49261,
50163,
3336,
27975,
38162,
9947,
220,
201,
198,
2,
14165,
1137,
6375,
27342,
9865,
3843,
20673,
9348,
43031,
19146,
7473,
15529,
42242,
11,
3268,
17931,
23988,
11,
19387,
25256,
1847,
11,
220,
201,
198,
2,
48451,
12576,
11,
7788,
3620,
6489,
13153,
11,
6375,
7102,
5188,
10917,
3525,
12576,
29506,
25552,
357,
1268,
39149,
2751,
11,
21728,
5626,
220,
201,
198,
2,
43,
3955,
22061,
5390,
11,
41755,
11335,
10979,
3963,
28932,
2257,
2043,
37780,
21090,
50,
6375,
49254,
26,
406,
18420,
3963,
23210,
11,
220,
201,
198,
2,
26947,
11,
6375,
4810,
19238,
29722,
26,
6375,
43949,
44180,
23255,
49,
8577,
24131,
8,
29630,
36,
5959,
7257,
2937,
1961,
5357,
6177,
15529,
220,
201,
198,
2,
10970,
15513,
3963,
43031,
25382,
11,
7655,
2767,
16879,
3268,
27342,
10659,
11,
19269,
18379,
43031,
25382,
11,
6375,
309,
9863,
220,
201,
198,
2,
7,
1268,
39149,
2751,
399,
7156,
43,
3528,
18310,
6375,
25401,
54,
24352,
8,
5923,
1797,
2751,
3268,
15529,
34882,
16289,
3963,
3336,
23210,
220,
201,
198,
2,
19238,
12680,
47466,
11,
45886,
16876,
5984,
29817,
1961,
3963,
3336,
28069,
11584,
25382,
3963,
13558,
3398,
29506,
11879,
13,
220,
220,
201,
198,
201,
198,
201,
198,
37811,
220,
201,
198,
51,
3558,
329,
262,
7196,
8265,
13,
201,
198,
37811,
201,
198,
201,
198,
201,
198,
11748,
555,
715,
395,
201,
198,
201,
198,
6738,
1366,
22805,
13,
7295,
13,
11250,
3924,
13,
34280,
1330,
7196,
201,
198,
6738,
1366,
22805,
13,
7295,
13,
18224,
1330,
28373,
12331,
201,
198,
6738,
1366,
22805,
13,
19276,
13274,
13,
18224,
1330,
9467,
13274,
12331,
201,
198,
6738,
1366,
22805,
62,
9288,
13,
76,
3320,
1330,
17427,
44,
735,
201,
198,
201,
198,
201,
198,
834,
9641,
834,
796,
17971,
18009,
1166,
12,
7390,
25,
3,
1,
220,
201,
198,
201,
198,
201,
198,
4871,
26544,
14402,
20448,
7,
403,
715,
395,
13,
14402,
20448,
2599,
201,
198,
220,
220,
220,
37227,
30307,
262,
32096,
286,
257,
2176,
8619,
329,
11080,
7196,
3696,
13,
37227,
201,
198,
220,
220,
220,
220,
201,
198,
220,
220,
220,
825,
900,
4933,
7,
944,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
7921,
274,
1332,
9058,
13,
37227,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
34945,
8979,
1273,
11934,
796,
17427,
44,
735,
7,
738,
7483,
35922,
9288,
4943,
201,
198,
220,
220,
220,
220,
201,
198,
220,
220,
220,
825,
1332,
47,
945,
278,
33244,
7,
944,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
220,
30307,
262,
4388,
32096,
286,
257,
8619,
329,
7196,
3696,
13,
37227,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
34945,
8979,
1273,
11934,
13,
8367,
796,
685,
26437,
44,
735,
7,
3672,
2625,
64,
1433,
13,
11134,
12340,
17427,
44,
735,
7,
3672,
2625,
64,
1731,
13,
11134,
12340,
201,
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,
17427,
44,
735,
7,
3672,
2625,
65,
1433,
13,
11134,
12340,
17427,
44,
735,
7,
3672,
2625,
65,
1731,
13,
11134,
4943,
60,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
23588,
874,
7,
11925,
7,
4749,
13,
29572,
19578,
43055,
7,
944,
13557,
34945,
8979,
1273,
11934,
36911,
362,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
34945,
8979,
1273,
11934,
13,
8367,
796,
685,
26437,
44,
735,
7,
3672,
2625,
64,
21,
13,
11134,
12340,
17427,
44,
735,
7,
3672,
2625,
64,
1731,
13,
11134,
12340,
201,
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,
17427,
44,
735,
7,
3672,
2625,
65,
1433,
13,
11134,
12340,
17427,
44,
735,
7,
3672,
2625,
65,
1731,
13,
11134,
4943,
60,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
23588,
874,
7,
11925,
7,
4749,
13,
29572,
19578,
43055,
7,
944,
13557,
34945,
8979,
1273,
11934,
36911,
352,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
34945,
8979,
1273,
11934,
13,
8367,
796,
685,
26437,
44,
735,
7,
3672,
2625,
64,
21,
13,
11134,
12340,
17427,
44,
735,
7,
3672,
2625,
64,
1731,
13,
11134,
12340,
201,
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,
17427,
44,
735,
7,
3672,
2625,
65,
1433,
13,
11134,
12340,
17427,
44,
735,
7,
3672,
2625,
65,
1731,
13,
782,
4943,
60,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
23588,
874,
7,
11925,
7,
4749,
13,
29572,
19578,
43055,
7,
944,
13557,
34945,
8979,
1273,
11934,
36911,
352,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
34945,
8979,
1273,
11934,
13,
8367,
796,
685,
26437,
44,
735,
7,
3672,
2625,
64,
21,
13,
11134,
12340,
17427,
44,
735,
7,
3672,
2625,
64,
1731,
13,
11134,
12340,
201,
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,
17427,
44,
735,
7,
3672,
2625,
65,
21,
13,
11134,
12340,
17427,
44,
735,
7,
3672,
2625,
65,
1731,
13,
782,
4943,
60,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
23588,
874,
7,
11925,
7,
4749,
13,
29572,
19578,
43055,
7,
944,
13557,
34945,
8979,
1273,
11934,
36911,
657,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
825,
1332,
12331,
12885,
1359,
7,
944,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
30307,
262,
4049,
9041,
618,
32096,
257,
8619,
329,
7196,
3696,
13,
37227,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
34945,
8979,
1273,
11934,
13,
8367,
796,
685,
26437,
44,
735,
7,
3672,
2625,
12340,
17427,
44,
735,
7,
3672,
2625,
64,
1731,
13,
11134,
4943,
60,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
23588,
874,
7,
11925,
7,
4749,
13,
29572,
19578,
43055,
7,
944,
13557,
34945,
8979,
1273,
11934,
36911,
657,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
34945,
8979,
1273,
11934,
13,
18224,
796,
9467,
13274,
12331,
7203,
4943,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
21762,
2696,
7,
38149,
12331,
11,
7196,
13,
29572,
19578,
43055,
11,
2116,
13557,
34945,
8979,
1273,
11934,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
825,
1332,
19578,
50249,
1653,
7,
944,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
30307,
262,
7208,
286,
17149,
13,
37227,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
281,
19578,
796,
7196,
13,
19578,
7203,
64,
1600,
366,
65,
1600,
366,
66,
1600,
366,
67,
4943,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
23588,
874,
7,
272,
19578,
11,
281,
19578,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1194,
19578,
796,
7196,
13,
19578,
7203,
64,
1600,
366,
65,
1600,
366,
66,
1600,
366,
67,
4943,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
23588,
874,
7,
272,
19578,
11,
1194,
19578,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1194,
19578,
13,
8692,
5376,
796,
366,
67,
1,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
3673,
23588,
874,
7,
272,
19578,
11,
1194,
19578,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
3673,
23588,
874,
7,
272,
19578,
11,
6045,
8,
201,
198,
220,
220,
220,
220
] | 2.493392 | 1,816 |
from namsa import SupercellBuilder, MSAMPI
from namsa.utils import imageTile
import numpy as np
from time import time
import sys
import h5py
from mpi4py import MPI
import os
comm = MPI.COMM_WORLD
comm_size = comm.Get_size()
comm_rank = comm.Get_rank()
#job_pid = os.environ.get('LS_JOBPID')
#job_id = os.environ.get('LSB_JOBID')
#hosts = np.array(os.environ.get('LSB_HOSTS').split(' '))
#job_hosts = np.unique(hosts)
if comm_rank == 0:
try:
job_pid = os.environ.get('LS_JOBPID')
job_id = os.environ.get('LSB_JOBID')
hosts = np.array(os.environ.get('LSB_HOSTS').split(' '))
job_hosts = np.unique(hosts)
print('JOB_ID:%s, JOB_PID:%s, HOSTS:%s' %(job_id, job_pid, format(job_hosts)))
except:
print('NO JOB VARIABLES!!!')
cif_path = os.environ.get('CIF')
h5_path = os.environ.get('H5F')
if __name__ == '__main__':
gpu_rank = int(np.mod(comm_rank,6))
if len(sys.argv) == 2:
step = float(sys.argv[-1])
if len(sys.argv) == 3:
step = float(sys.argv[-2])
write = bool(int(sys.argv[-1]))
if write:
with h5py.File(h5_path, driver='mpio', mode='w', comm=MPI.COMM_WORLD, libver='latest') as f:
f.atomic = False
run(h5_file=f, step=step, gpu_rank=gpu_rank)
else:
run(step=step, gpu_rank=gpu_rank)
else:
run(step=2.5, gpu_rank=gpu_rank)
| [
6738,
299,
4105,
64,
1330,
3115,
3846,
32875,
11,
6579,
2390,
11901,
198,
6738,
299,
4105,
64,
13,
26791,
1330,
2939,
35103,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
640,
1330,
640,
198,
11748,
25064,
198,
11748,
289,
20,
9078,
198,
6738,
285,
14415,
19,
9078,
1330,
4904,
40,
198,
11748,
28686,
198,
198,
9503,
796,
4904,
40,
13,
9858,
44,
62,
45359,
11163,
198,
9503,
62,
7857,
796,
725,
13,
3855,
62,
7857,
3419,
198,
9503,
62,
43027,
796,
725,
13,
3855,
62,
43027,
3419,
198,
198,
2,
21858,
62,
35317,
796,
28686,
13,
268,
2268,
13,
1136,
10786,
6561,
62,
41,
9864,
47,
2389,
11537,
198,
2,
21858,
62,
312,
796,
28686,
13,
268,
2268,
13,
1136,
10786,
6561,
33,
62,
41,
9864,
2389,
11537,
198,
2,
4774,
82,
796,
45941,
13,
18747,
7,
418,
13,
268,
2268,
13,
1136,
10786,
6561,
33,
62,
39,
10892,
50,
27691,
35312,
10786,
705,
4008,
198,
2,
21858,
62,
4774,
82,
796,
45941,
13,
34642,
7,
4774,
82,
8,
628,
198,
361,
725,
62,
43027,
6624,
657,
25,
198,
220,
220,
220,
1949,
25,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1693,
62,
35317,
796,
28686,
13,
268,
2268,
13,
1136,
10786,
6561,
62,
41,
9864,
47,
2389,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
1693,
62,
312,
796,
28686,
13,
268,
2268,
13,
1136,
10786,
6561,
33,
62,
41,
9864,
2389,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
11453,
796,
45941,
13,
18747,
7,
418,
13,
268,
2268,
13,
1136,
10786,
6561,
33,
62,
39,
10892,
50,
27691,
35312,
10786,
705,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1693,
62,
4774,
82,
796,
45941,
13,
34642,
7,
4774,
82,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
41,
9864,
62,
2389,
25,
4,
82,
11,
449,
9864,
62,
47,
2389,
25,
4,
82,
11,
367,
10892,
50,
25,
4,
82,
6,
4064,
7,
21858,
62,
312,
11,
1693,
62,
35317,
11,
5794,
7,
21858,
62,
4774,
82,
22305,
198,
220,
220,
220,
2845,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
15285,
449,
9864,
569,
1503,
3539,
9148,
1546,
10185,
11537,
198,
198,
66,
361,
62,
6978,
796,
28686,
13,
268,
2268,
13,
1136,
10786,
34,
5064,
11537,
198,
71,
20,
62,
6978,
796,
28686,
13,
268,
2268,
13,
1136,
10786,
39,
20,
37,
11537,
198,
220,
220,
220,
220,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
308,
19944,
62,
43027,
796,
493,
7,
37659,
13,
4666,
7,
9503,
62,
43027,
11,
21,
4008,
198,
220,
220,
220,
611,
18896,
7,
17597,
13,
853,
85,
8,
6624,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2239,
796,
12178,
7,
17597,
13,
853,
85,
58,
12,
16,
12962,
198,
220,
220,
220,
611,
18896,
7,
17597,
13,
853,
85,
8,
6624,
513,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2239,
796,
12178,
7,
17597,
13,
853,
85,
58,
12,
17,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
3551,
796,
20512,
7,
600,
7,
17597,
13,
853,
85,
58,
12,
16,
60,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
3551,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
351,
289,
20,
9078,
13,
8979,
7,
71,
20,
62,
6978,
11,
4639,
11639,
3149,
952,
3256,
4235,
11639,
86,
3256,
725,
28,
7378,
40,
13,
9858,
44,
62,
45359,
11163,
11,
9195,
332,
11639,
42861,
11537,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
13,
47116,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1057,
7,
71,
20,
62,
7753,
28,
69,
11,
2239,
28,
9662,
11,
308,
19944,
62,
43027,
28,
46999,
62,
43027,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1057,
7,
9662,
28,
9662,
11,
308,
19944,
62,
43027,
28,
46999,
62,
43027,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1057,
7,
9662,
28,
17,
13,
20,
11,
308,
19944,
62,
43027,
28,
46999,
62,
43027,
8,
628
] | 1.955617 | 721 |
import MySQLdb
| [
11748,
33476,
9945,
628
] | 4 | 4 |
import os
from flask import Flask, render_template, url_for
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
# Views
@app.route('/')
if __name__ == "__main__":
app.run(debug=True)
| [
11748,
28686,
198,
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
19016,
62,
1640,
198,
198,
3106,
343,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
198,
2,
29978,
198,
31,
1324,
13,
38629,
10786,
14,
11537,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
598,
13,
5143,
7,
24442,
28,
17821,
8,
198
] | 2.488372 | 86 |
# -*- coding: utf-8 -*-
# Copyright 2012 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import sys
from splinter.driver.webdriver.firefox import WebDriver as FirefoxWebDriver
from splinter.driver.webdriver.remote import WebDriver as RemoteWebDriver
from splinter.driver.webdriver.chrome import WebDriver as ChromeWebDriver
from splinter.driver.webdriver.phantomjs import WebDriver as PhantomJSWebDriver
from splinter.exceptions import DriverNotFoundError
_DRIVERS = {
'firefox': FirefoxWebDriver,
'remote': RemoteWebDriver,
'chrome': ChromeWebDriver,
'phantomjs': PhantomJSWebDriver,
}
if sys.version_info[0] <= 2:
try:
from splinter.driver.zopetestbrowser import ZopeTestBrowser
_DRIVERS['zope.testbrowser'] = ZopeTestBrowser
except ImportError:
pass
try:
import django # noqa
from splinter.driver.djangoclient import DjangoClient
_DRIVERS['django'] = DjangoClient
except ImportError:
pass
try:
import flask # noqa
from splinter.driver.flaskclient import FlaskClient
_DRIVERS['flask'] = FlaskClient
except ImportError:
pass
def Browser(driver_name='firefox', *args, **kwargs):
"""
Returns a driver instance for the given name.
When working with ``firefox``, it's possible to provide a profile name
and a list of extensions.
If you don't provide any driver_name, then ``firefox`` will be used.
If there is no driver registered with the provided ``driver_name``, this
function will raise a :class:`splinter.exceptions.DriverNotFoundError`
exception.
"""
try:
driver = _DRIVERS[driver_name]
except KeyError:
raise DriverNotFoundError("No driver for %s" % driver_name)
return driver(*args, **kwargs)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
15069,
2321,
4328,
3849,
7035,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
198,
2,
5964,
326,
460,
307,
1043,
287,
262,
38559,
24290,
2393,
13,
198,
198,
11748,
25064,
198,
198,
6738,
4328,
3849,
13,
26230,
13,
12384,
26230,
13,
6495,
12792,
1330,
5313,
32103,
355,
16802,
13908,
32103,
198,
6738,
4328,
3849,
13,
26230,
13,
12384,
26230,
13,
47960,
1330,
5313,
32103,
355,
21520,
13908,
32103,
198,
6738,
4328,
3849,
13,
26230,
13,
12384,
26230,
13,
46659,
1330,
5313,
32103,
355,
13282,
13908,
32103,
198,
6738,
4328,
3849,
13,
26230,
13,
12384,
26230,
13,
746,
11456,
8457,
1330,
5313,
32103,
355,
14407,
20120,
13908,
32103,
198,
6738,
4328,
3849,
13,
1069,
11755,
1330,
12434,
3673,
21077,
12331,
628,
198,
62,
7707,
30194,
796,
1391,
198,
220,
220,
220,
705,
6495,
12792,
10354,
16802,
13908,
32103,
11,
198,
220,
220,
220,
705,
47960,
10354,
21520,
13908,
32103,
11,
198,
220,
220,
220,
705,
46659,
10354,
13282,
13908,
32103,
11,
198,
220,
220,
220,
705,
746,
11456,
8457,
10354,
14407,
20120,
13908,
32103,
11,
198,
92,
198,
198,
361,
25064,
13,
9641,
62,
10951,
58,
15,
60,
19841,
362,
25,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
422,
4328,
3849,
13,
26230,
13,
89,
404,
316,
395,
40259,
1330,
1168,
3008,
14402,
46532,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
7707,
30194,
17816,
89,
3008,
13,
9288,
40259,
20520,
796,
1168,
3008,
14402,
46532,
198,
220,
220,
220,
2845,
17267,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
198,
28311,
25,
198,
220,
220,
220,
1330,
42625,
14208,
220,
1303,
645,
20402,
198,
220,
220,
220,
422,
4328,
3849,
13,
26230,
13,
28241,
648,
38679,
1153,
1330,
37770,
11792,
198,
220,
220,
220,
4808,
7707,
30194,
17816,
28241,
14208,
20520,
796,
37770,
11792,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
1208,
198,
198,
28311,
25,
198,
220,
220,
220,
1330,
42903,
220,
1303,
645,
20402,
198,
220,
220,
220,
422,
4328,
3849,
13,
26230,
13,
2704,
2093,
16366,
1330,
46947,
11792,
198,
220,
220,
220,
4808,
7707,
30194,
17816,
2704,
2093,
20520,
796,
46947,
11792,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
1208,
628,
198,
4299,
34270,
7,
26230,
62,
3672,
11639,
6495,
12792,
3256,
1635,
22046,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
16409,
257,
4639,
4554,
329,
262,
1813,
1438,
13,
628,
220,
220,
220,
1649,
1762,
351,
7559,
6495,
12792,
15506,
11,
340,
338,
1744,
284,
2148,
257,
7034,
1438,
198,
220,
220,
220,
290,
257,
1351,
286,
18366,
13,
628,
220,
220,
220,
1002,
345,
836,
470,
2148,
597,
4639,
62,
3672,
11,
788,
7559,
6495,
12792,
15506,
481,
307,
973,
13,
628,
220,
220,
220,
1002,
612,
318,
645,
4639,
6823,
351,
262,
2810,
7559,
26230,
62,
3672,
15506,
11,
428,
198,
220,
220,
220,
2163,
481,
5298,
257,
1058,
4871,
25,
63,
22018,
3849,
13,
1069,
11755,
13,
32103,
3673,
21077,
12331,
63,
198,
220,
220,
220,
6631,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
4639,
796,
4808,
7707,
30194,
58,
26230,
62,
3672,
60,
198,
220,
220,
220,
2845,
7383,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
12434,
3673,
21077,
12331,
7203,
2949,
4639,
329,
4064,
82,
1,
4064,
4639,
62,
3672,
8,
198,
220,
220,
220,
1441,
4639,
46491,
22046,
11,
12429,
46265,
22046,
8,
198
] | 3.019576 | 613 |
#!/usr/bin/env python
# make_file_layout
# init_paths
#
# align_dataset
# write_dataset
# write_selap_dataset
# write_model
# check_model
#
# make_model
# predict_subgroups
#
# summarize_predictions
# summarize_heatmap
# summarize_subgroups
# A SELAP model file contains:
# mu.txt SELAPver3 nvar x nclust
# sig.txt SELAPver3 nvar**2 x nclust
# prob.txt SELAPver3 1 x nclust
# var.txt this code Name for the variables (pathways), one per line.
# clust.txt this code Name for the clusters, one per line.
import os, sys
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
787,
62,
7753,
62,
39786,
198,
2,
2315,
62,
6978,
82,
198,
2,
198,
2,
10548,
62,
19608,
292,
316,
198,
2,
3551,
62,
19608,
292,
316,
198,
2,
3551,
62,
741,
499,
62,
19608,
292,
316,
198,
2,
3551,
62,
19849,
198,
2,
2198,
62,
19849,
198,
2,
220,
198,
2,
787,
62,
19849,
198,
2,
4331,
62,
7266,
24432,
198,
2,
220,
198,
2,
35743,
62,
28764,
9278,
198,
2,
35743,
62,
25080,
8899,
198,
2,
35743,
62,
7266,
24432,
628,
198,
2,
317,
311,
3698,
2969,
2746,
2393,
4909,
25,
198,
2,
38779,
13,
14116,
220,
220,
220,
220,
220,
311,
3698,
2969,
332,
18,
220,
220,
299,
7785,
2124,
299,
565,
436,
198,
2,
43237,
13,
14116,
220,
220,
220,
220,
311,
3698,
2969,
332,
18,
220,
220,
299,
7785,
1174,
17,
2124,
299,
565,
436,
198,
2,
1861,
13,
14116,
220,
220,
220,
311,
3698,
2969,
332,
18,
220,
220,
352,
2124,
299,
565,
436,
198,
2,
1401,
13,
14116,
220,
220,
220,
220,
428,
2438,
220,
220,
6530,
329,
262,
9633,
357,
6978,
1322,
828,
530,
583,
1627,
13,
198,
2,
32966,
13,
14116,
220,
220,
428,
2438,
220,
220,
6530,
329,
262,
23163,
11,
530,
583,
1627,
13,
198,
198,
11748,
28686,
11,
25064,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.452282 | 241 |
# coding:utf-8
# --author-- lanhua.zhou
from __future__ import print_function
import os
import json
import datetime
import logging
import zfused_api
# read database
DATABASE_PATH = os.path.dirname(os.path.dirname(__file__))
STEP_DATABASE_FILE = "{}/database/step.json".format(DATABASE_PATH)
PROJECT_STEP_DATABASE_FILE = "{}/database/conn_project_step.json".format(DATABASE_PATH)
STEP_INPUTATTR_DATABASE_FILE = "{}/database/step_attr_input.json".format(DATABASE_PATH)
STEP_OUTPUTATTR_DATABASE_FILE = "{}/database/step_attr_output.json".format(DATABASE_PATH)
with open(STEP_DATABASE_FILE, 'r') as f:
print("read")
STEP_DATABASE = json.load(f)
with open(PROJECT_STEP_DATABASE_FILE, 'r') as f:
print("read")
PROJECT_STEP_DATABASE = json.load(f)
with open(STEP_INPUTATTR_DATABASE_FILE, 'r') as f:
print("read")
STEP_INPUTATTR_DATABASE = json.load(f)
with open(STEP_OUTPUTATTR_DATABASE_FILE, 'r') as f:
print("read")
STEP_OUTPUTATTR_DATABASE = json.load(f)
logger = logging.getLogger(__name__)
def project_steps(project_ids = []):
""" get project steps
"""
if not project_ids:
return PROJECT_STEP_DATABASE
_steps = []
for _project_step in PROJECT_STEP_DATABASE:
if _project_step["ProjectId"] in project_ids:
_steps.append(_project_step)
return _steps
| [
2,
19617,
25,
40477,
12,
23,
198,
2,
1377,
9800,
438,
26992,
33061,
13,
38536,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
4818,
8079,
198,
11748,
18931,
198,
198,
11748,
1976,
69,
1484,
62,
15042,
198,
198,
2,
1100,
6831,
198,
35,
1404,
6242,
11159,
62,
34219,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
42135,
62,
35,
1404,
6242,
11159,
62,
25664,
796,
45144,
92,
14,
48806,
14,
9662,
13,
17752,
1911,
18982,
7,
35,
1404,
6242,
11159,
62,
34219,
8,
198,
31190,
23680,
62,
42135,
62,
35,
1404,
6242,
11159,
62,
25664,
796,
45144,
92,
14,
48806,
14,
37043,
62,
16302,
62,
9662,
13,
17752,
1911,
18982,
7,
35,
1404,
6242,
11159,
62,
34219,
8,
198,
42135,
62,
1268,
30076,
1404,
5446,
62,
35,
1404,
6242,
11159,
62,
25664,
796,
45144,
92,
14,
48806,
14,
9662,
62,
35226,
62,
15414,
13,
17752,
1911,
18982,
7,
35,
1404,
6242,
11159,
62,
34219,
8,
198,
42135,
62,
2606,
7250,
3843,
1404,
5446,
62,
35,
1404,
6242,
11159,
62,
25664,
796,
45144,
92,
14,
48806,
14,
9662,
62,
35226,
62,
22915,
13,
17752,
1911,
18982,
7,
35,
1404,
6242,
11159,
62,
34219,
8,
198,
4480,
1280,
7,
42135,
62,
35,
1404,
6242,
11159,
62,
25664,
11,
705,
81,
11537,
355,
277,
25,
198,
220,
220,
220,
3601,
7203,
961,
4943,
198,
220,
220,
220,
49154,
62,
35,
1404,
6242,
11159,
796,
33918,
13,
2220,
7,
69,
8,
198,
4480,
1280,
7,
31190,
23680,
62,
42135,
62,
35,
1404,
6242,
11159,
62,
25664,
11,
705,
81,
11537,
355,
277,
25,
198,
220,
220,
220,
3601,
7203,
961,
4943,
198,
220,
220,
220,
21965,
23680,
62,
42135,
62,
35,
1404,
6242,
11159,
796,
33918,
13,
2220,
7,
69,
8,
198,
4480,
1280,
7,
42135,
62,
1268,
30076,
1404,
5446,
62,
35,
1404,
6242,
11159,
62,
25664,
11,
705,
81,
11537,
355,
277,
25,
198,
220,
220,
220,
3601,
7203,
961,
4943,
198,
220,
220,
220,
49154,
62,
1268,
30076,
1404,
5446,
62,
35,
1404,
6242,
11159,
796,
33918,
13,
2220,
7,
69,
8,
198,
4480,
1280,
7,
42135,
62,
2606,
7250,
3843,
1404,
5446,
62,
35,
1404,
6242,
11159,
62,
25664,
11,
705,
81,
11537,
355,
277,
25,
198,
220,
220,
220,
3601,
7203,
961,
4943,
198,
220,
220,
220,
49154,
62,
2606,
7250,
3843,
1404,
5446,
62,
35,
1404,
6242,
11159,
796,
33918,
13,
2220,
7,
69,
8,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
198,
4299,
1628,
62,
20214,
7,
16302,
62,
2340,
796,
17635,
2599,
198,
220,
220,
220,
37227,
651,
1628,
4831,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
407,
1628,
62,
2340,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
21965,
23680,
62,
42135,
62,
35,
1404,
6242,
11159,
198,
220,
220,
220,
4808,
20214,
796,
17635,
198,
220,
220,
220,
329,
4808,
16302,
62,
9662,
287,
21965,
23680,
62,
42135,
62,
35,
1404,
6242,
11159,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4808,
16302,
62,
9662,
14692,
16775,
7390,
8973,
287,
1628,
62,
2340,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
20214,
13,
33295,
28264,
16302,
62,
9662,
8,
198,
220,
220,
220,
1441,
4808,
20214,
198
] | 2.356261 | 567 |
# import
import random
import time
# main
main()
| [
2,
1330,
201,
198,
11748,
4738,
201,
198,
11748,
640,
201,
198,
201,
198,
2,
1388,
201,
198,
201,
198,
12417,
3419,
201,
198,
197
] | 2.36 | 25 |
N = int(input())
for i in range(N):
serial = list(map(int, input().split()))
get_proportion(serial)
| [
45,
796,
493,
7,
15414,
28955,
198,
198,
1640,
1312,
287,
2837,
7,
45,
2599,
198,
220,
220,
220,
11389,
796,
1351,
7,
8899,
7,
600,
11,
5128,
22446,
35312,
3419,
4008,
198,
220,
220,
220,
651,
62,
1676,
16864,
7,
46911,
8,
198
] | 2.477273 | 44 |
# Copyright 2020 The Kraken Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import logging
import xml.etree.ElementTree as ET
from . import utils
from . import tool
log = logging.getLogger(__name__)
if __name__ == '__main__':
tool.main()
| [
2,
15069,
12131,
383,
43392,
46665,
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,
11748,
28686,
198,
11748,
18931,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
198,
198,
6738,
764,
1330,
3384,
4487,
198,
6738,
764,
1330,
2891,
198,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
2891,
13,
12417,
3419,
198
] | 3.574766 | 214 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.