content
stringlengths 1
1.04M
| input_ids
sequencelengths 1
774k
| ratio_char_token
float64 0.38
22.9
| token_count
int64 1
774k
|
---|---|---|---|
"""Utils for wheel."""
from contextlib import suppress
from pathlib import Path
import re
import shutil
from .utils import run_command, build_arch
RE_WHEEL_PLATFORM = re.compile(r"^(?P<name>.*-)cp\d{2}m?-linux_\w+\.whl$")
ARCH_PLAT = {
"amd64": "linux_x86_64",
"i386": "linux_i686",
"aarch64": "linux_aarch64",
"armhf": "linux_armv7l",
"armv7": "linux_armv7l",
}
def fix_wheels_name(wheels_folder: Path) -> None:
"""Remove platform tag from filename."""
for package in wheels_folder.glob("*.whl"):
match = RE_WHEEL_PLATFORM.match(package.name)
if not match:
continue
package.rename(Path(package.parent, f"{match.group('name')}none-any.whl"))
def copy_wheels_from_cache(cache_folder: Path, wheels_folder: Path) -> None:
"""Preserve wheels from cache on timeout error."""
for wheel_file in cache_folder.glob("**/*.whl"):
with suppress(OSError):
shutil.copy(wheel_file, wheels_folder)
def run_auditwheel(wheels_folder: Path) -> None:
"""Run auditwheel to include shared library."""
platform = ARCH_PLAT[build_arch()]
for wheel_file in wheels_folder.glob("*.whl"):
if not RE_WHEEL_PLATFORM.match(wheel_file.name):
continue
run_command(
f"auditwheel repair --plat {platform} --no-update-tags -w {wheels_folder} {wheel_file}"
)
| [
37811,
18274,
4487,
329,
7825,
526,
15931,
201,
198,
6738,
4732,
8019,
1330,
18175,
201,
198,
6738,
3108,
8019,
1330,
10644,
201,
198,
11748,
302,
201,
198,
11748,
4423,
346,
201,
198,
201,
198,
6738,
764,
26791,
1330,
1057,
62,
21812,
11,
1382,
62,
998,
201,
198,
201,
198,
2200,
62,
12418,
36,
3698,
62,
6489,
1404,
21389,
796,
302,
13,
5589,
576,
7,
81,
1,
61,
7,
30,
47,
27,
3672,
29,
15885,
25106,
13155,
59,
67,
90,
17,
92,
76,
30,
12,
23289,
62,
59,
86,
10,
17405,
1929,
75,
3,
4943,
201,
198,
201,
198,
201,
198,
31315,
62,
6489,
1404,
796,
1391,
201,
198,
220,
220,
220,
366,
28745,
2414,
1298,
366,
23289,
62,
87,
4521,
62,
2414,
1600,
201,
198,
220,
220,
220,
366,
72,
21734,
1298,
366,
23289,
62,
72,
33808,
1600,
201,
198,
220,
220,
220,
366,
64,
998,
2414,
1298,
366,
23289,
62,
64,
998,
2414,
1600,
201,
198,
220,
220,
220,
366,
1670,
71,
69,
1298,
366,
23289,
62,
1670,
85,
22,
75,
1600,
201,
198,
220,
220,
220,
366,
1670,
85,
22,
1298,
366,
23289,
62,
1670,
85,
22,
75,
1600,
201,
198,
92,
201,
198,
201,
198,
201,
198,
4299,
4259,
62,
12491,
1424,
62,
3672,
7,
12491,
1424,
62,
43551,
25,
10644,
8,
4613,
6045,
25,
201,
198,
220,
220,
220,
37227,
27914,
3859,
7621,
422,
29472,
526,
15931,
201,
198,
220,
220,
220,
329,
5301,
287,
13666,
62,
43551,
13,
4743,
672,
7203,
24620,
1929,
75,
1,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2872,
796,
4526,
62,
12418,
36,
3698,
62,
6489,
1404,
21389,
13,
15699,
7,
26495,
13,
3672,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
2872,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2555,
201,
198,
220,
220,
220,
220,
220,
220,
220,
5301,
13,
918,
480,
7,
15235,
7,
26495,
13,
8000,
11,
277,
1,
90,
15699,
13,
8094,
10786,
3672,
11537,
92,
23108,
12,
1092,
13,
1929,
75,
48774,
201,
198,
201,
198,
201,
198,
4299,
4866,
62,
12491,
1424,
62,
6738,
62,
23870,
7,
23870,
62,
43551,
25,
10644,
11,
13666,
62,
43551,
25,
10644,
8,
4613,
6045,
25,
201,
198,
220,
220,
220,
37227,
25460,
3760,
13666,
422,
12940,
319,
26827,
4049,
526,
15931,
201,
198,
220,
220,
220,
329,
7825,
62,
7753,
287,
12940,
62,
43551,
13,
4743,
672,
7203,
1174,
15211,
13,
1929,
75,
1,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
351,
18175,
7,
2640,
12331,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7,
22001,
62,
7753,
11,
13666,
62,
43551,
8,
201,
198,
201,
198,
201,
198,
4299,
1057,
62,
3885,
270,
22001,
7,
12491,
1424,
62,
43551,
25,
10644,
8,
4613,
6045,
25,
201,
198,
220,
220,
220,
37227,
10987,
14984,
22001,
284,
2291,
4888,
5888,
526,
15931,
201,
198,
220,
220,
220,
3859,
796,
5923,
3398,
62,
6489,
1404,
58,
11249,
62,
998,
3419,
60,
201,
198,
201,
198,
220,
220,
220,
329,
7825,
62,
7753,
287,
13666,
62,
43551,
13,
4743,
672,
7203,
24620,
1929,
75,
1,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
4526,
62,
12418,
36,
3698,
62,
6489,
1404,
21389,
13,
15699,
7,
22001,
62,
7753,
13,
3672,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2555,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1057,
62,
21812,
7,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
3885,
270,
22001,
9185,
1377,
489,
265,
1391,
24254,
92,
1377,
3919,
12,
19119,
12,
31499,
532,
86,
1391,
12491,
1424,
62,
43551,
92,
1391,
22001,
62,
7753,
36786,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
201,
198
] | 2.21517 | 646 |
"""
PACKNET - c0mplh4cks
INTERFACE
"""
# === Importing Dependencies === #
import socket
from time import time
from .standards import encode, decode
from . import ADDR, MAC
# === Interface === #
| [
37811,
628,
47035,
12884,
220,
532,
220,
269,
15,
76,
489,
71,
19,
4657,
628,
23255,
49836,
628,
198,
37811,
628,
628,
198,
198,
2,
24844,
17267,
278,
37947,
3976,
24844,
1303,
198,
11748,
17802,
198,
6738,
640,
1330,
640,
198,
6738,
764,
1481,
1371,
1330,
37773,
11,
36899,
198,
6738,
764,
1330,
5984,
7707,
11,
20582,
628,
628,
628,
198,
198,
2,
24844,
26491,
24844,
1303,
628,
628
] | 3.144928 | 69 |
import argparse
from smp_manifold_learning.differentiable_models.utils import create_dir_if_not_exist
parser = argparse.ArgumentParser(allow_abbrev=False)
parser.add_argument("-d", "--dir_path", default='../plot/ecmnn/', type=str)
if __name__ == '__main__':
args = parser.parse_args()
dir_path = args.dir_path
create_dir_if_not_exist(dir_path) | [
11748,
1822,
29572,
198,
6738,
895,
79,
62,
805,
361,
727,
62,
40684,
13,
39799,
3379,
62,
27530,
13,
26791,
1330,
2251,
62,
15908,
62,
361,
62,
1662,
62,
38476,
628,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
12154,
62,
397,
4679,
85,
28,
25101,
8,
198,
48610,
13,
2860,
62,
49140,
7203,
12,
67,
1600,
366,
438,
15908,
62,
6978,
1600,
4277,
11639,
40720,
29487,
14,
721,
10295,
77,
14,
3256,
2099,
28,
2536,
8,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
26498,
796,
30751,
13,
29572,
62,
22046,
3419,
198,
220,
220,
220,
26672,
62,
6978,
796,
26498,
13,
15908,
62,
6978,
198,
220,
220,
220,
2251,
62,
15908,
62,
361,
62,
1662,
62,
38476,
7,
15908,
62,
6978,
8
] | 2.679104 | 134 |
# Generated by Django 3.0.3 on 2020-08-13 18:04
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
18,
319,
12131,
12,
2919,
12,
1485,
1248,
25,
3023,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
#
# Copyright (c) 2017 Electronic Arts Inc. All Rights Reserved
#
import uuid
# https://stackoverflow.com/questions/1181919/python-base-36-encoding/1181924
def base36encode(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'):
"""Converts an integer to a base36 string."""
if not isinstance(number, (int, long)):
raise TypeError('number must be an integer')
base36 = ''
sign = ''
if number < 0:
sign = '-'
number = -number
if 0 <= number < len(alphabet):
return sign + alphabet[number]
while number != 0:
number, i = divmod(number, len(alphabet))
base36 = alphabet[i] + base36
return sign + base36
| [
2,
198,
2,
15069,
357,
66,
8,
2177,
19508,
11536,
3457,
13,
1439,
6923,
33876,
220,
198,
2,
628,
198,
11748,
334,
27112,
198,
198,
2,
3740,
1378,
25558,
2502,
11125,
13,
785,
14,
6138,
507,
14,
16817,
1129,
1129,
14,
29412,
12,
8692,
12,
2623,
12,
12685,
7656,
14,
16817,
1129,
1731,
198,
4299,
2779,
2623,
268,
8189,
7,
17618,
11,
24830,
11639,
486,
1954,
2231,
3134,
4531,
24694,
32988,
17511,
23852,
42,
31288,
45,
3185,
48,
49,
2257,
52,
30133,
34278,
57,
6,
2599,
198,
220,
220,
220,
37227,
3103,
24040,
281,
18253,
284,
257,
2779,
2623,
4731,
526,
15931,
198,
220,
220,
220,
611,
407,
318,
39098,
7,
17618,
11,
357,
600,
11,
890,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
10786,
17618,
1276,
307,
281,
18253,
11537,
628,
220,
220,
220,
2779,
2623,
796,
10148,
198,
220,
220,
220,
1051,
796,
10148,
628,
220,
220,
220,
611,
1271,
1279,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1051,
796,
705,
19355,
198,
220,
220,
220,
220,
220,
220,
220,
1271,
796,
532,
17618,
628,
220,
220,
220,
611,
657,
19841,
1271,
1279,
18896,
7,
17307,
8380,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
1051,
1343,
24830,
58,
17618,
60,
628,
220,
220,
220,
981,
1271,
14512,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1271,
11,
1312,
796,
2659,
4666,
7,
17618,
11,
18896,
7,
17307,
8380,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2779,
2623,
796,
24830,
58,
72,
60,
1343,
2779,
2623,
628,
220,
220,
220,
1441,
1051,
1343,
2779,
2623,
198
] | 2.531136 | 273 |
from __future__ import annotations
from dataclasses import dataclass, Field
from datetime import datetime, timedelta
from typing import Union, Optional, Tuple, List
from parse import parse
from med import Med, MedRegistry, DOSAGE_PARSE_FORMAT
DEFAULT_LOG_FILE = 'logs/med.log'
DEFAULT_DATE_TIME_FORMAT = r'%m/%d/%Y %H:%M'
@dataclass
| [
6738,
11593,
37443,
834,
1330,
37647,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
7663,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
6738,
19720,
1330,
4479,
11,
32233,
11,
309,
29291,
11,
7343,
198,
198,
6738,
21136,
1330,
21136,
198,
198,
6738,
1117,
1330,
2019,
11,
2019,
8081,
4592,
11,
43036,
11879,
62,
27082,
5188,
62,
21389,
1404,
198,
198,
7206,
38865,
62,
25294,
62,
25664,
796,
705,
6404,
82,
14,
1150,
13,
6404,
6,
198,
7206,
38865,
62,
35,
6158,
62,
34694,
62,
21389,
1404,
796,
374,
6,
4,
76,
14,
4,
67,
14,
4,
56,
4064,
39,
25,
4,
44,
6,
628,
198,
31,
19608,
330,
31172,
628,
628
] | 2.91453 | 117 |
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 26 17:15:36 2018
@author: Raj
"""
import pycroscopy as px
from pycroscopy.processing.fft import FrequencyFilter
import pyUSID as usid
import numpy as np
from scipy import signal as sps
from ffta.load import get_utils
from ffta import pixel
from matplotlib import pyplot as plt
import warnings
'''
For filtering data using the pycroscopy filter command
To set up a filter, you can choose any of the following:
Harmonic Filter: pick a frequency and bandpass filters that + 2w + 3e etc
Bandpass Filter: pick a specific frequency and pass that
Lowpass Filter: pick a frequency and pass all below that
Noise Filter: pick frequencies to selectively remove (like electrical noise, etc)
# a harmonic filter center of 2000 points long at 100kHz and 2*100 kHz, with a 5000 Hz wide window, at 1 MHz sampling
>>> hbf = px.processing.fft.HarmonicPassFilter(2000, 10e6, 100e3, 5000, 2)
>>> ffta.hdf_utils.filtering.test_filter(h5_main, hbf) #will display the result before applying to the whole dataset
>>> ffta.hdf_utils.filtering.fft_filter(h5_main, hbf)
'''
def test_filter(hdf_file, freq_filts, parameters={}, pixelnum=[0, 0], noise_tolerance=5e-7,
show_plots=True, check_filter=True):
"""
Applies FFT Filter to the file at a specific line and displays the result
Parameters
----------
hdf_file : h5Py file or Nx1 NumPy array (preferred is NumPy array)
hdf_file to work on, e.g. hdf.file['/FF-raw'] if that's a Dataset
if ndarray, uses passed or default parameters
Use ndarray.flatten() to ensure correct dimensions
freq_filts : list of FrequencyFilter class objects
Contains the filters to apply to the test signal
parameters : dict, optional
Contains parameters in FF-raw file for constructing filters. Automatic if a Dataset/File
Must contain num_pts and samp_rate to be functional
pixelnum : int, optional
For extracting a specific pixel to do FFT Filtering on
show_plots : bool, optional
Turns on FFT plots from Pycroscopy
noise_tolerance : float 0 to 1
Amount of noise below which signal is set to 0
Returns
-------
filt_line : numpy.ndarray
Filtered signal of hdf_file
freq_filts : list
The filter parameters to be passed to SignalFilter
fig_filt, axes_filt: matplotlib controls
Only functional if show_plots is on
"""
reshape = False
ftype = str(type(hdf_file))
if ('h5py' in ftype) or ('Dataset' in ftype): # hdf file
parameters = get_utils.get_params(hdf_file)
hdf_file = get_utils.get_pixel(hdf_file, [pixelnum[0], pixelnum[1]], array_form=True, transpose=False)
hdf_file = hdf_file.flatten()
if len(hdf_file.shape) == 2:
reshape = True
hdf_file = hdf_file.flatten()
sh = hdf_file.shape
# Test filter on a single line:
filt_line, fig_filt, axes_filt = px.processing.gmode_utils.test_filter(hdf_file,
frequency_filters=freq_filts,
noise_threshold=noise_tolerance,
show_plots=show_plots)
# If need to reshape
if reshape:
filt_line = np.reshape(filt_line, sh)
# Test filter out in Pixel
if check_filter:
plt.figure()
plt.plot(hdf_file, 'b')
plt.plot(filt_line, 'k')
h5_px_filt = pixel.Pixel(filt_line, parameters)
h5_px_filt.clear_filter_flags()
h5_px_filt.analyze()
h5_px_filt.plot(newplot=True)
h5_px_raw = pixel.Pixel(hdf_file, parameters)
h5_px_raw.analyze()
h5_px_raw.plot(newplot=True)
# h5_px_raw_unfilt = pixel.Pixel(hdf_file, parameters)
# h5_px_raw_unfilt.clear_filter_flags()
# h5_px_raw_unfilt.analyze()
# h5_px_raw_unfilt.plot(newplot=False,c1='y', c2='c')
return filt_line, freq_filts, fig_filt, axes_filt
def fft_filter(h5_main, freq_filts, noise_tolerance=5e-7, make_new=False, verbose=False):
"""
Stub for applying filter above to the entire FF image set
Parameters
----------
h5_main : h5py.Dataset object
Dataset to work on, e.g. h5_main = px.hdf_utils.getDataSet(hdf.file, 'FF_raw')[0]
freq_filts : list
List of frequency filters usually generated in test_line above
noise_tolerance : float, optional
Level below which data are set to 0. Higher values = more noise (more tolerant)
make_new : bool, optional
Allows for re-filtering the data by creating a new folder
Returns
-------
h5_filt : Dataset
Filtered dataset within latest -FFT_Filtering Group
"""
h5_filt_grp = usid.hdf_utils.check_for_old(h5_main, 'FFT_Filtering')
if make_new == True or not any(h5_filt_grp):
sig_filt = px.processing.SignalFilter(h5_main, frequency_filters=freq_filts,
noise_threshold=noise_tolerance,
write_filtered=True, write_condensed=False,
num_pix=1, verbose=verbose, cores=2, max_mem_mb=512)
h5_filt_grp = sig_filt.compute()
else:
print('Taking previously computed results')
h5_filt = h5_filt_grp[0]['Filtered_Data']
h5_filt = h5_filt_grp['Filtered_Data']
usid.hdf_utils.copy_attributes(h5_main.parent, h5_filt)
usid.hdf_utils.copy_attributes(h5_main.parent, h5_filt.parent)
return h5_filt
def lowpass(hdf_file, parameters={}, pixelnum=[0, 0], f_cutoff=None):
'''
Interfaces to px.pycroscopy.fft.LowPassFilter
:param hdf_file:
:param parameters:
:param pixelnum:
See test_filter below
:param f_cutoff: int
frequency to cut off. Defaults to 2*drive frequency rounded to nearest 100 kHz
'''
hdf_file, num_pts, drive, samp_rate = _get_pixel_for_filtering(hdf_file, parameters, pixelnum)
if not f_cutoff:
lpf_cutoff = np.round(drive / 1e5, decimals=0) * 2 * 1e5 # 2times the drive frequency, round up
lpf = px.processing.fft.LowPassFilter(num_pts, samp_rate, lpf_cutoff)
return lpf
def bandpass(hdf_file, parameters={}, pixelnum=[0, 0], f_center=None, f_width=10e3, harmonic=None, fir=False):
'''
Interfaces to pycroscopy.processing.fft.BandPassFilter
Note that this is effectively a Harmonic Filter of number_harmonics 1, but with finite impulse response option
:param hdf_file:
:param parameters:
:param pixelnum:
See test_filter below
:param f_center: int
center frequency for the specific band to pass
:param f_width: int
width of frequency to pass
:param harmonic: int
if specified, sets the band to this specific multiple of the drive frequency
:param fir: bool
uses an Finite Impulse Response filter instead of a normal boxcar
'''
hdf_file, num_pts, drive, samp_rate = _get_pixel_for_filtering(hdf_file, parameters, pixelnum)
# default is the 2*w signal (second harmonic for KPFM)
if not f_center:
if not harmonic:
f_center = drive * 2
else:
f_center = int(drive * harmonic)
bpf = px.processing.fft.BandPassFilter(num_pts, samp_rate, f_center, f_width, fir=fir)
return bpf
def harmonic(hdf_file, parameters={}, pixelnum=[0, 0], first_harm=1, bandwidth=None, num_harmonics=5):
'''
Interfaces with px.processing.fft.HarmonicFilter
Parameters
----------
hdf_file, parameters, pixelnum : see comments in test_filter below
first_harm : int
The first harmonic based on the drive frequency to use
For G-KPFM this should be explicitly set to 2
bandwidth : int
bandwidth for filtering. For computational purposes this is hard-set to 2500 (2.5 kHz)
num_harmonics : int
The number of harmonics to use (omega, 2*omega, 3*omega, etc)
'''
hdf_file, num_pts, drive, samp_rate = _get_pixel_for_filtering(hdf_file, parameters, pixelnum)
if not bandwidth:
bandwidth = 2500
elif bandwidth > 2500:
warnings.warn('Bandwidth of that level might cause errors')
bandwidth = 2500
first_harm = drive * first_harm
hbf = px.processing.fft.HarmonicPassFilter(num_pts, samp_rate, first_harm, bandwidth, num_harmonics)
return hbf
def noise_filter(hdf_file, parameters={}, pixelnum=[0, 0],
centers=[10E3, 50E3, 100E3, 150E3, 200E3],
widths=[20E3, 1E3, 1E3, 1E3, 1E3]):
'''
Interfaces with pycroscopy.processing.fft.NoiseBandFilter
:param hdf_file:
:param parameters:
:param pixelnum:
See test_filter
:param centers: list
List of Frequencies to filter out
:param widths:
List of frequency widths for each filter. e,g. in default case (10 kHz center, 20 kHz width) is from 0 to 20 kHz
'''
hdf_file, num_pts, drive, samp_rate = _get_pixel_for_filtering(hdf_file, parameters, pixelnum)
nf = px.processing.fft.NoiseBandFilter(num_pts, samp_rate, centers, widths)
return nf
# placeholder until accepted in pull request
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
3158,
2608,
1596,
25,
1314,
25,
2623,
2864,
198,
198,
31,
9800,
25,
13308,
198,
37811,
198,
198,
11748,
12972,
19915,
1416,
11081,
355,
279,
87,
198,
6738,
12972,
19915,
1416,
11081,
13,
36948,
13,
487,
83,
1330,
31902,
22417,
198,
11748,
12972,
2937,
2389,
355,
514,
312,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
1330,
6737,
355,
599,
82,
198,
198,
6738,
277,
701,
64,
13,
2220,
1330,
651,
62,
26791,
198,
198,
6738,
277,
701,
64,
1330,
17465,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
198,
11748,
14601,
198,
198,
7061,
6,
198,
1890,
25431,
1366,
1262,
262,
12972,
19915,
1416,
11081,
8106,
3141,
198,
198,
2514,
900,
510,
257,
8106,
11,
345,
460,
3853,
597,
286,
262,
1708,
25,
198,
197,
39,
1670,
9229,
25853,
25,
2298,
257,
8373,
290,
4097,
6603,
16628,
326,
1343,
362,
86,
1343,
513,
68,
3503,
198,
197,
31407,
6603,
25853,
25,
2298,
257,
2176,
8373,
290,
1208,
326,
198,
197,
20535,
6603,
25853,
25,
2298,
257,
8373,
290,
1208,
477,
2174,
326,
198,
197,
2949,
786,
25853,
25,
2298,
19998,
284,
39119,
4781,
357,
2339,
12278,
7838,
11,
3503,
8,
198,
198,
2,
257,
49239,
8106,
3641,
286,
4751,
2173,
890,
379,
1802,
44191,
290,
362,
9,
3064,
37597,
11,
351,
257,
23336,
26109,
3094,
4324,
11,
379,
352,
19805,
19232,
198,
33409,
289,
19881,
796,
279,
87,
13,
36948,
13,
487,
83,
13,
39,
1670,
9229,
14478,
22417,
7,
11024,
11,
838,
68,
21,
11,
1802,
68,
18,
11,
23336,
11,
362,
8,
198,
33409,
277,
701,
64,
13,
71,
7568,
62,
26791,
13,
10379,
20212,
13,
9288,
62,
24455,
7,
71,
20,
62,
12417,
11,
289,
19881,
8,
1303,
10594,
3359,
262,
1255,
878,
11524,
284,
262,
2187,
27039,
198,
33409,
277,
701,
64,
13,
71,
7568,
62,
26791,
13,
10379,
20212,
13,
487,
83,
62,
24455,
7,
71,
20,
62,
12417,
11,
289,
19881,
8,
628,
198,
7061,
6,
628,
198,
4299,
1332,
62,
24455,
7,
71,
7568,
62,
7753,
11,
2030,
80,
62,
10379,
912,
11,
10007,
34758,
5512,
17465,
22510,
41888,
15,
11,
657,
4357,
7838,
62,
83,
37668,
28,
20,
68,
12,
22,
11,
198,
197,
197,
197,
197,
12860,
62,
489,
1747,
28,
17821,
11,
2198,
62,
24455,
28,
17821,
2599,
198,
197,
37811,
198,
197,
4677,
13508,
376,
9792,
25853,
284,
262,
2393,
379,
257,
2176,
1627,
290,
11298,
262,
1255,
628,
197,
48944,
198,
197,
35937,
198,
197,
71,
7568,
62,
7753,
1058,
289,
20,
20519,
2393,
393,
399,
87,
16,
31835,
20519,
7177,
357,
3866,
18186,
318,
31835,
20519,
7177,
8,
198,
197,
197,
71,
7568,
62,
7753,
284,
670,
319,
11,
304,
13,
70,
13,
289,
7568,
13,
7753,
17816,
14,
5777,
12,
1831,
20520,
611,
326,
338,
257,
16092,
292,
316,
198,
197,
197,
361,
299,
67,
18747,
11,
3544,
3804,
393,
4277,
10007,
198,
197,
197,
11041,
299,
67,
18747,
13,
2704,
41769,
3419,
284,
4155,
3376,
15225,
628,
197,
19503,
80,
62,
10379,
912,
1058,
1351,
286,
31902,
22417,
1398,
5563,
198,
197,
197,
4264,
1299,
262,
16628,
284,
4174,
284,
262,
1332,
6737,
628,
197,
17143,
7307,
1058,
8633,
11,
11902,
198,
197,
197,
4264,
1299,
10007,
287,
18402,
12,
1831,
2393,
329,
30580,
16628,
13,
30199,
611,
257,
16092,
292,
316,
14,
8979,
198,
197,
197,
34320,
3994,
997,
62,
457,
82,
290,
264,
696,
62,
4873,
284,
307,
10345,
198,
197,
198,
197,
32515,
22510,
1058,
493,
11,
11902,
198,
197,
197,
1890,
37895,
257,
2176,
17465,
284,
466,
376,
9792,
7066,
20212,
319,
198,
197,
197,
198,
197,
12860,
62,
489,
1747,
1058,
20512,
11,
11902,
198,
197,
197,
17278,
82,
319,
376,
9792,
21528,
422,
9485,
19915,
1416,
11081,
628,
197,
3919,
786,
62,
83,
37668,
1058,
12178,
657,
284,
352,
198,
197,
197,
31264,
286,
7838,
2174,
543,
6737,
318,
900,
284,
657,
628,
197,
35561,
198,
197,
26866,
198,
197,
69,
2326,
62,
1370,
1058,
299,
32152,
13,
358,
18747,
198,
197,
197,
11928,
4400,
6737,
286,
289,
7568,
62,
7753,
198,
197,
198,
197,
19503,
80,
62,
10379,
912,
1058,
1351,
198,
197,
197,
464,
8106,
10007,
284,
307,
3804,
284,
26484,
22417,
198,
197,
198,
197,
5647,
62,
69,
2326,
11,
34197,
62,
69,
2326,
25,
2603,
29487,
8019,
6973,
198,
197,
197,
10049,
10345,
611,
905,
62,
489,
1747,
318,
319,
198,
197,
37811,
628,
197,
3447,
1758,
796,
10352,
198,
197,
701,
2981,
796,
965,
7,
4906,
7,
71,
7568,
62,
7753,
4008,
198,
197,
361,
19203,
71,
20,
9078,
6,
287,
277,
4906,
8,
393,
19203,
27354,
292,
316,
6,
287,
277,
4906,
2599,
220,
1303,
289,
7568,
2393,
628,
197,
197,
17143,
7307,
796,
651,
62,
26791,
13,
1136,
62,
37266,
7,
71,
7568,
62,
7753,
8,
198,
197,
197,
71,
7568,
62,
7753,
796,
651,
62,
26791,
13,
1136,
62,
32515,
7,
71,
7568,
62,
7753,
11,
685,
32515,
22510,
58,
15,
4357,
17465,
22510,
58,
16,
60,
4357,
7177,
62,
687,
28,
17821,
11,
1007,
3455,
28,
25101,
8,
198,
197,
197,
71,
7568,
62,
7753,
796,
289,
7568,
62,
7753,
13,
2704,
41769,
3419,
628,
197,
361,
18896,
7,
71,
7568,
62,
7753,
13,
43358,
8,
6624,
362,
25,
198,
197,
197,
3447,
1758,
796,
6407,
198,
197,
197,
71,
7568,
62,
7753,
796,
289,
7568,
62,
7753,
13,
2704,
41769,
3419,
628,
197,
1477,
796,
289,
7568,
62,
7753,
13,
43358,
628,
197,
2,
6208,
8106,
319,
257,
2060,
1627,
25,
198,
197,
69,
2326,
62,
1370,
11,
2336,
62,
69,
2326,
11,
34197,
62,
69,
2326,
796,
279,
87,
13,
36948,
13,
70,
14171,
62,
26791,
13,
9288,
62,
24455,
7,
71,
7568,
62,
7753,
11,
198,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
220,
220,
8373,
62,
10379,
1010,
28,
19503,
80,
62,
10379,
912,
11,
198,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
220,
220,
7838,
62,
400,
10126,
28,
3919,
786,
62,
83,
37668,
11,
198,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
220,
220,
905,
62,
489,
1747,
28,
12860,
62,
489,
1747,
8,
628,
197,
2,
1002,
761,
284,
27179,
1758,
198,
197,
361,
27179,
1758,
25,
198,
197,
197,
69,
2326,
62,
1370,
796,
45941,
13,
3447,
1758,
7,
69,
2326,
62,
1370,
11,
427,
8,
628,
197,
2,
6208,
8106,
503,
287,
11349,
198,
197,
361,
2198,
62,
24455,
25,
198,
197,
197,
489,
83,
13,
26875,
3419,
198,
197,
197,
489,
83,
13,
29487,
7,
71,
7568,
62,
7753,
11,
705,
65,
11537,
198,
197,
197,
489,
83,
13,
29487,
7,
69,
2326,
62,
1370,
11,
705,
74,
11537,
628,
197,
197,
71,
20,
62,
8416,
62,
69,
2326,
796,
17465,
13,
40809,
7,
69,
2326,
62,
1370,
11,
10007,
8,
198,
197,
197,
71,
20,
62,
8416,
62,
69,
2326,
13,
20063,
62,
24455,
62,
33152,
3419,
198,
197,
197,
71,
20,
62,
8416,
62,
69,
2326,
13,
38200,
2736,
3419,
198,
197,
197,
71,
20,
62,
8416,
62,
69,
2326,
13,
29487,
7,
3605,
29487,
28,
17821,
8,
628,
197,
197,
71,
20,
62,
8416,
62,
1831,
796,
17465,
13,
40809,
7,
71,
7568,
62,
7753,
11,
10007,
8,
198,
197,
197,
71,
20,
62,
8416,
62,
1831,
13,
38200,
2736,
3419,
198,
197,
197,
71,
20,
62,
8416,
62,
1831,
13,
29487,
7,
3605,
29487,
28,
17821,
8,
628,
197,
2,
220,
220,
220,
289,
20,
62,
8416,
62,
1831,
62,
403,
69,
2326,
796,
17465,
13,
40809,
7,
71,
7568,
62,
7753,
11,
10007,
8,
198,
197,
2,
220,
220,
220,
289,
20,
62,
8416,
62,
1831,
62,
403,
69,
2326,
13,
20063,
62,
24455,
62,
33152,
3419,
198,
197,
2,
220,
220,
220,
289,
20,
62,
8416,
62,
1831,
62,
403,
69,
2326,
13,
38200,
2736,
3419,
198,
197,
2,
220,
220,
220,
289,
20,
62,
8416,
62,
1831,
62,
403,
69,
2326,
13,
29487,
7,
3605,
29487,
28,
25101,
11,
66,
16,
11639,
88,
3256,
269,
17,
11639,
66,
11537,
628,
197,
7783,
1226,
83,
62,
1370,
11,
2030,
80,
62,
10379,
912,
11,
2336,
62,
69,
2326,
11,
34197,
62,
69,
2326,
628,
198,
4299,
277,
701,
62,
24455,
7,
71,
20,
62,
12417,
11,
2030,
80,
62,
10379,
912,
11,
7838,
62,
83,
37668,
28,
20,
68,
12,
22,
11,
787,
62,
3605,
28,
25101,
11,
15942,
577,
28,
25101,
2599,
198,
197,
37811,
198,
197,
1273,
549,
329,
11524,
8106,
2029,
284,
262,
2104,
18402,
2939,
900,
198,
197,
198,
197,
48944,
198,
197,
35937,
198,
197,
71,
20,
62,
12417,
1058,
289,
20,
9078,
13,
27354,
292,
316,
2134,
198,
197,
197,
27354,
292,
316,
284,
670,
319,
11,
304,
13,
70,
13,
289,
20,
62,
12417,
796,
279,
87,
13,
71,
7568,
62,
26791,
13,
1136,
6601,
7248,
7,
71,
7568,
13,
7753,
11,
705,
5777,
62,
1831,
11537,
58,
15,
60,
198,
197,
198,
197,
19503,
80,
62,
10379,
912,
1058,
1351,
198,
197,
197,
8053,
286,
8373,
16628,
3221,
7560,
287,
1332,
62,
1370,
2029,
198,
197,
197,
198,
197,
3919,
786,
62,
83,
37668,
1058,
12178,
11,
11902,
198,
197,
197,
4971,
2174,
543,
1366,
389,
900,
284,
657,
13,
16038,
3815,
796,
517,
7838,
357,
3549,
33435,
8,
198,
197,
198,
197,
15883,
62,
3605,
1058,
20512,
11,
11902,
198,
197,
197,
34934,
329,
302,
12,
10379,
20212,
262,
1366,
416,
4441,
257,
649,
9483,
198,
197,
198,
197,
35561,
198,
197,
26866,
198,
197,
198,
197,
71,
20,
62,
69,
2326,
1058,
16092,
292,
316,
198,
197,
197,
11928,
4400,
27039,
1626,
3452,
532,
5777,
51,
62,
11928,
20212,
4912,
198,
197,
197,
198,
197,
37811,
628,
197,
71,
20,
62,
69,
2326,
62,
2164,
79,
796,
514,
312,
13,
71,
7568,
62,
26791,
13,
9122,
62,
1640,
62,
727,
7,
71,
20,
62,
12417,
11,
705,
5777,
51,
62,
11928,
20212,
11537,
628,
197,
361,
787,
62,
3605,
6624,
6407,
393,
407,
597,
7,
71,
20,
62,
69,
2326,
62,
2164,
79,
2599,
628,
197,
197,
82,
328,
62,
69,
2326,
796,
279,
87,
13,
36948,
13,
11712,
282,
22417,
7,
71,
20,
62,
12417,
11,
8373,
62,
10379,
1010,
28,
19503,
80,
62,
10379,
912,
11,
198,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
220,
7838,
62,
400,
10126,
28,
3919,
786,
62,
83,
37668,
11,
198,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
220,
3551,
62,
10379,
4400,
28,
17821,
11,
3551,
62,
17561,
15385,
28,
25101,
11,
198,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
197,
220,
997,
62,
79,
844,
28,
16,
11,
15942,
577,
28,
19011,
577,
11,
21758,
28,
17,
11,
3509,
62,
11883,
62,
2022,
28,
25836,
8,
628,
197,
197,
71,
20,
62,
69,
2326,
62,
2164,
79,
796,
43237,
62,
69,
2326,
13,
5589,
1133,
3419,
628,
197,
17772,
25,
198,
197,
197,
4798,
10786,
26556,
4271,
29231,
2482,
11537,
198,
197,
197,
71,
20,
62,
69,
2326,
796,
289,
20,
62,
69,
2326,
62,
2164,
79,
58,
15,
7131,
6,
11928,
4400,
62,
6601,
20520,
628,
197,
71,
20,
62,
69,
2326,
796,
289,
20,
62,
69,
2326,
62,
2164,
79,
17816,
11928,
4400,
62,
6601,
20520,
198,
197,
385,
312,
13,
71,
7568,
62,
26791,
13,
30073,
62,
1078,
7657,
7,
71,
20,
62,
12417,
13,
8000,
11,
289,
20,
62,
69,
2326,
8,
198,
197,
385,
312,
13,
71,
7568,
62,
26791,
13,
30073,
62,
1078,
7657,
7,
71,
20,
62,
12417,
13,
8000,
11,
289,
20,
62,
69,
2326,
13,
8000,
8,
628,
197,
7783,
289,
20,
62,
69,
2326,
628,
198,
4299,
1877,
6603,
7,
71,
7568,
62,
7753,
11,
10007,
34758,
5512,
17465,
22510,
41888,
15,
11,
657,
4357,
277,
62,
8968,
2364,
28,
14202,
2599,
198,
197,
7061,
6,
198,
197,
9492,
32186,
284,
279,
87,
13,
9078,
19915,
1416,
11081,
13,
487,
83,
13,
20535,
14478,
22417,
198,
197,
198,
197,
25,
17143,
289,
7568,
62,
7753,
25,
628,
197,
25,
17143,
10007,
25,
198,
197,
198,
197,
25,
17143,
17465,
22510,
25,
198,
197,
197,
6214,
1332,
62,
24455,
2174,
628,
197,
25,
17143,
277,
62,
8968,
2364,
25,
493,
198,
197,
197,
35324,
284,
2005,
572,
13,
2896,
13185,
284,
362,
9,
19472,
8373,
19273,
284,
16936,
1802,
37597,
628,
197,
7061,
6,
198,
197,
71,
7568,
62,
7753,
11,
997,
62,
457,
82,
11,
3708,
11,
264,
696,
62,
4873,
796,
4808,
1136,
62,
32515,
62,
1640,
62,
10379,
20212,
7,
71,
7568,
62,
7753,
11,
10007,
11,
17465,
22510,
8,
628,
197,
361,
407,
277,
62,
8968,
2364,
25,
198,
197,
197,
34431,
69,
62,
8968,
2364,
796,
45941,
13,
744,
7,
19472,
1220,
352,
68,
20,
11,
875,
320,
874,
28,
15,
8,
1635,
362,
1635,
352,
68,
20,
220,
1303,
362,
22355,
262,
3708,
8373,
11,
2835,
510,
628,
197,
34431,
69,
796,
279,
87,
13,
36948,
13,
487,
83,
13,
20535,
14478,
22417,
7,
22510,
62,
457,
82,
11,
264,
696,
62,
4873,
11,
300,
79,
69,
62,
8968,
2364,
8,
628,
197,
7783,
300,
79,
69,
628,
198,
4299,
4097,
6603,
7,
71,
7568,
62,
7753,
11,
10007,
34758,
5512,
17465,
22510,
41888,
15,
11,
657,
4357,
277,
62,
16159,
28,
14202,
11,
277,
62,
10394,
28,
940,
68,
18,
11,
49239,
28,
14202,
11,
37979,
28,
25101,
2599,
198,
197,
7061,
6,
198,
197,
9492,
32186,
284,
12972,
19915,
1416,
11081,
13,
36948,
13,
487,
83,
13,
31407,
14478,
22417,
198,
197,
6425,
326,
428,
318,
6840,
257,
17925,
9229,
25853,
286,
1271,
62,
29155,
38530,
352,
11,
475,
351,
27454,
25278,
2882,
3038,
628,
197,
25,
17143,
289,
7568,
62,
7753,
25,
198,
197,
25,
17143,
10007,
25,
198,
197,
25,
17143,
17465,
22510,
25,
198,
197,
197,
6214,
1332,
62,
24455,
2174,
198,
197,
25,
17143,
277,
62,
16159,
25,
493,
198,
197,
197,
16159,
8373,
329,
262,
2176,
4097,
284,
1208,
198,
197,
25,
17143,
277,
62,
10394,
25,
493,
198,
197,
197,
10394,
286,
8373,
284,
1208,
198,
197,
25,
17143,
49239,
25,
493,
198,
197,
197,
361,
7368,
11,
5621,
262,
4097,
284,
428,
2176,
3294,
286,
262,
3708,
8373,
198,
197,
25,
17143,
37979,
25,
20512,
198,
197,
197,
2664,
281,
4463,
578,
9855,
9615,
18261,
8106,
2427,
286,
257,
3487,
3091,
7718,
198,
197,
7061,
6,
628,
197,
71,
7568,
62,
7753,
11,
997,
62,
457,
82,
11,
3708,
11,
264,
696,
62,
4873,
796,
4808,
1136,
62,
32515,
62,
1640,
62,
10379,
20212,
7,
71,
7568,
62,
7753,
11,
10007,
11,
17465,
22510,
8,
628,
197,
2,
4277,
318,
262,
362,
9,
86,
6737,
357,
12227,
49239,
329,
45814,
23264,
8,
198,
197,
361,
407,
277,
62,
16159,
25,
198,
197,
197,
361,
407,
49239,
25,
198,
197,
197,
197,
69,
62,
16159,
796,
3708,
1635,
362,
198,
197,
197,
17772,
25,
198,
197,
197,
197,
69,
62,
16159,
796,
493,
7,
19472,
1635,
49239,
8,
628,
197,
46583,
69,
796,
279,
87,
13,
36948,
13,
487,
83,
13,
31407,
14478,
22417,
7,
22510,
62,
457,
82,
11,
264,
696,
62,
4873,
11,
277,
62,
16159,
11,
277,
62,
10394,
11,
37979,
28,
69,
343,
8,
628,
197,
7783,
275,
79,
69,
628,
198,
4299,
49239,
7,
71,
7568,
62,
7753,
11,
10007,
34758,
5512,
17465,
22510,
41888,
15,
11,
657,
4357,
717,
62,
29155,
28,
16,
11,
19484,
28,
14202,
11,
997,
62,
29155,
38530,
28,
20,
2599,
198,
197,
7061,
6,
198,
197,
9492,
32186,
351,
279,
87,
13,
36948,
13,
487,
83,
13,
39,
1670,
9229,
22417,
628,
197,
48944,
198,
197,
35937,
198,
197,
71,
7568,
62,
7753,
11,
10007,
11,
17465,
22510,
1058,
766,
3651,
287,
1332,
62,
24455,
2174,
628,
197,
11085,
62,
29155,
1058,
493,
198,
197,
197,
464,
717,
49239,
1912,
319,
262,
3708,
8373,
284,
779,
198,
197,
197,
1890,
402,
12,
42,
47,
23264,
428,
815,
307,
11777,
900,
284,
362,
628,
197,
3903,
10394,
1058,
493,
198,
197,
197,
3903,
10394,
329,
25431,
13,
1114,
31350,
4959,
428,
318,
1327,
12,
2617,
284,
33507,
357,
17,
13,
20,
37597,
8,
628,
197,
22510,
62,
29155,
38530,
1058,
493,
198,
197,
197,
464,
1271,
286,
25625,
873,
284,
779,
357,
462,
4908,
11,
362,
9,
462,
4908,
11,
513,
9,
462,
4908,
11,
3503,
8,
198,
197,
7061,
6,
628,
197,
71,
7568,
62,
7753,
11,
997,
62,
457,
82,
11,
3708,
11,
264,
696,
62,
4873,
796,
4808,
1136,
62,
32515,
62,
1640,
62,
10379,
20212,
7,
71,
7568,
62,
7753,
11,
10007,
11,
17465,
22510,
8,
628,
197,
361,
407,
19484,
25,
198,
197,
197,
3903,
10394,
796,
33507,
198,
197,
417,
361,
19484,
1875,
33507,
25,
198,
197,
197,
40539,
654,
13,
40539,
10786,
31407,
10394,
286,
326,
1241,
1244,
2728,
8563,
11537,
198,
197,
197,
3903,
10394,
796,
33507,
628,
197,
11085,
62,
29155,
796,
3708,
1635,
717,
62,
29155,
628,
197,
71,
19881,
796,
279,
87,
13,
36948,
13,
487,
83,
13,
39,
1670,
9229,
14478,
22417,
7,
22510,
62,
457,
82,
11,
264,
696,
62,
4873,
11,
717,
62,
29155,
11,
19484,
11,
997,
62,
29155,
38530,
8,
628,
197,
7783,
289,
19881,
628,
198,
4299,
7838,
62,
24455,
7,
71,
7568,
62,
7753,
11,
10007,
34758,
5512,
17465,
22510,
41888,
15,
11,
657,
4357,
198,
197,
197,
197,
197,
10399,
41888,
940,
36,
18,
11,
2026,
36,
18,
11,
1802,
36,
18,
11,
6640,
36,
18,
11,
939,
36,
18,
4357,
198,
197,
197,
197,
197,
9647,
82,
41888,
1238,
36,
18,
11,
352,
36,
18,
11,
352,
36,
18,
11,
352,
36,
18,
11,
352,
36,
18,
60,
2599,
198,
197,
7061,
6,
198,
197,
9492,
32186,
351,
12972,
19915,
1416,
11081,
13,
36948,
13,
487,
83,
13,
2949,
786,
31407,
22417,
628,
197,
25,
17143,
289,
7568,
62,
7753,
25,
198,
197,
25,
17143,
10007,
25,
198,
197,
25,
17143,
17465,
22510,
25,
198,
197,
197,
6214,
1332,
62,
24455,
198,
197,
25,
17143,
10399,
25,
1351,
198,
197,
197,
8053,
286,
22192,
3976,
284,
8106,
503,
198,
197,
25,
17143,
9647,
82,
25,
198,
197,
197,
8053,
286,
8373,
9647,
82,
329,
1123,
8106,
13,
304,
11,
70,
13,
287,
4277,
1339,
357,
940,
37597,
3641,
11,
1160,
37597,
9647,
8,
318,
422,
657,
284,
1160,
37597,
198,
197,
7061,
6,
628,
197,
71,
7568,
62,
7753,
11,
997,
62,
457,
82,
11,
3708,
11,
264,
696,
62,
4873,
796,
4808,
1136,
62,
32515,
62,
1640,
62,
10379,
20212,
7,
71,
7568,
62,
7753,
11,
10007,
11,
17465,
22510,
8,
628,
197,
77,
69,
796,
279,
87,
13,
36948,
13,
487,
83,
13,
2949,
786,
31407,
22417,
7,
22510,
62,
457,
82,
11,
264,
696,
62,
4873,
11,
10399,
11,
9647,
82,
8,
628,
197,
7783,
299,
69,
628,
198,
198,
2,
46076,
1566,
6292,
287,
2834,
2581,
198
] | 2.621681 | 3,201 |
import pytest
from calvin.runtime.north.plugins.port import queue
from calvin.runtime.north.calvin_token import Token
from calvin.runtime.north.plugins.port.queue.common import QueueEmpty
from calvin.runtime.north.plugins.port.queue.test.test_collect_unordered import TestCollectUnorderedFIFO
pytest_unittest = pytest.mark.unittest
@pytest_unittest
| [
11748,
12972,
9288,
198,
198,
6738,
2386,
7114,
13,
43282,
13,
43588,
13,
37390,
13,
634,
1330,
16834,
198,
6738,
2386,
7114,
13,
43282,
13,
43588,
13,
9948,
7114,
62,
30001,
1330,
29130,
198,
6738,
2386,
7114,
13,
43282,
13,
43588,
13,
37390,
13,
634,
13,
36560,
13,
11321,
1330,
4670,
518,
40613,
198,
6738,
2386,
7114,
13,
43282,
13,
43588,
13,
37390,
13,
634,
13,
36560,
13,
9288,
13,
9288,
62,
33327,
62,
403,
24071,
1330,
6208,
31337,
3118,
24071,
37,
5064,
46,
198,
9078,
9288,
62,
403,
715,
395,
796,
12972,
9288,
13,
4102,
13,
403,
715,
395,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
31,
9078,
9288,
62,
403,
715,
395,
198
] | 2.983607 | 122 |
import matplotlib.pyplot as plt
import pandas as pd
from pathlib import Path
import nixio as nix
fnbase = Path.joinpath(Path.home(), 'Chaos', 'work')
fnraw = str(Path.joinpath(fnbase,
'_Lab_Zimmer/calcium_imaging/results/N2/urx/shift210421/20120705Pflp178GCaMP5kshift210421W7URXx2.log'))
nixfn = str(Path.joinpath(fnbase, 'ginrepos', 'demo', 'elegans_oxygen.nix'))
# row_wise read in of csv file
data = pd.read_csv(fnraw)
# transpose to get columns
tdata = data.transpose()
# get df/f column as array
steps = tdata.values[0]
dff = tdata.values[5]
# load data into nix
nixfile = nix.File.open(nixfn, nix.FileMode.Overwrite)
b = nixfile.create_block(name="oxygen_shift_trials", type_="calcium_imaging")
# use a group to structure the individual trials within a block
g = b.create_group(name="N2_URX_shift_210421_20120705", type_="trial.datacollection")
# add steps column
da = b.create_data_array(name="20120705_frames", array_type="trial.column", data=steps)
da.label = "frames"
# add dF/F column
da = b.create_data_array(name="20120705_df_over_f", array_type="trial.column", data=dff)
da.label = "dF/F"
# Add the second dimension to the data array
dim = da.append_sampled_dimension(steps[1] - steps[0])
dim.label = "frames"
# Structuring our data
g.data_arrays.append(b.data_arrays["20120705_frames"])
g.data_arrays.append(b.data_arrays["20120705_df_over_f"])
# plot figure from file
fig, ax = plt.subplots()
ax.plot(b.data_arrays["20120705_df_over_f"][:])
ax.set(xlabel=b.data_arrays["20120705_df_over_f"].dimensions[0].label,
ylabel=b.data_arrays["20120705_df_over_f"].label,
title="URX oxygen shift trial (21-04-21)")
plt.show()
nixfile.close()
| [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
299,
844,
952,
355,
299,
844,
198,
198,
22184,
8692,
796,
10644,
13,
22179,
6978,
7,
15235,
13,
11195,
22784,
705,
1925,
7495,
3256,
705,
1818,
11537,
628,
198,
22184,
1831,
796,
965,
7,
15235,
13,
22179,
6978,
7,
22184,
8692,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
62,
17822,
62,
57,
10957,
14,
9948,
16910,
62,
320,
3039,
14,
43420,
14,
45,
17,
14,
333,
87,
14,
30846,
17,
13464,
2481,
14,
1264,
1238,
34801,
47,
2704,
79,
23188,
15916,
64,
7378,
20,
591,
29323,
17,
13464,
2481,
54,
22,
4261,
55,
87,
17,
13,
6404,
6,
4008,
198,
198,
77,
844,
22184,
796,
965,
7,
15235,
13,
22179,
6978,
7,
22184,
8692,
11,
705,
1655,
260,
1930,
3256,
705,
9536,
78,
3256,
705,
68,
1455,
504,
62,
23536,
5235,
13,
77,
844,
6,
4008,
628,
198,
2,
5752,
62,
3083,
1100,
287,
286,
269,
21370,
2393,
198,
7890,
796,
279,
67,
13,
961,
62,
40664,
7,
22184,
1831,
8,
198,
198,
2,
1007,
3455,
284,
651,
15180,
198,
83,
7890,
796,
1366,
13,
7645,
3455,
3419,
198,
198,
2,
651,
47764,
14,
69,
5721,
355,
7177,
198,
20214,
796,
256,
7890,
13,
27160,
58,
15,
60,
198,
67,
487,
796,
256,
7890,
13,
27160,
58,
20,
60,
198,
198,
2,
3440,
1366,
656,
299,
844,
198,
77,
844,
7753,
796,
299,
844,
13,
8979,
13,
9654,
7,
77,
844,
22184,
11,
299,
844,
13,
8979,
19076,
13,
5886,
13564,
8,
198,
65,
796,
299,
844,
7753,
13,
17953,
62,
9967,
7,
3672,
2625,
23536,
5235,
62,
30846,
62,
28461,
874,
1600,
2099,
62,
2625,
9948,
16910,
62,
320,
3039,
4943,
198,
198,
2,
779,
257,
1448,
284,
4645,
262,
1981,
9867,
1626,
257,
2512,
198,
70,
796,
275,
13,
17953,
62,
8094,
7,
3672,
2625,
45,
17,
62,
4261,
55,
62,
30846,
62,
17,
13464,
2481,
62,
1264,
1238,
34801,
1600,
2099,
62,
2625,
45994,
13,
19608,
330,
349,
1564,
4943,
198,
198,
2,
751,
4831,
5721,
198,
6814,
796,
275,
13,
17953,
62,
7890,
62,
18747,
7,
3672,
2625,
1264,
1238,
34801,
62,
37805,
1600,
7177,
62,
4906,
2625,
45994,
13,
28665,
1600,
1366,
28,
20214,
8,
198,
6814,
13,
18242,
796,
366,
37805,
1,
198,
198,
2,
751,
288,
37,
14,
37,
5721,
198,
6814,
796,
275,
13,
17953,
62,
7890,
62,
18747,
7,
3672,
2625,
1264,
1238,
34801,
62,
7568,
62,
2502,
62,
69,
1600,
7177,
62,
4906,
2625,
45994,
13,
28665,
1600,
1366,
28,
67,
487,
8,
198,
6814,
13,
18242,
796,
366,
67,
37,
14,
37,
1,
198,
198,
2,
3060,
262,
1218,
15793,
284,
262,
1366,
7177,
198,
27740,
796,
12379,
13,
33295,
62,
37687,
10137,
62,
46156,
7,
20214,
58,
16,
60,
532,
4831,
58,
15,
12962,
198,
27740,
13,
18242,
796,
366,
37805,
1,
198,
198,
2,
32112,
870,
674,
1366,
198,
70,
13,
7890,
62,
3258,
592,
13,
33295,
7,
65,
13,
7890,
62,
3258,
592,
14692,
1264,
1238,
34801,
62,
37805,
8973,
8,
198,
70,
13,
7890,
62,
3258,
592,
13,
33295,
7,
65,
13,
7890,
62,
3258,
592,
14692,
1264,
1238,
34801,
62,
7568,
62,
2502,
62,
69,
8973,
8,
198,
198,
2,
7110,
3785,
422,
2393,
198,
5647,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
3419,
198,
897,
13,
29487,
7,
65,
13,
7890,
62,
3258,
592,
14692,
1264,
1238,
34801,
62,
7568,
62,
2502,
62,
69,
1,
7131,
25,
12962,
198,
897,
13,
2617,
7,
87,
18242,
28,
65,
13,
7890,
62,
3258,
592,
14692,
1264,
1238,
34801,
62,
7568,
62,
2502,
62,
69,
1,
4083,
27740,
5736,
58,
15,
4083,
18242,
11,
198,
220,
220,
220,
220,
220,
220,
331,
18242,
28,
65,
13,
7890,
62,
3258,
592,
14692,
1264,
1238,
34801,
62,
7568,
62,
2502,
62,
69,
1,
4083,
18242,
11,
198,
220,
220,
220,
220,
220,
220,
3670,
2625,
4261,
55,
11863,
6482,
4473,
357,
2481,
12,
3023,
12,
2481,
8,
4943,
198,
489,
83,
13,
12860,
3419,
198,
198,
77,
844,
7753,
13,
19836,
3419,
198
] | 2.386014 | 715 |
#############################################################################
# Copyright (c) Wolf Vollprecht, QuantStack #
# #
# Distributed under the terms of the BSD 3-Clause License. #
# #
# The full license is in the file LICENSE, distributed with this software. #
#############################################################################
try:
import rospy
except:
print("The rospy package is not found in your $PYTHONPATH. Subscribe and publish are not going to work.")
print("Do you need to activate your ROS environment?")
try:
from cv_bridge import CvBridge, CvBridgeError
import cv2
bridge = CvBridge()
except:
pass
import bqplot as bq
import ipywidgets as widgets
import numpy as np
import threading
import subprocess, yaml, os
def add_widgets(msg_instance, widget_dict, widget_list, prefix=''):
"""
Adds widgets.
@param msg_type The message type
@param widget_dict The form list
@param widget_list The widget list
@return widget_dict and widget_list
"""
# import only here so non ros env doesn't block installation
from genpy import Message
if msg_instance._type.split('/')[-1] == 'Image':
w = widgets.Text()
widget_dict['img'] = w
w_box = widgets.HBox([widgets.Label(value='Image path:'), w])
widget_list.append(w_box)
return widget_dict, widget_list
for idx, slot in enumerate(msg_instance.__slots__):
attr = getattr(msg_instance, slot)
s_t = msg_instance._slot_types[idx]
w = None
if s_t in ['float32', 'float64']:
w = widgets.FloatText()
if s_t in ['int8', 'uint8', 'int32', 'uint32', 'int64', 'uint64']:
w = widgets.IntText()
if s_t in ['string']:
w = widgets.Text()
if isinstance(attr, Message):
widget_list.append(widgets.Label(value=slot))
widget_dict[slot] = {}
add_widgets(attr, widget_dict[slot], widget_list, slot)
if w:
widget_dict[slot] = w
w_box = widgets.HBox([widgets.Label(value=slot, layout=widgets.Layout(width="100px")), w])
widget_list.append(w_box)
return widget_dict, widget_list
thread_map = {}
def publish(topic, msg_type):
"""
Create a form widget for message type msg_type.
This function analyzes the fields of msg_type and creates
an appropriate widget.
A publisher is automatically created which publishes to the
topic given as topic parameter. This allows pressing the
"Send Message" button to send the message to ROS.
@param msg_type The message type
@param topic The topic name to publish to
@return jupyter widget for display
"""
publisher = rospy.Publisher(topic, msg_type, queue_size=10)
widget_list = []
widget_dict = {}
latch_check = widgets.Checkbox(description="Latch Message")
rate_field = widgets.IntText(description="Rate", value=5)
stop_btn = widgets.Button(description="Start")
latch_check.observe(latch_value_change, 'value')
add_widgets(msg_type(), widget_dict, widget_list)
send_btn = widgets.Button(description="Send Message")
send_btn.on_click(send_msg)
thread_map[topic] = False
stop_btn.on_click(start_thread)
btm_box = widgets.HBox((send_btn, latch_check, rate_field, stop_btn))
widget_list.append(btm_box)
vbox = widgets.VBox(children=widget_list)
return vbox
def bag_player(bagfile=''):
"""
Create a form widget for playing ROS bags.
This function takes the bag file path, extracts the bag summary
and play the bag with the given arguments.
@param bagfile The ROS bag file path
@return jupyter widget for display
"""
widget_list = []
bag_player.sp = None
###### Fields #########################################################
bgpath_txt = widgets.Text()
bgpath_box = widgets.HBox([widgets.Label("Bag file path:"), bgpath_txt])
bgpath_txt.value = bagfile
play_btn = widgets.Button(description="Play", icon='play')
pause_btn = widgets.Button(description="Pause", icon='pause', disabled=True)
step_btn = widgets.Button(description="Step", icon='step-forward', disabled=True)
ibox = widgets.Checkbox(description="Immediate")
lbox = widgets.Checkbox(description="Loop")
clockbox = widgets.Checkbox(description="Clock")
dzbox = widgets.Checkbox(description="Duration")
kabox = widgets.Checkbox(description="Keep alive")
start_float = widgets.FloatText(value=0)
start_box = widgets.HBox([widgets.Label("Start time:"), start_float])
que_int = widgets.IntText(value=100)
que_box = widgets.HBox([widgets.Label("Queue size:"), que_int])
factor_float = widgets.FloatText(value=1)
factor_box = widgets.HBox([widgets.Label("Multiply the publish rate by:"), factor_float])
delay_float = widgets.FloatText(value=0)
delay_box = widgets.HBox([widgets.Label("Delay after every advertise call:"), delay_float])
duration_float = widgets.FloatText(value=0)
duration_box = widgets.HBox([dzbox, widgets.Label("Duration in secs:"), duration_float])
out_box = widgets.Output(layout={'border': '1px solid black'})
######## Play Button ##################################################
play_btn.on_click(ply_clk)
###################### Pause Button #########################
pause_btn.on_click(pause_clk)
################## step Button ###############################
step_btn.on_click(step_clk)
options_hbox = widgets.HBox([ibox, lbox, clockbox, kabox])
buttons_hbox = widgets.HBox([play_btn, pause_btn, step_btn])
btm_box = widgets.VBox(
[bgpath_box, options_hbox, duration_box, start_box, que_box, factor_box, delay_box, buttons_hbox, out_box])
widget_list.append(btm_box)
vbox = widgets.VBox(children=widget_list)
return vbox
def client(srv_name, srv_type):
"""
Create a form widget for message type srv_type.
This function analyzes the fields of srv_type and creates
an appropriate widget.
@param srv_type The service message type
@param srv_name The service name to call
@return jupyter widget for display
"""
rospy.wait_for_service(srv_name, timeout=5)
widget_list = []
widget_dict = {}
add_widgets(srv_type._request_class(), widget_dict, widget_list)
call_btn = widgets.Button(description="Call Service")
call_btn.on_click(call_srv)
widget_list.append(call_btn)
vbox = widgets.VBox(children=widget_list)
return vbox
| [
29113,
29113,
7804,
4242,
2,
198,
2,
15069,
357,
66,
8,
8662,
569,
692,
3866,
21474,
11,
16972,
25896,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
2,
4307,
6169,
739,
262,
2846,
286,
262,
347,
10305,
513,
12,
2601,
682,
13789,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
2,
383,
1336,
5964,
318,
287,
262,
2393,
38559,
24290,
11,
9387,
351,
428,
3788,
13,
220,
1303,
198,
29113,
29113,
7804,
4242,
2,
198,
198,
28311,
25,
198,
220,
220,
220,
1330,
686,
2777,
88,
198,
16341,
25,
198,
220,
220,
220,
3601,
7203,
464,
686,
2777,
88,
5301,
318,
407,
1043,
287,
534,
720,
47,
56,
4221,
1340,
34219,
13,
19808,
290,
7715,
389,
407,
1016,
284,
670,
19570,
198,
220,
220,
220,
3601,
7203,
5211,
345,
761,
284,
15155,
534,
48263,
2858,
1701,
8,
198,
28311,
25,
198,
220,
220,
220,
422,
269,
85,
62,
9458,
1330,
327,
85,
37385,
11,
327,
85,
37385,
12331,
198,
220,
220,
220,
1330,
269,
85,
17,
628,
220,
220,
220,
7696,
796,
327,
85,
37385,
3419,
198,
16341,
25,
198,
220,
220,
220,
1208,
198,
11748,
275,
80,
29487,
355,
275,
80,
198,
11748,
20966,
88,
28029,
11407,
355,
40803,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4704,
278,
198,
11748,
850,
14681,
11,
331,
43695,
11,
28686,
628,
198,
198,
4299,
751,
62,
28029,
11407,
7,
19662,
62,
39098,
11,
26295,
62,
11600,
11,
26295,
62,
4868,
11,
21231,
28,
7061,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
34333,
40803,
13,
628,
220,
220,
220,
2488,
17143,
31456,
62,
4906,
383,
3275,
2099,
198,
220,
220,
220,
2488,
17143,
26295,
62,
11600,
383,
1296,
1351,
198,
220,
220,
220,
2488,
17143,
26295,
62,
4868,
383,
26295,
1351,
628,
220,
220,
220,
2488,
7783,
26295,
62,
11600,
290,
26295,
62,
4868,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
1330,
691,
994,
523,
1729,
686,
82,
17365,
1595,
470,
2512,
9988,
198,
220,
220,
220,
422,
2429,
9078,
1330,
16000,
198,
220,
220,
220,
611,
31456,
62,
39098,
13557,
4906,
13,
35312,
10786,
14,
11537,
58,
12,
16,
60,
6624,
705,
5159,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
266,
796,
40803,
13,
8206,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
26295,
62,
11600,
17816,
9600,
20520,
796,
266,
198,
220,
220,
220,
220,
220,
220,
220,
266,
62,
3524,
796,
40803,
13,
39,
14253,
26933,
28029,
11407,
13,
33986,
7,
8367,
11639,
5159,
3108,
32105,
828,
266,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
26295,
62,
4868,
13,
33295,
7,
86,
62,
3524,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
26295,
62,
11600,
11,
26295,
62,
4868,
628,
220,
220,
220,
329,
4686,
87,
11,
10852,
287,
27056,
378,
7,
19662,
62,
39098,
13,
834,
6649,
1747,
834,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
708,
81,
796,
651,
35226,
7,
19662,
62,
39098,
11,
10852,
8,
198,
220,
220,
220,
220,
220,
220,
220,
264,
62,
83,
796,
31456,
62,
39098,
13557,
43384,
62,
19199,
58,
312,
87,
60,
198,
220,
220,
220,
220,
220,
220,
220,
266,
796,
6045,
628,
220,
220,
220,
220,
220,
220,
220,
611,
264,
62,
83,
287,
37250,
22468,
2624,
3256,
705,
22468,
2414,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
266,
796,
40803,
13,
43879,
8206,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
264,
62,
83,
287,
37250,
600,
23,
3256,
705,
28611,
23,
3256,
705,
600,
2624,
3256,
705,
28611,
2624,
3256,
705,
600,
2414,
3256,
705,
28611,
2414,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
266,
796,
40803,
13,
5317,
8206,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
264,
62,
83,
287,
37250,
8841,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
266,
796,
40803,
13,
8206,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
7,
35226,
11,
16000,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26295,
62,
4868,
13,
33295,
7,
28029,
11407,
13,
33986,
7,
8367,
28,
43384,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26295,
62,
11600,
58,
43384,
60,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
751,
62,
28029,
11407,
7,
35226,
11,
26295,
62,
11600,
58,
43384,
4357,
26295,
62,
4868,
11,
10852,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
266,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26295,
62,
11600,
58,
43384,
60,
796,
266,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
266,
62,
3524,
796,
40803,
13,
39,
14253,
26933,
28029,
11407,
13,
33986,
7,
8367,
28,
43384,
11,
12461,
28,
28029,
11407,
13,
32517,
7,
10394,
2625,
3064,
8416,
4943,
828,
266,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26295,
62,
4868,
13,
33295,
7,
86,
62,
3524,
8,
628,
220,
220,
220,
1441,
26295,
62,
11600,
11,
26295,
62,
4868,
628,
198,
198,
16663,
62,
8899,
796,
23884,
628,
198,
198,
4299,
7715,
7,
26652,
11,
31456,
62,
4906,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
13610,
257,
1296,
26295,
329,
3275,
2099,
31456,
62,
4906,
13,
198,
220,
220,
220,
770,
2163,
4284,
12271,
262,
7032,
286,
31456,
62,
4906,
290,
8075,
198,
220,
220,
220,
281,
5035,
26295,
13,
198,
220,
220,
220,
317,
9991,
318,
6338,
2727,
543,
34134,
284,
262,
198,
220,
220,
220,
7243,
1813,
355,
7243,
11507,
13,
770,
3578,
12273,
262,
198,
220,
220,
220,
366,
25206,
16000,
1,
4936,
284,
3758,
262,
3275,
284,
48263,
13,
628,
220,
220,
220,
2488,
17143,
31456,
62,
4906,
383,
3275,
2099,
198,
220,
220,
220,
2488,
17143,
7243,
383,
7243,
1438,
284,
7715,
284,
628,
220,
220,
220,
2488,
7783,
474,
929,
88,
353,
26295,
329,
3359,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
9991,
796,
686,
2777,
88,
13,
46471,
7,
26652,
11,
31456,
62,
4906,
11,
16834,
62,
7857,
28,
940,
8,
628,
220,
220,
220,
26295,
62,
4868,
796,
17635,
198,
220,
220,
220,
26295,
62,
11600,
796,
23884,
628,
220,
220,
220,
43140,
62,
9122,
796,
40803,
13,
9787,
3524,
7,
11213,
2625,
43,
963,
16000,
4943,
198,
220,
220,
220,
2494,
62,
3245,
796,
40803,
13,
5317,
8206,
7,
11213,
2625,
32184,
1600,
1988,
28,
20,
8,
198,
220,
220,
220,
2245,
62,
46118,
796,
40803,
13,
21864,
7,
11213,
2625,
10434,
4943,
628,
220,
220,
220,
43140,
62,
9122,
13,
672,
2655,
303,
7,
75,
963,
62,
8367,
62,
3803,
11,
705,
8367,
11537,
628,
220,
220,
220,
751,
62,
28029,
11407,
7,
19662,
62,
4906,
22784,
26295,
62,
11600,
11,
26295,
62,
4868,
8,
198,
220,
220,
220,
3758,
62,
46118,
796,
40803,
13,
21864,
7,
11213,
2625,
25206,
16000,
4943,
628,
220,
220,
220,
3758,
62,
46118,
13,
261,
62,
12976,
7,
21280,
62,
19662,
8,
628,
220,
220,
220,
4704,
62,
8899,
58,
26652,
60,
796,
10352,
628,
220,
220,
220,
2245,
62,
46118,
13,
261,
62,
12976,
7,
9688,
62,
16663,
8,
628,
220,
220,
220,
275,
17209,
62,
3524,
796,
40803,
13,
39,
14253,
19510,
21280,
62,
46118,
11,
43140,
62,
9122,
11,
2494,
62,
3245,
11,
2245,
62,
46118,
4008,
198,
220,
220,
220,
26295,
62,
4868,
13,
33295,
7,
65,
17209,
62,
3524,
8,
198,
220,
220,
220,
410,
3524,
796,
40803,
13,
53,
14253,
7,
17197,
28,
42655,
62,
4868,
8,
628,
220,
220,
220,
1441,
410,
3524,
628,
198,
198,
4299,
6131,
62,
7829,
7,
21454,
7753,
28,
7061,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
13610,
257,
1296,
26295,
329,
2712,
48263,
11668,
13,
198,
220,
220,
220,
770,
2163,
2753,
262,
6131,
2393,
3108,
11,
32139,
262,
6131,
10638,
198,
220,
220,
220,
290,
711,
262,
6131,
351,
262,
1813,
7159,
13,
628,
220,
220,
220,
2488,
17143,
6131,
7753,
383,
48263,
6131,
2393,
3108,
628,
220,
220,
220,
2488,
7783,
474,
929,
88,
353,
26295,
329,
3359,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
26295,
62,
4868,
796,
17635,
198,
220,
220,
220,
6131,
62,
7829,
13,
2777,
796,
6045,
198,
220,
220,
220,
46424,
2,
23948,
1303,
29113,
14468,
7804,
198,
220,
220,
220,
275,
70,
6978,
62,
14116,
796,
40803,
13,
8206,
3419,
198,
220,
220,
220,
275,
70,
6978,
62,
3524,
796,
40803,
13,
39,
14253,
26933,
28029,
11407,
13,
33986,
7203,
33,
363,
2393,
3108,
11097,
828,
275,
70,
6978,
62,
14116,
12962,
198,
220,
220,
220,
275,
70,
6978,
62,
14116,
13,
8367,
796,
6131,
7753,
198,
220,
220,
220,
711,
62,
46118,
796,
40803,
13,
21864,
7,
11213,
2625,
11002,
1600,
7196,
11639,
1759,
11537,
198,
220,
220,
220,
14985,
62,
46118,
796,
40803,
13,
21864,
7,
11213,
2625,
49991,
1600,
7196,
11639,
32125,
3256,
10058,
28,
17821,
8,
198,
220,
220,
220,
2239,
62,
46118,
796,
40803,
13,
21864,
7,
11213,
2625,
8600,
1600,
7196,
11639,
9662,
12,
11813,
3256,
10058,
28,
17821,
8,
198,
220,
220,
220,
24283,
1140,
796,
40803,
13,
9787,
3524,
7,
11213,
2625,
3546,
13857,
4943,
198,
220,
220,
220,
300,
3524,
796,
40803,
13,
9787,
3524,
7,
11213,
2625,
39516,
4943,
198,
220,
220,
220,
8801,
3524,
796,
40803,
13,
9787,
3524,
7,
11213,
2625,
44758,
4943,
198,
220,
220,
220,
288,
89,
3524,
796,
40803,
13,
9787,
3524,
7,
11213,
2625,
26054,
4943,
198,
220,
220,
220,
479,
397,
1140,
796,
40803,
13,
9787,
3524,
7,
11213,
2625,
15597,
6776,
4943,
198,
220,
220,
220,
923,
62,
22468,
796,
40803,
13,
43879,
8206,
7,
8367,
28,
15,
8,
198,
220,
220,
220,
923,
62,
3524,
796,
40803,
13,
39,
14253,
26933,
28029,
11407,
13,
33986,
7203,
10434,
640,
11097,
828,
923,
62,
22468,
12962,
198,
220,
220,
220,
8358,
62,
600,
796,
40803,
13,
5317,
8206,
7,
8367,
28,
3064,
8,
198,
220,
220,
220,
8358,
62,
3524,
796,
40803,
13,
39,
14253,
26933,
28029,
11407,
13,
33986,
7203,
34991,
2546,
11097,
828,
8358,
62,
600,
12962,
198,
220,
220,
220,
5766,
62,
22468,
796,
40803,
13,
43879,
8206,
7,
8367,
28,
16,
8,
198,
220,
220,
220,
5766,
62,
3524,
796,
40803,
13,
39,
14253,
26933,
28029,
11407,
13,
33986,
7203,
15205,
541,
306,
262,
7715,
2494,
416,
11097,
828,
5766,
62,
22468,
12962,
198,
220,
220,
220,
5711,
62,
22468,
796,
40803,
13,
43879,
8206,
7,
8367,
28,
15,
8,
198,
220,
220,
220,
5711,
62,
3524,
796,
40803,
13,
39,
14253,
26933,
28029,
11407,
13,
33986,
7203,
13856,
323,
706,
790,
32740,
869,
11097,
828,
5711,
62,
22468,
12962,
198,
220,
220,
220,
9478,
62,
22468,
796,
40803,
13,
43879,
8206,
7,
8367,
28,
15,
8,
198,
220,
220,
220,
9478,
62,
3524,
796,
40803,
13,
39,
14253,
26933,
67,
89,
3524,
11,
40803,
13,
33986,
7203,
26054,
287,
792,
82,
11097,
828,
9478,
62,
22468,
12962,
198,
220,
220,
220,
503,
62,
3524,
796,
40803,
13,
26410,
7,
39786,
34758,
6,
20192,
10354,
705,
16,
8416,
4735,
2042,
6,
30072,
628,
220,
220,
220,
46424,
21017,
3811,
20969,
1303,
29113,
14468,
2,
628,
220,
220,
220,
711,
62,
46118,
13,
261,
62,
12976,
7,
2145,
62,
565,
74,
8,
628,
220,
220,
220,
1303,
14468,
4242,
2,
350,
682,
20969,
1303,
14468,
7804,
628,
220,
220,
220,
14985,
62,
46118,
13,
261,
62,
12976,
7,
32125,
62,
565,
74,
8,
628,
220,
220,
220,
1303,
14468,
2,
2239,
20969,
1303,
14468,
7804,
4242,
2235,
628,
220,
220,
220,
2239,
62,
46118,
13,
261,
62,
12976,
7,
9662,
62,
565,
74,
8,
198,
220,
220,
220,
3689,
62,
71,
3524,
796,
40803,
13,
39,
14253,
26933,
571,
1140,
11,
300,
3524,
11,
8801,
3524,
11,
479,
397,
1140,
12962,
198,
220,
220,
220,
12163,
62,
71,
3524,
796,
40803,
13,
39,
14253,
26933,
1759,
62,
46118,
11,
14985,
62,
46118,
11,
2239,
62,
46118,
12962,
198,
220,
220,
220,
275,
17209,
62,
3524,
796,
40803,
13,
53,
14253,
7,
198,
220,
220,
220,
220,
220,
220,
220,
685,
35904,
6978,
62,
3524,
11,
3689,
62,
71,
3524,
11,
9478,
62,
3524,
11,
923,
62,
3524,
11,
8358,
62,
3524,
11,
5766,
62,
3524,
11,
5711,
62,
3524,
11,
12163,
62,
71,
3524,
11,
503,
62,
3524,
12962,
198,
220,
220,
220,
26295,
62,
4868,
13,
33295,
7,
65,
17209,
62,
3524,
8,
198,
220,
220,
220,
410,
3524,
796,
40803,
13,
53,
14253,
7,
17197,
28,
42655,
62,
4868,
8,
198,
220,
220,
220,
1441,
410,
3524,
628,
198,
4299,
5456,
7,
27891,
85,
62,
3672,
11,
19677,
85,
62,
4906,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
13610,
257,
1296,
26295,
329,
3275,
2099,
19677,
85,
62,
4906,
13,
198,
220,
220,
220,
770,
2163,
4284,
12271,
262,
7032,
286,
19677,
85,
62,
4906,
290,
8075,
198,
220,
220,
220,
281,
5035,
26295,
13,
628,
220,
220,
220,
2488,
17143,
19677,
85,
62,
4906,
383,
2139,
3275,
2099,
198,
220,
220,
220,
2488,
17143,
19677,
85,
62,
3672,
383,
2139,
1438,
284,
869,
628,
220,
220,
220,
2488,
7783,
474,
929,
88,
353,
26295,
329,
3359,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
686,
2777,
88,
13,
17077,
62,
1640,
62,
15271,
7,
27891,
85,
62,
3672,
11,
26827,
28,
20,
8,
628,
220,
220,
220,
26295,
62,
4868,
796,
17635,
198,
220,
220,
220,
26295,
62,
11600,
796,
23884,
628,
220,
220,
220,
751,
62,
28029,
11407,
7,
27891,
85,
62,
4906,
13557,
25927,
62,
4871,
22784,
26295,
62,
11600,
11,
26295,
62,
4868,
8,
198,
220,
220,
220,
869,
62,
46118,
796,
40803,
13,
21864,
7,
11213,
2625,
14134,
4809,
4943,
628,
220,
220,
220,
869,
62,
46118,
13,
261,
62,
12976,
7,
13345,
62,
27891,
85,
8,
628,
220,
220,
220,
26295,
62,
4868,
13,
33295,
7,
13345,
62,
46118,
8,
198,
220,
220,
220,
410,
3524,
796,
40803,
13,
53,
14253,
7,
17197,
28,
42655,
62,
4868,
8,
628,
220,
220,
220,
1441,
410,
3524,
628
] | 2.638456 | 2,564 |
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
def rules_nixpkgs_dependencies(rules_nixpkgs_name = "io_tweag_rules_nixpkgs"):
"""Load repositories required by rules_nixpkgs.
Args:
rules_nixpkgs_name: name under which this repository is known in your workspace
"""
maybe(
http_archive,
"platforms",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz",
],
sha256 = "079945598e4b6cc075846f7fd6a9d0857c33a7afc0de868c2ccb96405225135d",
)
maybe(
http_archive,
"bazel_skylib",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
],
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
)
maybe(
http_archive,
"rules_java",
url = "https://github.com/bazelbuild/rules_java/releases/download/4.0.0/rules_java-4.0.0.tar.gz",
sha256 = "34b41ec683e67253043ab1a3d1e8b7c61e4e8edefbcad485381328c934d072fe",
)
# the following complication is due to migrating to `bzlmod`.
# fetch extracted submodules as external repositories from an existing source tree, based on the import type.
rules_nixpkgs = native.existing_rule(rules_nixpkgs_name)
if not rules_nixpkgs:
errormsg = [
"External repository `rules_nixpkgs` not found as `{}`.".format(rules_nixpkgs_name),
"Specify `rules_nixpkgs_dependencies(rules_nixpkgs_name=<name>)`",
"with `<name>` as used for importing `rules_nixpkgs`.",
]
fail("\n".join(errormsg))
kind = rules_nixpkgs.get("kind")
strip_prefix = rules_nixpkgs.get("strip_prefix", "")
if strip_prefix:
strip_prefix += "/"
for name, prefix in [
("rules_nixpkgs_core", "core"),
("rules_nixpkgs_cc", "toolchains/cc"),
("rules_nixpkgs_java", "toolchains/java"),
("rules_nixpkgs_python", "toolchains/python"),
("rules_nixpkgs_go", "toolchains/go"),
("rules_nixpkgs_rust", "toolchains/rust"),
("rules_nixpkgs_posix", "toolchains/posix"),
]:
# case analysis in inner loop to reduce code duplication
if kind == "local_repository":
path = rules_nixpkgs.get("path")
maybe(native.local_repository, name, path = "{}/{}".format(path, prefix))
elif kind == "http_archive":
maybe(
http_archive,
name,
strip_prefix = strip_prefix + prefix,
# there may be more attributes needed. please submit a pull request to support your use case.
url = rules_nixpkgs.get("url"),
urls = rules_nixpkgs.get("urls"),
sha256 = rules_nixpkgs.get("sha256"),
)
elif kind == "git_repository":
maybe(
git_repository,
name,
strip_prefix = strip_prefix + prefix,
# there may be more attributes needed. please submit a pull request to support your use case.
remote = rules_nixpkgs.get("remote"),
commit = rules_nixpkgs.get("commit"),
branch = rules_nixpkgs.get("branch"),
tag = rules_nixpkgs.get("tag"),
shallow_since = rules_nixpkgs.get("shallow_since"),
)
else:
errormsg = [
"Could not find any import type for `rules_nixpkgs`.",
"This should not happen. If you encounter this using the latest release",
"of `rules_nixpkgs`, please file an issue describing your use case:",
"https://github.com/tweag/rules_nixpkgs/issues",
"or submit a pull request with corrections:",
"https://github.com/tweag/rules_nixpkgs/pulls",
]
fail("\n".join(errormsg))
| [
2220,
7203,
31,
65,
41319,
62,
31391,
1003,
31391,
14,
11249,
62,
4299,
82,
14,
260,
7501,
25,
4023,
13,
65,
48274,
1600,
366,
4023,
62,
17474,
4943,
198,
2220,
7203,
31,
65,
41319,
62,
31391,
1003,
31391,
14,
11249,
62,
4299,
82,
14,
260,
7501,
25,
26791,
13,
65,
48274,
1600,
366,
25991,
4943,
198,
2220,
7203,
31,
65,
41319,
62,
31391,
1003,
31391,
14,
11249,
62,
4299,
82,
14,
260,
7501,
25,
18300,
13,
65,
48274,
1600,
366,
18300,
62,
260,
1930,
37765,
4943,
198,
198,
4299,
3173,
62,
77,
844,
35339,
82,
62,
45841,
3976,
7,
38785,
62,
77,
844,
35339,
82,
62,
3672,
796,
366,
952,
62,
83,
732,
363,
62,
38785,
62,
77,
844,
35339,
82,
1,
2599,
198,
220,
220,
220,
37227,
8912,
38072,
2672,
416,
3173,
62,
77,
844,
35339,
82,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3173,
62,
77,
844,
35339,
82,
62,
3672,
25,
1438,
739,
543,
428,
16099,
318,
1900,
287,
534,
44573,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3863,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2638,
62,
17474,
11,
198,
220,
220,
220,
220,
220,
220,
220,
366,
24254,
82,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
2956,
7278,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5450,
1378,
10793,
1472,
13,
65,
41319,
13,
11249,
14,
12567,
13,
785,
14,
65,
41319,
11249,
14,
24254,
82,
14,
260,
29329,
14,
15002,
14,
15,
13,
15,
13,
19,
14,
24254,
82,
12,
15,
13,
15,
13,
19,
13,
18870,
13,
34586,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5450,
1378,
12567,
13,
785,
14,
65,
41319,
11249,
14,
24254,
82,
14,
260,
29329,
14,
15002,
14,
15,
13,
15,
13,
19,
14,
24254,
82,
12,
15,
13,
15,
13,
19,
13,
18870,
13,
34586,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
16589,
198,
220,
220,
220,
220,
220,
220,
220,
427,
64,
11645,
796,
366,
2998,
2079,
2231,
41292,
68,
19,
65,
21,
535,
15,
38569,
3510,
69,
22,
16344,
21,
64,
24,
67,
2919,
3553,
66,
2091,
64,
22,
1878,
66,
15,
2934,
23,
3104,
66,
17,
535,
65,
4846,
1821,
4309,
1495,
17059,
67,
1600,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
3863,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2638,
62,
17474,
11,
198,
220,
220,
220,
220,
220,
220,
220,
366,
65,
41319,
62,
15688,
8019,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
2956,
7278,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5450,
1378,
12567,
13,
785,
14,
65,
41319,
11249,
14,
65,
41319,
12,
15688,
8019,
14,
260,
29329,
14,
15002,
14,
16,
13,
15,
13,
18,
14,
65,
41319,
12,
15688,
8019,
12,
16,
13,
15,
13,
18,
13,
18870,
13,
34586,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5450,
1378,
10793,
1472,
13,
65,
41319,
13,
11249,
14,
12567,
13,
785,
14,
65,
41319,
11249,
14,
65,
41319,
12,
15688,
8019,
14,
260,
29329,
14,
15002,
14,
16,
13,
15,
13,
18,
14,
65,
41319,
12,
15688,
8019,
12,
16,
13,
15,
13,
18,
13,
18870,
13,
34586,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
16589,
198,
220,
220,
220,
220,
220,
220,
220,
427,
64,
11645,
796,
366,
16,
66,
4310,
1485,
4304,
330,
22,
68,
20,
64,
15259,
68,
45310,
3720,
2548,
64,
1495,
2623,
2934,
15,
66,
4051,
67,
6052,
69,
20,
66,
1983,
4521,
28978,
1507,
68,
15,
891,
66,
49234,
1860,
3980,
66,
1600,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
3863,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2638,
62,
17474,
11,
198,
220,
220,
220,
220,
220,
220,
220,
366,
38785,
62,
12355,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
19016,
796,
366,
5450,
1378,
12567,
13,
785,
14,
65,
41319,
11249,
14,
38785,
62,
12355,
14,
260,
29329,
14,
15002,
14,
19,
13,
15,
13,
15,
14,
38785,
62,
12355,
12,
19,
13,
15,
13,
15,
13,
18870,
13,
34586,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
427,
64,
11645,
796,
366,
2682,
65,
3901,
721,
47521,
68,
3134,
1495,
1270,
3559,
397,
16,
64,
18,
67,
16,
68,
23,
65,
22,
66,
5333,
68,
19,
68,
23,
276,
891,
15630,
324,
32642,
2548,
1485,
2078,
66,
24,
2682,
67,
2998,
17,
5036,
1600,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
1303,
262,
1708,
45185,
318,
2233,
284,
45879,
284,
4600,
65,
48274,
4666,
44646,
198,
220,
220,
220,
1303,
21207,
21242,
850,
18170,
355,
7097,
38072,
422,
281,
4683,
2723,
5509,
11,
1912,
319,
262,
1330,
2099,
13,
198,
220,
220,
220,
3173,
62,
77,
844,
35339,
82,
796,
6868,
13,
25687,
62,
25135,
7,
38785,
62,
77,
844,
35339,
82,
62,
3672,
8,
198,
220,
220,
220,
611,
407,
3173,
62,
77,
844,
35339,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
11454,
579,
45213,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
41506,
16099,
4600,
38785,
62,
77,
844,
35339,
82,
63,
407,
1043,
355,
4600,
90,
92,
63,
526,
13,
18982,
7,
38785,
62,
77,
844,
35339,
82,
62,
3672,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
22882,
1958,
4600,
38785,
62,
77,
844,
35339,
82,
62,
45841,
3976,
7,
38785,
62,
77,
844,
35339,
82,
62,
3672,
28,
27,
3672,
43734,
63,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
4480,
4600,
27,
3672,
29,
63,
355,
973,
329,
33332,
4600,
38785,
62,
77,
844,
35339,
82,
63,
33283,
198,
220,
220,
220,
220,
220,
220,
220,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
2038,
7203,
59,
77,
1911,
22179,
7,
8056,
579,
45213,
4008,
198,
220,
220,
220,
1611,
796,
3173,
62,
77,
844,
35339,
82,
13,
1136,
7203,
11031,
4943,
628,
220,
220,
220,
10283,
62,
40290,
796,
3173,
62,
77,
844,
35339,
82,
13,
1136,
7203,
36311,
62,
40290,
1600,
366,
4943,
198,
220,
220,
220,
611,
10283,
62,
40290,
25,
198,
220,
220,
220,
220,
220,
220,
220,
10283,
62,
40290,
15853,
12813,
1,
628,
220,
220,
220,
329,
1438,
11,
21231,
287,
685,
198,
220,
220,
220,
220,
220,
220,
220,
5855,
38785,
62,
77,
844,
35339,
82,
62,
7295,
1600,
366,
7295,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
5855,
38785,
62,
77,
844,
35339,
82,
62,
535,
1600,
366,
25981,
38861,
14,
535,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
5855,
38785,
62,
77,
844,
35339,
82,
62,
12355,
1600,
366,
25981,
38861,
14,
12355,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
5855,
38785,
62,
77,
844,
35339,
82,
62,
29412,
1600,
366,
25981,
38861,
14,
29412,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
5855,
38785,
62,
77,
844,
35339,
82,
62,
2188,
1600,
366,
25981,
38861,
14,
2188,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
5855,
38785,
62,
77,
844,
35339,
82,
62,
11469,
1600,
366,
25981,
38861,
14,
11469,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
5855,
38785,
62,
77,
844,
35339,
82,
62,
1930,
844,
1600,
366,
25981,
38861,
14,
1930,
844,
12340,
198,
220,
220,
220,
2361,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1339,
3781,
287,
8434,
9052,
284,
4646,
2438,
50124,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1611,
6624,
366,
12001,
62,
260,
1930,
37765,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3108,
796,
3173,
62,
77,
844,
35339,
82,
13,
1136,
7203,
6978,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3863,
7,
30191,
13,
12001,
62,
260,
1930,
37765,
11,
1438,
11,
3108,
796,
45144,
92,
14,
90,
92,
1911,
18982,
7,
6978,
11,
21231,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
1611,
6624,
366,
4023,
62,
17474,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3863,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2638,
62,
17474,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10283,
62,
40290,
796,
10283,
62,
40290,
1343,
21231,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
612,
743,
307,
517,
12608,
2622,
13,
3387,
9199,
257,
2834,
2581,
284,
1104,
534,
779,
1339,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19016,
796,
3173,
62,
77,
844,
35339,
82,
13,
1136,
7203,
6371,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2956,
7278,
796,
3173,
62,
77,
844,
35339,
82,
13,
1136,
7203,
6371,
82,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
427,
64,
11645,
796,
3173,
62,
77,
844,
35339,
82,
13,
1136,
7203,
26270,
11645,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
1611,
6624,
366,
18300,
62,
260,
1930,
37765,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3863,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17606,
62,
260,
1930,
37765,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10283,
62,
40290,
796,
10283,
62,
40290,
1343,
21231,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
612,
743,
307,
517,
12608,
2622,
13,
3387,
9199,
257,
2834,
2581,
284,
1104,
534,
779,
1339,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6569,
796,
3173,
62,
77,
844,
35339,
82,
13,
1136,
7203,
47960,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4589,
796,
3173,
62,
77,
844,
35339,
82,
13,
1136,
7203,
41509,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8478,
796,
3173,
62,
77,
844,
35339,
82,
13,
1136,
7203,
1671,
3702,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7621,
796,
3173,
62,
77,
844,
35339,
82,
13,
1136,
7203,
12985,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19337,
62,
20777,
796,
3173,
62,
77,
844,
35339,
82,
13,
1136,
7203,
1477,
12154,
62,
20777,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11454,
579,
45213,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
23722,
407,
1064,
597,
1330,
2099,
329,
4600,
38785,
62,
77,
844,
35339,
82,
63,
33283,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1212,
815,
407,
1645,
13,
1002,
345,
8791,
428,
1262,
262,
3452,
2650,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1659,
4600,
38785,
62,
77,
844,
35339,
82,
47671,
3387,
2393,
281,
2071,
12059,
534,
779,
1339,
25,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5450,
1378,
12567,
13,
785,
14,
83,
732,
363,
14,
38785,
62,
77,
844,
35339,
82,
14,
37165,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
273,
9199,
257,
2834,
2581,
351,
26251,
25,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5450,
1378,
12567,
13,
785,
14,
83,
732,
363,
14,
38785,
62,
77,
844,
35339,
82,
14,
31216,
82,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2038,
7203,
59,
77,
1911,
22179,
7,
8056,
579,
45213,
4008,
198
] | 2.033985 | 2,148 |
from inspect import isclass
from inspect import signature
from _dependencies.exceptions import DependencyError
# Messages.
default_class_value_template = """
{owner} has a default value of {argument!r} argument set to {value!r} class.
You should either change the name of the argument into '{argument}_class'
or set the default value to an instance of that class.
""".strip()
| [
6738,
10104,
1330,
318,
4871,
198,
6738,
10104,
1330,
9877,
198,
198,
6738,
4808,
45841,
3976,
13,
1069,
11755,
1330,
37947,
1387,
12331,
628,
628,
628,
198,
198,
2,
43534,
13,
628,
198,
12286,
62,
4871,
62,
8367,
62,
28243,
796,
37227,
198,
90,
18403,
92,
468,
257,
4277,
1988,
286,
1391,
49140,
0,
81,
92,
4578,
900,
284,
1391,
8367,
0,
81,
92,
1398,
13,
198,
198,
1639,
815,
2035,
1487,
262,
1438,
286,
262,
4578,
656,
705,
90,
49140,
92,
62,
4871,
6,
198,
273,
900,
262,
4277,
1988,
284,
281,
4554,
286,
326,
1398,
13,
198,
15931,
1911,
36311,
3419,
198
] | 3.721154 | 104 |
import matplotlib.pyplot as plt
import numpy as np
from sklearn.metrics import accuracy_score
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
from sklearn.gaussian_process import GaussianProcessClassifier
from sklearn.gaussian_process.kernels import RBF
from sklearn import datasets
iris = datasets.load_iris()
| [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
9922,
62,
26675,
198,
6738,
1341,
35720,
13,
29127,
62,
19849,
1330,
5972,
2569,
8081,
2234,
198,
6738,
1341,
35720,
13,
82,
14761,
1330,
311,
15922,
198,
198,
6738,
1341,
35720,
13,
4908,
31562,
62,
14681,
1330,
12822,
31562,
18709,
9487,
7483,
198,
6738,
1341,
35720,
13,
4908,
31562,
62,
14681,
13,
74,
44930,
1330,
17986,
37,
198,
198,
6738,
1341,
35720,
1330,
40522,
198,
198,
29616,
796,
40522,
13,
2220,
62,
29616,
3419,
198
] | 3.47 | 100 |
from datetime import datetime, timedelta
from math import inf as infinity
from statistics import mean
| [
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
6738,
10688,
1330,
1167,
355,
37174,
198,
6738,
7869,
1330,
1612,
628
] | 4.681818 | 22 |
import requests
import re
from bs4 import BeautifulSoup
import indexParser
source = DataSource()
| [
11748,
7007,
198,
11748,
302,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
6376,
46677,
628,
198,
198,
10459,
796,
6060,
7416,
3419,
198
] | 3.703704 | 27 |
# Generated by Django 3.0.2 on 2020-02-02 05:09
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
17,
319,
12131,
12,
2999,
12,
2999,
8870,
25,
2931,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import numpy as np
import traceback
import multiprocessing as mp
from tqdm import tqdm
from best_shape_fit import *
from data import PlusShapeModel
configs = [
# 'plus_shape.conditional_cinn_4',
# 'plus_shape.conditional_cinn_8',
# 'plus_shape.conditional_hint_4_full',
# 'plus_shape.conditional_hint_8_full',
# 'plus_shape.unconditional_inn_4_Q',
# 'plus_shape.unconditional_inn_8',
# 'plus_shape.unconditional_hint_4_full',
# 'plus_shape.unconditional_hint_8_full',
# 'plus_shape.unconditional_inn_16',
# 'plus_shape.unconditional_inn_32',
# 'plus_shape.unconditional_hint_4_1',
# 'plus_shape.unconditional_hint_8_1',
# 'plus_shape.unconditional_hint_16_1',
# 'plus_shape.unconditional_hint_4_2',
# 'plus_shape.unconditional_hint_8_2',
# 'plus_shape.unconditional_hint_4_3',
# 'plus_shape.unconditional_hint_4_0_small',
# 'plus_shape.unconditional_hint_8_0_small',
# 'plus_shape.unconditional_hint_16_0_small',
# 'plus_shape.unconditional_hint_32_0_small',
# 'plus_shape.unconditional_hint_4_1_small',
# 'plus_shape.unconditional_hint_8_1_small',
# 'plus_shape.unconditional_hint_16_1_small',
# 'plus_shape.unconditional_hint_4_2_small',
# 'plus_shape.unconditional_hint_8_2_small',
# 'plus_shape.unconditional_hint_4_3_small',
# 'plus_shape.unconditional_hint_4_0_big',
# 'plus_shape.unconditional_hint_8_0_big',
# 'plus_shape.unconditional_hint_16_0_big',
# 'plus_shape.unconditional_hint_32_0_big',
# 'plus_shape.unconditional_hint_4_1_big',
# 'plus_shape.unconditional_hint_8_1_big',
# 'plus_shape.unconditional_hint_16_1_big',
# 'plus_shape.unconditional_hint_4_2_big',
# 'plus_shape.unconditional_hint_8_2_big',
# 'plus_shape.unconditional_hint_4_3_big',
]
if __name__ == '__main__':
pass
evaluate_all()
collect_results()
| [
11748,
299,
32152,
355,
45941,
201,
198,
11748,
12854,
1891,
201,
198,
11748,
18540,
305,
919,
278,
355,
29034,
201,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
201,
198,
201,
198,
6738,
1266,
62,
43358,
62,
11147,
1330,
1635,
201,
198,
6738,
1366,
1330,
8227,
33383,
17633,
201,
198,
201,
198,
201,
198,
201,
198,
11250,
82,
796,
685,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
17561,
1859,
62,
66,
3732,
62,
19,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
17561,
1859,
62,
66,
3732,
62,
23,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
17561,
1859,
62,
71,
600,
62,
19,
62,
12853,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
17561,
1859,
62,
71,
600,
62,
23,
62,
12853,
3256,
201,
198,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
3732,
62,
19,
62,
48,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
3732,
62,
23,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
12853,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
23,
62,
12853,
3256,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
3732,
62,
1433,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
3732,
62,
2624,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
16,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
23,
62,
16,
3256,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
1433,
62,
16,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
17,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
23,
62,
17,
3256,
201,
198,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
18,
3256,
201,
198,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
15,
62,
17470,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
23,
62,
15,
62,
17470,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
1433,
62,
15,
62,
17470,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
2624,
62,
15,
62,
17470,
3256,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
16,
62,
17470,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
23,
62,
16,
62,
17470,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
1433,
62,
16,
62,
17470,
3256,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
17,
62,
17470,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
23,
62,
17,
62,
17470,
3256,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
18,
62,
17470,
3256,
201,
198,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
15,
62,
14261,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
23,
62,
15,
62,
14261,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
1433,
62,
15,
62,
14261,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
2624,
62,
15,
62,
14261,
3256,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
16,
62,
14261,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
23,
62,
16,
62,
14261,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
1433,
62,
16,
62,
14261,
3256,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
17,
62,
14261,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
23,
62,
17,
62,
14261,
3256,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
9541,
62,
43358,
13,
403,
17561,
1859,
62,
71,
600,
62,
19,
62,
18,
62,
14261,
3256,
201,
198,
220,
220,
220,
2361,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,
220,
220,
220,
1208,
201,
198,
201,
198,
220,
220,
220,
13446,
62,
439,
3419,
201,
198,
220,
220,
220,
2824,
62,
43420,
3419,
201,
198
] | 1.923561 | 1,112 |
import time
from config import CONFIG
| [
11748,
640,
198,
198,
6738,
4566,
1330,
25626,
628,
628,
198
] | 3.909091 | 11 |
from botto.core.bot import Botto
db = Botto.db
# pylint: disable=no-member
| [
6738,
3005,
78,
13,
7295,
13,
13645,
1330,
14835,
78,
198,
198,
9945,
796,
14835,
78,
13,
9945,
198,
198,
2,
279,
2645,
600,
25,
15560,
28,
3919,
12,
19522,
628,
628,
628,
628,
628
] | 2.457143 | 35 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : Jinzhong Xu
# @Contact : [email protected]
# @Time : 10/12/2020 3:56 PM
# @File : parse_arguments.py
# @Software: PyCharm
import os
from optparse import OptionParser
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
2,
2488,
13838,
220,
1058,
17297,
23548,
506,
33591,
201,
198,
2,
2488,
17829,
1058,
474,
259,
23548,
506,
87,
84,
31,
66,
2385,
13,
330,
13,
31522,
201,
198,
2,
2488,
7575,
220,
220,
220,
1058,
838,
14,
1065,
14,
42334,
513,
25,
3980,
3122,
201,
198,
2,
2488,
8979,
220,
220,
220,
1058,
21136,
62,
853,
2886,
13,
9078,
201,
198,
2,
2488,
25423,
25,
9485,
1925,
1670,
201,
198,
201,
198,
11748,
28686,
201,
198,
6738,
2172,
29572,
1330,
16018,
46677,
201,
198,
201,
198
] | 2.185841 | 113 |
import math
first_num = Integer(10)
print(first_num.value)
second_num = Integer.from_roman("IV")
print(second_num.value)
print(Integer.from_float("2.6"))
print(Integer.from_string(2.6))
| [
11748,
10688,
628,
198,
198,
11085,
62,
22510,
796,
34142,
7,
940,
8,
198,
4798,
7,
11085,
62,
22510,
13,
8367,
8,
198,
198,
12227,
62,
22510,
796,
34142,
13,
6738,
62,
47119,
7203,
3824,
4943,
198,
4798,
7,
12227,
62,
22510,
13,
8367,
8,
198,
198,
4798,
7,
46541,
13,
6738,
62,
22468,
7203,
17,
13,
21,
48774,
198,
4798,
7,
46541,
13,
6738,
62,
8841,
7,
17,
13,
21,
4008,
198
] | 2.616438 | 73 |
""" Low level tests for the InvenTree API """
from rest_framework.test import APITestCase
from rest_framework import status
from django.urls import reverse
from django.contrib.auth import get_user_model
class APITests(APITestCase):
""" Tests for the InvenTree API """
fixtures = [
'location',
'stock',
'part',
'category',
]
username = 'test_user'
password = 'test_pass'
def test_get_token_fail(self):
""" Ensure that an invalid user cannot get a token """
token_url = reverse('api-token')
response = self.client.post(token_url, format='json', data={'username': 'bad', 'password': 'also_bad'})
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertFalse('token' in response.data)
def test_get_token_pass(self):
""" Ensure that a valid user can request an API token """
token_url = reverse('api-token')
# POST to retreive a token
response = self.client.post(token_url, format='json', data={'username': self.username, 'password': self.password})
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertTrue('token' in response.data)
self.assertTrue('pk' in response.data)
self.assertTrue(len(response.data['token']) > 0)
# Now, use the token to access other data
token = response.data['token']
part_url = reverse('api-part-list')
# Try to access without a token
response = self.client.get(part_url, format='json')
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)
# Now, with the token
self.client.credentials(HTTP_AUTHORIZATION='Token ' + token)
response = self.client.get(part_url, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
| [
37811,
7754,
1241,
5254,
329,
262,
554,
574,
27660,
7824,
37227,
198,
198,
6738,
1334,
62,
30604,
13,
9288,
1330,
3486,
2043,
395,
20448,
198,
6738,
1334,
62,
30604,
1330,
3722,
198,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
628,
198,
4871,
3486,
2043,
3558,
7,
2969,
2043,
395,
20448,
2599,
198,
220,
220,
220,
37227,
30307,
329,
262,
554,
574,
27660,
7824,
37227,
628,
220,
220,
220,
34609,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
705,
24886,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
13578,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
3911,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
22872,
3256,
198,
220,
220,
220,
2361,
628,
220,
220,
220,
20579,
796,
705,
9288,
62,
7220,
6,
198,
220,
220,
220,
9206,
796,
705,
9288,
62,
6603,
6,
628,
220,
220,
220,
825,
1332,
62,
1136,
62,
30001,
62,
32165,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
48987,
326,
281,
12515,
2836,
2314,
651,
257,
11241,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
11241,
62,
6371,
796,
9575,
10786,
15042,
12,
30001,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
2882,
796,
2116,
13,
16366,
13,
7353,
7,
30001,
62,
6371,
11,
5794,
11639,
17752,
3256,
1366,
34758,
6,
29460,
10354,
705,
14774,
3256,
705,
28712,
10354,
705,
14508,
62,
14774,
6,
30072,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
26209,
13,
13376,
62,
8189,
11,
3722,
13,
40717,
62,
7029,
62,
33,
2885,
62,
2200,
35780,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
25101,
10786,
30001,
6,
287,
2882,
13,
7890,
8,
628,
220,
220,
220,
825,
1332,
62,
1136,
62,
30001,
62,
6603,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
48987,
326,
257,
4938,
2836,
460,
2581,
281,
7824,
11241,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
11241,
62,
6371,
796,
9575,
10786,
15042,
12,
30001,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
24582,
284,
1005,
260,
425,
257,
11241,
198,
220,
220,
220,
220,
220,
220,
220,
2882,
796,
2116,
13,
16366,
13,
7353,
7,
30001,
62,
6371,
11,
5794,
11639,
17752,
3256,
1366,
34758,
6,
29460,
10354,
2116,
13,
29460,
11,
705,
28712,
10354,
2116,
13,
28712,
30072,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
26209,
13,
13376,
62,
8189,
11,
3722,
13,
40717,
62,
2167,
62,
11380,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
17821,
10786,
30001,
6,
287,
2882,
13,
7890,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
17821,
10786,
79,
74,
6,
287,
2882,
13,
7890,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
17821,
7,
11925,
7,
26209,
13,
7890,
17816,
30001,
6,
12962,
1875,
657,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
2735,
11,
779,
262,
11241,
284,
1895,
584,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
11241,
796,
2882,
13,
7890,
17816,
30001,
20520,
628,
220,
220,
220,
220,
220,
220,
220,
636,
62,
6371,
796,
9575,
10786,
15042,
12,
3911,
12,
4868,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
9993,
284,
1895,
1231,
257,
11241,
198,
220,
220,
220,
220,
220,
220,
220,
2882,
796,
2116,
13,
16366,
13,
1136,
7,
3911,
62,
6371,
11,
5794,
11639,
17752,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
26209,
13,
13376,
62,
8189,
11,
3722,
13,
40717,
62,
21844,
62,
52,
4535,
24318,
1581,
14887,
1961,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2735,
11,
351,
262,
11241,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
16366,
13,
66,
445,
14817,
7,
40717,
62,
32,
24318,
1581,
14887,
6234,
11639,
30642,
705,
1343,
11241,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2882,
796,
2116,
13,
16366,
13,
1136,
7,
3911,
62,
6371,
11,
5794,
11639,
17752,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
26209,
13,
13376,
62,
8189,
11,
3722,
13,
40717,
62,
2167,
62,
11380,
8,
198
] | 2.552097 | 739 |
from unittest import TestCase
from girepo.formatter import beautify_text
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
308,
557,
7501,
13,
687,
1436,
1330,
3566,
1958,
62,
5239,
628
] | 3.409091 | 22 |
c = float(input('Digite a temperatura para ser convertida: '))
f = ((9*c)/5)+32
print('A temperatura de {}ºC, é igual a {}ºF!'.format(c, f))
| [
66,
796,
12178,
7,
15414,
10786,
19511,
578,
257,
4124,
2541,
64,
31215,
1055,
10385,
3755,
25,
705,
4008,
201,
198,
69,
796,
14808,
24,
9,
66,
20679,
20,
47762,
2624,
201,
198,
4798,
10786,
32,
4124,
2541,
64,
390,
23884,
36165,
34,
11,
38251,
45329,
723,
257,
23884,
36165,
37,
0,
4458,
18982,
7,
66,
11,
277,
4008,
201,
198,
201,
198
] | 2.31746 | 63 |
import math
import os
from random import *
import data_loader
import model_s2i
import util
import flags
import errno
import json
import numpy as np
import tensorflow as tf
from seqeval.metrics import accuracy_score
from seqeval.metrics import f1_score
from seqeval.metrics import precision_score
from seqeval.metrics import recall_score
from sklearn.metrics import accuracy_score as scikit_accuracy
from sklearn.metrics import f1_score as scikit_f1
from sklearn.model_selection import StratifiedKFold
a = Random()
a.seed(1)
def dump_flags(FLAGS):
""" Dumps the TF app flags in a JSON file. Filename will be determined based on the model name.
Args:
FLAGS: App flags
"""
flags_dict = dict()
for k, v in tf.flags.FLAGS.__flags.items():
flags_dict[k] = v.value
filename = FLAGS.scenario_num + '.json'
filename = os.path.join(FLAGS.hyperparams_dir, filename)
if not os.path.exists(os.path.dirname(filename)):
try:
os.makedirs(os.path.dirname(filename))
except OSError as exc: # Guard against race condition
if exc.errno != errno.EEXIST:
raise
with open(filename, 'w', encoding='utf-8') as f:
json.dump(flags_dict, f, indent=4)
def evaluate_validation(capsnet, val_data, FLAGS, sess, epoch, fold, log=False, calculate_learning_curves=False):
""" Evaluates the model on the validation set
Args:
capsnet: CapsNet model
val_data: validation data dict
FLAGS: TensorFlow flags
sess: TensorFlow session in which the training was run
epoch: current epoch of training
fold: current fold of K-fold cross-validation
Returns:
f_score: intent detection F1 score
scores['f1']: slot filling F1 score
"""
x_te = val_data['x_val']
sentences_length_te = val_data['sentences_len_val']
y_intents_te = val_data['y_intents_val']
y_slots_te = val_data['y_slots_val']
one_hot_intents = val_data['one_hot_intents_val']
one_hot_slots = val_data['one_hot_slots_val']
slots_dict = val_data['slots_dict']
intents_dict = val_data['intents_dict']
# Define TensorBoard writer
if log:
writer = tf.summary.FileWriter(FLAGS.summaries_dir + '/' + FLAGS.scenario_num + '-validation-' + str(fold), sess.graph)
if calculate_learning_curves:
writer = tf.summary.FileWriter(FLAGS.summaries_dir + '/' + FLAGS.scenario_num + '-validation-lc', sess.graph)
total_intent_pred = []
total_slots_pred = []
num_samples = len(x_te)
batch_size = FLAGS.batch_size
test_batch = int(math.ceil(num_samples / float(batch_size)))
loss_val = 1
for i in range(test_batch):
begin_index = i * batch_size
end_index = min((i + 1) * batch_size, num_samples)
batch_te = x_te[begin_index: end_index]
batch_sentences_len = sentences_length_te[begin_index: end_index]
batch_intents_one_hot = one_hot_intents[begin_index: end_index]
batch_slots_one_hot = one_hot_slots[begin_index: end_index]
batch_size = end_index - begin_index
# Get predictions for current validation batch
feed_dict = {capsnet.input_x: batch_te, capsnet.sentences_length: batch_sentences_len,
capsnet.encoded_intents: batch_intents_one_hot, capsnet.encoded_slots: batch_slots_one_hot,
capsnet.keep_prob: 1.0}
if FLAGS.use_attention:
mask = util.calculate_mask(batch_sentences_len, FLAGS.max_sentence_length, batch_size, FLAGS.r)
feed_dict[capsnet.attention_mask] = mask
[intent_outputs, slots_outputs, slot_weights_c, cross_entropy_summary,
margin_loss_summary, loss_summary] = sess.run([
capsnet.intent_output_vectors, capsnet.slot_output_vectors, capsnet.slot_weights_c,
capsnet.cross_entropy_val_summary,
capsnet.margin_loss_val_summary, capsnet.loss_tr_summary],
feed_dict=feed_dict)
loss_val = loss_summary
# Add TensorBoard summaries to FileWriter
if log:
# writer.add_summary(cross_entropy_summary, epoch * test_batch + i)
# writer.add_summary(margin_loss_summary, epoch * test_batch + i)
# writer.add_summary(loss_summary, epoch * test_batch + i)
writer.add_summary(cross_entropy_summary, epoch + i)
writer.add_summary(margin_loss_summary, epoch + i)
writer.add_summary(loss_summary, epoch + i)
# Modify prediction vectors dimensions to prepare for argmax
intent_outputs_reduced_dim = tf.squeeze(intent_outputs, axis=[1, 4])
intent_outputs_norm = util.safe_norm(intent_outputs_reduced_dim)
slot_weights_c_reduced_dim = tf.squeeze(slot_weights_c, axis=[3, 4])
[intent_predictions, slot_predictions] = sess.run([intent_outputs_norm, slot_weights_c_reduced_dim])
# Obtain intent prediction
te_batch_intent_pred = np.argmax(intent_predictions, axis=1)
total_intent_pred += np.ndarray.tolist(te_batch_intent_pred)
# Obtain slots prediction
te_batch_slots_pred = np.argmax(slot_predictions, axis=2)
total_slots_pred += (np.ndarray.tolist(te_batch_slots_pred))
if calculate_learning_curves:
writer.add_summary(loss_val, fold)
print(' VALIDATION SET PERFORMANCE ')
print('Intent detection')
intents_acc = scikit_accuracy(y_intents_te, total_intent_pred)
y_intents_true = np.ndarray.tolist(y_intents_te)
y_intent_labels_true = [intents_dict[i] for i in y_intents_true]
y_intent_labels_pred = [intents_dict[i] for i in total_intent_pred]
intents = sorted(list(set(y_intent_labels_true)))
f_score = scikit_f1(y_intent_labels_true, y_intent_labels_pred, average='micro', labels=intents)
# print(classification_report(y_intent_labels_true, y_intent_labels_pred, digits=4))
print('Intent accuracy %lf' % intents_acc)
print('F score %lf' % f_score)
y_slots_te_true = np.ndarray.tolist(y_slots_te)
y_slot_labels_true = [[slots_dict[slot_idx] for slot_idx in ex] for ex in y_slots_te_true]
y_slot_labels_pred = [[slots_dict[slot_idx] for slot_idx in ex] for ex in total_slots_pred]
scores = eval_seq_scores(y_slot_labels_true, y_slot_labels_pred)
print('Slot filling')
print('F1 score: %lf' % scores['f1'])
print('Accuracy: %lf' % scores['accuracy'])
# print('Precision: %lf' % scores['precision'])
# print('Recall: %lf' % scores['recall'])
return f_score, scores['f1']
def eval_seq_scores(y_true, y_pred):
""" Performs sequence evaluation on slot labels
Args:
y_true: true slot labels
y_pred: predicted slot labels
Returns:
scores: dict containing the evaluation scores: f1, accuracy, precision, recall
"""
scores = dict()
scores['f1'] = f1_score(y_true, y_pred)
scores['accuracy'] = accuracy_score(y_true, y_pred)
scores['precision'] = precision_score(y_true, y_pred)
scores['recall'] = recall_score(y_true, y_pred)
return scores
def generate_batch(n, batch_size):
""" Generates a set of batch indices
Args:
n: total number of samples in set
batch_size: size of batch
Returns:
batch_index: a list of length batch_size containing randomly sampled indices
"""
batch_index = a.sample(range(n), batch_size)
return batch_index
def assign_pretrained_word_embedding(sess, embedding, capsnet):
""" Assigns word embeddings to the CapsNet model
Args:
sess: TensorFlow session
embedding: array containing the word embeddings
capsnet: CapsNet model
"""
print('using pre-trained word emebedding.begin...')
word_embedding_placeholder = tf.placeholder(dtype=tf.float32, shape=embedding.shape)
sess.run(capsnet.Embedding.assign(word_embedding_placeholder), {word_embedding_placeholder: embedding})
print('using pre-trained word emebedding.ended...')
def train_cross_validation(model, train_data, val_data, embedding, FLAGS, fold, best_f_score, batches_rand=False, log=False,
calculate_learning_curves=False):
""" Trains the model for one cross-validation fold
Args:
train_data: training data dictionary
val_data: validation data dictionary
embedding: array containing pre-trained word embeddings
FLAGS: TensorFlow application flags
fold: current fold index
best_f_score: best overall F1 score (across all folds so far)
batches_rand: whether to random sample mini batches or not (shuffle + seq)
log: toggle TensorBoard visualization on/off
Returns:
best_f_score: best overall F1 score (across all folds so far, including after this one)
best_f_score_mean_fold: best overall F1 score for this fold
best_f_score_intent_fold: best intent F1 score for this fold
best_f_score_slot_fold: best slot F1 score for this fold
"""
# start
x_train = train_data['x_tr']
sentences_length_train = train_data['sentences_len_tr']
one_hot_intents_train = train_data['one_hot_intents_tr']
one_hot_slots_train = train_data['one_hot_slots_tr']
best_f_score_mean_fold = 0.0
best_f_score_intent_fold = 0.0
best_f_score_slot_fold = 0.0
# We must reset the graph to start a brand new training of the model
tf.reset_default_graph()
config = tf.ConfigProto()
with tf.Session(config=config) as sess:
# Instantiate Model
capsnet = model(FLAGS)
print('Initializing Variables')
sess.run(tf.global_variables_initializer())
if FLAGS.use_embedding:
# load pre-trained word embedding
assign_pretrained_word_embedding(sess, embedding, capsnet)
# Initial evaluation on validation set
intent_f_score, slot_f_score = evaluate_validation(capsnet, val_data, FLAGS, sess, epoch=0, fold=fold)
f_score_mean = (intent_f_score + slot_f_score) / 2
if f_score_mean > best_f_score:
best_f_score = f_score_mean
var_saver = tf.train.Saver()
if f_score_mean > best_f_score_mean_fold:
# best mean in this fold, save scores
best_f_score_mean_fold = f_score_mean
best_f_score_intent_fold = intent_f_score
best_f_score_slot_fold = slot_f_score
if log:
train_writer = tf.summary.FileWriter(FLAGS.summaries_dir + '/' + FLAGS.scenario_num + '-train-fold' + str(fold), sess.graph)
# Training cycle
train_sample_num = x_train.shape[0]
batch_num = int(math.ceil(train_sample_num / FLAGS.batch_size))
loss_train = 1
for epoch in range(FLAGS.num_epochs):
for batch in range(batch_num):
if batches_rand:
batch_index = generate_batch(train_sample_num, FLAGS.batch_size)
batch_x = x_train[batch_index]
batch_sentences_len = sentences_length_train[batch_index]
batch_intents_one_hot = one_hot_intents_train[batch_index]
batch_slots_one_hot = one_hot_slots_train[batch_index]
batch_size = FLAGS.batch_size
else:
# Training samples are already shuffled in the file
begin_index = batch * FLAGS.batch_size
end_index = min((batch + 1) * FLAGS.batch_size, train_sample_num)
batch_x = x_train[begin_index: end_index]
batch_sentences_len = sentences_length_train[begin_index: end_index]
batch_intents_one_hot = one_hot_intents_train[begin_index: end_index]
batch_slots_one_hot = one_hot_slots_train[begin_index: end_index]
batch_size = end_index - begin_index
feed_dict = {capsnet.input_x: batch_x,
capsnet.encoded_intents: batch_intents_one_hot,
capsnet.encoded_slots: batch_slots_one_hot,
capsnet.sentences_length: batch_sentences_len,
capsnet.keep_prob: FLAGS.keep_prob}
if FLAGS.use_attention:
mask = util.calculate_mask(batch_sentences_len, FLAGS.max_sentence_length, batch_size, FLAGS.r)
feed_dict[capsnet.attention_mask] = mask
[_, loss, _, _,
cross_entropy_summary, margin_loss_summary,
loss_summary] = sess.run([capsnet.train_op, capsnet.loss_val,
capsnet.intent_output_vectors,
capsnet.slot_output_vectors, capsnet.cross_entropy_tr_summary,
capsnet.margin_loss_tr_summary, capsnet.loss_tr_summary],
feed_dict=feed_dict)
loss_train = loss_summary
if log:
train_writer.add_summary(cross_entropy_summary, batch_num * epoch + batch)
train_writer.add_summary(margin_loss_summary, batch_num * epoch + batch)
train_writer.add_summary(loss_summary, batch_num * epoch + batch)
print('------------------epoch : ', epoch, ' Loss: ', loss, '----------------------')
# TODO: figure out a more permanent fix for correct epoch numbering (so that validation and training are
# not shifted, and it still works for various train/validation splits
intent_f_score, slot_f_score = evaluate_validation(capsnet, val_data, FLAGS,
# sess, epoch=epoch + 1, fold=fold, log=log)
sess, epoch=batch_num * epoch, fold=fold, log=log)
f_score_mean = (intent_f_score + slot_f_score) / 2
if f_score_mean > best_f_score:
# best score overall -> save model
best_f_score = f_score_mean
if FLAGS.scenario_num != '':
ckpt_dir = FLAGS.ckpt_dir + 'scenario' + FLAGS.scenario_num + '/'
if not os.path.exists(ckpt_dir):
os.makedirs(ckpt_dir)
else:
ckpt_dir = FLAGS.ckpt_dir
var_saver.save(sess, os.path.join(ckpt_dir, 'model.ckpt'), 1)
print('Current F score mean', f_score_mean)
print('Best F score mean', best_f_score)
if f_score_mean > best_f_score_mean_fold:
# best mean in this fold, save scores
best_f_score_mean_fold = f_score_mean
best_f_score_intent_fold = intent_f_score
best_f_score_slot_fold = slot_f_score
if calculate_learning_curves:
train_writer = tf.summary.FileWriter(FLAGS.summaries_dir + '/' + FLAGS.scenario_num + '-train-lc', sess.graph)
train_writer.add_summary(loss_train, fold)
intent_f_score, slot_f_score = evaluate_validation(capsnet, val_data, FLAGS,
sess, epoch=epoch + 1, fold=fold, log=log,
calculate_learning_curves=True)
return best_f_score, best_f_score_mean_fold, best_f_score_intent_fold, best_f_score_slot_fold
if __name__ == '__main__':
main()
| [
11748,
10688,
198,
11748,
28686,
198,
6738,
4738,
1330,
1635,
198,
198,
11748,
1366,
62,
29356,
198,
11748,
2746,
62,
82,
17,
72,
198,
11748,
7736,
198,
11748,
9701,
198,
11748,
11454,
3919,
198,
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
33756,
18206,
13,
4164,
10466,
1330,
9922,
62,
26675,
198,
6738,
33756,
18206,
13,
4164,
10466,
1330,
277,
16,
62,
26675,
198,
6738,
33756,
18206,
13,
4164,
10466,
1330,
15440,
62,
26675,
198,
6738,
33756,
18206,
13,
4164,
10466,
1330,
10014,
62,
26675,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
9922,
62,
26675,
355,
629,
1134,
270,
62,
4134,
23843,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
277,
16,
62,
26675,
355,
629,
1134,
270,
62,
69,
16,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
29186,
1431,
42,
37,
727,
198,
198,
64,
796,
14534,
3419,
198,
64,
13,
28826,
7,
16,
8,
628,
198,
4299,
10285,
62,
33152,
7,
38948,
50,
2599,
198,
220,
220,
220,
37227,
360,
8142,
262,
24958,
598,
9701,
287,
257,
19449,
2393,
13,
7066,
12453,
481,
307,
5295,
1912,
319,
262,
2746,
1438,
13,
198,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
9977,
4760,
50,
25,
2034,
9701,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
9701,
62,
11600,
796,
8633,
3419,
198,
220,
220,
220,
329,
479,
11,
410,
287,
48700,
13,
33152,
13,
38948,
50,
13,
834,
33152,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
9701,
62,
11600,
58,
74,
60,
796,
410,
13,
8367,
198,
220,
220,
220,
29472,
796,
9977,
4760,
50,
13,
1416,
39055,
62,
22510,
1343,
45302,
17752,
6,
198,
220,
220,
220,
29472,
796,
28686,
13,
6978,
13,
22179,
7,
38948,
50,
13,
49229,
37266,
62,
15908,
11,
29472,
8,
198,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
1069,
1023,
7,
418,
13,
6978,
13,
15908,
3672,
7,
34345,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
76,
4335,
17062,
7,
418,
13,
6978,
13,
15908,
3672,
7,
34345,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
440,
5188,
81,
1472,
355,
2859,
25,
220,
1303,
4932,
1028,
3234,
4006,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2859,
13,
8056,
3919,
14512,
11454,
3919,
13,
36,
6369,
8808,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
198,
220,
220,
220,
351,
1280,
7,
34345,
11,
705,
86,
3256,
21004,
11639,
40477,
12,
23,
11537,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
33918,
13,
39455,
7,
33152,
62,
11600,
11,
277,
11,
33793,
28,
19,
8,
628,
198,
4299,
13446,
62,
12102,
341,
7,
27979,
3262,
11,
1188,
62,
7890,
11,
9977,
4760,
50,
11,
264,
408,
11,
36835,
11,
5591,
11,
2604,
28,
25101,
11,
15284,
62,
40684,
62,
22019,
1158,
28,
25101,
2599,
198,
220,
220,
220,
37227,
26439,
12632,
262,
2746,
319,
262,
21201,
900,
198,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11022,
3262,
25,
23534,
7934,
2746,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1188,
62,
7890,
25,
21201,
1366,
8633,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9977,
4760,
50,
25,
309,
22854,
37535,
9701,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
408,
25,
309,
22854,
37535,
6246,
287,
543,
262,
3047,
373,
1057,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36835,
25,
1459,
36835,
286,
3047,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5591,
25,
1459,
5591,
286,
509,
12,
11379,
3272,
12,
12102,
341,
198,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
62,
26675,
25,
6824,
13326,
376,
16,
4776,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8198,
17816,
69,
16,
6,
5974,
10852,
12591,
376,
16,
4776,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2124,
62,
660,
796,
1188,
62,
7890,
17816,
87,
62,
2100,
20520,
198,
220,
220,
220,
13439,
62,
13664,
62,
660,
796,
1188,
62,
7890,
17816,
34086,
3007,
62,
11925,
62,
2100,
20520,
198,
220,
220,
220,
331,
62,
600,
658,
62,
660,
796,
1188,
62,
7890,
17816,
88,
62,
600,
658,
62,
2100,
20520,
198,
220,
220,
220,
331,
62,
6649,
1747,
62,
660,
796,
1188,
62,
7890,
17816,
88,
62,
6649,
1747,
62,
2100,
20520,
198,
220,
220,
220,
530,
62,
8940,
62,
600,
658,
796,
1188,
62,
7890,
17816,
505,
62,
8940,
62,
600,
658,
62,
2100,
20520,
198,
220,
220,
220,
530,
62,
8940,
62,
6649,
1747,
796,
1188,
62,
7890,
17816,
505,
62,
8940,
62,
6649,
1747,
62,
2100,
20520,
198,
220,
220,
220,
17314,
62,
11600,
796,
1188,
62,
7890,
17816,
6649,
1747,
62,
11600,
20520,
198,
220,
220,
220,
493,
658,
62,
11600,
796,
1188,
62,
7890,
17816,
600,
658,
62,
11600,
20520,
628,
220,
220,
220,
1303,
2896,
500,
309,
22854,
29828,
6260,
198,
220,
220,
220,
611,
2604,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6260,
796,
48700,
13,
49736,
13,
8979,
34379,
7,
38948,
50,
13,
82,
13929,
3166,
62,
15908,
1343,
31051,
6,
1343,
9977,
4760,
50,
13,
1416,
39055,
62,
22510,
1343,
705,
12,
12102,
341,
19355,
1343,
965,
7,
11379,
828,
264,
408,
13,
34960,
8,
198,
220,
220,
220,
611,
15284,
62,
40684,
62,
22019,
1158,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6260,
796,
48700,
13,
49736,
13,
8979,
34379,
7,
38948,
50,
13,
82,
13929,
3166,
62,
15908,
1343,
31051,
6,
1343,
9977,
4760,
50,
13,
1416,
39055,
62,
22510,
1343,
705,
12,
12102,
341,
12,
44601,
3256,
264,
408,
13,
34960,
8,
628,
220,
220,
220,
2472,
62,
48536,
62,
28764,
796,
17635,
198,
220,
220,
220,
2472,
62,
6649,
1747,
62,
28764,
796,
17635,
628,
220,
220,
220,
997,
62,
82,
12629,
796,
18896,
7,
87,
62,
660,
8,
198,
220,
220,
220,
15458,
62,
7857,
796,
9977,
4760,
50,
13,
43501,
62,
7857,
198,
220,
220,
220,
1332,
62,
43501,
796,
493,
7,
11018,
13,
344,
346,
7,
22510,
62,
82,
12629,
1220,
12178,
7,
43501,
62,
7857,
22305,
198,
220,
220,
220,
2994,
62,
2100,
796,
352,
198,
220,
220,
220,
329,
1312,
287,
2837,
7,
9288,
62,
43501,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
2221,
62,
9630,
796,
1312,
1635,
15458,
62,
7857,
198,
220,
220,
220,
220,
220,
220,
220,
886,
62,
9630,
796,
949,
19510,
72,
1343,
352,
8,
1635,
15458,
62,
7857,
11,
997,
62,
82,
12629,
8,
198,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
660,
796,
2124,
62,
660,
58,
27471,
62,
9630,
25,
886,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
34086,
3007,
62,
11925,
796,
13439,
62,
13664,
62,
660,
58,
27471,
62,
9630,
25,
886,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
600,
658,
62,
505,
62,
8940,
796,
530,
62,
8940,
62,
600,
658,
58,
27471,
62,
9630,
25,
886,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
6649,
1747,
62,
505,
62,
8940,
796,
530,
62,
8940,
62,
6649,
1747,
58,
27471,
62,
9630,
25,
886,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
7857,
796,
886,
62,
9630,
532,
2221,
62,
9630,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3497,
16277,
329,
1459,
21201,
15458,
198,
220,
220,
220,
220,
220,
220,
220,
3745,
62,
11600,
796,
1391,
27979,
3262,
13,
15414,
62,
87,
25,
15458,
62,
660,
11,
11022,
3262,
13,
34086,
3007,
62,
13664,
25,
15458,
62,
34086,
3007,
62,
11925,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11022,
3262,
13,
12685,
9043,
62,
600,
658,
25,
15458,
62,
600,
658,
62,
505,
62,
8940,
11,
11022,
3262,
13,
12685,
9043,
62,
6649,
1747,
25,
15458,
62,
6649,
1747,
62,
505,
62,
8940,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11022,
3262,
13,
14894,
62,
1676,
65,
25,
352,
13,
15,
92,
198,
220,
220,
220,
220,
220,
220,
220,
611,
9977,
4760,
50,
13,
1904,
62,
1078,
1463,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
796,
7736,
13,
9948,
3129,
378,
62,
27932,
7,
43501,
62,
34086,
3007,
62,
11925,
11,
9977,
4760,
50,
13,
9806,
62,
34086,
594,
62,
13664,
11,
15458,
62,
7857,
11,
9977,
4760,
50,
13,
81,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3745,
62,
11600,
58,
27979,
3262,
13,
1078,
1463,
62,
27932,
60,
796,
9335,
628,
220,
220,
220,
220,
220,
220,
220,
685,
48536,
62,
22915,
82,
11,
17314,
62,
22915,
82,
11,
10852,
62,
43775,
62,
66,
11,
3272,
62,
298,
28338,
62,
49736,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
10330,
62,
22462,
62,
49736,
11,
2994,
62,
49736,
60,
796,
264,
408,
13,
5143,
26933,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11022,
3262,
13,
48536,
62,
22915,
62,
303,
5217,
11,
11022,
3262,
13,
43384,
62,
22915,
62,
303,
5217,
11,
11022,
3262,
13,
43384,
62,
43775,
62,
66,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11022,
3262,
13,
19692,
62,
298,
28338,
62,
2100,
62,
49736,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11022,
3262,
13,
36153,
62,
22462,
62,
2100,
62,
49736,
11,
11022,
3262,
13,
22462,
62,
2213,
62,
49736,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3745,
62,
11600,
28,
12363,
62,
11600,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2994,
62,
2100,
796,
2994,
62,
49736,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
309,
22854,
29828,
30114,
3166,
284,
9220,
34379,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2604,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
6260,
13,
2860,
62,
49736,
7,
19692,
62,
298,
28338,
62,
49736,
11,
36835,
1635,
1332,
62,
43501,
1343,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
6260,
13,
2860,
62,
49736,
7,
36153,
62,
22462,
62,
49736,
11,
36835,
1635,
1332,
62,
43501,
1343,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
6260,
13,
2860,
62,
49736,
7,
22462,
62,
49736,
11,
36835,
1635,
1332,
62,
43501,
1343,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
13,
2860,
62,
49736,
7,
19692,
62,
298,
28338,
62,
49736,
11,
36835,
1343,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
13,
2860,
62,
49736,
7,
36153,
62,
22462,
62,
49736,
11,
36835,
1343,
1312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
13,
2860,
62,
49736,
7,
22462,
62,
49736,
11,
36835,
1343,
1312,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3401,
1958,
17724,
30104,
15225,
284,
8335,
329,
1822,
9806,
198,
220,
220,
220,
220,
220,
220,
220,
6824,
62,
22915,
82,
62,
445,
19513,
62,
27740,
796,
48700,
13,
16485,
1453,
2736,
7,
48536,
62,
22915,
82,
11,
16488,
41888,
16,
11,
604,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
6824,
62,
22915,
82,
62,
27237,
796,
7736,
13,
21230,
62,
27237,
7,
48536,
62,
22915,
82,
62,
445,
19513,
62,
27740,
8,
198,
220,
220,
220,
220,
220,
220,
220,
10852,
62,
43775,
62,
66,
62,
445,
19513,
62,
27740,
796,
48700,
13,
16485,
1453,
2736,
7,
43384,
62,
43775,
62,
66,
11,
16488,
41888,
18,
11,
604,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
685,
48536,
62,
28764,
9278,
11,
10852,
62,
28764,
9278,
60,
796,
264,
408,
13,
5143,
26933,
48536,
62,
22915,
82,
62,
27237,
11,
10852,
62,
43775,
62,
66,
62,
445,
19513,
62,
27740,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
1835,
3153,
6824,
17724,
198,
220,
220,
220,
220,
220,
220,
220,
573,
62,
43501,
62,
48536,
62,
28764,
796,
45941,
13,
853,
9806,
7,
48536,
62,
28764,
9278,
11,
16488,
28,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
48536,
62,
28764,
15853,
45941,
13,
358,
18747,
13,
83,
349,
396,
7,
660,
62,
43501,
62,
48536,
62,
28764,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
1835,
3153,
17314,
17724,
198,
220,
220,
220,
220,
220,
220,
220,
573,
62,
43501,
62,
6649,
1747,
62,
28764,
796,
45941,
13,
853,
9806,
7,
43384,
62,
28764,
9278,
11,
16488,
28,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
6649,
1747,
62,
28764,
15853,
357,
37659,
13,
358,
18747,
13,
83,
349,
396,
7,
660,
62,
43501,
62,
6649,
1747,
62,
28764,
4008,
628,
220,
220,
220,
611,
15284,
62,
40684,
62,
22019,
1158,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6260,
13,
2860,
62,
49736,
7,
22462,
62,
2100,
11,
5591,
8,
198,
220,
220,
220,
3601,
10786,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
2389,
6234,
25823,
19878,
13775,
10725,
5222,
220,
220,
220,
220,
220,
220,
220,
705,
8,
198,
220,
220,
220,
3601,
10786,
5317,
298,
13326,
11537,
198,
220,
220,
220,
493,
658,
62,
4134,
796,
629,
1134,
270,
62,
4134,
23843,
7,
88,
62,
600,
658,
62,
660,
11,
2472,
62,
48536,
62,
28764,
8,
198,
220,
220,
220,
331,
62,
600,
658,
62,
7942,
796,
45941,
13,
358,
18747,
13,
83,
349,
396,
7,
88,
62,
600,
658,
62,
660,
8,
198,
220,
220,
220,
331,
62,
48536,
62,
23912,
1424,
62,
7942,
796,
685,
600,
658,
62,
11600,
58,
72,
60,
329,
1312,
287,
331,
62,
600,
658,
62,
7942,
60,
198,
220,
220,
220,
331,
62,
48536,
62,
23912,
1424,
62,
28764,
796,
685,
600,
658,
62,
11600,
58,
72,
60,
329,
1312,
287,
2472,
62,
48536,
62,
28764,
60,
198,
220,
220,
220,
493,
658,
796,
23243,
7,
4868,
7,
2617,
7,
88,
62,
48536,
62,
23912,
1424,
62,
7942,
22305,
198,
220,
220,
220,
277,
62,
26675,
796,
629,
1134,
270,
62,
69,
16,
7,
88,
62,
48536,
62,
23912,
1424,
62,
7942,
11,
331,
62,
48536,
62,
23912,
1424,
62,
28764,
11,
2811,
11639,
24055,
3256,
14722,
28,
600,
658,
8,
198,
220,
220,
220,
1303,
3601,
7,
4871,
2649,
62,
13116,
7,
88,
62,
48536,
62,
23912,
1424,
62,
7942,
11,
331,
62,
48536,
62,
23912,
1424,
62,
28764,
11,
19561,
28,
19,
4008,
198,
220,
220,
220,
3601,
10786,
5317,
298,
9922,
4064,
1652,
6,
4064,
493,
658,
62,
4134,
8,
198,
220,
220,
220,
3601,
10786,
37,
4776,
4064,
1652,
6,
4064,
277,
62,
26675,
8,
628,
220,
220,
220,
331,
62,
6649,
1747,
62,
660,
62,
7942,
796,
45941,
13,
358,
18747,
13,
83,
349,
396,
7,
88,
62,
6649,
1747,
62,
660,
8,
198,
220,
220,
220,
331,
62,
43384,
62,
23912,
1424,
62,
7942,
796,
16410,
6649,
1747,
62,
11600,
58,
43384,
62,
312,
87,
60,
329,
10852,
62,
312,
87,
287,
409,
60,
329,
409,
287,
331,
62,
6649,
1747,
62,
660,
62,
7942,
60,
198,
220,
220,
220,
331,
62,
43384,
62,
23912,
1424,
62,
28764,
796,
16410,
6649,
1747,
62,
11600,
58,
43384,
62,
312,
87,
60,
329,
10852,
62,
312,
87,
287,
409,
60,
329,
409,
287,
2472,
62,
6649,
1747,
62,
28764,
60,
198,
220,
220,
220,
8198,
796,
5418,
62,
41068,
62,
1416,
2850,
7,
88,
62,
43384,
62,
23912,
1424,
62,
7942,
11,
331,
62,
43384,
62,
23912,
1424,
62,
28764,
8,
198,
220,
220,
220,
3601,
10786,
38963,
12591,
11537,
198,
220,
220,
220,
3601,
10786,
37,
16,
4776,
25,
4064,
1652,
6,
4064,
8198,
17816,
69,
16,
6,
12962,
198,
220,
220,
220,
3601,
10786,
17320,
23843,
25,
4064,
1652,
6,
4064,
8198,
17816,
4134,
23843,
6,
12962,
198,
220,
220,
220,
1303,
3601,
10786,
6719,
16005,
25,
4064,
1652,
6,
4064,
8198,
17816,
3866,
16005,
6,
12962,
198,
220,
220,
220,
1303,
3601,
10786,
6690,
439,
25,
4064,
1652,
6,
4064,
8198,
17816,
8344,
439,
6,
12962,
628,
220,
220,
220,
1441,
277,
62,
26675,
11,
8198,
17816,
69,
16,
20520,
628,
198,
4299,
5418,
62,
41068,
62,
1416,
2850,
7,
88,
62,
7942,
11,
331,
62,
28764,
2599,
198,
220,
220,
220,
37227,
2448,
23914,
8379,
12660,
319,
10852,
14722,
198,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
62,
7942,
25,
2081,
10852,
14722,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
331,
62,
28764,
25,
11001,
10852,
14722,
198,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8198,
25,
8633,
7268,
262,
12660,
8198,
25,
277,
16,
11,
9922,
11,
15440,
11,
10014,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8198,
796,
8633,
3419,
198,
220,
220,
220,
8198,
17816,
69,
16,
20520,
796,
277,
16,
62,
26675,
7,
88,
62,
7942,
11,
331,
62,
28764,
8,
198,
220,
220,
220,
8198,
17816,
4134,
23843,
20520,
796,
9922,
62,
26675,
7,
88,
62,
7942,
11,
331,
62,
28764,
8,
198,
220,
220,
220,
8198,
17816,
3866,
16005,
20520,
796,
15440,
62,
26675,
7,
88,
62,
7942,
11,
331,
62,
28764,
8,
198,
220,
220,
220,
8198,
17816,
8344,
439,
20520,
796,
10014,
62,
26675,
7,
88,
62,
7942,
11,
331,
62,
28764,
8,
198,
220,
220,
220,
1441,
8198,
628,
198,
4299,
7716,
62,
43501,
7,
77,
11,
15458,
62,
7857,
2599,
198,
220,
220,
220,
37227,
2980,
689,
257,
900,
286,
15458,
36525,
198,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
25,
2472,
1271,
286,
8405,
287,
900,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
7857,
25,
2546,
286,
15458,
198,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
9630,
25,
257,
1351,
286,
4129,
15458,
62,
7857,
7268,
15456,
35846,
36525,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
15458,
62,
9630,
796,
257,
13,
39873,
7,
9521,
7,
77,
828,
15458,
62,
7857,
8,
198,
220,
220,
220,
1441,
15458,
62,
9630,
628,
198,
4299,
8333,
62,
5310,
13363,
62,
4775,
62,
20521,
12083,
7,
82,
408,
11,
11525,
12083,
11,
11022,
3262,
2599,
198,
220,
220,
220,
37227,
2195,
570,
82,
1573,
11525,
67,
654,
284,
262,
23534,
7934,
2746,
198,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
408,
25,
309,
22854,
37535,
6246,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11525,
12083,
25,
7177,
7268,
262,
1573,
11525,
67,
654,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11022,
3262,
25,
23534,
7934,
2746,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3601,
10786,
3500,
662,
12,
35311,
1573,
795,
1765,
6048,
278,
13,
27471,
986,
11537,
198,
220,
220,
220,
1573,
62,
20521,
12083,
62,
5372,
13829,
796,
48700,
13,
5372,
13829,
7,
67,
4906,
28,
27110,
13,
22468,
2624,
11,
5485,
28,
20521,
12083,
13,
43358,
8,
198,
220,
220,
220,
264,
408,
13,
5143,
7,
27979,
3262,
13,
31567,
6048,
278,
13,
562,
570,
7,
4775,
62,
20521,
12083,
62,
5372,
13829,
828,
1391,
4775,
62,
20521,
12083,
62,
5372,
13829,
25,
11525,
12083,
30072,
198,
220,
220,
220,
3601,
10786,
3500,
662,
12,
35311,
1573,
795,
1765,
6048,
278,
13,
1631,
986,
11537,
628,
198,
4299,
4512,
62,
19692,
62,
12102,
341,
7,
19849,
11,
4512,
62,
7890,
11,
1188,
62,
7890,
11,
11525,
12083,
11,
9977,
4760,
50,
11,
5591,
11,
1266,
62,
69,
62,
26675,
11,
37830,
62,
25192,
28,
25101,
11,
2604,
28,
25101,
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,
15284,
62,
40684,
62,
22019,
1158,
28,
25101,
2599,
198,
220,
220,
220,
37227,
833,
1299,
262,
2746,
329,
530,
3272,
12,
12102,
341,
5591,
198,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4512,
62,
7890,
25,
3047,
1366,
22155,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1188,
62,
7890,
25,
21201,
1366,
22155,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11525,
12083,
25,
7177,
7268,
662,
12,
35311,
1573,
11525,
67,
654,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9977,
4760,
50,
25,
309,
22854,
37535,
3586,
9701,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5591,
25,
1459,
5591,
6376,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
25,
1266,
4045,
376,
16,
4776,
357,
330,
1214,
477,
38744,
523,
1290,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37830,
62,
25192,
25,
1771,
284,
4738,
6291,
9927,
37830,
393,
407,
357,
1477,
18137,
1343,
33756,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
25,
19846,
309,
22854,
29828,
32704,
319,
14,
2364,
198,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
25,
1266,
4045,
376,
16,
4776,
357,
330,
1214,
477,
38744,
523,
1290,
11,
1390,
706,
428,
530,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
32604,
62,
11379,
25,
1266,
4045,
376,
16,
4776,
329,
428,
5591,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
48536,
62,
11379,
25,
1266,
6824,
376,
16,
4776,
329,
428,
5591,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
43384,
62,
11379,
25,
1266,
10852,
376,
16,
4776,
329,
428,
5591,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
923,
198,
220,
220,
220,
2124,
62,
27432,
796,
4512,
62,
7890,
17816,
87,
62,
2213,
20520,
198,
220,
220,
220,
13439,
62,
13664,
62,
27432,
796,
4512,
62,
7890,
17816,
34086,
3007,
62,
11925,
62,
2213,
20520,
198,
220,
220,
220,
530,
62,
8940,
62,
600,
658,
62,
27432,
796,
4512,
62,
7890,
17816,
505,
62,
8940,
62,
600,
658,
62,
2213,
20520,
198,
220,
220,
220,
530,
62,
8940,
62,
6649,
1747,
62,
27432,
796,
4512,
62,
7890,
17816,
505,
62,
8940,
62,
6649,
1747,
62,
2213,
20520,
628,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
32604,
62,
11379,
796,
657,
13,
15,
198,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
48536,
62,
11379,
796,
657,
13,
15,
198,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
43384,
62,
11379,
796,
657,
13,
15,
628,
220,
220,
220,
1303,
775,
1276,
13259,
262,
4823,
284,
923,
257,
4508,
649,
3047,
286,
262,
2746,
198,
220,
220,
220,
48700,
13,
42503,
62,
12286,
62,
34960,
3419,
198,
220,
220,
220,
4566,
796,
48700,
13,
16934,
2964,
1462,
3419,
198,
220,
220,
220,
351,
48700,
13,
36044,
7,
11250,
28,
11250,
8,
355,
264,
408,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
24470,
9386,
9104,
198,
220,
220,
220,
220,
220,
220,
220,
11022,
3262,
796,
2746,
7,
38948,
50,
8,
628,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
24243,
2890,
15965,
2977,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
264,
408,
13,
5143,
7,
27110,
13,
20541,
62,
25641,
2977,
62,
36733,
7509,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
611,
9977,
4760,
50,
13,
1904,
62,
20521,
12083,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3440,
662,
12,
35311,
1573,
11525,
12083,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8333,
62,
5310,
13363,
62,
4775,
62,
20521,
12083,
7,
82,
408,
11,
11525,
12083,
11,
11022,
3262,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
20768,
12660,
319,
21201,
900,
198,
220,
220,
220,
220,
220,
220,
220,
6824,
62,
69,
62,
26675,
11,
10852,
62,
69,
62,
26675,
796,
13446,
62,
12102,
341,
7,
27979,
3262,
11,
1188,
62,
7890,
11,
9977,
4760,
50,
11,
264,
408,
11,
36835,
28,
15,
11,
5591,
28,
11379,
8,
198,
220,
220,
220,
220,
220,
220,
220,
277,
62,
26675,
62,
32604,
796,
357,
48536,
62,
69,
62,
26675,
1343,
10852,
62,
69,
62,
26675,
8,
1220,
362,
198,
220,
220,
220,
220,
220,
220,
220,
611,
277,
62,
26675,
62,
32604,
1875,
1266,
62,
69,
62,
26675,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
796,
277,
62,
26675,
62,
32604,
198,
220,
220,
220,
220,
220,
220,
220,
1401,
62,
82,
8770,
796,
48700,
13,
27432,
13,
50,
8770,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
611,
277,
62,
26675,
62,
32604,
1875,
1266,
62,
69,
62,
26675,
62,
32604,
62,
11379,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1266,
1612,
287,
428,
5591,
11,
3613,
8198,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
32604,
62,
11379,
796,
277,
62,
26675,
62,
32604,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
48536,
62,
11379,
796,
6824,
62,
69,
62,
26675,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
43384,
62,
11379,
796,
10852,
62,
69,
62,
26675,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2604,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4512,
62,
16002,
796,
48700,
13,
49736,
13,
8979,
34379,
7,
38948,
50,
13,
82,
13929,
3166,
62,
15908,
1343,
31051,
6,
1343,
9977,
4760,
50,
13,
1416,
39055,
62,
22510,
1343,
705,
12,
27432,
12,
11379,
6,
1343,
965,
7,
11379,
828,
264,
408,
13,
34960,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
13614,
6772,
198,
220,
220,
220,
220,
220,
220,
220,
4512,
62,
39873,
62,
22510,
796,
2124,
62,
27432,
13,
43358,
58,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
22510,
796,
493,
7,
11018,
13,
344,
346,
7,
27432,
62,
39873,
62,
22510,
1220,
9977,
4760,
50,
13,
43501,
62,
7857,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2994,
62,
27432,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
329,
36835,
287,
2837,
7,
38948,
50,
13,
22510,
62,
538,
5374,
82,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
15458,
287,
2837,
7,
43501,
62,
22510,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
37830,
62,
25192,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
9630,
796,
7716,
62,
43501,
7,
27432,
62,
39873,
62,
22510,
11,
9977,
4760,
50,
13,
43501,
62,
7857,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
87,
796,
2124,
62,
27432,
58,
43501,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
34086,
3007,
62,
11925,
796,
13439,
62,
13664,
62,
27432,
58,
43501,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
600,
658,
62,
505,
62,
8940,
796,
530,
62,
8940,
62,
600,
658,
62,
27432,
58,
43501,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
6649,
1747,
62,
505,
62,
8940,
796,
530,
62,
8940,
62,
6649,
1747,
62,
27432,
58,
43501,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
7857,
796,
9977,
4760,
50,
13,
43501,
62,
7857,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
13614,
8405,
389,
1541,
32299,
992,
287,
262,
2393,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2221,
62,
9630,
796,
15458,
1635,
9977,
4760,
50,
13,
43501,
62,
7857,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
62,
9630,
796,
949,
19510,
43501,
1343,
352,
8,
1635,
9977,
4760,
50,
13,
43501,
62,
7857,
11,
4512,
62,
39873,
62,
22510,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
87,
796,
2124,
62,
27432,
58,
27471,
62,
9630,
25,
886,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
34086,
3007,
62,
11925,
796,
13439,
62,
13664,
62,
27432,
58,
27471,
62,
9630,
25,
886,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
600,
658,
62,
505,
62,
8940,
796,
530,
62,
8940,
62,
600,
658,
62,
27432,
58,
27471,
62,
9630,
25,
886,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
6649,
1747,
62,
505,
62,
8940,
796,
530,
62,
8940,
62,
6649,
1747,
62,
27432,
58,
27471,
62,
9630,
25,
886,
62,
9630,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
7857,
796,
886,
62,
9630,
532,
2221,
62,
9630,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3745,
62,
11600,
796,
1391,
27979,
3262,
13,
15414,
62,
87,
25,
15458,
62,
87,
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,
11022,
3262,
13,
12685,
9043,
62,
600,
658,
25,
15458,
62,
600,
658,
62,
505,
62,
8940,
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,
11022,
3262,
13,
12685,
9043,
62,
6649,
1747,
25,
15458,
62,
6649,
1747,
62,
505,
62,
8940,
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,
11022,
3262,
13,
34086,
3007,
62,
13664,
25,
15458,
62,
34086,
3007,
62,
11925,
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,
11022,
3262,
13,
14894,
62,
1676,
65,
25,
9977,
4760,
50,
13,
14894,
62,
1676,
65,
92,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
9977,
4760,
50,
13,
1904,
62,
1078,
1463,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9335,
796,
7736,
13,
9948,
3129,
378,
62,
27932,
7,
43501,
62,
34086,
3007,
62,
11925,
11,
9977,
4760,
50,
13,
9806,
62,
34086,
594,
62,
13664,
11,
15458,
62,
7857,
11,
9977,
4760,
50,
13,
81,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3745,
62,
11600,
58,
27979,
3262,
13,
1078,
1463,
62,
27932,
60,
796,
9335,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
62,
11,
2994,
11,
4808,
11,
4808,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3272,
62,
298,
28338,
62,
49736,
11,
10330,
62,
22462,
62,
49736,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2994,
62,
49736,
60,
796,
264,
408,
13,
5143,
26933,
27979,
3262,
13,
27432,
62,
404,
11,
11022,
3262,
13,
22462,
62,
2100,
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,
11022,
3262,
13,
48536,
62,
22915,
62,
303,
5217,
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,
11022,
3262,
13,
43384,
62,
22915,
62,
303,
5217,
11,
11022,
3262,
13,
19692,
62,
298,
28338,
62,
2213,
62,
49736,
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,
11022,
3262,
13,
36153,
62,
22462,
62,
2213,
62,
49736,
11,
11022,
3262,
13,
22462,
62,
2213,
62,
49736,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3745,
62,
11600,
28,
12363,
62,
11600,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2994,
62,
27432,
796,
2994,
62,
49736,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2604,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4512,
62,
16002,
13,
2860,
62,
49736,
7,
19692,
62,
298,
28338,
62,
49736,
11,
15458,
62,
22510,
1635,
36835,
1343,
15458,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4512,
62,
16002,
13,
2860,
62,
49736,
7,
36153,
62,
22462,
62,
49736,
11,
15458,
62,
22510,
1635,
36835,
1343,
15458,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4512,
62,
16002,
13,
2860,
62,
49736,
7,
22462,
62,
49736,
11,
15458,
62,
22510,
1635,
36835,
1343,
15458,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
1783,
438,
538,
5374,
1058,
46083,
36835,
11,
705,
22014,
25,
46083,
2994,
11,
705,
19351,
438,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
16926,
46,
25,
3785,
503,
257,
517,
7748,
4259,
329,
3376,
36835,
47622,
357,
568,
326,
21201,
290,
3047,
389,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
407,
14869,
11,
290,
340,
991,
2499,
329,
2972,
4512,
14,
12102,
341,
30778,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6824,
62,
69,
62,
26675,
11,
10852,
62,
69,
62,
26675,
796,
13446,
62,
12102,
341,
7,
27979,
3262,
11,
1188,
62,
7890,
11,
9977,
4760,
50,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
264,
408,
11,
36835,
28,
538,
5374,
1343,
352,
11,
5591,
28,
11379,
11,
2604,
28,
6404,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
408,
11,
36835,
28,
43501,
62,
22510,
1635,
36835,
11,
5591,
28,
11379,
11,
2604,
28,
6404,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
62,
26675,
62,
32604,
796,
357,
48536,
62,
69,
62,
26675,
1343,
10852,
62,
69,
62,
26675,
8,
1220,
362,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
277,
62,
26675,
62,
32604,
1875,
1266,
62,
69,
62,
26675,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1266,
4776,
4045,
4613,
3613,
2746,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
796,
277,
62,
26675,
62,
32604,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
9977,
4760,
50,
13,
1416,
39055,
62,
22510,
14512,
10148,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
74,
457,
62,
15908,
796,
9977,
4760,
50,
13,
694,
457,
62,
15908,
1343,
705,
1416,
39055,
6,
1343,
9977,
4760,
50,
13,
1416,
39055,
62,
22510,
1343,
31051,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
1069,
1023,
7,
694,
457,
62,
15908,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
76,
4335,
17062,
7,
694,
457,
62,
15908,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
74,
457,
62,
15908,
796,
9977,
4760,
50,
13,
694,
457,
62,
15908,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1401,
62,
82,
8770,
13,
21928,
7,
82,
408,
11,
28686,
13,
6978,
13,
22179,
7,
694,
457,
62,
15908,
11,
705,
19849,
13,
694,
457,
33809,
352,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
11297,
376,
4776,
1612,
3256,
277,
62,
26675,
62,
32604,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
13014,
376,
4776,
1612,
3256,
1266,
62,
69,
62,
26675,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
277,
62,
26675,
62,
32604,
1875,
1266,
62,
69,
62,
26675,
62,
32604,
62,
11379,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1266,
1612,
287,
428,
5591,
11,
3613,
8198,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
32604,
62,
11379,
796,
277,
62,
26675,
62,
32604,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
48536,
62,
11379,
796,
6824,
62,
69,
62,
26675,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1266,
62,
69,
62,
26675,
62,
43384,
62,
11379,
796,
10852,
62,
69,
62,
26675,
198,
220,
220,
220,
220,
220,
220,
220,
611,
15284,
62,
40684,
62,
22019,
1158,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4512,
62,
16002,
796,
48700,
13,
49736,
13,
8979,
34379,
7,
38948,
50,
13,
82,
13929,
3166,
62,
15908,
1343,
31051,
6,
1343,
9977,
4760,
50,
13,
1416,
39055,
62,
22510,
1343,
705,
12,
27432,
12,
44601,
3256,
264,
408,
13,
34960,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4512,
62,
16002,
13,
2860,
62,
49736,
7,
22462,
62,
27432,
11,
5591,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6824,
62,
69,
62,
26675,
11,
10852,
62,
69,
62,
26675,
796,
13446,
62,
12102,
341,
7,
27979,
3262,
11,
1188,
62,
7890,
11,
9977,
4760,
50,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
408,
11,
36835,
28,
538,
5374,
1343,
352,
11,
5591,
28,
11379,
11,
2604,
28,
6404,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15284,
62,
40684,
62,
22019,
1158,
28,
17821,
8,
198,
220,
220,
220,
1441,
1266,
62,
69,
62,
26675,
11,
1266,
62,
69,
62,
26675,
62,
32604,
62,
11379,
11,
1266,
62,
69,
62,
26675,
62,
48536,
62,
11379,
11,
1266,
62,
69,
62,
26675,
62,
43384,
62,
11379,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.158271 | 7,266 |
import os
import random
import torch
import pandas as pd
import torchvision.transforms.functional as T_F
from torch.utils.data import Dataset
from PIL import Image
class BehaviorCloneDataset(Dataset):
"""
Behavioral cloning dataset.
I referred to https://pytorch.org/tutorials/beginner/data_loading_tutorial.html
"""
def __init__(self, csv_file, root_dir, transform=None):
"""
Read the csv here and leave the reading of images to __getitem__. This is memory efficient because all images
are not stored in the memory at once but read as required.
:param csv_file: path to the csv file with relative image paths and corresponding control commands, velocity.
:param root_dir: directory with all the images.
:param transform: optional transform to be applied on a sample.
"""
self.driving_records = pd.read_csv(csv_file)
self.root_dir = root_dir
self.transform = transform
self.steer_correction = 0.1
| [
11748,
28686,
198,
11748,
4738,
198,
11748,
28034,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
28034,
10178,
13,
7645,
23914,
13,
45124,
355,
309,
62,
37,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
316,
198,
6738,
350,
4146,
1330,
7412,
628,
198,
4871,
20181,
2601,
505,
27354,
292,
316,
7,
27354,
292,
316,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
38483,
45973,
27039,
13,
198,
220,
220,
220,
314,
6412,
284,
3740,
1378,
9078,
13165,
354,
13,
2398,
14,
83,
44917,
82,
14,
27471,
1008,
14,
7890,
62,
25138,
62,
83,
44917,
13,
6494,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
269,
21370,
62,
7753,
11,
6808,
62,
15908,
11,
6121,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
4149,
262,
269,
21370,
994,
290,
2666,
262,
3555,
286,
4263,
284,
11593,
1136,
9186,
834,
13,
770,
318,
4088,
6942,
780,
477,
4263,
198,
220,
220,
220,
220,
220,
220,
220,
389,
407,
8574,
287,
262,
4088,
379,
1752,
475,
1100,
355,
2672,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
269,
21370,
62,
7753,
25,
3108,
284,
262,
269,
21370,
2393,
351,
3585,
2939,
13532,
290,
11188,
1630,
9729,
11,
15432,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
6808,
62,
15908,
25,
8619,
351,
477,
262,
4263,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
6121,
25,
11902,
6121,
284,
307,
5625,
319,
257,
6291,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
24255,
62,
8344,
3669,
796,
279,
67,
13,
961,
62,
40664,
7,
40664,
62,
7753,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15763,
62,
15908,
796,
6808,
62,
15908,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
35636,
796,
6121,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
4169,
263,
62,
10215,
8243,
796,
657,
13,
16,
198
] | 2.871795 | 351 |
# Generated by Django 1.11.14 on 2018-08-22 09:57
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
1415,
319,
2864,
12,
2919,
12,
1828,
7769,
25,
3553,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.90625 | 32 |
import struct
import array
def mac2str(mac):
"""Converts mac address to string .
Args:
mac: 6 bytes mac address
Returns:
readable string
"""
return '%02x:%02x:%02x:%02x:%02x:%02x'%tuple(int(x) for x in struct.unpack('BBBBBB', mac))
def str2mac(s):
"""Converts string to mac address .
Args:
s: 'xx:xx:xx:xx:xx:xx' format string
Returns:
6 bytes mac address
"""
mac = tuple(int(x,16) for x in s.split(":"))
return struct.pack('BBBBBB', mac[0], mac[1], mac[2], mac[3], mac[4], mac[5])
def checksum(data):
'''Calculate checksum
more about checksum, see http://tools.ietf.org/html/rfc1071
'''
if len(data) & 1:
data = data + '\0'
words = array.array('h', data)
checksum = 0
for word in words:
checksum += (word & 0xffff)
checksum = (checksum >> 16) + (checksum & 0xffff)
checksum = checksum + (checksum >> 16)
return (~checksum) & 0xffff
| [
11748,
2878,
198,
11748,
7177,
198,
198,
4299,
8352,
17,
2536,
7,
20285,
2599,
198,
220,
220,
220,
37227,
3103,
24040,
8352,
2209,
284,
4731,
764,
198,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8352,
25,
718,
9881,
8352,
2209,
198,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31744,
4731,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
705,
4,
2999,
87,
25,
4,
2999,
87,
25,
4,
2999,
87,
25,
4,
2999,
87,
25,
4,
2999,
87,
25,
4,
2999,
87,
6,
4,
83,
29291,
7,
600,
7,
87,
8,
329,
2124,
287,
2878,
13,
403,
8002,
10786,
15199,
15199,
15199,
3256,
8352,
4008,
198,
198,
4299,
965,
17,
20285,
7,
82,
2599,
198,
220,
220,
220,
37227,
3103,
24040,
4731,
284,
8352,
2209,
764,
198,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
25,
705,
5324,
25,
5324,
25,
5324,
25,
5324,
25,
5324,
25,
5324,
6,
5794,
4731,
198,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
718,
9881,
8352,
2209,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8352,
796,
46545,
7,
600,
7,
87,
11,
1433,
8,
329,
2124,
287,
264,
13,
35312,
7,
2404,
4008,
198,
220,
220,
220,
1441,
2878,
13,
8002,
10786,
15199,
15199,
15199,
3256,
8352,
58,
15,
4357,
8352,
58,
16,
4357,
8352,
58,
17,
4357,
8352,
58,
18,
4357,
8352,
58,
19,
4357,
8352,
58,
20,
12962,
628,
198,
220,
220,
220,
198,
4299,
8794,
388,
7,
7890,
2599,
198,
220,
220,
220,
705,
7061,
9771,
3129,
378,
8794,
388,
198,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
517,
546,
8794,
388,
11,
766,
2638,
1378,
31391,
13,
1155,
69,
13,
2398,
14,
6494,
14,
81,
16072,
940,
4869,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
611,
18896,
7,
7890,
8,
1222,
352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
1366,
1343,
705,
59,
15,
6,
198,
220,
220,
220,
2456,
796,
7177,
13,
18747,
10786,
71,
3256,
1366,
8,
198,
220,
220,
220,
8794,
388,
796,
657,
198,
220,
220,
220,
329,
1573,
287,
2456,
25,
198,
220,
220,
220,
220,
220,
220,
220,
8794,
388,
15853,
357,
4775,
1222,
657,
87,
12927,
8,
198,
220,
220,
220,
8794,
388,
796,
357,
42116,
388,
9609,
1467,
8,
1343,
357,
42116,
388,
1222,
657,
87,
12927,
8,
198,
220,
220,
220,
8794,
388,
796,
8794,
388,
1343,
357,
42116,
388,
9609,
1467,
8,
628,
220,
220,
220,
1441,
31034,
42116,
388,
8,
1222,
657,
87,
12927,
198
] | 2.01711 | 526 |
#!/usr/bin/env python
#coding=utf-8
"""
moveit_ik_demo.py - Version 0.1 2014-01-14
Use inverse kinemtatics to move the end effector to a specified pose
Created for the Pi Robot Project: http://www.pirobot.org
Copyleft (c) 2014 Patrick Goebel. All lefts reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.5
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details at:
http://www.gnu.org/licenses/gpl.html
"""
from sqlalchemy import false
import rospy, sys
import moveit_commander
import os
#print('Hello,'+os.environ.get('ROS_MASTER_URI')+'!')
#import moveit_commander
import tf
import argparse
import math
import numpy as np
from math import pi
import time
import copy
from moveit_msgs.msg import RobotTrajectory,DisplayTrajectory
from trajectory_msgs.msg import JointTrajectoryPoint
from threading import Lock, Event
from franka_msgs.srv import SetCartesianImpedance, \
SetCartesianImpedanceRequest, \
SetCartesianImpedanceResponse
from controller_manager_msgs.srv import SwitchController,SwitchControllerRequest,SwitchControllerResponse
import actionlib
from geometry_msgs.msg import PoseStamped, Pose
from tf.transformations import euler_from_quaternion, quaternion_from_euler,quaternion_multiply,quaternion_from_matrix,quaternion_matrix
#from autolab_core import RigidTransform,transformations
#from pyquaternion import Quaternion
from gpg.msg import GraspConfig,GraspConfigList
from franka_gripper.msg import GraspAction, GraspGoal
from franka_gripper.msg import GraspEpsilon
#解析命令行参数
parser = argparse.ArgumentParser(description='Panda go grasp')
parser.add_argument('--test',type=int, default=0) #设置同时处理几个场景
parameters,unknow =parser.parse_known_args()
if __name__ == "__main__":
try:
MoveItDemo()
rospy.spin()
except rospy.ROSInterruptException:
rospy.loginfo("Arm tracker node terminated.")
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
66,
7656,
28,
40477,
12,
23,
198,
37811,
198,
220,
220,
220,
1445,
270,
62,
1134,
62,
9536,
78,
13,
9078,
532,
10628,
657,
13,
16,
1946,
12,
486,
12,
1415,
198,
220,
220,
220,
5765,
34062,
479,
7749,
83,
23372,
284,
1445,
262,
886,
1245,
273,
284,
257,
7368,
12705,
198,
220,
220,
220,
220,
198,
220,
220,
220,
15622,
329,
262,
13993,
16071,
4935,
25,
2638,
1378,
2503,
13,
79,
7058,
13645,
13,
2398,
198,
220,
220,
220,
6955,
2349,
701,
357,
66,
8,
1946,
9925,
1514,
1765,
417,
13,
220,
1439,
1364,
82,
10395,
13,
628,
220,
220,
220,
770,
1430,
318,
1479,
3788,
26,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
198,
220,
220,
220,
340,
739,
262,
2846,
286,
262,
22961,
3611,
5094,
13789,
355,
3199,
416,
198,
220,
220,
220,
262,
3232,
10442,
5693,
26,
2035,
2196,
362,
286,
262,
13789,
11,
393,
198,
220,
220,
220,
357,
265,
534,
3038,
8,
597,
1568,
2196,
13,
20,
198,
220,
220,
220,
220,
198,
220,
220,
220,
770,
1430,
318,
9387,
287,
262,
2911,
326,
340,
481,
307,
4465,
11,
198,
220,
220,
220,
475,
42881,
15529,
34764,
56,
26,
1231,
772,
262,
17142,
18215,
286,
198,
220,
220,
220,
34482,
3398,
1565,
5603,
25382,
393,
376,
46144,
7473,
317,
16652,
2149,
37232,
33079,
48933,
13,
220,
4091,
262,
198,
220,
220,
220,
22961,
3611,
5094,
13789,
329,
517,
3307,
379,
25,
198,
220,
220,
220,
220,
198,
220,
220,
220,
2638,
1378,
2503,
13,
41791,
13,
2398,
14,
677,
4541,
14,
70,
489,
13,
6494,
198,
37811,
198,
198,
6738,
44161,
282,
26599,
1330,
3991,
198,
11748,
686,
2777,
88,
11,
25064,
198,
11748,
1445,
270,
62,
9503,
4066,
198,
11748,
28686,
198,
2,
4798,
10786,
15496,
4032,
10,
418,
13,
268,
2268,
13,
1136,
10786,
49,
2640,
62,
31180,
5781,
62,
47269,
11537,
10,
6,
0,
11537,
198,
2,
11748,
1445,
270,
62,
9503,
4066,
198,
11748,
48700,
198,
11748,
1822,
29572,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
10688,
1330,
31028,
198,
11748,
640,
198,
11748,
4866,
198,
6738,
1445,
270,
62,
907,
14542,
13,
19662,
1330,
16071,
15721,
752,
652,
11,
23114,
15721,
752,
652,
198,
6738,
22942,
62,
907,
14542,
13,
19662,
1330,
16798,
15721,
752,
652,
12727,
198,
6738,
4704,
278,
1330,
13656,
11,
8558,
198,
198,
6738,
14346,
64,
62,
907,
14542,
13,
27891,
85,
1330,
5345,
43476,
35610,
26950,
276,
590,
11,
3467,
198,
220,
220,
220,
5345,
43476,
35610,
26950,
276,
590,
18453,
11,
3467,
198,
220,
220,
220,
5345,
43476,
35610,
26950,
276,
590,
31077,
198,
198,
6738,
10444,
62,
37153,
62,
907,
14542,
13,
27891,
85,
1330,
14645,
22130,
11,
38978,
22130,
18453,
11,
38978,
22130,
31077,
198,
198,
11748,
2223,
8019,
198,
6738,
22939,
62,
907,
14542,
13,
19662,
1330,
37557,
1273,
13322,
11,
37557,
198,
6738,
48700,
13,
35636,
602,
1330,
304,
18173,
62,
6738,
62,
421,
9205,
295,
11,
627,
9205,
295,
62,
6738,
62,
68,
18173,
11,
421,
9205,
295,
62,
16680,
541,
306,
11,
421,
9205,
295,
62,
6738,
62,
6759,
8609,
11,
421,
9205,
295,
62,
6759,
8609,
198,
2,
6738,
1960,
349,
397,
62,
7295,
1330,
24666,
312,
41762,
11,
35636,
602,
198,
2,
6738,
12972,
421,
9205,
295,
1330,
2264,
9205,
295,
198,
6738,
308,
6024,
13,
19662,
1330,
1902,
5126,
16934,
11,
8642,
5126,
16934,
8053,
198,
6738,
14346,
64,
62,
70,
380,
2848,
13,
19662,
1330,
1902,
5126,
12502,
11,
1902,
5126,
49045,
198,
6738,
14346,
64,
62,
70,
380,
2848,
13,
19662,
1330,
1902,
5126,
36,
862,
33576,
198,
2,
164,
100,
96,
162,
252,
238,
37772,
121,
20015,
97,
26193,
234,
20998,
224,
46763,
108,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
11639,
47,
5282,
467,
13180,
11537,
198,
48610,
13,
2860,
62,
49140,
10786,
438,
9288,
3256,
4906,
28,
600,
11,
4277,
28,
15,
8,
220,
1303,
164,
106,
122,
163,
121,
106,
28938,
234,
33768,
114,
13783,
226,
49426,
228,
49035,
254,
10310,
103,
28839,
118,
162,
247,
107,
198,
17143,
7307,
11,
2954,
2197,
796,
48610,
13,
29572,
62,
4002,
62,
22046,
3419,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
10028,
1026,
11522,
78,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
686,
2777,
88,
13,
39706,
3419,
198,
220,
220,
220,
2845,
686,
2777,
88,
13,
49,
2640,
9492,
3622,
16922,
25,
198,
220,
220,
220,
220,
220,
220,
220,
686,
2777,
88,
13,
6404,
10951,
7203,
26560,
30013,
10139,
23083,
19570,
628,
220,
220,
220,
220,
198,
220,
220,
220,
220
] | 2.893216 | 796 |
"""
OpenNEM primary schema adapted to support multiple energy sources
Currently supported:
- NEM
- WEM
"""
from decimal import Decimal
from typing import Optional
from dictalchemy import DictableModel
from geoalchemy2 import Geometry
from shapely import wkb
from sqlalchemy import (
JSON,
Boolean,
Column,
Date,
DateTime,
Enum,
ForeignKey,
Index,
Integer,
LargeBinary,
Numeric,
Sequence,
Text,
func,
text,
)
from sqlalchemy.dialects.postgresql import TIMESTAMP
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy.orm import relationship
from opennem.core.dispatch_type import DispatchType
from opennem.core.oid import get_ocode, get_oid
Base = declarative_base(cls=DictableModel)
metadata = Base.metadata
class BaseModel(object):
"""
Base model for both NEM and WEM
"""
created_by = Column(Text, nullable=True)
# updated_by = Column(Text, nullable=True)
# processed_at = Column(DateTime(timezone=True), nullable=True)
created_at = Column(DateTime(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())
class FacilityScada(Base, BaseModel):
"""
Facility Scada
"""
__tablename__ = "facility_scada"
__table_args__ = (
Index(
"idx_facility_scada_trading_interval_year",
text("date_trunc('year', trading_interval AT TIME ZONE 'UTC')"),
),
Index(
"idx_facility_scada_trading_interval_month",
text("date_trunc('month', trading_interval AT TIME ZONE 'UTC')"),
),
Index(
"idx_facility_scada_trading_interval_day",
text("date_trunc('day', trading_interval AT TIME ZONE 'UTC')"),
),
Index(
"idx_facility_scada_trading_interval_hour",
text("date_trunc('hour', trading_interval AT TIME ZONE 'UTC')"),
),
# new timezone based indicies
# @NOTE: other indicies in migration files
)
network_id = Column(
Text,
ForeignKey("network.code", name="fk_balancing_summary_network_code"),
primary_key=True,
)
network = relationship("Network")
trading_interval = Column(
TIMESTAMP(timezone=True), index=True, primary_key=True
)
facility_code = Column(Text, nullable=False, primary_key=True, index=True)
generated = Column(Numeric, nullable=True)
eoi_quantity = Column(Numeric, nullable=True)
| [
37811,
198,
220,
220,
220,
4946,
45,
3620,
4165,
32815,
16573,
284,
1104,
3294,
2568,
4237,
628,
220,
220,
220,
16888,
4855,
25,
628,
220,
220,
220,
532,
399,
3620,
198,
220,
220,
220,
532,
370,
3620,
198,
37811,
198,
198,
6738,
32465,
1330,
4280,
4402,
198,
6738,
19720,
1330,
32233,
198,
198,
6738,
8633,
282,
26599,
1330,
360,
713,
540,
17633,
198,
6738,
40087,
282,
26599,
17,
1330,
2269,
15748,
198,
6738,
5485,
306,
1330,
266,
32812,
198,
6738,
44161,
282,
26599,
1330,
357,
198,
220,
220,
220,
19449,
11,
198,
220,
220,
220,
41146,
11,
198,
220,
220,
220,
29201,
11,
198,
220,
220,
220,
7536,
11,
198,
220,
220,
220,
7536,
7575,
11,
198,
220,
220,
220,
2039,
388,
11,
198,
220,
220,
220,
8708,
9218,
11,
198,
220,
220,
220,
12901,
11,
198,
220,
220,
220,
34142,
11,
198,
220,
220,
220,
13601,
33,
3219,
11,
198,
220,
220,
220,
399,
39223,
11,
198,
220,
220,
220,
45835,
11,
198,
220,
220,
220,
8255,
11,
198,
220,
220,
220,
25439,
11,
198,
220,
220,
220,
2420,
11,
198,
8,
198,
6738,
44161,
282,
26599,
13,
38969,
478,
82,
13,
7353,
34239,
13976,
1330,
31742,
6465,
23518,
198,
6738,
44161,
282,
26599,
13,
2302,
13,
32446,
283,
876,
1330,
2377,
283,
876,
62,
8692,
198,
6738,
44161,
282,
26599,
13,
2302,
13,
12114,
10236,
1330,
14554,
62,
26745,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
2776,
198,
198,
6738,
1280,
77,
368,
13,
7295,
13,
6381,
17147,
62,
4906,
1330,
35934,
6030,
198,
6738,
1280,
77,
368,
13,
7295,
13,
1868,
1330,
651,
62,
420,
1098,
11,
651,
62,
1868,
198,
198,
14881,
796,
2377,
283,
876,
62,
8692,
7,
565,
82,
28,
35,
713,
540,
17633,
8,
198,
38993,
796,
7308,
13,
38993,
628,
198,
4871,
7308,
17633,
7,
15252,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
7308,
2746,
329,
1111,
399,
3620,
290,
370,
3620,
628,
220,
220,
220,
37227,
628,
220,
220,
220,
2727,
62,
1525,
796,
29201,
7,
8206,
11,
9242,
540,
28,
17821,
8,
198,
220,
220,
220,
1303,
6153,
62,
1525,
796,
29201,
7,
8206,
11,
9242,
540,
28,
17821,
8,
198,
220,
220,
220,
1303,
13686,
62,
265,
796,
29201,
7,
10430,
7575,
7,
2435,
11340,
28,
17821,
828,
9242,
540,
28,
17821,
8,
198,
220,
220,
220,
2727,
62,
265,
796,
29201,
7,
10430,
7575,
7,
2435,
11340,
28,
17821,
828,
4382,
62,
12286,
28,
20786,
13,
2197,
28955,
198,
220,
220,
220,
6153,
62,
265,
796,
29201,
7,
10430,
7575,
7,
2435,
11340,
28,
17821,
828,
319,
19119,
28,
20786,
13,
2197,
28955,
628,
628,
628,
628,
628,
628,
628,
198,
198,
4871,
29118,
3351,
4763,
7,
14881,
11,
7308,
17633,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
29118,
1446,
4763,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
11593,
8658,
11925,
480,
834,
796,
366,
38942,
879,
62,
1416,
4763,
1,
628,
220,
220,
220,
11593,
11487,
62,
22046,
834,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
12901,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
312,
87,
62,
38942,
879,
62,
1416,
4763,
62,
2213,
4980,
62,
3849,
2100,
62,
1941,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
7203,
4475,
62,
2213,
19524,
10786,
1941,
3256,
7313,
62,
3849,
2100,
5161,
20460,
1168,
11651,
705,
17429,
11537,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
220,
220,
220,
220,
12901,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
312,
87,
62,
38942,
879,
62,
1416,
4763,
62,
2213,
4980,
62,
3849,
2100,
62,
8424,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
7203,
4475,
62,
2213,
19524,
10786,
8424,
3256,
7313,
62,
3849,
2100,
5161,
20460,
1168,
11651,
705,
17429,
11537,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
220,
220,
220,
220,
12901,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
312,
87,
62,
38942,
879,
62,
1416,
4763,
62,
2213,
4980,
62,
3849,
2100,
62,
820,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
7203,
4475,
62,
2213,
19524,
10786,
820,
3256,
7313,
62,
3849,
2100,
5161,
20460,
1168,
11651,
705,
17429,
11537,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
220,
220,
220,
220,
12901,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
312,
87,
62,
38942,
879,
62,
1416,
4763,
62,
2213,
4980,
62,
3849,
2100,
62,
9769,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
7203,
4475,
62,
2213,
19524,
10786,
9769,
3256,
7313,
62,
3849,
2100,
5161,
20460,
1168,
11651,
705,
17429,
11537,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
649,
640,
11340,
1912,
2699,
444,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2488,
16580,
25,
584,
2699,
444,
287,
13472,
3696,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
3127,
62,
312,
796,
29201,
7,
198,
220,
220,
220,
220,
220,
220,
220,
8255,
11,
198,
220,
220,
220,
220,
220,
220,
220,
8708,
9218,
7203,
27349,
13,
8189,
1600,
1438,
2625,
69,
74,
62,
6893,
5077,
62,
49736,
62,
27349,
62,
8189,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
4165,
62,
2539,
28,
17821,
11,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
3127,
796,
2776,
7203,
26245,
4943,
628,
220,
220,
220,
7313,
62,
3849,
2100,
796,
29201,
7,
198,
220,
220,
220,
220,
220,
220,
220,
31742,
6465,
23518,
7,
2435,
11340,
28,
17821,
828,
6376,
28,
17821,
11,
4165,
62,
2539,
28,
17821,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
6841,
62,
8189,
796,
29201,
7,
8206,
11,
9242,
540,
28,
25101,
11,
4165,
62,
2539,
28,
17821,
11,
6376,
28,
17821,
8,
198,
220,
220,
220,
7560,
796,
29201,
7,
45,
39223,
11,
9242,
540,
28,
17821,
8,
198,
220,
220,
220,
304,
23013,
62,
40972,
414,
796,
29201,
7,
45,
39223,
11,
9242,
540,
28,
17821,
8,
628,
198
] | 2.449153 | 1,062 |
name = 'data_service'
| [
3672,
796,
705,
7890,
62,
15271,
6,
198
] | 2.75 | 8 |
# -*- coding: UTF-8 -*-
# This file is forked from Piracast (July 2014): https://github.com/codemonkeyricky/piracast
#
import re
import time
from util import get_stdout
cmd_killall_wpa_spplicant = 'killall wpa_supplicant'
cmd_killall_hostapd = 'killall hostapd'
cmd_iwlist_wlan0_scan = 'iwlist wlan0 scan'
# -----------------------
# p2p_enable
# Enable wifi direct
# -----------------------
# -----------------------
# p2p_peer_devaddr_get
# Gets peer device address
# -----------------------
# -----------------------
# p2p_req_cm_get
# Gets supported authentication type
# -----------------------
| [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
198,
2,
220,
220,
220,
220,
770,
2393,
318,
329,
9091,
422,
10334,
330,
459,
357,
16157,
1946,
2599,
3740,
1378,
12567,
13,
785,
14,
19815,
7966,
365,
2417,
17479,
14,
4063,
330,
459,
198,
2,
198,
198,
11748,
302,
198,
11748,
640,
198,
198,
6738,
7736,
1330,
651,
62,
19282,
448,
198,
198,
28758,
62,
12728,
439,
62,
86,
8957,
62,
82,
381,
677,
415,
220,
220,
796,
705,
12728,
439,
266,
8957,
62,
18608,
677,
415,
6,
198,
28758,
62,
12728,
439,
62,
4774,
499,
67,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
12728,
439,
2583,
499,
67,
6,
198,
28758,
62,
14246,
4868,
62,
86,
9620,
15,
62,
35836,
220,
220,
220,
220,
220,
220,
796,
705,
14246,
4868,
266,
9620,
15,
9367,
6,
198,
198,
2,
41436,
6329,
198,
2,
279,
17,
79,
62,
21633,
198,
2,
220,
220,
27882,
43121,
1277,
198,
2,
41436,
6329,
198,
198,
2,
41436,
6329,
198,
2,
279,
17,
79,
62,
33350,
62,
7959,
29851,
62,
1136,
198,
2,
220,
220,
29620,
12720,
3335,
2209,
198,
2,
41436,
6329,
198,
198,
2,
41436,
6329,
198,
2,
279,
17,
79,
62,
42180,
62,
11215,
62,
1136,
198,
2,
220,
220,
29620,
4855,
18239,
2099,
198,
2,
41436,
6329,
628
] | 2.830357 | 224 |
from pyramid.response import Response
from pyramid.view import view_config
# from ..sample_data import MOCK_DATA
from sqlalchemy.exc import DBAPIError, IntegrityError
from pyramid.httpexceptions import HTTPFound, HTTPNotFound, HTTPUnauthorized, HTTPBadRequest
from pyramid.security import NO_PERMISSION_REQUIRED, remember, forget
from pyramid.response import Response
from ..models import Account
from . import DB_ERR_MSG
import requests
@view_config(route_name='auth', renderer='../templates/auth.jinja2', permission=NO_PERMISSION_REQUIRED)
@view_config(route_name='logout') | [
6738,
27944,
13,
26209,
1330,
18261,
198,
6738,
27944,
13,
1177,
1330,
1570,
62,
11250,
198,
2,
422,
11485,
39873,
62,
7890,
1330,
337,
11290,
62,
26947,
198,
6738,
44161,
282,
26599,
13,
41194,
1330,
20137,
17614,
12331,
11,
39348,
12331,
198,
6738,
27944,
13,
2804,
24900,
11755,
1330,
14626,
21077,
11,
14626,
3673,
21077,
11,
7154,
51,
5105,
2616,
1457,
1143,
11,
14626,
22069,
18453,
198,
6738,
27944,
13,
12961,
1330,
8005,
62,
18973,
44,
40373,
62,
2200,
10917,
37819,
11,
3505,
11,
6044,
198,
6738,
27944,
13,
26209,
1330,
18261,
198,
6738,
11485,
27530,
1330,
10781,
198,
6738,
764,
1330,
20137,
62,
1137,
49,
62,
5653,
38,
198,
11748,
7007,
628,
198,
198,
31,
1177,
62,
11250,
7,
38629,
62,
3672,
11639,
18439,
3256,
9851,
11882,
11639,
40720,
11498,
17041,
14,
18439,
13,
18594,
6592,
17,
3256,
7170,
28,
15285,
62,
18973,
44,
40373,
62,
2200,
10917,
37819,
8,
628,
198,
31,
1177,
62,
11250,
7,
38629,
62,
3672,
11639,
6404,
448,
11537
] | 3.515152 | 165 |
from typing import Union, Sized
import numpy as np
import torch
from torch.utils.data import Sampler
from utils.command_line_logger import CommandLineLogger
class InfiniteSampler(Sampler):
"""
InfiniteSampler Class:
Sampler for torch.utils.data.DataLoader that loops over the dataset indefinitely, shuffling items as it goes.
Source: https://github.com/NVlabs/stylegan2-ada-pytorch/blob/main/torch_utils/misc.py
"""
class ResumableRandomSampler(Sampler):
"""
ResumableRandomSampler Class:
Samples elements randomly. If without replacement, then sample from a shuffled dataset.
Original source: https://gist.github.com/usamec/1b3b4dcbafad2d58faa71a9633eea6a5
"""
def __init__(self, data_source: Sized, shuffle: bool = True, seed: int = 42,
logger: Union[CommandLineLogger, None] = None):
"""
ResumableRandomSampler class constructor.
generator (Generator): Generator used in sampling.
:param (Sized) data_source: torch.utils.data.Dataset or generally typings.Sized object of the dataset to draw
samples from
:param (int) seed: generator manual seed parameter
:param (optional) logger: CommandLineLogger instance
"""
super(ResumableRandomSampler, self).__init__(data_source=data_source)
self.n_samples = len(data_source)
self.generator = torch.Generator().manual_seed(seed)
self.shuffle = shuffle
self.perm_index = 0
if self.shuffle:
self.perm = None
self.reshuffle()
else:
self.perm = range(0, self.n_samples)
self.logger = logger
assert self.logger is not None, 'Please provide a logger instance for ResumableRandomSampler'
| [
6738,
19720,
1330,
4479,
11,
311,
1143,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
3409,
20053,
198,
198,
6738,
3384,
4487,
13,
21812,
62,
1370,
62,
6404,
1362,
1330,
9455,
13949,
11187,
1362,
628,
198,
4871,
22380,
16305,
20053,
7,
16305,
20053,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
22380,
16305,
20053,
5016,
25,
198,
220,
220,
220,
3409,
20053,
329,
28034,
13,
26791,
13,
7890,
13,
6601,
17401,
326,
23607,
625,
262,
27039,
24391,
11,
32299,
1359,
3709,
355,
340,
2925,
13,
198,
220,
220,
220,
8090,
25,
3740,
1378,
12567,
13,
785,
14,
27159,
75,
8937,
14,
7635,
1030,
17,
12,
4763,
12,
9078,
13165,
354,
14,
2436,
672,
14,
12417,
14,
13165,
354,
62,
26791,
14,
44374,
13,
9078,
198,
220,
220,
220,
37227,
628,
198,
4871,
1874,
388,
540,
29531,
16305,
20053,
7,
16305,
20053,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1874,
388,
540,
29531,
16305,
20053,
5016,
25,
198,
220,
220,
220,
3409,
2374,
4847,
15456,
13,
1002,
1231,
9014,
11,
788,
6291,
422,
257,
32299,
992,
27039,
13,
198,
220,
220,
220,
13745,
2723,
25,
3740,
1378,
70,
396,
13,
12567,
13,
785,
14,
385,
480,
66,
14,
16,
65,
18,
65,
19,
17896,
65,
1878,
324,
17,
67,
3365,
69,
7252,
4869,
64,
4846,
2091,
1453,
64,
21,
64,
20,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
1366,
62,
10459,
25,
311,
1143,
11,
36273,
25,
20512,
796,
6407,
11,
9403,
25,
493,
796,
5433,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
25,
4479,
58,
21575,
13949,
11187,
1362,
11,
6045,
60,
796,
6045,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1874,
388,
540,
29531,
16305,
20053,
1398,
23772,
13,
198,
220,
220,
220,
220,
220,
220,
220,
17301,
357,
8645,
1352,
2599,
35986,
973,
287,
19232,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
357,
50,
1143,
8,
1366,
62,
10459,
25,
28034,
13,
26791,
13,
7890,
13,
27354,
292,
316,
393,
4143,
2170,
654,
13,
50,
1143,
2134,
286,
262,
27039,
284,
3197,
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,
8405,
422,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
357,
600,
8,
9403,
25,
17301,
10107,
9403,
11507,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
357,
25968,
8,
49706,
25,
9455,
13949,
11187,
1362,
4554,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2208,
7,
4965,
388,
540,
29531,
16305,
20053,
11,
2116,
737,
834,
15003,
834,
7,
7890,
62,
10459,
28,
7890,
62,
10459,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
77,
62,
82,
12629,
796,
18896,
7,
7890,
62,
10459,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
8612,
1352,
796,
28034,
13,
8645,
1352,
22446,
805,
723,
62,
28826,
7,
28826,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1477,
18137,
796,
36273,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
16321,
62,
9630,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
1477,
18137,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
16321,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3447,
18137,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
16321,
796,
2837,
7,
15,
11,
2116,
13,
77,
62,
82,
12629,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
796,
49706,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
2116,
13,
6404,
1362,
318,
407,
6045,
11,
705,
5492,
2148,
257,
49706,
4554,
329,
1874,
388,
540,
29531,
16305,
20053,
6,
198
] | 2.535311 | 708 |
import abc
import importlib
import json
import os
import sys
from typing import Union, Callable, Any
from primehub.utils import group_required, create_logger, PrimeHubException
from primehub.utils.core import CommandContainer
from primehub.utils.decorators import cmd # noqa: F401
from primehub.utils.display import Display, HumanFriendlyDisplay, Displayable
from primehub.utils.http_client import Client
logger = create_logger('primehub-config')
__version__ = _get_version()
class PrimeHubConfig(object):
"""
PrimeHubConfig load the config from the default path ~/.primehub/config.json
The config.json looks like:
{
"endpoint": ""
"api-token": "",
"group": {
"id": "",
"name": "",
"displayName": "",
}
}
PrimeHubConfig allows changing setting from four ways:
* the default config path
* alternative path for the config file (config argument from constructor)
* environment variables: PRIMEHUB_API_TOKEN, PRIMEHUB_API_ENDPOINT and PRIMEHUB_GROUP
* set property for api_token, endpoint and group
PrimeHubConfig evaluates a property in the above order and the last updates take effect
"""
def save(self, path=None):
"""
The config.json looks like:
{
"endpoint": ""
"api-token": "",
"group": {
"id": "",
"name": "",
"displayName": "",
}
}
"""
output = dict()
output['endpoint'] = self.endpoint
output['api-token'] = self.api_token
if self.group_info and self.group_info.get('name', None) == self.group:
output['group'] = self.group_info
else:
output['group'] = dict(name=self.group)
output_path = os.path.expanduser(path or self.config_file)
if os.path.dirname(output_path):
os.makedirs(os.path.dirname(output_path), exist_ok=True)
with open(output_path, "w") as fh:
fh.write(json.dumps(output, indent=2, sort_keys=True))
@property
@group.setter
@property
@api_token.setter
@property
@endpoint.setter
@property
@current_group.setter
class Dummy(Helpful, Module):
"""
Dummy subcommand
"""
description = None
def has_data_from_stdin():
"""
Check if any data comes from stdin.
:return: True if there are data from stdin, otherwise False
"""
import sys
import select
if select.select([sys.stdin, ], [], [], 0.0)[0]:
return True
else:
return False
| [
11748,
450,
66,
198,
11748,
1330,
8019,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
25064,
198,
6738,
19720,
1330,
4479,
11,
4889,
540,
11,
4377,
198,
198,
6738,
6994,
40140,
13,
26791,
1330,
1448,
62,
35827,
11,
2251,
62,
6404,
1362,
11,
5537,
16066,
16922,
198,
6738,
6994,
40140,
13,
26791,
13,
7295,
1330,
9455,
29869,
198,
6738,
6994,
40140,
13,
26791,
13,
12501,
273,
2024,
1330,
23991,
220,
1303,
645,
20402,
25,
376,
21844,
198,
6738,
6994,
40140,
13,
26791,
13,
13812,
1330,
16531,
11,
5524,
23331,
306,
23114,
11,
16531,
540,
198,
6738,
6994,
40140,
13,
26791,
13,
4023,
62,
16366,
1330,
20985,
198,
198,
6404,
1362,
796,
2251,
62,
6404,
1362,
10786,
35505,
40140,
12,
11250,
11537,
628,
198,
198,
834,
9641,
834,
796,
4808,
1136,
62,
9641,
3419,
628,
198,
4871,
5537,
16066,
16934,
7,
15252,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5537,
16066,
16934,
3440,
262,
4566,
422,
262,
4277,
3108,
39763,
35505,
40140,
14,
11250,
13,
17752,
628,
220,
220,
220,
383,
4566,
13,
17752,
3073,
588,
25,
198,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
366,
437,
4122,
1298,
13538,
198,
220,
220,
220,
220,
220,
220,
366,
15042,
12,
30001,
1298,
366,
1600,
198,
220,
220,
220,
220,
220,
220,
366,
8094,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
312,
1298,
366,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3672,
1298,
366,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
13812,
5376,
1298,
366,
1600,
198,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
1782,
628,
220,
220,
220,
5537,
16066,
16934,
3578,
5609,
4634,
422,
1440,
2842,
25,
198,
220,
220,
220,
1635,
262,
4277,
4566,
3108,
198,
220,
220,
220,
1635,
5559,
3108,
329,
262,
4566,
2393,
357,
11250,
4578,
422,
23772,
8,
198,
220,
220,
220,
1635,
2858,
9633,
25,
4810,
12789,
39,
10526,
62,
17614,
62,
10468,
43959,
11,
4810,
12789,
39,
10526,
62,
17614,
62,
1677,
6322,
46,
12394,
290,
4810,
12789,
39,
10526,
62,
46846,
198,
220,
220,
220,
1635,
900,
3119,
329,
40391,
62,
30001,
11,
36123,
290,
1448,
628,
220,
220,
220,
5537,
16066,
16934,
47850,
257,
3119,
287,
262,
2029,
1502,
290,
262,
938,
5992,
1011,
1245,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
3613,
7,
944,
11,
3108,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
383,
4566,
13,
17752,
3073,
588,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
437,
4122,
1298,
13538,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15042,
12,
30001,
1298,
366,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8094,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
312,
1298,
366,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3672,
1298,
366,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
13812,
5376,
1298,
366,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
5072,
796,
8633,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
5072,
17816,
437,
4122,
20520,
796,
2116,
13,
437,
4122,
198,
220,
220,
220,
220,
220,
220,
220,
5072,
17816,
15042,
12,
30001,
20520,
796,
2116,
13,
15042,
62,
30001,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
8094,
62,
10951,
290,
2116,
13,
8094,
62,
10951,
13,
1136,
10786,
3672,
3256,
6045,
8,
6624,
2116,
13,
8094,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5072,
17816,
8094,
20520,
796,
2116,
13,
8094,
62,
10951,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5072,
17816,
8094,
20520,
796,
8633,
7,
3672,
28,
944,
13,
8094,
8,
628,
220,
220,
220,
220,
220,
220,
220,
5072,
62,
6978,
796,
28686,
13,
6978,
13,
11201,
392,
7220,
7,
6978,
393,
2116,
13,
11250,
62,
7753,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
28686,
13,
6978,
13,
15908,
3672,
7,
22915,
62,
6978,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
76,
4335,
17062,
7,
418,
13,
6978,
13,
15908,
3672,
7,
22915,
62,
6978,
828,
2152,
62,
482,
28,
17821,
8,
198,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
22915,
62,
6978,
11,
366,
86,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
71,
13,
13564,
7,
17752,
13,
67,
8142,
7,
22915,
11,
33793,
28,
17,
11,
3297,
62,
13083,
28,
17821,
4008,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
2488,
8094,
13,
2617,
353,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
2488,
15042,
62,
30001,
13,
2617,
353,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
2488,
437,
4122,
13,
2617,
353,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
2488,
14421,
62,
8094,
13,
2617,
353,
628,
628,
198,
198,
4871,
360,
13513,
7,
22087,
913,
11,
19937,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
360,
13513,
850,
21812,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6764,
796,
6045,
628,
198,
4299,
468,
62,
7890,
62,
6738,
62,
19282,
259,
33529,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6822,
611,
597,
1366,
2058,
422,
14367,
259,
13,
628,
220,
220,
220,
1058,
7783,
25,
6407,
611,
612,
389,
1366,
422,
14367,
259,
11,
4306,
10352,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1330,
25064,
198,
220,
220,
220,
1330,
2922,
628,
220,
220,
220,
611,
2922,
13,
19738,
26933,
17597,
13,
19282,
259,
11,
16589,
685,
4357,
685,
4357,
657,
13,
15,
38381,
15,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
6407,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628
] | 2.428041 | 1,077 |
"""
The protocol for the werewolf game
"""
import os
import socket
import sys
from .api import ChunckedData, ReceiveThread, _recv, TimeLock, KillableThread, ReadInput
| [
37811,
198,
464,
8435,
329,
262,
547,
18829,
983,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
17802,
198,
11748,
25064,
198,
6738,
764,
15042,
1330,
40958,
694,
276,
6601,
11,
797,
15164,
16818,
11,
4808,
8344,
85,
11,
3862,
25392,
11,
12265,
540,
16818,
11,
4149,
20560,
198
] | 3.428571 | 49 |
# -*- coding: utf-8 -*-
"""Main module."""
import json
import logging
# this only works with post-19.7.1 gunicorn to pull in commit 610596c9
# which logs separate format and args
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
13383,
8265,
526,
15931,
198,
11748,
33918,
198,
11748,
18931,
628,
198,
2,
428,
691,
2499,
351,
1281,
12,
1129,
13,
22,
13,
16,
2485,
291,
1211,
284,
2834,
287,
4589,
44300,
45734,
66,
24,
198,
2,
543,
17259,
4553,
5794,
290,
26498,
198
] | 3.033333 | 60 |
from rest_framework_extensions.routers import NestedRegistryItem
from posthog.api.routing import DefaultRouterPlusPlus
from .api import hooks, license
| [
6738,
1334,
62,
30604,
62,
2302,
5736,
13,
472,
1010,
1330,
399,
7287,
8081,
4592,
7449,
198,
198,
6738,
1281,
31897,
13,
15042,
13,
81,
13660,
1330,
15161,
49,
39605,
17860,
17860,
198,
198,
6738,
764,
15042,
1330,
26569,
11,
5964,
628
] | 3.666667 | 42 |
# -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# 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.
#
# @@license_version:1.7@@
import logging
import time
from collections import defaultdict
from datetime import datetime
from influxdb import InfluxDBClient
from influxdb.resultset import ResultSet
from typing import List, Dict
from rogerthat.consts import DEBUG, DAY
from rogerthat.models.news import NewsItemAction, NewsItem
from rogerthat.models.properties.news import NewsItemStatistics
from rogerthat.settings import get_server_settings
from rogerthat.to.news import NewsItemBasicStatisticsTO, NewsItemTimeStatisticsTO, NewsItemBasicStatisticTO, \
NewsItemTimeValueTO, NewsItemStatisticsPerApp, NewsItemStatisticApp
from rogerthat.utils import now
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
12131,
3469,
6916,
15664,
23973,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
2,
198,
2,
25248,
43085,
62,
9641,
25,
16,
13,
22,
12404,
198,
198,
11748,
18931,
198,
11748,
640,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
25065,
9945,
1330,
4806,
22564,
11012,
11792,
198,
6738,
25065,
9945,
13,
20274,
2617,
1330,
25414,
7248,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
198,
198,
6738,
686,
1362,
5562,
13,
1102,
6448,
1330,
16959,
11,
24644,
198,
6738,
686,
1362,
5562,
13,
27530,
13,
10827,
1330,
3000,
7449,
12502,
11,
3000,
7449,
198,
6738,
686,
1362,
5562,
13,
27530,
13,
48310,
13,
10827,
1330,
3000,
7449,
48346,
198,
6738,
686,
1362,
5562,
13,
33692,
1330,
651,
62,
15388,
62,
33692,
198,
6738,
686,
1362,
5562,
13,
1462,
13,
10827,
1330,
3000,
7449,
26416,
48346,
10468,
11,
3000,
7449,
7575,
48346,
10468,
11,
3000,
7449,
26416,
17126,
2569,
10468,
11,
3467,
198,
220,
220,
220,
3000,
7449,
7575,
11395,
10468,
11,
3000,
7449,
48346,
5990,
4677,
11,
3000,
7449,
17126,
2569,
4677,
198,
6738,
686,
1362,
5562,
13,
26791,
1330,
783,
628,
628,
628,
628,
198
] | 3.696532 | 346 |
from __future__ import unicode_literals
import frappe | [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
11748,
5306,
27768
] | 3.785714 | 14 |
# coding=utf-8
import requests
import getpass
from requests.auth import HTTPBasicAuth
import xml.etree.ElementTree as ET
API_URL = "Place vCD URL Here" #Cloud API URL ending in /api/
EDGE_NAME = 'Place Edge Name Here' #Edge Gateway Name
SYSLOG_IP = 'Place Syslog IP Here' #IP of syslog server
USERNAME = 'Place Username Here' #Username@orgname E.g: [email protected]@org
PASSWORD = 'Place Password Here' #Password
if __name__ == '__main__':
main()
| [
2,
19617,
28,
40477,
12,
23,
198,
11748,
7007,
198,
11748,
651,
6603,
198,
6738,
7007,
13,
18439,
1330,
14626,
26416,
30515,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
628,
198,
17614,
62,
21886,
796,
366,
27271,
410,
8610,
10289,
3423,
1,
1303,
18839,
7824,
10289,
7464,
287,
1220,
15042,
14,
198,
1961,
8264,
62,
20608,
796,
705,
27271,
13113,
6530,
3423,
6,
1303,
37021,
29916,
6530,
198,
23060,
8634,
7730,
62,
4061,
796,
705,
27271,
311,
893,
6404,
6101,
3423,
6,
1303,
4061,
286,
25064,
6404,
4382,
198,
29904,
20608,
796,
705,
27271,
50069,
3423,
6,
1303,
5842,
13292,
31,
2398,
3672,
412,
13,
70,
25,
3053,
31,
27830,
13,
785,
31,
2398,
198,
47924,
54,
12532,
796,
705,
27271,
30275,
3423,
6,
1303,
35215,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 3.04698 | 149 |
# Installed python3-praw, geany and ffmpeg from debian
# and others from pip
# Made a Reddit account, set up an application and added its client id and secret
# made a white noise video named noise.mkv and downloaded 3 pieces of music as music{0-1}.mp3
import praw
from PIL import Image, ImageDraw, ImageFont
import urllib.request
import sys
import os
from io import BytesIO
import random
import subprocess
from gtts import gTTS
DEBUG_IMAGES_CREATE=False
DEBUG_AUDIOS_CREATE=False
DEBUG_VIDEO_CREATE_TRY2=False
DEBUG_VIDEO_COMPILATION_CREATE=False
DEBUG_VIDEO_MUSIC_ADD=False
DEBUG_VIDEO_COMPILATION_CREATE_2=True
if DEBUG_IMAGES_CREATE==True:
file_path = 'reddits.txt'
sys.stdout = open(file_path, "w")
reddit = praw.Reddit(client_id='', client_secret='', user_agent='')
acc=0 #FOR SAVED IMAGE NUMBERING
best_posts_linuxmemes = reddit.subreddit('linuxmemes').hot(limit=60)
for post in best_posts_linuxmemes:
if post.selftext == '' and post.stickied==False and (post.url.endswith(".png") or post.url.endswith(".jpg") or post.url.endswith(".jpeg") or post.url.endswith(".gif")):
urllib.request.urlretrieve(post.url, "tmpimage")
try:
img = Image.open("tmpimage")
except:
continue
wid, hgt = img.size
newimg = Image.new(img.mode, (wid, hgt + (hgt//20)),(0,0,0))
newimg.paste(img, (0,0))
d1=ImageDraw.Draw(newimg)
font = ImageFont.truetype('/usr/share/fonts/truetype/freefont/FreeSans.ttf',hgt//40)
post.title=post.title.replace('"','')
post.title=post.title.replace("'",'')
post.title=post.title.replace('--','')
print(post.title + ' by '+post.author.name)
if len(post.title)>20:
post.title=post.title[0:20]+'...'
d1.text((10,(hgt + hgt//50)),post.title+' - u/'+post.author.name+' - '+post.subreddit.display_name,fill="white",font=font)
newimg.save('video'+str(acc)+'.png')
acc+=1
if DEBUG_AUDIOS_CREATE==True:
dirlist = os.listdir()
f=open("reddits.txt","r")
lines=f.readlines()
vidcount=0
for i in dirlist:
if i.startswith("video"):
vidcount+=1
for i in range(vidcount):
#os.system('espeak -s 120 -w audio'+str(i)+'.waw \''+lines[i]+'\'')
mytext=lines[i]
gts=gTTS(text=mytext,lang='en',slow=False)
gts.save('audio'+str(i)+'.wav')
if DEBUG_VIDEO_CREATE_TRY2==True:
dirlist = os.listdir()
vidcount=0
clips=[]
for i in dirlist:
if i.startswith("video"):
vidcount+=1
for i in range(vidcount):
os.system('ffmpeg -stream_loop -1 -i video'+str(i)+'.png -i audio'+str(i)+'.wav -vf "tpad=stop_mode=clone:stop_duration=7,scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1:color=black" -shortest out'+str(i)+'.mkv')
#ffmpeg -i input -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1:color=black" output
if DEBUG_VIDEO_COMPILATION_CREATE==True:
sys.stdout = open("vids.txt", "w")
dirlist = os.listdir()
for i in dirlist:
if i.startswith("out"):
print('file '+i)
print('file noise.mkv')
print('file outro.mkv')
subprocess.Popen('ffmpeg -f concat -i vids.txt -c copy nomusic.mkv',shell=True)
if DEBUG_VIDEO_COMPILATION_CREATE_2==True:
dirlist = os.listdir()
#inputs=''
acc=0
#filterstring=''
for i in dirlist:
if i.startswith("out"):
# inputs=inputs+' -i '+i+' -i noise.mkv'
acc+=1
#inputs=inputs+' -i outro.mkv'
tmp=0
remaining=0
print(acc,'acc')
sets=acc//5
if acc//5<acc/5:
remaining=acc%5
print(sets,'sets')
print(remaining,'remaining')
for i in range(sets):
inputs='-i out'+str(i*5)+'.mkv -i noise.mkv -i out'+str(i*5+1)+'.mkv -i noise.mkv -i out'+str(i*5+2)+'.mkv -i noise.mkv -i out'+str(i*5+3)+'.mkv -i noise.mkv -i out'+str(i*5+4)+'.mkv -i noise.mkv'
print('ffmpeg '+inputs+' -filter_complex "[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] [3:v] [3:a] [4:v] [4:a] [5:v] [5:a] [6:v] [6:a] [7:v] [7:a] [8:v] [8:a] [9:v] [9:a] concat=n=10:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" nomusic-set'+str(i)+'.mkv')
os.system('ffmpeg '+inputs+' -filter_complex "[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] [3:v] [3:a] [4:v] [4:a] [5:v] [5:a] [6:v] [6:a] [7:v] [7:a] [8:v] [8:a] [9:v] [9:a] concat=n=10:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" nomusic-set'+str(i)+'.mkv')
inputs=''
filterstring=''
for i in range(remaining-1):
inputs += '-i out'+str(sets*5+i)+'.mkv -i noise.mkv '
filterstring+='['+str(i)+':v] ['+str(i)+':a] '
filterstring+='['+str(remaining-1+i)+':v] ['+str(remaining-1+i)+':a] '
#os.system('ffmpeg '+inputs+' -filter_complex "'+filterstring+'concat=n='+str(2*(remaining-1))+':v=1:a=1 [v] [a]" -map "[v]" -map "[a]" nomusic-remaining.mkv')
print('ffmpeg '+inputs+' -filter_complex "'+filterstring+'concat=n='+str(2*(remaining-1))+':v=1:a=1 [v] [a]" -map "[v]" -map "[a]" nomusic-remaining.mkv')
#for i in range(acc//5):
# filterstring+='['+str(i)+':v] ['+str(i)+':a] '
#print('ffmpeg'+inputs+' -filter_complex "'+filterstring+'concat=n='+str(i)+':v=1:a=1 [v] [a]" -map "[v]" -map "[a]" nomusic.mkv')
#os.system('ffmpeg'+inputs+' -filter_complex "'+filterstring+'concat=n='+str(i)+':v=1:a=1 [v] [a]" -map "[v]" -map "[a]" nomusic'+str(tmp)+'.mkv')
if DEBUG_VIDEO_MUSIC_ADD==True:
musicno=random.randint(0,2)
subprocess.Popen('ffmpeg -i nomusic.mp4 -stream_loop -1 -i music'+str(musicno)+'.mp3 -filter_complex "[1:a]volume=0.15,apad[A];[0:a][A]amerge[out]" -shortest -c:v copy -map 0:v -map [out] -y finale.mkv',shell=True)
| [
2,
2262,
4262,
21015,
18,
12,
79,
1831,
11,
4903,
1092,
290,
31246,
43913,
422,
50001,
198,
2,
290,
1854,
422,
7347,
198,
2,
14446,
257,
10750,
1848,
11,
900,
510,
281,
3586,
290,
2087,
663,
5456,
4686,
290,
3200,
198,
2,
925,
257,
2330,
7838,
2008,
3706,
7838,
13,
28015,
85,
290,
15680,
513,
5207,
286,
2647,
355,
2647,
90,
15,
12,
16,
27422,
3149,
18,
198,
198,
11748,
279,
1831,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
25302,
11,
7412,
23252,
198,
11748,
2956,
297,
571,
13,
25927,
198,
11748,
25064,
198,
11748,
28686,
198,
6738,
33245,
1330,
2750,
4879,
9399,
198,
11748,
4738,
198,
11748,
850,
14681,
198,
6738,
308,
83,
912,
1330,
308,
51,
4694,
198,
198,
30531,
62,
3955,
25552,
62,
43387,
6158,
28,
25101,
198,
30531,
62,
48877,
40,
2640,
62,
43387,
6158,
28,
25101,
198,
30531,
62,
42937,
62,
43387,
6158,
62,
40405,
17,
28,
25101,
198,
30531,
62,
42937,
62,
9858,
47,
4146,
6234,
62,
43387,
6158,
28,
25101,
198,
30531,
62,
42937,
62,
44,
2937,
2149,
62,
29266,
28,
25101,
198,
30531,
62,
42937,
62,
9858,
47,
4146,
6234,
62,
43387,
6158,
62,
17,
28,
17821,
198,
198,
361,
16959,
62,
3955,
25552,
62,
43387,
6158,
855,
17821,
25,
198,
197,
7753,
62,
6978,
796,
705,
36581,
13,
14116,
6,
198,
197,
17597,
13,
19282,
448,
796,
1280,
7,
7753,
62,
6978,
11,
366,
86,
4943,
628,
197,
10748,
796,
279,
1831,
13,
22367,
7,
16366,
62,
312,
11639,
3256,
5456,
62,
21078,
11639,
3256,
2836,
62,
25781,
28,
7061,
8,
628,
197,
4134,
28,
15,
1303,
13775,
311,
10116,
1961,
8959,
11879,
36871,
13246,
2751,
198,
197,
13466,
62,
24875,
62,
23289,
11883,
274,
796,
18374,
13,
7266,
10748,
10786,
23289,
11883,
274,
27691,
8940,
7,
32374,
28,
1899,
8,
198,
197,
1640,
1281,
287,
1266,
62,
24875,
62,
23289,
11883,
274,
25,
198,
197,
197,
361,
1281,
13,
944,
5239,
6624,
10148,
290,
1281,
13,
13915,
798,
855,
25101,
290,
357,
7353,
13,
6371,
13,
437,
2032,
342,
7,
1911,
11134,
4943,
393,
1281,
13,
6371,
13,
437,
2032,
342,
7,
1911,
9479,
4943,
393,
1281,
13,
6371,
13,
437,
2032,
342,
7,
1911,
73,
22071,
4943,
393,
1281,
13,
6371,
13,
437,
2032,
342,
7,
1911,
27908,
4943,
2599,
198,
197,
197,
197,
333,
297,
571,
13,
25927,
13,
6371,
1186,
30227,
7,
7353,
13,
6371,
11,
366,
22065,
9060,
4943,
198,
197,
197,
197,
28311,
25,
198,
197,
197,
197,
197,
9600,
796,
7412,
13,
9654,
7203,
22065,
9060,
4943,
198,
197,
197,
197,
16341,
25,
198,
197,
197,
197,
197,
43043,
198,
197,
197,
197,
28029,
11,
289,
13655,
796,
33705,
13,
7857,
198,
197,
197,
197,
3605,
9600,
796,
7412,
13,
3605,
7,
9600,
13,
14171,
11,
357,
28029,
11,
289,
13655,
1343,
357,
71,
13655,
1003,
1238,
36911,
7,
15,
11,
15,
11,
15,
4008,
198,
197,
197,
197,
3605,
9600,
13,
34274,
7,
9600,
11,
357,
15,
11,
15,
4008,
198,
197,
197,
197,
67,
16,
28,
5159,
25302,
13,
25302,
7,
3605,
9600,
8,
198,
197,
197,
197,
10331,
796,
7412,
23252,
13,
83,
622,
2963,
431,
10786,
14,
14629,
14,
20077,
14,
10331,
82,
14,
83,
622,
2963,
431,
14,
5787,
10331,
14,
11146,
50,
504,
13,
926,
69,
3256,
71,
13655,
1003,
1821,
8,
198,
197,
197,
197,
7353,
13,
7839,
28,
7353,
13,
7839,
13,
33491,
10786,
1,
3256,
7061,
8,
198,
197,
197,
197,
7353,
13,
7839,
28,
7353,
13,
7839,
13,
33491,
7203,
6,
1600,
7061,
8,
198,
197,
197,
197,
7353,
13,
7839,
28,
7353,
13,
7839,
13,
33491,
10786,
438,
3256,
7061,
8,
198,
197,
197,
197,
4798,
7,
7353,
13,
7839,
1343,
705,
416,
705,
10,
7353,
13,
9800,
13,
3672,
8,
198,
197,
197,
197,
361,
18896,
7,
7353,
13,
7839,
8,
29,
1238,
25,
198,
197,
197,
197,
197,
7353,
13,
7839,
28,
7353,
13,
7839,
58,
15,
25,
1238,
48688,
6,
986,
6,
198,
197,
197,
197,
67,
16,
13,
5239,
19510,
940,
11,
7,
71,
13655,
1343,
289,
13655,
1003,
1120,
36911,
7353,
13,
7839,
10,
6,
532,
334,
14,
6,
10,
7353,
13,
9800,
13,
3672,
10,
6,
532,
705,
10,
7353,
13,
7266,
10748,
13,
13812,
62,
3672,
11,
20797,
2625,
11186,
1600,
10331,
28,
10331,
8,
198,
197,
197,
197,
3605,
9600,
13,
21928,
10786,
15588,
6,
10,
2536,
7,
4134,
47762,
4458,
11134,
11537,
198,
197,
197,
197,
4134,
47932,
16,
198,
198,
361,
16959,
62,
48877,
40,
2640,
62,
43387,
6158,
855,
17821,
25,
198,
197,
67,
1901,
396,
796,
28686,
13,
4868,
15908,
3419,
198,
197,
69,
28,
9654,
7203,
36581,
13,
14116,
2430,
81,
4943,
198,
197,
6615,
28,
69,
13,
961,
6615,
3419,
198,
197,
16921,
9127,
28,
15,
198,
197,
1640,
1312,
287,
288,
1901,
396,
25,
198,
197,
197,
361,
1312,
13,
9688,
2032,
342,
7203,
15588,
1,
2599,
198,
197,
197,
197,
16921,
9127,
47932,
16,
198,
197,
1640,
1312,
287,
2837,
7,
16921,
9127,
2599,
198,
197,
197,
197,
2,
418,
13,
10057,
10786,
274,
36729,
532,
82,
7982,
532,
86,
6597,
6,
10,
2536,
7,
72,
47762,
4458,
86,
707,
3467,
7061,
10,
6615,
58,
72,
48688,
6,
59,
7061,
8,
198,
197,
197,
197,
1820,
5239,
28,
6615,
58,
72,
60,
198,
197,
197,
197,
70,
912,
28,
70,
51,
4694,
7,
5239,
28,
1820,
5239,
11,
17204,
11639,
268,
3256,
38246,
28,
25101,
8,
198,
197,
197,
197,
70,
912,
13,
21928,
10786,
24051,
6,
10,
2536,
7,
72,
47762,
4458,
45137,
11537,
198,
361,
16959,
62,
42937,
62,
43387,
6158,
62,
40405,
17,
855,
17821,
25,
198,
197,
67,
1901,
396,
796,
28686,
13,
4868,
15908,
3419,
198,
197,
16921,
9127,
28,
15,
198,
197,
31945,
28,
21737,
198,
197,
1640,
1312,
287,
288,
1901,
396,
25,
198,
197,
197,
361,
1312,
13,
9688,
2032,
342,
7203,
15588,
1,
2599,
198,
197,
197,
197,
16921,
9127,
47932,
16,
198,
197,
1640,
1312,
287,
2837,
7,
16921,
9127,
2599,
198,
197,
197,
418,
13,
10057,
10786,
487,
43913,
532,
5532,
62,
26268,
532,
16,
532,
72,
2008,
6,
10,
2536,
7,
72,
47762,
4458,
11134,
532,
72,
6597,
6,
10,
2536,
7,
72,
47762,
4458,
45137,
532,
85,
69,
366,
83,
15636,
28,
11338,
62,
14171,
28,
21018,
25,
11338,
62,
32257,
28,
22,
11,
9888,
28,
1065,
1795,
25,
23906,
25,
3174,
62,
14986,
62,
292,
806,
62,
10366,
952,
28,
12501,
260,
589,
11,
15636,
28,
1065,
1795,
25,
23906,
21912,
16,
21912,
16,
25,
8043,
28,
13424,
1,
532,
19509,
395,
503,
6,
10,
2536,
7,
72,
47762,
4458,
28015,
85,
11537,
198,
197,
197,
2,
487,
43913,
532,
72,
5128,
532,
85,
69,
366,
9888,
28,
1065,
1795,
25,
23906,
25,
3174,
62,
14986,
62,
292,
806,
62,
10366,
952,
28,
12501,
260,
589,
11,
15636,
28,
1065,
1795,
25,
23906,
21912,
16,
21912,
16,
25,
8043,
28,
13424,
1,
5072,
198,
361,
16959,
62,
42937,
62,
9858,
47,
4146,
6234,
62,
43387,
6158,
855,
17821,
25,
198,
197,
17597,
13,
19282,
448,
796,
1280,
7203,
85,
2340,
13,
14116,
1600,
366,
86,
4943,
198,
197,
67,
1901,
396,
796,
28686,
13,
4868,
15908,
3419,
198,
197,
1640,
1312,
287,
288,
1901,
396,
25,
198,
197,
197,
361,
1312,
13,
9688,
2032,
342,
7203,
448,
1,
2599,
198,
197,
197,
197,
4798,
10786,
7753,
705,
10,
72,
8,
198,
197,
197,
197,
4798,
10786,
7753,
7838,
13,
28015,
85,
11537,
198,
197,
4798,
10786,
7753,
503,
305,
13,
28015,
85,
11537,
198,
197,
7266,
14681,
13,
47,
9654,
10786,
487,
43913,
532,
69,
1673,
265,
532,
72,
410,
2340,
13,
14116,
532,
66,
4866,
4515,
385,
291,
13,
28015,
85,
3256,
29149,
28,
17821,
8,
198,
198,
361,
16959,
62,
42937,
62,
9858,
47,
4146,
6234,
62,
43387,
6158,
62,
17,
855,
17821,
25,
198,
197,
67,
1901,
396,
796,
28686,
13,
4868,
15908,
3419,
198,
197,
2,
15414,
82,
28,
7061,
198,
197,
4134,
28,
15,
198,
197,
2,
24455,
8841,
28,
7061,
198,
197,
1640,
1312,
287,
288,
1901,
396,
25,
198,
197,
197,
361,
1312,
13,
9688,
2032,
342,
7203,
448,
1,
2599,
198,
197,
2,
197,
197,
15414,
82,
28,
15414,
82,
10,
6,
532,
72,
705,
10,
72,
10,
6,
532,
72,
7838,
13,
28015,
85,
6,
198,
197,
197,
197,
4134,
47932,
16,
198,
197,
2,
15414,
82,
28,
15414,
82,
10,
6,
532,
72,
503,
305,
13,
28015,
85,
6,
198,
197,
22065,
28,
15,
198,
197,
2787,
1397,
28,
15,
198,
197,
4798,
7,
4134,
4032,
4134,
11537,
198,
197,
28709,
28,
4134,
1003,
20,
198,
197,
361,
697,
1003,
20,
27,
4134,
14,
20,
25,
198,
197,
197,
2787,
1397,
28,
4134,
4,
20,
198,
197,
4798,
7,
28709,
4032,
28709,
11537,
198,
197,
4798,
7,
2787,
1397,
4032,
2787,
1397,
11537,
198,
197,
1640,
1312,
287,
2837,
7,
28709,
2599,
198,
197,
197,
15414,
82,
11639,
12,
72,
503,
6,
10,
2536,
7,
72,
9,
20,
47762,
4458,
28015,
85,
532,
72,
7838,
13,
28015,
85,
532,
72,
503,
6,
10,
2536,
7,
72,
9,
20,
10,
16,
47762,
4458,
28015,
85,
532,
72,
7838,
13,
28015,
85,
532,
72,
503,
6,
10,
2536,
7,
72,
9,
20,
10,
17,
47762,
4458,
28015,
85,
532,
72,
7838,
13,
28015,
85,
532,
72,
503,
6,
10,
2536,
7,
72,
9,
20,
10,
18,
47762,
4458,
28015,
85,
532,
72,
7838,
13,
28015,
85,
532,
72,
503,
6,
10,
2536,
7,
72,
9,
20,
10,
19,
47762,
4458,
28015,
85,
532,
72,
7838,
13,
28015,
85,
6,
198,
197,
197,
4798,
10786,
487,
43913,
705,
10,
15414,
82,
10,
6,
532,
24455,
62,
41887,
12878,
15,
25,
85,
60,
685,
15,
25,
64,
60,
685,
16,
25,
85,
60,
685,
16,
25,
64,
60,
685,
17,
25,
85,
60,
685,
17,
25,
64,
60,
685,
18,
25,
85,
60,
685,
18,
25,
64,
60,
685,
19,
25,
85,
60,
685,
19,
25,
64,
60,
685,
20,
25,
85,
60,
685,
20,
25,
64,
60,
685,
21,
25,
85,
60,
685,
21,
25,
64,
60,
685,
22,
25,
85,
60,
685,
22,
25,
64,
60,
685,
23,
25,
85,
60,
685,
23,
25,
64,
60,
685,
24,
25,
85,
60,
685,
24,
25,
64,
60,
1673,
265,
28,
77,
28,
940,
25,
85,
28,
16,
25,
64,
28,
16,
685,
85,
60,
685,
64,
30866,
532,
8899,
12878,
85,
30866,
532,
8899,
12878,
64,
30866,
4515,
385,
291,
12,
2617,
6,
10,
2536,
7,
72,
47762,
4458,
28015,
85,
11537,
198,
197,
197,
418,
13,
10057,
10786,
487,
43913,
705,
10,
15414,
82,
10,
6,
532,
24455,
62,
41887,
12878,
15,
25,
85,
60,
685,
15,
25,
64,
60,
685,
16,
25,
85,
60,
685,
16,
25,
64,
60,
685,
17,
25,
85,
60,
685,
17,
25,
64,
60,
685,
18,
25,
85,
60,
685,
18,
25,
64,
60,
685,
19,
25,
85,
60,
685,
19,
25,
64,
60,
685,
20,
25,
85,
60,
685,
20,
25,
64,
60,
685,
21,
25,
85,
60,
685,
21,
25,
64,
60,
685,
22,
25,
85,
60,
685,
22,
25,
64,
60,
685,
23,
25,
85,
60,
685,
23,
25,
64,
60,
685,
24,
25,
85,
60,
685,
24,
25,
64,
60,
1673,
265,
28,
77,
28,
940,
25,
85,
28,
16,
25,
64,
28,
16,
685,
85,
60,
685,
64,
30866,
532,
8899,
12878,
85,
30866,
532,
8899,
12878,
64,
30866,
4515,
385,
291,
12,
2617,
6,
10,
2536,
7,
72,
47762,
4458,
28015,
85,
11537,
198,
197,
15414,
82,
28,
7061,
198,
197,
24455,
8841,
28,
7061,
198,
197,
1640,
1312,
287,
2837,
7,
2787,
1397,
12,
16,
2599,
198,
197,
197,
15414,
82,
15853,
705,
12,
72,
503,
6,
10,
2536,
7,
28709,
9,
20,
10,
72,
47762,
4458,
28015,
85,
532,
72,
7838,
13,
28015,
85,
705,
198,
197,
197,
24455,
8841,
10,
11639,
17816,
10,
2536,
7,
72,
47762,
10354,
85,
60,
37250,
10,
2536,
7,
72,
47762,
10354,
64,
60,
705,
198,
197,
197,
24455,
8841,
10,
11639,
17816,
10,
2536,
7,
2787,
1397,
12,
16,
10,
72,
47762,
10354,
85,
60,
37250,
10,
2536,
7,
2787,
1397,
12,
16,
10,
72,
47762,
10354,
64,
60,
705,
198,
197,
2,
418,
13,
10057,
10786,
487,
43913,
705,
10,
15414,
82,
10,
6,
532,
24455,
62,
41887,
24018,
10,
24455,
8841,
10,
6,
1102,
9246,
28,
77,
11639,
10,
2536,
7,
17,
9,
7,
2787,
1397,
12,
16,
4008,
10,
10354,
85,
28,
16,
25,
64,
28,
16,
685,
85,
60,
685,
64,
30866,
532,
8899,
12878,
85,
30866,
532,
8899,
12878,
64,
30866,
4515,
385,
291,
12,
2787,
1397,
13,
28015,
85,
11537,
198,
197,
4798,
10786,
487,
43913,
705,
10,
15414,
82,
10,
6,
532,
24455,
62,
41887,
24018,
10,
24455,
8841,
10,
6,
1102,
9246,
28,
77,
11639,
10,
2536,
7,
17,
9,
7,
2787,
1397,
12,
16,
4008,
10,
10354,
85,
28,
16,
25,
64,
28,
16,
685,
85,
60,
685,
64,
30866,
532,
8899,
12878,
85,
30866,
532,
8899,
12878,
64,
30866,
4515,
385,
291,
12,
2787,
1397,
13,
28015,
85,
11537,
198,
197,
2,
1640,
1312,
287,
2837,
7,
4134,
1003,
20,
2599,
198,
197,
2,
197,
24455,
8841,
10,
11639,
17816,
10,
2536,
7,
72,
47762,
10354,
85,
60,
37250,
10,
2536,
7,
72,
47762,
10354,
64,
60,
705,
198,
197,
2,
4798,
10786,
487,
43913,
6,
10,
15414,
82,
10,
6,
532,
24455,
62,
41887,
24018,
10,
24455,
8841,
10,
6,
1102,
9246,
28,
77,
11639,
10,
2536,
7,
72,
47762,
10354,
85,
28,
16,
25,
64,
28,
16,
685,
85,
60,
685,
64,
30866,
532,
8899,
12878,
85,
30866,
532,
8899,
12878,
64,
30866,
4515,
385,
291,
13,
28015,
85,
11537,
198,
197,
2,
418,
13,
10057,
10786,
487,
43913,
6,
10,
15414,
82,
10,
6,
532,
24455,
62,
41887,
24018,
10,
24455,
8841,
10,
6,
1102,
9246,
28,
77,
11639,
10,
2536,
7,
72,
47762,
10354,
85,
28,
16,
25,
64,
28,
16,
685,
85,
60,
685,
64,
30866,
532,
8899,
12878,
85,
30866,
532,
8899,
12878,
64,
30866,
4515,
385,
291,
6,
10,
2536,
7,
22065,
47762,
4458,
28015,
85,
11537,
198,
198,
361,
16959,
62,
42937,
62,
44,
2937,
2149,
62,
29266,
855,
17821,
25,
198,
197,
28965,
3919,
28,
25120,
13,
25192,
600,
7,
15,
11,
17,
8,
198,
197,
7266,
14681,
13,
47,
9654,
10786,
487,
43913,
532,
72,
4515,
385,
291,
13,
3149,
19,
532,
5532,
62,
26268,
532,
16,
532,
72,
2647,
6,
10,
2536,
7,
28965,
3919,
47762,
4458,
3149,
18,
532,
24455,
62,
41887,
12878,
16,
25,
64,
60,
29048,
28,
15,
13,
1314,
11,
499,
324,
58,
32,
11208,
58,
15,
25,
64,
7131,
32,
60,
2382,
469,
58,
448,
30866,
532,
19509,
395,
532,
66,
25,
85,
4866,
532,
8899,
657,
25,
85,
532,
8899,
685,
448,
60,
532,
88,
19523,
13,
28015,
85,
3256,
29149,
28,
17821,
8,
198
] | 2.128051 | 2,499 |
# -*- coding: utf8 -*-
"""
Services
"""
from __future__ import absolute_import, division, print_function
from .base_service import BaseService
from .shot_detector_service import ShotDetectorPlotService
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
23,
532,
9,
12,
198,
198,
37811,
198,
220,
220,
220,
6168,
220,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
198,
198,
6738,
764,
8692,
62,
15271,
1330,
7308,
16177,
198,
6738,
764,
9442,
62,
15255,
9250,
62,
15271,
1330,
13590,
11242,
9250,
43328,
16177,
198
] | 3.230769 | 65 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
@version: 0.1
@author: pjgao
@city: Nanjing
@file: __init__.py.py
@time: 2018/12/10 16:22
"""
__version__ = '0.1.1' | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
31,
9641,
25,
657,
13,
16,
198,
31,
9800,
25,
220,
279,
73,
4908,
78,
198,
31,
19205,
25,
18008,
49940,
198,
31,
7753,
25,
220,
220,
220,
11593,
15003,
834,
13,
9078,
13,
9078,
198,
31,
2435,
25,
220,
220,
220,
2864,
14,
1065,
14,
940,
1467,
25,
1828,
198,
37811,
198,
198,
834,
9641,
834,
796,
705,
15,
13,
16,
13,
16,
6
] | 1.912088 | 91 |
# -*- coding: utf-8 -*-
from .jsonrpc import validate_jsonrpc_request
from .jussi import finalize_jussi_response
from .jussi import convert_to_jussi_request
from .limits import check_limits
from .caching import get_response
from .caching import cache_response
from .update_block_num import update_last_irreversible_block_num
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
764,
17752,
81,
14751,
1330,
26571,
62,
17752,
81,
14751,
62,
25927,
198,
6738,
764,
73,
1046,
72,
1330,
2457,
1096,
62,
73,
1046,
72,
62,
26209,
198,
6738,
764,
73,
1046,
72,
1330,
10385,
62,
1462,
62,
73,
1046,
72,
62,
25927,
198,
6738,
764,
49196,
1330,
2198,
62,
49196,
198,
6738,
764,
66,
8103,
1330,
651,
62,
26209,
198,
6738,
764,
66,
8103,
1330,
12940,
62,
26209,
198,
6738,
764,
19119,
62,
9967,
62,
22510,
1330,
4296,
62,
12957,
62,
343,
260,
37393,
62,
9967,
62,
22510,
628
] | 3.084906 | 106 |
# ---
# jupyter:
# jupytext:
# cell_metadata_filter: all
# notebook_metadata_filter: all,-language_info
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.2'
# jupytext_version: 1.2.1
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# toc:
# base_numbering: 1
# nav_menu: {}
# number_sections: true
# sideBar: true
# skip_h1_title: false
# title_cell: Table of Contents
# title_sidebar: Contents
# toc_cell: true
# toc_position: {}
# toc_section_display: true
# toc_window_display: true
# ---
# %% [markdown] {"toc": true}
# <h1>Table of Contents<span class="tocSkip"></span></h1>
# <div class="toc"><ul class="toc-item"><li><span><a href="#Introduction" data-toc-modified-id="Introduction-1"><span class="toc-item-num">1 </span>Introduction</a></span><ul class="toc-item"><li><span><a href="#Introduction-to-Python-and-its-use-in-science" data-toc-modified-id="Introduction-to-Python-and-its-use-in-science-1.1"><span class="toc-item-num">1.1 </span>Introduction to Python and its use in science</a></span></li></ul></li></ul></div>
# %% [markdown]
# Introduction
# ============
#
# latex
#
# Introduction to Python and its use in science
# ---------------------------------------------
#
# This manual is meant to serve as an introduction to the Python
# programming language and its use for scientific computing. It's ok if
# you have never programmed a computer before. This manual will teach you
# how to do it from the ground up.
#
# The Python programming language is useful for all kinds of scientific
# and engineering tasks. You can use it to analyze and plot data. You can
# also use it to numerically solve science and engineering problems that
# are difficult or even impossible to solve analytically.
#
# While we want to marshall Python's powers to address scientific
# problems, you should know that Python is a general purpose computer
# language that is widely used to address all kinds of computing tasks,
# from web applications to processing financial data on Wall Street and
# various scripting tasks for computer system management. Over the past
# decade it has been increasingly used by scientists and engineers for
# numerical computations, graphics, and as a "wrapper" for numerical
# software originally written in other languages, like Fortran and C.
#
# Python is similar to Matlab and IDL, two other computer languages that
# are frequently used in science and engineering applications. Like Matlab
# and IDL, Python is an *interpreted* language, meaning you can run your
# code without having to go through an extra step of compiling, as
# required for the C and Fortran programming languages. It is also a
# *dynamically typed* language, meaning you don't have to declare
# variables and set aside memory before using them. Don't worry if you
# don't know exactly what these terms mean. Their primary significance for
# you is that you can write Python code, test, and use it quickly with a
# minimum of fuss.
#
# One advantage of Python over similar languages like Matlab and IDL is
# that it is free. It can be downloaded from the web and is available on
# all the standard computer platforms, including Windows, MacOS, and
# Linux. This also means that you can use Python without being tethered to
# the internet, as required for commercial software that is tied to a
# remote license server.
#
# Another advantage is Python's clean and simple syntax, including its
# implementation of *object oriented* programming (which we do not
# emphasize in this introduction).
#
# An important disadvantage is that Python programs can be slower than
# compiled languages like C. For large scale simulations and other
# demanding applications, there can be a considerable speed penalty in
# using Python. In these cases, C, C++, or Fortran is recommended,
# although intelligent use of Python's array processing tools contained in
# the NumPy module can greatly speed up Python code. Another disadvantage
# is that compared to Matlab and IDL, Python is less well documented. This
# stems from the fact that it is public *open source* software and thus is
# dependent on volunteers from the community of developers and users for
# documentation. The documentation is freely available on the web but is
# scattered among a number of different sites and can be terse. This
# manual will acquaint you with the most commonly-used web sites. Search
# engines like Google can help you find others.
#
# You are not assumed to have had any previous programming experience.
# However, the purpose of this manual isn't to teach you the principles of
# computer programming; it's to provide a practical guide to getting
# started with Python for scientific computing. Perhaps once you see some
# of the powerful tasks that you can accomplish with Python, you will be
# inspired to study computational science and engineering, as well as
# computer programming, in greater depth.
| [
2,
11420,
198,
2,
474,
929,
88,
353,
25,
198,
2,
220,
220,
474,
929,
88,
5239,
25,
198,
2,
220,
220,
220,
220,
2685,
62,
38993,
62,
24455,
25,
477,
198,
2,
220,
220,
220,
220,
20922,
62,
38993,
62,
24455,
25,
477,
12095,
16129,
62,
10951,
198,
2,
220,
220,
220,
220,
2420,
62,
15603,
341,
25,
198,
2,
220,
220,
220,
220,
220,
220,
7552,
25,
764,
9078,
198,
2,
220,
220,
220,
220,
220,
220,
5794,
62,
3672,
25,
1411,
198,
2,
220,
220,
220,
220,
220,
220,
5794,
62,
9641,
25,
705,
16,
13,
17,
6,
198,
2,
220,
220,
220,
220,
220,
220,
474,
929,
88,
5239,
62,
9641,
25,
352,
13,
17,
13,
16,
198,
2,
220,
220,
50207,
43106,
25,
198,
2,
220,
220,
220,
220,
3359,
62,
3672,
25,
11361,
513,
198,
2,
220,
220,
220,
220,
3303,
25,
21015,
198,
2,
220,
220,
220,
220,
1438,
25,
21015,
18,
198,
2,
220,
220,
284,
66,
25,
198,
2,
220,
220,
220,
220,
2779,
62,
17618,
278,
25,
352,
198,
2,
220,
220,
220,
220,
6812,
62,
26272,
25,
23884,
198,
2,
220,
220,
220,
220,
1271,
62,
23946,
25,
2081,
198,
2,
220,
220,
220,
220,
1735,
10374,
25,
2081,
198,
2,
220,
220,
220,
220,
14267,
62,
71,
16,
62,
7839,
25,
3991,
198,
2,
220,
220,
220,
220,
3670,
62,
3846,
25,
8655,
286,
26714,
198,
2,
220,
220,
220,
220,
3670,
62,
1589,
5657,
25,
26714,
198,
2,
220,
220,
220,
220,
284,
66,
62,
3846,
25,
2081,
198,
2,
220,
220,
220,
220,
284,
66,
62,
9150,
25,
23884,
198,
2,
220,
220,
220,
220,
284,
66,
62,
5458,
62,
13812,
25,
2081,
198,
2,
220,
220,
220,
220,
284,
66,
62,
17497,
62,
13812,
25,
2081,
198,
2,
11420,
198,
198,
2,
43313,
685,
4102,
2902,
60,
19779,
40301,
1298,
2081,
92,
198,
2,
1279,
71,
16,
29,
10962,
286,
26714,
27,
12626,
1398,
2625,
40301,
50232,
23984,
12626,
12240,
71,
16,
29,
198,
2,
1279,
7146,
1398,
2625,
40301,
22039,
377,
1398,
2625,
40301,
12,
9186,
22039,
4528,
6927,
12626,
6927,
64,
13291,
25698,
21906,
1,
1366,
12,
40301,
12,
41771,
12,
312,
2625,
21906,
12,
16,
22039,
12626,
1398,
2625,
40301,
12,
9186,
12,
22510,
5320,
16,
5,
77,
24145,
26,
5,
77,
24145,
26,
3556,
12626,
29,
21906,
3556,
64,
12240,
12626,
6927,
377,
1398,
2625,
40301,
12,
9186,
22039,
4528,
6927,
12626,
6927,
64,
13291,
25698,
21906,
12,
1462,
12,
37906,
12,
392,
12,
896,
12,
1904,
12,
259,
12,
16801,
1,
1366,
12,
40301,
12,
41771,
12,
312,
2625,
21906,
12,
1462,
12,
37906,
12,
392,
12,
896,
12,
1904,
12,
259,
12,
16801,
12,
16,
13,
16,
22039,
12626,
1398,
2625,
40301,
12,
9186,
12,
22510,
5320,
16,
13,
16,
5,
77,
24145,
26,
5,
77,
24145,
26,
3556,
12626,
29,
21906,
284,
11361,
290,
663,
779,
287,
3783,
3556,
64,
12240,
12626,
12240,
4528,
12240,
377,
12240,
4528,
12240,
377,
12240,
7146,
29,
198,
198,
2,
43313,
685,
4102,
2902,
60,
198,
2,
22395,
198,
2,
796,
2559,
18604,
198,
2,
198,
2,
47038,
198,
2,
198,
2,
22395,
284,
11361,
290,
663,
779,
287,
3783,
198,
2,
20368,
32501,
198,
2,
198,
2,
770,
10107,
318,
4001,
284,
4691,
355,
281,
9793,
284,
262,
11361,
198,
2,
8300,
3303,
290,
663,
779,
329,
5654,
14492,
13,
632,
338,
12876,
611,
198,
2,
345,
423,
1239,
27402,
257,
3644,
878,
13,
770,
10107,
481,
4545,
345,
198,
2,
703,
284,
466,
340,
422,
262,
2323,
510,
13,
198,
2,
198,
2,
383,
11361,
8300,
3303,
318,
4465,
329,
477,
6982,
286,
5654,
198,
2,
290,
8705,
8861,
13,
921,
460,
779,
340,
284,
16602,
290,
7110,
1366,
13,
921,
460,
198,
2,
635,
779,
340,
284,
5470,
1146,
8494,
3783,
290,
8705,
2761,
326,
198,
2,
389,
2408,
393,
772,
5340,
284,
8494,
4284,
83,
1146,
13,
198,
2,
198,
2,
2893,
356,
765,
284,
22397,
439,
11361,
338,
5635,
284,
2209,
5654,
198,
2,
2761,
11,
345,
815,
760,
326,
11361,
318,
257,
2276,
4007,
3644,
198,
2,
3303,
326,
318,
6768,
973,
284,
2209,
477,
6982,
286,
14492,
8861,
11,
198,
2,
422,
3992,
5479,
284,
7587,
3176,
1366,
319,
5007,
3530,
290,
198,
2,
2972,
36883,
8861,
329,
3644,
1080,
4542,
13,
3827,
262,
1613,
198,
2,
5707,
340,
468,
587,
6481,
973,
416,
5519,
290,
12037,
329,
198,
2,
29052,
2653,
602,
11,
9382,
11,
290,
355,
257,
366,
48553,
1,
329,
29052,
198,
2,
3788,
6198,
3194,
287,
584,
8950,
11,
588,
6401,
2596,
290,
327,
13,
198,
2,
198,
2,
11361,
318,
2092,
284,
6550,
23912,
290,
4522,
43,
11,
734,
584,
3644,
8950,
326,
198,
2,
389,
6777,
973,
287,
3783,
290,
8705,
5479,
13,
4525,
6550,
23912,
198,
2,
290,
4522,
43,
11,
11361,
318,
281,
1635,
27381,
276,
9,
3303,
11,
3616,
345,
460,
1057,
534,
198,
2,
2438,
1231,
1719,
284,
467,
832,
281,
3131,
2239,
286,
33393,
11,
355,
198,
2,
2672,
329,
262,
327,
290,
6401,
2596,
8300,
8950,
13,
632,
318,
635,
257,
198,
2,
1635,
67,
4989,
1146,
25683,
9,
3303,
11,
3616,
345,
836,
470,
423,
284,
13627,
198,
2,
9633,
290,
900,
7263,
4088,
878,
1262,
606,
13,
2094,
470,
5490,
611,
345,
198,
2,
836,
470,
760,
3446,
644,
777,
2846,
1612,
13,
5334,
4165,
12085,
329,
198,
2,
345,
318,
326,
345,
460,
3551,
11361,
2438,
11,
1332,
11,
290,
779,
340,
2952,
351,
257,
198,
2,
5288,
286,
34297,
13,
198,
2,
198,
2,
1881,
4621,
286,
11361,
625,
2092,
8950,
588,
6550,
23912,
290,
4522,
43,
318,
198,
2,
326,
340,
318,
1479,
13,
632,
460,
307,
15680,
422,
262,
3992,
290,
318,
1695,
319,
198,
2,
477,
262,
3210,
3644,
9554,
11,
1390,
3964,
11,
4100,
2640,
11,
290,
198,
2,
7020,
13,
770,
635,
1724,
326,
345,
460,
779,
11361,
1231,
852,
28408,
6083,
284,
198,
2,
262,
5230,
11,
355,
2672,
329,
5068,
3788,
326,
318,
8165,
284,
257,
198,
2,
6569,
5964,
4382,
13,
198,
2,
198,
2,
6023,
4621,
318,
11361,
338,
3424,
290,
2829,
15582,
11,
1390,
663,
198,
2,
7822,
286,
1635,
15252,
25921,
9,
8300,
357,
4758,
356,
466,
407,
198,
2,
21322,
287,
428,
9793,
737,
198,
2,
198,
2,
1052,
1593,
21407,
318,
326,
11361,
4056,
460,
307,
13611,
621,
198,
2,
14102,
8950,
588,
327,
13,
1114,
1588,
5046,
27785,
290,
584,
198,
2,
11334,
5479,
11,
612,
460,
307,
257,
11091,
2866,
7389,
287,
198,
2,
1262,
11361,
13,
554,
777,
2663,
11,
327,
11,
327,
4880,
11,
393,
6401,
2596,
318,
7151,
11,
198,
2,
3584,
12661,
779,
286,
11361,
338,
7177,
7587,
4899,
7763,
287,
198,
2,
262,
31835,
20519,
8265,
460,
9257,
2866,
510,
11361,
2438,
13,
6023,
21407,
198,
2,
318,
326,
3688,
284,
6550,
23912,
290,
4522,
43,
11,
11361,
318,
1342,
880,
12395,
13,
770,
198,
2,
21552,
422,
262,
1109,
326,
340,
318,
1171,
1635,
9654,
2723,
9,
3788,
290,
4145,
318,
198,
2,
10795,
319,
11661,
422,
262,
2055,
286,
6505,
290,
2985,
329,
198,
2,
10314,
13,
383,
10314,
318,
12748,
1695,
319,
262,
3992,
475,
318,
198,
2,
16830,
1871,
257,
1271,
286,
1180,
5043,
290,
460,
307,
1059,
325,
13,
770,
198,
2,
10107,
481,
24852,
345,
351,
262,
749,
8811,
12,
1484,
3992,
5043,
13,
11140,
198,
2,
11874,
588,
3012,
460,
1037,
345,
1064,
1854,
13,
198,
2,
198,
2,
921,
389,
407,
9672,
284,
423,
550,
597,
2180,
8300,
1998,
13,
198,
2,
2102,
11,
262,
4007,
286,
428,
10107,
2125,
470,
284,
4545,
345,
262,
7811,
286,
198,
2,
3644,
8300,
26,
340,
338,
284,
2148,
257,
8472,
5698,
284,
1972,
198,
2,
2067,
351,
11361,
329,
5654,
14492,
13,
8673,
1752,
345,
766,
617,
198,
2,
286,
262,
3665,
8861,
326,
345,
460,
9989,
351,
11361,
11,
345,
481,
307,
198,
2,
7867,
284,
2050,
31350,
3783,
290,
8705,
11,
355,
880,
355,
198,
2,
3644,
8300,
11,
287,
3744,
6795,
13,
198
] | 3.748707 | 1,353 |
#!/usr/bin/env python
import glob
import os
import sys
from bokeh.io import output_file
from bokeh.models import SingleIntervalTicker
from bokeh.plotting import figure, show
if __name__ == '__main__':
if len(sys.argv) < 4:
print(f'USAGE: {sys.argv[0]} <owner> <project> <stack> <run> [label ...]')
else:
plot_run(owner=sys.argv[1],
project=sys.argv[2],
stack=sys.argv[3],
run=sys.argv[4],
solve_labels=[] if len(sys.argv) == 4 else sys.argv[5:])
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
15095,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
6738,
1489,
365,
71,
13,
952,
1330,
5072,
62,
7753,
198,
6738,
1489,
365,
71,
13,
27530,
1330,
14206,
9492,
2100,
51,
15799,
198,
6738,
1489,
365,
71,
13,
29487,
889,
1330,
3785,
11,
905,
628,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
611,
18896,
7,
17597,
13,
853,
85,
8,
1279,
604,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
69,
6,
2937,
11879,
25,
1391,
17597,
13,
853,
85,
58,
15,
48999,
1279,
18403,
29,
1279,
16302,
29,
1279,
25558,
29,
1279,
5143,
29,
685,
18242,
2644,
60,
11537,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7110,
62,
5143,
7,
18403,
28,
17597,
13,
853,
85,
58,
16,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1628,
28,
17597,
13,
853,
85,
58,
17,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8931,
28,
17597,
13,
853,
85,
58,
18,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1057,
28,
17597,
13,
853,
85,
58,
19,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8494,
62,
23912,
1424,
28,
21737,
611,
18896,
7,
17597,
13,
853,
85,
8,
6624,
604,
2073,
25064,
13,
853,
85,
58,
20,
25,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198
] | 1.971631 | 282 |
CAMERA_MODEL_OPENCV_PINHOLE: str = "opencv_pinhole"
CAMERA_MODEL_OPENCV_FISHEYE: str = "opencv_fisheye"
CAMERA_MODEL_PD_FISHEYE: str = "pd_fisheye"
| [
34,
2390,
46461,
62,
33365,
3698,
62,
3185,
24181,
53,
62,
44032,
32298,
2538,
25,
965,
796,
366,
9654,
33967,
62,
11635,
13207,
1,
198,
34,
2390,
46461,
62,
33365,
3698,
62,
3185,
24181,
53,
62,
37,
1797,
13909,
48743,
25,
965,
796,
366,
9654,
33967,
62,
69,
271,
258,
5948,
1,
198,
34,
2390,
46461,
62,
33365,
3698,
62,
5760,
62,
37,
1797,
13909,
48743,
25,
965,
796,
366,
30094,
62,
69,
271,
258,
5948,
1,
198
] | 1.897436 | 78 |
import unittest
from collections import Counter
import flask
import json
from panoptes_aggregation.reducers.question_reducer import process_data, question_reducer
from panoptes_aggregation.reducers.test_utils import extract_in_data
extracted_data = [
{'a': 1, 'b': 1},
{'a': 1},
{'b': 1, 'c': 1},
{'b': 1, 'a': 1}
]
processed_data = [
Counter({'a': 1, 'b': 1}),
Counter({'a': 1}),
Counter({'b': 1, 'c': 1}),
Counter({'b': 1, 'a': 1})
]
processed_data_pairs = [
Counter({'a+b': 1}),
Counter({'a': 1}),
Counter({'b+c': 1}),
Counter({'a+b': 1})
]
reduced_data = {
'a': 3,
'b': 3,
'c': 1
}
reduced_data_pairs = {
'a+b': 2,
'a': 1,
'b+c': 1
}
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
6738,
17268,
1330,
15034,
198,
11748,
42903,
198,
11748,
33918,
198,
6738,
3425,
404,
4879,
62,
9460,
43068,
13,
445,
1229,
364,
13,
25652,
62,
445,
48915,
1330,
1429,
62,
7890,
11,
1808,
62,
445,
48915,
198,
6738,
3425,
404,
4879,
62,
9460,
43068,
13,
445,
1229,
364,
13,
9288,
62,
26791,
1330,
7925,
62,
259,
62,
7890,
198,
198,
2302,
20216,
62,
7890,
796,
685,
198,
220,
220,
220,
1391,
6,
64,
10354,
352,
11,
705,
65,
10354,
352,
5512,
198,
220,
220,
220,
1391,
6,
64,
10354,
352,
5512,
198,
220,
220,
220,
1391,
6,
65,
10354,
352,
11,
705,
66,
10354,
352,
5512,
198,
220,
220,
220,
1391,
6,
65,
10354,
352,
11,
705,
64,
10354,
352,
92,
198,
60,
198,
198,
14681,
276,
62,
7890,
796,
685,
198,
220,
220,
220,
15034,
15090,
6,
64,
10354,
352,
11,
705,
65,
10354,
352,
92,
828,
198,
220,
220,
220,
15034,
15090,
6,
64,
10354,
352,
92,
828,
198,
220,
220,
220,
15034,
15090,
6,
65,
10354,
352,
11,
705,
66,
10354,
352,
92,
828,
198,
220,
220,
220,
15034,
15090,
6,
65,
10354,
352,
11,
705,
64,
10354,
352,
30072,
198,
60,
198,
198,
14681,
276,
62,
7890,
62,
79,
3468,
796,
685,
198,
220,
220,
220,
15034,
15090,
6,
64,
10,
65,
10354,
352,
92,
828,
198,
220,
220,
220,
15034,
15090,
6,
64,
10354,
352,
92,
828,
198,
220,
220,
220,
15034,
15090,
6,
65,
10,
66,
10354,
352,
92,
828,
198,
220,
220,
220,
15034,
15090,
6,
64,
10,
65,
10354,
352,
30072,
198,
60,
198,
198,
445,
19513,
62,
7890,
796,
1391,
198,
220,
220,
220,
705,
64,
10354,
513,
11,
198,
220,
220,
220,
705,
65,
10354,
513,
11,
198,
220,
220,
220,
705,
66,
10354,
352,
198,
92,
198,
198,
445,
19513,
62,
7890,
62,
79,
3468,
796,
1391,
198,
220,
220,
220,
705,
64,
10,
65,
10354,
362,
11,
198,
220,
220,
220,
705,
64,
10354,
352,
11,
198,
220,
220,
220,
705,
65,
10,
66,
10354,
352,
198,
92,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.073171 | 369 |
# 3. Принтер дат. Напишите программу, которая считывает от пользователя
# строковое значение, содержащее дату в формате дд/мм/гггг. Она должна
# напечатать дату в формате 12 марта 2018 г.
main()
| [
2,
513,
13,
12466,
253,
21169,
18849,
22177,
20375,
16843,
21169,
12466,
112,
16142,
20375,
13,
12466,
251,
16142,
140,
123,
18849,
141,
230,
18849,
20375,
16843,
12466,
123,
21169,
25443,
111,
21169,
16142,
43108,
43108,
35072,
11,
12466,
118,
15166,
20375,
15166,
21169,
16142,
40623,
220,
21727,
141,
229,
18849,
20375,
45035,
38857,
16142,
16843,
20375,
12466,
122,
20375,
12466,
123,
25443,
119,
45367,
140,
115,
25443,
110,
16142,
20375,
16843,
30143,
40623,
198,
2,
220,
21727,
20375,
21169,
25443,
118,
25443,
110,
15166,
16843,
12466,
115,
22177,
16142,
141,
229,
16843,
22177,
18849,
16843,
11,
220,
21727,
25443,
112,
16843,
21169,
140,
114,
16142,
141,
231,
16843,
16843,
12466,
112,
16142,
20375,
35072,
12466,
110,
220,
141,
226,
15166,
21169,
43108,
16142,
20375,
16843,
12466,
112,
43666,
14,
43108,
43108,
14,
140,
111,
140,
111,
140,
111,
140,
111,
13,
12466,
252,
22177,
16142,
12466,
112,
25443,
119,
140,
114,
22177,
16142,
198,
2,
12466,
121,
16142,
140,
123,
16843,
141,
229,
16142,
20375,
16142,
20375,
45367,
12466,
112,
16142,
20375,
35072,
12466,
110,
220,
141,
226,
15166,
21169,
43108,
16142,
20375,
16843,
1105,
12466,
120,
16142,
21169,
20375,
16142,
2864,
12466,
111,
13,
628,
628,
198,
12417,
3419,
198
] | 0.985149 | 202 |
# Port from https://github.com/zuzak/owo
"""MIT License
Original substitutions: Copyright (c) 2018 Eva (Nepeta)
JavaScript library: Copyright (c) 2019 Douglas Gardner <[email protected]>
Python library: Copyright (c) 2019 tekofu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
import random
owoPrefix = [
'<3 ',
'H-hewwo?? ',
'HIIII! ',
'Haiiii! ',
'Huohhhh. ',
'OWO ',
'OwO ',
'UwU '
]
owoSuffix = [
' :3',
' UwU',
' ʕʘ‿ʘʔ',
' >_>',
' ^_^',
'..',
' Huoh.',
' ^-^',
' ;_;',
' ;-;',
' xD',
' x3',
' :D',
' :P',
' ;3',
' XDDD',
', fwendo',
' ㅇㅅㅇ',
' (人◕ω◕)',
'(^v^)',
' Sigh.',
' x3',
' ._.',
' (• o •)',
' >_<'
]
owoDict = {
'r': 'w',
'l': 'w',
'R': 'W',
'L': 'W',
'no': 'nu',
'has': 'haz',
'have': 'haz',
'you': 'uu',
'the ': 'da ',
'The ': 'Da '
}
| [
2,
4347,
422,
3740,
1378,
12567,
13,
785,
14,
89,
10277,
461,
14,
322,
78,
198,
198,
37811,
36393,
13789,
198,
198,
20556,
21436,
3508,
25,
15069,
357,
66,
8,
2864,
32355,
357,
45,
538,
17167,
8,
198,
29584,
7391,
5888,
25,
220,
220,
220,
220,
15069,
357,
66,
8,
13130,
15796,
27911,
1279,
67,
280,
14391,
31,
354,
41214,
13,
354,
29,
198,
37906,
5888,
25,
220,
220,
220,
220,
220,
220,
220,
220,
15069,
357,
66,
8,
13130,
573,
74,
1659,
84,
198,
198,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
1659,
428,
3788,
290,
3917,
10314,
3696,
357,
1169,
366,
25423,
12340,
284,
1730,
198,
259,
262,
10442,
1231,
17504,
11,
1390,
1231,
17385,
262,
2489,
198,
1462,
779,
11,
4866,
11,
13096,
11,
20121,
11,
7715,
11,
14983,
11,
850,
43085,
11,
290,
14,
273,
3677,
198,
22163,
444,
286,
262,
10442,
11,
290,
284,
8749,
6506,
284,
4150,
262,
10442,
318,
198,
69,
700,
1348,
284,
466,
523,
11,
2426,
284,
262,
1708,
3403,
25,
198,
198,
464,
2029,
6634,
4003,
290,
428,
7170,
4003,
2236,
307,
3017,
287,
477,
198,
22163,
444,
393,
8904,
16690,
286,
262,
10442,
13,
198,
198,
10970,
47466,
3180,
36592,
2389,
1961,
366,
1921,
3180,
1600,
42881,
34764,
56,
3963,
15529,
509,
12115,
11,
7788,
32761,
6375,
198,
3955,
49094,
11,
47783,
2751,
21728,
5626,
40880,
5390,
3336,
34764,
11015,
3963,
34482,
3398,
1565,
5603,
25382,
11,
198,
37,
46144,
7473,
317,
16652,
2149,
37232,
33079,
48933,
5357,
44521,
1268,
10913,
2751,
12529,
13,
3268,
8005,
49261,
50163,
3336,
198,
32,
24318,
20673,
6375,
27975,
38162,
9947,
367,
15173,
4877,
9348,
43031,
19146,
7473,
15529,
47666,
3955,
11,
29506,
25552,
6375,
25401,
198,
43,
3539,
25382,
11,
7655,
2767,
16879,
3268,
3537,
40282,
3963,
27342,
10659,
11,
309,
9863,
6375,
25401,
54,
24352,
11,
5923,
1797,
2751,
16034,
11,
198,
12425,
3963,
6375,
3268,
7102,
45,
24565,
13315,
3336,
47466,
6375,
3336,
23210,
6375,
25401,
5550,
1847,
20754,
3268,
3336,
198,
15821,
37485,
13,
198,
198,
37811,
198,
198,
11748,
4738,
198,
198,
322,
78,
36698,
844,
796,
685,
198,
220,
220,
220,
705,
27,
18,
46083,
198,
220,
220,
220,
705,
39,
12,
258,
1383,
78,
3548,
46083,
198,
220,
220,
220,
705,
39,
3978,
3978,
0,
46083,
198,
220,
220,
220,
705,
39,
1872,
15479,
0,
46083,
198,
220,
220,
220,
705,
38202,
1219,
49126,
13,
46083,
198,
220,
220,
220,
705,
3913,
46,
46083,
198,
220,
220,
220,
705,
46,
86,
46,
46083,
198,
220,
220,
220,
705,
52,
86,
52,
705,
198,
60,
198,
198,
322,
34049,
1648,
844,
796,
685,
198,
220,
220,
220,
705,
1058,
18,
3256,
198,
220,
220,
220,
705,
471,
86,
52,
3256,
198,
220,
220,
220,
705,
220,
134,
243,
134,
246,
447,
123,
134,
246,
134,
242,
3256,
198,
220,
220,
220,
705,
1875,
49029,
3256,
198,
220,
220,
220,
705,
10563,
62,
61,
3256,
198,
220,
220,
220,
705,
492,
3256,
198,
220,
220,
220,
705,
11256,
1219,
2637,
11,
198,
220,
220,
220,
705,
10563,
12,
61,
3256,
198,
220,
220,
220,
705,
2162,
62,
26,
3256,
198,
220,
220,
220,
705,
2162,
12,
26,
3256,
198,
220,
220,
220,
705,
2124,
35,
3256,
198,
220,
220,
220,
705,
2124,
18,
3256,
198,
220,
220,
220,
705,
1058,
35,
3256,
198,
220,
220,
220,
705,
1058,
47,
3256,
198,
220,
220,
220,
705,
2162,
18,
3256,
198,
220,
220,
220,
705,
1395,
16458,
35,
3256,
198,
220,
220,
220,
46083,
277,
86,
31110,
3256,
198,
220,
220,
220,
705,
220,
159,
227,
229,
159,
227,
227,
159,
227,
229,
3256,
198,
220,
220,
220,
705,
357,
21689,
15926,
243,
49535,
15926,
243,
8,
3256,
198,
220,
220,
220,
705,
171,
120,
230,
171,
120,
122,
171,
121,
244,
171,
120,
122,
171,
120,
231,
3256,
198,
220,
220,
220,
705,
311,
394,
2637,
11,
198,
220,
220,
220,
705,
2124,
18,
3256,
198,
220,
220,
220,
705,
47540,
2637,
11,
198,
220,
220,
220,
705,
357,
3581,
267,
5595,
8,
3256,
198,
220,
220,
220,
705,
1875,
62,
27,
6,
198,
60,
198,
198,
322,
78,
35,
713,
796,
1391,
198,
220,
220,
220,
705,
81,
10354,
705,
86,
3256,
198,
220,
220,
220,
705,
75,
10354,
705,
86,
3256,
198,
220,
220,
220,
705,
49,
10354,
705,
54,
3256,
198,
220,
220,
220,
705,
43,
10354,
705,
54,
3256,
198,
220,
220,
220,
705,
3919,
10354,
705,
28803,
3256,
198,
220,
220,
220,
705,
10134,
10354,
705,
71,
1031,
3256,
198,
220,
220,
220,
705,
14150,
10354,
705,
71,
1031,
3256,
198,
220,
220,
220,
705,
5832,
10354,
705,
12303,
3256,
198,
220,
220,
220,
705,
1169,
705,
25,
705,
6814,
46083,
198,
220,
220,
220,
705,
464,
705,
25,
705,
26531,
705,
198,
92,
628
] | 2.368681 | 811 |
import json
import urllib.parse
from .lib.gethttp import getHttpPage | [
11748,
33918,
198,
11748,
2956,
297,
571,
13,
29572,
198,
6738,
764,
8019,
13,
1136,
4023,
1330,
651,
43481,
9876
] | 3.4 | 20 |
import unittest
import vdebug.dbgp
import xml.etree.ElementTree as ET
| [
11748,
555,
715,
395,
198,
11748,
410,
24442,
13,
9945,
31197,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
198
] | 3.043478 | 23 |
# coding: utf-8
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
from .item import Item
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
from oci.decorators import init_model_state_from_kwargs
@init_model_state_from_kwargs
class LimitItem(Item):
"""
Details of Limit Item
"""
#: A constant which can be used with the limit_status property of a LimitItem.
#: This constant has a value of "APPROVED"
LIMIT_STATUS_APPROVED = "APPROVED"
#: A constant which can be used with the limit_status property of a LimitItem.
#: This constant has a value of "PARTIALLY_APPROVED"
LIMIT_STATUS_PARTIALLY_APPROVED = "PARTIALLY_APPROVED"
#: A constant which can be used with the limit_status property of a LimitItem.
#: This constant has a value of "NOT_APPROVED"
LIMIT_STATUS_NOT_APPROVED = "NOT_APPROVED"
def __init__(self, **kwargs):
"""
Initializes a new LimitItem object with values from keyword arguments. The default value of the :py:attr:`~oci.cims.models.LimitItem.type` attribute
of this class is ``limit`` and it should not be changed.
The following keyword arguments are supported (corresponding to the getters/setters of this class):
:param item_key:
The value to assign to the item_key property of this LimitItem.
:type item_key: str
:param name:
The value to assign to the name property of this LimitItem.
:type name: str
:param type:
The value to assign to the type property of this LimitItem.
:type type: str
:param category:
The value to assign to the category property of this LimitItem.
:type category: Category
:param sub_category:
The value to assign to the sub_category property of this LimitItem.
:type sub_category: SubCategory
:param issue_type:
The value to assign to the issue_type property of this LimitItem.
:type issue_type: IssueType
:param current_limit:
The value to assign to the current_limit property of this LimitItem.
:type current_limit: int
:param current_usage:
The value to assign to the current_usage property of this LimitItem.
:type current_usage: int
:param requested_limit:
The value to assign to the requested_limit property of this LimitItem.
:type requested_limit: int
:param limit_status:
The value to assign to the limit_status property of this LimitItem.
Allowed values for this property are: "APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
:type limit_status: str
"""
self.swagger_types = {
'item_key': 'str',
'name': 'str',
'type': 'str',
'category': 'Category',
'sub_category': 'SubCategory',
'issue_type': 'IssueType',
'current_limit': 'int',
'current_usage': 'int',
'requested_limit': 'int',
'limit_status': 'str'
}
self.attribute_map = {
'item_key': 'itemKey',
'name': 'name',
'type': 'type',
'category': 'category',
'sub_category': 'subCategory',
'issue_type': 'issueType',
'current_limit': 'currentLimit',
'current_usage': 'currentUsage',
'requested_limit': 'requestedLimit',
'limit_status': 'limitStatus'
}
self._item_key = None
self._name = None
self._type = None
self._category = None
self._sub_category = None
self._issue_type = None
self._current_limit = None
self._current_usage = None
self._requested_limit = None
self._limit_status = None
self._type = 'limit'
@property
def current_limit(self):
"""
Gets the current_limit of this LimitItem.
Current available limit of the resource
:return: The current_limit of this LimitItem.
:rtype: int
"""
return self._current_limit
@current_limit.setter
def current_limit(self, current_limit):
"""
Sets the current_limit of this LimitItem.
Current available limit of the resource
:param current_limit: The current_limit of this LimitItem.
:type: int
"""
self._current_limit = current_limit
@property
def current_usage(self):
"""
Gets the current_usage of this LimitItem.
Current used limit of the resource
:return: The current_usage of this LimitItem.
:rtype: int
"""
return self._current_usage
@current_usage.setter
def current_usage(self, current_usage):
"""
Sets the current_usage of this LimitItem.
Current used limit of the resource
:param current_usage: The current_usage of this LimitItem.
:type: int
"""
self._current_usage = current_usage
@property
def requested_limit(self):
"""
Gets the requested_limit of this LimitItem.
Requested limit for the resource
:return: The requested_limit of this LimitItem.
:rtype: int
"""
return self._requested_limit
@requested_limit.setter
def requested_limit(self, requested_limit):
"""
Sets the requested_limit of this LimitItem.
Requested limit for the resource
:param requested_limit: The requested_limit of this LimitItem.
:type: int
"""
self._requested_limit = requested_limit
@property
def limit_status(self):
"""
Gets the limit_status of this LimitItem.
Status of the Limit
Allowed values for this property are: "APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
:return: The limit_status of this LimitItem.
:rtype: str
"""
return self._limit_status
@limit_status.setter
def limit_status(self, limit_status):
"""
Sets the limit_status of this LimitItem.
Status of the Limit
:param limit_status: The limit_status of this LimitItem.
:type: str
"""
allowed_values = ["APPROVED", "PARTIALLY_APPROVED", "NOT_APPROVED"]
if not value_allowed_none_or_none_sentinel(limit_status, allowed_values):
limit_status = 'UNKNOWN_ENUM_VALUE'
self._limit_status = limit_status
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
15069,
357,
66,
8,
1584,
11,
12131,
11,
18650,
290,
14,
273,
663,
29116,
13,
220,
1439,
2489,
10395,
13,
198,
2,
770,
3788,
318,
10668,
12,
36612,
284,
345,
739,
262,
14499,
2448,
33532,
13789,
357,
52,
6489,
8,
352,
13,
15,
355,
3402,
379,
3740,
1378,
793,
13,
273,
6008,
13,
785,
14,
677,
4541,
14,
84,
489,
393,
24843,
13789,
362,
13,
15,
355,
3402,
379,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
13,
921,
743,
3853,
2035,
5964,
13,
198,
198,
6738,
764,
9186,
1330,
9097,
198,
6738,
267,
979,
13,
22602,
1330,
39559,
62,
38568,
62,
11600,
11,
399,
11651,
62,
50,
3525,
1268,
3698,
11,
1988,
62,
40845,
62,
23108,
62,
273,
62,
23108,
62,
34086,
20538,
220,
1303,
645,
20402,
25,
376,
21844,
198,
6738,
267,
979,
13,
12501,
273,
2024,
1330,
2315,
62,
19849,
62,
5219,
62,
6738,
62,
46265,
22046,
628,
198,
31,
15003,
62,
19849,
62,
5219,
62,
6738,
62,
46265,
22046,
198,
4871,
27272,
7449,
7,
7449,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
14890,
286,
27272,
9097,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1303,
25,
317,
6937,
543,
460,
307,
973,
351,
262,
4179,
62,
13376,
3119,
286,
257,
27272,
7449,
13,
198,
220,
220,
220,
1303,
25,
770,
6937,
468,
257,
1988,
286,
366,
2969,
41283,
1961,
1,
198,
220,
220,
220,
27564,
2043,
62,
35744,
2937,
62,
2969,
41283,
1961,
796,
366,
2969,
41283,
1961,
1,
628,
220,
220,
220,
1303,
25,
317,
6937,
543,
460,
307,
973,
351,
262,
4179,
62,
13376,
3119,
286,
257,
27272,
7449,
13,
198,
220,
220,
220,
1303,
25,
770,
6937,
468,
257,
1988,
286,
366,
30709,
40,
19807,
62,
2969,
41283,
1961,
1,
198,
220,
220,
220,
27564,
2043,
62,
35744,
2937,
62,
30709,
40,
19807,
62,
2969,
41283,
1961,
796,
366,
30709,
40,
19807,
62,
2969,
41283,
1961,
1,
628,
220,
220,
220,
1303,
25,
317,
6937,
543,
460,
307,
973,
351,
262,
4179,
62,
13376,
3119,
286,
257,
27272,
7449,
13,
198,
220,
220,
220,
1303,
25,
770,
6937,
468,
257,
1988,
286,
366,
11929,
62,
2969,
41283,
1961,
1,
198,
220,
220,
220,
27564,
2043,
62,
35744,
2937,
62,
11929,
62,
2969,
41283,
1961,
796,
366,
11929,
62,
2969,
41283,
1961,
1,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
20768,
4340,
257,
649,
27272,
7449,
2134,
351,
3815,
422,
21179,
7159,
13,
383,
4277,
1988,
286,
262,
1058,
9078,
25,
35226,
25,
63,
93,
1733,
13,
66,
12078,
13,
27530,
13,
39184,
7449,
13,
4906,
63,
11688,
198,
220,
220,
220,
220,
220,
220,
220,
286,
428,
1398,
318,
7559,
32374,
15506,
290,
340,
815,
407,
307,
3421,
13,
198,
220,
220,
220,
220,
220,
220,
220,
383,
1708,
21179,
7159,
389,
4855,
357,
10215,
5546,
278,
284,
262,
651,
1010,
14,
2617,
1010,
286,
428,
1398,
2599,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
2378,
62,
2539,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
1988,
284,
8333,
284,
262,
2378,
62,
2539,
3119,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
2378,
62,
2539,
25,
965,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
1438,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
1988,
284,
8333,
284,
262,
1438,
3119,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
1438,
25,
965,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
2099,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
1988,
284,
8333,
284,
262,
2099,
3119,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
2099,
25,
965,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
6536,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
1988,
284,
8333,
284,
262,
6536,
3119,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
6536,
25,
21743,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
850,
62,
22872,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
1988,
284,
8333,
284,
262,
850,
62,
22872,
3119,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
850,
62,
22872,
25,
3834,
27313,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
2071,
62,
4906,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
1988,
284,
8333,
284,
262,
2071,
62,
4906,
3119,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
2071,
62,
4906,
25,
18232,
6030,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
1459,
62,
32374,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
1988,
284,
8333,
284,
262,
1459,
62,
32374,
3119,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
1459,
62,
32374,
25,
493,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
1459,
62,
26060,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
1988,
284,
8333,
284,
262,
1459,
62,
26060,
3119,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
1459,
62,
26060,
25,
493,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
9167,
62,
32374,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
1988,
284,
8333,
284,
262,
9167,
62,
32374,
3119,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
9167,
62,
32374,
25,
493,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
4179,
62,
13376,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
383,
1988,
284,
8333,
284,
262,
4179,
62,
13376,
3119,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1439,
6972,
3815,
329,
428,
3119,
389,
25,
366,
2969,
41283,
1961,
1600,
366,
30709,
40,
19807,
62,
2969,
41283,
1961,
1600,
366,
11929,
62,
2969,
41283,
1961,
1600,
705,
4944,
44706,
62,
1677,
5883,
62,
39488,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4377,
43483,
1143,
3815,
4504,
416,
257,
2139,
481,
307,
27661,
284,
705,
4944,
44706,
62,
1677,
5883,
62,
39488,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
4179,
62,
13376,
25,
965,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2032,
7928,
62,
19199,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
9186,
62,
2539,
10354,
705,
2536,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
3672,
10354,
705,
2536,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
4906,
10354,
705,
2536,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
22872,
10354,
705,
27313,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
7266,
62,
22872,
10354,
705,
7004,
27313,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
21949,
62,
4906,
10354,
705,
45147,
6030,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
14421,
62,
32374,
10354,
705,
600,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
14421,
62,
26060,
10354,
705,
600,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
25927,
276,
62,
32374,
10354,
705,
600,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
32374,
62,
13376,
10354,
705,
2536,
6,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
42348,
62,
8899,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
9186,
62,
2539,
10354,
705,
9186,
9218,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
3672,
10354,
705,
3672,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
4906,
10354,
705,
4906,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
22872,
10354,
705,
22872,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
7266,
62,
22872,
10354,
705,
7266,
27313,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
21949,
62,
4906,
10354,
705,
21949,
6030,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
14421,
62,
32374,
10354,
705,
14421,
39184,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
14421,
62,
26060,
10354,
705,
14421,
28350,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
25927,
276,
62,
32374,
10354,
705,
25927,
276,
39184,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
32374,
62,
13376,
10354,
705,
32374,
19580,
6,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
9186,
62,
2539,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
3672,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
4906,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
22872,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
7266,
62,
22872,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
21949,
62,
4906,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
14421,
62,
32374,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
14421,
62,
26060,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25927,
276,
62,
32374,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
32374,
62,
13376,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
4906,
796,
705,
32374,
6,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
1459,
62,
32374,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
29620,
262,
1459,
62,
32374,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
9236,
1695,
4179,
286,
262,
8271,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
1459,
62,
32374,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
493,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
14421,
62,
32374,
628,
220,
220,
220,
2488,
14421,
62,
32374,
13,
2617,
353,
198,
220,
220,
220,
825,
1459,
62,
32374,
7,
944,
11,
1459,
62,
32374,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
21394,
262,
1459,
62,
32374,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
9236,
1695,
4179,
286,
262,
8271,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
1459,
62,
32374,
25,
383,
1459,
62,
32374,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
493,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
14421,
62,
32374,
796,
1459,
62,
32374,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
1459,
62,
26060,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
29620,
262,
1459,
62,
26060,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
9236,
973,
4179,
286,
262,
8271,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
1459,
62,
26060,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
493,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
14421,
62,
26060,
628,
220,
220,
220,
2488,
14421,
62,
26060,
13,
2617,
353,
198,
220,
220,
220,
825,
1459,
62,
26060,
7,
944,
11,
1459,
62,
26060,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
21394,
262,
1459,
62,
26060,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
9236,
973,
4179,
286,
262,
8271,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
1459,
62,
26060,
25,
383,
1459,
62,
26060,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
493,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
14421,
62,
26060,
796,
1459,
62,
26060,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
9167,
62,
32374,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
29620,
262,
9167,
62,
32374,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
19390,
276,
4179,
329,
262,
8271,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
9167,
62,
32374,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
493,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
25927,
276,
62,
32374,
628,
220,
220,
220,
2488,
25927,
276,
62,
32374,
13,
2617,
353,
198,
220,
220,
220,
825,
9167,
62,
32374,
7,
944,
11,
9167,
62,
32374,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
21394,
262,
9167,
62,
32374,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
19390,
276,
4179,
329,
262,
8271,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
9167,
62,
32374,
25,
383,
9167,
62,
32374,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
493,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25927,
276,
62,
32374,
796,
9167,
62,
32374,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
4179,
62,
13376,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
29620,
262,
4179,
62,
13376,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
12678,
286,
262,
27272,
628,
220,
220,
220,
220,
220,
220,
220,
1439,
6972,
3815,
329,
428,
3119,
389,
25,
366,
2969,
41283,
1961,
1600,
366,
30709,
40,
19807,
62,
2969,
41283,
1961,
1600,
366,
11929,
62,
2969,
41283,
1961,
1600,
705,
4944,
44706,
62,
1677,
5883,
62,
39488,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
4377,
43483,
1143,
3815,
4504,
416,
257,
2139,
481,
307,
27661,
284,
705,
4944,
44706,
62,
1677,
5883,
62,
39488,
4458,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
4179,
62,
13376,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
32374,
62,
13376,
628,
220,
220,
220,
2488,
32374,
62,
13376,
13,
2617,
353,
198,
220,
220,
220,
825,
4179,
62,
13376,
7,
944,
11,
4179,
62,
13376,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
21394,
262,
4179,
62,
13376,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
12678,
286,
262,
27272,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
4179,
62,
13376,
25,
383,
4179,
62,
13376,
286,
428,
27272,
7449,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
3142,
62,
27160,
796,
14631,
2969,
41283,
1961,
1600,
366,
30709,
40,
19807,
62,
2969,
41283,
1961,
1600,
366,
11929,
62,
2969,
41283,
1961,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
1988,
62,
40845,
62,
23108,
62,
273,
62,
23108,
62,
34086,
20538,
7,
32374,
62,
13376,
11,
3142,
62,
27160,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4179,
62,
13376,
796,
705,
4944,
44706,
62,
1677,
5883,
62,
39488,
6,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
32374,
62,
13376,
796,
4179,
62,
13376,
198
] | 2.444292 | 2,908 |
from sg.sg_base import GatewayBaseTest
from remote.remote_util import RemoteMachineShellConnection
import time
help_string = ['This script creates an init service to run a sync_gateway instance.',
'If you want to install more than one service instance',
'create additional services with different names.',
'', 'sync_gateway_service_install.sh', ' -h --help',
' --runas=<The user account to run sync_gateway as; default (sync_gateway)>',
' --runbase=<The directory to run sync_gateway from; defaut (/home/sync_gateway)>',
' --sgpath=<The path to the sync_gateway executable; default (/opt/couchbase-sync-gateway/bin/sync_gateway)>',
' --cfgpath=<The path to the sync_gateway JSON config file; default (/home/sync_gateway/sync_gateway.json)>',
' --logsdir=<The path to the log file direcotry; default (/home/sync_gateway/logs)>', '']
| [
6738,
264,
70,
13,
45213,
62,
8692,
1330,
29916,
14881,
14402,
198,
6738,
6569,
13,
47960,
62,
22602,
1330,
21520,
37573,
23248,
32048,
198,
11748,
640,
198,
198,
16794,
62,
8841,
796,
37250,
1212,
4226,
8075,
281,
2315,
2139,
284,
1057,
257,
17510,
62,
10494,
1014,
4554,
2637,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
1532,
345,
765,
284,
2721,
517,
621,
530,
2139,
4554,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
17953,
3224,
2594,
351,
1180,
3891,
2637,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
3256,
705,
27261,
62,
10494,
1014,
62,
15271,
62,
17350,
13,
1477,
3256,
705,
220,
220,
220,
532,
71,
1377,
16794,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
220,
220,
220,
1377,
5143,
292,
28,
27,
464,
2836,
1848,
284,
1057,
17510,
62,
10494,
1014,
355,
26,
4277,
357,
27261,
62,
10494,
1014,
8,
29,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
220,
220,
220,
1377,
5143,
8692,
28,
27,
464,
8619,
284,
1057,
17510,
62,
10494,
1014,
422,
26,
825,
2306,
50247,
11195,
14,
27261,
62,
10494,
1014,
8,
29,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
220,
220,
220,
1377,
45213,
6978,
28,
27,
464,
3108,
284,
262,
17510,
62,
10494,
1014,
28883,
26,
4277,
50247,
8738,
14,
66,
7673,
8692,
12,
27261,
12,
10494,
1014,
14,
8800,
14,
27261,
62,
10494,
1014,
8,
29,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
220,
220,
220,
1377,
37581,
6978,
28,
27,
464,
3108,
284,
262,
17510,
62,
10494,
1014,
19449,
4566,
2393,
26,
4277,
50247,
11195,
14,
27261,
62,
10494,
1014,
14,
27261,
62,
10494,
1014,
13,
17752,
8,
29,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
220,
220,
220,
1377,
6404,
82,
15908,
28,
27,
464,
3108,
284,
262,
2604,
2393,
19958,
25557,
563,
26,
4277,
50247,
11195,
14,
27261,
62,
10494,
1014,
14,
6404,
82,
8,
29,
3256,
10148,
60,
628
] | 2.492308 | 390 |
#!/usr/bin/env python
import argparse
import math
import os
import pathlib
import re
from rich.console import Console
from rich.progress import Progress
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
1822,
29572,
198,
11748,
10688,
198,
11748,
28686,
198,
11748,
3108,
8019,
198,
11748,
302,
198,
198,
6738,
5527,
13,
41947,
1330,
24371,
198,
6738,
5527,
13,
33723,
1330,
18387,
628,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 3.174603 | 63 |
from flask import Flask, render_template, request, url_for, flash, redirect
from werkzeug.exceptions import abort
app = Flask(__name__)
app.config['SECRET_KEY'] = 'mA7OumwKVZQr9ousrge1OVQxQr51WEs7'
@app.route('/')
@app.route('/info')
@app.route('/algo') | [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
2581,
11,
19016,
62,
1640,
11,
7644,
11,
18941,
198,
6738,
266,
9587,
2736,
1018,
13,
1069,
11755,
1330,
15614,
628,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
1324,
13,
11250,
17816,
23683,
26087,
62,
20373,
20520,
796,
705,
42646,
22,
46,
388,
86,
42,
53,
57,
48,
81,
24,
516,
81,
469,
16,
8874,
48,
87,
48,
81,
4349,
8845,
82,
22,
6,
198,
198,
31,
1324,
13,
38629,
10786,
14,
11537,
198,
198,
31,
1324,
13,
38629,
10786,
14,
10951,
11537,
198,
198,
31,
1324,
13,
38629,
10786,
14,
282,
2188,
11537
] | 2.433962 | 106 |
from pathlib import Path
from black import format_str, FileMode
from autoflake import fix_code
from pyheck import snake
from genpy import (
FromImport,
Import,
Assign,
Suite,
Collection,
ImportAs,
Return,
For,
If,
Raise,
Statement,
)
from anchorpy.coder.accounts import _account_discriminator
from anchorpy.idl import (
Idl,
_IdlAccountDef,
)
from anchorpy.clientgen.genpy_extension import (
Dataclass,
Method,
ClassMethod,
TypedParam,
TypedDict,
StrDict,
StrDictEntry,
NamedArg,
Call,
Continue,
)
from anchorpy.clientgen.common import (
_json_interface_name,
_py_type_from_idl,
_idl_type_to_json_type,
_layout_for_type,
_field_from_decoded,
_field_to_json,
_field_from_json,
)
| [
6738,
3108,
8019,
1330,
10644,
198,
6738,
2042,
1330,
5794,
62,
2536,
11,
9220,
19076,
198,
6738,
1960,
1659,
27180,
1330,
4259,
62,
8189,
198,
6738,
12972,
258,
694,
1330,
17522,
198,
6738,
2429,
9078,
1330,
357,
198,
220,
220,
220,
3574,
20939,
11,
198,
220,
220,
220,
17267,
11,
198,
220,
220,
220,
2195,
570,
11,
198,
220,
220,
220,
26264,
11,
198,
220,
220,
220,
12251,
11,
198,
220,
220,
220,
17267,
1722,
11,
198,
220,
220,
220,
8229,
11,
198,
220,
220,
220,
1114,
11,
198,
220,
220,
220,
1002,
11,
198,
220,
220,
220,
35123,
11,
198,
220,
220,
220,
21983,
11,
198,
8,
198,
6738,
18021,
9078,
13,
66,
12342,
13,
23317,
82,
1330,
4808,
23317,
62,
15410,
3036,
20900,
198,
6738,
18021,
9078,
13,
312,
75,
1330,
357,
198,
220,
220,
220,
5121,
75,
11,
198,
220,
220,
220,
4808,
7390,
75,
30116,
7469,
11,
198,
8,
198,
6738,
18021,
9078,
13,
16366,
5235,
13,
5235,
9078,
62,
2302,
3004,
1330,
357,
198,
220,
220,
220,
16092,
330,
31172,
11,
198,
220,
220,
220,
11789,
11,
198,
220,
220,
220,
5016,
17410,
11,
198,
220,
220,
220,
17134,
276,
22973,
11,
198,
220,
220,
220,
17134,
276,
35,
713,
11,
198,
220,
220,
220,
4285,
35,
713,
11,
198,
220,
220,
220,
4285,
35,
713,
30150,
11,
198,
220,
220,
220,
34441,
28100,
11,
198,
220,
220,
220,
4889,
11,
198,
220,
220,
220,
10054,
11,
198,
8,
198,
6738,
18021,
9078,
13,
16366,
5235,
13,
11321,
1330,
357,
198,
220,
220,
220,
4808,
17752,
62,
39994,
62,
3672,
11,
198,
220,
220,
220,
4808,
9078,
62,
4906,
62,
6738,
62,
312,
75,
11,
198,
220,
220,
220,
4808,
312,
75,
62,
4906,
62,
1462,
62,
17752,
62,
4906,
11,
198,
220,
220,
220,
4808,
39786,
62,
1640,
62,
4906,
11,
198,
220,
220,
220,
4808,
3245,
62,
6738,
62,
12501,
9043,
11,
198,
220,
220,
220,
4808,
3245,
62,
1462,
62,
17752,
11,
198,
220,
220,
220,
4808,
3245,
62,
6738,
62,
17752,
11,
198,
8,
628,
628,
628
] | 2.320809 | 346 |
import numpy as np
import sys
sys.path.append('../../../tools/')
import fitting_functions
import os
import scipy.io as sio
import scipy.optimize
import tqdm
if __name__ == "__main__":
file_names = [ ('090711e_0006',), ('090811c_0002',), ('090811d_0002','090811d_0004',),
('091111a_0001', '091111a_0003'), ('091111c_0003',), ('091211a_0002', '091211a_0005')]
best_num_components = {'090711e':3, '090811c':3, '090811d':3, '091111a':4, '091111c':3, '091211a':3}
T_start = 17 # ~130 ms
if not os.path.isdir('deconv'):
os.makedirs('deconv')
if not os.path.isdir('deconv/distributed'):
os.makedirs('deconv/distributed')
if not os.path.isdir('deconv/fast'):
os.makedirs('deconv/fast')
for fish_num in tqdm.trange(len(file_names), desc='Fish'):
fish_name = file_names[fish_num][0][:-5]
n = best_num_components[fish_name]
# Load plants
plant_file = sio.loadmat('../plants/best/distributed/'+fish_name+'.mat')
plant = plant_file['plant'][0]
plant_file = sio.loadmat('../plants/best/fast/'+fish_name+'.mat')
plant_fast = plant_file['plant'][0]
for trace_num in range(len(file_names[fish_num])):
saccade_data_file = sio.loadmat('fit/'+file_names[fish_num][trace_num]+'.mat')
trange_sacc = saccade_data_file['trange'][0]
eye_pos_sacc = saccade_data_file['model'][0]
drive = deconvolveEyePos(trange_sacc, eye_pos_sacc, plant)
drive_fast = deconvolveEyePos(trange_sacc, eye_pos_sacc, fast_plant)
sio.savemat('deconv/distributed/'+file_names[fish_num][trace_num]+'.mat', {'drive': drive})
sio.savemat('deconv/fast/'+file_names[fish_num][trace_num]+'.mat', {'drive': drive_fast})
| [
11748,
299,
32152,
355,
45941,
198,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
40720,
40720,
40720,
31391,
14,
11537,
198,
11748,
15830,
62,
12543,
2733,
198,
198,
11748,
28686,
198,
198,
11748,
629,
541,
88,
13,
952,
355,
264,
952,
198,
11748,
629,
541,
88,
13,
40085,
1096,
198,
11748,
256,
80,
36020,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
2393,
62,
14933,
796,
685,
19203,
2931,
2998,
1157,
68,
62,
830,
21,
3256,
828,
19203,
2931,
2919,
1157,
66,
62,
34215,
3256,
828,
19203,
2931,
2919,
1157,
67,
62,
34215,
41707,
2931,
2919,
1157,
67,
62,
830,
19,
3256,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
2931,
26259,
64,
62,
18005,
3256,
705,
2931,
26259,
64,
62,
830,
18,
33809,
19203,
2931,
26259,
66,
62,
830,
18,
3256,
828,
19203,
2931,
1065,
1157,
64,
62,
34215,
3256,
705,
2931,
1065,
1157,
64,
62,
830,
20,
11537,
60,
198,
220,
220,
220,
1266,
62,
22510,
62,
5589,
3906,
796,
1391,
6,
2931,
2998,
1157,
68,
10354,
18,
11,
705,
2931,
2919,
1157,
66,
10354,
18,
11,
705,
2931,
2919,
1157,
67,
10354,
18,
11,
705,
2931,
26259,
64,
10354,
19,
11,
705,
2931,
26259,
66,
10354,
18,
11,
705,
2931,
1065,
1157,
64,
10354,
18,
92,
198,
220,
220,
220,
309,
62,
9688,
796,
1596,
1303,
5299,
12952,
13845,
628,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
9409,
343,
10786,
12501,
261,
85,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
76,
4335,
17062,
10786,
12501,
261,
85,
11537,
198,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
9409,
343,
10786,
12501,
261,
85,
14,
17080,
6169,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
76,
4335,
17062,
10786,
12501,
261,
85,
14,
17080,
6169,
11537,
198,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
9409,
343,
10786,
12501,
261,
85,
14,
7217,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
76,
4335,
17062,
10786,
12501,
261,
85,
14,
7217,
11537,
198,
220,
220,
220,
329,
5916,
62,
22510,
287,
256,
80,
36020,
13,
2213,
858,
7,
11925,
7,
7753,
62,
14933,
828,
1715,
11639,
39428,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5916,
62,
3672,
796,
2393,
62,
14933,
58,
11084,
62,
22510,
7131,
15,
7131,
21912,
20,
60,
198,
220,
220,
220,
220,
220,
220,
220,
299,
796,
1266,
62,
22510,
62,
5589,
3906,
58,
11084,
62,
3672,
60,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
8778,
6134,
198,
220,
220,
220,
220,
220,
220,
220,
4618,
62,
7753,
796,
264,
952,
13,
2220,
6759,
10786,
40720,
489,
1187,
14,
13466,
14,
17080,
6169,
14,
6,
10,
11084,
62,
3672,
10,
4458,
6759,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
4618,
796,
4618,
62,
7753,
17816,
15060,
6,
7131,
15,
60,
628,
220,
220,
220,
220,
220,
220,
220,
4618,
62,
7753,
796,
264,
952,
13,
2220,
6759,
10786,
40720,
489,
1187,
14,
13466,
14,
7217,
14,
6,
10,
11084,
62,
3672,
10,
4458,
6759,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
4618,
62,
7217,
796,
4618,
62,
7753,
17816,
15060,
6,
7131,
15,
60,
628,
220,
220,
220,
220,
220,
220,
220,
329,
12854,
62,
22510,
287,
2837,
7,
11925,
7,
7753,
62,
14933,
58,
11084,
62,
22510,
12962,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
4134,
671,
62,
7890,
62,
7753,
796,
264,
952,
13,
2220,
6759,
10786,
11147,
14,
6,
10,
7753,
62,
14933,
58,
11084,
62,
22510,
7131,
40546,
62,
22510,
48688,
4458,
6759,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
491,
858,
62,
82,
4134,
796,
264,
4134,
671,
62,
7890,
62,
7753,
17816,
2213,
858,
6,
7131,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4151,
62,
1930,
62,
82,
4134,
796,
264,
4134,
671,
62,
7890,
62,
7753,
17816,
19849,
6,
7131,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3708,
796,
37431,
85,
6442,
24876,
21604,
7,
2213,
858,
62,
82,
4134,
11,
4151,
62,
1930,
62,
82,
4134,
11,
4618,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3708,
62,
7217,
796,
37431,
85,
6442,
24876,
21604,
7,
2213,
858,
62,
82,
4134,
11,
4151,
62,
1930,
62,
82,
4134,
11,
3049,
62,
15060,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
952,
13,
21928,
6759,
10786,
12501,
261,
85,
14,
17080,
6169,
14,
6,
10,
7753,
62,
14933,
58,
11084,
62,
22510,
7131,
40546,
62,
22510,
48688,
4458,
6759,
3256,
1391,
6,
19472,
10354,
3708,
30072,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
952,
13,
21928,
6759,
10786,
12501,
261,
85,
14,
7217,
14,
6,
10,
7753,
62,
14933,
58,
11084,
62,
22510,
7131,
40546,
62,
22510,
48688,
4458,
6759,
3256,
1391,
6,
19472,
10354,
3708,
62,
7217,
30072,
198
] | 2.081871 | 855 |
# -*- coding: utf-8 -*-
# Thanks to https://github.com/ericsun99/Shufflenet-v2-Pytorch
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from collections import OrderedDict
from torch.nn import init
import math
__all__ = ['shufflenet_v2', 'ShuffleNetV2']
if __name__ == "__main__":
"""Testing
"""
from torchsummary import summary
model = shufflenet_v2(pretrained=True, output_stride=16)
summary(model, [3, 224, 224], device='cpu')
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
6930,
284,
3740,
1378,
12567,
13,
785,
14,
263,
873,
403,
2079,
14,
2484,
1648,
11925,
316,
12,
85,
17,
12,
20519,
13165,
354,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
28034,
13,
20471,
1330,
2315,
198,
11748,
10688,
198,
198,
834,
439,
834,
796,
37250,
1477,
1648,
11925,
316,
62,
85,
17,
3256,
705,
2484,
18137,
7934,
53,
17,
20520,
628,
628,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
37227,
44154,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
422,
28034,
49736,
1330,
10638,
628,
220,
220,
220,
2746,
796,
32299,
11925,
316,
62,
85,
17,
7,
5310,
13363,
28,
17821,
11,
5072,
62,
2536,
485,
28,
1433,
8,
198,
220,
220,
220,
10638,
7,
19849,
11,
685,
18,
11,
26063,
11,
26063,
4357,
3335,
11639,
36166,
11537,
198
] | 2.734043 | 188 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2017
#
# Distributed under terms of the MIT license.
import click
import datetime
import logging
import logging.config
import multiprocessing
import os
import sys
import uuid
from utilities import get_features_from_geojson
from utilities import get_organization
from utilities import get_pyeve_formatted_datetime
from utilities import post_feature
logging.config.fileConfig(
os.path.join(os.path.dirname(os.path.realpath(__file__)), 'logging.conf'))
logger = logging.getLogger("aclu_importer.tmks")
@click.command()
@click.option('--tmk_features_path', help='Path to tmk features file being imported.', required=True, type=click.Path(exists=True))
@click.option('--api_base_url', default='http://localhost:50050', help='API base url. Defaults to http://localhost:50050')
if __name__ == '__main__':
import_tmk()
# vim: fenc=utf-8
# vim: filetype=python
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
10673,
2177,
198,
2,
198,
2,
4307,
6169,
739,
2846,
286,
262,
17168,
5964,
13,
198,
198,
11748,
3904,
198,
11748,
4818,
8079,
198,
11748,
18931,
198,
11748,
18931,
13,
11250,
198,
11748,
18540,
305,
919,
278,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
334,
27112,
628,
198,
6738,
20081,
1330,
651,
62,
40890,
62,
6738,
62,
469,
13210,
1559,
198,
6738,
20081,
1330,
651,
62,
9971,
1634,
198,
6738,
20081,
1330,
651,
62,
79,
5948,
303,
62,
687,
16898,
62,
19608,
8079,
198,
6738,
20081,
1330,
1281,
62,
30053,
628,
198,
6404,
2667,
13,
11250,
13,
7753,
16934,
7,
198,
220,
220,
220,
28686,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
5305,
6978,
7,
834,
7753,
834,
36911,
705,
6404,
2667,
13,
10414,
6,
4008,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7203,
330,
2290,
62,
320,
26634,
13,
17209,
591,
4943,
628,
198,
31,
12976,
13,
21812,
3419,
198,
31,
12976,
13,
18076,
10786,
438,
17209,
74,
62,
40890,
62,
6978,
3256,
1037,
11639,
15235,
284,
256,
28015,
3033,
2393,
852,
17392,
2637,
11,
2672,
28,
17821,
11,
2099,
28,
12976,
13,
15235,
7,
1069,
1023,
28,
17821,
4008,
198,
31,
12976,
13,
18076,
10786,
438,
15042,
62,
8692,
62,
6371,
3256,
4277,
11639,
4023,
1378,
36750,
25,
4059,
1120,
3256,
1037,
11639,
17614,
2779,
19016,
13,
2896,
13185,
284,
2638,
1378,
36750,
25,
4059,
1120,
11537,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1330,
62,
17209,
74,
3419,
198,
198,
2,
43907,
25,
277,
12685,
28,
40477,
12,
23,
198,
2,
43907,
25,
2393,
4906,
28,
29412,
198
] | 3.009677 | 310 |
from src.models.version_model import VersionModel
| [
6738,
12351,
13,
27530,
13,
9641,
62,
19849,
1330,
10628,
17633,
628,
628
] | 4.076923 | 13 |
width = 300
height = 450
box_size = 35
x = width / box_size
y = height / box_size
File = "/interface/kirk.gif"
| [
10394,
796,
5867,
198,
17015,
796,
18523,
198,
3524,
62,
7857,
796,
3439,
198,
87,
796,
9647,
1220,
3091,
62,
7857,
198,
88,
796,
6001,
1220,
3091,
62,
7857,
198,
8979,
796,
12813,
39994,
14,
74,
14232,
13,
27908,
1,
628
] | 2.731707 | 41 |
"""add skipped_transaction level column
Revision ID: f775fb87f5ff
Revises: be27a2794f75
Create Date: 2022-01-12 22:32:24.949547
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "f775fb87f5ff"
down_revision = "be27a2794f75"
branch_labels = None
depends_on = None
| [
37811,
2860,
26684,
62,
7645,
2673,
1241,
5721,
198,
198,
18009,
1166,
4522,
25,
277,
34483,
21855,
5774,
69,
20,
487,
198,
18009,
2696,
25,
307,
1983,
64,
1983,
5824,
69,
2425,
198,
16447,
7536,
25,
33160,
12,
486,
12,
1065,
2534,
25,
2624,
25,
1731,
13,
24,
33781,
2857,
198,
198,
37811,
198,
6738,
31341,
2022,
291,
1330,
1034,
198,
11748,
44161,
282,
26599,
355,
473,
628,
198,
2,
18440,
42814,
11,
973,
416,
9300,
2022,
291,
13,
198,
260,
10178,
796,
366,
69,
34483,
21855,
5774,
69,
20,
487,
1,
198,
2902,
62,
260,
10178,
796,
366,
1350,
1983,
64,
1983,
5824,
69,
2425,
1,
198,
1671,
3702,
62,
23912,
1424,
796,
6045,
198,
10378,
2412,
62,
261,
796,
6045,
628,
198
] | 2.596774 | 124 |
import sqlite3
sqlite3.register_adapter(Point, adapt_point)
con = sqlite3.connect(":memory:")
cur = con.cursor()
p = Point(4.0, -3.2)
cur.execute("select ?", (p,))
print(cur.fetchone()[0])
con.close()
| [
11748,
44161,
578,
18,
198,
198,
25410,
578,
18,
13,
30238,
62,
324,
3429,
7,
12727,
11,
6068,
62,
4122,
8,
198,
198,
1102,
796,
44161,
578,
18,
13,
8443,
7,
1298,
31673,
25,
4943,
198,
22019,
796,
369,
13,
66,
21471,
3419,
198,
198,
79,
796,
6252,
7,
19,
13,
15,
11,
532,
18,
13,
17,
8,
198,
22019,
13,
41049,
7203,
19738,
5633,
1600,
357,
79,
11,
4008,
198,
4798,
7,
22019,
13,
69,
7569,
505,
3419,
58,
15,
12962,
198,
198,
1102,
13,
19836,
3419,
198
] | 2.303371 | 89 |
# schedule 0.5.0
import schedule
import time
# 1분마다 호출
schedule.every().minutes.do(job)
while True:
schedule.run_pending()
time.sleep(1) | [
2,
7269,
657,
13,
20,
13,
15,
198,
198,
11748,
7269,
198,
11748,
640,
198,
198,
2,
352,
167,
114,
226,
167,
100,
230,
46695,
97,
220,
169,
246,
116,
168,
114,
250,
198,
15952,
5950,
13,
16833,
22446,
1084,
1769,
13,
4598,
7,
21858,
8,
198,
198,
4514,
6407,
25,
198,
220,
220,
220,
7269,
13,
5143,
62,
79,
1571,
3419,
198,
220,
220,
220,
640,
13,
42832,
7,
16,
8
] | 2.041667 | 72 |
import os
from dotenv import load_dotenv
from pathlib import Path
env_path = Path('.') / '.env'
load_dotenv(dotenv_path=env_path)
############################# CONNECTION TO ELASTICSEARCH LOCALHOST #############################
# username = os.environ.get('ELASTICSEARCH_USERNAME_LOCALHOST')
# password = os.environ.get('ELASTICSEARCH_PASSWORD_LOCALHOST')
# ES_HOST = {"host": "localhost", "port": 9200}
############################# CONNECTION TO CLOUD ELASTICSEARCH #################################
username = os.getenv('ELASTIC_CLOUD_USERNAME')
password = os.getenv('ELASTIC_CLOUD_PASSWORD')
ES_HOST = "REPLACE_THIS_WITH_YOUR_ES_HOST"
################################################################################################# | [
11748,
28686,
198,
198,
6738,
16605,
24330,
1330,
3440,
62,
26518,
24330,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
24330,
62,
6978,
796,
10644,
10786,
2637,
8,
1220,
45302,
24330,
6,
198,
2220,
62,
26518,
24330,
7,
26518,
24330,
62,
6978,
28,
24330,
62,
6978,
8,
198,
198,
14468,
7804,
4242,
2,
7102,
45,
24565,
5390,
17852,
11262,
2149,
5188,
31315,
37347,
1847,
39,
10892,
1303,
14468,
7804,
4242,
198,
2,
20579,
796,
28686,
13,
268,
2268,
13,
1136,
10786,
3698,
11262,
2149,
5188,
31315,
62,
29904,
20608,
62,
29701,
1847,
39,
10892,
11537,
198,
2,
9206,
796,
28686,
13,
268,
2268,
13,
1136,
10786,
3698,
11262,
2149,
5188,
31315,
62,
47924,
54,
12532,
62,
29701,
1847,
39,
10892,
11537,
198,
2,
13380,
62,
39,
10892,
796,
19779,
4774,
1298,
366,
36750,
1600,
366,
634,
1298,
860,
2167,
92,
198,
14468,
7804,
4242,
2,
7102,
45,
24565,
5390,
7852,
2606,
35,
17852,
11262,
2149,
5188,
31315,
1303,
29113,
198,
29460,
796,
28686,
13,
1136,
24330,
10786,
3698,
11262,
2149,
62,
5097,
2606,
35,
62,
29904,
20608,
11537,
198,
28712,
796,
28686,
13,
1136,
24330,
10786,
3698,
11262,
2149,
62,
5097,
2606,
35,
62,
47924,
54,
12532,
11537,
198,
1546,
62,
39,
10892,
796,
366,
2200,
6489,
11598,
62,
43559,
62,
54,
10554,
62,
56,
11698,
62,
1546,
62,
39,
10892,
1,
198,
29113,
29113,
29113,
2
] | 3.255507 | 227 |
from itertools import *
import benchbase
from benchbase import with_text, children, nochange
############################################################
# Benchmarks
############################################################
if __name__ == "__main__":
benchbase.main(BenchMark)
| [
6738,
340,
861,
10141,
1330,
1635,
198,
198,
11748,
7624,
8692,
198,
6738,
7624,
8692,
1330,
351,
62,
5239,
11,
1751,
11,
645,
3803,
198,
198,
29113,
14468,
7804,
4242,
198,
2,
25187,
14306,
198,
29113,
14468,
7804,
4242,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
7624,
8692,
13,
12417,
7,
44199,
9704,
8,
198
] | 4.461538 | 65 |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from . import outputs
__all__ = [
'ContainerClone',
'ContainerConsole',
'ContainerCpu',
'ContainerDisk',
'ContainerInitialization',
'ContainerInitializationDns',
'ContainerInitializationIpConfig',
'ContainerInitializationIpConfigIpv4',
'ContainerInitializationIpConfigIpv6',
'ContainerInitializationUserAccount',
'ContainerMemory',
'ContainerNetworkInterface',
'ContainerOperatingSystem',
]
@pulumi.output_type
@pulumi.output_type
@pulumi.output_type
@pulumi.output_type
@pulumi.output_type
@pulumi.output_type
@pulumi.output_type
@pulumi.output_type
@pulumi.output_type
@pulumi.output_type
@pulumi.output_type
@pulumi.output_type
@pulumi.output_type
| [
2,
19617,
28,
40477,
12,
23,
198,
2,
17202,
39410,
25,
428,
2393,
373,
7560,
416,
262,
21624,
12994,
24118,
687,
10290,
357,
27110,
5235,
8,
16984,
13,
17202,
198,
2,
17202,
2141,
407,
4370,
416,
1021,
4556,
345,
821,
1728,
345,
760,
644,
345,
389,
1804,
0,
17202,
198,
198,
11748,
14601,
198,
11748,
17472,
12994,
198,
11748,
17472,
12994,
13,
43282,
198,
6738,
19720,
1330,
4377,
11,
337,
5912,
11,
32233,
11,
45835,
11,
4479,
198,
6738,
11485,
1330,
4808,
315,
2410,
11,
4808,
83,
2977,
198,
6738,
764,
1330,
23862,
198,
198,
834,
439,
834,
796,
685,
198,
220,
220,
220,
705,
29869,
2601,
505,
3256,
198,
220,
220,
220,
705,
29869,
47581,
3256,
198,
220,
220,
220,
705,
29869,
34,
19944,
3256,
198,
220,
220,
220,
705,
29869,
40961,
3256,
198,
220,
220,
220,
705,
29869,
24243,
1634,
3256,
198,
220,
220,
220,
705,
29869,
24243,
1634,
35,
5907,
3256,
198,
220,
220,
220,
705,
29869,
24243,
1634,
40,
79,
16934,
3256,
198,
220,
220,
220,
705,
29869,
24243,
1634,
40,
79,
16934,
40,
79,
85,
19,
3256,
198,
220,
220,
220,
705,
29869,
24243,
1634,
40,
79,
16934,
40,
79,
85,
21,
3256,
198,
220,
220,
220,
705,
29869,
24243,
1634,
12982,
30116,
3256,
198,
220,
220,
220,
705,
29869,
30871,
3256,
198,
220,
220,
220,
705,
29869,
26245,
39317,
3256,
198,
220,
220,
220,
705,
29869,
18843,
803,
11964,
3256,
198,
60,
198,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198,
31,
79,
377,
12994,
13,
22915,
62,
4906,
628,
198
] | 2.87027 | 370 |
# Copyright (C) 2017-2019 New York University,
# University at Buffalo,
# Illinois Institute of Technology.
#
# 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.
"""Vizier web service application object. We currently use Flask microframework
to build the web service. The web service is the main access point for the
Vizier front end and for any other (remote) clients.
"""
import logging
import os
from flask import Flask, jsonify, make_response, redirect
from flask_cors import CORS # type: ignore[import]
from logging.handlers import RotatingFileHandler
from vizier.config.app import AppConfig
import vizier.api.base as srv
import vizier.config.base as const
def create_app() -> Flask:
"""Factory pattern for Flask. Initialize the Flask application object.
Returns
-------
Flask
"""
#Get application configuration parameters from environment variables.
config = AppConfig()
# Create the app and enable cross-origin resource sharing
app = Flask(__name__)
#app.config['APPLICATION_ROOT'] = config.webservice.app_path
#app.config['DEBUG'] = True
# Set size limit for uploaded files
app.config['MAX_CONTENT_LENGTH'] = config.webservice.defaults.max_file_size
# Enable CORS
CORS(app)
# Switch logging on
log_dir = os.path.abspath(config.logs.server)
# Create the directory if it does not exist
if not os.path.isdir(log_dir):
os.makedirs(log_dir)
# File handle for server logs
file_handler = RotatingFileHandler(
os.path.join(log_dir, 'vizier-webapi.log'),
maxBytes=1024 * 1024 * 100,
backupCount=20
)
file_handler.setLevel(logging.ERROR)
file_handler.setFormatter(
logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")
)
app.logger.addHandler(file_handler)
# --------------------------------------------------------------------------
#
# Error Handler
#
# --------------------------------------------------------------------------
@app.errorhandler(srv.ServerRequestException)
def invalid_request_or_resource_not_found(error):
"""JSON response handler for invalid requests or requests that access
unknown resources.
Parameters
----------
error : Exception
Exception thrown by request Handler
Returns
-------
Http response
"""
app.logger.error(error.message)
response = jsonify(error.to_dict())
response.status_code = error.status_code
return response
@app.errorhandler(413)
def upload_error(exception):
"""Exception handler for file uploads that exceed the file size limit."""
app.logger.error(exception)
return make_response(jsonify({'title':'Error', 'message': str(exception), 'error': str(exception)}), 413)
@app.errorhandler(500)
def internal_error(exception):
"""Exception handler that logs exceptions."""
app.logger.error(exception)
return make_response(jsonify({'title':'Error', 'message': str(exception), 'error': str(exception)}), 500)
# Register the API blueprint
from . import server
app.register_blueprint(server.bp)
# Return the applicatio object
# --------------------------------------------------------------------------
#
# Initialize
#
# --------------------------------------------------------------------------
@app.before_first_request
def initialize():
"""Initialize Mimir gateway (if necessary) before the first request.
"""
# Initialize the Mimir gateway if using Mimir engine
if config.engine.identifier == const.MIMIR_ENGINE:
import vizier.mimir as mimir
print("Using Mimir at {}".format(mimir._mimir_url))
root_redirect_path = "{}/web-ui/vizier-db".format(server.bp.url_prefix)
@app.route("/")
def handle_root():
"""Redirect users to the web UI
"""
return redirect(root_redirect_path)
return app
| [
2,
15069,
357,
34,
8,
2177,
12,
23344,
968,
1971,
2059,
11,
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,
2059,
379,
14905,
11,
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,
9486,
5136,
286,
8987,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
198,
37811,
53,
528,
959,
3992,
2139,
3586,
2134,
13,
775,
3058,
779,
46947,
4580,
30604,
198,
1462,
1382,
262,
3992,
2139,
13,
383,
3992,
2139,
318,
262,
1388,
1895,
966,
329,
262,
198,
53,
528,
959,
2166,
886,
290,
329,
597,
584,
357,
47960,
8,
7534,
13,
198,
37811,
198,
198,
11748,
18931,
198,
11748,
28686,
198,
198,
6738,
42903,
1330,
46947,
11,
33918,
1958,
11,
787,
62,
26209,
11,
18941,
198,
6738,
42903,
62,
66,
669,
1330,
327,
20673,
1303,
2099,
25,
8856,
58,
11748,
60,
198,
6738,
18931,
13,
4993,
8116,
1330,
18481,
803,
8979,
25060,
198,
198,
6738,
48569,
959,
13,
11250,
13,
1324,
1330,
2034,
16934,
198,
198,
11748,
48569,
959,
13,
15042,
13,
8692,
355,
19677,
85,
198,
11748,
48569,
959,
13,
11250,
13,
8692,
355,
1500,
628,
198,
4299,
2251,
62,
1324,
3419,
4613,
46947,
25,
198,
220,
220,
220,
37227,
22810,
3912,
329,
46947,
13,
20768,
1096,
262,
46947,
3586,
2134,
13,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
46947,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
3855,
3586,
8398,
10007,
422,
2858,
9633,
13,
198,
220,
220,
220,
4566,
796,
2034,
16934,
3419,
198,
220,
220,
220,
1303,
13610,
262,
598,
290,
7139,
3272,
12,
47103,
8271,
7373,
198,
220,
220,
220,
598,
796,
46947,
7,
834,
3672,
834,
8,
198,
220,
220,
220,
1303,
1324,
13,
11250,
17816,
2969,
31484,
6234,
62,
13252,
2394,
20520,
796,
4566,
13,
732,
1443,
712,
501,
13,
1324,
62,
6978,
198,
220,
220,
220,
1303,
1324,
13,
11250,
17816,
30531,
20520,
796,
6407,
198,
220,
220,
220,
1303,
5345,
2546,
4179,
329,
19144,
3696,
198,
220,
220,
220,
598,
13,
11250,
17816,
22921,
62,
37815,
3525,
62,
43,
49494,
20520,
796,
4566,
13,
732,
1443,
712,
501,
13,
12286,
82,
13,
9806,
62,
7753,
62,
7857,
198,
220,
220,
220,
1303,
27882,
327,
20673,
198,
220,
220,
220,
327,
20673,
7,
1324,
8,
198,
220,
220,
220,
1303,
14645,
18931,
319,
198,
220,
220,
220,
2604,
62,
15908,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
11250,
13,
6404,
82,
13,
15388,
8,
198,
220,
220,
220,
1303,
13610,
262,
8619,
611,
340,
857,
407,
2152,
198,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
9409,
343,
7,
6404,
62,
15908,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
76,
4335,
17062,
7,
6404,
62,
15908,
8,
198,
220,
220,
220,
1303,
9220,
5412,
329,
4382,
17259,
198,
220,
220,
220,
2393,
62,
30281,
796,
18481,
803,
8979,
25060,
7,
198,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
6978,
13,
22179,
7,
6404,
62,
15908,
11,
705,
85,
528,
959,
12,
12384,
15042,
13,
6404,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
3509,
45992,
28,
35500,
1635,
28119,
1635,
1802,
11,
198,
220,
220,
220,
220,
220,
220,
220,
11559,
12332,
28,
1238,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
2393,
62,
30281,
13,
2617,
4971,
7,
6404,
2667,
13,
24908,
8,
198,
220,
220,
220,
2393,
62,
30281,
13,
2617,
8479,
1436,
7,
198,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
8479,
1436,
7203,
4,
7,
292,
310,
524,
8,
82,
532,
4064,
7,
5715,
3672,
8,
82,
532,
4064,
7,
20500,
8,
82,
4943,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
598,
13,
6404,
1362,
13,
2860,
25060,
7,
7753,
62,
30281,
8,
628,
220,
220,
220,
1303,
16529,
35937,
198,
220,
220,
220,
1303,
198,
220,
220,
220,
1303,
13047,
32412,
198,
220,
220,
220,
1303,
198,
220,
220,
220,
1303,
16529,
35937,
628,
220,
220,
220,
2488,
1324,
13,
18224,
30281,
7,
27891,
85,
13,
10697,
18453,
16922,
8,
198,
220,
220,
220,
825,
12515,
62,
25927,
62,
273,
62,
31092,
62,
1662,
62,
9275,
7,
18224,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
40386,
2882,
21360,
329,
12515,
7007,
393,
7007,
326,
1895,
198,
220,
220,
220,
220,
220,
220,
220,
6439,
4133,
13,
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,
4049,
1058,
35528,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
35528,
8754,
416,
2581,
32412,
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,
367,
29281,
2882,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
598,
13,
6404,
1362,
13,
18224,
7,
18224,
13,
20500,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2882,
796,
33918,
1958,
7,
18224,
13,
1462,
62,
11600,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
2882,
13,
13376,
62,
8189,
796,
4049,
13,
13376,
62,
8189,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2882,
628,
198,
220,
220,
220,
2488,
1324,
13,
18224,
30281,
7,
44103,
8,
198,
220,
220,
220,
825,
9516,
62,
18224,
7,
1069,
4516,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
16922,
21360,
329,
2393,
9516,
82,
326,
7074,
262,
2393,
2546,
4179,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
598,
13,
6404,
1362,
13,
18224,
7,
1069,
4516,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
787,
62,
26209,
7,
17752,
1958,
15090,
6,
7839,
10354,
6,
12331,
3256,
705,
20500,
10354,
965,
7,
1069,
4516,
828,
705,
18224,
10354,
965,
7,
1069,
4516,
38165,
828,
46618,
8,
628,
198,
220,
220,
220,
2488,
1324,
13,
18224,
30281,
7,
4059,
8,
198,
220,
220,
220,
825,
5387,
62,
18224,
7,
1069,
4516,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
16922,
21360,
326,
17259,
13269,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
598,
13,
6404,
1362,
13,
18224,
7,
1069,
4516,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
787,
62,
26209,
7,
17752,
1958,
15090,
6,
7839,
10354,
6,
12331,
3256,
705,
20500,
10354,
965,
7,
1069,
4516,
828,
705,
18224,
10354,
965,
7,
1069,
4516,
38165,
828,
5323,
8,
628,
220,
220,
220,
1303,
17296,
262,
7824,
30881,
198,
220,
220,
220,
422,
764,
1330,
4382,
198,
220,
220,
220,
598,
13,
30238,
62,
17585,
4798,
7,
15388,
13,
46583,
8,
198,
220,
220,
220,
1303,
8229,
262,
2161,
39485,
2134,
628,
220,
220,
220,
1303,
16529,
35937,
198,
220,
220,
220,
1303,
198,
220,
220,
220,
1303,
20768,
1096,
198,
220,
220,
220,
1303,
198,
220,
220,
220,
1303,
16529,
35937,
628,
220,
220,
220,
2488,
1324,
13,
19052,
62,
11085,
62,
25927,
198,
220,
220,
220,
825,
41216,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
24243,
1096,
337,
13057,
24308,
357,
361,
3306,
8,
878,
262,
717,
2581,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
20768,
1096,
262,
337,
13057,
24308,
611,
1262,
337,
13057,
3113,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4566,
13,
18392,
13,
738,
7483,
6624,
1500,
13,
44,
3955,
4663,
62,
26808,
8881,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1330,
48569,
959,
13,
76,
13057,
355,
285,
13057,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
12814,
337,
13057,
379,
23884,
1911,
18982,
7,
76,
13057,
13557,
76,
13057,
62,
6371,
4008,
628,
220,
220,
220,
6808,
62,
445,
1060,
62,
6978,
796,
45144,
92,
14,
12384,
12,
9019,
14,
85,
528,
959,
12,
9945,
1911,
18982,
7,
15388,
13,
46583,
13,
6371,
62,
40290,
8,
628,
220,
220,
220,
2488,
1324,
13,
38629,
7203,
14,
4943,
198,
220,
220,
220,
825,
5412,
62,
15763,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
7738,
1060,
2985,
284,
262,
3992,
12454,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
18941,
7,
15763,
62,
445,
1060,
62,
6978,
8,
628,
198,
220,
220,
220,
1441,
598,
198
] | 2.914812 | 1,573 |
import hmac
import hashlib
import base64
import json
import re
import time
def extractAndValidateBody(
body: str,
key: str = "",
signature: str = "",
isBase64: bool = False,
with_validate: bool = True,
) -> dict:
"""
Basic parsing of the body, including optional validation of a HMAC, to a dict
>>> t = int(time.time())
>>> valid_body = f'{{ "subnet": "123", "sg": "456", "repo": "789", "time": {t} }}'
>>> valid_b64b = base64.b64encode(valid_body.encode("utf-8")).decode("utf-8")
>>> test1 = extractAndValidateBody(valid_b64b, isBase64=True, with_validate=False)
>>> test1.pop("time") != "0"
True
>>> test1
{'subnet': '123', 'sg': '456', 'repo': '789'}
>>> test2 = extractAndValidateBody(valid_body, with_validate=False)
>>> test2.pop("time") != "0"
True
>>> test2
{'subnet': '123', 'sg': '456', 'repo': '789'}
>>> kinda_valid = f'{{ "subnet": "123", "sg": "456", "repo": "789", "time": {t} }}'
>>> test3 = extractAndValidateBody(kinda_valid, with_validate=False)
>>> test3.pop("time") != "0"
True
>>> test3
{'subnet': '123', 'sg': '456', 'repo': '789'}
>>> with open('tests/fixtures/example.json') as json_file:
... example = json.load(json_file)
>>> example["body"] = example["body"].replace("111", str(t))
>>> test4 = extractAndValidateBody(example["body"], with_validate=False)
>>> test4.pop("time") != "0"
True
>>> test4
{'subnet': '123', 'sg': '456', 'repo': '789'}
>>> key = "abcdefg"
>>> h = hmac.new(key.encode("utf-8"), valid_body.encode("utf-8"), hashlib.sha512)
>>> test5 = extractAndValidateBody(valid_body, key=key, signature=h.hexdigest())
>>> test5.pop("time") != "0"
True
>>> test5
{'subnet': '123', 'sg': '456', 'repo': '789'}
>>> try:
... extractAndValidateBody(key="12345", body="{}")
... except Exception as e:
... print(e)
key or signature missing
>>> try:
... extractAndValidateBody('{"subnet": "123", "sg": "456", "repo": "789", "time": 1015213801}', with_validate=False)
... except Exception as e:
... print(e)
request expired
"""
if with_validate and (not key or not signature):
raise Exception("key or signature missing")
if isBase64:
dec_body = base64.b64decode(body.encode("utf-8"))
body = dec_body.decode("utf-8")
body_qs = json.loads(body)
if not all(x in body_qs for x in ["time"]):
raise Exception("missing required body item")
requestTime = int(body_qs["time"])
# less than 30 seconds old
if (int(time.time()) - requestTime) >= 30:
raise Exception(f"request expired")
if with_validate:
key_bytes = None
if not key:
raise Exception("Key not valid")
else:
key_bytes = key.encode("utf-8")
h = hmac.new(key_bytes, body.encode("utf-8"), hashlib.sha512)
res = h.hexdigest()
if res == signature:
return body_qs
else:
raise Exception("Bad signature")
return body_qs
| [
11748,
289,
20285,
201,
198,
11748,
12234,
8019,
201,
198,
11748,
2779,
2414,
201,
198,
11748,
33918,
201,
198,
11748,
302,
201,
198,
11748,
640,
201,
198,
201,
198,
201,
198,
4299,
7925,
1870,
7762,
20540,
25842,
7,
201,
198,
220,
220,
220,
1767,
25,
965,
11,
201,
198,
220,
220,
220,
1994,
25,
965,
796,
366,
1600,
201,
198,
220,
220,
220,
9877,
25,
965,
796,
366,
1600,
201,
198,
220,
220,
220,
318,
14881,
2414,
25,
20512,
796,
10352,
11,
201,
198,
220,
220,
220,
351,
62,
12102,
378,
25,
20512,
796,
6407,
11,
201,
198,
8,
4613,
8633,
25,
201,
198,
220,
220,
220,
37227,
201,
198,
220,
220,
220,
14392,
32096,
286,
262,
1767,
11,
1390,
11902,
21201,
286,
257,
25904,
2246,
11,
284,
257,
8633,
201,
198,
201,
198,
220,
220,
220,
13163,
256,
796,
493,
7,
2435,
13,
2435,
28955,
201,
198,
220,
220,
220,
13163,
4938,
62,
2618,
796,
277,
6,
27007,
366,
7266,
3262,
1298,
366,
10163,
1600,
366,
45213,
1298,
366,
29228,
1600,
366,
260,
7501,
1298,
366,
40401,
1600,
366,
2435,
1298,
1391,
83,
92,
34949,
6,
201,
198,
220,
220,
220,
13163,
4938,
62,
65,
2414,
65,
796,
2779,
2414,
13,
65,
2414,
268,
8189,
7,
12102,
62,
2618,
13,
268,
8189,
7203,
40477,
12,
23,
4943,
737,
12501,
1098,
7203,
40477,
12,
23,
4943,
201,
198,
201,
198,
220,
220,
220,
13163,
1332,
16,
796,
7925,
1870,
7762,
20540,
25842,
7,
12102,
62,
65,
2414,
65,
11,
318,
14881,
2414,
28,
17821,
11,
351,
62,
12102,
378,
28,
25101,
8,
201,
198,
220,
220,
220,
13163,
1332,
16,
13,
12924,
7203,
2435,
4943,
14512,
366,
15,
1,
201,
198,
220,
220,
220,
6407,
201,
198,
220,
220,
220,
13163,
1332,
16,
201,
198,
220,
220,
220,
1391,
6,
7266,
3262,
10354,
705,
10163,
3256,
705,
45213,
10354,
705,
29228,
3256,
705,
260,
7501,
10354,
705,
40401,
6,
92,
201,
198,
201,
198,
220,
220,
220,
13163,
1332,
17,
796,
7925,
1870,
7762,
20540,
25842,
7,
12102,
62,
2618,
11,
351,
62,
12102,
378,
28,
25101,
8,
201,
198,
220,
220,
220,
13163,
1332,
17,
13,
12924,
7203,
2435,
4943,
14512,
366,
15,
1,
201,
198,
220,
220,
220,
6407,
201,
198,
220,
220,
220,
13163,
1332,
17,
201,
198,
220,
220,
220,
1391,
6,
7266,
3262,
10354,
705,
10163,
3256,
705,
45213,
10354,
705,
29228,
3256,
705,
260,
7501,
10354,
705,
40401,
6,
92,
201,
198,
201,
198,
220,
220,
220,
13163,
17855,
62,
12102,
796,
277,
6,
27007,
366,
7266,
3262,
1298,
366,
10163,
1600,
366,
45213,
1298,
366,
29228,
1600,
366,
260,
7501,
1298,
366,
40401,
1600,
366,
2435,
1298,
1391,
83,
92,
34949,
6,
201,
198,
220,
220,
220,
13163,
1332,
18,
796,
7925,
1870,
7762,
20540,
25842,
7,
11031,
64,
62,
12102,
11,
351,
62,
12102,
378,
28,
25101,
8,
201,
198,
220,
220,
220,
13163,
1332,
18,
13,
12924,
7203,
2435,
4943,
14512,
366,
15,
1,
201,
198,
220,
220,
220,
6407,
201,
198,
220,
220,
220,
13163,
1332,
18,
201,
198,
220,
220,
220,
1391,
6,
7266,
3262,
10354,
705,
10163,
3256,
705,
45213,
10354,
705,
29228,
3256,
705,
260,
7501,
10354,
705,
40401,
6,
92,
201,
198,
201,
198,
220,
220,
220,
13163,
351,
1280,
10786,
41989,
14,
69,
25506,
14,
20688,
13,
17752,
11537,
355,
33918,
62,
7753,
25,
201,
198,
220,
220,
220,
2644,
220,
220,
1672,
796,
33918,
13,
2220,
7,
17752,
62,
7753,
8,
201,
198,
220,
220,
220,
13163,
1672,
14692,
2618,
8973,
796,
1672,
14692,
2618,
1,
4083,
33491,
7203,
16243,
1600,
965,
7,
83,
4008,
201,
198,
220,
220,
220,
13163,
1332,
19,
796,
7925,
1870,
7762,
20540,
25842,
7,
20688,
14692,
2618,
33116,
351,
62,
12102,
378,
28,
25101,
8,
201,
198,
220,
220,
220,
13163,
1332,
19,
13,
12924,
7203,
2435,
4943,
14512,
366,
15,
1,
201,
198,
220,
220,
220,
6407,
201,
198,
220,
220,
220,
13163,
1332,
19,
201,
198,
220,
220,
220,
1391,
6,
7266,
3262,
10354,
705,
10163,
3256,
705,
45213,
10354,
705,
29228,
3256,
705,
260,
7501,
10354,
705,
40401,
6,
92,
201,
198,
201,
198,
220,
220,
220,
13163,
1994,
796,
366,
39305,
4299,
70,
1,
201,
198,
220,
220,
220,
13163,
289,
796,
289,
20285,
13,
3605,
7,
2539,
13,
268,
8189,
7203,
40477,
12,
23,
12340,
4938,
62,
2618,
13,
268,
8189,
7203,
40477,
12,
23,
12340,
12234,
8019,
13,
26270,
25836,
8,
201,
198,
220,
220,
220,
13163,
1332,
20,
796,
7925,
1870,
7762,
20540,
25842,
7,
12102,
62,
2618,
11,
1994,
28,
2539,
11,
9877,
28,
71,
13,
33095,
12894,
395,
28955,
201,
198,
220,
220,
220,
13163,
1332,
20,
13,
12924,
7203,
2435,
4943,
14512,
366,
15,
1,
201,
198,
220,
220,
220,
6407,
201,
198,
220,
220,
220,
13163,
1332,
20,
201,
198,
220,
220,
220,
1391,
6,
7266,
3262,
10354,
705,
10163,
3256,
705,
45213,
10354,
705,
29228,
3256,
705,
260,
7501,
10354,
705,
40401,
6,
92,
201,
198,
201,
198,
220,
220,
220,
13163,
1949,
25,
201,
198,
220,
220,
220,
2644,
220,
220,
220,
220,
7925,
1870,
7762,
20540,
25842,
7,
2539,
2625,
10163,
2231,
1600,
1767,
2625,
90,
92,
4943,
201,
198,
220,
220,
220,
2644,
2845,
35528,
355,
304,
25,
201,
198,
220,
220,
220,
2644,
220,
220,
220,
220,
3601,
7,
68,
8,
201,
198,
220,
220,
220,
1994,
393,
9877,
4814,
201,
198,
201,
198,
220,
220,
220,
13163,
1949,
25,
201,
198,
220,
220,
220,
2644,
220,
220,
220,
220,
7925,
1870,
7762,
20540,
25842,
10786,
4895,
7266,
3262,
1298,
366,
10163,
1600,
366,
45213,
1298,
366,
29228,
1600,
366,
260,
7501,
1298,
366,
40401,
1600,
366,
2435,
1298,
8949,
4309,
20107,
486,
92,
3256,
351,
62,
12102,
378,
28,
25101,
8,
201,
198,
220,
220,
220,
2644,
2845,
35528,
355,
304,
25,
201,
198,
220,
220,
220,
2644,
220,
220,
220,
220,
3601,
7,
68,
8,
201,
198,
220,
220,
220,
2581,
21350,
201,
198,
201,
198,
220,
220,
220,
37227,
201,
198,
201,
198,
220,
220,
220,
611,
351,
62,
12102,
378,
290,
357,
1662,
1994,
393,
407,
9877,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
7203,
2539,
393,
9877,
4814,
4943,
201,
198,
201,
198,
220,
220,
220,
611,
318,
14881,
2414,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
875,
62,
2618,
796,
2779,
2414,
13,
65,
2414,
12501,
1098,
7,
2618,
13,
268,
8189,
7203,
40477,
12,
23,
48774,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1767,
796,
875,
62,
2618,
13,
12501,
1098,
7203,
40477,
12,
23,
4943,
201,
198,
201,
198,
220,
220,
220,
1767,
62,
48382,
796,
33918,
13,
46030,
7,
2618,
8,
201,
198,
201,
198,
220,
220,
220,
611,
407,
477,
7,
87,
287,
1767,
62,
48382,
329,
2124,
287,
14631,
2435,
8973,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
7203,
45688,
2672,
1767,
2378,
4943,
201,
198,
201,
198,
220,
220,
220,
2581,
7575,
796,
493,
7,
2618,
62,
48382,
14692,
2435,
8973,
8,
201,
198,
220,
220,
220,
1303,
1342,
621,
1542,
4201,
1468,
201,
198,
220,
220,
220,
611,
357,
600,
7,
2435,
13,
2435,
28955,
532,
2581,
7575,
8,
18189,
1542,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
7,
69,
1,
25927,
21350,
4943,
201,
198,
201,
198,
220,
220,
220,
611,
351,
62,
12102,
378,
25,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1994,
62,
33661,
796,
6045,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
1994,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
7203,
9218,
407,
4938,
4943,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1994,
62,
33661,
796,
1994,
13,
268,
8189,
7203,
40477,
12,
23,
4943,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
289,
796,
289,
20285,
13,
3605,
7,
2539,
62,
33661,
11,
1767,
13,
268,
8189,
7203,
40477,
12,
23,
12340,
12234,
8019,
13,
26270,
25836,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
581,
796,
289,
13,
33095,
12894,
395,
3419,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
611,
581,
6624,
9877,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1767,
62,
48382,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
35528,
7203,
22069,
9877,
4943,
201,
198,
201,
198,
220,
220,
220,
1441,
1767,
62,
48382,
201,
198
] | 2.217033 | 1,456 |
from airflow import version
print(version.version) | [
6738,
45771,
1330,
2196,
198,
4798,
7,
9641,
13,
9641,
8
] | 4.545455 | 11 |
from jetconf.data import BaseDatastore
| [
6738,
12644,
10414,
13,
7890,
1330,
7308,
27354,
459,
382,
628
] | 3.636364 | 11 |
# -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#########################################################################
from django.utils.translation import ugettext_noop as _
from geonode.notifications_helper import NotificationsAppConfigBase
default_app_config = 'geonode.maps.MapsAppConfig'
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
29113,
29113,
7804,
2,
198,
2,
198,
2,
15069,
357,
34,
8,
1584,
7294,
10082,
78,
198,
2,
198,
2,
770,
1430,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
198,
2,
340,
739,
262,
2846,
286,
262,
22961,
3611,
5094,
13789,
355,
3199,
416,
198,
2,
262,
3232,
10442,
5693,
11,
2035,
2196,
513,
286,
262,
13789,
11,
393,
198,
2,
357,
265,
534,
3038,
8,
597,
1568,
2196,
13,
198,
2,
198,
2,
770,
1430,
318,
9387,
287,
262,
2911,
326,
340,
481,
307,
4465,
11,
198,
2,
475,
42881,
15529,
34764,
56,
26,
1231,
772,
262,
17142,
18215,
286,
198,
2,
34482,
3398,
1565,
5603,
25382,
393,
376,
46144,
7473,
317,
16652,
2149,
37232,
33079,
48933,
13,
4091,
262,
198,
2,
22961,
3611,
5094,
13789,
329,
517,
3307,
13,
198,
2,
198,
2,
921,
815,
423,
2722,
257,
4866,
286,
262,
22961,
3611,
5094,
13789,
198,
2,
1863,
351,
428,
1430,
13,
1002,
407,
11,
766,
1279,
4023,
1378,
2503,
13,
41791,
13,
2398,
14,
677,
4541,
15913,
13,
198,
2,
198,
29113,
29113,
7804,
2,
628,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
3919,
404,
355,
4808,
198,
6738,
4903,
261,
1098,
13,
1662,
6637,
62,
2978,
525,
1330,
1892,
6637,
4677,
16934,
14881,
628,
198,
198,
12286,
62,
1324,
62,
11250,
796,
705,
6281,
1098,
13,
31803,
13,
47010,
4677,
16934,
6,
198
] | 4.01581 | 253 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Login middleware tests"""
# System imports
import logging
from mock import MagicMock, patch
from datetime import datetime, timedelta
from django.http import HttpRequest
from django.conf import settings
from django.contrib import auth
from django.urls import reverse
# Project imports
from draalcore.test_utils.basetest import BaseTestMiddleware
from ..login import LoginRequiredMiddleware, UserEmailRequiredMiddleware, AutoLogout, DateTimeSerializer
logger = logging.getLogger(__name__)
class LoginRequiredTestCase(BaseTestMiddleware):
"""Login required middleware."""
def test_request(self):
"""User authentication is validated."""
obj = LoginRequiredMiddleware(self.get_response)
# GIVEN request has no user authentication
request = HttpRequest()
request.path_info = '/view'
request.user = MagicMock()
request.user.is_authenticated = False
# WHEN request is processed by the login middleware
response = obj(request)
# THEN redirect response should returned
self.assertIsNotNone(response)
self.assertEqual(response.status_code, 401)
self.assertEqual(self.responseFuncCalled, 0)
self.clear_response()
class UserEmailRequiredTestCase(BaseTestMiddleware):
"""User email required middleware."""
def test_request_redirect(self):
"""Presence of user email is validated."""
obj = UserEmailRequiredMiddleware(self.get_response)
# GIVEN user data has no email included and user requests main page
request = HttpRequest()
request.path_info = '/'
request.user = MagicMock(email='')
request.user.is_authenticated = True
# WHEN request is processed by the middleware
response = obj(request)
# THEN redirect response should returned
self.assertIsNotNone(response)
self.assertTrue('{}?next='.format(reverse(settings.USER_EMAIL_REDIRECT)) in response['Location'])
self.assertEqual(self.responseFuncCalled, 0)
self.clear_response()
# -----
# GIVEN user data has email included and user requests main page
request = HttpRequest()
request.path_info = '/'
request.user = MagicMock(email='[email protected]')
request.user.is_authenticated = True
# WHEN request is processed by the middleware
response = obj(request)
# THEN provided callable should be called
self.assertTrue(response)
self.assertEqual(self.responseFuncCalled, 1)
self.clear_response()
class AutoLogoutTestCase(BaseTestMiddleware):
"""Auto logout middleware."""
def test_request1(self):
"""User is not logged in."""
obj = AutoLogout(self.get_response)
# GIVEN unauthenticated user
request = HttpRequest()
request.user = MagicMock()
request.user.is_authenticated = False
# WHEN request is processed by the auto logout middleware
response = obj(request)
# THEN it succeeds
self.assertTrue(response)
self.assertEqual(self.responseFuncCalled, 1)
self.clear_response()
@patch.object(auth, 'logout')
def test_request2(self, logout):
"""User session has expired."""
obj = AutoLogout(self.get_response)
logout.return_value = True
# GIVEN expired user session
request = HttpRequest()
request.user = MagicMock()
request.user.is_authenticated = True
timestamp = datetime.now() - timedelta(0, settings.AUTO_LOGOUT_DELAY * 2, 0)
request.session = {'last_touch': DateTimeSerializer(timestamp).encode}
# WHEN request is processed by the auto logout middleware
response = obj(request)
# THEN unauthorized response is returned
self.assertIsNotNone(response)
self.assertEqual(response.status_code, 401)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
47790,
3504,
1574,
5254,
37811,
198,
198,
2,
4482,
17944,
198,
11748,
18931,
198,
6738,
15290,
1330,
6139,
44,
735,
11,
8529,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
18453,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
6284,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
198,
2,
4935,
17944,
198,
6738,
28841,
282,
7295,
13,
9288,
62,
26791,
13,
12093,
316,
395,
1330,
7308,
14402,
34621,
1574,
198,
6738,
11485,
38235,
1330,
23093,
37374,
34621,
1574,
11,
11787,
15333,
37374,
34621,
1574,
11,
11160,
11187,
448,
11,
7536,
7575,
32634,
7509,
628,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
198,
4871,
23093,
37374,
14402,
20448,
7,
14881,
14402,
34621,
1574,
2599,
198,
220,
220,
220,
37227,
47790,
2672,
3504,
1574,
526,
15931,
628,
220,
220,
220,
825,
1332,
62,
25927,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
12982,
18239,
318,
31031,
526,
15931,
628,
220,
220,
220,
220,
220,
220,
220,
26181,
796,
23093,
37374,
34621,
1574,
7,
944,
13,
1136,
62,
26209,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
402,
3824,
1677,
2581,
468,
645,
2836,
18239,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
796,
367,
29281,
18453,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
6978,
62,
10951,
796,
31051,
1177,
6,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
7220,
796,
6139,
44,
735,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
7220,
13,
271,
62,
41299,
3474,
796,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
42099,
2581,
318,
13686,
416,
262,
17594,
3504,
1574,
198,
220,
220,
220,
220,
220,
220,
220,
2882,
796,
26181,
7,
25927,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
42243,
18941,
2882,
815,
4504,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
3792,
3673,
14202,
7,
26209,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
26209,
13,
13376,
62,
8189,
11,
22219,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
944,
13,
26209,
37,
19524,
34,
4262,
11,
657,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20063,
62,
26209,
3419,
628,
198,
4871,
11787,
15333,
37374,
14402,
20448,
7,
14881,
14402,
34621,
1574,
2599,
198,
220,
220,
220,
37227,
12982,
3053,
2672,
3504,
1574,
526,
15931,
628,
220,
220,
220,
825,
1332,
62,
25927,
62,
445,
1060,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
25460,
594,
286,
2836,
3053,
318,
31031,
526,
15931,
628,
220,
220,
220,
220,
220,
220,
220,
26181,
796,
11787,
15333,
37374,
34621,
1574,
7,
944,
13,
1136,
62,
26209,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
402,
3824,
1677,
2836,
1366,
468,
645,
3053,
3017,
290,
2836,
7007,
1388,
2443,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
796,
367,
29281,
18453,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
6978,
62,
10951,
796,
31051,
6,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
7220,
796,
6139,
44,
735,
7,
12888,
28,
7061,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
7220,
13,
271,
62,
41299,
3474,
796,
6407,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
42099,
2581,
318,
13686,
416,
262,
3504,
1574,
198,
220,
220,
220,
220,
220,
220,
220,
2882,
796,
26181,
7,
25927,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
42243,
18941,
2882,
815,
4504,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
3792,
3673,
14202,
7,
26209,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
17821,
10786,
90,
92,
30,
19545,
28,
4458,
18982,
7,
50188,
7,
33692,
13,
29904,
62,
27630,
4146,
62,
22083,
40,
23988,
4008,
287,
2882,
17816,
14749,
6,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
944,
13,
26209,
37,
19524,
34,
4262,
11,
657,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20063,
62,
26209,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
37404,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
402,
3824,
1677,
2836,
1366,
468,
3053,
3017,
290,
2836,
7007,
1388,
2443,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
796,
367,
29281,
18453,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
6978,
62,
10951,
796,
31051,
6,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
7220,
796,
6139,
44,
735,
7,
12888,
11639,
9288,
31,
9288,
13,
785,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
7220,
13,
271,
62,
41299,
3474,
796,
6407,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
42099,
2581,
318,
13686,
416,
262,
3504,
1574,
198,
220,
220,
220,
220,
220,
220,
220,
2882,
796,
26181,
7,
25927,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
42243,
2810,
869,
540,
815,
307,
1444,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
17821,
7,
26209,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
944,
13,
26209,
37,
19524,
34,
4262,
11,
352,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20063,
62,
26209,
3419,
628,
198,
4871,
11160,
11187,
448,
14402,
20448,
7,
14881,
14402,
34621,
1574,
2599,
198,
220,
220,
220,
37227,
27722,
2604,
448,
3504,
1574,
526,
15931,
628,
220,
220,
220,
825,
1332,
62,
25927,
16,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
12982,
318,
407,
18832,
287,
526,
15931,
628,
220,
220,
220,
220,
220,
220,
220,
26181,
796,
11160,
11187,
448,
7,
944,
13,
1136,
62,
26209,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
402,
3824,
1677,
555,
41299,
3474,
2836,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
796,
367,
29281,
18453,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
7220,
796,
6139,
44,
735,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
7220,
13,
271,
62,
41299,
3474,
796,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
42099,
2581,
318,
13686,
416,
262,
8295,
2604,
448,
3504,
1574,
198,
220,
220,
220,
220,
220,
220,
220,
2882,
796,
26181,
7,
25927,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
42243,
340,
31137,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
17821,
7,
26209,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
944,
13,
26209,
37,
19524,
34,
4262,
11,
352,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20063,
62,
26209,
3419,
628,
220,
220,
220,
2488,
17147,
13,
15252,
7,
18439,
11,
705,
6404,
448,
11537,
198,
220,
220,
220,
825,
1332,
62,
25927,
17,
7,
944,
11,
2604,
448,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
12982,
6246,
468,
21350,
526,
15931,
628,
220,
220,
220,
220,
220,
220,
220,
26181,
796,
11160,
11187,
448,
7,
944,
13,
1136,
62,
26209,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
448,
13,
7783,
62,
8367,
796,
6407,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
402,
3824,
1677,
21350,
2836,
6246,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
796,
367,
29281,
18453,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
7220,
796,
6139,
44,
735,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
7220,
13,
271,
62,
41299,
3474,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
41033,
796,
4818,
8079,
13,
2197,
3419,
532,
28805,
12514,
7,
15,
11,
6460,
13,
39371,
46,
62,
25294,
12425,
62,
35,
3698,
4792,
1635,
362,
11,
657,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2581,
13,
29891,
796,
1391,
6,
12957,
62,
29332,
10354,
7536,
7575,
32634,
7509,
7,
16514,
27823,
737,
268,
8189,
92,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
42099,
2581,
318,
13686,
416,
262,
8295,
2604,
448,
3504,
1574,
198,
220,
220,
220,
220,
220,
220,
220,
2882,
796,
26181,
7,
25927,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
42243,
22959,
2882,
318,
4504,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
3792,
3673,
14202,
7,
26209,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
26209,
13,
13376,
62,
8189,
11,
22219,
8,
198
] | 2.682432 | 1,480 |
from sklearn.svm import SVR
from data_science_layer.machine_learning.base_regressor import BaseRegressor
| [
6738,
1341,
35720,
13,
82,
14761,
1330,
311,
13024,
198,
6738,
1366,
62,
16801,
62,
29289,
13,
30243,
62,
40684,
13,
8692,
62,
2301,
44292,
1330,
7308,
8081,
44292,
628,
198
] | 3.451613 | 31 |
ips = [
'10.0.0.5',
'10.5.3.1',
'192.168.11.10',
'2.2.2.2',
'100.0.0.1',
'20.3.2.4'
]
print(sort_ips(ips))
| [
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
2419,
796,
685,
198,
197,
6,
940,
13,
15,
13,
15,
13,
20,
3256,
198,
197,
6,
940,
13,
20,
13,
18,
13,
16,
3256,
198,
197,
6,
17477,
13,
14656,
13,
1157,
13,
940,
3256,
198,
197,
6,
17,
13,
17,
13,
17,
13,
17,
3256,
198,
197,
6,
3064,
13,
15,
13,
15,
13,
16,
3256,
198,
197,
6,
1238,
13,
18,
13,
17,
13,
19,
6,
198,
197,
60,
198,
198,
4798,
7,
30619,
62,
2419,
7,
2419,
4008,
628,
198
] | 1.351064 | 94 |
# -*- coding: utf-8 -*-
"""
glusternodestate.py
:copyright: (c) 2013 by Aravinda VK
:license: BSD, GPL v2, see LICENSE for more details.
"""
import argparse
import errno
import os
from functools import wraps
import sys
import requests
from glusterfstools import volumes
import nodestatedb as _db
from config import DB_PATH, DB_FILE, HOOKS_ROOT
_glusterfs_events_funcs = {}
@glusterfsevent("setup")
@glusterfsevent("cleanup")
@glusterfsevent("glusterd-start")
@glusterfsevent("create")
@glusterfsevent("delete")
@glusterfsevent("add-brick")
@glusterfsevent("remove-brick")
@glusterfsevent("set")
@glusterfsevent("start")
@glusterfsevent("stop")
if __name__ == "__main__":
main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
1278,
436,
1142,
375,
44146,
13,
9078,
628,
220,
220,
220,
1058,
22163,
4766,
25,
357,
66,
8,
2211,
416,
317,
4108,
22261,
45917,
198,
220,
220,
220,
1058,
43085,
25,
347,
10305,
11,
38644,
410,
17,
11,
766,
38559,
24290,
329,
517,
3307,
13,
198,
37811,
198,
198,
11748,
1822,
29572,
198,
11748,
11454,
3919,
198,
11748,
28686,
198,
6738,
1257,
310,
10141,
1330,
27521,
198,
11748,
25064,
198,
11748,
7007,
198,
198,
6738,
1278,
5819,
69,
301,
10141,
1330,
15343,
198,
11748,
18666,
395,
515,
65,
355,
4808,
9945,
198,
6738,
4566,
1330,
20137,
62,
34219,
11,
20137,
62,
25664,
11,
367,
15308,
50,
62,
13252,
2394,
198,
198,
62,
4743,
5819,
9501,
62,
31534,
62,
12543,
6359,
796,
23884,
628,
628,
198,
198,
31,
4743,
5819,
69,
325,
1151,
7203,
40406,
4943,
628,
198,
31,
4743,
5819,
69,
325,
1151,
7203,
27773,
929,
4943,
628,
198,
31,
4743,
5819,
69,
325,
1151,
7203,
4743,
5819,
67,
12,
9688,
4943,
628,
198,
31,
4743,
5819,
69,
325,
1151,
7203,
17953,
4943,
628,
198,
31,
4743,
5819,
69,
325,
1151,
7203,
33678,
4943,
628,
198,
31,
4743,
5819,
69,
325,
1151,
7203,
2860,
12,
1671,
624,
4943,
628,
198,
31,
4743,
5819,
69,
325,
1151,
7203,
28956,
12,
1671,
624,
4943,
628,
198,
198,
31,
4743,
5819,
69,
325,
1151,
7203,
2617,
4943,
628,
198,
31,
4743,
5819,
69,
325,
1151,
7203,
9688,
4943,
628,
198,
31,
4743,
5819,
69,
325,
1151,
7203,
11338,
4943,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.54386 | 285 |
print(decrypt([5, 7, 1, 4], 3))
print(decrypt([1, 2, 3, 4], 0))
print(decrypt([2, 4, 9, 3], -2))
| [
198,
198,
4798,
7,
12501,
6012,
26933,
20,
11,
767,
11,
352,
11,
604,
4357,
513,
4008,
198,
4798,
7,
12501,
6012,
26933,
16,
11,
362,
11,
513,
11,
604,
4357,
657,
4008,
198,
4798,
7,
12501,
6012,
26933,
17,
11,
604,
11,
860,
11,
513,
4357,
532,
17,
4008,
198
] | 1.941176 | 51 |
import requests
from bs4 import BeautifulSoup
import csv
cont = 0
i = 0
j = 0
source = requests.get('https://lol.gamepedia.com/LPL/2021_Season/Spring_Season/Scoreboards/Week_10').text
soup = BeautifulSoup(source, 'html.parser')
times = soup.find_all('span', "teamname")
kills = soup.find_all('div', "sb-footer-item sb-footer-item-dragons")
numpartidas = 9
listatime = []
partidas = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
numkills = []
numdragonspartidas = [0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]
print(partidas)
for time in times:
listatime.append(time.text)
for l in range(0,numpartidas):
for c in range(0,2):
partidas[l][c] = listatime[i]
i = i + 1
for kill in kills:
numkills.append(kill.text)
for linha in range(0,numpartidas):
for coluna in range(0,2):
numdragonspartidas[linha][coluna] = numkills[j]
j = j + 1
print(numdragonspartidas)
"""with open('newFile.csv', 'a') as csvfile:
wr = csv.writer(csvfile, quoting=csv.QUOTE_ALL)
for word in partidas:
wr.writerow([None,[word]])
"""
with open('dragons_lpl.csv', 'a', newline="") as csvfile:
wr = csv.writer(csvfile,quoting=csv.QUOTE_ALL)
for word in partidas:
wr.writerow(word)
for word in numdragonspartidas:
wr.writerow(word) | [
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
269,
21370,
198,
198,
3642,
796,
657,
198,
72,
796,
657,
198,
73,
796,
657,
628,
198,
10459,
796,
7007,
13,
1136,
10786,
5450,
1378,
47288,
13,
6057,
50235,
13,
785,
14,
43,
6489,
14,
1238,
2481,
62,
18960,
14,
30387,
62,
18960,
14,
26595,
12821,
14,
20916,
62,
940,
27691,
5239,
198,
198,
82,
10486,
796,
23762,
50,
10486,
7,
10459,
11,
705,
6494,
13,
48610,
11537,
198,
22355,
796,
17141,
13,
19796,
62,
439,
10786,
12626,
3256,
366,
15097,
3672,
4943,
198,
74,
2171,
796,
17141,
13,
19796,
62,
439,
10786,
7146,
3256,
366,
36299,
12,
5898,
263,
12,
9186,
264,
65,
12,
5898,
263,
12,
9186,
12,
7109,
34765,
4943,
198,
198,
77,
931,
433,
24496,
796,
860,
198,
4868,
265,
524,
796,
17635,
198,
3911,
24496,
796,
16410,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
11907,
198,
22510,
74,
2171,
796,
17635,
198,
22510,
7109,
34765,
3911,
24496,
796,
685,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
38430,
15,
11,
15,
60,
628,
198,
4798,
7,
3911,
24496,
8,
198,
198,
1640,
640,
287,
1661,
25,
198,
220,
220,
220,
1351,
265,
524,
13,
33295,
7,
2435,
13,
5239,
8,
198,
198,
1640,
300,
287,
2837,
7,
15,
11,
77,
931,
433,
24496,
2599,
198,
220,
220,
220,
329,
269,
287,
2837,
7,
15,
11,
17,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
636,
24496,
58,
75,
7131,
66,
60,
796,
1351,
265,
524,
58,
72,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
796,
1312,
1343,
352,
628,
198,
1640,
1494,
287,
12847,
25,
198,
220,
220,
220,
997,
74,
2171,
13,
33295,
7,
12728,
13,
5239,
8,
198,
198,
1640,
9493,
3099,
287,
2837,
7,
15,
11,
77,
931,
433,
24496,
2599,
198,
220,
220,
220,
329,
951,
9613,
287,
2837,
7,
15,
11,
17,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
997,
7109,
34765,
3911,
24496,
58,
2815,
3099,
7131,
4033,
9613,
60,
796,
997,
74,
2171,
58,
73,
60,
198,
220,
220,
220,
220,
220,
220,
220,
474,
796,
474,
1343,
352,
628,
198,
4798,
7,
22510,
7109,
34765,
3911,
24496,
8,
198,
37811,
4480,
1280,
10786,
3605,
8979,
13,
40664,
3256,
705,
64,
11537,
355,
269,
21370,
7753,
25,
198,
220,
220,
220,
1319,
796,
269,
21370,
13,
16002,
7,
40664,
7753,
11,
28411,
28,
40664,
13,
10917,
23051,
62,
7036,
8,
198,
220,
220,
220,
329,
1573,
287,
636,
24496,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1319,
13,
16002,
322,
26933,
14202,
17414,
4775,
11907,
8,
198,
37811,
198,
198,
4480,
1280,
10786,
7109,
34765,
62,
75,
489,
13,
40664,
3256,
705,
64,
3256,
649,
1370,
2625,
4943,
355,
269,
21370,
7753,
25,
628,
220,
220,
220,
1319,
796,
269,
21370,
13,
16002,
7,
40664,
7753,
11,
421,
10720,
28,
40664,
13,
10917,
23051,
62,
7036,
8,
198,
220,
220,
220,
329,
1573,
287,
636,
24496,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1319,
13,
16002,
322,
7,
4775,
8,
198,
220,
220,
220,
329,
1573,
287,
997,
7109,
34765,
3911,
24496,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1319,
13,
16002,
322,
7,
4775,
8
] | 2.223906 | 594 |
#!/usr/bin/env python
#
# ryw_benchmark.py
#
# This source file is part of the FoundationDB open source project
#
# Copyright 2013-2018 Apple Inc. and the FoundationDB project 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 argparse
import os
import sys
import time
import traceback
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from python_tests import PythonTest
import fdb
fdb.api_version(400)
if __name__ == "__main__":
print(
"Running RYW Benchmark test on Python version %d.%d.%d%s%d"
% (
sys.version_info[0],
sys.version_info[1],
sys.version_info[2],
sys.version_info[3][0],
sys.version_info[4],
)
)
parser = argparse.ArgumentParser()
tests = sorted(RYWBenchmark.tests.keys())
assert len(tests) > 0, "RYW benchmark test has no test_functions"
test_string = ", ".join(tests[:-1])
if len(tests) > 1:
test_string += ", and "
test_string += tests[-1]
parser.add_argument(
"--tests-to-run",
nargs="*",
help="Names of tests to run. Can be any of %s. By default, all tests are run."
% test_string,
)
RYWBenchmark().run(parser=parser)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
374,
88,
86,
62,
26968,
4102,
13,
9078,
198,
2,
198,
2,
770,
2723,
2393,
318,
636,
286,
262,
5693,
11012,
1280,
2723,
1628,
198,
2,
198,
2,
15069,
2211,
12,
7908,
4196,
3457,
13,
290,
262,
5693,
11012,
1628,
7035,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
2,
628,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
12854,
1891,
198,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
366,
492,
48774,
198,
6738,
21015,
62,
41989,
1330,
11361,
14402,
198,
198,
11748,
277,
9945,
198,
198,
69,
9945,
13,
15042,
62,
9641,
7,
7029,
8,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
3601,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
28768,
371,
56,
54,
25187,
4102,
1332,
319,
11361,
2196,
4064,
67,
13,
4,
67,
13,
4,
67,
4,
82,
4,
67,
1,
198,
220,
220,
220,
220,
220,
220,
220,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
9641,
62,
10951,
58,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
9641,
62,
10951,
58,
16,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
9641,
62,
10951,
58,
17,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
9641,
62,
10951,
58,
18,
7131,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
9641,
62,
10951,
58,
19,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
628,
220,
220,
220,
5254,
796,
23243,
7,
18276,
54,
44199,
4102,
13,
41989,
13,
13083,
28955,
198,
220,
220,
220,
6818,
18896,
7,
41989,
8,
1875,
657,
11,
366,
18276,
54,
18335,
1332,
468,
645,
1332,
62,
12543,
2733,
1,
198,
220,
220,
220,
1332,
62,
8841,
796,
33172,
27071,
22179,
7,
41989,
58,
21912,
16,
12962,
198,
220,
220,
220,
611,
18896,
7,
41989,
8,
1875,
352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1332,
62,
8841,
15853,
33172,
290,
366,
628,
220,
220,
220,
1332,
62,
8841,
15853,
5254,
58,
12,
16,
60,
628,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
438,
41989,
12,
1462,
12,
5143,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
299,
22046,
2625,
9,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
36690,
286,
5254,
284,
1057,
13,
1680,
307,
597,
286,
4064,
82,
13,
2750,
4277,
11,
477,
5254,
389,
1057,
526,
198,
220,
220,
220,
220,
220,
220,
220,
4064,
1332,
62,
8841,
11,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
371,
56,
54,
44199,
4102,
22446,
5143,
7,
48610,
28,
48610,
8,
198
] | 2.645455 | 660 |
#!/bin/env python
import os,sys
#Root of spify src directory
SPIFY_SRC_DIR = os.path.join(os.getcwd(),'..')
#Name your parser
spify_parser_name = "ExampleIFP"
spify_parser_params = []
#Specify parameters
spify_parser_params.append(
{
'name':'boolOption',
'type':'bool',
'shortDesc':'My Boolean Option',
'defaultValue': 0
}
)
spify_parser_params.append(
{
'name':'boolVectOption',
'type':'v_bool',
'shortDesc':'A vector of booleans.',
'defaultValue': [1,0,1,0]
}
)
spify_parser_params.append(
{
'name':'intOption',
'type':'int',
'longDesc':
"""Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.""",
'discreteValues': [0,1,3,5,7]
}
)
spify_parser_params.append(
{
'name':'intVectOption',
'type':'v_int',
'shortDesc':'My Integer Vector Option.',
'defaultValue': [-3,-2,-1,0],
'boundMin': -10,
'boundMax': 10
}
)
spify_parser_params.append(
{
'name':'floatOption',
'type':'double',
'defaultValue': 300.0,
'boundMax': 300.0
}
)
spify_parser_params.append(
{
'name':'floatVectOption',
'type':'v_double',
'boundMin': 0.0,
'boundMax': 100.0
}
)
spify_parser_params.append(
{
'name':'stringOption',
'type':'string',
'defaultValue': "foo",
'discreteValues': ["foo","bar","baz"]
}
)
spify_parser_params.append(
{
'name':'stringVectOption',
'type':'v_string',
'shortDesc': "My String Vector Option"
}
)
spify_parser_params.append(
{
'name':'intIntMapOption',
'type':'m_int_int',
'shortDesc': "My Integer-Integer Map Option",
'discreteValuesFirst': [1,2,4,6]
}
)
spify_parser_params.append(
{
'name':'stringIntMapOption',
'type':'m_string_int',
'defaultValue': {"foo":1,"bar":2}
}
)
spify_parser_params.append(
{
'name':'stringStringMapOption',
'type':'m_string_string',
'discreteValuesFirst': ["foo","bar","baz"],
'discreteValuesSecond': ["parrot","buzzard","eagle"]
}
)
spify_parser_params.append(
{
'name':'floatFloatMapOption',
'type':'m_double_double',
'defaultValue': {1.0:10.0, 2.0:20.0, 3.0:30.0}
}
)
#Make sure we can import SpifyParserGenerator
sys.path.append(os.path.join(SPIFY_SRC_DIR,'src'))
#Import
from SpifyParserGenerator import SpifyParserGenerator as spg
#Generate parser code
spg().generate(spify_parser_name,spify_parser_params)
#Generate master file
spg().make_master_file(spify_parser_name,spify_parser_params)
#Done.
| [
2,
48443,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
11,
17597,
198,
198,
2,
30016,
286,
599,
1958,
12351,
8619,
198,
4303,
5064,
56,
62,
50,
7397,
62,
34720,
796,
28686,
13,
6978,
13,
22179,
7,
418,
13,
1136,
66,
16993,
22784,
6,
492,
11537,
198,
198,
2,
5376,
534,
30751,
198,
2777,
1958,
62,
48610,
62,
3672,
796,
366,
16281,
5064,
47,
1,
198,
198,
2777,
1958,
62,
48610,
62,
37266,
796,
17635,
198,
198,
2,
22882,
1958,
10007,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
30388,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
30388,
3256,
198,
220,
220,
220,
705,
19509,
24564,
10354,
6,
3666,
41146,
16018,
3256,
198,
220,
220,
220,
705,
12286,
11395,
10354,
657,
198,
92,
198,
8,
198,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
30388,
53,
478,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
85,
62,
30388,
3256,
198,
220,
220,
220,
705,
19509,
24564,
10354,
6,
32,
15879,
286,
1489,
2305,
504,
2637,
11,
198,
220,
220,
220,
705,
12286,
11395,
10354,
685,
16,
11,
15,
11,
16,
11,
15,
60,
198,
92,
198,
8,
198,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
600,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
600,
3256,
198,
220,
220,
220,
705,
6511,
24564,
10354,
198,
37811,
43,
29625,
220,
2419,
388,
288,
45621,
1650,
716,
316,
11,
369,
8831,
316,
333,
31659,
271,
6345,
1288,
270,
11,
10081,
466,
304,
3754,
4666,
10042,
198,
1939,
312,
312,
2797,
3384,
2248,
382,
2123,
288,
349,
382,
2153,
2616,
435,
1557,
64,
13,
7273,
551,
320,
512,
10356,
8710,
1789,
11,
627,
271,
198,
77,
455,
81,
463,
4208,
3780,
334,
297,
321,
1073,
4827,
271,
299,
23267,
3384,
435,
1557,
541,
409,
304,
64,
13088,
78,
4937,
265,
13,
198,
35660,
271,
257,
1133,
4173,
495,
288,
45621,
287,
1128,
260,
258,
681,
270,
287,
2322,
37623,
378,
11555,
270,
1658,
325,
269,
359,
388,
288,
349,
382,
304,
84,
198,
69,
1018,
5375,
9242,
64,
1582,
72,
2541,
13,
18181,
23365,
264,
600,
1609,
64,
721,
265,
6508,
312,
265,
265,
1729,
386,
738,
11,
264,
2797,
287,
198,
3129,
8957,
45567,
1163,
544,
748,
263,
2797,
285,
692,
270,
2355,
4686,
1556,
4827,
388,
32203,
1600,
198,
220,
220,
220,
705,
15410,
8374,
40161,
10354,
685,
15,
11,
16,
11,
18,
11,
20,
11,
22,
60,
198,
92,
198,
8,
198,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
600,
53,
478,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
85,
62,
600,
3256,
198,
220,
220,
220,
705,
19509,
24564,
10354,
6,
3666,
34142,
20650,
16018,
2637,
11,
198,
220,
220,
220,
705,
12286,
11395,
10354,
25915,
18,
12095,
17,
12095,
16,
11,
15,
4357,
198,
220,
220,
220,
705,
7784,
9452,
10354,
532,
940,
11,
198,
220,
220,
220,
705,
7784,
11518,
10354,
838,
198,
92,
198,
8,
198,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
22468,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
23352,
3256,
198,
220,
220,
220,
705,
12286,
11395,
10354,
5867,
13,
15,
11,
198,
220,
220,
220,
705,
7784,
11518,
10354,
5867,
13,
15,
198,
92,
198,
8,
198,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
22468,
53,
478,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
85,
62,
23352,
3256,
198,
220,
220,
220,
705,
7784,
9452,
10354,
657,
13,
15,
11,
198,
220,
220,
220,
705,
7784,
11518,
10354,
1802,
13,
15,
198,
92,
198,
8,
628,
198,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
8841,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
8841,
3256,
198,
220,
220,
220,
705,
12286,
11395,
10354,
366,
21943,
1600,
198,
220,
220,
220,
705,
15410,
8374,
40161,
10354,
14631,
21943,
2430,
5657,
2430,
65,
1031,
8973,
198,
92,
198,
8,
628,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
8841,
53,
478,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
85,
62,
8841,
3256,
198,
220,
220,
220,
705,
19509,
24564,
10354,
366,
3666,
10903,
20650,
16018,
1,
198,
92,
198,
8,
198,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
600,
5317,
13912,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
76,
62,
600,
62,
600,
3256,
198,
220,
220,
220,
705,
19509,
24564,
10354,
366,
3666,
34142,
12,
46541,
9347,
16018,
1600,
198,
220,
220,
220,
705,
15410,
8374,
40161,
5962,
10354,
685,
16,
11,
17,
11,
19,
11,
21,
60,
198,
92,
198,
8,
198,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
8841,
5317,
13912,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
76,
62,
8841,
62,
600,
3256,
198,
220,
220,
220,
705,
12286,
11395,
10354,
19779,
21943,
1298,
16,
553,
5657,
1298,
17,
92,
198,
92,
198,
8,
198,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
8841,
10100,
13912,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
76,
62,
8841,
62,
8841,
3256,
198,
220,
220,
220,
705,
15410,
8374,
40161,
5962,
10354,
14631,
21943,
2430,
5657,
2430,
65,
1031,
33116,
198,
220,
220,
220,
705,
15410,
8374,
40161,
12211,
10354,
14631,
1845,
10599,
2430,
65,
4715,
446,
2430,
68,
19345,
8973,
198,
92,
198,
8,
198,
198,
2777,
1958,
62,
48610,
62,
37266,
13,
33295,
7,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
6,
22468,
43879,
13912,
19722,
3256,
198,
220,
220,
220,
705,
4906,
10354,
6,
76,
62,
23352,
62,
23352,
3256,
198,
220,
220,
220,
705,
12286,
11395,
10354,
1391,
16,
13,
15,
25,
940,
13,
15,
11,
362,
13,
15,
25,
1238,
13,
15,
11,
513,
13,
15,
25,
1270,
13,
15,
92,
198,
92,
198,
8,
198,
198,
2,
12050,
1654,
356,
460,
1330,
1338,
1958,
46677,
8645,
1352,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
22179,
7,
4303,
5064,
56,
62,
50,
7397,
62,
34720,
4032,
10677,
6,
4008,
198,
198,
2,
20939,
198,
6738,
1338,
1958,
46677,
8645,
1352,
1330,
1338,
1958,
46677,
8645,
1352,
355,
599,
70,
198,
198,
2,
8645,
378,
30751,
2438,
198,
2777,
70,
22446,
8612,
378,
7,
2777,
1958,
62,
48610,
62,
3672,
11,
2777,
1958,
62,
48610,
62,
37266,
8,
198,
2,
8645,
378,
4958,
2393,
198,
2777,
70,
22446,
15883,
62,
9866,
62,
7753,
7,
2777,
1958,
62,
48610,
62,
3672,
11,
2777,
1958,
62,
48610,
62,
37266,
8,
198,
198,
2,
45677,
13,
198
] | 2.343802 | 1,210 |
import streamlit as st
| [
11748,
4269,
18250,
355,
336,
201
] | 3.833333 | 6 |
import requests
from bs4 import BeautifulSoup
import mysql.connector
conn = mysql.connector.connect(host="localhost", user="root", password="root", database="pokedex", port=8889)
cursor = conn.cursor(buffered=True)
# connexion et récupération des données / parse du site
#response = requests.get("https://pokemondb.net/pokedex/all")
#html = str(response.content)
fichier = open("data_pokemon.html","r")
html = fichier.read()
fichier.close()
soup = BeautifulSoup(html, "html.parser")
tab = soup.find(id="pokedex")
for link in tab.find_all("tr"):
tt = []
x = 0
type_ids = []
for l in link.find_all("td"):
if x == 1:
if l.find_all("a"):
nom = l.find_all("a")
tt.append(nom[0].text)
else:
tt.append("")
if x == 2:
for type_poke in l.find_all("a"):
nom_type = type_poke.text
cursor.execute("SELECT id FROM type WHERE nom LIKE '"+nom_type+"%' ;")
test_type = cursor.fetchone()
if test_type == None:
cursor.execute("INSERT INTO type VALUES (0, '"+nom_type+"');")
type_ids.append(cursor.lastrowid)
if x == 0 or x > 2:
tt.append(l.text)
x = x+1
if len(tt) > 0 and tt[1] != "":
cursor.execute("""INSERT INTO pokemon (ref, nom, total, hp, attack, defense, sp_atk, sp_def, speed) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)""", tt)
pokemon_id = cursor.lastrowid
for type_id in type_ids:
print(type_id)
cursor.execute("INSERT INTO pokemon_types VALUES (0, "+str(pokemon_id)+", "+str(type_id)+");")
cursor.close()
conn.commit()
conn.close() | [
11748,
7007,
198,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
198,
11748,
48761,
13,
8443,
273,
198,
37043,
796,
48761,
13,
8443,
273,
13,
8443,
7,
4774,
2625,
36750,
1600,
2836,
2625,
15763,
1600,
9206,
2625,
15763,
1600,
6831,
2625,
79,
6545,
1069,
1600,
2493,
28,
3459,
4531,
8,
198,
66,
21471,
796,
48260,
13,
66,
21471,
7,
36873,
1068,
28,
17821,
8,
198,
198,
2,
369,
12413,
295,
2123,
40560,
25244,
2634,
1358,
748,
836,
77,
2634,
274,
1220,
21136,
7043,
2524,
198,
198,
2,
26209,
796,
7007,
13,
1136,
7203,
5450,
1378,
35924,
6327,
65,
13,
3262,
14,
79,
6545,
1069,
14,
439,
4943,
198,
2,
6494,
796,
965,
7,
26209,
13,
11299,
8,
198,
198,
69,
488,
959,
796,
1280,
7203,
7890,
62,
79,
12717,
13,
6494,
2430,
81,
4943,
198,
6494,
796,
277,
488,
959,
13,
961,
3419,
198,
69,
488,
959,
13,
19836,
3419,
198,
198,
82,
10486,
796,
23762,
50,
10486,
7,
6494,
11,
366,
6494,
13,
48610,
4943,
198,
198,
8658,
796,
17141,
13,
19796,
7,
312,
2625,
79,
6545,
1069,
4943,
198,
198,
1640,
2792,
287,
7400,
13,
19796,
62,
439,
7203,
2213,
1,
2599,
198,
220,
220,
220,
256,
83,
796,
17635,
198,
220,
220,
220,
2124,
796,
657,
198,
220,
220,
220,
2099,
62,
2340,
796,
17635,
198,
220,
220,
220,
329,
300,
287,
2792,
13,
19796,
62,
439,
7203,
8671,
1,
2599,
628,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2124,
6624,
352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
300,
13,
19796,
62,
439,
7203,
64,
1,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4515,
796,
300,
13,
19796,
62,
439,
7203,
64,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
13,
33295,
7,
26601,
58,
15,
4083,
5239,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
13,
33295,
7203,
4943,
628,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2124,
6624,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
2099,
62,
35924,
287,
300,
13,
19796,
62,
439,
7203,
64,
1,
2599,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4515,
62,
4906,
796,
2099,
62,
35924,
13,
5239,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23493,
13,
41049,
7203,
46506,
4686,
16034,
2099,
33411,
4515,
34178,
705,
1,
10,
26601,
62,
4906,
10,
1,
4,
6,
2162,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1332,
62,
4906,
796,
23493,
13,
69,
7569,
505,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
1332,
62,
4906,
6624,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23493,
13,
41049,
7203,
20913,
17395,
39319,
2099,
26173,
35409,
357,
15,
11,
705,
1,
10,
26601,
62,
4906,
10,
1,
24036,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
62,
2340,
13,
33295,
7,
66,
21471,
13,
12957,
808,
312,
8,
628,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2124,
6624,
657,
393,
2124,
1875,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
83,
13,
33295,
7,
75,
13,
5239,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2124,
796,
2124,
10,
16,
628,
628,
220,
220,
220,
611,
18896,
7,
926,
8,
1875,
657,
290,
256,
83,
58,
16,
60,
14512,
366,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
23493,
13,
41049,
7203,
15931,
20913,
17395,
39319,
43962,
357,
5420,
11,
4515,
11,
2472,
11,
27673,
11,
1368,
11,
3761,
11,
599,
62,
265,
74,
11,
599,
62,
4299,
11,
2866,
8,
26173,
35409,
37633,
82,
11,
4064,
82,
11,
4064,
82,
11,
4064,
82,
11,
4064,
82,
11,
4064,
82,
11,
4064,
82,
11,
4064,
82,
11,
4064,
82,
8,
15931,
1600,
256,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
43962,
62,
312,
796,
23493,
13,
12957,
808,
312,
198,
220,
220,
220,
220,
220,
220,
220,
329,
2099,
62,
312,
287,
2099,
62,
2340,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
4906,
62,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23493,
13,
41049,
7203,
20913,
17395,
39319,
43962,
62,
19199,
26173,
35409,
357,
15,
11,
43825,
2536,
7,
79,
12717,
62,
312,
47762,
1600,
43825,
2536,
7,
4906,
62,
312,
47762,
15341,
4943,
198,
198,
66,
21471,
13,
19836,
3419,
198,
37043,
13,
41509,
3419,
198,
37043,
13,
19836,
3419
] | 2.052817 | 852 |
import subprocess
import arcpy
from arcpy import env
import sqlite3
import xml.etree.ElementTree
import os
import json
import zipfile
from arcpy import mapping
import os
from xml.dom.minidom import parse
from datetime import datetime
import time
import copy
import shutil
import types
import ConfigParser
import copy
import logging
import sys
Config = ConfigParser.ConfigParser()
#logging.basicConfig(filename="logfile.txt")
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
# create a file handler
handler = logging.FileHandler("logfile.txt")
handler.setLevel(logging.INFO)
# create a logging format
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
# add the handlers to the logger
logger.addHandler(handler)
arcpy.env.overwriteOutput = True
#notes: urlKey in portals.self.json must be blank or it will try to authenticate at arcgis.com
#other gotchas
#For polygon styles, makes sure to use "style": "esriSFSSolid" and NOT "style": "esriSLSSolid" for the outline style
#OBS! OBJECTID in layers/tables MUST be int32, not integer. Otherwise lookups will not work, even after creating new records
#import time
#env.workspace = "CURRENT"
#env.addOutputsToMap = False
#env.overwriteOutput = True
arcpy.env.overwriteOutput = True
toolkitPath = os.path.abspath(os.path.dirname(__file__)).replace("\\","/")
gdal_path = ""
ogr2ogr_path = ""
ogrinfo_path = ""
gdal_data_path = ""
spatialite_path = ""
#toolkitPath+"/gdal/ogr2ogr.exe
#create a replica sqlite database for a single layer/table
#DatasetID
#DatasetName
#DatasetType>esriDTFeatureClass</DatasetType>
#LayerID
#LayerName
# Open original file
#et = xml.etree.ElementTree.parse(xmlFile)
# Append new tag: <a x='1' y='abc'>body text</a>
#new_tag = xml.etree.ElementTree.SubElement(et.getroot(), 'a')
#new_tag.text = 'body text'
#new_tag.attrib['x'] = '1' # must be str; cannot be an int
#new_tag.attrib['y'] = 'abc'
# Write back to file
#et.write('file.xml')
#et.write('file_new.xml')
#def getLayerDefinition(lyr,symbol):
# return getSymbol(lyr,symbols[featureName],lyr.name)
# layerDef={
# "drawingInfo":{
# "renderer":getRendere(lyr)
# }
# }
#get the fields for the popup
#{
# "id" : <relationshipId1>,
# "name" : "<relationshipName1>",
# "relatedTableId" : <relatedTableId1>,
# "cardinality" : "<esriRelCardinalityOneToOne>|<esriRelCardinalityOneToMany>|<esriRelCardinalityManyToMany>";,//Added at 10.1
# "role" : "<esriRelRoleOrigin>|<esriRelRoleDestination>";,//Added at 10.1
# "keyField" : "<keyFieldName2>",//Added at 10.1
# "composite" : <true>|<false>,//Added at 10.1
# "relationshipTableId": <attributedRelationshipClassTableId>, //Added in 10.1. Returned only for attributed relationships
# "keyFieldInRelationshipTable": "<key field in AttributedRelationshipClass table that matches keyField>" //Added in 10.1. Returned only for attributed relationships
#},
#def getRelationships(lyr,lyrid,cnt,tables,relationshipObj):
# getFeatureClassParentWorkspace: This script gets the geodatabase for a
# feature class. The trick here is that feature classes can be within a
# feature dataset so you need to account for two possible levels in the
# directory structure.
#see http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000019t000000
# and http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000n5000000
#"symbol":{ "type": "esriSMS", "style": "esriSMSSquare", "color": [76,115,0,255], "size": 8, "angle": 0, "xoffset": 0, "yoffset": 0, "outline": { "color": [152,230,0,255], "width": 1 } }
if __name__ == '__main__':
if sys.executable.find("python.exe") != -1:
main()
| [
11748,
850,
14681,
198,
11748,
10389,
9078,
198,
6738,
10389,
9078,
1330,
17365,
198,
11748,
44161,
578,
18,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
19974,
7753,
198,
6738,
10389,
9078,
1330,
16855,
198,
11748,
28686,
198,
6738,
35555,
13,
3438,
13,
1084,
312,
296,
1330,
21136,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
640,
198,
11748,
4866,
198,
11748,
4423,
346,
198,
11748,
3858,
198,
11748,
17056,
46677,
198,
11748,
4866,
198,
11748,
18931,
198,
11748,
25064,
198,
198,
16934,
796,
17056,
46677,
13,
16934,
46677,
3419,
628,
198,
2,
6404,
2667,
13,
35487,
16934,
7,
34345,
2625,
6404,
7753,
13,
14116,
4943,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
6404,
1362,
13,
2617,
4971,
7,
6404,
2667,
13,
10778,
8,
198,
198,
2,
2251,
257,
2393,
21360,
198,
30281,
796,
18931,
13,
8979,
25060,
7203,
6404,
7753,
13,
14116,
4943,
198,
30281,
13,
2617,
4971,
7,
6404,
2667,
13,
10778,
8,
198,
198,
2,
2251,
257,
18931,
5794,
198,
687,
1436,
796,
18931,
13,
8479,
1436,
10786,
4,
7,
292,
310,
524,
8,
82,
532,
4064,
7,
3672,
8,
82,
532,
4064,
7,
5715,
3672,
8,
82,
532,
4064,
7,
20500,
8,
82,
11537,
198,
30281,
13,
2617,
8479,
1436,
7,
687,
1436,
8,
198,
198,
2,
751,
262,
32847,
284,
262,
49706,
198,
6404,
1362,
13,
2860,
25060,
7,
30281,
8,
628,
198,
5605,
9078,
13,
24330,
13,
2502,
13564,
26410,
796,
6407,
198,
2,
17815,
25,
220,
19016,
9218,
287,
42604,
13,
944,
13,
17752,
1276,
307,
9178,
393,
340,
481,
1949,
284,
8323,
5344,
379,
10389,
70,
271,
13,
785,
198,
2,
847,
1392,
354,
292,
198,
2,
1890,
7514,
14520,
12186,
11,
1838,
1654,
284,
779,
366,
7635,
1298,
366,
274,
380,
20802,
5432,
10180,
1,
290,
5626,
366,
7635,
1298,
366,
274,
380,
8634,
5432,
10180,
1,
329,
262,
19001,
3918,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
2,
46,
4462,
0,
25334,
23680,
2389,
287,
11685,
14,
83,
2977,
17191,
307,
493,
2624,
11,
407,
18253,
13,
220,
15323,
804,
4739,
481,
407,
670,
11,
772,
706,
4441,
649,
4406,
198,
198,
2,
11748,
640,
198,
2,
24330,
13,
5225,
10223,
796,
366,
34,
39237,
1,
198,
2,
24330,
13,
2860,
26410,
82,
2514,
13912,
796,
10352,
198,
2,
24330,
13,
2502,
13564,
26410,
796,
6407,
198,
5605,
9078,
13,
24330,
13,
2502,
13564,
26410,
796,
6407,
198,
198,
25981,
15813,
15235,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
29720,
33491,
7203,
6852,
2430,
14,
4943,
198,
21287,
282,
62,
6978,
796,
13538,
198,
519,
81,
17,
519,
81,
62,
6978,
796,
13538,
198,
519,
81,
10951,
62,
6978,
796,
13538,
198,
21287,
282,
62,
7890,
62,
6978,
796,
13538,
198,
2777,
34961,
578,
62,
6978,
796,
13538,
198,
198,
2,
25981,
15813,
15235,
10,
1,
14,
21287,
282,
14,
519,
81,
17,
519,
81,
13,
13499,
198,
220,
220,
198,
2,
17953,
257,
30069,
44161,
578,
6831,
329,
257,
2060,
7679,
14,
11487,
628,
198,
2,
27354,
292,
316,
2389,
198,
2,
27354,
292,
316,
5376,
198,
2,
27354,
292,
316,
6030,
29,
274,
380,
35,
10234,
68,
1300,
9487,
3556,
27354,
292,
316,
6030,
29,
198,
2,
49925,
2389,
198,
2,
49925,
5376,
628,
220,
1303,
4946,
2656,
2393,
198,
220,
1303,
316,
796,
35555,
13,
316,
631,
13,
20180,
27660,
13,
29572,
7,
19875,
8979,
8,
628,
220,
1303,
2034,
437,
649,
7621,
25,
1279,
64,
2124,
11639,
16,
6,
331,
11639,
39305,
44167,
2618,
2420,
3556,
64,
29,
198,
220,
1303,
3605,
62,
12985,
796,
35555,
13,
316,
631,
13,
20180,
27660,
13,
7004,
20180,
7,
316,
13,
1136,
15763,
22784,
705,
64,
11537,
198,
220,
1303,
3605,
62,
12985,
13,
5239,
796,
705,
2618,
2420,
6,
198,
220,
1303,
3605,
62,
12985,
13,
1078,
822,
17816,
87,
20520,
796,
705,
16,
6,
1303,
1276,
307,
965,
26,
2314,
307,
281,
493,
198,
220,
1303,
3605,
62,
12985,
13,
1078,
822,
17816,
88,
20520,
796,
705,
39305,
6,
628,
220,
1303,
19430,
736,
284,
2393,
198,
220,
1303,
316,
13,
13564,
10786,
7753,
13,
19875,
11537,
198,
220,
1303,
316,
13,
13564,
10786,
7753,
62,
3605,
13,
19875,
11537,
628,
628,
198,
198,
2,
4299,
651,
49925,
36621,
7,
306,
81,
11,
1837,
23650,
2599,
198,
2,
220,
220,
220,
1441,
651,
13940,
23650,
7,
306,
81,
11,
1837,
2022,
10220,
58,
30053,
5376,
4357,
306,
81,
13,
3672,
8,
198,
2,
220,
220,
220,
7679,
7469,
34758,
198,
2,
220,
220,
220,
220,
220,
220,
220,
366,
19334,
278,
12360,
1298,
90,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10920,
11882,
1298,
1136,
49,
437,
567,
7,
306,
81,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
2,
220,
220,
220,
1782,
198,
198,
2,
1136,
262,
7032,
329,
262,
46207,
198,
198,
2,
90,
198,
2,
220,
220,
220,
366,
312,
1,
1058,
1279,
39468,
1056,
7390,
16,
22330,
198,
2,
220,
220,
220,
366,
3672,
1,
1058,
33490,
39468,
1056,
5376,
16,
29,
1600,
198,
2,
220,
220,
220,
366,
5363,
10962,
7390,
1,
1058,
1279,
5363,
10962,
7390,
16,
22330,
198,
2,
220,
220,
220,
366,
9517,
1292,
414,
1,
1058,
33490,
274,
380,
6892,
16962,
1292,
414,
3198,
2514,
3198,
29,
91,
27,
274,
380,
6892,
16962,
1292,
414,
3198,
2514,
7085,
29,
91,
27,
274,
380,
6892,
16962,
1292,
414,
7085,
2514,
7085,
29,
8172,
11,
1003,
13003,
379,
838,
13,
16,
198,
2,
220,
220,
220,
366,
18090,
1,
1058,
33490,
274,
380,
6892,
47445,
39688,
29,
91,
27,
274,
380,
6892,
47445,
24159,
1883,
29,
8172,
11,
1003,
13003,
379,
838,
13,
16,
198,
2,
220,
220,
220,
366,
2539,
15878,
1,
1058,
33490,
2539,
15878,
5376,
17,
29,
1600,
1003,
13003,
379,
838,
13,
16,
198,
2,
220,
220,
220,
366,
785,
1930,
578,
1,
1058,
1279,
7942,
29,
91,
27,
9562,
22330,
1003,
13003,
379,
838,
13,
16,
198,
2,
220,
220,
220,
366,
39468,
1056,
10962,
7390,
1298,
1279,
1078,
6169,
47117,
1056,
9487,
10962,
7390,
22330,
220,
3373,
13003,
287,
838,
13,
16,
13,
8229,
276,
691,
329,
14183,
6958,
198,
2,
220,
220,
220,
366,
2539,
15878,
818,
47117,
1056,
10962,
1298,
33490,
2539,
2214,
287,
3460,
6169,
47117,
1056,
9487,
3084,
326,
7466,
1994,
15878,
24618,
3373,
13003,
287,
838,
13,
16,
13,
8229,
276,
691,
329,
14183,
6958,
198,
2,
5512,
198,
198,
2,
4299,
651,
47117,
5748,
7,
306,
81,
11,
306,
6058,
11,
66,
429,
11,
83,
2977,
11,
39468,
1056,
49201,
2599,
628,
198,
2,
651,
38816,
9487,
24546,
23044,
10223,
25,
770,
4226,
3011,
262,
4903,
375,
265,
5754,
329,
257,
198,
2,
3895,
1398,
13,
383,
6908,
994,
318,
326,
3895,
6097,
460,
307,
1626,
257,
198,
2,
3895,
27039,
523,
345,
761,
284,
1848,
329,
734,
1744,
2974,
287,
262,
198,
2,
8619,
4645,
13,
628,
628,
220,
220,
220,
220,
220,
220,
220,
220,
628,
198,
2,
3826,
2638,
1378,
37540,
13,
5605,
70,
271,
13,
785,
14,
268,
14,
16794,
14,
5605,
70,
271,
12,
2118,
12,
15042,
14,
9630,
13,
6494,
2,
1003,
2999,
81,
18,
2388,
30484,
83,
10535,
198,
2,
290,
2638,
1378,
37540,
13,
5605,
70,
271,
13,
785,
14,
268,
14,
16794,
14,
5605,
70,
271,
12,
2118,
12,
15042,
14,
9630,
13,
6494,
2,
1003,
2999,
81,
18,
10535,
77,
20,
10535,
198,
2,
1,
1837,
23650,
1298,
90,
366,
4906,
1298,
366,
274,
380,
50,
5653,
1600,
366,
7635,
1298,
366,
274,
380,
12310,
5432,
421,
533,
1600,
366,
8043,
1298,
685,
4304,
11,
15363,
11,
15,
11,
13381,
4357,
366,
7857,
1298,
807,
11,
366,
9248,
1298,
657,
11,
366,
87,
28968,
1298,
657,
11,
366,
88,
28968,
1298,
657,
11,
366,
448,
1370,
1298,
1391,
366,
8043,
1298,
685,
17827,
11,
19214,
11,
15,
11,
13381,
4357,
366,
10394,
1298,
352,
1782,
1782,
628,
198,
220,
220,
220,
220,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
611,
25064,
13,
18558,
18187,
13,
19796,
7203,
29412,
13,
13499,
4943,
14512,
532,
16,
25,
198,
220,
220,
220,
220,
220,
220,
1388,
3419,
198
] | 2.703756 | 1,411 |
"Testcases for text messages"
from .. import Case
from bobot.Rule import Rule
from bobot.Response import Text
responseAsTextDict = Case.Case([
Rule({
'match': 'text',
'response': {
'text': 'Waiting for text'
}
})
], [
{
'expected': [Case.Expectation('Waiting for text').value()],
'message': Case.Message('text').value()
}
])
responseAsTextDictOptions = Case.Case([
Rule({
'match': 'text',
'response': {
'text': {
'text': 'Waiting for {text}',
'interpolate': True
}
}
})
], [
{
'expected': [Case.Expectation('Waiting for text').value()],
'message': Case.Message('text').value()
}
])
responseAsTextObject = Case.Case([
Rule({
'match': 'text',
'response': Text('Waiting for text')
})
], [
{
'expected': [Case.Expectation('Waiting for text').value()],
'message': Case.Message('text').value()
}
])
responseAsTextObjectOptions = Case.Case([
Rule({
'match': 'text',
'response': Text('Waiting for {text}', interpolate=True)
})
], [
{
'expected': [Case.Expectation('Waiting for text').value()],
'message': Case.Message('text').value()
}
])
| [
1,
14402,
33964,
329,
2420,
6218,
1,
628,
198,
6738,
11485,
1330,
8913,
198,
6738,
29202,
313,
13,
31929,
1330,
14330,
198,
6738,
29202,
313,
13,
31077,
1330,
8255,
198,
198,
26209,
1722,
8206,
35,
713,
796,
8913,
13,
20448,
26933,
198,
220,
220,
220,
14330,
15090,
198,
220,
220,
220,
220,
220,
220,
220,
705,
15699,
10354,
705,
5239,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
26209,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
5239,
10354,
705,
33484,
1780,
329,
2420,
6,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
32092,
198,
4357,
685,
198,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
40319,
10354,
685,
20448,
13,
3109,
806,
341,
10786,
33484,
1780,
329,
2420,
27691,
8367,
3419,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
20500,
10354,
8913,
13,
12837,
10786,
5239,
27691,
8367,
3419,
198,
220,
220,
220,
1782,
198,
12962,
198,
198,
26209,
1722,
8206,
35,
713,
29046,
796,
8913,
13,
20448,
26933,
198,
220,
220,
220,
14330,
15090,
198,
220,
220,
220,
220,
220,
220,
220,
705,
15699,
10354,
705,
5239,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
26209,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
5239,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
5239,
10354,
705,
33484,
1780,
329,
1391,
5239,
92,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
3849,
16104,
378,
10354,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
32092,
198,
4357,
685,
198,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
40319,
10354,
685,
20448,
13,
3109,
806,
341,
10786,
33484,
1780,
329,
2420,
27691,
8367,
3419,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
20500,
10354,
8913,
13,
12837,
10786,
5239,
27691,
8367,
3419,
198,
220,
220,
220,
1782,
198,
12962,
198,
198,
26209,
1722,
8206,
10267,
796,
8913,
13,
20448,
26933,
198,
220,
220,
220,
14330,
15090,
198,
220,
220,
220,
220,
220,
220,
220,
705,
15699,
10354,
705,
5239,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
26209,
10354,
8255,
10786,
33484,
1780,
329,
2420,
11537,
198,
220,
220,
220,
32092,
198,
4357,
685,
198,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
40319,
10354,
685,
20448,
13,
3109,
806,
341,
10786,
33484,
1780,
329,
2420,
27691,
8367,
3419,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
20500,
10354,
8913,
13,
12837,
10786,
5239,
27691,
8367,
3419,
198,
220,
220,
220,
1782,
198,
12962,
198,
198,
26209,
1722,
8206,
10267,
29046,
796,
8913,
13,
20448,
26933,
198,
220,
220,
220,
14330,
15090,
198,
220,
220,
220,
220,
220,
220,
220,
705,
15699,
10354,
705,
5239,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
26209,
10354,
8255,
10786,
33484,
1780,
329,
1391,
5239,
92,
3256,
39555,
378,
28,
17821,
8,
198,
220,
220,
220,
32092,
198,
4357,
685,
198,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
40319,
10354,
685,
20448,
13,
3109,
806,
341,
10786,
33484,
1780,
329,
2420,
27691,
8367,
3419,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
20500,
10354,
8913,
13,
12837,
10786,
5239,
27691,
8367,
3419,
198,
220,
220,
220,
1782,
198,
12962,
198
] | 2.181063 | 602 |
#!/usr/bin/env python
# Copyright (c) 2019 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: BSD-2 License
# The full license information can be found in LICENSE.txt
# in the root directory of this project.
import uuid
from sqlalchemy.orm import joinedload
from sqlalchemy.sql import func
from axon.db.sql.config import models as cmodels
from axon.db.sql.analytics import models as amodels
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
15069,
357,
66,
8,
13130,
37754,
11,
3457,
13,
1439,
6923,
33876,
13,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
347,
10305,
12,
17,
13789,
198,
2,
383,
1336,
5964,
1321,
460,
307,
1043,
287,
38559,
24290,
13,
14116,
198,
2,
287,
262,
6808,
8619,
286,
428,
1628,
13,
198,
198,
11748,
334,
27112,
198,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
5399,
2220,
198,
6738,
44161,
282,
26599,
13,
25410,
1330,
25439,
198,
198,
6738,
7877,
261,
13,
9945,
13,
25410,
13,
11250,
1330,
4981,
355,
269,
27530,
198,
6738,
7877,
261,
13,
9945,
13,
25410,
13,
38200,
14094,
1330,
4981,
355,
716,
375,
1424,
628,
628,
628,
628,
198
] | 3.296 | 125 |
from py3dbp import Packer, Bin, Item
packer = Packer()
packer.add_bin(Bin('small', 300,300,200,5))
packer.add_bin(Bin('big', 500,600,400,8))
packer.add_item(Item('Producto 1',45,60,70,0.5))
packer.add_item(Item('Producto 2',30,50,30,0.7))
packer.add_item(Item('Producto 3',20,70,70,1))
packer.add_item(Item('Producto 4',45,60,70,1.2))
packer.add_item(Item('Producto 5',170,80,70,1.2))
packer.add_item(Item('Producto 6',300,200,70,1.2))
packer.pack(bigger_first=True)
for b in packer.bins:
print(":::::::::::", b.string())
print("FITTED ITEMS:")
for item in b.items:
print("====> ", item.string())
print("UNFITTED ITEMS:")
for item in b.unfitted_items:
print("====> ", item.string())
print("***************************************************")
print("***************************************************") | [
6738,
12972,
18,
9945,
79,
1330,
6400,
263,
11,
20828,
11,
9097,
198,
198,
8002,
263,
796,
6400,
263,
3419,
198,
198,
8002,
263,
13,
2860,
62,
8800,
7,
33,
259,
10786,
17470,
3256,
5867,
11,
6200,
11,
2167,
11,
20,
4008,
198,
8002,
263,
13,
2860,
62,
8800,
7,
33,
259,
10786,
14261,
3256,
5323,
11,
8054,
11,
7029,
11,
23,
4008,
198,
198,
8002,
263,
13,
2860,
62,
9186,
7,
7449,
10786,
15667,
78,
352,
3256,
2231,
11,
1899,
11,
2154,
11,
15,
13,
20,
4008,
198,
8002,
263,
13,
2860,
62,
9186,
7,
7449,
10786,
15667,
78,
362,
3256,
1270,
11,
1120,
11,
1270,
11,
15,
13,
22,
4008,
198,
8002,
263,
13,
2860,
62,
9186,
7,
7449,
10786,
15667,
78,
513,
3256,
1238,
11,
2154,
11,
2154,
11,
16,
4008,
198,
8002,
263,
13,
2860,
62,
9186,
7,
7449,
10786,
15667,
78,
604,
3256,
2231,
11,
1899,
11,
2154,
11,
16,
13,
17,
4008,
198,
8002,
263,
13,
2860,
62,
9186,
7,
7449,
10786,
15667,
78,
642,
3256,
17279,
11,
1795,
11,
2154,
11,
16,
13,
17,
4008,
198,
8002,
263,
13,
2860,
62,
9186,
7,
7449,
10786,
15667,
78,
718,
3256,
6200,
11,
2167,
11,
2154,
11,
16,
13,
17,
4008,
198,
198,
8002,
263,
13,
8002,
7,
14261,
1362,
62,
11085,
28,
17821,
8,
198,
198,
1640,
275,
287,
2353,
263,
13,
65,
1040,
25,
198,
220,
220,
220,
3601,
7,
1298,
43661,
3712,
1600,
275,
13,
8841,
28955,
628,
220,
220,
220,
3601,
7203,
37,
22470,
1961,
7283,
39201,
25,
4943,
198,
220,
220,
220,
329,
2378,
287,
275,
13,
23814,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
1421,
29,
33172,
2378,
13,
8841,
28955,
628,
220,
220,
220,
3601,
7203,
4944,
37,
22470,
1961,
7283,
39201,
25,
4943,
198,
220,
220,
220,
329,
2378,
287,
275,
13,
403,
38631,
62,
23814,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
1421,
29,
33172,
2378,
13,
8841,
28955,
628,
220,
220,
220,
3601,
7203,
17174,
8412,
8162,
4943,
198,
220,
220,
220,
3601,
7203,
17174,
8412,
8162,
4943
] | 2.438746 | 351 |
# 🚨 Don't change the code below 👇
print("Welcome to the Love Calculator!")
name1 = input("What is your name? \n")
name2 = input("What is their name? \n")
# 🚨 Don't change the code above 👆
#Write your code below this line 👇
names_concat = name1.lower() + name2.lower()
names_true_total = names_concat.count('t') + names_concat.count('r') + names_concat.count('u') + names_concat.count('e')
names_love_total = names_concat.count('l') + names_concat.count('o') + names_concat.count('v') + names_concat.count('e')
score_str = str(names_true_total) + str(names_love_total)
score = int(score_str)
if score < 10 or score > 90:
print(f"Your score is {score}, you go together like coke and mentos.")
elif score >= 40 and score <= 50:
print(f"Your score is {score}, you are alright together.")
else:
print(f"Your score is {score}.")
| [
2,
12520,
248,
101,
2094,
470,
1487,
262,
2438,
2174,
50169,
229,
198,
4798,
7203,
14618,
284,
262,
5896,
43597,
2474,
8,
198,
3672,
16,
796,
5128,
7203,
2061,
318,
534,
1438,
30,
3467,
77,
4943,
198,
3672,
17,
796,
5128,
7203,
2061,
318,
511,
1438,
30,
3467,
77,
4943,
198,
2,
12520,
248,
101,
2094,
470,
1487,
262,
2438,
2029,
50169,
228,
198,
198,
2,
16594,
534,
2438,
2174,
428,
1627,
50169,
229,
198,
198,
14933,
62,
1102,
9246,
796,
1438,
16,
13,
21037,
3419,
1343,
1438,
17,
13,
21037,
3419,
198,
198,
14933,
62,
7942,
62,
23350,
796,
3891,
62,
1102,
9246,
13,
9127,
10786,
83,
11537,
1343,
3891,
62,
1102,
9246,
13,
9127,
10786,
81,
11537,
1343,
3891,
62,
1102,
9246,
13,
9127,
10786,
84,
11537,
1343,
3891,
62,
1102,
9246,
13,
9127,
10786,
68,
11537,
198,
14933,
62,
23205,
62,
23350,
796,
3891,
62,
1102,
9246,
13,
9127,
10786,
75,
11537,
1343,
3891,
62,
1102,
9246,
13,
9127,
10786,
78,
11537,
1343,
3891,
62,
1102,
9246,
13,
9127,
10786,
85,
11537,
1343,
3891,
62,
1102,
9246,
13,
9127,
10786,
68,
11537,
198,
198,
26675,
62,
2536,
796,
965,
7,
14933,
62,
7942,
62,
23350,
8,
1343,
965,
7,
14933,
62,
23205,
62,
23350,
8,
198,
26675,
796,
493,
7,
26675,
62,
2536,
8,
198,
198,
361,
4776,
1279,
838,
393,
4776,
1875,
4101,
25,
198,
220,
220,
220,
3601,
7,
69,
1,
7120,
4776,
318,
1391,
26675,
5512,
345,
467,
1978,
588,
763,
365,
290,
6229,
418,
19570,
198,
417,
361,
4776,
18189,
2319,
290,
4776,
19841,
2026,
25,
198,
220,
220,
220,
3601,
7,
69,
1,
7120,
4776,
318,
1391,
26675,
5512,
345,
389,
23036,
1978,
19570,
198,
17772,
25,
198,
220,
220,
220,
3601,
7,
69,
1,
7120,
4776,
318,
1391,
26675,
92,
19570,
198
] | 2.790698 | 301 |
import pandas as pd
import os
import pymorphy2
from sklearn.preprocessing import MinMaxScaler
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
import numpy as np
import pickle
PATH = 'models/'
with open(os.path.join(PATH, 'tfidf.pkl'), 'rb') as f:
tfidf = pickle.load(f)
time_related = ['лет', 'год ', 'меся', 'недел', 'дне', 'года']
specials_to_remove = [
'.', '"', "'", '?', '(', ')', '`',
]
specials_to_replace = [
'-', '\\', '/', ','
]
key_pos = ['NOUN', 'VERB', 'NUMR', 'ADJF', 'ADJS', 'INFN']
morph = pymorphy2.MorphAnalyzer()
| [
11748,
19798,
292,
355,
279,
67,
201,
198,
11748,
28686,
201,
198,
11748,
12972,
4491,
6883,
17,
201,
198,
6738,
1341,
35720,
13,
3866,
36948,
1330,
1855,
11518,
3351,
36213,
201,
198,
6738,
1341,
35720,
13,
30053,
62,
2302,
7861,
13,
5239,
1330,
2764,
38469,
7509,
11,
309,
69,
312,
69,
38469,
7509,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
2298,
293,
201,
198,
201,
198,
34219,
796,
705,
27530,
14,
6,
201,
198,
4480,
1280,
7,
418,
13,
6978,
13,
22179,
7,
34219,
11,
705,
27110,
312,
69,
13,
79,
41582,
33809,
705,
26145,
11537,
355,
277,
25,
201,
198,
220,
220,
220,
48700,
312,
69,
796,
2298,
293,
13,
2220,
7,
69,
8,
201,
198,
201,
198,
2435,
62,
5363,
796,
37250,
30143,
16843,
20375,
3256,
705,
140,
111,
25443,
112,
46083,
705,
43108,
16843,
21727,
40623,
3256,
705,
22177,
16843,
43666,
16843,
30143,
3256,
705,
43666,
22177,
16843,
3256,
705,
140,
111,
25443,
112,
16142,
20520,
201,
198,
20887,
82,
62,
1462,
62,
28956,
796,
685,
201,
198,
220,
220,
220,
705,
2637,
11,
705,
1,
3256,
24018,
1600,
705,
30,
3256,
29513,
3256,
705,
8,
3256,
705,
63,
3256,
201,
198,
60,
201,
198,
20887,
82,
62,
1462,
62,
33491,
796,
685,
201,
198,
220,
220,
220,
705,
12,
3256,
705,
6852,
3256,
31051,
3256,
705,
4032,
201,
198,
60,
201,
198,
2539,
62,
1930,
796,
37250,
45,
19385,
3256,
705,
5959,
33,
3256,
705,
41359,
49,
3256,
705,
2885,
41,
37,
3256,
705,
2885,
20120,
3256,
705,
1268,
43221,
20520,
201,
198,
24503,
796,
12972,
4491,
6883,
17,
13,
44,
13425,
37702,
9107,
3419,
201
] | 2.179487 | 273 |
import rebound
import unittest
import math
import numpy as np
if __name__ == "__main__":
unittest.main()
| [
11748,
23623,
198,
11748,
555,
715,
395,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.820513 | 39 |
from typing import Dict, Optional
from datasets import datasets
import torch
from torch.utils.data import DataLoader
from catalyst.contrib import nn
from catalyst.contrib.models.cv.encoders import ResnetEncoder
from catalyst.data.dataset.self_supervised import SelfSupervisedDatasetWrapper
def add_arguments(parser) -> None:
"""Function to add common arguments to argparse:
feature_dim: Feature dim for latent vector
temperature: Temperature used in softmax
batch_size: Number of images in each mini-batch
epochs: Number of sweeps over the dataset to train
num_workers: Number of workers to process a dataloader
logdir: Logs directory (tensorboard, weights, etc)
dataset: CIFAR-10, CIFAR-100 or STL10
learning-rate: Learning rate for optimizer
Args:
parser: argparser like object
"""
parser.add_argument(
"--feature_dim", default=128, type=int, help="Feature dim for latent vector"
)
parser.add_argument(
"--temperature", default=0.5, type=float, help="Temperature used in softmax"
)
parser.add_argument(
"--batch_size", default=512, type=int, help="Number of images in each mini-batch"
)
parser.add_argument(
"--epochs", default=1000, type=int, help="Number of sweeps over the dataset to train"
)
parser.add_argument(
"--num_workers", default=8, type=float, help="Number of workers to process a dataloader"
)
parser.add_argument(
"--logdir",
default="./logdir",
type=str,
help="Logs directory (tensorboard, weights, etc)",
)
parser.add_argument(
"--dataset",
default="CIFAR-10",
type=str,
choices=datasets.keys(),
help="Dataset: CIFAR-10, CIFAR-100 or STL10",
)
parser.add_argument(
"--learning-rate", default=0.001, type=float, help="Learning rate for optimizer"
)
class ContrastiveModel(torch.nn.Module):
"""Contrastive model with projective head.
Args:
model: projective head for the train time
encoder: model for the future uses
"""
def forward(self, x):
"""Forward method.
Args:
x: input for the encoder
Returns:
(embeddings, projections)
"""
emb = self.encoder(x)
projection = self.model(emb)
return emb, projection
def get_loaders(
dataset: str, batch_size: int, num_workers: Optional[int]
) -> Dict[str, DataLoader]:
"""Init loaders based on parsed parametrs.
Args:
dataset: dataset for the experiment
batch_size: batch size for loaders
num_workers: number of workers to process loaders
Returns:
{"train":..., "valid":...}
"""
transforms = datasets[dataset]["train_transform"]
transform_original = datasets[dataset]["valid_transform"]
train_data = SelfSupervisedDatasetWrapper(
datasets[dataset]["dataset"](root="data", train=True, transform=None, download=True),
transforms=transforms,
transform_original=transform_original,
)
valid_data = SelfSupervisedDatasetWrapper(
datasets[dataset]["dataset"](root="data", train=False, transform=None, download=True),
transforms=transforms,
transform_original=transform_original,
)
train_loader = DataLoader(train_data, batch_size=batch_size, num_workers=num_workers)
valid_loader = DataLoader(valid_data, batch_size=batch_size, num_workers=num_workers)
return {"train": train_loader, "valid": valid_loader}
def get_contrastive_model(feature_dim: int) -> ContrastiveModel:
"""Init contrastive model based on parsed parametrs.
Args:
feature_dim: dimensinality of contrative projection
Returns:
ContrstiveModel instance
"""
encoder = nn.Sequential(ResnetEncoder(arch="resnet50", frozen=False), nn.Flatten())
projection_head = nn.Sequential(
nn.Linear(2048, 512, bias=False),
nn.ReLU(inplace=True),
nn.Linear(512, feature_dim, bias=True),
)
model = ContrastiveModel(projection_head, encoder)
return model
| [
6738,
19720,
1330,
360,
713,
11,
32233,
198,
198,
6738,
40522,
1330,
40522,
198,
11748,
28034,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
198,
198,
6738,
31357,
13,
3642,
822,
1330,
299,
77,
198,
6738,
31357,
13,
3642,
822,
13,
27530,
13,
33967,
13,
12685,
375,
364,
1330,
1874,
3262,
27195,
12342,
198,
6738,
31357,
13,
7890,
13,
19608,
292,
316,
13,
944,
62,
16668,
16149,
1330,
12189,
12442,
16149,
27354,
292,
316,
36918,
2848,
628,
198,
4299,
751,
62,
853,
2886,
7,
48610,
8,
4613,
6045,
25,
198,
220,
220,
220,
37227,
22203,
284,
751,
2219,
7159,
284,
1822,
29572,
25,
198,
220,
220,
220,
3895,
62,
27740,
25,
27018,
5391,
329,
41270,
15879,
198,
220,
220,
220,
5951,
25,
34467,
973,
287,
2705,
9806,
198,
220,
220,
220,
15458,
62,
7857,
25,
7913,
286,
4263,
287,
1123,
9927,
12,
43501,
198,
220,
220,
220,
36835,
82,
25,
7913,
286,
46778,
625,
262,
27039,
284,
4512,
198,
220,
220,
220,
997,
62,
22896,
25,
7913,
286,
3259,
284,
1429,
257,
4818,
282,
1170,
263,
198,
220,
220,
220,
2604,
15908,
25,
5972,
82,
8619,
357,
83,
22854,
3526,
11,
19590,
11,
3503,
8,
198,
220,
220,
220,
27039,
25,
327,
5064,
1503,
12,
940,
11,
327,
5064,
1503,
12,
3064,
393,
37269,
940,
198,
220,
220,
220,
4673,
12,
4873,
25,
18252,
2494,
329,
6436,
7509,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
30751,
25,
1822,
48610,
588,
2134,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
438,
30053,
62,
27740,
1600,
4277,
28,
12762,
11,
2099,
28,
600,
11,
1037,
2625,
38816,
5391,
329,
41270,
15879,
1,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
438,
11498,
21069,
1600,
4277,
28,
15,
13,
20,
11,
2099,
28,
22468,
11,
1037,
2625,
42492,
973,
287,
2705,
9806,
1,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
438,
43501,
62,
7857,
1600,
4277,
28,
25836,
11,
2099,
28,
600,
11,
1037,
2625,
15057,
286,
4263,
287,
1123,
9927,
12,
43501,
1,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
438,
538,
5374,
82,
1600,
4277,
28,
12825,
11,
2099,
28,
600,
11,
1037,
2625,
15057,
286,
46778,
625,
262,
27039,
284,
4512,
1,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
438,
22510,
62,
22896,
1600,
4277,
28,
23,
11,
2099,
28,
22468,
11,
1037,
2625,
15057,
286,
3259,
284,
1429,
257,
4818,
282,
1170,
263,
1,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
438,
6404,
15908,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
4277,
28,
1911,
14,
6404,
15908,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
2099,
28,
2536,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
11187,
82,
8619,
357,
83,
22854,
3526,
11,
19590,
11,
3503,
42501,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
438,
19608,
292,
316,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
4277,
2625,
34,
5064,
1503,
12,
940,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
2099,
28,
2536,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7747,
28,
19608,
292,
1039,
13,
13083,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
27354,
292,
316,
25,
327,
5064,
1503,
12,
940,
11,
327,
5064,
1503,
12,
3064,
393,
37269,
940,
1600,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
438,
40684,
12,
4873,
1600,
4277,
28,
15,
13,
8298,
11,
2099,
28,
22468,
11,
1037,
2625,
41730,
2494,
329,
6436,
7509,
1,
198,
220,
220,
220,
1267,
628,
198,
4871,
47011,
425,
17633,
7,
13165,
354,
13,
20471,
13,
26796,
2599,
198,
220,
220,
220,
37227,
4264,
5685,
425,
2746,
351,
1628,
425,
1182,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2746,
25,
1628,
425,
1182,
329,
262,
4512,
640,
198,
220,
220,
220,
220,
220,
220,
220,
2207,
12342,
25,
2746,
329,
262,
2003,
3544,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
2651,
7,
944,
11,
2124,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
39746,
2446,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
25,
5128,
329,
262,
2207,
12342,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
20521,
67,
654,
11,
19887,
8,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
4072,
796,
2116,
13,
12685,
12342,
7,
87,
8,
198,
220,
220,
220,
220,
220,
220,
220,
20128,
796,
2116,
13,
19849,
7,
24419,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
4072,
11,
20128,
628,
198,
4299,
651,
62,
2220,
364,
7,
198,
220,
220,
220,
27039,
25,
965,
11,
15458,
62,
7857,
25,
493,
11,
997,
62,
22896,
25,
32233,
58,
600,
60,
198,
8,
4613,
360,
713,
58,
2536,
11,
6060,
17401,
5974,
198,
220,
220,
220,
37227,
31768,
3440,
364,
1912,
319,
44267,
5772,
316,
3808,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
27039,
25,
27039,
329,
262,
6306,
198,
220,
220,
220,
220,
220,
220,
220,
15458,
62,
7857,
25,
15458,
2546,
329,
3440,
364,
198,
220,
220,
220,
220,
220,
220,
220,
997,
62,
22896,
25,
1271,
286,
3259,
284,
1429,
3440,
364,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
19779,
27432,
1298,
986,
11,
366,
12102,
1298,
986,
92,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
31408,
796,
40522,
58,
19608,
292,
316,
7131,
1,
27432,
62,
35636,
8973,
198,
220,
220,
220,
6121,
62,
14986,
796,
40522,
58,
19608,
292,
316,
7131,
1,
12102,
62,
35636,
8973,
628,
220,
220,
220,
4512,
62,
7890,
796,
12189,
12442,
16149,
27354,
292,
316,
36918,
2848,
7,
198,
220,
220,
220,
220,
220,
220,
220,
40522,
58,
19608,
292,
316,
7131,
1,
19608,
292,
316,
8973,
7,
15763,
2625,
7890,
1600,
4512,
28,
17821,
11,
6121,
28,
14202,
11,
4321,
28,
17821,
828,
198,
220,
220,
220,
220,
220,
220,
220,
31408,
28,
7645,
23914,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6121,
62,
14986,
28,
35636,
62,
14986,
11,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
4938,
62,
7890,
796,
12189,
12442,
16149,
27354,
292,
316,
36918,
2848,
7,
198,
220,
220,
220,
220,
220,
220,
220,
40522,
58,
19608,
292,
316,
7131,
1,
19608,
292,
316,
8973,
7,
15763,
2625,
7890,
1600,
4512,
28,
25101,
11,
6121,
28,
14202,
11,
4321,
28,
17821,
828,
198,
220,
220,
220,
220,
220,
220,
220,
31408,
28,
7645,
23914,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6121,
62,
14986,
28,
35636,
62,
14986,
11,
198,
220,
220,
220,
1267,
628,
220,
220,
220,
4512,
62,
29356,
796,
6060,
17401,
7,
27432,
62,
7890,
11,
15458,
62,
7857,
28,
43501,
62,
7857,
11,
997,
62,
22896,
28,
22510,
62,
22896,
8,
628,
220,
220,
220,
4938,
62,
29356,
796,
6060,
17401,
7,
12102,
62,
7890,
11,
15458,
62,
7857,
28,
43501,
62,
7857,
11,
997,
62,
22896,
28,
22510,
62,
22896,
8,
628,
220,
220,
220,
1441,
19779,
27432,
1298,
4512,
62,
29356,
11,
366,
12102,
1298,
4938,
62,
29356,
92,
628,
198,
4299,
651,
62,
3642,
5685,
425,
62,
19849,
7,
30053,
62,
27740,
25,
493,
8,
4613,
47011,
425,
17633,
25,
198,
220,
220,
220,
37227,
31768,
6273,
425,
2746,
1912,
319,
44267,
5772,
316,
3808,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3895,
62,
27740,
25,
5391,
641,
1292,
414,
286,
3445,
876,
20128,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2345,
81,
301,
425,
17633,
4554,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2207,
12342,
796,
299,
77,
13,
44015,
1843,
7,
4965,
3262,
27195,
12342,
7,
998,
2625,
411,
3262,
1120,
1600,
12912,
28,
25101,
828,
299,
77,
13,
7414,
41769,
28955,
198,
220,
220,
220,
20128,
62,
2256,
796,
299,
77,
13,
44015,
1843,
7,
198,
220,
220,
220,
220,
220,
220,
220,
299,
77,
13,
14993,
451,
7,
1238,
2780,
11,
22243,
11,
10690,
28,
25101,
828,
198,
220,
220,
220,
220,
220,
220,
220,
299,
77,
13,
3041,
41596,
7,
259,
5372,
28,
17821,
828,
198,
220,
220,
220,
220,
220,
220,
220,
299,
77,
13,
14993,
451,
7,
25836,
11,
3895,
62,
27740,
11,
10690,
28,
17821,
828,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
2746,
796,
47011,
425,
17633,
7,
16302,
295,
62,
2256,
11,
2207,
12342,
8,
198,
220,
220,
220,
1441,
2746,
198
] | 2.59185 | 1,595 |
import spotipy
import sys
import musicbrainzngs
from spotipy.oauth2 import SpotifyClientCredentials
from requests import get, exceptions
from json import loads
from dateparser import parse
from pandas import DataFrame, read_excel
from bs4 import BeautifulSoup
from time import sleep
from datetime import datetime, timedelta
from re import compile, sub
from codecs import open
import pysftp
from glob import glob
import os
if __name__ == "__main__":
tst = sys.argv[1] if len(sys.argv) > 1 else False
vg = Versgedropt(test=tst)
vg.set_mbids(mscbrnz_path="")
if vg.test:
vg.get_drops_for_musicbrainz_belgians()
vg.generate_website()
vg.put_website_online()
else:
while True:
if datetime.now().hour == 14:
vg.get_drops_for_musicbrainz_belgians()
vg.generate_website()
vg.put_website_online()
| [
11748,
4136,
541,
88,
198,
11748,
25064,
198,
11748,
2647,
27825,
89,
782,
82,
198,
6738,
4136,
541,
88,
13,
12162,
1071,
17,
1330,
26778,
11792,
34,
445,
14817,
198,
6738,
7007,
1330,
651,
11,
13269,
198,
6738,
33918,
1330,
15989,
198,
6738,
3128,
48610,
1330,
21136,
198,
6738,
19798,
292,
1330,
6060,
19778,
11,
1100,
62,
1069,
5276,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
6738,
640,
1330,
3993,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
6738,
302,
1330,
17632,
11,
850,
198,
6738,
40481,
82,
1330,
1280,
198,
11748,
279,
893,
701,
79,
198,
6738,
15095,
1330,
15095,
198,
11748,
28686,
628,
628,
628,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
256,
301,
796,
25064,
13,
853,
85,
58,
16,
60,
611,
18896,
7,
17597,
13,
853,
85,
8,
1875,
352,
2073,
10352,
198,
220,
220,
220,
410,
70,
796,
18535,
2004,
305,
457,
7,
9288,
28,
83,
301,
8,
198,
220,
220,
220,
410,
70,
13,
2617,
62,
2022,
2340,
7,
907,
66,
1671,
27305,
62,
6978,
2625,
4943,
198,
220,
220,
220,
611,
410,
70,
13,
9288,
25,
198,
220,
220,
220,
220,
220,
220,
220,
410,
70,
13,
1136,
62,
49253,
62,
1640,
62,
28965,
27825,
89,
62,
6667,
70,
1547,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
410,
70,
13,
8612,
378,
62,
732,
12485,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
410,
70,
13,
1996,
62,
732,
12485,
62,
25119,
3419,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
981,
6407,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
4818,
8079,
13,
2197,
22446,
9769,
6624,
1478,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
70,
13,
1136,
62,
49253,
62,
1640,
62,
28965,
27825,
89,
62,
6667,
70,
1547,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
70,
13,
8612,
378,
62,
732,
12485,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
70,
13,
1996,
62,
732,
12485,
62,
25119,
3419,
198
] | 2.375979 | 383 |
"""Tests for the pushbullet component."""
| [
37811,
51,
3558,
329,
262,
4574,
15065,
1616,
7515,
526,
15931,
198
] | 3.5 | 12 |
# -*- coding: utf-8 -*-
"""Tests for processing.querying module."""
from os.path import expanduser
from nose.tools import assert_equal, assert_true
from string import Template
from sosia.establishing import connect_database
from sosia.processing import base_query, count_citations, create_queries,\
query_pubs_by_sourceyear, stacked_query
test_cache = expanduser("~/.sosia/test.sqlite")
test_conn = connect_database(test_cache)
test_id = 53164702100
year = 2017
refresh = 30
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
51,
3558,
329,
7587,
13,
10819,
1112,
8265,
526,
15931,
198,
198,
6738,
28686,
13,
6978,
1330,
4292,
7220,
198,
198,
6738,
9686,
13,
31391,
1330,
6818,
62,
40496,
11,
6818,
62,
7942,
198,
6738,
4731,
1330,
37350,
198,
198,
6738,
264,
418,
544,
13,
40037,
278,
1330,
2018,
62,
48806,
198,
6738,
264,
418,
544,
13,
36948,
1330,
2779,
62,
22766,
11,
954,
62,
66,
20597,
11,
2251,
62,
421,
10640,
11,
59,
198,
220,
220,
220,
12405,
62,
12984,
82,
62,
1525,
62,
10459,
1941,
11,
24167,
62,
22766,
198,
198,
9288,
62,
23870,
796,
4292,
7220,
7203,
93,
11757,
82,
418,
544,
14,
9288,
13,
25410,
578,
4943,
198,
9288,
62,
37043,
796,
2018,
62,
48806,
7,
9288,
62,
23870,
8,
198,
9288,
62,
312,
796,
7192,
23237,
2154,
2481,
405,
198,
1941,
796,
2177,
198,
5420,
3447,
796,
1542,
628,
628,
628,
628,
198
] | 3.01227 | 163 |
# swgpy
from swgpy import app, utility, weather
from swgpy.weather import WeatherEvent, WeatherSequence
# modules
import random
service_mgr = kernel.serviceManager()
weather_svc = service_mgr.weatherService()
#This script is called every 30 minutes.
#Weather duration is now set in minutes: weather_event(duration(mins),weatherType,cloudVector(X,Y,Z)).
#Each of the following is a list of weather sequences. Each sequence runs until its duration has expired.
#At the end of the sequence, NOSTORM is used to set the weather back to clear. Whilst each weather sequence list
#is running, no other weather sequence can be used on the same scene until the sequences have expired.
lightStormSequence = WeatherSequence()
lightStormSequence.append(WeatherEvent(20, weather.WEATHER.CLOUDY, utility.vector3(1.0, 0.0, 0.0)))
lightStormSequence.append(WeatherEvent(10, weather.WEATHER.LIGHTSTORM, utility.vector3(1.0, 0.0, 0.0)))
lightStormSequence.append(WeatherEvent(10, weather.WEATHER.CLOUDY, utility.vector3(1.0, 0.0, 0.0)))
lightStormSequence.append(WeatherEvent(10, weather.WEATHER.NOSTORM, utility.vector3(1.0, 0.0, 0.0)))
mediumStormSequence = WeatherSequence()
mediumStormSequence.append(WeatherEvent(20, weather.WEATHER.CLOUDY, utility.vector3(1.0, 0.0, 0.0)))
mediumStormSequence.append(WeatherEvent(3, weather.WEATHER.LIGHTSTORM, utility.vector3(1.0, 0.0, 0.0)))
mediumStormSequence.append(WeatherEvent(10, weather.WEATHER.MEDIUMSTORM, utility.vector3(1.0, 0.0, 0.0)))
mediumStormSequence.append(WeatherEvent(3, weather.WEATHER.LIGHTSTORM, utility.vector3(1.0, 0.0, 0.0)))
mediumStormSequence.append(WeatherEvent(10, weather.WEATHER.CLOUDY, utility.vector3(1.0, 0.0, 0.0)))
mediumStormSequence.append(WeatherEvent(10, weather.WEATHER.NOSTORM, utility.vector3(1.0, 0.0, 0.0)))
heavyStormSequence = WeatherSequence()
heavyStormSequence.append(WeatherEvent(20, weather.WEATHER.CLOUDY, utility.vector3(1.0, 0.0, 0.0)))
heavyStormSequence.append(WeatherEvent(3, weather.WEATHER.LIGHTSTORM, utility.vector3(1.0, 0.0, 0.0)))
heavyStormSequence.append(WeatherEvent(5, weather.WEATHER.MEDIUMSTORM, utility.vector3(1.0, 0.0, 0.0)))
heavyStormSequence.append(WeatherEvent(20, weather.WEATHER.HEAVYSTORM, utility.vector3(1.0, 0.0, 0.0)))
heavyStormSequence.append(WeatherEvent(5, weather.WEATHER.MEDIUMSTORM, utility.vector3(1.0, 0.0, 0.0)))
heavyStormSequence.append(WeatherEvent(3, weather.WEATHER.LIGHTSTORM, utility.vector3(1.0, 0.0, 0.0)))
heavyStormSequence.append(WeatherEvent(10, weather.WEATHER.CLOUDY, utility.vector3(1.0, 0.0, 0.0)))
heavyStormSequence.append(WeatherEvent(10, weather.WEATHER.NOSTORM, utility.vector3(1.0, 0.0, 0.0)))
#Crude random function with weight. Needs improving.
weatherChoice([(heavyStormSequence, 0.02), (mediumStormSequence, 0.15), (lightStormSequence,0.2)],weather.SCENE.CORELLIA)
| [
2,
1509,
70,
9078,
198,
6738,
1509,
70,
9078,
1330,
598,
11,
10361,
11,
6193,
198,
6738,
1509,
70,
9078,
13,
23563,
1330,
15615,
9237,
11,
15615,
44015,
594,
198,
198,
2,
13103,
198,
11748,
4738,
198,
15271,
62,
76,
2164,
796,
9720,
13,
15271,
13511,
3419,
198,
23563,
62,
21370,
66,
796,
2139,
62,
76,
2164,
13,
23563,
16177,
3419,
198,
198,
2,
1212,
4226,
318,
1444,
790,
1542,
2431,
13,
198,
2,
41865,
9478,
318,
783,
900,
287,
2431,
25,
6193,
62,
15596,
7,
32257,
7,
42951,
828,
23563,
6030,
11,
17721,
38469,
7,
55,
11,
56,
11,
57,
29720,
198,
2,
10871,
286,
262,
1708,
318,
257,
1351,
286,
6193,
16311,
13,
5501,
8379,
4539,
1566,
663,
9478,
468,
21350,
13,
198,
2,
2953,
262,
886,
286,
262,
8379,
11,
8005,
2257,
1581,
44,
318,
973,
284,
900,
262,
6193,
736,
284,
1598,
13,
40661,
1123,
6193,
8379,
1351,
198,
2,
271,
2491,
11,
645,
584,
6193,
8379,
460,
307,
973,
319,
262,
976,
3715,
1566,
262,
16311,
423,
21350,
13,
198,
2971,
32173,
44015,
594,
796,
15615,
44015,
594,
3419,
198,
2971,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
1238,
11,
6193,
13,
8845,
45226,
13,
5097,
2606,
35,
56,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
2971,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
940,
11,
6193,
13,
8845,
45226,
13,
43,
9947,
2257,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
2971,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
940,
11,
6193,
13,
8845,
45226,
13,
5097,
2606,
35,
56,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
2971,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
940,
11,
6193,
13,
8845,
45226,
13,
45,
10892,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
198,
24132,
32173,
44015,
594,
796,
15615,
44015,
594,
3419,
198,
24132,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
1238,
11,
6193,
13,
8845,
45226,
13,
5097,
2606,
35,
56,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
24132,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
18,
11,
6193,
13,
8845,
45226,
13,
43,
9947,
2257,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
24132,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
940,
11,
6193,
13,
8845,
45226,
13,
30733,
41796,
2257,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
24132,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
18,
11,
6193,
13,
8845,
45226,
13,
43,
9947,
2257,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
24132,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
940,
11,
6193,
13,
8845,
45226,
13,
5097,
2606,
35,
56,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
24132,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
940,
11,
6193,
13,
8845,
45226,
13,
45,
10892,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
198,
23701,
32173,
44015,
594,
796,
15615,
44015,
594,
3419,
198,
23701,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
1238,
11,
6193,
13,
8845,
45226,
13,
5097,
2606,
35,
56,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
23701,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
18,
11,
6193,
13,
8845,
45226,
13,
43,
9947,
2257,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
23701,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
20,
11,
6193,
13,
8845,
45226,
13,
30733,
41796,
2257,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
23701,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
1238,
11,
6193,
13,
8845,
45226,
13,
13909,
10116,
56,
2257,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
23701,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
20,
11,
6193,
13,
8845,
45226,
13,
30733,
41796,
2257,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
23701,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
18,
11,
6193,
13,
8845,
45226,
13,
43,
9947,
2257,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
23701,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
940,
11,
6193,
13,
8845,
45226,
13,
5097,
2606,
35,
56,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
23701,
32173,
44015,
594,
13,
33295,
7,
41865,
9237,
7,
940,
11,
6193,
13,
8845,
45226,
13,
45,
10892,
1581,
44,
11,
10361,
13,
31364,
18,
7,
16,
13,
15,
11,
657,
13,
15,
11,
657,
13,
15,
22305,
198,
198,
2,
13916,
2507,
4738,
2163,
351,
3463,
13,
36557,
10068,
13,
628,
198,
23563,
46770,
26933,
7,
23701,
32173,
44015,
594,
11,
657,
13,
2999,
828,
357,
24132,
32173,
44015,
594,
11,
657,
13,
1314,
828,
357,
2971,
32173,
44015,
594,
11,
15,
13,
17,
8,
4357,
23563,
13,
6173,
39267,
13,
34,
6965,
3069,
3539,
8,
198
] | 2.828313 | 996 |
#!/usr/bin/env python
# blou
# Raspberry Car v1.xx
# MIT Licence - Tom Wersinger https://github.com/tomplays/raspberry-car/
import RPi.GPIO as io
import time
# pins attribution
#motor A
in3_pin = 4
in4_pin = 17
#motor B
in1_pin = 27
in2_pin = 22
#Blinking orange leds
o_pin = 24
or_pin = 23
# always stop motors after xx seconds..
securetime = 10
#misc def
glowtime = .1
turntime = .04
#GPIO inits
io.setmode(io.BCM)
io.setup(in1_pin, io.OUT)
io.setup(in2_pin, io.OUT)
io.setup(in3_pin, io.OUT)
io.setup(in4_pin, io.OUT)
io.setup(o_pin, io.OUT)
io.setup(or_pin, io.OUT)
#demo mode for glow
#make the two orange leds blink
#params
# dir: left|right
#params
# dir: forward|backward
# long: how long (to check)
# turns all gpio off
# Main loop
# expects keyboard inputs:
# zw(drive) - ae(turn) - lm -hg(glows) - s(stop) p(demo) :
while True:
cmd = raw_input("zw - ae - lm - hg - s :")
direction = cmd[0]
if direction == "e":
turn('right')
elif direction == "a":
turn('left')
elif direction == "s":
stopall()
elif direction == "z":
drive('forward',1)
elif direction == "w":
drive('back', 1)
elif direction == "p":
demoa()
elif direction == "h":
glow(True, True, .1, 2, "no")
elif direction == "l":
glow(True, False, .1, 5, "yes")
elif direction == "g":
glow(True, True, .5, 5, "yes")
else:
stopall()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
698,
280,
198,
2,
24244,
1879,
410,
16,
13,
5324,
198,
2,
17168,
10483,
594,
532,
4186,
370,
364,
3889,
3740,
1378,
12567,
13,
785,
14,
83,
6316,
592,
14,
81,
17653,
12,
7718,
14,
628,
198,
11748,
25812,
72,
13,
16960,
9399,
355,
33245,
198,
11748,
640,
628,
198,
2,
20567,
39629,
198,
2,
76,
20965,
317,
198,
259,
18,
62,
11635,
796,
604,
198,
259,
19,
62,
11635,
796,
1596,
198,
198,
2,
76,
20965,
347,
198,
259,
16,
62,
11635,
796,
2681,
198,
259,
17,
62,
11635,
796,
2534,
198,
198,
2,
3629,
8040,
10912,
2957,
82,
198,
78,
62,
11635,
796,
1987,
198,
273,
62,
11635,
796,
2242,
198,
198,
2,
1464,
2245,
24699,
706,
31383,
4201,
492,
198,
22390,
2435,
796,
838,
198,
198,
2,
44374,
825,
198,
4743,
322,
2435,
796,
764,
16,
198,
36590,
429,
524,
796,
764,
3023,
198,
198,
2,
16960,
9399,
287,
896,
198,
952,
13,
2617,
14171,
7,
952,
13,
2749,
44,
8,
198,
952,
13,
40406,
7,
259,
16,
62,
11635,
11,
33245,
13,
12425,
8,
198,
952,
13,
40406,
7,
259,
17,
62,
11635,
11,
33245,
13,
12425,
8,
198,
952,
13,
40406,
7,
259,
18,
62,
11635,
11,
33245,
13,
12425,
8,
198,
952,
13,
40406,
7,
259,
19,
62,
11635,
11,
33245,
13,
12425,
8,
198,
952,
13,
40406,
7,
78,
62,
11635,
11,
33245,
13,
12425,
8,
198,
952,
13,
40406,
7,
273,
62,
11635,
11,
33245,
13,
12425,
8,
198,
198,
2,
9536,
78,
4235,
329,
19634,
198,
198,
2,
15883,
262,
734,
10912,
2957,
82,
21019,
198,
198,
2,
37266,
198,
2,
220,
220,
26672,
25,
1364,
91,
3506,
628,
198,
2,
37266,
198,
2,
220,
220,
26672,
25,
2651,
91,
1891,
904,
198,
2,
220,
220,
890,
25,
703,
890,
357,
1462,
2198,
8,
198,
198,
2,
4962,
477,
27809,
952,
572,
198,
198,
2,
8774,
9052,
198,
2,
13423,
10586,
17311,
25,
198,
2,
1976,
86,
7,
19472,
8,
532,
257,
68,
7,
15344,
8,
532,
300,
76,
532,
71,
70,
7,
4743,
1666,
8,
532,
264,
7,
11338,
8,
279,
7,
9536,
78,
8,
1058,
198,
4514,
6407,
25,
198,
220,
220,
220,
23991,
796,
8246,
62,
15414,
7203,
89,
86,
532,
257,
68,
532,
300,
76,
532,
289,
70,
532,
264,
1058,
4943,
198,
220,
220,
220,
4571,
796,
23991,
58,
15,
60,
198,
220,
220,
220,
611,
4571,
6624,
366,
68,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
1210,
10786,
3506,
11537,
198,
220,
220,
220,
1288,
361,
4571,
6624,
366,
64,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
1210,
10786,
9464,
11537,
198,
220,
220,
220,
1288,
361,
4571,
6624,
366,
82,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
2245,
439,
3419,
198,
220,
220,
220,
1288,
361,
4571,
6624,
366,
89,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
3708,
10786,
11813,
3256,
16,
8,
198,
220,
220,
220,
1288,
361,
4571,
6624,
366,
86,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
3708,
10786,
1891,
3256,
352,
8,
198,
220,
220,
220,
1288,
361,
4571,
6624,
366,
79,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
1357,
12162,
3419,
198,
220,
220,
220,
1288,
361,
4571,
6624,
366,
71,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
19634,
7,
17821,
11,
6407,
11,
764,
16,
11,
362,
11,
366,
3919,
4943,
198,
220,
220,
220,
1288,
361,
4571,
6624,
366,
75,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
19634,
7,
17821,
11,
10352,
11,
764,
16,
11,
642,
11,
366,
8505,
4943,
198,
220,
220,
220,
1288,
361,
4571,
6624,
366,
70,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
19634,
7,
17821,
11,
6407,
11,
764,
20,
11,
642,
11,
366,
8505,
4943,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2245,
439,
3419,
628,
198
] | 2.187311 | 662 |
from drf_writable_nested import WritableNestedModelSerializer, UniqueFieldsMixin
from rest_framework import serializers
from api_recipes.models import Recipe, Ingredient, Food, Step, User
class FoodSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
"""Food serializer."""
class StepSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
"""Recipe step serializer."""
class IngredientSerializer(WritableNestedModelSerializer):
"""Food ingredient serializer."""
food = FoodSerializer()
class UserSerializer(serializers.ModelSerializer):
"""User serializer."""
class RecipeSerializer(WritableNestedModelSerializer):
"""Recipe serializer."""
ingredients = IngredientSerializer(many=True)
steps = StepSerializer(many=True)
author = UserSerializer(read_only=True)
| [
6738,
1553,
69,
62,
8933,
540,
62,
77,
7287,
1330,
12257,
540,
45,
7287,
17633,
32634,
7509,
11,
30015,
15878,
82,
35608,
259,
198,
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
198,
6738,
40391,
62,
8344,
18636,
13,
27530,
1330,
26694,
11,
17589,
445,
1153,
11,
7318,
11,
5012,
11,
11787,
628,
198,
4871,
7318,
32634,
7509,
7,
40257,
15878,
82,
35608,
259,
11,
11389,
11341,
13,
17633,
32634,
7509,
2599,
198,
220,
220,
220,
37227,
24602,
11389,
7509,
526,
15931,
628,
198,
4871,
5012,
32634,
7509,
7,
40257,
15878,
82,
35608,
259,
11,
11389,
11341,
13,
17633,
32634,
7509,
2599,
198,
220,
220,
220,
37227,
37523,
2239,
11389,
7509,
526,
15931,
628,
198,
4871,
17589,
445,
1153,
32634,
7509,
7,
20257,
540,
45,
7287,
17633,
32634,
7509,
2599,
198,
220,
220,
220,
37227,
24602,
18734,
11389,
7509,
526,
15931,
198,
220,
220,
220,
2057,
796,
7318,
32634,
7509,
3419,
628,
198,
4871,
11787,
32634,
7509,
7,
46911,
11341,
13,
17633,
32634,
7509,
2599,
198,
220,
220,
220,
37227,
12982,
11389,
7509,
526,
15931,
628,
198,
4871,
26694,
32634,
7509,
7,
20257,
540,
45,
7287,
17633,
32634,
7509,
2599,
198,
220,
220,
220,
37227,
37523,
11389,
7509,
526,
15931,
198,
220,
220,
220,
9391,
796,
17589,
445,
1153,
32634,
7509,
7,
21834,
28,
17821,
8,
198,
220,
220,
220,
4831,
796,
5012,
32634,
7509,
7,
21834,
28,
17821,
8,
198,
220,
220,
220,
1772,
796,
11787,
32634,
7509,
7,
961,
62,
8807,
28,
17821,
8,
198
] | 3.315789 | 247 |
# coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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.
#
# NOTE: This class is auto generated by the jdcloud code generator program.
| [
2,
19617,
28,
40477,
23,
198,
198,
2,
15069,
2864,
28591,
5097,
2606,
35,
13,
9858,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
2,
198,
2,
24550,
25,
770,
1398,
318,
8295,
7560,
416,
262,
474,
67,
17721,
2438,
17301,
1430,
13,
628
] | 3.73743 | 179 |
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from ella.core.admin import PublishableAdmin, ListingInlineAdmin, RelatedInlineAdmin
from ella.articles.models import Article
admin.site.register(Article, ArticleAdmin)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
355,
4808,
198,
198,
6738,
304,
8466,
13,
7295,
13,
28482,
1330,
8525,
1836,
540,
46787,
11,
7343,
278,
818,
1370,
46787,
11,
19809,
818,
1370,
46787,
198,
6738,
304,
8466,
13,
26845,
13,
27530,
1330,
10172,
628,
198,
198,
28482,
13,
15654,
13,
30238,
7,
14906,
11,
10172,
46787,
8,
198
] | 3.493333 | 75 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.