content
stringlengths 1
1.04M
| input_ids
sequencelengths 1
774k
| ratio_char_token
float64 0.38
22.9
| token_count
int64 1
774k
|
---|---|---|---|
import calendar
import time
STATUS_THRESHOLD = 15
class ProxyNode:
"""
ProxyNode class defines a Swift Proxy node. The identifier is the name of the node.
"""
class StorageNode:
"""
StorageNode class defines a Swift storage node. The identifier is the name of the node.
"""
| [
11748,
11845,
198,
11748,
640,
198,
198,
35744,
2937,
62,
4221,
19535,
39,
15173,
796,
1315,
198,
198,
4871,
38027,
19667,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
38027,
19667,
1398,
15738,
257,
15608,
38027,
10139,
13,
383,
27421,
318,
262,
1438,
286,
262,
10139,
13,
198,
220,
220,
220,
37227,
628,
198,
4871,
20514,
19667,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
20514,
19667,
1398,
15738,
257,
15608,
6143,
10139,
13,
383,
27421,
318,
262,
1438,
286,
262,
10139,
13,
198,
220,
220,
220,
37227,
198
] | 3.069307 | 101 |
import clr
from System import *
from System.IO import *
if __name__ == "__main__":
f = File.Create("test.MEB")
writer = ContentWriter(f)
writer.WriteInt(42)
writer.Flush()
f.Close()
| [
11748,
537,
81,
198,
198,
6738,
4482,
1330,
1635,
198,
6738,
4482,
13,
9399,
1330,
1635,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
277,
796,
9220,
13,
16447,
7203,
9288,
13,
11682,
33,
4943,
198,
220,
220,
220,
6260,
796,
14041,
34379,
7,
69,
8,
198,
220,
220,
220,
6260,
13,
16594,
5317,
7,
3682,
8,
198,
220,
220,
220,
6260,
13,
7414,
1530,
3419,
198,
220,
220,
220,
277,
13,
26125,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220
] | 2.273684 | 95 |
import sys
_python3 = False
if (sys.version_info > (3, 0)):
_python3 = True
import os
import platform
import json
import subprocess
import shlex
import argparse
import time
import shutil
import socket
import yaml
import logging
from azure.mgmt.resource import ResourceManagementClient
from azure.common.client_factory import get_client_from_cli_profile
import stat
import requests
PLATFORM_CPU = 'amd64'
OPCPUBLISHER_CONTAINER_IMAGE = 'mcr.microsoft.com/iotedge/opc-publisher'
# to test new features in publisher use a local registry
#OPCPUBLISHER_CONTAINER_IMAGE = 'localhost:5000/opc-publisher'
OPCPUBLISHER_CONTAINER_VERSION = ''
OPCPROXY_CONTAINER_IMAGE = 'mcr.microsoft.com/iotedge/opc-proxy'
OPCPROXY_CONTAINER_VERSION = '1.0.4'
OPCTWIN_CONTAINER_IMAGE = 'mcr.microsoft.com/iotedge/opc-twin'
OPCTWIN_CONTAINER_VERSION = ''
OPCPLC_CONTAINER_IMAGE = 'mcr.microsoft.com/iotedge/opc-plc'
OPCPLC_CONTAINER_VERSION = ''
# set module globals
_targetPlatform = ''
_startScript = []
_stopScript = []
_initScript = []
_deinitScript = []
_iotHubOwnerConnectionString = ''
_hostDirHost = ''
_opcPublisherContainer = OPCPUBLISHER_CONTAINER_IMAGE
_opcProxyContainer = OPCPROXY_CONTAINER_IMAGE
_opcTwinContainer = OPCTWIN_CONTAINER_IMAGE
_opcPlcContainer = OPCPLC_CONTAINER_IMAGE
_platformCpu = PLATFORM_CPU
_edgeSite = ''
_dockerBindSource = ''
_outdirConfig = ''
# command line parsing
parser = argparse.ArgumentParser(description="Installs an Industrial IoT gateway based on IoT Edge")
# site to handle
siteParser = argparse.ArgumentParser(add_help=False)
siteParser.add_argument('site', metavar='SITE', default=None,
help="The site (factory/production line) of the installation. This is not a DNS domain, but a topology site used to address hosts with identical IP addresses from the cloud or build reduntant systems.")
# publisher configuration files
publisherConfigParser = argparse.ArgumentParser(add_help=False)
publisherConfigParser.add_argument('--nodesconfig', default=None,
help="The configuration file specifying the OPC UA nodes to publish. Requires the hostdir parameter to be set to a directory.")
publisherConfigParser.add_argument('--telemetryconfig', default=None,
help="The configuration file specifying the format of the telemetry to be ingested by OPC Publisher. Requires the hostdir parameter to be set to a directory.")
# iothub name
iothubArgsParser = argparse.ArgumentParser(add_help=False)
iothubArgsParser.add_argument('--iothubname', default=None, required=True,
help="Name of the IoTHub to use.")
# optional arguments valid for all sub commands
commonOptArgsParser = argparse.ArgumentParser(add_help=False)
commonOptArgsParser.add_argument('--dockerregistry', default=None,
help="The container registry for all used containers.")
commonOptArgsParser.add_argument('--hostdir', default=None,
help="A directory on the host machine, which containers use for log, config and certificate files. Use the syntax of your targetplatform to specify (for WSL use Windows syntax) If not specified everything is kept in Docker volumes.")
commonOptArgsParser.add_argument('--outdir', default='./out',
help="The directory where all generated files are created.")
commonOptArgsParser.add_argument('--targetplatform', choices=['windows', 'linux', 'wsl'], default=None,
help="The scripts created should target a different platform than you are working on. Default: the platform you are working on")
commonOptArgsParser.add_argument('--lcow', action='store_true',
help="Forces to use Linux Containers On Windows. Only valid for a Windows target platform.")
commonOptArgsParser.add_argument('--force', action='store_true',
help="Forces deletion of existing IoT Edge deployment and device if they exist.")
commonOptArgsParser.add_argument('--proxyschema', default="http",
help="Schema for the proxy.")
commonOptArgsParser.add_argument('--proxyhost', default=None,
help="Hostname of the proxy to enable IoT Edge communication via proxy.")
commonOptArgsParser.add_argument('--proxyport', default=None,
help="Port tu use for the proxy.")
commonOptArgsParser.add_argument('--proxyusername', default=None,
help="Username to use for proxy authentication.")
commonOptArgsParser.add_argument('--proxypassword', default=None,
help="Password to use for proxy authentication.")
commonOptArgsParser.add_argument('--upstreamprotocol', choices=['Amqp', 'AmpqWs'], default='Amqp',
help="the upstream protocol IoT Edge should use for communication via proxy.")
commonOptArgsParser.add_argument('--archivepath', default=None,
help="the path to an IoT Edge archive to use.")
commonOptArgsParser.add_argument('--siteconfig', default="simple-site.yml",
help="the configuration of the site as docker-compose YAML file.")
commonOptArgsParser.add_argument('-s', '--serviceprincipalcert',
help=".pem containing a service principal cert to login to Azure.")
commonOptArgsParser.add_argument('-t', '--tenantid',
help="TenantId of the Azure tenant to login.")
commonOptArgsParser.add_argument('-a', '--appid',
help="AppId of the Azure service principal to login.")
commonOptArgsParser.add_argument('--loglevel', default='info',
help="The log level. Allowed: debug, info, warning, error, critical")
# add sub commands
subParsers = parser.add_subparsers(dest='subcommand')
subParsers.required = True
gwParser = subParsers.add_parser('gw', parents=[siteParser, commonOptArgsParser, iothubArgsParser, publisherConfigParser], help='Generates scripts for an Azure Industrial IoT gateway deployment.')
_args = parser.parse_args()
#
# configure IoT Edge site
#
###############################################################################
#
# Main script
#
###############################################################################
# configure script logging
try:
logLevel = getattr(logging, _args.loglevel.upper())
except:
logLevel = logging.INFO
if not isinstance(logLevel, int):
raise( ValueError('Invalid log level: {0}'.format(logLevel)))
logging.basicConfig(level=logLevel)
# get path of script
_scriptDir = sys.path[0]
# CPU specific settings
if 'intel64' in str(platform.processor()).lower():
_platformCpu = 'amd64'
else:
_platformCpu = 'arm32v7'
#
# OS specific settings
#
if not _args.targetplatform:
_targetPlatform = str(platform.system()).lower()
if _targetPlatform == 'linux':
# check if we are on WSL
for line in open('/proc/version'):
if 'Microsoft' in line:
_targetPlatform = 'wsl'
elif _targetPlatform == 'windows':
pass
else:
logging.critical("OS is not supported. Exiting...")
sys.exit(1)
else:
_targetPlatform = _args.targetplatform
logging.info("Using targetplatform '{0}'".format(_targetPlatform))
if _targetPlatform == 'linux' or _targetPlatform == 'wsl':
_startScriptFileName = 'start-iiotedge.sh'
_startScriptCmdPrefix = ''
_startScriptCmdPostfix = ' &'
_stopScriptFileName = 'stop-iiotedge.sh'
_stopScriptCmdPrefix = ''
_stopScriptCmdPostfix = ''
_initScriptFileName = 'init-iiotedge.sh'
_initScriptCmdPrefix = ''
_initScriptCmdPostfix = ' &'
_deinitScriptFileName = 'deinit-iiotedge.sh'
_deinitScriptCmdPrefix = ''
_deinitScriptCmdPostfix = ' &'
_targetNewline = '\n'
elif _targetPlatform == 'windows':
_startScriptFileName = 'Start-IIoTEdge.ps1'
_startScriptCmdPrefix = 'start '
_startScriptCmdPostfix = ''
_stopScriptFileName = 'Stop-IIoTEdge.ps1'
_stopScriptCmdPrefix = ''
_stopScriptCmdPostfix = ''
_initScriptFileName = 'Init-IIoTEdge.ps1'
_initScriptCmdPrefix = ''
_initScriptCmdPostfix = ''
_deinitScriptFileName = 'Deinit-IIoTEdge.ps1'
_deinitScriptCmdPrefix = ''
_deinitScriptCmdPostfix = ''
_targetNewline = '\r\n'
#
# validate common arguments
#
if _args.lcow:
if _targetPlatform == 'windows':
_containerOs = 'linux'
else:
logging.fatal("-lcow is only allowed for a Winodws target")
sys.exit(1)
else:
_containerOs = _targetPlatform if _targetPlatform != 'wsl' else 'linux'
if _args.outdir is not None:
_args.outdir = _args.outdir.strip()
if not os.path.exists(_args.outdir):
os.mkdir(_args.outdir)
elif not os.path.isdir(_args.outdir):
logging.critical("Given outdir '{0} is not a directory. Please check. Exiting...".format(_args.outdir))
sys.exit(2)
logging.info("Create all generated files in directory '{0}'.".format(_args.outdir))
if _args.hostdir is not None:
# the --hostdir parameter specifies where on the docker host the configuration files should be stored.
# during docker configuration a volume bind is configured, which points to this directory.
# in case of a cross platform generation, the files are put into a config subdirectory of the specified --outdir
# and need to be transfered manually to the IoT Edge device.
_dockerBindSource = _args.hostdir = _args.hostdir.strip().replace('\\', '/')
# The Docker for Windows volume bind syntax has changed over time.
# With docker ce 18.03.0-ce-win59 (16762), engine 18.03.0-ce the bind syntax for D:/docker needs to be //d/docker
if _targetPlatform in [ 'windows', 'wsl']:
# we accept only fully qualified windows syntax (starts with <drive>:)
if _args.hostdir[1:3] != ':/':
logging.fatal("The --hostdir parameter must be using a fully qualified Windows directory syntax.")
sys.exit(1)
elif _targetPlatform == 'linux':
if _args.hostdir[0:1] != '/':
logging.fatal("The --hostdir parameter must be using a fully qualified Linux directory syntax.")
sys.exit(1)
else:
logging.fatal("Target platform '{0}' is not supported.".format(_targetPlatform))
sys.exit(1)
if _args.targetplatform:
# create a directory for the configuration files, if not running on the IoT Edge device
_outdirConfig = _args.outdir + '/config'
if not os.path.exists(_outdirConfig):
os.mkdir(_outdirConfig)
logging.info("Create directory '{0}' for target system configuration files.".format(_outdirConfig))
elif not os.path.isdir(_outdirConfig):
logging.critical("'{0}' is expected to be a directory to provide configuration files, but it is not. Pls check. Exiting...".format(_outdirConfig))
sys.exit(2)
logging.info("Create all generated configuration files in directory '{0}'.".format(_outdirConfig))
logging.info("Passing '{0}' to docker as source in bind, maps to '{1}'.".format(_dockerBindSource, _args.hostdir))
_hostDirHost = _args.hostdir
else:
logging.info("--targetplatform was not specified. Assume we run on the IoT Edge device.")
if _targetPlatform in [ 'windows', 'linux' ]:
_hostDirHost = _args.hostdir
if _targetPlatform == 'wsl':
_hostDirHost = '/mnt/' + _args.hostdir[0:1] + '/' + _args.hostdir[3:]
if not os.path.exists(_hostDirHost):
logging.info("Directory '{0}' specified via --hostdir does not exist. Creating it...".format(_args.hostdir))
os.mkdir(_hostDirHost)
logging.info("Passing '{0}' to docker as source in bind, maps to '{1}'.".format(_dockerBindSource, _hostDirHost))
else:
# use a docker volume
# todo verify correct handling with sites
_dockerBindSource = 'cfappdata'
logging.info("Passing '{0}' (docker volume) to docker as source in bind.".format(_dockerBindSource))
if _args.dockerregistry is None:
_args.dockerregistry = 'microsoft'
else:
_args.dockerregistry = _args.dockerregistry.strip().lower()
logging.info("Docker container registry to use: '{0}'".format(_args.dockerregistry))
#
# build container names
#
_opcProxyContainer = OPCPROXY_CONTAINER_IMAGE if '/' in OPCPROXY_CONTAINER_IMAGE else '{0}/{1}'.format(_args.dockerregistry, OPCPROXY_CONTAINER_IMAGE)
_opcProxyContainer = '{0}:'.format(_opcProxyContainer) if not OPCPROXY_CONTAINER_VERSION else '{0}:{1}-'.format(_opcProxyContainer, OPCPROXY_CONTAINER_VERSION)
_opcProxyContainer = '{0}{1}'.format(_opcProxyContainer, 'windows') if _containerOs == 'windows' else '{0}{1}'.format(_opcProxyContainer, 'linux')
_opcProxyContainer = '{0}-{1}'.format(_opcProxyContainer, 'amd64') if _platformCpu == 'amd64' else '{0}-{1}'.format(_opcProxyContainer, 'arm32v7')
_opcTwinContainer = OPCTWIN_CONTAINER_IMAGE if '/' in OPCTWIN_CONTAINER_IMAGE else '{0}/{1}'.format(_args.dockerregistry, OPCTWIN_CONTAINER_IMAGE)
_opcTwinContainer = '{0}:'.format(_opcTwinContainer) if not OPCTWIN_CONTAINER_VERSION else '{0}:{1}-'.format(_opcTwinContainer, OPCTWIN_CONTAINER_VERSION)
_opcTwinContainer = '{0}{1}'.format(_opcTwinContainer, 'windows') if _containerOs == 'windows' else '{0}{1}'.format(_opcTwinContainer, 'linux')
_opcTwinContainer = '{0}-{1}'.format(_opcTwinContainer, 'amd64') if _platformCpu == 'amd64' else '{0}{1}'.format(_opcTwinContainer, 'arm32v7')
_opcPublisherContainer = OPCPUBLISHER_CONTAINER_IMAGE if '/' in OPCPUBLISHER_CONTAINER_IMAGE else '{0}/{1}'.format(_args.dockerregistry, OPCPUBLISHER_CONTAINER_IMAGE)
_opcPublisherContainer = '{0}:'.format(_opcPublisherContainer) if not OPCPUBLISHER_CONTAINER_VERSION else '{0}:{1}-'.format(_opcPublisherContainer, OPCPUBLISHER_CONTAINER_VERSION)
_opcPublisherContainer = '{0}{1}'.format(_opcPublisherContainer, 'windows') if _containerOs == 'windows' else '{0}{1}'.format(_opcPublisherContainer, 'linux')
_opcPublisherContainer = '{0}-{1}'.format(_opcPublisherContainer, 'amd64') if _platformCpu == 'amd64' else '{0}-{1}'.format(_opcPublisherContainer, 'arm32v7')
_opcPlcContainer = OPCPLC_CONTAINER_IMAGE if '/' in OPCPLC_CONTAINER_IMAGE else '{0}/{1}'.format(_args.dockerregistry, OPCPLC_CONTAINER_IMAGE)
_opcPlcContainer = '{0}:'.format(_opcPlcContainer) if not OPCPLC_CONTAINER_VERSION else '{0}:{1}-'.format(_opcPlcContainer, OPCPLC_CONTAINER_VERSION)
_opcPlcContainer = '{0}{1}'.format(_opcPlcContainer, 'windows') if _containerOs == 'windows' else '{0}{1}'.format(_opcPlcContainer, 'linux')
_opcPlcContainer = '{0}-{1}'.format(_opcPlcContainer, 'amd64') if _platformCpu == 'amd64' else '{0}{1}'.format(_opcPlcContainer, 'arm32v7')
logging.info("Using OpcPublisher container: '{0}'".format(_opcPublisherContainer))
logging.info("Using OpcProxy container: '{0}'".format(_opcProxyContainer))
logging.info("Using OpcTwin container: '{0}'".format(_opcTwinContainer))
logging.info("Using OpcPlc container: '{0}'".format(_opcPlcContainer))
#
# azure authentication
#
if _args.serviceprincipalcert is not None:
_args.serviceprincipalcert = _args.serviceprincipalcert.strip()
if _targetPlatform == 'windows' and not _args.serviceprincipalcert[1:2] == ':' or _targetPlatform == 'linux' and not _args.serviceprincipalcert.startswith('/'):
_args.serviceprincipalcert = '{0}/{1}'.format(os.getcwd(), _args.serviceprincipalcert)
logging.info("Setup using service principal cert in file '{0}'".format(_args.serviceprincipalcert))
if _args.tenantid is not None:
_args.tenantid = _args.tenantid.strip()
logging.info("Setup using tenant id '{0}' to login".format(_args.tenantid))
if _args.appid is not None:
_args.appid = _args.appid.strip()
logging.info("Setup using AppId '{0}' to login".format(_args.appid))
if ((_args.serviceprincipalcert is not None or _args.tenantid is not None or _args.appid is not None) and
(_args.serviceprincipalcert is None or _args.tenantid is None or _args.appid is None)):
logging.critical("serviceprincipalcert, tennantid and appid must all be specified. Exiting...")
sys.exit(2)
_args.subcommand = _args.subcommand.lower()
#
# validate all required parameters for gw subcommand
#
if _args.subcommand == 'gw':
# validate the nodesconfig file
if _args.nodesconfig:
# check if file exists
if not os.path.exists(_args.nodesconfig) or not os.path.isfile(_args.nodesconfig):
logging.critical("The nodesconfig file '{0}' can not be found or is not a file. Exiting...".format(_args.nodesconfig))
sys.exit(2)
# to access it we need access to host file system and need a hostdir parameter
if not _args.hostdir:
logging.critical("If --nodesconfig is specified you need to specify a host directory for --hostdir as well. Exiting...")
sys.exit(2)
try:
if _args.telemetryconfig:
# check if file exists
if not os.path.exists(_args.telemetryconfig) or not os.path.isfile(_args.telemetryconfig):
logging.critical("The telemetryconfig file '{0}' can not be found or is not a file. Exiting...".format(_args.telemetryconfig))
sys.exit(2)
# to access it we need access to host file system and need a hostdir parameter
if not _args.hostdir:
logging.critical("If --telemetryconfig requires --hostdir as well. Exiting...")
sys.exit(2)
except AttributeError:
pass
_args.site = _args.site.lower()
_edgeSite = _args.site
# IoT Edge archive
if _args.archivepath is not None:
_args.archivepath = _args.archivepath.strip()
if not os.path.exists(_args.archivepath):
logging.critical("The given archive '{0} does not exist. Please check. Exiting...".format(_args.archivepath))
sys.exit(2)
# site configuration
if _args.siteconfig is not None:
_args.siteconfig = _args.siteconfig.strip()
if not os.path.exists(_args.siteconfig):
logging.critical("The given site config file '{0} does not exist. Please check. Exiting...".format(_args.siteconfig))
sys.exit(2)
# build the list of hostname/IP address mapping to allow the containers to access the local and external hosts, in case there is no DNS (espacially on Windows)
# add localhost info if we run on the targetplatform
_additionalHosts = []
if not _args.targetplatform:
ipAddress = getLocalIpAddress()
if ipAddress is None:
logging.critical("There is not network connection available.")
sys.exit(1)
hostName = socket.gethostname()
fqdnHostName = socket.getfqdn()
_additionalHosts.append({ "host": hostName, "ip": ipAddress })
if hostName.lower() != fqdnHostName.lower():
_additionalHosts.append({ "host": fqdnHostName, "ip": ipAddress })
else:
print("FQDN '{0}' is equal to hostname '{1}'".format(fqdnHostName, hostName))
_additionalHosts.extend(getExtraHosts()[:])
_extraHosts = []
if len(_additionalHosts) > 0:
_extraHosts.extend('- "{0}:{1}"\n'.format(host['host'], host['ip']) for host in _additionalHosts[0:1])
if len(_additionalHosts) > 2:
_extraHosts.extend(' - "{0}:{1}"\n'.format(host['host'], host['ip']) for host in _additionalHosts[1:-1])
if len(_additionalHosts) >= 2:
_extraHosts.extend(' - "{0}:{1}"'.format(host['host'], host['ip']) for host in _additionalHosts[-1:])
#
# gw operation: create all scripts to (de)init and start/stop the site specified on the command line
# - copy the configuration files
# - create an IoT Edge device and deployment for the site and all OPC components are configured to run as IoT Edge modules
#
if _args.subcommand == 'gw':
# login to Azure and fetch IoTHub connection string
azureLogin()
azureGetIotHubCs()
# copy configuration files to the right directory if we are running on the target, otherwise copy it to the config file directory
if _args.targetplatform:
if _args.nodesconfig:
nodesconfigFileName = 'pn-' + _args.site + '.json'
shutil.copyfile(_args.nodesconfig, '{0}/{1}'.format(_outdirConfig, nodesconfigFileName))
try:
if _args.telemetryconfig:
telemetryconfigFileName = 'tc-' + _args.site + '.json'
shutil.copyfile(_args.telemetryconfig, '{0}/{1}'.format(_outdirConfig, telemetryconfigFileName))
except AttributeError:
pass
else:
if _args.nodesconfig:
nodesconfigFileName = 'pn-' + _args.site + '.json'
shutil.copyfile(_args.nodesconfig, '{0}/{1}'.format(_hostDirHost, nodesconfigFileName))
if _args.telemetryconfig:
telemetryconfigFileName = 'tc-' + _args.site + '.json'
shutil.copyfile(_args.telemetryconfig, '{0}/{1}'.format(_hostDirHost, telemetryconfigFileName))
# create site/factory scripts
logging.info("Create the site initialization and configuration for '{0}'".format(_args.site))
createEdgeSiteConfiguration(_args.site)
# optional: sleep to debug initialization script issues
# _initScript.append('timeout 60\n')
# write the scripts
writeScript(_startScriptFileName, _startScript)
writeScript(_stopScriptFileName, _stopScript, reverse = True)
writeScript(_initScriptFileName, _initScript)
writeScript(_deinitScriptFileName, _deinitScript, reverse = True)
# todo patch config.yaml if proxy is used
# copy prerequisites installation scripts
if _args.targetplatform:
if _args.targetplatform in [ 'windows' ]:
shutil.copyfile('{0}/Init-IotEdgeService.ps1'.format(_scriptDir), '{0}/Init-IotEdgeService.ps1'.format(_args.outdir))
shutil.copyfile('{0}/Deinit-IotEdgeService.ps1'.format(_scriptDir), '{0}/Deinit-IotEdgeService.ps1'.format(_args.outdir))
shutil.copyfile('{0}Prepare-IIotHost.ps1'.format(_scriptDir), '{0}/Prepare-IIotHost.ps1'.format(_args.outdir))
if _args.targetplatform in [ 'linux', 'wsl' ]:
shutil.copyfile('{0}/iiotedge-install-prerequisites.sh'.format(_scriptDir), '{0}/iiotedge-install-prerequisites.sh'.format(_args.outdir))
shutil.copyfile('{0}/iiotedge-install-linux-packages.sh'.format(_scriptDir), '{0}/iiotedge-install-linux-packages.sh'.format(_args.outdir))
shutil.copyfile('{0}/requirements.txt'.format(_scriptDir), '{0}/requirements.txt'.format(_args.outdir))
# inform user when not running on target platform
logging.info('')
logging.info("Please copy any required script files from '{0}' to your target system.".format(_args.outdir))
if _args.hostdir:
logging.info("Please copy any required configuration files from '{0}' to your target system to directory '{1}'.".format(_outdirConfig, _args.hostdir))
elif _targetPlatform == 'windows':
shutil.copyfile('{0}/Init-IotEdgeService.ps1'.format(_scriptDir), '{0}/Init-IotEdgeService.ps1'.format(_args.outdir))
shutil.copyfile('{0}/Deinit-IotEdgeService.ps1'.format(_scriptDir), '{0}/Deinit-IotEdgeService.ps1'.format(_args.outdir))
shutil.copyfile('{0}/Prepare-WindowsGatewayStep1.ps1'.format(_scriptDir), '{0}/Prepare-WindowsGatewayStep1.ps1'.format(_args.outdir))
shutil.copyfile('{0}/Prepare-WindowsGatewayStep2.ps1'.format(_scriptDir), '{0}/Prepare-WindowsGatewayStep2.ps1'.format(_args.outdir))
# done
logging.info('')
if _args.targetplatform:
logging.info("The generated script files can be found in: '{0}'. Please copy them to your target system.".format(_args.outdir))
else:
logging.info("The generated script files can be found in: '{0}'".format(_args.outdir))
logging.info('')
logging.info("Operation completed.")
| [
11748,
25064,
198,
62,
29412,
18,
796,
10352,
198,
361,
357,
17597,
13,
9641,
62,
10951,
1875,
357,
18,
11,
657,
8,
2599,
198,
220,
220,
220,
4808,
29412,
18,
796,
6407,
198,
11748,
28686,
198,
11748,
3859,
198,
11748,
33918,
198,
11748,
850,
14681,
198,
11748,
427,
2588,
198,
11748,
1822,
29572,
198,
11748,
640,
198,
11748,
4423,
346,
198,
11748,
17802,
198,
11748,
331,
43695,
198,
11748,
18931,
198,
6738,
35560,
495,
13,
11296,
16762,
13,
31092,
1330,
20857,
48032,
11792,
198,
6738,
35560,
495,
13,
11321,
13,
16366,
62,
69,
9548,
1330,
651,
62,
16366,
62,
6738,
62,
44506,
62,
13317,
198,
11748,
1185,
198,
11748,
7007,
198,
198,
6489,
1404,
21389,
62,
36037,
796,
705,
28745,
2414,
6,
198,
3185,
36037,
9148,
1797,
16879,
62,
10943,
30339,
1137,
62,
3955,
11879,
796,
705,
76,
6098,
13,
40485,
13,
785,
14,
5151,
14907,
14,
404,
66,
12,
12984,
8191,
6,
198,
2,
284,
1332,
649,
3033,
287,
9991,
779,
257,
1957,
20478,
198,
2,
3185,
36037,
9148,
1797,
16879,
62,
10943,
30339,
1137,
62,
3955,
11879,
796,
705,
36750,
25,
27641,
14,
404,
66,
12,
12984,
8191,
6,
198,
3185,
36037,
9148,
1797,
16879,
62,
10943,
30339,
1137,
62,
43717,
796,
10148,
198,
3185,
34,
31190,
34278,
62,
10943,
30339,
1137,
62,
3955,
11879,
796,
705,
76,
6098,
13,
40485,
13,
785,
14,
5151,
14907,
14,
404,
66,
12,
36436,
6,
198,
3185,
34,
31190,
34278,
62,
10943,
30339,
1137,
62,
43717,
796,
705,
16,
13,
15,
13,
19,
6,
198,
3185,
4177,
37620,
62,
10943,
30339,
1137,
62,
3955,
11879,
796,
705,
76,
6098,
13,
40485,
13,
785,
14,
5151,
14907,
14,
404,
66,
12,
4246,
259,
6,
198,
3185,
4177,
37620,
62,
10943,
30339,
1137,
62,
43717,
796,
10148,
198,
3185,
8697,
5639,
62,
10943,
30339,
1137,
62,
3955,
11879,
796,
705,
76,
6098,
13,
40485,
13,
785,
14,
5151,
14907,
14,
404,
66,
12,
489,
66,
6,
198,
3185,
8697,
5639,
62,
10943,
30339,
1137,
62,
43717,
796,
10148,
198,
198,
2,
900,
8265,
15095,
874,
198,
62,
16793,
37148,
796,
10148,
198,
62,
9688,
7391,
796,
17635,
198,
62,
11338,
7391,
796,
17635,
198,
62,
15003,
7391,
796,
17635,
198,
62,
2934,
15003,
7391,
796,
17635,
198,
62,
5151,
16066,
42419,
32048,
10100,
796,
10148,
198,
62,
4774,
35277,
17932,
796,
10148,
198,
62,
404,
66,
46471,
29869,
796,
440,
5662,
5105,
9148,
1797,
16879,
62,
10943,
30339,
1137,
62,
3955,
11879,
198,
62,
404,
66,
44148,
29869,
796,
440,
5662,
31190,
34278,
62,
10943,
30339,
1137,
62,
3955,
11879,
198,
62,
404,
66,
5080,
259,
29869,
796,
13349,
4177,
37620,
62,
10943,
30339,
1137,
62,
3955,
11879,
198,
62,
404,
66,
3646,
66,
29869,
796,
440,
5662,
47,
5639,
62,
10943,
30339,
1137,
62,
3955,
11879,
198,
62,
24254,
34,
19944,
796,
9297,
1404,
21389,
62,
36037,
198,
62,
14907,
29123,
796,
10148,
198,
62,
45986,
36180,
7416,
796,
10148,
198,
62,
448,
15908,
16934,
796,
10148,
198,
198,
2,
3141,
1627,
32096,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
2625,
6310,
5691,
281,
19034,
38488,
24308,
1912,
319,
38488,
13113,
4943,
198,
198,
2,
2524,
284,
5412,
198,
15654,
46677,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
2860,
62,
16794,
28,
25101,
8,
198,
15654,
46677,
13,
2860,
62,
49140,
10786,
15654,
3256,
1138,
615,
283,
11639,
50,
12709,
3256,
4277,
28,
14202,
11,
198,
220,
220,
220,
1037,
2625,
464,
2524,
357,
69,
9548,
14,
25493,
1627,
8,
286,
262,
9988,
13,
770,
318,
407,
257,
18538,
7386,
11,
475,
257,
1353,
1435,
2524,
973,
284,
2209,
11453,
351,
10411,
6101,
9405,
422,
262,
6279,
393,
1382,
2266,
2797,
415,
3341,
19570,
198,
198,
2,
9991,
8398,
3696,
198,
12984,
8191,
16934,
46677,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
2860,
62,
16794,
28,
25101,
8,
198,
12984,
8191,
16934,
46677,
13,
2860,
62,
49140,
10786,
438,
77,
4147,
11250,
3256,
4277,
28,
14202,
11,
198,
220,
220,
220,
1037,
2625,
464,
8398,
2393,
31577,
262,
440,
5662,
46164,
13760,
284,
7715,
13,
26848,
262,
2583,
15908,
11507,
284,
307,
900,
284,
257,
8619,
19570,
198,
12984,
8191,
16934,
46677,
13,
2860,
62,
49140,
10786,
438,
46813,
41935,
11250,
3256,
4277,
28,
14202,
11,
198,
220,
220,
220,
1037,
2625,
464,
8398,
2393,
31577,
262,
5794,
286,
262,
5735,
41935,
284,
307,
44694,
416,
440,
5662,
28045,
13,
26848,
262,
2583,
15908,
11507,
284,
307,
900,
284,
257,
8619,
19570,
198,
198,
2,
1312,
849,
549,
1438,
198,
72,
849,
549,
42035,
46677,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
2860,
62,
16794,
28,
25101,
8,
198,
72,
849,
549,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
72,
849,
549,
3672,
3256,
4277,
28,
14202,
11,
2672,
28,
17821,
11,
198,
220,
220,
220,
1037,
2625,
5376,
286,
262,
27853,
4221,
549,
284,
779,
19570,
198,
198,
2,
11902,
7159,
4938,
329,
477,
850,
9729,
198,
11321,
27871,
42035,
46677,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
2860,
62,
16794,
28,
25101,
8,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
45986,
2301,
4592,
3256,
4277,
28,
14202,
11,
198,
220,
220,
220,
1037,
2625,
464,
9290,
20478,
329,
477,
973,
16472,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
4774,
15908,
3256,
4277,
28,
14202,
11,
198,
220,
220,
220,
1037,
2625,
32,
8619,
319,
262,
2583,
4572,
11,
543,
16472,
779,
329,
2604,
11,
4566,
290,
10703,
3696,
13,
5765,
262,
15582,
286,
534,
2496,
24254,
284,
11986,
357,
1640,
370,
8634,
779,
3964,
15582,
8,
1002,
407,
7368,
2279,
318,
4030,
287,
25716,
15343,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
448,
15908,
3256,
4277,
28,
4458,
14,
448,
3256,
198,
220,
220,
220,
1037,
2625,
464,
8619,
810,
477,
7560,
3696,
389,
2727,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
16793,
24254,
3256,
7747,
28,
17816,
28457,
3256,
705,
23289,
3256,
705,
86,
6649,
6,
4357,
4277,
28,
14202,
11,
198,
220,
220,
220,
1037,
2625,
464,
14750,
2727,
815,
2496,
257,
1180,
3859,
621,
345,
389,
1762,
319,
13,
15161,
25,
262,
3859,
345,
389,
1762,
319,
4943,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
75,
8232,
3256,
2223,
11639,
8095,
62,
7942,
3256,
198,
220,
220,
220,
1037,
2625,
1890,
728,
284,
779,
7020,
2345,
50221,
1550,
3964,
13,
5514,
4938,
329,
257,
3964,
2496,
3859,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
3174,
3256,
2223,
11639,
8095,
62,
7942,
3256,
198,
220,
220,
220,
1037,
2625,
1890,
728,
39948,
286,
4683,
38488,
13113,
14833,
290,
3335,
611,
484,
2152,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
1676,
87,
893,
2395,
2611,
3256,
4277,
2625,
4023,
1600,
198,
220,
220,
220,
1037,
2625,
27054,
2611,
329,
262,
15741,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
36436,
4774,
3256,
4277,
28,
14202,
11,
198,
220,
220,
220,
1037,
2625,
17932,
3672,
286,
262,
15741,
284,
7139,
38488,
13113,
6946,
2884,
15741,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
36436,
634,
3256,
4277,
28,
14202,
11,
198,
220,
220,
220,
1037,
2625,
13924,
12777,
779,
329,
262,
15741,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
36436,
29460,
3256,
4277,
28,
14202,
11,
198,
220,
220,
220,
1037,
2625,
5842,
13292,
284,
779,
329,
15741,
18239,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
1676,
87,
4464,
562,
4775,
3256,
4277,
28,
14202,
11,
198,
220,
220,
220,
1037,
2625,
35215,
284,
779,
329,
15741,
18239,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
929,
22853,
696,
10599,
4668,
3256,
7747,
28,
17816,
5840,
80,
79,
3256,
705,
32,
3149,
80,
46456,
6,
4357,
4277,
11639,
5840,
80,
79,
3256,
198,
220,
220,
220,
1037,
2625,
1169,
28717,
8435,
38488,
13113,
815,
779,
329,
6946,
2884,
15741,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
17474,
6978,
3256,
4277,
28,
14202,
11,
198,
220,
220,
220,
1037,
2625,
1169,
3108,
284,
281,
38488,
13113,
15424,
284,
779,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
15654,
11250,
3256,
4277,
2625,
36439,
12,
15654,
13,
88,
4029,
1600,
198,
220,
220,
220,
1037,
2625,
1169,
8398,
286,
262,
2524,
355,
36253,
12,
785,
3455,
575,
2390,
43,
2393,
19570,
198,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
12,
82,
3256,
705,
438,
15271,
1050,
1939,
8521,
22583,
3256,
198,
220,
220,
220,
1037,
28,
1911,
79,
368,
7268,
257,
2139,
10033,
5051,
284,
17594,
284,
22134,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
12,
83,
3256,
705,
438,
1452,
415,
312,
3256,
198,
220,
220,
220,
1037,
2625,
24893,
415,
7390,
286,
262,
22134,
18285,
284,
17594,
19570,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
12,
64,
3256,
705,
438,
1324,
312,
3256,
198,
220,
220,
220,
1037,
2625,
4677,
7390,
286,
262,
22134,
2139,
10033,
284,
17594,
19570,
198,
198,
11321,
27871,
42035,
46677,
13,
2860,
62,
49140,
10786,
438,
75,
2467,
626,
3256,
4277,
11639,
10951,
3256,
198,
220,
220,
220,
1037,
2625,
464,
2604,
1241,
13,
1439,
6972,
25,
14257,
11,
7508,
11,
6509,
11,
4049,
11,
4688,
4943,
198,
198,
2,
751,
850,
9729,
198,
7266,
47,
945,
364,
796,
30751,
13,
2860,
62,
7266,
79,
945,
364,
7,
16520,
11639,
7266,
21812,
11537,
198,
7266,
47,
945,
364,
13,
35827,
796,
6407,
198,
70,
86,
46677,
796,
850,
47,
945,
364,
13,
2860,
62,
48610,
10786,
70,
86,
3256,
3397,
41888,
15654,
46677,
11,
2219,
27871,
42035,
46677,
11,
1312,
849,
549,
42035,
46677,
11,
9991,
16934,
46677,
4357,
1037,
11639,
8645,
689,
14750,
329,
281,
22134,
19034,
38488,
24308,
14833,
2637,
8,
198,
198,
62,
22046,
796,
30751,
13,
29572,
62,
22046,
3419,
198,
198,
2,
198,
2,
17425,
38488,
13113,
2524,
198,
2,
628,
198,
220,
220,
220,
220,
198,
198,
29113,
29113,
7804,
4242,
21017,
198,
2,
198,
2,
8774,
4226,
198,
2,
198,
29113,
29113,
7804,
4242,
21017,
198,
198,
2,
17425,
4226,
18931,
198,
28311,
25,
198,
220,
220,
220,
2604,
4971,
796,
651,
35226,
7,
6404,
2667,
11,
4808,
22046,
13,
75,
2467,
626,
13,
45828,
28955,
198,
16341,
25,
198,
220,
220,
220,
2604,
4971,
796,
18931,
13,
10778,
198,
361,
407,
318,
39098,
7,
6404,
4971,
11,
493,
2599,
198,
220,
220,
220,
5298,
7,
11052,
12331,
10786,
44651,
2604,
1241,
25,
1391,
15,
92,
4458,
18982,
7,
6404,
4971,
22305,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
4971,
8,
198,
198,
2,
651,
3108,
286,
4226,
198,
62,
12048,
35277,
796,
25064,
13,
6978,
58,
15,
60,
198,
198,
2,
9135,
2176,
6460,
198,
361,
705,
48779,
2414,
6,
287,
965,
7,
24254,
13,
41341,
3419,
737,
21037,
33529,
198,
220,
220,
220,
4808,
24254,
34,
19944,
796,
705,
28745,
2414,
6,
198,
17772,
25,
198,
220,
220,
220,
4808,
24254,
34,
19944,
796,
705,
1670,
2624,
85,
22,
6,
198,
198,
2,
198,
2,
7294,
2176,
6460,
198,
2,
198,
361,
407,
4808,
22046,
13,
16793,
24254,
25,
198,
220,
220,
220,
4808,
16793,
37148,
796,
965,
7,
24254,
13,
10057,
3419,
737,
21037,
3419,
198,
220,
220,
220,
611,
4808,
16793,
37148,
6624,
705,
23289,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2198,
611,
356,
389,
319,
370,
8634,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1627,
287,
1280,
10786,
14,
36942,
14,
9641,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
15905,
6,
287,
1627,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
16793,
37148,
796,
705,
86,
6649,
6,
198,
220,
220,
220,
1288,
361,
4808,
16793,
37148,
6624,
705,
28457,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
34666,
7203,
2640,
318,
407,
4855,
13,
1475,
1780,
9313,
8,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
198,
17772,
25,
198,
220,
220,
220,
4808,
16793,
37148,
796,
4808,
22046,
13,
16793,
24254,
198,
6404,
2667,
13,
10951,
7203,
12814,
2496,
24254,
705,
90,
15,
92,
6,
1911,
18982,
28264,
16793,
37148,
4008,
198,
198,
361,
4808,
16793,
37148,
6624,
705,
23289,
6,
393,
4808,
16793,
37148,
6624,
705,
86,
6649,
10354,
198,
220,
220,
220,
4808,
9688,
7391,
8979,
5376,
796,
705,
9688,
12,
4178,
5191,
469,
13,
1477,
6,
198,
220,
220,
220,
4808,
9688,
7391,
40109,
36698,
844,
796,
10148,
198,
220,
220,
220,
4808,
9688,
7391,
40109,
6307,
13049,
796,
705,
1222,
6,
198,
220,
220,
220,
4808,
11338,
7391,
8979,
5376,
796,
705,
11338,
12,
4178,
5191,
469,
13,
1477,
6,
198,
220,
220,
220,
4808,
11338,
7391,
40109,
36698,
844,
796,
10148,
198,
220,
220,
220,
4808,
11338,
7391,
40109,
6307,
13049,
796,
10148,
198,
220,
220,
220,
4808,
15003,
7391,
8979,
5376,
796,
705,
15003,
12,
4178,
5191,
469,
13,
1477,
6,
198,
220,
220,
220,
4808,
15003,
7391,
40109,
36698,
844,
796,
10148,
198,
220,
220,
220,
4808,
15003,
7391,
40109,
6307,
13049,
796,
705,
1222,
6,
198,
220,
220,
220,
4808,
2934,
15003,
7391,
8979,
5376,
796,
705,
2934,
15003,
12,
4178,
5191,
469,
13,
1477,
6,
198,
220,
220,
220,
4808,
2934,
15003,
7391,
40109,
36698,
844,
796,
10148,
198,
220,
220,
220,
4808,
2934,
15003,
7391,
40109,
6307,
13049,
796,
705,
1222,
6,
198,
220,
220,
220,
4808,
16793,
3791,
1370,
796,
705,
59,
77,
6,
198,
417,
361,
4808,
16793,
37148,
6624,
705,
28457,
10354,
198,
220,
220,
220,
4808,
9688,
7391,
8979,
5376,
796,
705,
10434,
12,
3978,
78,
51,
37021,
13,
862,
16,
6,
198,
220,
220,
220,
4808,
9688,
7391,
40109,
36698,
844,
796,
705,
9688,
705,
198,
220,
220,
220,
4808,
9688,
7391,
40109,
6307,
13049,
796,
10148,
198,
220,
220,
220,
4808,
11338,
7391,
8979,
5376,
796,
705,
19485,
12,
3978,
78,
51,
37021,
13,
862,
16,
6,
198,
220,
220,
220,
4808,
11338,
7391,
40109,
36698,
844,
796,
10148,
198,
220,
220,
220,
4808,
11338,
7391,
40109,
6307,
13049,
796,
10148,
198,
220,
220,
220,
4808,
15003,
7391,
8979,
5376,
796,
705,
31768,
12,
3978,
78,
51,
37021,
13,
862,
16,
6,
198,
220,
220,
220,
4808,
15003,
7391,
40109,
36698,
844,
796,
10148,
198,
220,
220,
220,
4808,
15003,
7391,
40109,
6307,
13049,
796,
10148,
198,
220,
220,
220,
4808,
2934,
15003,
7391,
8979,
5376,
796,
705,
5005,
15003,
12,
3978,
78,
51,
37021,
13,
862,
16,
6,
198,
220,
220,
220,
4808,
2934,
15003,
7391,
40109,
36698,
844,
796,
10148,
198,
220,
220,
220,
4808,
2934,
15003,
7391,
40109,
6307,
13049,
796,
10148,
198,
220,
220,
220,
4808,
16793,
3791,
1370,
796,
705,
59,
81,
59,
77,
6,
198,
198,
2,
198,
2,
26571,
2219,
7159,
198,
2,
198,
361,
4808,
22046,
13,
75,
8232,
25,
198,
220,
220,
220,
611,
4808,
16793,
37148,
6624,
705,
28457,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
34924,
16748,
796,
705,
23289,
6,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
69,
10254,
7203,
12,
75,
8232,
318,
691,
3142,
329,
257,
7178,
375,
18504,
2496,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
198,
17772,
25,
198,
220,
220,
220,
4808,
34924,
16748,
796,
4808,
16793,
37148,
611,
4808,
16793,
37148,
14512,
705,
86,
6649,
6,
2073,
705,
23289,
6,
198,
198,
361,
4808,
22046,
13,
448,
15908,
318,
407,
6045,
25,
198,
220,
220,
220,
4808,
22046,
13,
448,
15908,
796,
4808,
22046,
13,
448,
15908,
13,
36311,
3419,
198,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
1069,
1023,
28264,
22046,
13,
448,
15908,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
28015,
15908,
28264,
22046,
13,
448,
15908,
8,
198,
220,
220,
220,
1288,
361,
407,
28686,
13,
6978,
13,
9409,
343,
28264,
22046,
13,
448,
15908,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
34666,
7203,
15056,
503,
15908,
705,
90,
15,
92,
318,
407,
257,
8619,
13,
4222,
2198,
13,
1475,
1780,
9313,
13,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
17,
8,
198,
220,
220,
220,
18931,
13,
10951,
7203,
16447,
477,
7560,
3696,
287,
8619,
705,
90,
15,
92,
30827,
13,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
198,
361,
4808,
22046,
13,
4774,
15908,
318,
407,
6045,
25,
198,
220,
220,
220,
1303,
262,
1377,
4774,
15908,
11507,
26052,
810,
319,
262,
36253,
2583,
262,
8398,
3696,
815,
307,
8574,
13,
198,
220,
220,
220,
1303,
1141,
36253,
8398,
257,
6115,
11007,
318,
17839,
11,
543,
2173,
284,
428,
8619,
13,
198,
220,
220,
220,
1303,
287,
1339,
286,
257,
3272,
3859,
5270,
11,
262,
3696,
389,
1234,
656,
257,
4566,
850,
34945,
286,
262,
7368,
1377,
448,
15908,
198,
220,
220,
220,
1303,
290,
761,
284,
307,
13501,
1068,
14500,
284,
262,
38488,
13113,
3335,
13,
198,
220,
220,
220,
4808,
45986,
36180,
7416,
796,
4808,
22046,
13,
4774,
15908,
796,
4808,
22046,
13,
4774,
15908,
13,
36311,
22446,
33491,
10786,
6852,
3256,
31051,
11537,
198,
220,
220,
220,
1303,
383,
25716,
329,
3964,
6115,
11007,
15582,
468,
3421,
625,
640,
13,
198,
220,
220,
220,
1303,
2080,
36253,
2906,
1248,
13,
3070,
13,
15,
12,
344,
12,
5404,
3270,
357,
1433,
48194,
828,
3113,
1248,
13,
3070,
13,
15,
12,
344,
262,
11007,
15582,
329,
360,
14079,
45986,
2476,
284,
307,
3373,
67,
14,
45986,
628,
220,
220,
220,
611,
4808,
16793,
37148,
287,
685,
705,
28457,
3256,
705,
86,
6649,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
356,
2453,
691,
3938,
10617,
9168,
15582,
357,
301,
5889,
351,
1279,
19472,
31175,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4808,
22046,
13,
4774,
15908,
58,
16,
25,
18,
60,
14512,
705,
14079,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
69,
10254,
7203,
464,
1377,
4774,
15908,
11507,
1276,
307,
1262,
257,
3938,
10617,
3964,
8619,
15582,
19570,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
198,
220,
220,
220,
1288,
361,
4808,
16793,
37148,
6624,
705,
23289,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4808,
22046,
13,
4774,
15908,
58,
15,
25,
16,
60,
14512,
31051,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
69,
10254,
7203,
464,
1377,
4774,
15908,
11507,
1276,
307,
1262,
257,
3938,
10617,
7020,
8619,
15582,
19570,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
69,
10254,
7203,
21745,
3859,
705,
90,
15,
92,
6,
318,
407,
4855,
526,
13,
18982,
28264,
16793,
37148,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
628,
220,
220,
220,
611,
4808,
22046,
13,
16793,
24254,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2251,
257,
8619,
329,
262,
8398,
3696,
11,
611,
407,
2491,
319,
262,
38488,
13113,
3335,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
448,
15908,
16934,
796,
4808,
22046,
13,
448,
15908,
1343,
31051,
11250,
6,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
1069,
1023,
28264,
448,
15908,
16934,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
28015,
15908,
28264,
448,
15908,
16934,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
10951,
7203,
16447,
8619,
705,
90,
15,
92,
6,
329,
2496,
1080,
8398,
3696,
526,
13,
18982,
28264,
448,
15908,
16934,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
407,
28686,
13,
6978,
13,
9409,
343,
28264,
448,
15908,
16934,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
34666,
7203,
6,
90,
15,
92,
6,
318,
2938,
284,
307,
257,
8619,
284,
2148,
8398,
3696,
11,
475,
340,
318,
407,
13,
1345,
82,
2198,
13,
1475,
1780,
9313,
13,
18982,
28264,
448,
15908,
16934,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
17,
8,
198,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
10951,
7203,
16447,
477,
7560,
8398,
3696,
287,
8619,
705,
90,
15,
92,
30827,
13,
18982,
28264,
448,
15908,
16934,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
10951,
7203,
14478,
278,
705,
90,
15,
92,
6,
284,
36253,
355,
2723,
287,
11007,
11,
8739,
284,
705,
90,
16,
92,
30827,
13,
18982,
28264,
45986,
36180,
7416,
11,
4808,
22046,
13,
4774,
15908,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
4774,
35277,
17932,
796,
4808,
22046,
13,
4774,
15908,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
10951,
7203,
438,
16793,
24254,
373,
407,
7368,
13,
2195,
2454,
356,
1057,
319,
262,
38488,
13113,
3335,
19570,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4808,
16793,
37148,
287,
685,
705,
28457,
3256,
705,
23289,
6,
2361,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
4774,
35277,
17932,
796,
4808,
22046,
13,
4774,
15908,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4808,
16793,
37148,
6624,
705,
86,
6649,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
4774,
35277,
17932,
796,
31051,
76,
429,
14,
6,
1343,
4808,
22046,
13,
4774,
15908,
58,
15,
25,
16,
60,
1343,
31051,
6,
1343,
4808,
22046,
13,
4774,
15908,
58,
18,
47715,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
1069,
1023,
28264,
4774,
35277,
17932,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
10951,
7203,
43055,
705,
90,
15,
92,
6,
7368,
2884,
1377,
4774,
15908,
857,
407,
2152,
13,
30481,
340,
9313,
13,
18982,
28264,
22046,
13,
4774,
15908,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
28015,
15908,
28264,
4774,
35277,
17932,
8,
198,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
10951,
7203,
14478,
278,
705,
90,
15,
92,
6,
284,
36253,
355,
2723,
287,
11007,
11,
8739,
284,
705,
90,
16,
92,
30827,
13,
18982,
28264,
45986,
36180,
7416,
11,
4808,
4774,
35277,
17932,
4008,
198,
17772,
25,
198,
220,
220,
220,
1303,
779,
257,
36253,
6115,
198,
220,
220,
220,
1303,
284,
4598,
11767,
3376,
9041,
351,
5043,
198,
220,
220,
220,
4808,
45986,
36180,
7416,
796,
705,
12993,
1324,
7890,
6,
198,
220,
220,
220,
18931,
13,
10951,
7203,
14478,
278,
705,
90,
15,
92,
6,
357,
45986,
6115,
8,
284,
36253,
355,
2723,
287,
11007,
526,
13,
18982,
28264,
45986,
36180,
7416,
4008,
198,
198,
361,
4808,
22046,
13,
45986,
2301,
4592,
318,
6045,
25,
198,
220,
220,
220,
4808,
22046,
13,
45986,
2301,
4592,
796,
705,
40485,
6,
198,
17772,
25,
198,
220,
220,
220,
4808,
22046,
13,
45986,
2301,
4592,
796,
4808,
22046,
13,
45986,
2301,
4592,
13,
36311,
22446,
21037,
3419,
198,
220,
220,
220,
18931,
13,
10951,
7203,
35,
12721,
9290,
20478,
284,
779,
25,
705,
90,
15,
92,
6,
1911,
18982,
28264,
22046,
13,
45986,
2301,
4592,
4008,
198,
198,
2,
198,
2,
1382,
9290,
3891,
198,
2,
198,
62,
404,
66,
44148,
29869,
796,
440,
5662,
31190,
34278,
62,
10943,
30339,
1137,
62,
3955,
11879,
611,
31051,
6,
287,
440,
5662,
31190,
34278,
62,
10943,
30339,
1137,
62,
3955,
11879,
2073,
705,
90,
15,
92,
14,
90,
16,
92,
4458,
18982,
28264,
22046,
13,
45986,
2301,
4592,
11,
440,
5662,
31190,
34278,
62,
10943,
30339,
1137,
62,
3955,
11879,
8,
198,
62,
404,
66,
44148,
29869,
796,
705,
90,
15,
38362,
4458,
18982,
28264,
404,
66,
44148,
29869,
8,
611,
407,
440,
5662,
31190,
34278,
62,
10943,
30339,
1137,
62,
43717,
2073,
705,
90,
15,
92,
29164,
16,
92,
12,
4458,
18982,
28264,
404,
66,
44148,
29869,
11,
440,
5662,
31190,
34278,
62,
10943,
30339,
1137,
62,
43717,
8,
198,
62,
404,
66,
44148,
29869,
796,
705,
90,
15,
18477,
16,
92,
4458,
18982,
28264,
404,
66,
44148,
29869,
11,
705,
28457,
11537,
611,
4808,
34924,
16748,
6624,
705,
28457,
6,
2073,
705,
90,
15,
18477,
16,
92,
4458,
18982,
28264,
404,
66,
44148,
29869,
11,
705,
23289,
11537,
198,
62,
404,
66,
44148,
29869,
796,
705,
90,
15,
92,
12,
90,
16,
92,
4458,
18982,
28264,
404,
66,
44148,
29869,
11,
705,
28745,
2414,
11537,
611,
4808,
24254,
34,
19944,
6624,
705,
28745,
2414,
6,
2073,
705,
90,
15,
92,
12,
90,
16,
92,
4458,
18982,
28264,
404,
66,
44148,
29869,
11,
705,
1670,
2624,
85,
22,
11537,
198,
62,
404,
66,
5080,
259,
29869,
796,
13349,
4177,
37620,
62,
10943,
30339,
1137,
62,
3955,
11879,
611,
31051,
6,
287,
13349,
4177,
37620,
62,
10943,
30339,
1137,
62,
3955,
11879,
2073,
705,
90,
15,
92,
14,
90,
16,
92,
4458,
18982,
28264,
22046,
13,
45986,
2301,
4592,
11,
13349,
4177,
37620,
62,
10943,
30339,
1137,
62,
3955,
11879,
8,
198,
62,
404,
66,
5080,
259,
29869,
796,
705,
90,
15,
38362,
4458,
18982,
28264,
404,
66,
5080,
259,
29869,
8,
611,
407,
13349,
4177,
37620,
62,
10943,
30339,
1137,
62,
43717,
2073,
705,
90,
15,
92,
29164,
16,
92,
12,
4458,
18982,
28264,
404,
66,
5080,
259,
29869,
11,
13349,
4177,
37620,
62,
10943,
30339,
1137,
62,
43717,
8,
198,
62,
404,
66,
5080,
259,
29869,
796,
705,
90,
15,
18477,
16,
92,
4458,
18982,
28264,
404,
66,
5080,
259,
29869,
11,
705,
28457,
11537,
611,
4808,
34924,
16748,
6624,
705,
28457,
6,
2073,
705,
90,
15,
18477,
16,
92,
4458,
18982,
28264,
404,
66,
5080,
259,
29869,
11,
705,
23289,
11537,
198,
62,
404,
66,
5080,
259,
29869,
796,
705,
90,
15,
92,
12,
90,
16,
92,
4458,
18982,
28264,
404,
66,
5080,
259,
29869,
11,
705,
28745,
2414,
11537,
611,
4808,
24254,
34,
19944,
6624,
705,
28745,
2414,
6,
2073,
705,
90,
15,
18477,
16,
92,
4458,
18982,
28264,
404,
66,
5080,
259,
29869,
11,
705,
1670,
2624,
85,
22,
11537,
198,
62,
404,
66,
46471,
29869,
796,
440,
5662,
5105,
9148,
1797,
16879,
62,
10943,
30339,
1137,
62,
3955,
11879,
611,
31051,
6,
287,
440,
5662,
5105,
9148,
1797,
16879,
62,
10943,
30339,
1137,
62,
3955,
11879,
2073,
705,
90,
15,
92,
14,
90,
16,
92,
4458,
18982,
28264,
22046,
13,
45986,
2301,
4592,
11,
440,
5662,
5105,
9148,
1797,
16879,
62,
10943,
30339,
1137,
62,
3955,
11879,
8,
198,
62,
404,
66,
46471,
29869,
796,
705,
90,
15,
38362,
4458,
18982,
28264,
404,
66,
46471,
29869,
8,
611,
407,
440,
5662,
5105,
9148,
1797,
16879,
62,
10943,
30339,
1137,
62,
43717,
2073,
705,
90,
15,
92,
29164,
16,
92,
12,
4458,
18982,
28264,
404,
66,
46471,
29869,
11,
440,
5662,
5105,
9148,
1797,
16879,
62,
10943,
30339,
1137,
62,
43717,
8,
198,
62,
404,
66,
46471,
29869,
796,
705,
90,
15,
18477,
16,
92,
4458,
18982,
28264,
404,
66,
46471,
29869,
11,
705,
28457,
11537,
611,
4808,
34924,
16748,
6624,
705,
28457,
6,
2073,
705,
90,
15,
18477,
16,
92,
4458,
18982,
28264,
404,
66,
46471,
29869,
11,
705,
23289,
11537,
198,
62,
404,
66,
46471,
29869,
796,
705,
90,
15,
92,
12,
90,
16,
92,
4458,
18982,
28264,
404,
66,
46471,
29869,
11,
705,
28745,
2414,
11537,
611,
4808,
24254,
34,
19944,
6624,
705,
28745,
2414,
6,
2073,
705,
90,
15,
92,
12,
90,
16,
92,
4458,
18982,
28264,
404,
66,
46471,
29869,
11,
705,
1670,
2624,
85,
22,
11537,
198,
62,
404,
66,
3646,
66,
29869,
796,
440,
5662,
47,
5639,
62,
10943,
30339,
1137,
62,
3955,
11879,
611,
31051,
6,
287,
440,
5662,
47,
5639,
62,
10943,
30339,
1137,
62,
3955,
11879,
2073,
705,
90,
15,
92,
14,
90,
16,
92,
4458,
18982,
28264,
22046,
13,
45986,
2301,
4592,
11,
440,
5662,
47,
5639,
62,
10943,
30339,
1137,
62,
3955,
11879,
8,
198,
62,
404,
66,
3646,
66,
29869,
796,
705,
90,
15,
38362,
4458,
18982,
28264,
404,
66,
3646,
66,
29869,
8,
611,
407,
440,
5662,
47,
5639,
62,
10943,
30339,
1137,
62,
43717,
2073,
705,
90,
15,
92,
29164,
16,
92,
12,
4458,
18982,
28264,
404,
66,
3646,
66,
29869,
11,
440,
5662,
47,
5639,
62,
10943,
30339,
1137,
62,
43717,
8,
198,
62,
404,
66,
3646,
66,
29869,
796,
705,
90,
15,
18477,
16,
92,
4458,
18982,
28264,
404,
66,
3646,
66,
29869,
11,
705,
28457,
11537,
611,
4808,
34924,
16748,
6624,
705,
28457,
6,
2073,
705,
90,
15,
18477,
16,
92,
4458,
18982,
28264,
404,
66,
3646,
66,
29869,
11,
705,
23289,
11537,
198,
62,
404,
66,
3646,
66,
29869,
796,
705,
90,
15,
92,
12,
90,
16,
92,
4458,
18982,
28264,
404,
66,
3646,
66,
29869,
11,
705,
28745,
2414,
11537,
611,
4808,
24254,
34,
19944,
6624,
705,
28745,
2414,
6,
2073,
705,
90,
15,
18477,
16,
92,
4458,
18982,
28264,
404,
66,
3646,
66,
29869,
11,
705,
1670,
2624,
85,
22,
11537,
198,
198,
6404,
2667,
13,
10951,
7203,
12814,
8670,
66,
46471,
9290,
25,
705,
90,
15,
92,
6,
1911,
18982,
28264,
404,
66,
46471,
29869,
4008,
198,
6404,
2667,
13,
10951,
7203,
12814,
8670,
66,
44148,
9290,
25,
705,
90,
15,
92,
6,
1911,
18982,
28264,
404,
66,
44148,
29869,
4008,
198,
6404,
2667,
13,
10951,
7203,
12814,
8670,
66,
5080,
259,
9290,
25,
705,
90,
15,
92,
6,
1911,
18982,
28264,
404,
66,
5080,
259,
29869,
4008,
198,
6404,
2667,
13,
10951,
7203,
12814,
8670,
66,
3646,
66,
9290,
25,
705,
90,
15,
92,
6,
1911,
18982,
28264,
404,
66,
3646,
66,
29869,
4008,
198,
198,
2,
198,
2,
35560,
495,
18239,
198,
2,
198,
361,
4808,
22046,
13,
15271,
1050,
1939,
8521,
22583,
318,
407,
6045,
25,
198,
220,
220,
220,
4808,
22046,
13,
15271,
1050,
1939,
8521,
22583,
796,
4808,
22046,
13,
15271,
1050,
1939,
8521,
22583,
13,
36311,
3419,
198,
220,
220,
220,
611,
4808,
16793,
37148,
6624,
705,
28457,
6,
290,
407,
4808,
22046,
13,
15271,
1050,
1939,
8521,
22583,
58,
16,
25,
17,
60,
6624,
705,
32105,
393,
4808,
16793,
37148,
6624,
705,
23289,
6,
290,
407,
4808,
22046,
13,
15271,
1050,
1939,
8521,
22583,
13,
9688,
2032,
342,
10786,
14,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
22046,
13,
15271,
1050,
1939,
8521,
22583,
796,
705,
90,
15,
92,
14,
90,
16,
92,
4458,
18982,
7,
418,
13,
1136,
66,
16993,
22784,
4808,
22046,
13,
15271,
1050,
1939,
8521,
22583,
8,
198,
220,
220,
220,
18931,
13,
10951,
7203,
40786,
1262,
2139,
10033,
5051,
287,
2393,
705,
90,
15,
92,
6,
1911,
18982,
28264,
22046,
13,
15271,
1050,
1939,
8521,
22583,
4008,
198,
198,
361,
4808,
22046,
13,
1452,
415,
312,
318,
407,
6045,
25,
198,
220,
220,
220,
4808,
22046,
13,
1452,
415,
312,
796,
4808,
22046,
13,
1452,
415,
312,
13,
36311,
3419,
198,
220,
220,
220,
18931,
13,
10951,
7203,
40786,
1262,
18285,
4686,
705,
90,
15,
92,
6,
284,
17594,
1911,
18982,
28264,
22046,
13,
1452,
415,
312,
4008,
198,
198,
361,
4808,
22046,
13,
1324,
312,
318,
407,
6045,
25,
198,
220,
220,
220,
4808,
22046,
13,
1324,
312,
796,
4808,
22046,
13,
1324,
312,
13,
36311,
3419,
198,
220,
220,
220,
18931,
13,
10951,
7203,
40786,
1262,
2034,
7390,
705,
90,
15,
92,
6,
284,
17594,
1911,
18982,
28264,
22046,
13,
1324,
312,
4008,
198,
198,
361,
14808,
62,
22046,
13,
15271,
1050,
1939,
8521,
22583,
318,
407,
6045,
393,
4808,
22046,
13,
1452,
415,
312,
318,
407,
6045,
393,
4808,
22046,
13,
1324,
312,
318,
407,
6045,
8,
290,
198,
220,
220,
220,
44104,
22046,
13,
15271,
1050,
1939,
8521,
22583,
318,
6045,
393,
4808,
22046,
13,
1452,
415,
312,
318,
6045,
393,
4808,
22046,
13,
1324,
312,
318,
6045,
8,
2599,
198,
220,
220,
220,
220,
18931,
13,
34666,
7203,
15271,
1050,
1939,
8521,
22583,
11,
256,
1697,
415,
312,
290,
598,
312,
1276,
477,
307,
7368,
13,
1475,
1780,
9313,
8,
198,
220,
220,
220,
220,
25064,
13,
37023,
7,
17,
8,
198,
198,
62,
22046,
13,
7266,
21812,
796,
4808,
22046,
13,
7266,
21812,
13,
21037,
3419,
198,
198,
2,
198,
2,
26571,
477,
2672,
10007,
329,
308,
86,
850,
21812,
198,
2,
198,
361,
4808,
22046,
13,
7266,
21812,
6624,
705,
70,
86,
10354,
198,
220,
220,
220,
1303,
26571,
262,
13760,
11250,
2393,
220,
198,
220,
220,
220,
611,
4808,
22046,
13,
77,
4147,
11250,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2198,
611,
2393,
7160,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
1069,
1023,
28264,
22046,
13,
77,
4147,
11250,
8,
393,
407,
28686,
13,
6978,
13,
4468,
576,
28264,
22046,
13,
77,
4147,
11250,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
34666,
7203,
464,
13760,
11250,
2393,
705,
90,
15,
92,
6,
460,
407,
307,
1043,
393,
318,
407,
257,
2393,
13,
1475,
1780,
9313,
13,
18982,
28264,
22046,
13,
77,
4147,
11250,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
17,
8,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
284,
1895,
340,
356,
761,
1895,
284,
2583,
2393,
1080,
290,
761,
257,
2583,
15908,
11507,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
4808,
22046,
13,
4774,
15908,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
34666,
7203,
1532,
1377,
77,
4147,
11250,
318,
7368,
345,
761,
284,
11986,
257,
2583,
8619,
329,
1377,
4774,
15908,
355,
880,
13,
1475,
1780,
9313,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
17,
8,
220,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4808,
22046,
13,
46813,
41935,
11250,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2198,
611,
2393,
7160,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
1069,
1023,
28264,
22046,
13,
46813,
41935,
11250,
8,
393,
407,
28686,
13,
6978,
13,
4468,
576,
28264,
22046,
13,
46813,
41935,
11250,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
34666,
7203,
464,
5735,
41935,
11250,
2393,
705,
90,
15,
92,
6,
460,
407,
307,
1043,
393,
318,
407,
257,
2393,
13,
1475,
1780,
9313,
13,
18982,
28264,
22046,
13,
46813,
41935,
11250,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
17,
8,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
284,
1895,
340,
356,
761,
1895,
284,
2583,
2393,
1080,
290,
761,
257,
2583,
15908,
11507,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
4808,
22046,
13,
4774,
15908,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
34666,
7203,
1532,
1377,
46813,
41935,
11250,
4433,
1377,
4774,
15908,
355,
880,
13,
1475,
1780,
9313,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
17,
8,
220,
198,
220,
220,
220,
2845,
3460,
4163,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
4808,
22046,
13,
15654,
796,
4808,
22046,
13,
15654,
13,
21037,
3419,
220,
198,
220,
220,
220,
4808,
14907,
29123,
796,
4808,
22046,
13,
15654,
628,
220,
220,
220,
1303,
38488,
13113,
15424,
198,
220,
220,
220,
611,
4808,
22046,
13,
17474,
6978,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
22046,
13,
17474,
6978,
796,
4808,
22046,
13,
17474,
6978,
13,
36311,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
1069,
1023,
28264,
22046,
13,
17474,
6978,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
34666,
7203,
464,
1813,
15424,
705,
90,
15,
92,
857,
407,
2152,
13,
4222,
2198,
13,
1475,
1780,
9313,
13,
18982,
28264,
22046,
13,
17474,
6978,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
17,
8,
628,
220,
220,
220,
1303,
2524,
8398,
198,
220,
220,
220,
611,
4808,
22046,
13,
15654,
11250,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
22046,
13,
15654,
11250,
796,
4808,
22046,
13,
15654,
11250,
13,
36311,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
28686,
13,
6978,
13,
1069,
1023,
28264,
22046,
13,
15654,
11250,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
34666,
7203,
464,
1813,
2524,
4566,
2393,
705,
90,
15,
92,
857,
407,
2152,
13,
4222,
2198,
13,
1475,
1780,
9313,
13,
18982,
28264,
22046,
13,
15654,
11250,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
17,
8,
198,
198,
2,
1382,
262,
1351,
286,
2583,
3672,
14,
4061,
2209,
16855,
284,
1249,
262,
16472,
284,
1895,
262,
1957,
290,
7097,
11453,
11,
287,
1339,
612,
318,
645,
18538,
357,
9774,
330,
1927,
319,
3964,
8,
198,
2,
751,
1957,
4774,
7508,
611,
356,
1057,
319,
262,
2496,
24254,
198,
62,
2860,
1859,
17932,
82,
796,
17635,
198,
361,
407,
4808,
22046,
13,
16793,
24254,
25,
198,
220,
220,
220,
20966,
20231,
796,
651,
14565,
40,
79,
20231,
3419,
198,
220,
220,
220,
611,
20966,
20231,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
34666,
7203,
1858,
318,
407,
3127,
4637,
1695,
19570,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
198,
220,
220,
220,
2583,
5376,
796,
17802,
13,
1136,
4774,
3672,
3419,
198,
220,
220,
220,
277,
80,
32656,
17932,
5376,
796,
17802,
13,
1136,
69,
80,
32656,
3419,
198,
220,
220,
220,
4808,
2860,
1859,
17932,
82,
13,
33295,
15090,
366,
4774,
1298,
2583,
5376,
11,
366,
541,
1298,
20966,
20231,
32092,
198,
220,
220,
220,
611,
2583,
5376,
13,
21037,
3419,
14512,
277,
80,
32656,
17932,
5376,
13,
21037,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
2860,
1859,
17932,
82,
13,
33295,
15090,
366,
4774,
1298,
277,
80,
32656,
17932,
5376,
11,
366,
541,
1298,
20966,
20231,
32092,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
37,
48,
35504,
705,
90,
15,
92,
6,
318,
4961,
284,
2583,
3672,
705,
90,
16,
92,
6,
1911,
18982,
7,
69,
80,
32656,
17932,
5376,
11,
2583,
5376,
4008,
198,
62,
2860,
1859,
17932,
82,
13,
2302,
437,
7,
1136,
27726,
17932,
82,
3419,
58,
25,
12962,
198,
62,
26086,
17932,
82,
796,
17635,
198,
361,
18896,
28264,
2860,
1859,
17932,
82,
8,
1875,
657,
25,
198,
220,
220,
220,
4808,
26086,
17932,
82,
13,
2302,
437,
10786,
12,
45144,
15,
92,
29164,
16,
36786,
59,
77,
4458,
18982,
7,
4774,
17816,
4774,
6,
4357,
2583,
17816,
541,
6,
12962,
329,
2583,
287,
4808,
2860,
1859,
17932,
82,
58,
15,
25,
16,
12962,
198,
220,
220,
220,
611,
18896,
28264,
2860,
1859,
17932,
82,
8,
1875,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
26086,
17932,
82,
13,
2302,
437,
10786,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
45144,
15,
92,
29164,
16,
36786,
59,
77,
4458,
18982,
7,
4774,
17816,
4774,
6,
4357,
2583,
17816,
541,
6,
12962,
329,
2583,
287,
4808,
2860,
1859,
17932,
82,
58,
16,
21912,
16,
12962,
198,
220,
220,
220,
611,
18896,
28264,
2860,
1859,
17932,
82,
8,
18189,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
26086,
17932,
82,
13,
2302,
437,
10786,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
45144,
15,
92,
29164,
16,
36786,
4458,
18982,
7,
4774,
17816,
4774,
6,
4357,
2583,
17816,
541,
6,
12962,
329,
2583,
287,
4808,
2860,
1859,
17932,
82,
58,
12,
16,
25,
12962,
198,
198,
2,
198,
2,
308,
86,
4905,
25,
2251,
477,
14750,
284,
357,
2934,
8,
15003,
290,
923,
14,
11338,
262,
2524,
7368,
319,
262,
3141,
1627,
198,
2,
532,
4866,
262,
8398,
3696,
198,
2,
532,
2251,
281,
38488,
13113,
3335,
290,
14833,
329,
262,
2524,
290,
477,
440,
5662,
6805,
389,
17839,
284,
1057,
355,
38488,
13113,
13103,
198,
2,
198,
361,
4808,
22046,
13,
7266,
21812,
6624,
705,
70,
86,
10354,
198,
220,
220,
220,
1303,
17594,
284,
22134,
290,
21207,
27853,
4221,
549,
4637,
4731,
198,
220,
220,
220,
35560,
495,
47790,
3419,
198,
220,
220,
220,
35560,
495,
3855,
40,
313,
16066,
32274,
3419,
198,
220,
220,
220,
1303,
4866,
8398,
3696,
284,
262,
826,
8619,
611,
356,
389,
2491,
319,
262,
2496,
11,
4306,
4866,
340,
284,
262,
4566,
2393,
8619,
198,
220,
220,
220,
611,
4808,
22046,
13,
16793,
24254,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4808,
22046,
13,
77,
4147,
11250,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13760,
11250,
8979,
5376,
796,
705,
21999,
19355,
1343,
4808,
22046,
13,
15654,
1343,
45302,
17752,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
28264,
22046,
13,
77,
4147,
11250,
11,
705,
90,
15,
92,
14,
90,
16,
92,
4458,
18982,
28264,
448,
15908,
16934,
11,
13760,
11250,
8979,
5376,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
4808,
22046,
13,
46813,
41935,
11250,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5735,
41935,
11250,
8979,
5376,
796,
705,
23047,
19355,
1343,
4808,
22046,
13,
15654,
1343,
45302,
17752,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
28264,
22046,
13,
46813,
41935,
11250,
11,
705,
90,
15,
92,
14,
90,
16,
92,
4458,
18982,
28264,
448,
15908,
16934,
11,
5735,
41935,
11250,
8979,
5376,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
3460,
4163,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4808,
22046,
13,
77,
4147,
11250,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13760,
11250,
8979,
5376,
796,
705,
21999,
19355,
1343,
4808,
22046,
13,
15654,
1343,
45302,
17752,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
28264,
22046,
13,
77,
4147,
11250,
11,
705,
90,
15,
92,
14,
90,
16,
92,
4458,
18982,
28264,
4774,
35277,
17932,
11,
13760,
11250,
8979,
5376,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4808,
22046,
13,
46813,
41935,
11250,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5735,
41935,
11250,
8979,
5376,
796,
705,
23047,
19355,
1343,
4808,
22046,
13,
15654,
1343,
45302,
17752,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
28264,
22046,
13,
46813,
41935,
11250,
11,
705,
90,
15,
92,
14,
90,
16,
92,
4458,
18982,
28264,
4774,
35277,
17932,
11,
5735,
41935,
11250,
8979,
5376,
4008,
198,
220,
220,
220,
1303,
2251,
2524,
14,
69,
9548,
14750,
198,
220,
220,
220,
18931,
13,
10951,
7203,
16447,
262,
2524,
37588,
290,
8398,
329,
705,
90,
15,
92,
6,
1911,
18982,
28264,
22046,
13,
15654,
4008,
198,
220,
220,
220,
2251,
37021,
29123,
38149,
28264,
22046,
13,
15654,
8,
628,
198,
2,
11902,
25,
3993,
284,
14257,
37588,
4226,
2428,
198,
2,
4808,
15003,
7391,
13,
33295,
10786,
48678,
3126,
59,
77,
11537,
198,
198,
2,
3551,
262,
14750,
198,
13564,
7391,
28264,
9688,
7391,
8979,
5376,
11,
4808,
9688,
7391,
8,
198,
13564,
7391,
28264,
11338,
7391,
8979,
5376,
11,
4808,
11338,
7391,
11,
9575,
796,
6407,
8,
198,
13564,
7391,
28264,
15003,
7391,
8979,
5376,
11,
4808,
15003,
7391,
8,
198,
13564,
7391,
28264,
2934,
15003,
7391,
8979,
5376,
11,
4808,
2934,
15003,
7391,
11,
9575,
796,
6407,
8,
198,
198,
2,
284,
4598,
8529,
4566,
13,
88,
43695,
611,
15741,
318,
973,
198,
2,
4866,
662,
34075,
9988,
14750,
198,
361,
4808,
22046,
13,
16793,
24254,
25,
198,
220,
220,
220,
611,
4808,
22046,
13,
16793,
24254,
287,
685,
705,
28457,
6,
2361,
25,
198,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
10786,
90,
15,
92,
14,
31768,
12,
40,
313,
37021,
16177,
13,
862,
16,
4458,
18982,
28264,
12048,
35277,
828,
705,
90,
15,
92,
14,
31768,
12,
40,
313,
37021,
16177,
13,
862,
16,
4458,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
10786,
90,
15,
92,
14,
5005,
15003,
12,
40,
313,
37021,
16177,
13,
862,
16,
4458,
18982,
28264,
12048,
35277,
828,
705,
90,
15,
92,
14,
5005,
15003,
12,
40,
313,
37021,
16177,
13,
862,
16,
4458,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
10786,
90,
15,
92,
37534,
533,
12,
3978,
313,
17932,
13,
862,
16,
4458,
18982,
28264,
12048,
35277,
828,
705,
90,
15,
92,
14,
37534,
533,
12,
3978,
313,
17932,
13,
862,
16,
4458,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
220,
220,
220,
611,
4808,
22046,
13,
16793,
24254,
287,
685,
705,
23289,
3256,
705,
86,
6649,
6,
2361,
25,
198,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
10786,
90,
15,
92,
14,
4178,
5191,
469,
12,
17350,
12,
3866,
34075,
13,
1477,
4458,
18982,
28264,
12048,
35277,
828,
705,
90,
15,
92,
14,
4178,
5191,
469,
12,
17350,
12,
3866,
34075,
13,
1477,
4458,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
10786,
90,
15,
92,
14,
4178,
5191,
469,
12,
17350,
12,
23289,
12,
43789,
13,
1477,
4458,
18982,
28264,
12048,
35277,
828,
705,
90,
15,
92,
14,
4178,
5191,
469,
12,
17350,
12,
23289,
12,
43789,
13,
1477,
4458,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
220,
220,
220,
4423,
346,
13,
30073,
7753,
10786,
90,
15,
92,
14,
8897,
18883,
13,
14116,
4458,
18982,
28264,
12048,
35277,
828,
705,
90,
15,
92,
14,
8897,
18883,
13,
14116,
4458,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
220,
220,
220,
1303,
4175,
2836,
618,
407,
2491,
319,
2496,
3859,
198,
220,
220,
220,
18931,
13,
10951,
7,
7061,
8,
198,
220,
220,
220,
18931,
13,
10951,
7203,
5492,
4866,
597,
2672,
4226,
3696,
422,
705,
90,
15,
92,
6,
284,
534,
2496,
1080,
526,
13,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
220,
220,
220,
611,
4808,
22046,
13,
4774,
15908,
25,
198,
220,
220,
220,
220,
220,
220,
220,
18931,
13,
10951,
7203,
5492,
4866,
597,
2672,
8398,
3696,
422,
705,
90,
15,
92,
6,
284,
534,
2496,
1080,
284,
8619,
705,
90,
16,
92,
30827,
13,
18982,
28264,
448,
15908,
16934,
11,
4808,
22046,
13,
4774,
15908,
4008,
198,
417,
361,
4808,
16793,
37148,
6624,
705,
28457,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
10786,
90,
15,
92,
14,
31768,
12,
40,
313,
37021,
16177,
13,
862,
16,
4458,
18982,
28264,
12048,
35277,
828,
705,
90,
15,
92,
14,
31768,
12,
40,
313,
37021,
16177,
13,
862,
16,
4458,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
10786,
90,
15,
92,
14,
5005,
15003,
12,
40,
313,
37021,
16177,
13,
862,
16,
4458,
18982,
28264,
12048,
35277,
828,
705,
90,
15,
92,
14,
5005,
15003,
12,
40,
313,
37021,
16177,
13,
862,
16,
4458,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
10786,
90,
15,
92,
14,
37534,
533,
12,
11209,
22628,
1014,
8600,
16,
13,
862,
16,
4458,
18982,
28264,
12048,
35277,
828,
705,
90,
15,
92,
14,
37534,
533,
12,
11209,
22628,
1014,
8600,
16,
13,
862,
16,
4458,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
4423,
346,
13,
30073,
7753,
10786,
90,
15,
92,
14,
37534,
533,
12,
11209,
22628,
1014,
8600,
17,
13,
862,
16,
4458,
18982,
28264,
12048,
35277,
828,
705,
90,
15,
92,
14,
37534,
533,
12,
11209,
22628,
1014,
8600,
17,
13,
862,
16,
4458,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
198,
2,
1760,
198,
6404,
2667,
13,
10951,
7,
7061,
8,
198,
361,
4808,
22046,
13,
16793,
24254,
25,
198,
220,
220,
220,
18931,
13,
10951,
7203,
464,
7560,
4226,
3696,
460,
307,
1043,
287,
25,
705,
90,
15,
92,
4458,
4222,
4866,
606,
284,
534,
2496,
1080,
526,
13,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
17772,
25,
198,
220,
220,
220,
18931,
13,
10951,
7203,
464,
7560,
4226,
3696,
460,
307,
1043,
287,
25,
705,
90,
15,
92,
6,
1911,
18982,
28264,
22046,
13,
448,
15908,
4008,
198,
6404,
2667,
13,
10951,
7,
7061,
8,
198,
6404,
2667,
13,
10951,
7203,
32180,
5668,
19570,
628,
198
] | 2.781757 | 8,376 |
import datetime
import os
import re
import shutil
import boto3
from boto3.dynamodb.conditions import Key
from datalake_library import octagon
from datalake_library.commons import init_logger
from datalake_library.configuration.resource_configs import DynamoConfiguration
from datalake_library.interfaces.dynamo_interface import DynamoInterface
dynamodbClient = boto3.resource("dynamodb")
logger = init_logger(__name__)
def lambda_handler(event, context):
"""Checks dependent datasets status
Arguments:
event {dict} -- Dictionary with details on datasets dependency
context {dict} -- Dictionary with details on Lambda context
Returns:
{dict} -- Dictionary with details on datasets dependency
"""
try:
logger.info("Dataset dependency Lambda")
bucket = event['body']['bucket']
team = event['body']['team']
pipeline = event['body']['pipeline']
stage = event['body']['pipeline_stage']
dataset = event['body']['dataset']
env = event['body']['env']
dependent_stage = event['body']['dependent_stage']
retry_count = event['body']["retry_count"]
logger.info('Initializing Octagon client')
component = context.function_name.split('-')[-2].title()
octagon_client = (
octagon.OctagonClient()
.with_run_lambda(True)
.with_configuration_instance(env)
.build()
)
if 'peh_id' not in event['body']:
peh_id = octagon_client.start_pipeline_execution(
pipeline_name='{}-{}-stage-{}'.format(team,
pipeline, stage[-1].lower()),
dataset_name='{}-{}'.format(team, dataset),
comment=event
)
else:
peh_id = event['body']['peh_id']
octagon.peh.PipelineExecutionHistoryAPI(
octagon_client).retrieve_pipeline_execution(peh_id)
logger.info("Checking dependent tables status")
dependent_datasets = get_dependent_datasets(team, dataset)
atomic_completed_datasets_count = 0
for each_dataset in dependent_datasets:
output = get_dynamodb_peh_status(
env,
dependent_datasets[each_dataset],
dependent_stage,
get_current_date()
)
if output == "COMPLETED":
atomic_completed_datasets_count += 1
dependent_datasets_status = "SUCCEEDED" if len(
dependent_datasets) == atomic_completed_datasets_count else "FAILED"
octagon_client.update_pipeline_execution(
status="{} {} Dependent Datasets Status".format(stage, component), component=component)
except Exception as e:
logger.error("Fatal error", exc_info=True)
octagon_client.end_pipeline_execution_failed(component=component,
issue_comment="{} {} Error: {}".format(stage, component, repr(e)))
raise e
return {
"body": {
"bucket": bucket,
"team": team,
"pipeline": pipeline,
"pipeline_stage": stage,
"dataset": dataset,
"env": env,
"dependent_stage": dependent_stage,
"retry_count": retry_count + 1,
"dependent_datasets_status": dependent_datasets_status,
"peh_id": peh_id
}
}
| [
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
4423,
346,
198,
198,
11748,
275,
2069,
18,
198,
6738,
275,
2069,
18,
13,
67,
4989,
375,
65,
13,
17561,
1756,
1330,
7383,
198,
198,
6738,
4818,
282,
539,
62,
32016,
1330,
19318,
1840,
198,
6738,
4818,
282,
539,
62,
32016,
13,
9503,
684,
1330,
2315,
62,
6404,
1362,
198,
6738,
4818,
282,
539,
62,
32016,
13,
11250,
3924,
13,
31092,
62,
11250,
82,
1330,
41542,
38149,
198,
6738,
4818,
282,
539,
62,
32016,
13,
3849,
32186,
13,
67,
4989,
78,
62,
39994,
1330,
41542,
39317,
198,
198,
67,
4989,
375,
65,
11792,
796,
275,
2069,
18,
13,
31092,
7203,
67,
4989,
375,
65,
4943,
198,
6404,
1362,
796,
2315,
62,
6404,
1362,
7,
834,
3672,
834,
8,
628,
628,
198,
198,
4299,
37456,
62,
30281,
7,
15596,
11,
4732,
2599,
198,
220,
220,
220,
37227,
7376,
4657,
10795,
40522,
3722,
628,
220,
220,
220,
20559,
2886,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1785,
1391,
11600,
92,
1377,
28261,
351,
3307,
319,
40522,
20203,
198,
220,
220,
220,
220,
220,
220,
220,
4732,
1391,
11600,
92,
1377,
28261,
351,
3307,
319,
21114,
6814,
4732,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1391,
11600,
92,
1377,
28261,
351,
3307,
319,
40522,
20203,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
10951,
7203,
27354,
292,
316,
20203,
21114,
6814,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
19236,
796,
1785,
17816,
2618,
6,
7131,
6,
27041,
316,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
1074,
796,
1785,
17816,
2618,
6,
7131,
6,
15097,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
11523,
796,
1785,
17816,
2618,
6,
7131,
6,
79,
541,
4470,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
3800,
796,
1785,
17816,
2618,
6,
7131,
6,
79,
541,
4470,
62,
14247,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
27039,
796,
1785,
17816,
2618,
6,
7131,
6,
19608,
292,
316,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
17365,
796,
1785,
17816,
2618,
6,
7131,
6,
24330,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
10795,
62,
14247,
796,
1785,
17816,
2618,
6,
7131,
6,
21186,
62,
14247,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
1005,
563,
62,
9127,
796,
1785,
17816,
2618,
6,
7131,
1,
1186,
563,
62,
9127,
8973,
628,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
10951,
10786,
24243,
2890,
2556,
1840,
5456,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
7515,
796,
4732,
13,
8818,
62,
3672,
13,
35312,
10786,
12,
11537,
58,
12,
17,
4083,
7839,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
19318,
1840,
62,
16366,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19318,
1840,
13,
12349,
1840,
11792,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
4480,
62,
5143,
62,
50033,
7,
17821,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
4480,
62,
11250,
3924,
62,
39098,
7,
24330,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
11249,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
611,
705,
431,
71,
62,
312,
6,
407,
287,
1785,
17816,
2618,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
613,
71,
62,
312,
796,
19318,
1840,
62,
16366,
13,
9688,
62,
79,
541,
4470,
62,
18558,
1009,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11523,
62,
3672,
11639,
90,
92,
12,
90,
92,
12,
14247,
12,
90,
92,
4458,
18982,
7,
15097,
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,
11523,
11,
3800,
58,
12,
16,
4083,
21037,
3419,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27039,
62,
3672,
11639,
90,
92,
12,
90,
92,
4458,
18982,
7,
15097,
11,
27039,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2912,
28,
15596,
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,
613,
71,
62,
312,
796,
1785,
17816,
2618,
6,
7131,
6,
431,
71,
62,
312,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19318,
1840,
13,
431,
71,
13,
47,
541,
4470,
23002,
1009,
18122,
17614,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19318,
1840,
62,
16366,
737,
1186,
30227,
62,
79,
541,
4470,
62,
18558,
1009,
7,
431,
71,
62,
312,
8,
628,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
10951,
7203,
9787,
278,
10795,
8893,
3722,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
10795,
62,
19608,
292,
1039,
796,
651,
62,
21186,
62,
19608,
292,
1039,
7,
15097,
11,
27039,
8,
628,
220,
220,
220,
220,
220,
220,
220,
17226,
62,
785,
16838,
62,
19608,
292,
1039,
62,
9127,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1123,
62,
19608,
292,
316,
287,
10795,
62,
19608,
292,
1039,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5072,
796,
651,
62,
67,
4989,
375,
65,
62,
431,
71,
62,
13376,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17365,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10795,
62,
19608,
292,
1039,
58,
27379,
62,
19608,
292,
316,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10795,
62,
14247,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
651,
62,
14421,
62,
4475,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
5072,
6624,
366,
41335,
36493,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17226,
62,
785,
16838,
62,
19608,
292,
1039,
62,
9127,
15853,
352,
628,
220,
220,
220,
220,
220,
220,
220,
10795,
62,
19608,
292,
1039,
62,
13376,
796,
366,
12564,
4093,
41841,
1961,
1,
611,
18896,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10795,
62,
19608,
292,
1039,
8,
6624,
17226,
62,
785,
16838,
62,
19608,
292,
1039,
62,
9127,
2073,
366,
7708,
4146,
1961,
1,
628,
220,
220,
220,
220,
220,
220,
220,
19318,
1840,
62,
16366,
13,
19119,
62,
79,
541,
4470,
62,
18558,
1009,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3722,
2625,
90,
92,
23884,
37947,
298,
16092,
292,
1039,
12678,
1911,
18982,
7,
14247,
11,
7515,
828,
7515,
28,
42895,
8,
198,
220,
220,
220,
2845,
35528,
355,
304,
25,
198,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
18224,
7203,
37,
10254,
4049,
1600,
2859,
62,
10951,
28,
17821,
8,
198,
220,
220,
220,
220,
220,
220,
220,
19318,
1840,
62,
16366,
13,
437,
62,
79,
541,
4470,
62,
18558,
1009,
62,
47904,
7,
42895,
28,
42895,
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,
2071,
62,
23893,
2625,
90,
92,
23884,
13047,
25,
23884,
1911,
18982,
7,
14247,
11,
7515,
11,
41575,
7,
68,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
304,
198,
220,
220,
220,
1441,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
2618,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
27041,
316,
1298,
19236,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15097,
1298,
1074,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
79,
541,
4470,
1298,
11523,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
79,
541,
4470,
62,
14247,
1298,
3800,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
19608,
292,
316,
1298,
27039,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
24330,
1298,
17365,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
21186,
62,
14247,
1298,
10795,
62,
14247,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1186,
563,
62,
9127,
1298,
1005,
563,
62,
9127,
1343,
352,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
21186,
62,
19608,
292,
1039,
62,
13376,
1298,
10795,
62,
19608,
292,
1039,
62,
13376,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
431,
71,
62,
312,
1298,
613,
71,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
1782,
198
] | 2.135251 | 1,634 |
''' UVa 465 - Overflow '''
# https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=406
# Date: 2021-08-14 17:38:54
# Run time: 0.010
# Verdict: AC
from sys import stdin
limit = 2 ** 31 - 1
for line in stdin:
a, action, b = line.strip().split()
print(a, action, b)
a, b = int(a), int(b)
if a > limit:
print('first number too big')
if b > limit:
print('second number too big')
if action == '*' and a == 0 or b == 0:
continue
if (a > limit or b > limit):
print('result too big')
else:
res = a + b if action == '+' else a * b
if res > limit:
print('result too big')
| [
7061,
6,
22033,
64,
49669,
532,
3827,
11125,
705,
7061,
198,
2,
3740,
1378,
25119,
10456,
469,
13,
2398,
14,
9630,
13,
10121,
30,
18076,
28,
785,
62,
25119,
10456,
469,
5,
7449,
312,
28,
23,
5,
7700,
28,
12860,
62,
45573,
5,
45573,
28,
29703,
198,
2,
7536,
25,
33448,
12,
2919,
12,
1415,
1596,
25,
2548,
25,
4051,
198,
2,
5660,
640,
25,
657,
13,
20943,
198,
2,
4643,
11600,
25,
7125,
198,
198,
6738,
25064,
1330,
14367,
259,
198,
198,
32374,
796,
362,
12429,
3261,
532,
352,
198,
198,
1640,
1627,
287,
14367,
259,
25,
198,
220,
220,
220,
257,
11,
2223,
11,
275,
796,
1627,
13,
36311,
22446,
35312,
3419,
198,
220,
220,
220,
3601,
7,
64,
11,
2223,
11,
275,
8,
628,
220,
220,
220,
257,
11,
275,
796,
493,
7,
64,
828,
493,
7,
65,
8,
628,
198,
220,
220,
220,
611,
257,
1875,
4179,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
11085,
1271,
1165,
1263,
11537,
198,
220,
220,
220,
611,
275,
1875,
4179,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
12227,
1271,
1165,
1263,
11537,
628,
220,
220,
220,
611,
2223,
6624,
705,
9,
6,
290,
257,
6624,
657,
393,
275,
6624,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2555,
628,
220,
220,
220,
611,
357,
64,
1875,
4179,
393,
275,
1875,
4179,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
20274,
1165,
1263,
11537,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
581,
796,
257,
1343,
275,
611,
2223,
6624,
705,
10,
6,
2073,
257,
1635,
275,
198,
220,
220,
220,
220,
220,
220,
220,
611,
581,
1875,
4179,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
20274,
1165,
1263,
11537,
198
] | 2.272727 | 308 |
from unittest import mock
import pytest
from cms.api import create_page, create_title
from cms.toolbar.items import ModalItem, SubMenu
from tests.resources.cmsapp.models import ExtensionModel
@mock.patch('cms_helpers.cms_toolbars.TitleExtensionToolbar.get_item_position')
@pytest.mark.django_db
| [
6738,
555,
715,
395,
1330,
15290,
198,
198,
11748,
12972,
9288,
198,
6738,
269,
907,
13,
15042,
1330,
2251,
62,
7700,
11,
2251,
62,
7839,
198,
6738,
269,
907,
13,
25981,
5657,
13,
23814,
1330,
3401,
282,
7449,
11,
3834,
23381,
198,
198,
6738,
5254,
13,
37540,
13,
46406,
1324,
13,
27530,
1330,
27995,
17633,
628,
198,
198,
31,
76,
735,
13,
17147,
10786,
46406,
62,
16794,
364,
13,
46406,
62,
25981,
34046,
13,
19160,
11627,
3004,
25391,
5657,
13,
1136,
62,
9186,
62,
9150,
11537,
628,
198,
31,
9078,
9288,
13,
4102,
13,
28241,
14208,
62,
9945,
198
] | 3.050505 | 99 |
import json
import numpy as np
import itertools
from tabulate import tabulate
import math
import matplotlib.pyplot as plt
#import pandas as pd
import cv2
import sys
sys.path.append("../../../libs")
from box_utils import generate_anchors
from configs import cfgs
if __name__ == "__main__":
dataset = 'train/train.json'
input_imgsize = 512
# calculate_instance_histogram(dataset)
# ratio, size = calculate_horizontal_boxes_histogram(dataset, input_imgsize)
# h_ious, r_ious = calculate_iou_histogram(dataset)
calculate_positive_horizontal_anchors(input_imgsize = 512) | [
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
340,
861,
10141,
198,
6738,
7400,
5039,
1330,
7400,
5039,
198,
11748,
10688,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
2,
11748,
19798,
292,
355,
279,
67,
198,
11748,
269,
85,
17,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7203,
40720,
40720,
40720,
8019,
82,
4943,
198,
6738,
3091,
62,
26791,
1330,
7716,
62,
3702,
669,
198,
6738,
4566,
82,
1330,
30218,
14542,
628,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
27039,
796,
705,
27432,
14,
27432,
13,
17752,
6,
198,
220,
220,
220,
5128,
62,
9600,
7857,
796,
22243,
198,
2,
220,
220,
220,
15284,
62,
39098,
62,
10034,
21857,
7,
19608,
292,
316,
8,
198,
2,
220,
220,
220,
8064,
11,
2546,
796,
15284,
62,
17899,
38342,
62,
29305,
62,
10034,
21857,
7,
19608,
292,
316,
11,
5128,
62,
9600,
7857,
8,
198,
2,
220,
220,
220,
289,
62,
699,
11,
374,
62,
699,
796,
15284,
62,
72,
280,
62,
10034,
21857,
7,
19608,
292,
316,
8,
198,
220,
220,
220,
15284,
62,
24561,
62,
17899,
38342,
62,
3702,
669,
7,
15414,
62,
9600,
7857,
796,
22243,
8
] | 2.777778 | 216 |
import numpy as np
import numpy.linalg as npla
from pylgmath import se3op, Transformation
TEST_SIZE = 10000
| [
11748,
299,
32152,
355,
45941,
198,
11748,
299,
32152,
13,
75,
1292,
70,
355,
299,
489,
64,
198,
198,
6738,
279,
2645,
70,
11018,
1330,
384,
18,
404,
11,
49127,
198,
198,
51,
6465,
62,
33489,
796,
33028,
628,
628
] | 2.825 | 40 |
#!/usr/bin/python3
""" State Module for HBNB project """
from models.base_model import BaseModel, Base
from models import storage_type
from sqlalchemy import Column, String
class Amenity(BaseModel, Base):
'''amenity class'''
__tablename__ = 'amenities'
if storage_type == 'db':
name = Column(String(128), nullable=False)
else:
name = ""
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
37811,
1812,
19937,
329,
367,
15766,
33,
1628,
37227,
198,
6738,
4981,
13,
8692,
62,
19849,
1330,
7308,
17633,
11,
7308,
198,
6738,
4981,
1330,
6143,
62,
4906,
198,
6738,
44161,
282,
26599,
1330,
29201,
11,
10903,
628,
198,
4871,
34717,
414,
7,
14881,
17633,
11,
7308,
2599,
198,
220,
220,
220,
705,
7061,
41763,
414,
1398,
7061,
6,
198,
220,
220,
220,
11593,
8658,
11925,
480,
834,
796,
705,
41763,
871,
6,
198,
220,
220,
220,
611,
6143,
62,
4906,
6624,
705,
9945,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
796,
29201,
7,
10100,
7,
12762,
828,
9242,
540,
28,
25101,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
796,
13538,
198
] | 2.789474 | 133 |
from statuspage import __version__
from setuptools import setup, find_packages
setup(
name='statuspage',
version=__version__,
description='Python library for Statuspage.io APIs',
author='Kunal Lillaney',
author_email='[email protected]',
url='https://github.io/kunallillaney/statuspage-py',
license='Apache2.0',
packages=find_packages(exclude=('tests')),
setup_requires=[
],
install_requires=[
'requests'
],
)
| [
6738,
3722,
7700,
1330,
11593,
9641,
834,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
13376,
7700,
3256,
198,
220,
220,
220,
2196,
28,
834,
9641,
834,
11,
198,
220,
220,
220,
6764,
11639,
37906,
5888,
329,
12678,
7700,
13,
952,
23113,
3256,
198,
220,
220,
220,
1772,
11639,
42,
18835,
406,
359,
22297,
3256,
198,
220,
220,
220,
1772,
62,
12888,
11639,
75,
359,
22297,
31,
73,
13415,
13,
15532,
3256,
198,
220,
220,
220,
19016,
11639,
5450,
1378,
12567,
13,
952,
14,
28374,
439,
359,
22297,
14,
13376,
7700,
12,
9078,
3256,
198,
220,
220,
220,
5964,
11639,
25189,
4891,
17,
13,
15,
3256,
198,
220,
220,
220,
10392,
28,
19796,
62,
43789,
7,
1069,
9152,
28,
10786,
41989,
11537,
828,
198,
220,
220,
220,
9058,
62,
47911,
41888,
198,
220,
220,
220,
16589,
198,
220,
220,
220,
2721,
62,
47911,
41888,
198,
220,
220,
220,
220,
220,
705,
8897,
3558,
6,
198,
220,
220,
220,
16589,
198,
8,
198
] | 2.651429 | 175 |
# -*- coding: utf-8 -*-
import os
import sys
import unittest2
import ubivar
from mock import patch
from ubivar.test.helper import (UbivarTestCase, NOW)
if __name__ == '__main__':
unittest2.main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
555,
715,
395,
17,
198,
11748,
20967,
452,
283,
198,
198,
6738,
15290,
1330,
8529,
198,
6738,
20967,
452,
283,
13,
9288,
13,
2978,
525,
1330,
357,
36609,
452,
283,
14402,
20448,
11,
20229,
8,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
17,
13,
12417,
3419,
198
] | 2.530864 | 81 |
# Generated by Django 2.2.11 on 2020-09-16 09:18
import django.core.validators
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1157,
319,
12131,
12,
2931,
12,
1433,
7769,
25,
1507,
198,
198,
11748,
42625,
14208,
13,
7295,
13,
12102,
2024,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.97561 | 41 |
from django.contrib import auth
from django.contrib.auth.middleware import get_user
from django.utils.functional import SimpleLazyObject
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
6284,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27171,
1574,
1330,
651,
62,
7220,
198,
6738,
42625,
14208,
13,
26791,
13,
45124,
1330,
17427,
43,
12582,
10267,
628
] | 3.631579 | 38 |
import pygame
from data.constants import *
from data.core import animation_asset_loader
# check for any collisions
| [
11748,
12972,
6057,
201,
198,
6738,
1366,
13,
9979,
1187,
1330,
1635,
201,
198,
6738,
1366,
13,
7295,
1330,
11034,
62,
562,
316,
62,
29356,
201,
198,
201,
198,
220,
220,
220,
1303,
2198,
329,
597,
31998,
201
] | 3.263158 | 38 |
import tensorflow as tf
from tensorflow.keras import backend as K
@tf.autograph.experimental.do_not_convert
| [
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
30203,
355,
509,
628,
198,
31,
27110,
13,
2306,
2384,
13,
23100,
9134,
13,
4598,
62,
1662,
62,
1102,
1851,
628,
220,
220,
220,
220
] | 2.875 | 40 |
""" dynamic_watershed/__init__.py """
# __all__ = []
from .dynamic_watershed import post_process
from .version import __version__
| [
37811,
8925,
62,
41555,
704,
14,
834,
15003,
834,
13,
9078,
37227,
198,
198,
2,
11593,
439,
834,
796,
17635,
198,
198,
6738,
764,
67,
28995,
62,
41555,
704,
1330,
1281,
62,
14681,
198,
198,
6738,
764,
9641,
1330,
11593,
9641,
834,
198
] | 3.093023 | 43 |
# pylint: disable=missing-docstring
from contextlib import asynccontextmanager
@asynccontextmanager
async with context_manager(42) as ans:
assert ans == 42
| [
2,
279,
2645,
600,
25,
15560,
28,
45688,
12,
15390,
8841,
198,
198,
6738,
4732,
8019,
1330,
355,
2047,
535,
261,
5239,
37153,
628,
198,
31,
292,
2047,
535,
261,
5239,
37153,
628,
198,
292,
13361,
351,
4732,
62,
37153,
7,
3682,
8,
355,
9093,
25,
198,
220,
220,
220,
6818,
9093,
6624,
5433,
198
] | 3 | 55 |
# -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import csv
from scrapy import signals
from scrapy.exporters import CsvItemExporter
import inspect
from rt.items import *
from rt.mssqlpipeline import MsSqlPipeline
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
2896,
500,
534,
2378,
31108,
994,
198,
2,
198,
2,
2094,
470,
6044,
284,
751,
534,
11523,
284,
262,
7283,
3620,
62,
47,
4061,
3698,
1268,
1546,
4634,
198,
2,
4091,
25,
2638,
1378,
15390,
13,
1416,
2416,
88,
13,
2398,
14,
268,
14,
42861,
14,
4852,
873,
14,
9186,
12,
79,
541,
4470,
13,
6494,
198,
11748,
269,
21370,
198,
6738,
15881,
88,
1330,
10425,
198,
6738,
15881,
88,
13,
1069,
1819,
1010,
1330,
327,
21370,
7449,
3109,
26634,
198,
11748,
10104,
198,
6738,
374,
83,
13,
23814,
1330,
1635,
198,
6738,
374,
83,
13,
76,
824,
13976,
79,
541,
4470,
1330,
6997,
50,
13976,
47,
541,
4470,
198
] | 2.825397 | 126 |
"""This module tests the board module."""
import pytest
from tictactoe.player import Player
from tictactoe.row import Row
from tictactoe.board import Board, cell_indices
| [
37811,
1212,
8265,
5254,
262,
3096,
8265,
526,
15931,
198,
11748,
12972,
9288,
198,
6738,
256,
713,
529,
2577,
13,
7829,
1330,
7853,
198,
6738,
256,
713,
529,
2577,
13,
808,
1330,
11314,
198,
6738,
256,
713,
529,
2577,
13,
3526,
1330,
5926,
11,
2685,
62,
521,
1063,
198
] | 3.469388 | 49 |
from django.conf import settings
from oscar.apps.order.abstract_models import AbstractOrder
from oscar.apps.order.models import *
| [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
267,
13034,
13,
18211,
13,
2875,
13,
397,
8709,
62,
27530,
1330,
27741,
18743,
628,
198,
198,
6738,
267,
13034,
13,
18211,
13,
2875,
13,
27530,
1330,
1635,
198
] | 3.435897 | 39 |
import requests
import urllib
import uuid
import importlib_metadata
import json
import base64
import logging
from collections import namedtuple, defaultdict, ChainMap
from typing import List
__all__ = [
'KafkaRestClient', 'KafkaRestClientException',
'TopicPartition', 'KafkaMessage'
]
log = logging.getLogger(name="kafka-rest-client")
__version__ = importlib_metadata.version('kafka-rest-client')
USER_AGENT = f"kafka-rest-client/{__version__}"
TopicPartition = namedtuple('TopicPartition', "topic, partition")
KafkaMessage = namedtuple("KafkaMessage",
["topic", "partition", "offset", "key", "value"])
class KafkaRestClient:
"""a client for kafka-rest proxy
"""
def __init__(self, *topics: str,
server: str = "http://localhost:8082",
group_id: str = "",
fetch_max_bytes: int = 52428800,
fetch_max_wait_ms: int = 500,
auto_offset_reset: str = "latest",
enable_auto_commit: bool = True,
max_poll_interval_ms: int = 300000,
format: str = "binary",
stop_at_end = False):
"""
"""
self._server = server
self._group_id = group_id or f"kafka-rest-client-{uuid.uuid4()}"
self._fetch_max_bytes = fetch_max_bytes
self._fetch_max_wait_ms = fetch_max_wait_ms
valid_reset = ("earliest", "latest")
if auto_offset_reset not in valid_reset:
raise ValueError(f"auto_offset_reset not in "
f"{valid_reset}, got {auto_offset_reset}")
valid_format = ("json", "avro", "binary")
if format not in valid_format:
raise ValueError(f"format not in "
f"{valid_format}, got {format}")
self._format = format
if self._format == "binary":
self._decode = lambda x: (base64.b64decode(x)
if x is not None
else None)
else:
self._decode = lambda x: x
self._auto_offset_reset = auto_offset_reset
if enable_auto_commit:
raise RuntimeError("autocommit is not implemented yet")
self._enable_auto_commit = enable_auto_commit
self._max_poll_interval_ms = max_poll_interval_ms
self._content_type = f"application/vnd.kafka.v2+json"
self._accept = (f"application/vnd.kafka.{self._format}.v2+json,"
f" {self._content_type}")
if topics:
self.subscribe(topics=topics)
self._observed_offsets = {}
self._returned_offsets = {}
self._stop_at_end = stop_at_end
self._seek_offsets = {}
self._current_offsets = ChainMap(self._observed_offsets, self._seek_offsets)
_consumer = None
@property
| [
11748,
7007,
198,
11748,
2956,
297,
571,
198,
11748,
334,
27112,
198,
11748,
1330,
8019,
62,
38993,
198,
11748,
33918,
198,
11748,
2779,
2414,
198,
11748,
18931,
198,
198,
6738,
17268,
1330,
3706,
83,
29291,
11,
4277,
11600,
11,
21853,
13912,
198,
6738,
19720,
1330,
7343,
198,
198,
834,
439,
834,
796,
685,
198,
220,
220,
220,
705,
42,
1878,
4914,
19452,
11792,
3256,
705,
42,
1878,
4914,
19452,
11792,
16922,
3256,
198,
220,
220,
220,
705,
33221,
7841,
653,
3256,
705,
42,
1878,
4914,
12837,
6,
198,
60,
198,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
7,
3672,
2625,
74,
1878,
4914,
12,
2118,
12,
16366,
4943,
198,
198,
834,
9641,
834,
796,
1330,
8019,
62,
38993,
13,
9641,
10786,
74,
1878,
4914,
12,
2118,
12,
16366,
11537,
198,
29904,
62,
4760,
3525,
796,
277,
1,
74,
1878,
4914,
12,
2118,
12,
16366,
14,
90,
834,
9641,
834,
36786,
628,
198,
33221,
7841,
653,
796,
3706,
83,
29291,
10786,
33221,
7841,
653,
3256,
366,
26652,
11,
18398,
4943,
198,
198,
42,
1878,
4914,
12837,
796,
3706,
83,
29291,
7203,
42,
1878,
4914,
12837,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14631,
26652,
1600,
366,
3911,
653,
1600,
366,
28968,
1600,
366,
2539,
1600,
366,
8367,
8973,
8,
628,
198,
4871,
46906,
19452,
11792,
25,
198,
220,
220,
220,
37227,
64,
5456,
329,
479,
1878,
4914,
12,
2118,
15741,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
1635,
4852,
873,
25,
965,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4382,
25,
965,
796,
366,
4023,
1378,
36750,
25,
1795,
6469,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1448,
62,
312,
25,
965,
796,
366,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21207,
62,
9806,
62,
33661,
25,
493,
796,
642,
1731,
2078,
7410,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21207,
62,
9806,
62,
17077,
62,
907,
25,
493,
796,
5323,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8295,
62,
28968,
62,
42503,
25,
965,
796,
366,
42861,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7139,
62,
23736,
62,
41509,
25,
20512,
796,
6407,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3509,
62,
30393,
62,
3849,
2100,
62,
907,
25,
493,
796,
5867,
830,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5794,
25,
965,
796,
366,
39491,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2245,
62,
265,
62,
437,
796,
10352,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
15388,
796,
4382,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
8094,
62,
312,
796,
1448,
62,
312,
393,
277,
1,
74,
1878,
4914,
12,
2118,
12,
16366,
12,
90,
12303,
312,
13,
12303,
312,
19,
3419,
36786,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
69,
7569,
62,
9806,
62,
33661,
796,
21207,
62,
9806,
62,
33661,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
69,
7569,
62,
9806,
62,
17077,
62,
907,
796,
21207,
62,
9806,
62,
17077,
62,
907,
198,
220,
220,
220,
220,
220,
220,
220,
4938,
62,
42503,
796,
5855,
451,
11318,
1600,
366,
42861,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
611,
8295,
62,
28968,
62,
42503,
407,
287,
4938,
62,
42503,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
1,
23736,
62,
28968,
62,
42503,
407,
287,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
90,
12102,
62,
42503,
5512,
1392,
1391,
23736,
62,
28968,
62,
42503,
92,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
4938,
62,
18982,
796,
5855,
17752,
1600,
366,
615,
305,
1600,
366,
39491,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
611,
5794,
407,
287,
4938,
62,
18982,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
1,
18982,
407,
287,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
90,
12102,
62,
18982,
5512,
1392,
1391,
18982,
92,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
18982,
796,
5794,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13557,
18982,
6624,
366,
39491,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
12501,
1098,
796,
37456,
2124,
25,
357,
8692,
2414,
13,
65,
2414,
12501,
1098,
7,
87,
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,
611,
2124,
318,
407,
6045,
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,
2073,
6045,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
12501,
1098,
796,
37456,
2124,
25,
2124,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
23736,
62,
28968,
62,
42503,
796,
8295,
62,
28968,
62,
42503,
198,
220,
220,
220,
220,
220,
220,
220,
611,
7139,
62,
23736,
62,
41509,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
43160,
12331,
7203,
2306,
420,
2002,
270,
318,
407,
9177,
1865,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
21633,
62,
23736,
62,
41509,
796,
7139,
62,
23736,
62,
41509,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
9806,
62,
30393,
62,
3849,
2100,
62,
907,
796,
3509,
62,
30393,
62,
3849,
2100,
62,
907,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
11299,
62,
4906,
796,
277,
1,
31438,
14,
85,
358,
13,
74,
1878,
4914,
13,
85,
17,
10,
17752,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
13635,
796,
357,
69,
1,
31438,
14,
85,
358,
13,
74,
1878,
4914,
13,
90,
944,
13557,
18982,
27422,
85,
17,
10,
17752,
553,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
1391,
944,
13557,
11299,
62,
4906,
92,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
611,
10233,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7266,
12522,
7,
4852,
873,
28,
4852,
873,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
672,
45852,
62,
8210,
1039,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
7783,
276,
62,
8210,
1039,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
11338,
62,
265,
62,
437,
796,
2245,
62,
265,
62,
437,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
36163,
62,
8210,
1039,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
14421,
62,
8210,
1039,
796,
21853,
13912,
7,
944,
13557,
672,
45852,
62,
8210,
1039,
11,
2116,
13557,
36163,
62,
8210,
1039,
8,
628,
220,
220,
220,
4808,
49827,
796,
6045,
628,
220,
220,
220,
2488,
26745,
198
] | 2.086107 | 1,382 |
from django.test import TestCase
from authentication.models import User
from social.models import Posts, Followers, Board
from rest_framework import status
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
18239,
13,
27530,
1330,
11787,
198,
6738,
1919,
13,
27530,
1330,
12043,
11,
7281,
364,
11,
5926,
198,
6738,
1334,
62,
30604,
1330,
3722,
198
] | 4.457143 | 35 |
#
# Copyright (c) 2016, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL XEROX OR PARC BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
################################################################################
#
# PATENT NOTICE
#
# This software is distributed under the BSD 2-clause License (see LICENSE
# file). This BSD License does not make any patent claims and as such, does
# not act as a patent grant. The purpose of this section is for each contributor
# to define their intentions with respect to intellectual property.
#
# Each contributor to this source code is encouraged to state their patent
# claims and licensing mechanisms for any contributions made. At the end of
# this section contributors may each make their own statements. Contributor's
# claims and grants only apply to the pieces (source code, programs, text,
# media, etc) that they have contributed directly to this software.
#
# There is no guarantee that this section is complete, up to date or accurate. It
# is up to the contributors to maintain their portion of this section and up to
# the user of the software to verify any claims herein.
#
# Do not remove this header notification. The contents of this section must be
# present in all distributions of the software. You may only modify your own
# intellectual property statements. Please provide contact information.
#
# - Palo Alto Research Center, Inc
# This software distribution does not grant any rights to patents owned by Palo
# Alto Research Center, Inc (PARC). Rights to these patents are available via
# various mechanisms. As of January 2016 PARC has committed to FRAND licensing any
# intellectual property used by its contributions to this software. You may
# contact PARC at [email protected] for more information or visit http://www.ccnx.org
# Called to generate a delay value
import abc
import random
class ExponentialDelay(Delay):
"""
Generates a delay from an exponential distribution with the specified mean (1/lambda):
TODO: Should generate its own seed and keep its own RNG stream
"""
def __init__(self, min_delay, mean):
"""
:param min_delay: Added to the exponential sample
:param mean: the mean exponential delay (1 / lambda)
"""
super(ExponentialDelay, self).__init__()
if mean <= 0.0: raise ValueError("Mean must be positive, got {}".format(mean))
self._beta = mean
self._min = min_delay
class UniformDelay(Delay):
"""
TODO: Should generate its own seed and keep its own RNG stream
"""
Delay.register(ExponentialDelay)
Delay.register(UniformDelay)
| [
2,
198,
2,
15069,
357,
66,
8,
1584,
11,
44264,
1140,
10501,
357,
55,
263,
1140,
8,
290,
44878,
34317,
4992,
3337,
11,
3457,
357,
47,
25793,
8,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
1231,
198,
2,
17613,
11,
389,
10431,
2810,
326,
262,
1708,
3403,
389,
1138,
25,
198,
2,
198,
2,
1635,
2297,
396,
2455,
507,
286,
2723,
2438,
1276,
12377,
262,
2029,
6634,
198,
2,
220,
220,
4003,
11,
428,
1351,
286,
3403,
290,
262,
1708,
37592,
13,
198,
2,
1635,
2297,
396,
2455,
507,
287,
13934,
1296,
1276,
22919,
262,
2029,
6634,
198,
2,
220,
220,
4003,
11,
428,
1351,
286,
3403,
290,
262,
1708,
37592,
287,
262,
198,
2,
220,
220,
10314,
290,
14,
273,
584,
5696,
2810,
351,
262,
6082,
13,
198,
2,
198,
2,
12680,
47466,
3180,
36592,
2389,
1961,
11050,
3336,
27975,
38162,
9947,
367,
15173,
4877,
5357,
27342,
9865,
3843,
20673,
366,
1921,
3180,
1,
5357,
198,
2,
15529,
7788,
32761,
6375,
8959,
49094,
34764,
11015,
11,
47783,
2751,
11,
21728,
5626,
40880,
5390,
11,
3336,
8959,
49094,
198,
2,
34764,
11015,
3963,
34482,
3398,
1565,
5603,
25382,
5357,
376,
46144,
7473,
317,
16652,
2149,
37232,
33079,
48933,
15986,
198,
2,
13954,
48778,
1961,
13,
3268,
8005,
49261,
50163,
1395,
34812,
55,
6375,
350,
25793,
9348,
43031,
19146,
7473,
15529,
198,
2,
42242,
11,
3268,
17931,
23988,
11,
19387,
25256,
1847,
11,
38846,
11,
7788,
3620,
6489,
13153,
11,
6375,
7102,
5188,
10917,
3525,
12576,
29506,
25552,
198,
2,
357,
1268,
39149,
2751,
11,
21728,
5626,
40880,
5390,
11,
41755,
11335,
10979,
3963,
28932,
2257,
2043,
37780,
21090,
50,
6375,
49254,
26,
198,
2,
406,
18420,
3963,
23210,
11,
42865,
11,
6375,
4810,
19238,
29722,
26,
6375,
43949,
44180,
23255,
49,
8577,
24131,
8,
29630,
36,
5959,
7257,
2937,
1961,
5357,
198,
2,
6177,
15529,
3336,
15513,
3963,
43031,
25382,
11,
7655,
2767,
16879,
3268,
27342,
10659,
11,
19269,
18379,
43031,
25382,
11,
6375,
309,
9863,
198,
2,
357,
1268,
39149,
2751,
399,
7156,
43,
3528,
18310,
6375,
25401,
54,
24352,
8,
5923,
1797,
2751,
3268,
15529,
34882,
16289,
3963,
3336,
23210,
3963,
12680,
198,
2,
47466,
11,
45886,
16876,
5984,
29817,
1961,
3963,
3336,
28069,
11584,
25382,
3963,
13558,
3398,
29506,
11879,
13,
198,
2,
198,
29113,
29113,
14468,
198,
2,
198,
2,
28748,
3525,
28536,
198,
2,
198,
2,
770,
3788,
318,
9387,
739,
262,
347,
10305,
362,
12,
565,
682,
13789,
357,
3826,
38559,
24290,
198,
2,
2393,
737,
220,
770,
347,
10305,
13789,
857,
407,
787,
597,
12701,
3667,
290,
355,
884,
11,
857,
198,
2,
407,
719,
355,
257,
12701,
7264,
13,
220,
383,
4007,
286,
428,
2665,
318,
329,
1123,
18920,
198,
2,
284,
8160,
511,
14953,
351,
2461,
284,
9028,
3119,
13,
198,
2,
198,
2,
5501,
18920,
284,
428,
2723,
2438,
318,
10085,
284,
1181,
511,
12701,
198,
2,
3667,
290,
15665,
11701,
329,
597,
9284,
925,
13,
1629,
262,
886,
286,
198,
2,
428,
2665,
20420,
743,
1123,
787,
511,
898,
6299,
13,
220,
25767,
273,
338,
198,
2,
3667,
290,
11455,
691,
4174,
284,
262,
5207,
357,
10459,
2438,
11,
4056,
11,
2420,
11,
198,
2,
2056,
11,
3503,
8,
326,
484,
423,
8639,
3264,
284,
428,
3788,
13,
198,
2,
198,
2,
1318,
318,
645,
9149,
326,
428,
2665,
318,
1844,
11,
510,
284,
3128,
393,
7187,
13,
632,
198,
2,
318,
510,
284,
262,
20420,
284,
5529,
511,
6903,
286,
428,
2665,
290,
510,
284,
198,
2,
262,
2836,
286,
262,
3788,
284,
11767,
597,
3667,
24028,
13,
198,
2,
198,
2,
2141,
407,
4781,
428,
13639,
14483,
13,
220,
383,
10154,
286,
428,
2665,
1276,
307,
198,
2,
1944,
287,
477,
24570,
286,
262,
3788,
13,
220,
921,
743,
691,
13096,
534,
898,
198,
2,
9028,
3119,
6299,
13,
220,
4222,
2148,
2800,
1321,
13,
198,
2,
198,
2,
532,
44878,
34317,
4992,
3337,
11,
3457,
198,
2,
770,
3788,
6082,
857,
407,
7264,
597,
2489,
284,
21216,
6898,
416,
44878,
198,
2,
34317,
4992,
3337,
11,
3457,
357,
47,
25793,
737,
6923,
284,
777,
21216,
389,
1695,
2884,
198,
2,
2972,
11701,
13,
1081,
286,
3269,
1584,
350,
25793,
468,
5364,
284,
8782,
6981,
15665,
597,
198,
2,
9028,
3119,
973,
416,
663,
9284,
284,
428,
3788,
13,
921,
743,
198,
2,
2800,
350,
25793,
379,
269,
541,
78,
31,
1845,
66,
13,
785,
329,
517,
1321,
393,
3187,
2638,
1378,
2503,
13,
535,
77,
87,
13,
2398,
198,
198,
2,
34099,
284,
7716,
257,
5711,
1988,
198,
198,
11748,
450,
66,
198,
11748,
4738,
628,
198,
198,
4871,
5518,
35470,
13856,
323,
7,
13856,
323,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2980,
689,
257,
5711,
422,
281,
39682,
6082,
351,
262,
7368,
1612,
357,
16,
14,
50033,
2599,
628,
220,
220,
220,
16926,
46,
25,
10358,
7716,
663,
898,
9403,
290,
1394,
663,
898,
371,
10503,
4269,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
949,
62,
40850,
11,
1612,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
949,
62,
40850,
25,
10687,
284,
262,
39682,
6291,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
1612,
25,
262,
1612,
39682,
5711,
357,
16,
1220,
37456,
8,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2208,
7,
16870,
35470,
13856,
323,
11,
2116,
737,
834,
15003,
834,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1612,
19841,
657,
13,
15,
25,
5298,
11052,
12331,
7203,
5308,
272,
1276,
307,
3967,
11,
1392,
23884,
1911,
18982,
7,
32604,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
31361,
796,
1612,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
1084,
796,
949,
62,
40850,
628,
198,
198,
4871,
35712,
13856,
323,
7,
13856,
323,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
16926,
46,
25,
10358,
7716,
663,
898,
9403,
290,
1394,
663,
898,
371,
10503,
4269,
198,
220,
220,
220,
37227,
628,
198,
13856,
323,
13,
30238,
7,
16870,
35470,
13856,
323,
8,
198,
13856,
323,
13,
30238,
7,
3118,
6933,
13856,
323,
8,
628
] | 3.655629 | 1,057 |
from sqlalchemy import Boolean, Column, String
from app.models.base import BaseModel
| [
6738,
44161,
282,
26599,
1330,
41146,
11,
29201,
11,
10903,
198,
198,
6738,
598,
13,
27530,
13,
8692,
1330,
7308,
17633,
628
] | 3.954545 | 22 |
# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Configuración de formatos de fechas
DATETIME_INPUT_FORMATS = (
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
'%Y-%m-%d', # '2006-10-25'
'%d-%m-%Y %H:%M:%S', # '2006-10-25 14:30:59'
'%d-%m-%Y %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
'%d-%m-%Y %H:%M', # '2006-10-25 14:30'
'%Y-%m-%d', # '2006-10-25'
'%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59'
'%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200'
'%m/%d/%Y %H:%M', # '10/25/2006 14:30'
'%m/%d/%Y', # '10/25/2006'
'%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59'
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200'
'%m/%d/%y %H:%M', # '10/25/06 14:30'
'%m/%d/%y', # '10/25/06'
'%m/%d/%Y', # '10/25/2006'
'%d/%m/%Y', # '10/25/2006'
'%d/%m/%y', # '10/25/06'
)
DATE_INPUT_FORMATS = (
'%d/%m/%Y', # '10/25/2006'
'%d/%m/%y', # '10/25/06'
'%d-%m-%Y', # '10-25-2006'
'%d-%m-%y', # '10-25-06'
)
| [
198,
2,
4037,
1634,
198,
2,
3740,
1378,
31628,
13,
28241,
648,
404,
305,
752,
13,
785,
14,
268,
14,
18,
13,
15,
14,
4852,
873,
14,
72,
1507,
77,
14,
198,
198,
43,
15567,
52,
11879,
62,
34,
16820,
796,
705,
268,
12,
385,
6,
198,
34694,
62,
57,
11651,
796,
705,
17429,
6,
198,
19108,
62,
40,
1507,
45,
796,
6407,
198,
19108,
62,
43,
940,
45,
796,
6407,
198,
19108,
62,
51,
57,
796,
6407,
198,
198,
2,
17056,
333,
32009,
18840,
390,
5794,
418,
390,
730,
354,
292,
198,
198,
35,
1404,
2767,
12789,
62,
1268,
30076,
62,
21389,
33586,
796,
357,
198,
220,
220,
220,
705,
4,
56,
12,
4,
76,
12,
4,
67,
4064,
39,
25,
4,
44,
25,
4,
50,
3256,
220,
220,
220,
220,
1303,
705,
13330,
12,
940,
12,
1495,
1478,
25,
1270,
25,
3270,
6,
198,
220,
220,
220,
705,
4,
56,
12,
4,
76,
12,
4,
67,
4064,
39,
25,
4,
44,
25,
4,
50,
13,
4,
69,
3256,
220,
1303,
705,
13330,
12,
940,
12,
1495,
1478,
25,
1270,
25,
3270,
13,
830,
2167,
6,
198,
220,
220,
220,
705,
4,
56,
12,
4,
76,
12,
4,
67,
4064,
39,
25,
4,
44,
3256,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
13330,
12,
940,
12,
1495,
1478,
25,
1270,
6,
198,
220,
220,
220,
705,
4,
56,
12,
4,
76,
12,
4,
67,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
13330,
12,
940,
12,
1495,
6,
198,
220,
220,
220,
705,
4,
67,
12,
4,
76,
12,
4,
56,
4064,
39,
25,
4,
44,
25,
4,
50,
3256,
220,
220,
220,
220,
1303,
705,
13330,
12,
940,
12,
1495,
1478,
25,
1270,
25,
3270,
6,
198,
220,
220,
220,
705,
4,
67,
12,
4,
76,
12,
4,
56,
4064,
39,
25,
4,
44,
25,
4,
50,
13,
4,
69,
3256,
220,
1303,
705,
13330,
12,
940,
12,
1495,
1478,
25,
1270,
25,
3270,
13,
830,
2167,
6,
198,
220,
220,
220,
705,
4,
67,
12,
4,
76,
12,
4,
56,
4064,
39,
25,
4,
44,
3256,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
13330,
12,
940,
12,
1495,
1478,
25,
1270,
6,
198,
220,
220,
220,
705,
4,
56,
12,
4,
76,
12,
4,
67,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
13330,
12,
940,
12,
1495,
6,
198,
220,
220,
220,
705,
4,
76,
14,
4,
67,
14,
4,
56,
4064,
39,
25,
4,
44,
25,
4,
50,
3256,
220,
220,
220,
220,
1303,
705,
940,
14,
1495,
14,
13330,
1478,
25,
1270,
25,
3270,
6,
198,
220,
220,
220,
705,
4,
76,
14,
4,
67,
14,
4,
56,
4064,
39,
25,
4,
44,
25,
4,
50,
13,
4,
69,
3256,
220,
1303,
705,
940,
14,
1495,
14,
13330,
1478,
25,
1270,
25,
3270,
13,
830,
2167,
6,
198,
220,
220,
220,
705,
4,
76,
14,
4,
67,
14,
4,
56,
4064,
39,
25,
4,
44,
3256,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
940,
14,
1495,
14,
13330,
1478,
25,
1270,
6,
198,
220,
220,
220,
705,
4,
76,
14,
4,
67,
14,
4,
56,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
940,
14,
1495,
14,
13330,
6,
198,
220,
220,
220,
705,
4,
76,
14,
4,
67,
14,
4,
88,
4064,
39,
25,
4,
44,
25,
4,
50,
3256,
220,
220,
220,
220,
1303,
705,
940,
14,
1495,
14,
3312,
1478,
25,
1270,
25,
3270,
6,
198,
220,
220,
220,
705,
4,
76,
14,
4,
67,
14,
4,
88,
4064,
39,
25,
4,
44,
25,
4,
50,
13,
4,
69,
3256,
220,
1303,
705,
940,
14,
1495,
14,
3312,
1478,
25,
1270,
25,
3270,
13,
830,
2167,
6,
198,
220,
220,
220,
705,
4,
76,
14,
4,
67,
14,
4,
88,
4064,
39,
25,
4,
44,
3256,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
940,
14,
1495,
14,
3312,
1478,
25,
1270,
6,
198,
220,
220,
220,
705,
4,
76,
14,
4,
67,
14,
4,
88,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
940,
14,
1495,
14,
3312,
6,
198,
220,
220,
220,
705,
4,
76,
14,
4,
67,
14,
4,
56,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
940,
14,
1495,
14,
13330,
6,
198,
220,
220,
220,
705,
4,
67,
14,
4,
76,
14,
4,
56,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
940,
14,
1495,
14,
13330,
6,
198,
220,
220,
220,
705,
4,
67,
14,
4,
76,
14,
4,
88,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
940,
14,
1495,
14,
3312,
6,
198,
8,
198,
198,
35,
6158,
62,
1268,
30076,
62,
21389,
33586,
796,
357,
198,
220,
220,
220,
705,
4,
67,
14,
4,
76,
14,
4,
56,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
940,
14,
1495,
14,
13330,
6,
198,
220,
220,
220,
705,
4,
67,
14,
4,
76,
14,
4,
88,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
940,
14,
1495,
14,
3312,
6,
198,
220,
220,
220,
705,
4,
67,
12,
4,
76,
12,
4,
56,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
940,
12,
1495,
12,
13330,
6,
198,
220,
220,
220,
705,
4,
67,
12,
4,
76,
12,
4,
88,
3256,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
705,
940,
12,
1495,
12,
3312,
6,
198,
8,
198
] | 1.393555 | 1,024 |
#!/usr/bin/python
from argparse import ArgumentParser
from pathlib import Path
import subprocess
from getkey import getkey
from pymdownx import keys
# from https://gist.github.com/martin-ueding/4007035
class Colorcodes(object):
"""
Provides ANSI terminal color codes which are gathered via the ``tput``
utility. That way, they are portable. If there occurs any error with
``tput``, all codes are initialized as an empty string.
The provides fields are listed below.
Control:
- bold
- reset
Colors:
- blue
- green
- orange
- red
:license: MIT
"""
_c = Colorcodes()
outfs = {}
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print("Exiting safely")
for _, f in outfs.items():
f.close()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
6738,
1822,
29572,
1330,
45751,
46677,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
850,
14681,
198,
6738,
651,
2539,
1330,
651,
2539,
198,
6738,
279,
4948,
2902,
87,
1330,
8251,
198,
198,
2,
422,
3740,
1378,
70,
396,
13,
12567,
13,
785,
14,
13822,
259,
12,
1739,
278,
14,
7029,
2154,
2327,
198,
4871,
5315,
40148,
7,
15252,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
47081,
3537,
11584,
12094,
3124,
12416,
543,
389,
9272,
2884,
262,
7559,
83,
1996,
15506,
198,
220,
220,
220,
10361,
13,
1320,
835,
11,
484,
389,
17726,
13,
1002,
612,
8833,
597,
4049,
351,
198,
220,
220,
220,
7559,
83,
1996,
15506,
11,
477,
12416,
389,
23224,
355,
281,
6565,
4731,
13,
198,
220,
220,
220,
383,
3769,
7032,
389,
5610,
2174,
13,
198,
220,
220,
220,
6779,
25,
198,
220,
220,
220,
532,
10758,
198,
220,
220,
220,
532,
13259,
198,
220,
220,
220,
29792,
25,
198,
220,
220,
220,
532,
4171,
198,
220,
220,
220,
532,
4077,
198,
220,
220,
220,
532,
10912,
198,
220,
220,
220,
532,
2266,
198,
220,
220,
220,
1058,
43085,
25,
17168,
198,
220,
220,
220,
37227,
628,
198,
62,
66,
796,
5315,
40148,
3419,
198,
448,
9501,
796,
23884,
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,
1388,
3419,
198,
220,
220,
220,
2845,
31973,
9492,
3622,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
3109,
1780,
11512,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
329,
4808,
11,
277,
287,
503,
9501,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
13,
19836,
3419,
198
] | 2.686469 | 303 |
from __future__ import print_function, division, absolute_import
import six
from ..config import config
from . import registry
DEFAULT_SCHEME = config.get('default-scheme', 'tcp')
def parse_address(addr, strict=False):
"""
Split address into its scheme and scheme-dependent location string.
>>> parse_address('tcp://127.0.0.1')
('tcp', '127.0.0.1')
If strict is set to true the address must have a scheme.
"""
if not isinstance(addr, six.string_types):
raise TypeError("expected str, got %r" % addr.__class__.__name__)
scheme, sep, loc = addr.rpartition('://')
if strict and not sep:
msg = ("Invalid url scheme. "
"Must include protocol like tcp://localhost:8000. "
"Got %s" % addr)
raise ValueError(msg)
if not sep:
scheme = DEFAULT_SCHEME
return scheme, loc
def unparse_address(scheme, loc):
"""
Undo parse_address().
>>> unparse_address('tcp', '127.0.0.1')
'tcp://127.0.0.1'
"""
return '%s://%s' % (scheme, loc)
def normalize_address(addr):
"""
Canonicalize address, adding a default scheme if necessary.
>>> normalize_address('tls://[::1]')
'tls://[::1]'
>>> normalize_address('[::1]')
'tcp://[::1]'
"""
return unparse_address(*parse_address(addr))
def parse_host_port(address, default_port=None):
"""
Parse an endpoint address given in the form "host:port".
"""
if isinstance(address, tuple):
return address
if address.startswith('['):
# IPv6 notation: '[addr]:port' or '[addr]'.
# The address may contain multiple colons.
host, sep, tail = address[1:].partition(']')
if not sep:
_fail()
if not tail:
port = _default()
else:
if not tail.startswith(':'):
_fail()
port = tail[1:]
else:
# Generic notation: 'addr:port' or 'addr'.
host, sep, port = address.partition(':')
if not sep:
port = _default()
elif ':' in host:
_fail()
return host, int(port)
def unparse_host_port(host, port=None):
"""
Undo parse_host_port().
"""
if ':' in host and not host.startswith('['):
host = '[%s]' % host
if port:
return '%s:%s' % (host, port)
else:
return host
def get_address_host_port(addr, strict=False):
"""
Get a (host, port) tuple out of the given address.
For definition of strict check parse_address
ValueError is raised if the address scheme doesn't allow extracting
the requested information.
>>> get_address_host_port('tcp://1.2.3.4:80')
('1.2.3.4', 80)
"""
scheme, loc = parse_address(addr, strict=strict)
backend = registry.get_backend(scheme)
try:
return backend.get_address_host_port(loc)
except NotImplementedError:
raise ValueError("don't know how to extract host and port "
"for address %r" % (addr,))
def get_address_host(addr):
"""
Return a hostname / IP address identifying the machine this address
is located on.
In contrast to get_address_host_port(), this function should always
succeed for well-formed addresses.
>>> get_address_host('tcp://1.2.3.4:80')
'1.2.3.4'
"""
scheme, loc = parse_address(addr)
backend = registry.get_backend(scheme)
return backend.get_address_host(loc)
def get_local_address_for(addr):
"""
Get a local listening address suitable for reaching *addr*.
For instance, trying to reach an external TCP address will return
a local TCP address that's routable to that external address.
>>> get_local_address_for('tcp://8.8.8.8:1234')
'tcp://192.168.1.68'
>>> get_local_address_for('tcp://127.0.0.1:1234')
'tcp://127.0.0.1'
"""
scheme, loc = parse_address(addr)
backend = registry.get_backend(scheme)
return unparse_address(scheme, backend.get_local_address_for(loc))
def resolve_address(addr):
"""
Apply scheme-specific address resolution to *addr*, replacing
all symbolic references with concrete location specifiers.
In practice, this can mean hostnames are resolved to IP addresses.
>>> resolve_address('tcp://localhost:8786')
'tcp://127.0.0.1:8786'
"""
scheme, loc = parse_address(addr)
backend = registry.get_backend(scheme)
return unparse_address(scheme, backend.resolve_address(loc))
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
7297,
11,
4112,
62,
11748,
198,
198,
11748,
2237,
198,
198,
6738,
11485,
11250,
1330,
4566,
198,
6738,
764,
1330,
20478,
628,
198,
7206,
38865,
62,
50,
3398,
3620,
36,
796,
4566,
13,
1136,
10786,
12286,
12,
15952,
1326,
3256,
705,
83,
13155,
11537,
628,
198,
4299,
21136,
62,
21975,
7,
29851,
11,
7646,
28,
25101,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
27758,
2209,
656,
663,
7791,
290,
7791,
12,
21186,
4067,
4731,
13,
628,
220,
220,
220,
13163,
21136,
62,
21975,
10786,
83,
13155,
1378,
16799,
13,
15,
13,
15,
13,
16,
11537,
198,
220,
220,
220,
19203,
83,
13155,
3256,
705,
16799,
13,
15,
13,
15,
13,
16,
11537,
628,
220,
220,
220,
1002,
7646,
318,
900,
284,
2081,
262,
2209,
1276,
423,
257,
7791,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
407,
318,
39098,
7,
29851,
11,
2237,
13,
8841,
62,
19199,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
7203,
40319,
965,
11,
1392,
4064,
81,
1,
4064,
37817,
13,
834,
4871,
834,
13,
834,
3672,
834,
8,
198,
220,
220,
220,
7791,
11,
41767,
11,
1179,
796,
37817,
13,
81,
3911,
653,
10786,
1378,
11537,
198,
220,
220,
220,
611,
7646,
290,
407,
41767,
25,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
796,
5855,
44651,
19016,
7791,
13,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
34320,
2291,
8435,
588,
48265,
1378,
36750,
25,
33942,
13,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
30074,
4064,
82,
1,
4064,
37817,
8,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
19662,
8,
198,
220,
220,
220,
611,
407,
41767,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7791,
796,
5550,
38865,
62,
50,
3398,
3620,
36,
198,
220,
220,
220,
1441,
7791,
11,
1179,
628,
198,
4299,
555,
29572,
62,
21975,
7,
15952,
1326,
11,
1179,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
13794,
78,
21136,
62,
21975,
22446,
628,
220,
220,
220,
13163,
555,
29572,
62,
21975,
10786,
83,
13155,
3256,
705,
16799,
13,
15,
13,
15,
13,
16,
11537,
198,
220,
220,
220,
705,
83,
13155,
1378,
16799,
13,
15,
13,
15,
13,
16,
6,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
705,
4,
82,
1378,
4,
82,
6,
4064,
357,
15952,
1326,
11,
1179,
8,
628,
198,
4299,
3487,
1096,
62,
21975,
7,
29851,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
19507,
605,
1096,
2209,
11,
4375,
257,
4277,
7791,
611,
3306,
13,
628,
220,
220,
220,
13163,
3487,
1096,
62,
21975,
10786,
83,
7278,
1378,
58,
3712,
16,
60,
11537,
198,
220,
220,
220,
705,
83,
7278,
1378,
58,
3712,
16,
49946,
198,
220,
220,
220,
13163,
3487,
1096,
62,
21975,
10786,
58,
3712,
16,
60,
11537,
198,
220,
220,
220,
705,
83,
13155,
1378,
58,
3712,
16,
49946,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
555,
29572,
62,
21975,
46491,
29572,
62,
21975,
7,
29851,
4008,
628,
198,
4299,
21136,
62,
4774,
62,
634,
7,
21975,
11,
4277,
62,
634,
28,
14202,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2547,
325,
281,
36123,
2209,
1813,
287,
262,
1296,
366,
4774,
25,
634,
1911,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
318,
39098,
7,
21975,
11,
46545,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2209,
628,
220,
220,
220,
611,
2209,
13,
9688,
2032,
342,
10786,
17816,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
25961,
21,
33274,
25,
44438,
29851,
5974,
634,
6,
393,
44438,
29851,
60,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
383,
2209,
743,
3994,
3294,
951,
684,
13,
198,
220,
220,
220,
220,
220,
220,
220,
2583,
11,
41767,
11,
7894,
796,
2209,
58,
16,
25,
4083,
3911,
653,
10786,
60,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
41767,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
32165,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
7894,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2493,
796,
4808,
12286,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
7894,
13,
9688,
2032,
342,
7,
10354,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
32165,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2493,
796,
7894,
58,
16,
47715,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
42044,
33274,
25,
705,
29851,
25,
634,
6,
393,
705,
29851,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
2583,
11,
41767,
11,
2493,
796,
2209,
13,
3911,
653,
7,
10354,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
41767,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2493,
796,
4808,
12286,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
705,
32105,
287,
2583,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
32165,
3419,
628,
220,
220,
220,
1441,
2583,
11,
493,
7,
634,
8,
628,
198,
4299,
555,
29572,
62,
4774,
62,
634,
7,
4774,
11,
2493,
28,
14202,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
13794,
78,
21136,
62,
4774,
62,
634,
22446,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
705,
32105,
287,
2583,
290,
407,
2583,
13,
9688,
2032,
342,
10786,
17816,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
2583,
796,
44438,
4,
82,
49946,
4064,
2583,
198,
220,
220,
220,
611,
2493,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
705,
4,
82,
25,
4,
82,
6,
4064,
357,
4774,
11,
2493,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2583,
628,
198,
4299,
651,
62,
21975,
62,
4774,
62,
634,
7,
29851,
11,
7646,
28,
25101,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3497,
257,
357,
4774,
11,
2493,
8,
46545,
503,
286,
262,
1813,
2209,
13,
198,
220,
220,
220,
1114,
6770,
286,
7646,
2198,
21136,
62,
21975,
198,
220,
220,
220,
11052,
12331,
318,
4376,
611,
262,
2209,
7791,
1595,
470,
1249,
37895,
198,
220,
220,
220,
262,
9167,
1321,
13,
628,
220,
220,
220,
13163,
651,
62,
21975,
62,
4774,
62,
634,
10786,
83,
13155,
1378,
16,
13,
17,
13,
18,
13,
19,
25,
1795,
11537,
198,
220,
220,
220,
19203,
16,
13,
17,
13,
18,
13,
19,
3256,
4019,
8,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7791,
11,
1179,
796,
21136,
62,
21975,
7,
29851,
11,
7646,
28,
301,
2012,
8,
198,
220,
220,
220,
30203,
796,
20478,
13,
1136,
62,
1891,
437,
7,
15952,
1326,
8,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
30203,
13,
1136,
62,
21975,
62,
4774,
62,
634,
7,
17946,
8,
198,
220,
220,
220,
2845,
1892,
3546,
1154,
12061,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7203,
9099,
470,
760,
703,
284,
7925,
2583,
290,
2493,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1640,
2209,
4064,
81,
1,
4064,
357,
29851,
11,
4008,
628,
198,
4299,
651,
62,
21975,
62,
4774,
7,
29851,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8229,
257,
2583,
3672,
1220,
6101,
2209,
13720,
262,
4572,
428,
2209,
198,
220,
220,
220,
318,
5140,
319,
13,
628,
220,
220,
220,
554,
6273,
284,
651,
62,
21975,
62,
4774,
62,
634,
22784,
428,
2163,
815,
1464,
198,
220,
220,
220,
6758,
329,
880,
12,
12214,
9405,
13,
628,
220,
220,
220,
13163,
651,
62,
21975,
62,
4774,
10786,
83,
13155,
1378,
16,
13,
17,
13,
18,
13,
19,
25,
1795,
11537,
198,
220,
220,
220,
705,
16,
13,
17,
13,
18,
13,
19,
6,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7791,
11,
1179,
796,
21136,
62,
21975,
7,
29851,
8,
198,
220,
220,
220,
30203,
796,
20478,
13,
1136,
62,
1891,
437,
7,
15952,
1326,
8,
198,
220,
220,
220,
1441,
30203,
13,
1136,
62,
21975,
62,
4774,
7,
17946,
8,
628,
198,
4299,
651,
62,
12001,
62,
21975,
62,
1640,
7,
29851,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3497,
257,
1957,
8680,
2209,
11080,
329,
8978,
1635,
29851,
24620,
628,
220,
220,
220,
1114,
4554,
11,
2111,
284,
3151,
281,
7097,
23633,
2209,
481,
1441,
198,
220,
220,
220,
257,
1957,
23633,
2209,
326,
338,
3441,
540,
284,
326,
7097,
2209,
13,
628,
220,
220,
220,
13163,
651,
62,
12001,
62,
21975,
62,
1640,
10786,
83,
13155,
1378,
23,
13,
23,
13,
23,
13,
23,
25,
1065,
2682,
11537,
198,
220,
220,
220,
705,
83,
13155,
1378,
17477,
13,
14656,
13,
16,
13,
3104,
6,
198,
220,
220,
220,
13163,
651,
62,
12001,
62,
21975,
62,
1640,
10786,
83,
13155,
1378,
16799,
13,
15,
13,
15,
13,
16,
25,
1065,
2682,
11537,
198,
220,
220,
220,
705,
83,
13155,
1378,
16799,
13,
15,
13,
15,
13,
16,
6,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7791,
11,
1179,
796,
21136,
62,
21975,
7,
29851,
8,
198,
220,
220,
220,
30203,
796,
20478,
13,
1136,
62,
1891,
437,
7,
15952,
1326,
8,
198,
220,
220,
220,
1441,
555,
29572,
62,
21975,
7,
15952,
1326,
11,
30203,
13,
1136,
62,
12001,
62,
21975,
62,
1640,
7,
17946,
4008,
628,
198,
4299,
10568,
62,
21975,
7,
29851,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
27967,
7791,
12,
11423,
2209,
6323,
284,
1635,
29851,
25666,
13586,
198,
220,
220,
220,
477,
18975,
10288,
351,
10017,
4067,
1020,
13350,
13,
628,
220,
220,
220,
554,
3357,
11,
428,
460,
1612,
2583,
14933,
389,
12939,
284,
6101,
9405,
13,
628,
220,
220,
220,
13163,
10568,
62,
21975,
10786,
83,
13155,
1378,
36750,
25,
23,
46302,
11537,
198,
220,
220,
220,
705,
83,
13155,
1378,
16799,
13,
15,
13,
15,
13,
16,
25,
23,
46302,
6,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7791,
11,
1179,
796,
21136,
62,
21975,
7,
29851,
8,
198,
220,
220,
220,
30203,
796,
20478,
13,
1136,
62,
1891,
437,
7,
15952,
1326,
8,
198,
220,
220,
220,
1441,
555,
29572,
62,
21975,
7,
15952,
1326,
11,
30203,
13,
411,
6442,
62,
21975,
7,
17946,
4008,
198
] | 2.473278 | 1,815 |
## the following massive function is deprecated
def generate_sensfunc_old(wave, counts, counts_ivar, airmass, exptime, spectrograph, telluric=False, star_type=None,
star_mag=None, ra=None, dec=None, std_file = None, BALM_MASK_WID=5., norder=4, nresln=None,debug=False):
""" Function to generate the sensitivity function.
This can work in different regimes:
- If telluric=False and RA=None and Dec=None
the code creates a sintetic standard star spectrum using the Kurucz models,
and from this it generates a sens func using nresln=20.0 and masking out
telluric regions.
- If telluric=False and RA and Dec are assigned
the standard star spectrum is extracted from the archive, and a sens func
is generated using nresln=20.0 and masking out telluric regions.
- If telluric=True
the code creates a sintetic standard star spectrum using the Kurucz models,
the sens func is created setting nresln=1.5 it contains the correction for
telluric lines.
Parameters:
----------
wave : array
Wavelength of the star [no longer with units]
counts : array
Flux (in counts) of the star
counts_ivar : array
Inverse variance of the star
airmass : float
Airmass
exptime : float
Exposure time in seconds
spectrograph : dict
Instrument specific dict
Used for extinction correction
telluric : bool
if True performs a telluric correction
star_type : str
Spectral type of the telluric star (used if telluric=True)
star_mag : float
Apparent magnitude of telluric star (used if telluric=True)
RA : float
deg, RA of the telluric star
if assigned, the standard star spectrum will be extracted from
the archive
DEC : float
deg, DEC of the telluric star
if assigned, the standard star spectrum will be extracted from
the archive
BALM_MASK_WID : float
Mask parameter for Balmer absorption. A region equal to
BALM_MASK_WID*resln is masked wher resln is the estimate
for the spectral resolution.
nresln : float
Number of resolution elements for break-point placement.
If assigned, overwrites the settings imposed by the code.
norder: int
Order number of polynomial fit.
Returns:
-------
sens_dict : dict
sensitivity function described by a dict
"""
# Create copy of the arrays to avoid modification and convert to
# electrons / s
wave_star = wave.copy()
flux_star = counts.copy() / exptime
ivar_star = counts_ivar.copy() * exptime ** 2
# Units
if not isinstance(wave_star, units.Quantity):
wave_star = wave_star * units.AA
# ToDo
# This should be changed. At the moment the extinction correction procedure
# requires the spectra to be in the optical. For the NIR is probably enough
# to extend the tables to longer wavelength setting the extinction to 0.0mag.
msgs.warn("Extinction correction applyed only if the spectra covers <10000Ang.")
# Apply Extinction if optical bands
if np.max(wave_star) < 10000. * units.AA:
msgs.info("Applying extinction correction")
extinct = load_extinction_data(spectrograph.telescope['longitude'],
spectrograph.telescope['latitude'])
ext_corr = extinction_correction(wave_star, airmass, extinct)
# Correct for extinction
flux_star = flux_star * ext_corr
ivar_star = ivar_star / ext_corr ** 2
else:
msgs.info("Extinction correction not applied")
# Create star model
if (ra is not None) and (dec is not None) and (star_mag is None) and (star_type is None):
# Pull star spectral model from archive
msgs.info("Get standard model")
# Grab closest standard within a tolerance
std_dict = find_standard_file(ra, dec)
if std_dict is not None:
# Load standard
load_standard_file(std_dict)
# Interpolate onto observed wavelengths
#std_xspec = XSpectrum1D.from_tuple((std_dict['wave'], std_dict['flux']))
debugger.set_trace()
xspec = std_xspec.rebin(wave_star) # Conserves flambda
flux_true = xspec.flux.value
else:
msgs.error('No spectrum found in our database for your standard star. Please use another standard star \
or consider add it into out database.')
elif (star_mag is not None) and (star_type is not None):
# Create star spectral model
msgs.info("Creating standard model")
# Create star model
star_loglam, star_flux, std_dict = telluric_sed(star_mag, star_type)
star_lam = 10 ** star_loglam
# Generate a dict matching the output of find_standard_file
std_dict = dict(cal_file='KuruczTelluricModel', name=star_type, fmt=1,
std_ra=None, std_dec=None)
std_dict['wave'] = star_lam * units.AA
std_dict['flux'] = 1e17 * star_flux * units.erg / units.s / units.cm ** 2 / units.AA
# ToDO If the Kuruck model is used, rebin create weird features
# I using scipy interpolate to avoid this
flux_true = scipy.interpolate.interp1d(std_dict['wave'], std_dict['flux'],
bounds_error=False,
fill_value='extrapolate')(wave_star)
else:
debugger.set_trace()
msgs.error('Insufficient information provided for fluxing. '
'Either the coordinates of the standard or a stellar type and magnitude are needed.')
if np.min(flux_true) <= 0.:
msgs.warn('Your spectrum extends beyond calibrated standard star, extrapolating the spectra with polynomial.')
# ToDo: should we extrapolate it using graybody model?
mask_model = flux_true<=0
msk_poly, poly_coeff = utils.robust_polyfit_djs(std_dict['wave'].value, std_dict['flux'].value,8,function='polynomial',
invvar=None, guesses=None, maxiter=50, inmask=None, sigma=None, \
lower=3.0, upper=3.0, maxdev=None, maxrej=3, groupdim=None,
groupsize=None,groupbadpix=False, grow=0, sticky=True, use_mad=True)
star_poly = utils.func_val(poly_coeff, wave_star.value, 'polynomial')
#flux_true[mask_model] = star_poly[mask_model]
flux_true = star_poly.copy()
if debug:
plt.plot(std_dict['wave'], std_dict['flux'],'bo',label='Raw Star Model')
plt.plot(std_dict['wave'], utils.func_val(poly_coeff, std_dict['wave'].value, 'polynomial'), 'k-',label='robust_poly_fit')
plt.plot(wave_star,flux_true,'r-',label='Your Final Star Model used for sensfunc')
plt.show()
# Set nresln
if nresln is None:
if telluric:
nresln = 1.5
msgs.info("Set nresln to 1.5")
else:
nresln = 20.0
msgs.info("Set nresln to 20.0")
# ToDo
# Compute an effective resolution for the standard. This could be improved
# to setup an array of breakpoints based on the resolution. At the
# moment we are using only one number
msgs.work("Should pull resolution from arc line analysis")
msgs.work("At the moment the resolution is taken as the PixelScale")
msgs.work("This needs to be changed!")
std_pix = np.median(np.abs(wave_star - np.roll(wave_star, 1)))
std_res = std_pix
resln = std_res
if (nresln * std_res) < std_pix:
msgs.warn("Bspline breakpoints spacing shoud be larger than 1pixel")
msgs.warn("Changing input nresln to fix this")
nresln = std_res / std_pix
# Mask bad pixels, edges, and Balmer, Paschen, Brackett, and Pfund lines
# Mask (True = good pixels)
msgs.info("Masking spectral regions:")
msk_star = np.ones_like(flux_star).astype(bool)
# Mask bad pixels
msgs.info(" Masking bad pixels")
msk_star[ivar_star <= 0.] = False
msk_star[flux_star <= 0.] = False
# Mask edges
msgs.info(" Masking edges")
msk_star[:1] = False
msk_star[-1:] = False
# Mask Balmer
msgs.info(" Masking Balmer")
lines_balm = np.array([3836.4, 3969.6, 3890.1, 4102.8, 4102.8, 4341.6, 4862.7, 5407.0,
6564.6, 8224.8, 8239.2]) * units.AA
for line_balm in lines_balm:
ibalm = np.abs(wave_star - line_balm) <= BALM_MASK_WID * resln
msk_star[ibalm] = False
# Mask Paschen
msgs.info(" Masking Paschen")
# air wavelengths from:
# https://www.subarutelescope.org/Science/Resources/lines/hi.html
lines_pasc = np.array([8203.6, 9229.0, 9546.0, 10049.4, 10938.1,
12818.1, 18751.0]) * units.AA
for line_pasc in lines_pasc:
ipasc = np.abs(wave_star - line_pasc) <= BALM_MASK_WID * resln
msk_star[ipasc] = False
# Mask Brackett
msgs.info(" Masking Brackett")
# air wavelengths from:
# https://www.subarutelescope.org/Science/Resources/lines/hi.html
lines_brac = np.array([14584.0, 18174.0, 19446.0, 21655.0,
26252.0, 40512.0]) * units.AA
for line_brac in lines_brac:
ibrac = np.abs(wave_star - line_brac) <= BALM_MASK_WID * resln
msk_star[ibrac] = False
# Mask Pfund
msgs.info(" Masking Pfund")
# air wavelengths from:
# https://www.subarutelescope.org/Science/Resources/lines/hi.html
lines_pfund = np.array([22788.0, 32961.0, 37395.0, 46525.0,
74578.0]) * units.AA
for line_pfund in lines_pfund:
ipfund = np.abs(wave_star - line_pfund) <= BALM_MASK_WID * resln
msk_star[ipfund] = False
# Mask Atm. cutoff
msgs.info(" Masking Below the atmospheric cutoff")
atms_cutoff = wave_star <= 3000.0 * units.AA
msk_star[atms_cutoff] = False
#if ~telluric: #Feige: This is a bug
if not telluric:
# Mask telluric absorption
msgs.info("Masking Telluric")
tell = np.any([((wave_star >= 7580.00 * units.AA) & (wave_star <= 7750.00 * units.AA)),
((wave_star >= 7160.00 * units.AA) & (wave_star <= 7340.00 * units.AA)),
((wave_star >= 6860.00 * units.AA) & (wave_star <= 6930.00 * units.AA)),
((wave_star >= 9310.00 * units.AA) & (wave_star <= 9665.00 * units.AA)),
((wave_star >= 11120.0 * units.AA) & (wave_star <= 11615.0 * units.AA)),
((wave_star >= 12610.0 * units.AA) & (wave_star <= 12720.0 * units.AA)),
((wave_star >= 13160.0 * units.AA) & (wave_star <= 15065.0 * units.AA)),
((wave_star >= 15700.0 * units.AA) & (wave_star <= 15770.0 * units.AA)),
((wave_star >= 16000.0 * units.AA) & (wave_star <= 16100.0 * units.AA)),
((wave_star >= 16420.0 * units.AA) & (wave_star <= 16580.0 * units.AA)),
((wave_star >= 17310.0 * units.AA) & (wave_star <= 20775.0 * units.AA)),
(wave_star >= 22680.0 * units.AA)], axis=0)
msk_star[tell] = False
# Apply mask
ivar_star[~msk_star] = 0.0
# Fit in magnitudes
kwargs_bspline = {'bkspace': resln.value * nresln}
kwargs_reject = {'maxrej': 5}
sensfunc, sensfit = bspline_magfit(wave_star.value, flux_star, ivar_star, flux_true, inmask=msk_star,
kwargs_bspline=kwargs_bspline, kwargs_reject=kwargs_reject,debug=debug)
#Cleaning sensfunc
## ToDo: currently I'm fitting the sensfunc in the masked region with a polynomial, should we change the algorithm to
## fit polynomial first and then bsline the poly-subtracted flux ???
## keep tell free region for poly fit. tell2 is different from tell since tell2 include more small trunk of telluric free
## regions. tell2 might be not suitable for the bspline fitting. We need to select a more robust telluric region for both purpose.
tell2 = np.any([((wave_star >= 7580.00 * units.AA) & (wave_star <= 7750.00 * units.AA)),
((wave_star >= 7160.00 * units.AA) & (wave_star <= 7340.00 * units.AA)),
((wave_star >= 6860.00 * units.AA) & (wave_star <= 6930.00 * units.AA)),
((wave_star >= 9310.00 * units.AA) & (wave_star <= 9665.00 * units.AA)),
((wave_star >= 11120.0 * units.AA) & (wave_star <= 11545.0 * units.AA)),
((wave_star >= 12610.0 * units.AA) & (wave_star <= 12720.0 * units.AA)),
((wave_star >= 13400.0 * units.AA) & (wave_star <= 14830.0 * units.AA)),
((wave_star >= 15700.0 * units.AA) & (wave_star <= 15770.0 * units.AA)),
((wave_star >= 16000.0 * units.AA) & (wave_star <= 16100.0 * units.AA)),
((wave_star >= 16420.0 * units.AA) & (wave_star <= 16580.0 * units.AA)),
((wave_star >= 17630.0 * units.AA) & (wave_star <= 19690.0 * units.AA)),
((wave_star >= 19790.0 * units.AA) & (wave_star <= 19810.0 * units.AA)),
((wave_star >= 19950.0 * units.AA) & (wave_star <= 20310.0 * units.AA)),
((wave_star >= 20450.0 * units.AA) & (wave_star <= 20920.0 * units.AA)),
((wave_star >= 24000.0 * units.AA) & (wave_star <= 24280.0 * units.AA)),
((wave_star >= 24320.0 * units.AA) & (wave_star <= 24375.0 * units.AA)),
(wave_star >= 24450.0 * units.AA)], axis=0)
msk_all = msk_star.copy() # mask for polynomial fitting
msk_sens = msk_star.copy() # mask for sensfunc
med, mad = utils.robust_meanstd(sensfunc)
msk_crazy = (sensfunc<=0) | (sensfunc>1e3*med)
msk_all[tell2] = False
msk_all[msk_crazy] = False
msk_sens[msk_crazy] = False
if (len(wave_star.value[msk_all]) < norder+1) or (len(wave_star.value[msk_all]) < 0.1*len(wave_star.value)):
msgs.warn('It seems this order/spectrum well within the telluric region. No polynomial fit will be performed.')
else:
#polyfit the sensfunc
msk_poly, poly_coeff = utils.robust_polyfit_djs(wave_star.value[msk_all],np.log10(sensfunc[msk_all]), norder, function='polynomial',
invvar=None,guesses = None, maxiter = 50, inmask = None, sigma = None,\
lower = 3.0, upper = 3.0,maxdev=None,maxrej=3,groupdim=None,groupsize=None,\
groupbadpix=False, grow=0,sticky=True,use_mad=True)
sensfunc_poly = 10**(utils.func_val(poly_coeff, wave_star.value, 'polynomial'))
sensfunc[~msk_sens] = sensfunc_poly[~msk_sens]
if debug:
plt.rcdefaults()
plt.rcParams['font.family'] = 'times new roman'
plt.plot(wave_star.value[~msk_sens], sensfunc[~msk_sens], 'bo')
plt.plot(wave_star.value, sensfunc_poly, 'r-',label='Polyfit')
plt.plot(wave_star.value, sensfunc, 'k-',label='bspline fitting')
plt.ylim(0.0, 100.0)
plt.legend()
plt.xlabel('Wavelength [ang]')
plt.ylabel('Sensfunc')
plt.show()
plt.close()
plt.figure(figsize=(10, 6))
plt.clf()
plt.plot(wave_star.value,flux_star*sensfunc, label='Calibrated Spectrum')
plt.plot(wave_star.value,flux_true, label='Model')
plt.plot(wave_star.value,np.sqrt(1/ivar_star))
plt.legend()
plt.xlabel('Wavelength [ang]')
plt.ylabel('Flux [erg/s/cm2/Ang.]')
plt.ylim(0,np.median(flux_true)*2.5)
plt.title('Final corrected spectrum')
plt.show()
plt.close()
# JFH Left off here.
# Creating the dict
#msgs.work("Is min, max and wave_min, wave_max a duplicate?")
#sens_dict = dict(wave=wave_sens, sensfunc=sensfunc, min=None, max=None, std=std_dict)
# Add in wavemin,wavemax
sens_dict = {}
sens_dict['wave'] = wave_star
sens_dict['sensfunc'] = sensfunc
sens_dict['wave_min'] = np.min(wave_star)
sens_dict['wave_max'] = np.max(wave_star)
sens_dict['exptime']= exptime
sens_dict['airmass']= airmass
sens_dict['std_file']= std_file
# Get other keys from standard dict
sens_dict['std_ra'] = std_dict['std_ra']
sens_dict['std_dec'] = std_dict['std_dec']
sens_dict['std_name'] = std_dict['name']
sens_dict['cal_file'] = std_dict['cal_file']
sens_dict['flux_true'] = flux_true
#sens_dict['std_dict'] = std_dict
#sens_dict['msk_star'] = msk_star
#sens_dict['mag_set'] = mag_set
return sens_dict
## bspline_magfit is deprecated at this moment.
def bspline_magfit(wave, flux, ivar, flux_std, inmask=None, maxiter=35, upper=2, lower=2,
kwargs_bspline={}, kwargs_reject={}, debug=False, show_QA=False):
"""
Perform a bspline fit to the flux ratio of standard to
observed counts. Used to generate a sensitivity function.
Parameters
----------
wave : ndarray
wavelength as observed
flux : ndarray
counts/s as observed
ivar : ndarray
inverse variance
flux_std : Quantity array
standard star true flux (erg/s/cm^2/A)
inmask : ndarray
bspline mask
maxiter : integer
maximum number of iterations for bspline_iterfit
upper : integer
number of sigma for rejection in bspline_iterfit
lower : integer
number of sigma for rejection in bspline_iterfit
kwargs_bspline : dict, optional
keywords for bspline_iterfit
kwargs_reject : dict, optional
keywords for bspline_iterfit
debug : bool
if True shows some dubugging plots
Returns
-------
bset_log1
"""
# Create copy of the arrays to avoid modification
wave_obs = wave.copy()
flux_obs = flux.copy()
ivar_obs = ivar.copy()
# preparing arrays to run in bspline_iterfit
if np.all(~np.isfinite(ivar_obs)):
msgs.warn("NaN are present in the inverse variance")
# Preparing arrays to run in bspline_iterfit
if np.all(~np.isfinite(ivar_obs)):
msgs.warn("NaN are present in the inverse variance")
# Removing outliers
# Calculate log of flux_obs setting a floor at TINY
logflux_obs = 2.5 * np.log10(np.maximum(flux_obs, TINY))
# Set a fix value for the variance of logflux
logivar_obs = np.ones_like(logflux_obs) * (10.0 ** 2)
# Calculate log of flux_std model setting a floor at TINY
logflux_std = 2.5 * np.log10(np.maximum(flux_std, TINY))
# Calculate ratio setting a floor at MAGFUNC_MIN and a ceiling at
# MAGFUNC_MAX
magfunc = logflux_std - logflux_obs
magfunc = np.maximum(np.minimum(magfunc, MAGFUNC_MAX), MAGFUNC_MIN)
magfunc_mask = (magfunc < 0.99 * MAGFUNC_MAX) & (magfunc > 0.99 * MAGFUNC_MIN)
# Mask outliners
# masktot=True means good pixel
if inmask is None:
masktot = (ivar_obs > 0.0) & np.isfinite(logflux_obs) & np.isfinite(ivar_obs) & \
np.isfinite(logflux_std) & magfunc_mask
else:
masktot = inmask & (ivar_obs > 0.0) & np.isfinite(logflux_obs) & np.isfinite(ivar_obs) & \
np.isfinite(logflux_std) & magfunc_mask
logivar_obs[~masktot] = 0.
# Calculate sensfunc
sensfunc = 10.0 ** (0.4 * magfunc)
msgs.info("Initialize bspline for flux calibration")
init_bspline = pydl.bspline(wave_obs, bkspace=kwargs_bspline['bkspace'])
fullbkpt = init_bspline.breakpoints
# TESTING turning off masking for now
# remove masked regions from breakpoints
msk_obs = np.ones_like(wave_obs).astype(bool)
msk_obs[~masktot] = False
msk_bkpt = scipy.interpolate.interp1d(wave_obs, msk_obs, kind='nearest', fill_value='extrapolate')(fullbkpt)
init_breakpoints = fullbkpt[msk_bkpt > 0.999]
# init_breakpoints = fullbkpt
# First round of the fit:
msgs.info("Bspline fit: step 1")
bset1, bmask = pydl.iterfit(wave_obs, magfunc, invvar=logivar_obs, inmask=masktot, upper=upper, lower=lower,
fullbkpt=init_breakpoints, maxiter=maxiter, kwargs_bspline=kwargs_bspline,
kwargs_reject=kwargs_reject)
logfit1, _ = bset1.value(wave_obs)
logfit_bkpt, _ = bset1.value(init_breakpoints)
if debug:
# Check for calibration
plt.figure(1)
plt.plot(wave_obs, magfunc, drawstyle='steps-mid', color='black', label='magfunc')
plt.plot(wave_obs, logfit1, color='cornflowerblue', label='logfit1')
plt.plot(wave_obs[~masktot], magfunc[~masktot], '+', color='red', markersize=5.0, label='masked magfunc')
plt.plot(wave_obs[~masktot], logfit1[~masktot], '+', color='red', markersize=5.0, label='masked logfit1')
plt.plot(init_breakpoints, logfit_bkpt, '.', color='green', markersize=4.0, label='breakpoints')
plt.plot(init_breakpoints, np.interp(init_breakpoints, wave_obs, magfunc), '.', color='green', markersize=4.0,
label='breakpoints')
plt.plot(wave_obs, 1.0 / np.sqrt(logivar_obs), color='orange', label='sigma')
plt.legend()
plt.xlabel('Wavelength [ang]')
plt.ylim(0.0, 1.2 * MAGFUNC_MAX)
plt.title('1st Bspline fit')
plt.show()
modelfit1 = np.power(10.0, 0.4 * np.maximum(np.minimum(logfit1, MAGFUNC_MAX), MAGFUNC_MIN))
residual = sensfunc / (modelfit1 + (modelfit1 == 0)) - 1.
# new_mask = masktot & (sensfunc > 0)
# residual_ivar = (modelfit1 * flux_obs / (sensfunc + (sensfunc == 0.0))) ** 2 * ivar_obs
residual_ivar = np.ones_like(residual) / (0.1 ** 2)
residual_ivar = residual_ivar * masktot
(mean, med, stddev) = sigma_clipped_stats(residual[masktot], sigma_lower=3.0, sigma_upper=3.0)
if np.median(stddev > 0.01):
# Second round of the fit:
msgs.info("Bspline fit: step 2")
# Now do one more fit to the ratio of data/model - 1.
bset_residual, bmask2 = pydl.iterfit(wave_obs, residual, invvar=residual_ivar, inmask=masktot, upper=upper,
lower=lower, maxiter=maxiter, fullbkpt=bset1.breakpoints,
kwargs_bspline=kwargs_bspline, kwargs_reject=kwargs_reject)
bset_log1 = bset1.copy()
bset_log1.coeff = bset_log1.coeff + bset_residual.coeff
if debug:
# Check for calibration
resid_fit, _ = bset_residual.value(wave_obs)
logfit2, _ = bset_log1.value(wave_obs)
logfit2_bkpt, _ = bset_log1.value(bset1.breakpoints)
plt.figure(1)
plt.plot(wave_obs, residual, drawstyle='steps-mid', color='black', label='residual')
plt.plot(wave_obs, resid_fit, color='cornflowerblue', label='resid_fit')
plt.plot(wave_obs[~masktot], residual[~masktot], '+', color='red', markersize=5.0, label='masked residual')
plt.plot(wave_obs[~masktot], resid_fit[~masktot], '+', color='red', markersize=5.0, label='masked resid_fit')
plt.plot(init_breakpoints, logfit2_bkpt, '.', color='green', markersize=4.0, label='breakpoints')
plt.plot(wave_obs, 1.0 / np.sqrt(residual_ivar), color='orange', label='sigma')
plt.legend()
plt.xlabel('Wavelength [ang]')
plt.ylim(-0.1, 0.1)
plt.title('2nd Bspline fit')
plt.show()
else:
bset_log1 = bset1.copy()
# ToDo JFH I think we should move towards writing this out as a vector in a fits table
# rather than the b-spline.
# Create sensitivity function
newlogfit, _ = bset_log1.value(wave_obs)
sensfit = np.power(10.0, 0.4 * np.maximum(np.minimum(newlogfit, MAGFUNC_MAX), MAGFUNC_MIN))
sensfit[~magfunc_mask] = 0.0
if debug:
# Check for calibration
plt.figure(1)
plt.plot(wave_obs, sensfunc, drawstyle='steps-mid', color='black', label='sensfunc')
plt.plot(wave_obs, sensfit, color='cornflowerblue', label='sensfunc fit')
plt.plot(wave_obs[~masktot], sensfunc[~masktot], '+', color='red', markersize=5.0, label='masked sensfunc')
plt.plot(wave_obs[~masktot], sensfit[~masktot], '+', color='red', markersize=5.0, label='masked sensfuncfit')
plt.legend()
plt.xlabel('Wavelength [ang]')
plt.ylim(0.0, 100.0)
plt.show()
# Check quality of the fit
absdev = np.median(np.abs(sensfit / modelfit1 - 1))
msgs.info('Difference between fits is {:g}'.format(absdev))
# Check for residual of the fit
if debug:
# scale = np.power(10.0, 0.4 * sensfit)
flux_cal = flux_obs * sensfit
ivar_cal = ivar_obs / sensfit ** 2.
plt.rcdefaults()
plt.rcParams['font.family']= 'times new roman'
plt.figure(figsize=(11, 8.5))
plt.clf()
plt.plot(wave_obs,flux_cal, label='Calibrated Spectrum')
plt.plot(wave_obs,flux_std, label='Model')
plt.plot(wave_obs,np.sqrt(1/ivar_cal))
plt.legend()
plt.xlabel('Wavelength [ang]')
plt.ylabel('Flux [erg/s/cm2/Ang.]')
plt.ylim(0,np.median(flux_std)*2.5)
plt.show()
plt.close()
# QA
msgs.work("Add QA for sensitivity function")
if show_QA:
qa_bspline_magfit(wave_obs, bset_log1, magfunc, masktot)
return sensfunc,sensfit
| [
198,
2235,
262,
1708,
4858,
2163,
318,
39224,
198,
4299,
7716,
62,
82,
641,
20786,
62,
727,
7,
19204,
11,
9853,
11,
9853,
62,
452,
283,
11,
1633,
22208,
11,
409,
457,
524,
11,
5444,
3828,
1470,
11,
1560,
333,
291,
28,
25101,
11,
3491,
62,
4906,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3491,
62,
19726,
28,
14202,
11,
2179,
28,
14202,
11,
875,
28,
14202,
11,
14367,
62,
7753,
796,
6045,
11,
48091,
44,
62,
31180,
42,
62,
54,
2389,
28,
20,
1539,
299,
2875,
28,
19,
11,
299,
411,
18755,
28,
14202,
11,
24442,
28,
25101,
2599,
198,
220,
220,
220,
37227,
15553,
284,
7716,
262,
14233,
2163,
13,
198,
220,
220,
220,
770,
460,
670,
287,
1180,
25879,
25,
198,
220,
220,
220,
532,
1002,
1560,
333,
291,
28,
25101,
290,
17926,
28,
14202,
290,
4280,
28,
14202,
198,
220,
220,
220,
220,
220,
262,
2438,
8075,
257,
264,
600,
5139,
3210,
3491,
10958,
1262,
262,
18132,
1229,
89,
4981,
11,
198,
220,
220,
220,
220,
220,
290,
422,
428,
340,
18616,
257,
3054,
25439,
1262,
299,
411,
18755,
28,
1238,
13,
15,
290,
9335,
278,
503,
198,
220,
220,
220,
220,
220,
1560,
333,
291,
7652,
13,
198,
220,
220,
220,
532,
1002,
1560,
333,
291,
28,
25101,
290,
17926,
290,
4280,
389,
8686,
198,
220,
220,
220,
220,
220,
262,
3210,
3491,
10958,
318,
21242,
422,
262,
15424,
11,
290,
257,
3054,
25439,
198,
220,
220,
220,
220,
220,
318,
7560,
1262,
299,
411,
18755,
28,
1238,
13,
15,
290,
9335,
278,
503,
1560,
333,
291,
7652,
13,
198,
220,
220,
220,
532,
1002,
1560,
333,
291,
28,
17821,
198,
220,
220,
220,
220,
220,
262,
2438,
8075,
257,
264,
600,
5139,
3210,
3491,
10958,
1262,
262,
18132,
1229,
89,
4981,
11,
198,
220,
220,
220,
220,
220,
262,
3054,
25439,
318,
2727,
4634,
299,
411,
18755,
28,
16,
13,
20,
340,
4909,
262,
17137,
329,
198,
220,
220,
220,
220,
220,
1560,
333,
291,
3951,
13,
628,
220,
220,
220,
40117,
25,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
6769,
1058,
7177,
198,
220,
220,
220,
220,
220,
15329,
26623,
286,
262,
3491,
685,
3919,
2392,
351,
4991,
60,
198,
220,
220,
220,
9853,
1058,
7177,
198,
220,
220,
220,
220,
220,
1610,
2821,
357,
259,
9853,
8,
286,
262,
3491,
198,
220,
220,
220,
9853,
62,
452,
283,
1058,
7177,
198,
220,
220,
220,
220,
220,
554,
4399,
24198,
286,
262,
3491,
198,
220,
220,
220,
1633,
22208,
1058,
12178,
198,
220,
220,
220,
220,
220,
317,
2533,
562,
198,
220,
220,
220,
409,
457,
524,
1058,
12178,
198,
220,
220,
220,
220,
220,
39090,
640,
287,
4201,
198,
220,
220,
220,
5444,
3828,
1470,
1058,
8633,
198,
220,
220,
220,
220,
220,
42410,
2176,
8633,
198,
220,
220,
220,
220,
220,
16718,
329,
21935,
17137,
198,
220,
220,
220,
1560,
333,
291,
1058,
20512,
198,
220,
220,
220,
220,
220,
611,
6407,
17706,
257,
1560,
333,
291,
17137,
198,
220,
220,
220,
3491,
62,
4906,
1058,
965,
198,
220,
220,
220,
220,
220,
13058,
1373,
2099,
286,
262,
1560,
333,
291,
3491,
357,
1484,
611,
1560,
333,
291,
28,
17821,
8,
198,
220,
220,
220,
3491,
62,
19726,
1058,
12178,
198,
220,
220,
220,
220,
220,
2034,
1580,
14735,
286,
1560,
333,
291,
3491,
357,
1484,
611,
1560,
333,
291,
28,
17821,
8,
198,
220,
220,
220,
17926,
1058,
12178,
198,
220,
220,
220,
220,
220,
3396,
11,
17926,
286,
262,
1560,
333,
291,
3491,
198,
220,
220,
220,
220,
220,
611,
8686,
11,
262,
3210,
3491,
10958,
481,
307,
21242,
422,
198,
220,
220,
220,
220,
220,
262,
15424,
198,
220,
220,
220,
27196,
1058,
12178,
198,
220,
220,
220,
220,
220,
3396,
11,
27196,
286,
262,
1560,
333,
291,
3491,
198,
220,
220,
220,
220,
220,
611,
8686,
11,
262,
3210,
3491,
10958,
481,
307,
21242,
422,
198,
220,
220,
220,
220,
220,
262,
15424,
198,
220,
220,
220,
48091,
44,
62,
31180,
42,
62,
54,
2389,
1058,
12178,
198,
220,
220,
220,
220,
220,
18007,
11507,
329,
8528,
647,
24774,
13,
317,
3814,
4961,
284,
198,
220,
220,
220,
220,
220,
48091,
44,
62,
31180,
42,
62,
54,
2389,
9,
411,
18755,
318,
29229,
266,
372,
581,
18755,
318,
262,
8636,
198,
220,
220,
220,
220,
220,
329,
262,
37410,
6323,
13,
198,
220,
220,
220,
299,
411,
18755,
1058,
12178,
198,
220,
220,
220,
220,
220,
7913,
286,
6323,
4847,
329,
2270,
12,
4122,
13127,
13,
198,
220,
220,
220,
220,
220,
1002,
8686,
11,
6993,
23156,
262,
6460,
10893,
416,
262,
2438,
13,
198,
220,
220,
220,
299,
2875,
25,
493,
198,
220,
220,
220,
220,
220,
8284,
1271,
286,
745,
6213,
49070,
4197,
13,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
3054,
62,
11600,
1058,
8633,
198,
220,
220,
220,
220,
220,
14233,
2163,
3417,
416,
257,
8633,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1303,
13610,
4866,
286,
262,
26515,
284,
3368,
17613,
290,
10385,
284,
198,
220,
220,
220,
1303,
28722,
1220,
264,
198,
220,
220,
220,
6769,
62,
7364,
796,
6769,
13,
30073,
3419,
198,
220,
220,
220,
28462,
62,
7364,
796,
9853,
13,
30073,
3419,
1220,
409,
457,
524,
198,
220,
220,
220,
21628,
283,
62,
7364,
796,
9853,
62,
452,
283,
13,
30073,
3419,
1635,
409,
457,
524,
12429,
362,
628,
220,
220,
220,
1303,
27719,
198,
220,
220,
220,
611,
407,
318,
39098,
7,
19204,
62,
7364,
11,
4991,
13,
31208,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
6769,
62,
7364,
796,
6769,
62,
7364,
1635,
4991,
13,
3838,
628,
220,
220,
220,
1303,
1675,
5211,
198,
220,
220,
220,
1303,
770,
815,
307,
3421,
13,
1629,
262,
2589,
262,
21935,
17137,
8771,
198,
220,
220,
220,
1303,
4433,
262,
5444,
430,
284,
307,
287,
262,
18480,
13,
1114,
262,
399,
4663,
318,
2192,
1576,
198,
220,
220,
220,
1303,
284,
9117,
262,
8893,
284,
2392,
28400,
4634,
262,
21935,
284,
657,
13,
15,
19726,
13,
198,
220,
220,
220,
13845,
14542,
13,
40539,
7203,
11627,
9438,
17137,
4174,
276,
691,
611,
262,
5444,
430,
8698,
1279,
49388,
13450,
19570,
198,
220,
220,
220,
1303,
27967,
5683,
9438,
611,
18480,
11760,
198,
220,
220,
220,
611,
45941,
13,
9806,
7,
19204,
62,
7364,
8,
1279,
33028,
13,
1635,
4991,
13,
3838,
25,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
4677,
3157,
21935,
17137,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
28881,
796,
3440,
62,
2302,
9438,
62,
7890,
7,
4443,
3828,
1470,
13,
37524,
3798,
3008,
17816,
6511,
3984,
6,
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,
5444,
3828,
1470,
13,
37524,
3798,
3008,
17816,
15460,
3984,
6,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
1070,
62,
10215,
81,
796,
21935,
62,
10215,
8243,
7,
19204,
62,
7364,
11,
1633,
22208,
11,
28881,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
22941,
329,
21935,
198,
220,
220,
220,
220,
220,
220,
220,
28462,
62,
7364,
796,
28462,
62,
7364,
1635,
1070,
62,
10215,
81,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
283,
62,
7364,
796,
21628,
283,
62,
7364,
1220,
1070,
62,
10215,
81,
12429,
362,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
11627,
9438,
17137,
407,
5625,
4943,
628,
220,
220,
220,
1303,
13610,
3491,
2746,
198,
220,
220,
220,
611,
357,
430,
318,
407,
6045,
8,
290,
357,
12501,
318,
407,
6045,
8,
290,
357,
7364,
62,
19726,
318,
6045,
8,
290,
357,
7364,
62,
4906,
318,
6045,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
21429,
3491,
37410,
2746,
422,
15424,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
3855,
3210,
2746,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
25339,
11706,
3210,
1626,
257,
15621,
198,
220,
220,
220,
220,
220,
220,
220,
14367,
62,
11600,
796,
1064,
62,
20307,
62,
7753,
7,
430,
11,
875,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
14367,
62,
11600,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
8778,
3210,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3440,
62,
20307,
62,
7753,
7,
19282,
62,
11600,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
4225,
16104,
378,
4291,
6515,
45656,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
19282,
62,
87,
16684,
796,
1395,
49738,
6582,
16,
35,
13,
6738,
62,
83,
29291,
19510,
19282,
62,
11600,
17816,
19204,
6,
4357,
14367,
62,
11600,
17816,
69,
22564,
20520,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49518,
13,
2617,
62,
40546,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
16684,
796,
14367,
62,
87,
16684,
13,
260,
8800,
7,
19204,
62,
7364,
8,
220,
1303,
7162,
274,
781,
4131,
6814,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28462,
62,
7942,
796,
2124,
16684,
13,
69,
22564,
13,
8367,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
18224,
10786,
2949,
10958,
1043,
287,
674,
6831,
329,
534,
3210,
3491,
13,
4222,
779,
1194,
3210,
3491,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
393,
2074,
751,
340,
656,
503,
6831,
2637,
8,
198,
220,
220,
220,
1288,
361,
357,
7364,
62,
19726,
318,
407,
6045,
8,
290,
357,
7364,
62,
4906,
318,
407,
6045,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
13610,
3491,
37410,
2746,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
32071,
3210,
2746,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
13610,
3491,
2746,
198,
220,
220,
220,
220,
220,
220,
220,
3491,
62,
6404,
2543,
11,
3491,
62,
69,
22564,
11,
14367,
62,
11600,
796,
1560,
333,
291,
62,
36622,
7,
7364,
62,
19726,
11,
3491,
62,
4906,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3491,
62,
2543,
796,
838,
12429,
3491,
62,
6404,
2543,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2980,
378,
257,
8633,
12336,
262,
5072,
286,
1064,
62,
20307,
62,
7753,
198,
220,
220,
220,
220,
220,
220,
220,
14367,
62,
11600,
796,
8633,
7,
9948,
62,
7753,
11639,
42,
333,
1229,
89,
24446,
333,
291,
17633,
3256,
1438,
28,
7364,
62,
4906,
11,
46996,
28,
16,
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,
14367,
62,
430,
28,
14202,
11,
14367,
62,
12501,
28,
14202,
8,
198,
220,
220,
220,
220,
220,
220,
220,
14367,
62,
11600,
17816,
19204,
20520,
796,
3491,
62,
2543,
1635,
4991,
13,
3838,
198,
220,
220,
220,
220,
220,
220,
220,
14367,
62,
11600,
17816,
69,
22564,
20520,
796,
352,
68,
1558,
1635,
3491,
62,
69,
22564,
1635,
4991,
13,
6422,
1220,
4991,
13,
82,
1220,
4991,
13,
11215,
12429,
362,
1220,
4991,
13,
3838,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1675,
18227,
1002,
262,
18132,
1347,
2746,
318,
973,
11,
3405,
259,
2251,
7650,
3033,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
314,
1262,
629,
541,
88,
39555,
378,
284,
3368,
428,
198,
220,
220,
220,
220,
220,
220,
220,
28462,
62,
7942,
796,
629,
541,
88,
13,
3849,
16104,
378,
13,
3849,
79,
16,
67,
7,
19282,
62,
11600,
17816,
19204,
6,
4357,
14367,
62,
11600,
17816,
69,
22564,
6,
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,
220,
220,
220,
220,
220,
22303,
62,
18224,
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,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6070,
62,
8367,
11639,
2302,
2416,
27976,
6,
5769,
19204,
62,
7364,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
49518,
13,
2617,
62,
40546,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
18224,
10786,
20376,
15267,
1321,
2810,
329,
28462,
278,
13,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
32478,
262,
22715,
286,
262,
3210,
393,
257,
25041,
2099,
290,
14735,
389,
2622,
2637,
8,
628,
198,
220,
220,
220,
611,
45941,
13,
1084,
7,
69,
22564,
62,
7942,
8,
19841,
657,
11207,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
40539,
10786,
7120,
10958,
14582,
3675,
48050,
3210,
3491,
11,
36804,
349,
803,
262,
5444,
430,
351,
745,
6213,
49070,
2637,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1675,
5211,
25,
815,
356,
36804,
27976,
340,
1262,
12768,
2618,
2746,
30,
198,
220,
220,
220,
220,
220,
220,
220,
9335,
62,
19849,
796,
28462,
62,
7942,
27,
28,
15,
198,
220,
220,
220,
220,
220,
220,
220,
285,
8135,
62,
35428,
11,
7514,
62,
1073,
14822,
796,
3384,
4487,
13,
22609,
436,
62,
35428,
11147,
62,
67,
8457,
7,
19282,
62,
11600,
17816,
19204,
6,
4083,
8367,
11,
14367,
62,
11600,
17816,
69,
22564,
6,
4083,
8367,
11,
23,
11,
8818,
11639,
35428,
26601,
498,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
800,
7785,
28,
14202,
11,
44774,
28,
14202,
11,
3509,
2676,
28,
1120,
11,
287,
27932,
28,
14202,
11,
264,
13495,
28,
14202,
11,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2793,
28,
18,
13,
15,
11,
6727,
28,
18,
13,
15,
11,
3509,
7959,
28,
14202,
11,
3509,
260,
73,
28,
18,
11,
1448,
27740,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2628,
1096,
28,
14202,
11,
8094,
14774,
79,
844,
28,
25101,
11,
1663,
28,
15,
11,
23408,
28,
17821,
11,
779,
62,
9937,
28,
17821,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3491,
62,
35428,
796,
3384,
4487,
13,
20786,
62,
2100,
7,
35428,
62,
1073,
14822,
11,
6769,
62,
7364,
13,
8367,
11,
705,
35428,
26601,
498,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
69,
22564,
62,
7942,
58,
27932,
62,
19849,
60,
796,
3491,
62,
35428,
58,
27932,
62,
19849,
60,
198,
220,
220,
220,
220,
220,
220,
220,
28462,
62,
7942,
796,
3491,
62,
35428,
13,
30073,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
611,
14257,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19282,
62,
11600,
17816,
19204,
6,
4357,
14367,
62,
11600,
17816,
69,
22564,
20520,
4032,
2127,
3256,
18242,
11639,
27369,
2907,
9104,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19282,
62,
11600,
17816,
19204,
6,
4357,
220,
3384,
4487,
13,
20786,
62,
2100,
7,
35428,
62,
1073,
14822,
11,
14367,
62,
11600,
17816,
19204,
6,
4083,
8367,
11,
705,
35428,
26601,
498,
33809,
705,
74,
12,
3256,
18242,
11639,
22609,
436,
62,
35428,
62,
11147,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
7364,
11,
69,
22564,
62,
7942,
4032,
81,
12,
3256,
18242,
11639,
7120,
8125,
2907,
9104,
973,
329,
3054,
20786,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
12860,
3419,
628,
220,
220,
220,
1303,
5345,
299,
411,
18755,
198,
220,
220,
220,
611,
299,
411,
18755,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1560,
333,
291,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
411,
18755,
796,
352,
13,
20,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
7248,
299,
411,
18755,
284,
352,
13,
20,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
411,
18755,
796,
1160,
13,
15,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
7248,
299,
411,
18755,
284,
1160,
13,
15,
4943,
628,
220,
220,
220,
1303,
1675,
5211,
198,
220,
220,
220,
1303,
3082,
1133,
281,
4050,
6323,
329,
262,
3210,
13,
770,
714,
307,
6596,
198,
220,
220,
220,
1303,
284,
9058,
281,
7177,
286,
2270,
13033,
1912,
319,
262,
6323,
13,
1629,
262,
198,
220,
220,
220,
1303,
2589,
356,
389,
1262,
691,
530,
1271,
198,
220,
220,
220,
13845,
14542,
13,
1818,
7203,
19926,
2834,
6323,
422,
10389,
1627,
3781,
4943,
198,
220,
220,
220,
13845,
14542,
13,
1818,
7203,
2953,
262,
2589,
262,
6323,
318,
2077,
355,
262,
11349,
29990,
4943,
198,
220,
220,
220,
13845,
14542,
13,
1818,
7203,
1212,
2476,
284,
307,
3421,
2474,
8,
198,
220,
220,
220,
14367,
62,
79,
844,
796,
45941,
13,
1150,
666,
7,
37659,
13,
8937,
7,
19204,
62,
7364,
532,
45941,
13,
2487,
7,
19204,
62,
7364,
11,
352,
22305,
198,
220,
220,
220,
14367,
62,
411,
796,
14367,
62,
79,
844,
198,
220,
220,
220,
581,
18755,
796,
14367,
62,
411,
198,
220,
220,
220,
611,
357,
77,
411,
18755,
1635,
14367,
62,
411,
8,
1279,
14367,
62,
79,
844,
25,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
40539,
7203,
33,
22018,
500,
2270,
13033,
31050,
427,
2778,
307,
4025,
621,
352,
32515,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
40539,
7203,
48333,
5128,
299,
411,
18755,
284,
4259,
428,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
299,
411,
18755,
796,
14367,
62,
411,
1220,
14367,
62,
79,
844,
628,
220,
220,
220,
1303,
18007,
2089,
17848,
11,
13015,
11,
290,
8528,
647,
11,
350,
3372,
831,
11,
1709,
441,
3087,
11,
290,
350,
10990,
3951,
198,
220,
220,
220,
1303,
18007,
357,
17821,
796,
922,
17848,
8,
198,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
44,
30463,
37410,
7652,
25,
4943,
198,
220,
220,
220,
285,
8135,
62,
7364,
796,
45941,
13,
1952,
62,
2339,
7,
69,
22564,
62,
7364,
737,
459,
2981,
7,
30388,
8,
628,
220,
220,
220,
1303,
18007,
2089,
17848,
198,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
18007,
278,
2089,
17848,
4943,
198,
220,
220,
220,
285,
8135,
62,
7364,
58,
452,
283,
62,
7364,
19841,
657,
8183,
796,
10352,
198,
220,
220,
220,
285,
8135,
62,
7364,
58,
69,
22564,
62,
7364,
19841,
657,
8183,
796,
10352,
628,
220,
220,
220,
1303,
18007,
13015,
198,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
18007,
278,
13015,
4943,
198,
220,
220,
220,
285,
8135,
62,
7364,
58,
25,
16,
60,
796,
10352,
198,
220,
220,
220,
285,
8135,
62,
7364,
58,
12,
16,
47715,
796,
10352,
628,
220,
220,
220,
1303,
18007,
8528,
647,
198,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
18007,
278,
8528,
647,
4943,
198,
220,
220,
220,
3951,
62,
6893,
76,
796,
45941,
13,
18747,
26933,
2548,
2623,
13,
19,
11,
5014,
3388,
13,
21,
11,
4353,
3829,
13,
16,
11,
604,
15377,
13,
23,
11,
604,
15377,
13,
23,
11,
604,
33660,
13,
21,
11,
604,
4521,
17,
13,
22,
11,
642,
30120,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6135,
2414,
13,
21,
11,
9415,
1731,
13,
23,
11,
807,
23516,
13,
17,
12962,
1635,
4991,
13,
3838,
198,
220,
220,
220,
329,
1627,
62,
6893,
76,
287,
3951,
62,
6893,
76,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
21342,
76,
796,
45941,
13,
8937,
7,
19204,
62,
7364,
532,
1627,
62,
6893,
76,
8,
19841,
48091,
44,
62,
31180,
42,
62,
54,
2389,
1635,
581,
18755,
198,
220,
220,
220,
220,
220,
220,
220,
285,
8135,
62,
7364,
58,
21342,
76,
60,
796,
10352,
628,
220,
220,
220,
1303,
18007,
350,
3372,
831,
198,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
18007,
278,
350,
3372,
831,
4943,
198,
220,
220,
220,
1303,
1633,
45656,
422,
25,
198,
220,
220,
220,
1303,
3740,
1378,
2503,
13,
7266,
283,
315,
417,
3798,
3008,
13,
2398,
14,
26959,
14,
33236,
14,
6615,
14,
5303,
13,
6494,
198,
220,
220,
220,
3951,
62,
79,
3372,
796,
45941,
13,
18747,
26933,
23,
22416,
13,
21,
11,
860,
23539,
13,
15,
11,
6957,
3510,
13,
15,
11,
1802,
2920,
13,
19,
11,
16003,
2548,
13,
16,
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,
13108,
1507,
13,
16,
11,
1248,
48365,
13,
15,
12962,
1635,
4991,
13,
3838,
198,
220,
220,
220,
329,
1627,
62,
79,
3372,
287,
3951,
62,
79,
3372,
25,
198,
220,
220,
220,
220,
220,
220,
220,
20966,
3372,
796,
45941,
13,
8937,
7,
19204,
62,
7364,
532,
1627,
62,
79,
3372,
8,
19841,
48091,
44,
62,
31180,
42,
62,
54,
2389,
1635,
581,
18755,
198,
220,
220,
220,
220,
220,
220,
220,
285,
8135,
62,
7364,
58,
541,
3372,
60,
796,
10352,
628,
220,
220,
220,
1303,
18007,
1709,
441,
3087,
198,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
18007,
278,
1709,
441,
3087,
4943,
198,
220,
220,
220,
1303,
1633,
45656,
422,
25,
198,
220,
220,
220,
1303,
3740,
1378,
2503,
13,
7266,
283,
315,
417,
3798,
3008,
13,
2398,
14,
26959,
14,
33236,
14,
6615,
14,
5303,
13,
6494,
198,
220,
220,
220,
3951,
62,
1671,
330,
796,
45941,
13,
18747,
26933,
1415,
46352,
13,
15,
11,
1248,
22985,
13,
15,
11,
16994,
21,
13,
15,
11,
26881,
2816,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2608,
22800,
13,
15,
11,
2319,
25836,
13,
15,
12962,
1635,
4991,
13,
3838,
198,
220,
220,
220,
329,
1627,
62,
1671,
330,
287,
3951,
62,
1671,
330,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
2889,
330,
796,
45941,
13,
8937,
7,
19204,
62,
7364,
532,
1627,
62,
1671,
330,
8,
19841,
48091,
44,
62,
31180,
42,
62,
54,
2389,
1635,
581,
18755,
198,
220,
220,
220,
220,
220,
220,
220,
285,
8135,
62,
7364,
58,
2889,
330,
60,
796,
10352,
628,
220,
220,
220,
1303,
18007,
350,
10990,
198,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
18007,
278,
350,
10990,
4943,
198,
220,
220,
220,
1303,
1633,
45656,
422,
25,
198,
220,
220,
220,
1303,
3740,
1378,
2503,
13,
7266,
283,
315,
417,
3798,
3008,
13,
2398,
14,
26959,
14,
33236,
14,
6615,
14,
5303,
13,
6494,
198,
220,
220,
220,
3951,
62,
79,
10990,
796,
45941,
13,
18747,
26933,
24403,
3459,
13,
15,
11,
42141,
5333,
13,
15,
11,
5214,
31010,
13,
15,
11,
49669,
1495,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
767,
2231,
3695,
13,
15,
12962,
1635,
4991,
13,
3838,
198,
220,
220,
220,
329,
1627,
62,
79,
10990,
287,
3951,
62,
79,
10990,
25,
198,
220,
220,
220,
220,
220,
220,
220,
20966,
10990,
796,
45941,
13,
8937,
7,
19204,
62,
7364,
532,
1627,
62,
79,
10990,
8,
19841,
48091,
44,
62,
31180,
42,
62,
54,
2389,
1635,
581,
18755,
198,
220,
220,
220,
220,
220,
220,
220,
285,
8135,
62,
7364,
58,
541,
10990,
60,
796,
10352,
628,
220,
220,
220,
1303,
18007,
1629,
76,
13,
45616,
198,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
18007,
278,
10383,
262,
20938,
45616,
4943,
198,
220,
220,
220,
379,
907,
62,
8968,
2364,
796,
6769,
62,
7364,
19841,
20343,
13,
15,
1635,
4991,
13,
3838,
198,
220,
220,
220,
285,
8135,
62,
7364,
58,
265,
907,
62,
8968,
2364,
60,
796,
10352,
628,
220,
220,
220,
1303,
361,
5299,
33331,
333,
291,
25,
1303,
14304,
10045,
25,
220,
770,
318,
257,
5434,
198,
220,
220,
220,
611,
407,
1560,
333,
291,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
18007,
1560,
333,
291,
24774,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
44,
30463,
14026,
333,
291,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
1560,
796,
45941,
13,
1092,
26933,
19510,
19204,
62,
7364,
18189,
5441,
1795,
13,
405,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
8541,
1120,
13,
405,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
767,
14198,
13,
405,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
8854,
1821,
13,
405,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
8257,
1899,
13,
405,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
8644,
1270,
13,
405,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
10261,
940,
13,
405,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
860,
36879,
13,
405,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1367,
10232,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
18693,
1314,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
19710,
940,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
18112,
1238,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1511,
14198,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
6640,
2996,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1315,
9879,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
23313,
2154,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1467,
830,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
1467,
3064,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
25307,
1238,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
21409,
1795,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1596,
26717,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
27791,
2425,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
19204,
62,
7364,
18189,
31510,
1795,
13,
15,
1635,
4991,
13,
3838,
8,
4357,
16488,
28,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
285,
8135,
62,
7364,
58,
33331,
60,
796,
10352,
628,
220,
220,
220,
1303,
27967,
9335,
198,
220,
220,
220,
21628,
283,
62,
7364,
58,
93,
907,
74,
62,
7364,
60,
796,
657,
13,
15,
628,
220,
220,
220,
1303,
25048,
287,
7842,
10455,
198,
220,
220,
220,
479,
86,
22046,
62,
1443,
489,
500,
796,
1391,
6,
65,
591,
10223,
10354,
581,
18755,
13,
8367,
1635,
299,
411,
18755,
92,
198,
220,
220,
220,
479,
86,
22046,
62,
260,
752,
796,
1391,
6,
9806,
260,
73,
10354,
642,
92,
198,
220,
220,
220,
3054,
20786,
11,
3054,
11147,
796,
275,
22018,
500,
62,
19726,
11147,
7,
19204,
62,
7364,
13,
8367,
11,
28462,
62,
7364,
11,
21628,
283,
62,
7364,
11,
28462,
62,
7942,
11,
287,
27932,
28,
907,
74,
62,
7364,
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,
479,
86,
22046,
62,
1443,
489,
500,
28,
46265,
22046,
62,
1443,
489,
500,
11,
479,
86,
22046,
62,
260,
752,
28,
46265,
22046,
62,
260,
752,
11,
24442,
28,
24442,
8,
628,
220,
220,
220,
1303,
34,
25909,
3054,
20786,
198,
220,
220,
220,
22492,
1675,
5211,
25,
3058,
314,
1101,
15830,
262,
3054,
20786,
287,
262,
29229,
3814,
351,
257,
745,
6213,
49070,
11,
815,
356,
1487,
262,
11862,
284,
198,
220,
220,
220,
22492,
220,
220,
4197,
745,
6213,
49070,
717,
290,
788,
275,
82,
1370,
262,
7514,
12,
7266,
83,
20216,
28462,
34913,
198,
220,
220,
220,
22492,
1394,
1560,
1479,
3814,
329,
7514,
4197,
13,
1560,
17,
318,
1180,
422,
1560,
1201,
1560,
17,
2291,
517,
1402,
21427,
286,
1560,
333,
291,
1479,
198,
220,
220,
220,
22492,
7652,
13,
1560,
17,
1244,
307,
407,
11080,
329,
262,
275,
22018,
500,
15830,
13,
775,
761,
284,
2922,
257,
517,
12373,
1560,
333,
291,
3814,
329,
1111,
4007,
13,
198,
220,
220,
220,
1560,
17,
796,
45941,
13,
1092,
26933,
19510,
19204,
62,
7364,
18189,
5441,
1795,
13,
405,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
8541,
1120,
13,
405,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
767,
14198,
13,
405,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
8854,
1821,
13,
405,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
8257,
1899,
13,
405,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
8644,
1270,
13,
405,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
10261,
940,
13,
405,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
860,
36879,
13,
405,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1367,
10232,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
12279,
2231,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
19710,
940,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
18112,
1238,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1511,
7029,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
22613,
1270,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1315,
9879,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
23313,
2154,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1467,
830,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
1467,
3064,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
25307,
1238,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
21409,
1795,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
26937,
1270,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
16450,
15,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
13521,
15,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
2757,
940,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1594,
1120,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
1160,
26717,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1160,
17885,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
28815,
1238,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1987,
830,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
1987,
21033,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14808,
19204,
62,
7364,
18189,
1987,
19504,
13,
15,
1635,
4991,
13,
3838,
8,
1222,
357,
19204,
62,
7364,
19841,
1987,
22318,
13,
15,
1635,
4991,
13,
3838,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
19204,
62,
7364,
18189,
1987,
17885,
13,
15,
1635,
4991,
13,
3838,
8,
4357,
16488,
28,
15,
8,
198,
220,
220,
220,
285,
8135,
62,
439,
796,
285,
8135,
62,
7364,
13,
30073,
3419,
1303,
9335,
329,
745,
6213,
49070,
15830,
198,
220,
220,
220,
285,
8135,
62,
82,
641,
796,
285,
8135,
62,
7364,
13,
30073,
3419,
1303,
9335,
329,
3054,
20786,
198,
220,
220,
220,
1117,
11,
8805,
796,
3384,
4487,
13,
22609,
436,
62,
32604,
19282,
7,
82,
641,
20786,
8,
628,
220,
220,
220,
285,
8135,
62,
50112,
796,
357,
82,
641,
20786,
27,
28,
15,
8,
930,
357,
82,
641,
20786,
29,
16,
68,
18,
9,
1150,
8,
198,
220,
220,
220,
285,
8135,
62,
439,
58,
33331,
17,
60,
796,
10352,
198,
220,
220,
220,
285,
8135,
62,
439,
58,
907,
74,
62,
50112,
60,
796,
10352,
198,
220,
220,
220,
285,
8135,
62,
82,
641,
58,
907,
74,
62,
50112,
60,
796,
10352,
628,
220,
220,
220,
611,
357,
11925,
7,
19204,
62,
7364,
13,
8367,
58,
907,
74,
62,
439,
12962,
1279,
299,
2875,
10,
16,
8,
393,
357,
11925,
7,
19204,
62,
7364,
13,
8367,
58,
907,
74,
62,
439,
12962,
1279,
657,
13,
16,
9,
11925,
7,
19204,
62,
7364,
13,
8367,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
40539,
10786,
1026,
2331,
428,
1502,
14,
4443,
6582,
880,
1626,
262,
1560,
333,
291,
3814,
13,
1400,
745,
6213,
49070,
4197,
481,
307,
6157,
2637,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
35428,
11147,
262,
3054,
20786,
198,
220,
220,
220,
220,
220,
220,
220,
285,
8135,
62,
35428,
11,
7514,
62,
1073,
14822,
796,
3384,
4487,
13,
22609,
436,
62,
35428,
11147,
62,
67,
8457,
7,
19204,
62,
7364,
13,
8367,
58,
907,
74,
62,
439,
4357,
37659,
13,
6404,
940,
7,
82,
641,
20786,
58,
907,
74,
62,
439,
46570,
299,
2875,
11,
2163,
11639,
35428,
26601,
498,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
800,
7785,
28,
14202,
11,
5162,
44667,
796,
6045,
11,
3509,
2676,
796,
2026,
11,
287,
27932,
796,
6045,
11,
264,
13495,
796,
6045,
11,
59,
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,
2793,
796,
513,
13,
15,
11,
6727,
796,
513,
13,
15,
11,
9806,
7959,
28,
14202,
11,
9806,
260,
73,
28,
18,
11,
8094,
27740,
28,
14202,
11,
24432,
1096,
28,
14202,
11,
59,
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,
1448,
14774,
79,
844,
28,
25101,
11,
1663,
28,
15,
11,
13915,
88,
28,
17821,
11,
1904,
62,
9937,
28,
17821,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3054,
20786,
62,
35428,
796,
838,
1174,
7,
26791,
13,
20786,
62,
2100,
7,
35428,
62,
1073,
14822,
11,
6769,
62,
7364,
13,
8367,
11,
705,
35428,
26601,
498,
6,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
3054,
20786,
58,
93,
907,
74,
62,
82,
641,
60,
796,
220,
3054,
20786,
62,
35428,
58,
93,
907,
74,
62,
82,
641,
60,
198,
220,
220,
220,
220,
220,
220,
220,
611,
14257,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
6015,
12286,
82,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
6015,
10044,
4105,
17816,
10331,
13,
17989,
20520,
796,
705,
22355,
649,
374,
5185,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
7364,
13,
8367,
58,
93,
907,
74,
62,
82,
641,
4357,
3054,
20786,
58,
93,
907,
74,
62,
82,
641,
4357,
705,
2127,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
7364,
13,
8367,
11,
3054,
20786,
62,
35428,
11,
705,
81,
12,
3256,
18242,
11639,
34220,
11147,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
7364,
13,
8367,
11,
3054,
20786,
11,
705,
74,
12,
3256,
18242,
11639,
1443,
489,
500,
15830,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
88,
2475,
7,
15,
13,
15,
11,
1802,
13,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
1455,
437,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
87,
18242,
10786,
33484,
26623,
685,
648,
60,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
2645,
9608,
10786,
50,
641,
20786,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
12860,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
19836,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
26875,
7,
5647,
7857,
16193,
940,
11,
718,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
565,
69,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
7364,
13,
8367,
11,
69,
22564,
62,
7364,
9,
82,
641,
20786,
11,
6167,
11639,
9771,
2889,
515,
27217,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
7364,
13,
8367,
11,
69,
22564,
62,
7942,
11,
6167,
11639,
17633,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
7364,
13,
8367,
11,
37659,
13,
31166,
17034,
7,
16,
14,
452,
283,
62,
7364,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
1455,
437,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
87,
18242,
10786,
33484,
26623,
685,
648,
60,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
2645,
9608,
10786,
37,
22564,
685,
6422,
14,
82,
14,
11215,
17,
14,
13450,
8183,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
88,
2475,
7,
15,
11,
37659,
13,
1150,
666,
7,
69,
22564,
62,
7942,
27493,
17,
13,
20,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
7839,
10786,
19006,
19267,
10958,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
12860,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
19836,
3419,
628,
198,
220,
220,
220,
1303,
449,
44602,
9578,
572,
994,
13,
198,
220,
220,
220,
1303,
30481,
262,
8633,
198,
220,
220,
220,
1303,
907,
14542,
13,
1818,
7203,
3792,
949,
11,
3509,
290,
6769,
62,
1084,
11,
6769,
62,
9806,
257,
23418,
1701,
8,
198,
220,
220,
220,
1303,
82,
641,
62,
11600,
796,
8633,
7,
19204,
28,
19204,
62,
82,
641,
11,
3054,
20786,
28,
82,
641,
20786,
11,
949,
28,
14202,
11,
3509,
28,
14202,
11,
14367,
28,
19282,
62,
11600,
8,
628,
220,
220,
220,
1303,
3060,
287,
6769,
1084,
11,
19204,
9806,
198,
220,
220,
220,
3054,
62,
11600,
796,
23884,
198,
220,
220,
220,
3054,
62,
11600,
17816,
19204,
20520,
796,
6769,
62,
7364,
198,
220,
220,
220,
3054,
62,
11600,
17816,
82,
641,
20786,
20520,
796,
3054,
20786,
198,
220,
220,
220,
3054,
62,
11600,
17816,
19204,
62,
1084,
20520,
796,
45941,
13,
1084,
7,
19204,
62,
7364,
8,
198,
220,
220,
220,
3054,
62,
11600,
17816,
19204,
62,
9806,
20520,
796,
45941,
13,
9806,
7,
19204,
62,
7364,
8,
198,
220,
220,
220,
3054,
62,
11600,
17816,
1069,
457,
524,
20520,
28,
409,
457,
524,
198,
220,
220,
220,
3054,
62,
11600,
17816,
958,
22208,
20520,
28,
1633,
22208,
198,
220,
220,
220,
3054,
62,
11600,
17816,
19282,
62,
7753,
20520,
28,
14367,
62,
7753,
198,
220,
220,
220,
1303,
3497,
584,
8251,
422,
3210,
8633,
198,
220,
220,
220,
3054,
62,
11600,
17816,
19282,
62,
430,
20520,
796,
14367,
62,
11600,
17816,
19282,
62,
430,
20520,
198,
220,
220,
220,
3054,
62,
11600,
17816,
19282,
62,
12501,
20520,
796,
14367,
62,
11600,
17816,
19282,
62,
12501,
20520,
198,
220,
220,
220,
3054,
62,
11600,
17816,
19282,
62,
3672,
20520,
796,
14367,
62,
11600,
17816,
3672,
20520,
198,
220,
220,
220,
3054,
62,
11600,
17816,
9948,
62,
7753,
20520,
796,
14367,
62,
11600,
17816,
9948,
62,
7753,
20520,
198,
220,
220,
220,
3054,
62,
11600,
17816,
69,
22564,
62,
7942,
20520,
796,
28462,
62,
7942,
198,
220,
220,
220,
1303,
82,
641,
62,
11600,
17816,
19282,
62,
11600,
20520,
796,
14367,
62,
11600,
198,
220,
220,
220,
1303,
82,
641,
62,
11600,
17816,
907,
74,
62,
7364,
20520,
796,
285,
8135,
62,
7364,
198,
220,
220,
220,
1303,
82,
641,
62,
11600,
17816,
19726,
62,
2617,
20520,
796,
2153,
62,
2617,
628,
220,
220,
220,
1441,
3054,
62,
11600,
628,
198,
2235,
275,
22018,
500,
62,
19726,
11147,
318,
39224,
379,
428,
2589,
13,
198,
4299,
275,
22018,
500,
62,
19726,
11147,
7,
19204,
11,
28462,
11,
21628,
283,
11,
28462,
62,
19282,
11,
287,
27932,
28,
14202,
11,
3509,
2676,
28,
2327,
11,
6727,
28,
17,
11,
2793,
28,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
479,
86,
22046,
62,
1443,
489,
500,
34758,
5512,
479,
86,
22046,
62,
260,
752,
34758,
5512,
14257,
28,
25101,
11,
905,
62,
48,
32,
28,
25101,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
35006,
257,
275,
22018,
500,
4197,
284,
262,
28462,
8064,
286,
3210,
284,
198,
220,
220,
220,
6515,
9853,
13,
16718,
284,
7716,
257,
14233,
2163,
13,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
6769,
1058,
299,
67,
18747,
198,
220,
220,
220,
220,
220,
28400,
355,
6515,
198,
220,
220,
220,
28462,
1058,
299,
67,
18747,
198,
220,
220,
220,
220,
220,
9853,
14,
82,
355,
6515,
198,
220,
220,
220,
21628,
283,
1058,
299,
67,
18747,
198,
220,
220,
220,
220,
220,
34062,
24198,
198,
220,
220,
220,
28462,
62,
19282,
1058,
39789,
7177,
198,
220,
220,
220,
220,
220,
3210,
3491,
2081,
28462,
357,
6422,
14,
82,
14,
11215,
61,
17,
14,
32,
8,
198,
220,
220,
220,
287,
27932,
1058,
299,
67,
18747,
198,
220,
220,
220,
220,
220,
275,
22018,
500,
9335,
198,
220,
220,
220,
3509,
2676,
1058,
18253,
198,
220,
220,
220,
220,
220,
5415,
1271,
286,
34820,
329,
275,
22018,
500,
62,
2676,
11147,
198,
220,
220,
220,
6727,
1058,
18253,
198,
220,
220,
220,
220,
220,
1271,
286,
264,
13495,
329,
17927,
287,
275,
22018,
500,
62,
2676,
11147,
198,
220,
220,
220,
2793,
1058,
18253,
198,
220,
220,
220,
220,
220,
1271,
286,
264,
13495,
329,
17927,
287,
275,
22018,
500,
62,
2676,
11147,
198,
220,
220,
220,
479,
86,
22046,
62,
1443,
489,
500,
1058,
8633,
11,
11902,
198,
220,
220,
220,
220,
220,
26286,
329,
275,
22018,
500,
62,
2676,
11147,
198,
220,
220,
220,
479,
86,
22046,
62,
260,
752,
1058,
8633,
11,
11902,
198,
220,
220,
220,
220,
220,
26286,
329,
275,
22018,
500,
62,
2676,
11147,
198,
220,
220,
220,
14257,
1058,
20512,
198,
220,
220,
220,
220,
220,
611,
6407,
2523,
617,
10873,
1018,
2667,
21528,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
275,
2617,
62,
6404,
16,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
13610,
4866,
286,
262,
26515,
284,
3368,
17613,
198,
220,
220,
220,
6769,
62,
8158,
796,
6769,
13,
30073,
3419,
198,
220,
220,
220,
28462,
62,
8158,
796,
28462,
13,
30073,
3419,
198,
220,
220,
220,
21628,
283,
62,
8158,
796,
21628,
283,
13,
30073,
3419,
628,
220,
220,
220,
1303,
10629,
26515,
284,
1057,
287,
275,
22018,
500,
62,
2676,
11147,
628,
220,
220,
220,
611,
45941,
13,
439,
7,
93,
37659,
13,
4468,
9504,
7,
452,
283,
62,
8158,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
40539,
7203,
26705,
45,
389,
1944,
287,
262,
34062,
24198,
4943,
628,
220,
220,
220,
1303,
19141,
1723,
26515,
284,
1057,
287,
275,
22018,
500,
62,
2676,
11147,
628,
220,
220,
220,
611,
45941,
13,
439,
7,
93,
37659,
13,
4468,
9504,
7,
452,
283,
62,
8158,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
40539,
7203,
26705,
45,
389,
1944,
287,
262,
34062,
24198,
4943,
628,
220,
220,
220,
1303,
3982,
5165,
41528,
3183,
628,
220,
220,
220,
1303,
27131,
378,
2604,
286,
28462,
62,
8158,
4634,
257,
4314,
379,
309,
1268,
56,
198,
220,
220,
220,
2604,
69,
22564,
62,
8158,
796,
362,
13,
20,
1635,
45941,
13,
6404,
940,
7,
37659,
13,
47033,
7,
69,
22564,
62,
8158,
11,
309,
1268,
56,
4008,
198,
220,
220,
220,
1303,
5345,
257,
4259,
1988,
329,
262,
24198,
286,
2604,
69,
22564,
198,
220,
220,
220,
2604,
452,
283,
62,
8158,
796,
45941,
13,
1952,
62,
2339,
7,
6404,
69,
22564,
62,
8158,
8,
1635,
357,
940,
13,
15,
12429,
362,
8,
628,
220,
220,
220,
1303,
27131,
378,
2604,
286,
28462,
62,
19282,
2746,
4634,
257,
4314,
379,
309,
1268,
56,
198,
220,
220,
220,
2604,
69,
22564,
62,
19282,
796,
362,
13,
20,
1635,
45941,
13,
6404,
940,
7,
37659,
13,
47033,
7,
69,
22564,
62,
19282,
11,
309,
1268,
56,
4008,
628,
220,
220,
220,
1303,
27131,
378,
8064,
4634,
257,
4314,
379,
28263,
42296,
34,
62,
23678,
290,
257,
13387,
379,
198,
220,
220,
220,
1303,
28263,
42296,
34,
62,
22921,
198,
220,
220,
220,
2153,
20786,
796,
2604,
69,
22564,
62,
19282,
532,
2604,
69,
22564,
62,
8158,
198,
220,
220,
220,
2153,
20786,
796,
45941,
13,
47033,
7,
37659,
13,
39504,
7,
19726,
20786,
11,
28263,
42296,
34,
62,
22921,
828,
28263,
42296,
34,
62,
23678,
8,
198,
220,
220,
220,
2153,
20786,
62,
27932,
796,
357,
19726,
20786,
1279,
657,
13,
2079,
1635,
28263,
42296,
34,
62,
22921,
8,
1222,
357,
19726,
20786,
1875,
657,
13,
2079,
1635,
28263,
42296,
34,
62,
23678,
8,
628,
220,
220,
220,
1303,
18007,
503,
34380,
198,
220,
220,
220,
1303,
9335,
83,
313,
28,
17821,
1724,
922,
17465,
198,
220,
220,
220,
611,
287,
27932,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
9335,
83,
313,
796,
357,
452,
283,
62,
8158,
1875,
657,
13,
15,
8,
1222,
45941,
13,
4468,
9504,
7,
6404,
69,
22564,
62,
8158,
8,
1222,
45941,
13,
4468,
9504,
7,
452,
283,
62,
8158,
8,
1222,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45941,
13,
4468,
9504,
7,
6404,
69,
22564,
62,
19282,
8,
1222,
2153,
20786,
62,
27932,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
9335,
83,
313,
796,
287,
27932,
1222,
357,
452,
283,
62,
8158,
1875,
657,
13,
15,
8,
1222,
45941,
13,
4468,
9504,
7,
6404,
69,
22564,
62,
8158,
8,
1222,
45941,
13,
4468,
9504,
7,
452,
283,
62,
8158,
8,
1222,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45941,
13,
4468,
9504,
7,
6404,
69,
22564,
62,
19282,
8,
1222,
2153,
20786,
62,
27932,
198,
220,
220,
220,
2604,
452,
283,
62,
8158,
58,
93,
27932,
83,
313,
60,
796,
657,
13,
628,
220,
220,
220,
1303,
27131,
378,
3054,
20786,
198,
220,
220,
220,
3054,
20786,
796,
838,
13,
15,
12429,
357,
15,
13,
19,
1635,
2153,
20786,
8,
628,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
24243,
1096,
275,
22018,
500,
329,
28462,
36537,
4943,
628,
220,
220,
220,
2315,
62,
1443,
489,
500,
796,
279,
5173,
75,
13,
1443,
489,
500,
7,
19204,
62,
8158,
11,
275,
591,
10223,
28,
46265,
22046,
62,
1443,
489,
500,
17816,
65,
591,
10223,
6,
12962,
198,
220,
220,
220,
1336,
65,
74,
457,
796,
2315,
62,
1443,
489,
500,
13,
9032,
13033,
628,
220,
220,
220,
1303,
43001,
2751,
6225,
572,
9335,
278,
329,
783,
198,
220,
220,
220,
1303,
4781,
29229,
7652,
422,
2270,
13033,
198,
220,
220,
220,
285,
8135,
62,
8158,
796,
45941,
13,
1952,
62,
2339,
7,
19204,
62,
8158,
737,
459,
2981,
7,
30388,
8,
198,
220,
220,
220,
285,
8135,
62,
8158,
58,
93,
27932,
83,
313,
60,
796,
10352,
198,
220,
220,
220,
285,
8135,
62,
65,
74,
457,
796,
629,
541,
88,
13,
3849,
16104,
378,
13,
3849,
79,
16,
67,
7,
19204,
62,
8158,
11,
285,
8135,
62,
8158,
11,
1611,
11639,
710,
12423,
3256,
6070,
62,
8367,
11639,
2302,
2416,
27976,
6,
5769,
12853,
65,
74,
457,
8,
198,
220,
220,
220,
2315,
62,
9032,
13033,
796,
1336,
65,
74,
457,
58,
907,
74,
62,
65,
74,
457,
1875,
657,
13,
17032,
60,
628,
220,
220,
220,
1303,
2315,
62,
9032,
13033,
796,
1336,
65,
74,
457,
628,
220,
220,
220,
1303,
220,
3274,
2835,
286,
262,
4197,
25,
198,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
33,
22018,
500,
4197,
25,
2239,
352,
4943,
198,
220,
220,
220,
275,
2617,
16,
11,
275,
27932,
796,
279,
5173,
75,
13,
2676,
11147,
7,
19204,
62,
8158,
11,
2153,
20786,
11,
800,
7785,
28,
6404,
452,
283,
62,
8158,
11,
287,
27932,
28,
27932,
83,
313,
11,
6727,
28,
45828,
11,
2793,
28,
21037,
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,
1336,
65,
74,
457,
28,
15003,
62,
9032,
13033,
11,
3509,
2676,
28,
9806,
2676,
11,
479,
86,
22046,
62,
1443,
489,
500,
28,
46265,
22046,
62,
1443,
489,
500,
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,
479,
86,
22046,
62,
260,
752,
28,
46265,
22046,
62,
260,
752,
8,
198,
220,
220,
220,
2604,
11147,
16,
11,
4808,
796,
275,
2617,
16,
13,
8367,
7,
19204,
62,
8158,
8,
198,
220,
220,
220,
2604,
11147,
62,
65,
74,
457,
11,
4808,
796,
275,
2617,
16,
13,
8367,
7,
15003,
62,
9032,
13033,
8,
628,
220,
220,
220,
611,
14257,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
6822,
329,
36537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
26875,
7,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
11,
2153,
20786,
11,
3197,
7635,
11639,
20214,
12,
13602,
3256,
3124,
11639,
13424,
3256,
6167,
11639,
19726,
20786,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
11,
2604,
11147,
16,
11,
3124,
11639,
20772,
25547,
17585,
3256,
6167,
11639,
6404,
11147,
16,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
58,
93,
27932,
83,
313,
4357,
2153,
20786,
58,
93,
27932,
83,
313,
4357,
705,
10,
3256,
3124,
11639,
445,
3256,
19736,
1096,
28,
20,
13,
15,
11,
6167,
11639,
27932,
276,
2153,
20786,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
58,
93,
27932,
83,
313,
4357,
2604,
11147,
16,
58,
93,
27932,
83,
313,
4357,
705,
10,
3256,
3124,
11639,
445,
3256,
19736,
1096,
28,
20,
13,
15,
11,
6167,
11639,
27932,
276,
2604,
11147,
16,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
15003,
62,
9032,
13033,
11,
2604,
11147,
62,
65,
74,
457,
11,
705,
2637,
11,
3124,
11639,
14809,
3256,
19736,
1096,
28,
19,
13,
15,
11,
6167,
11639,
9032,
13033,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
15003,
62,
9032,
13033,
11,
45941,
13,
3849,
79,
7,
15003,
62,
9032,
13033,
11,
6769,
62,
8158,
11,
2153,
20786,
828,
705,
2637,
11,
3124,
11639,
14809,
3256,
19736,
1096,
28,
19,
13,
15,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6167,
11639,
9032,
13033,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
11,
352,
13,
15,
1220,
45941,
13,
31166,
17034,
7,
6404,
452,
283,
62,
8158,
828,
3124,
11639,
43745,
3256,
6167,
11639,
82,
13495,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
1455,
437,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
87,
18242,
10786,
33484,
26623,
685,
648,
60,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
88,
2475,
7,
15,
13,
15,
11,
352,
13,
17,
1635,
28263,
42296,
34,
62,
22921,
8,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
7839,
10786,
16,
301,
347,
22018,
500,
4197,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
12860,
3419,
628,
220,
220,
220,
2746,
11147,
16,
796,
45941,
13,
6477,
7,
940,
13,
15,
11,
657,
13,
19,
1635,
45941,
13,
47033,
7,
37659,
13,
39504,
7,
6404,
11147,
16,
11,
28263,
42296,
34,
62,
22921,
828,
28263,
42296,
34,
62,
23678,
4008,
198,
220,
220,
220,
29598,
796,
3054,
20786,
1220,
357,
4666,
7046,
270,
16,
1343,
357,
4666,
7046,
270,
16,
6624,
657,
4008,
532,
352,
13,
198,
220,
220,
220,
1303,
649,
62,
27932,
796,
9335,
83,
313,
1222,
357,
82,
641,
20786,
1875,
657,
8,
628,
220,
220,
220,
1303,
29598,
62,
452,
283,
796,
357,
4666,
7046,
270,
16,
1635,
28462,
62,
8158,
1220,
357,
82,
641,
20786,
1343,
357,
82,
641,
20786,
6624,
657,
13,
15,
22305,
12429,
362,
1635,
21628,
283,
62,
8158,
198,
220,
220,
220,
29598,
62,
452,
283,
796,
45941,
13,
1952,
62,
2339,
7,
411,
312,
723,
8,
1220,
357,
15,
13,
16,
12429,
362,
8,
198,
220,
220,
220,
29598,
62,
452,
283,
796,
29598,
62,
452,
283,
1635,
9335,
83,
313,
628,
220,
220,
220,
357,
32604,
11,
1117,
11,
336,
1860,
1990,
8,
796,
264,
13495,
62,
565,
3949,
62,
34242,
7,
411,
312,
723,
58,
27932,
83,
313,
4357,
264,
13495,
62,
21037,
28,
18,
13,
15,
11,
264,
13495,
62,
45828,
28,
18,
13,
15,
8,
628,
220,
220,
220,
611,
45941,
13,
1150,
666,
7,
301,
1860,
1990,
1875,
657,
13,
486,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
5498,
2835,
286,
262,
4197,
25,
198,
220,
220,
220,
220,
220,
220,
220,
13845,
14542,
13,
10951,
7203,
33,
22018,
500,
4197,
25,
2239,
362,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
2735,
466,
530,
517,
4197,
284,
262,
8064,
286,
1366,
14,
19849,
532,
352,
13,
198,
220,
220,
220,
220,
220,
220,
220,
275,
2617,
62,
411,
312,
723,
11,
275,
27932,
17,
796,
279,
5173,
75,
13,
2676,
11147,
7,
19204,
62,
8158,
11,
29598,
11,
800,
7785,
28,
411,
312,
723,
62,
452,
283,
11,
287,
27932,
28,
27932,
83,
313,
11,
6727,
28,
45828,
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,
2793,
28,
21037,
11,
3509,
2676,
28,
9806,
2676,
11,
1336,
65,
74,
457,
28,
1443,
316,
16,
13,
9032,
13033,
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,
479,
86,
22046,
62,
1443,
489,
500,
28,
46265,
22046,
62,
1443,
489,
500,
11,
479,
86,
22046,
62,
260,
752,
28,
46265,
22046,
62,
260,
752,
8,
198,
220,
220,
220,
220,
220,
220,
220,
275,
2617,
62,
6404,
16,
796,
275,
2617,
16,
13,
30073,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
275,
2617,
62,
6404,
16,
13,
1073,
14822,
796,
275,
2617,
62,
6404,
16,
13,
1073,
14822,
1343,
275,
2617,
62,
411,
312,
723,
13,
1073,
14822,
198,
220,
220,
220,
220,
220,
220,
220,
611,
14257,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
6822,
329,
36537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15384,
62,
11147,
11,
4808,
796,
275,
2617,
62,
411,
312,
723,
13,
8367,
7,
19204,
62,
8158,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
11147,
17,
11,
4808,
796,
275,
2617,
62,
6404,
16,
13,
8367,
7,
19204,
62,
8158,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
11147,
17,
62,
65,
74,
457,
11,
4808,
796,
275,
2617,
62,
6404,
16,
13,
8367,
7,
1443,
316,
16,
13,
9032,
13033,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
26875,
7,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
11,
29598,
11,
3197,
7635,
11639,
20214,
12,
13602,
3256,
3124,
11639,
13424,
3256,
6167,
11639,
411,
312,
723,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
11,
15384,
62,
11147,
11,
3124,
11639,
20772,
25547,
17585,
3256,
6167,
11639,
411,
312,
62,
11147,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
58,
93,
27932,
83,
313,
4357,
29598,
58,
93,
27932,
83,
313,
4357,
705,
10,
3256,
3124,
11639,
445,
3256,
19736,
1096,
28,
20,
13,
15,
11,
6167,
11639,
27932,
276,
29598,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
58,
93,
27932,
83,
313,
4357,
15384,
62,
11147,
58,
93,
27932,
83,
313,
4357,
705,
10,
3256,
3124,
11639,
445,
3256,
19736,
1096,
28,
20,
13,
15,
11,
6167,
11639,
27932,
276,
15384,
62,
11147,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
15003,
62,
9032,
13033,
11,
2604,
11147,
17,
62,
65,
74,
457,
11,
705,
2637,
11,
3124,
11639,
14809,
3256,
19736,
1096,
28,
19,
13,
15,
11,
6167,
11639,
9032,
13033,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
11,
352,
13,
15,
1220,
45941,
13,
31166,
17034,
7,
411,
312,
723,
62,
452,
283,
828,
3124,
11639,
43745,
3256,
6167,
11639,
82,
13495,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
1455,
437,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
87,
18242,
10786,
33484,
26623,
685,
648,
60,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
88,
2475,
32590,
15,
13,
16,
11,
657,
13,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
7839,
10786,
17,
358,
347,
22018,
500,
4197,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
12860,
3419,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
275,
2617,
62,
6404,
16,
796,
275,
2617,
16,
13,
30073,
3419,
628,
220,
220,
220,
1303,
1675,
5211,
449,
44602,
314,
892,
356,
815,
1445,
3371,
3597,
428,
503,
355,
257,
15879,
287,
257,
11414,
3084,
198,
220,
220,
220,
1303,
2138,
621,
262,
275,
12,
22018,
500,
13,
628,
220,
220,
220,
1303,
13610,
14233,
2163,
198,
220,
220,
220,
649,
6404,
11147,
11,
4808,
796,
275,
2617,
62,
6404,
16,
13,
8367,
7,
19204,
62,
8158,
8,
198,
220,
220,
220,
3054,
11147,
796,
45941,
13,
6477,
7,
940,
13,
15,
11,
657,
13,
19,
1635,
45941,
13,
47033,
7,
37659,
13,
39504,
7,
3605,
6404,
11147,
11,
28263,
42296,
34,
62,
22921,
828,
28263,
42296,
34,
62,
23678,
4008,
198,
220,
220,
220,
3054,
11147,
58,
93,
19726,
20786,
62,
27932,
60,
796,
657,
13,
15,
628,
220,
220,
220,
611,
14257,
25,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
6822,
329,
36537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
26875,
7,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
11,
3054,
20786,
11,
3197,
7635,
11639,
20214,
12,
13602,
3256,
3124,
11639,
13424,
3256,
6167,
11639,
82,
641,
20786,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
11,
3054,
11147,
11,
3124,
11639,
20772,
25547,
17585,
3256,
6167,
11639,
82,
641,
20786,
4197,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
58,
93,
27932,
83,
313,
4357,
3054,
20786,
58,
93,
27932,
83,
313,
4357,
705,
10,
3256,
3124,
11639,
445,
3256,
19736,
1096,
28,
20,
13,
15,
11,
6167,
11639,
27932,
276,
3054,
20786,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
58,
93,
27932,
83,
313,
4357,
3054,
11147,
58,
93,
27932,
83,
313,
4357,
705,
10,
3256,
3124,
11639,
445,
3256,
19736,
1096,
28,
20,
13,
15,
11,
6167,
11639,
27932,
276,
3054,
20786,
11147,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
1455,
437,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
87,
18242,
10786,
33484,
26623,
685,
648,
60,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
88,
2475,
7,
15,
13,
15,
11,
1802,
13,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
12860,
3419,
628,
220,
220,
220,
1303,
6822,
3081,
286,
262,
4197,
198,
220,
220,
220,
2352,
7959,
796,
45941,
13,
1150,
666,
7,
37659,
13,
8937,
7,
82,
641,
11147,
1220,
2746,
11147,
16,
532,
352,
4008,
198,
220,
220,
220,
13845,
14542,
13,
10951,
10786,
28813,
1945,
1022,
11414,
318,
46110,
70,
92,
4458,
18982,
7,
8937,
7959,
4008,
628,
220,
220,
220,
1303,
6822,
329,
29598,
286,
262,
4197,
198,
220,
220,
220,
611,
14257,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
5046,
796,
45941,
13,
6477,
7,
940,
13,
15,
11,
657,
13,
19,
1635,
3054,
11147,
8,
198,
220,
220,
220,
220,
220,
220,
220,
28462,
62,
9948,
796,
28462,
62,
8158,
1635,
3054,
11147,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
283,
62,
9948,
796,
21628,
283,
62,
8158,
1220,
3054,
11147,
12429,
362,
13,
628,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
6015,
12286,
82,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
6015,
10044,
4105,
17816,
10331,
13,
17989,
20520,
28,
705,
22355,
649,
374,
5185,
6,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
26875,
7,
5647,
7857,
16193,
1157,
11,
807,
13,
20,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
565,
69,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
11,
69,
22564,
62,
9948,
11,
6167,
11639,
9771,
2889,
515,
27217,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
11,
69,
22564,
62,
19282,
11,
6167,
11639,
17633,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
29487,
7,
19204,
62,
8158,
11,
37659,
13,
31166,
17034,
7,
16,
14,
452,
283,
62,
9948,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
1455,
437,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
87,
18242,
10786,
33484,
26623,
685,
648,
60,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
2645,
9608,
10786,
37,
22564,
685,
6422,
14,
82,
14,
11215,
17,
14,
13450,
8183,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
88,
2475,
7,
15,
11,
37659,
13,
1150,
666,
7,
69,
22564,
62,
19282,
27493,
17,
13,
20,
8,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
12860,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
458,
83,
13,
19836,
3419,
628,
220,
220,
220,
1303,
1195,
32,
198,
220,
220,
220,
13845,
14542,
13,
1818,
7203,
4550,
1195,
32,
329,
14233,
2163,
4943,
198,
220,
220,
220,
611,
905,
62,
48,
32,
25,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
64,
62,
1443,
489,
500,
62,
19726,
11147,
7,
19204,
62,
8158,
11,
275,
2617,
62,
6404,
16,
11,
2153,
20786,
11,
9335,
83,
313,
8,
628,
220,
220,
220,
1441,
3054,
20786,
11,
82,
641,
11147,
198
] | 2.175512 | 11,777 |
from argparse import ArgumentParser
import os
import re
from collections import defaultdict
import random
import spacy
nlp = spacy.load('en_core_web_sm')
target = DataFetcher()
def ArgParser():
'''
This is the function to parse your arguments into a more understable form and
provide relavant help whenever needed.
The package usage are as follows:
python virtuoso <path_to_templates> <path_to_outputs>
<path_to_templates> is the path to the text file having templates as mentioned
in the README file.
<path_to_generated> is the file path and the file name in which the csv needs to be
stored.
The script is compatible with python>3.5.2
'''
parser = ArgumentParser()
parser.add_argument(
"Text_file_path",
help=".txt file relative path // in which templates are stored")
parser.add_argument(
"Output_file_path",
help="relative path of file where data is to be stored")
args = parser.parse_args()
textPath = args.Text_file_path
# Append a txt extention to the templates file if not specified
textPath = textPath + '.txt' if len(textPath.split('.')) == 1 else textPath
savePath = args.Output_file_path
# Append a csv extention to the templates file if not specified
savePath = args.Output_file_path + '.csv' if len(
savePath.split('.')) == 1 else args.Output_file_path
return textPath, savePath
if __name__ == '__main__':
textPath, savePath = ArgParser()
# Reading templates
with open(textPath, 'r') as f:
textData = f.readlines()
mode = 'a' if os.path.exists(savePath) else 'w'
header = 'data'
count = 0
with open(savePath, mode) as out:
for line in textData:
tokens = line.split()
repeats = 1 if tokens[0].replace("{", "").replace(
"}", "") == '' else tokens[0].replace("{", "").replace(
"}", "")
query = ' '.join(tokens[1:])
res = []
for _ in range(int(repeats)):
res.append(process_string(query))
out.write(res[0] + '\n')
| [
6738,
1822,
29572,
1330,
45751,
46677,
198,
11748,
28686,
198,
11748,
302,
198,
6738,
17268,
1330,
4277,
11600,
198,
11748,
4738,
198,
11748,
599,
1590,
198,
198,
21283,
79,
796,
599,
1590,
13,
2220,
10786,
268,
62,
7295,
62,
12384,
62,
5796,
11537,
628,
198,
198,
16793,
796,
6060,
37,
316,
2044,
3419,
628,
628,
198,
4299,
20559,
46677,
33529,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
770,
318,
262,
2163,
284,
21136,
534,
7159,
656,
257,
517,
739,
31284,
1296,
290,
220,
198,
220,
220,
220,
2148,
823,
615,
415,
1037,
8797,
2622,
13,
628,
220,
220,
220,
383,
5301,
8748,
389,
355,
5679,
25,
198,
220,
220,
220,
21015,
4118,
84,
28213,
1279,
6978,
62,
1462,
62,
11498,
17041,
29,
1279,
6978,
62,
1462,
62,
22915,
82,
29,
628,
220,
220,
220,
1279,
6978,
62,
1462,
62,
11498,
17041,
29,
318,
262,
3108,
284,
262,
2420,
2393,
1719,
24019,
355,
4750,
220,
198,
220,
220,
220,
287,
262,
20832,
11682,
2393,
13,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1279,
6978,
62,
1462,
62,
27568,
29,
318,
262,
2393,
3108,
290,
262,
2393,
1438,
287,
543,
262,
269,
21370,
2476,
284,
307,
220,
198,
220,
220,
220,
8574,
13,
628,
220,
220,
220,
383,
4226,
318,
11670,
351,
21015,
29,
18,
13,
20,
13,
17,
220,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
30751,
796,
45751,
46677,
3419,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
8206,
62,
7753,
62,
6978,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
1037,
28,
1911,
14116,
2393,
3585,
3108,
3373,
287,
543,
24019,
389,
8574,
4943,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
26410,
62,
7753,
62,
6978,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
43762,
3108,
286,
2393,
810,
1366,
318,
284,
307,
8574,
4943,
198,
220,
220,
220,
26498,
796,
30751,
13,
29572,
62,
22046,
3419,
628,
220,
220,
220,
2420,
15235,
796,
26498,
13,
8206,
62,
7753,
62,
6978,
198,
220,
220,
220,
1303,
2034,
437,
257,
256,
742,
1070,
1463,
284,
262,
24019,
2393,
611,
407,
7368,
198,
220,
220,
220,
2420,
15235,
796,
2420,
15235,
1343,
45302,
14116,
6,
611,
18896,
7,
5239,
15235,
13,
35312,
10786,
2637,
4008,
6624,
352,
2073,
2420,
15235,
628,
220,
220,
220,
3613,
15235,
796,
26498,
13,
26410,
62,
7753,
62,
6978,
198,
220,
220,
220,
1303,
2034,
437,
257,
269,
21370,
1070,
1463,
284,
262,
24019,
2393,
611,
407,
7368,
198,
220,
220,
220,
3613,
15235,
796,
26498,
13,
26410,
62,
7753,
62,
6978,
1343,
45302,
40664,
6,
611,
18896,
7,
198,
220,
220,
220,
220,
220,
220,
220,
3613,
15235,
13,
35312,
10786,
2637,
4008,
6624,
352,
2073,
26498,
13,
26410,
62,
7753,
62,
6978,
628,
220,
220,
220,
1441,
2420,
15235,
11,
3613,
15235,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
2420,
15235,
11,
3613,
15235,
796,
20559,
46677,
3419,
628,
220,
220,
220,
1303,
11725,
24019,
198,
220,
220,
220,
351,
1280,
7,
5239,
15235,
11,
705,
81,
11537,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2420,
6601,
796,
277,
13,
961,
6615,
3419,
198,
220,
220,
220,
4235,
796,
705,
64,
6,
611,
28686,
13,
6978,
13,
1069,
1023,
7,
21928,
15235,
8,
2073,
705,
86,
6,
198,
220,
220,
220,
13639,
796,
705,
7890,
6,
198,
220,
220,
220,
954,
796,
657,
198,
220,
220,
220,
351,
1280,
7,
21928,
15235,
11,
4235,
8,
355,
503,
25,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1627,
287,
2420,
6601,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16326,
796,
1627,
13,
35312,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29819,
796,
352,
611,
16326,
58,
15,
4083,
33491,
7203,
90,
1600,
366,
11074,
33491,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
92,
1600,
366,
4943,
6624,
10148,
2073,
16326,
58,
15,
4083,
33491,
7203,
90,
1600,
366,
11074,
33491,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
92,
1600,
366,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12405,
796,
705,
45302,
22179,
7,
83,
482,
641,
58,
16,
25,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
581,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
4808,
287,
2837,
7,
600,
7,
45956,
1381,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
581,
13,
33295,
7,
14681,
62,
8841,
7,
22766,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
503,
13,
13564,
7,
411,
58,
15,
60,
1343,
705,
59,
77,
11537,
198
] | 2.53066 | 848 |
APPNAME = 'catcher-modules'
APPAUTHOR = 'Valerii Tikhonov, Ekaterina Belova'
APPVSN = '6.0.0'
| [
2969,
13137,
10067,
796,
705,
9246,
2044,
12,
18170,
6,
198,
2969,
4537,
24318,
1581,
796,
705,
7762,
263,
4178,
309,
13848,
261,
709,
11,
31873,
729,
1437,
3944,
10071,
6,
198,
24805,
53,
15571,
796,
705,
21,
13,
15,
13,
15,
6,
198
] | 2.136364 | 44 |
from typing import Optional
from bxcommon.utils.alarm_queue import AlarmQueue
from bxutils import logging
logger = logging.get_logger(__name__)
| [
6738,
19720,
1330,
32233,
198,
198,
6738,
275,
87,
11321,
13,
26791,
13,
282,
1670,
62,
36560,
1330,
978,
1670,
34991,
198,
6738,
275,
87,
26791,
1330,
18931,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
62,
6404,
1362,
7,
834,
3672,
834,
8,
628
] | 3.266667 | 45 |
import sys
sys.path.append("./AcademicDealerBackend/users")
from tests.py import CoreFunctionalTest
CoreFunctionalTest().test_core_functions()
| [
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7,
1911,
14,
12832,
49113,
45776,
263,
7282,
437,
14,
18417,
4943,
198,
6738,
5254,
13,
9078,
1330,
7231,
22203,
282,
14402,
198,
198,
14055,
22203,
282,
14402,
22446,
9288,
62,
7295,
62,
12543,
2733,
3419,
628
] | 3.222222 | 45 |
# RunSnakeRun
# https://pypi.python.org/pypi/RunSnakeRun
# http://www.vrplumber.com/programming/runsnakerun/ | [
2,
5660,
49795,
10987,
198,
2,
3740,
1378,
79,
4464,
72,
13,
29412,
13,
2398,
14,
79,
4464,
72,
14,
10987,
49795,
10987,
198,
2,
2638,
1378,
2503,
13,
37020,
489,
4494,
13,
785,
14,
23065,
2229,
14,
5143,
16184,
3110,
403,
14
] | 2.511628 | 43 |
# %%
from typing import List
from monty.serialization import loadfn
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from dash_mp_components import Simple3DScene
from pymatgen import Site
import crystal_toolkit # noqa: F401
from pymatgen.analysis.graphs import MoleculeGraph
from pymatgen.core.structure import Molecule
import os
import pandas as pd
import plotly.express as px
dir_path = os.path.dirname(os.path.realpath(__file__))
DUMMY_SPECIES = "Si"
df_res = pd.read_pickle('df_res.pkl')
cluster_fig = fig = px.scatter(df_res, x="x", y='y', width=1000, height=900,
color='DBSCAN_lab', hover_name='index', title="Clusters of Similar Sites")
external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]
def get_dbs(db_names: List[str], db_file: str = dir_path + "/./db_info.pub.json") -> List:
"""Read the db_file and get the databases corresponding to <<db_name>>
Args:
db_name (List[str]): A list of names of the database we want
db_file (str): The db_file we are reading from
Returns:
MongograntStore: the store we need to access
"""
db_dict = loadfn(db_file)
stores = []
for j_name in db_names:
if j_name not in db_dict:
raise ValueError(
f"The store named {j_name} is missing from the db_file")
stores.append(db_dict[j_name])
return stores
soap_site_db, = get_dbs(["soap_site_descriptors"])
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
# App layout
app.layout = html.Div(
[
dcc.Graph(id="cluster-plot", figure=fig),
html.Pre(id="debug", children=""),
Simple3DScene(
id='site',
sceneSize=400,
settings={'extractAxis': True},
axisView='SW',
data={}
),
]
)
@app.callback(Output('debug', 'children'), [Input('cluster-plot', 'clickData')])
@app.callback(Output('site', 'data'), [Input('cluster-plot', 'clickData')])
if __name__ == "__main__":
app.run_server(debug=True)
# %%
| [
2,
43313,
198,
6738,
19720,
1330,
7343,
198,
6738,
40689,
88,
13,
46911,
1634,
1330,
3440,
22184,
198,
11748,
14470,
198,
11748,
14470,
62,
7295,
62,
5589,
3906,
355,
288,
535,
198,
11748,
14470,
62,
6494,
62,
5589,
3906,
355,
27711,
198,
6738,
14470,
13,
45841,
3976,
1330,
23412,
11,
25235,
198,
6738,
14470,
62,
3149,
62,
5589,
3906,
1330,
17427,
18,
35,
36542,
198,
6738,
279,
4948,
265,
5235,
1330,
14413,
198,
11748,
15121,
62,
25981,
15813,
220,
1303,
645,
20402,
25,
376,
21844,
198,
6738,
279,
4948,
265,
5235,
13,
20930,
13,
34960,
82,
1330,
25726,
23172,
37065,
198,
6738,
279,
4948,
265,
5235,
13,
7295,
13,
301,
5620,
1330,
25726,
23172,
198,
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
7110,
306,
13,
42712,
355,
279,
87,
198,
198,
15908,
62,
6978,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
5305,
6978,
7,
834,
7753,
834,
4008,
198,
35,
5883,
26708,
62,
48451,
11015,
796,
366,
42801,
1,
198,
198,
7568,
62,
411,
796,
279,
67,
13,
961,
62,
27729,
293,
10786,
7568,
62,
411,
13,
79,
41582,
11537,
198,
565,
5819,
62,
5647,
796,
2336,
796,
279,
87,
13,
1416,
1436,
7,
7568,
62,
411,
11,
2124,
2625,
87,
1600,
331,
11639,
88,
3256,
9647,
28,
12825,
11,
6001,
28,
12865,
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,
3124,
11639,
35,
4462,
44565,
62,
23912,
3256,
20599,
62,
3672,
11639,
9630,
3256,
3670,
2625,
2601,
13654,
286,
11014,
37034,
4943,
198,
198,
22615,
62,
47720,
258,
1039,
796,
14631,
5450,
1378,
19815,
538,
268,
13,
952,
14,
354,
81,
1638,
4464,
14,
3617,
14,
65,
54,
43,
86,
70,
47,
13,
25471,
8973,
628,
198,
4299,
651,
62,
67,
1443,
7,
9945,
62,
14933,
25,
7343,
58,
2536,
4357,
20613,
62,
7753,
25,
965,
796,
26672,
62,
6978,
1343,
366,
11757,
14,
9945,
62,
10951,
13,
12984,
13,
17752,
4943,
4613,
7343,
25,
198,
220,
220,
220,
37227,
5569,
262,
20613,
62,
7753,
290,
651,
262,
20083,
11188,
284,
9959,
9945,
62,
3672,
4211,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
62,
3672,
357,
8053,
58,
2536,
60,
2599,
317,
1351,
286,
3891,
286,
262,
6831,
356,
765,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
62,
7753,
357,
2536,
2599,
383,
20613,
62,
7753,
356,
389,
3555,
422,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
18428,
519,
5250,
22658,
25,
262,
3650,
356,
761,
284,
1895,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
20613,
62,
11600,
796,
3440,
22184,
7,
9945,
62,
7753,
8,
198,
220,
220,
220,
7000,
796,
17635,
198,
220,
220,
220,
329,
474,
62,
3672,
287,
20613,
62,
14933,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
474,
62,
3672,
407,
287,
20613,
62,
11600,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
464,
3650,
3706,
1391,
73,
62,
3672,
92,
318,
4814,
422,
262,
20613,
62,
7753,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
7000,
13,
33295,
7,
9945,
62,
11600,
58,
73,
62,
3672,
12962,
198,
220,
220,
220,
1441,
7000,
628,
198,
568,
499,
62,
15654,
62,
9945,
11,
796,
651,
62,
67,
1443,
7,
14692,
568,
499,
62,
15654,
62,
20147,
1968,
669,
8973,
8,
198,
198,
1324,
796,
14470,
13,
43041,
7,
834,
3672,
834,
11,
7097,
62,
47720,
258,
1039,
28,
22615,
62,
47720,
258,
1039,
8,
198,
198,
2,
2034,
12461,
198,
1324,
13,
39786,
796,
27711,
13,
24095,
7,
198,
220,
220,
220,
685,
198,
220,
220,
220,
220,
220,
220,
220,
288,
535,
13,
37065,
7,
312,
2625,
565,
5819,
12,
29487,
1600,
3785,
28,
5647,
828,
198,
220,
220,
220,
220,
220,
220,
220,
27711,
13,
6719,
7,
312,
2625,
24442,
1600,
1751,
2625,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
17427,
18,
35,
36542,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
11639,
15654,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3715,
10699,
28,
7029,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6460,
34758,
6,
2302,
974,
31554,
271,
10354,
6407,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16488,
7680,
11639,
17887,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
34758,
92,
198,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
2361,
198,
8,
628,
198,
31,
1324,
13,
47423,
7,
26410,
10786,
24442,
3256,
705,
17197,
33809,
685,
20560,
10786,
565,
5819,
12,
29487,
3256,
705,
12976,
6601,
11537,
12962,
628,
198,
31,
1324,
13,
47423,
7,
26410,
10786,
15654,
3256,
705,
7890,
33809,
685,
20560,
10786,
565,
5819,
12,
29487,
3256,
705,
12976,
6601,
11537,
12962,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
598,
13,
5143,
62,
15388,
7,
24442,
28,
17821,
8,
198,
198,
2,
43313,
198
] | 2.386414 | 898 |
"""
Configuration for pytest fixtures
"""
import boto3 # type: ignore
import pytest # type: ignore
from chalice import Chalice # type: ignore
from moto import mock_ssm # type: ignore
@pytest.fixture
def app() -> Chalice:
"""Return the application for testing"""
from app import app as chalice_app # pylint: disable=import-outside-toplevel
return chalice_app
@pytest.fixture(autouse=True)
def mocked_aws_credentials(monkeypatch):
"""Mocked AWS Credentials for moto."""
monkeypatch.setenv("AWS_ACCESS_KEY_ID", "testing")
monkeypatch.setenv("AWS_SECRET_ACCESS_KEY", "testing")
monkeypatch.setenv("AWS_SECURITY_TOKEN", "testing")
monkeypatch.setenv("AWS_SESSION_TOKEN", "testing")
monkeypatch.setenv("AWS_DEFAULT_REGION", "eu-west-1")
boto3.setup_default_session()
@pytest.fixture(scope="function")
def ssm():
"""Mock for AWS Systems Manager"""
with mock_ssm():
yield boto3.client("ssm")
| [
37811,
198,
38149,
329,
12972,
9288,
34609,
198,
37811,
198,
198,
11748,
275,
2069,
18,
220,
1303,
2099,
25,
8856,
198,
11748,
12972,
9288,
220,
1303,
2099,
25,
8856,
198,
6738,
442,
282,
501,
1330,
30529,
501,
220,
1303,
2099,
25,
8856,
198,
6738,
285,
2069,
1330,
15290,
62,
824,
76,
220,
1303,
2099,
25,
8856,
628,
198,
31,
9078,
9288,
13,
69,
9602,
198,
4299,
598,
3419,
4613,
30529,
501,
25,
198,
220,
220,
220,
37227,
13615,
262,
3586,
329,
4856,
37811,
198,
220,
220,
220,
422,
598,
1330,
598,
355,
442,
282,
501,
62,
1324,
220,
1303,
279,
2645,
600,
25,
15560,
28,
11748,
12,
43435,
12,
83,
643,
626,
628,
220,
220,
220,
1441,
442,
282,
501,
62,
1324,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
2306,
1076,
28,
17821,
8,
198,
4299,
29180,
62,
8356,
62,
66,
445,
14817,
7,
49572,
17147,
2599,
198,
220,
220,
220,
37227,
44,
3543,
30865,
327,
445,
14817,
329,
285,
2069,
526,
15931,
198,
220,
220,
220,
21657,
17147,
13,
2617,
24330,
7203,
12298,
50,
62,
26861,
7597,
62,
20373,
62,
2389,
1600,
366,
33407,
4943,
198,
220,
220,
220,
21657,
17147,
13,
2617,
24330,
7203,
12298,
50,
62,
23683,
26087,
62,
26861,
7597,
62,
20373,
1600,
366,
33407,
4943,
198,
220,
220,
220,
21657,
17147,
13,
2617,
24330,
7203,
12298,
50,
62,
23683,
4261,
9050,
62,
10468,
43959,
1600,
366,
33407,
4943,
198,
220,
220,
220,
21657,
17147,
13,
2617,
24330,
7203,
12298,
50,
62,
50,
47621,
62,
10468,
43959,
1600,
366,
33407,
4943,
198,
220,
220,
220,
21657,
17147,
13,
2617,
24330,
7203,
12298,
50,
62,
7206,
38865,
62,
31553,
2849,
1600,
366,
12496,
12,
7038,
12,
16,
4943,
628,
220,
220,
220,
275,
2069,
18,
13,
40406,
62,
12286,
62,
29891,
3419,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
2625,
8818,
4943,
198,
4299,
264,
5796,
33529,
198,
220,
220,
220,
37227,
44,
735,
329,
30865,
11998,
9142,
37811,
198,
220,
220,
220,
351,
15290,
62,
824,
76,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
7800,
275,
2069,
18,
13,
16366,
7203,
824,
76,
4943,
198
] | 2.679775 | 356 |
"""Test param_distribution.py"""
| [
37811,
14402,
5772,
62,
17080,
3890,
13,
9078,
37811,
198
] | 3.3 | 10 |
from a10sdk.common.A10BaseClass import A10BaseClass
class AvpList(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param int32: {"description": "32 bits integer", "format": "number", "not-list": ["int64", "string"], "maximum": 2147483647, "minimum": 0, "type": "number"}
:param mandatory: {"default": 0, "type": "number", "description": "mandatory avp", "format": "flag"}
:param string: {"description": "String (string name, max length 127 bytes)", "format": "string", "minLength": 1, "not-list": ["int32", "int64"], "maxLength": 128, "type": "string"}
:param avp: {"description": "customize avps for cer to the server (avp number)", "minimum": 0, "type": "number", "maximum": 2147483647, "format": "number"}
:param int64: {"description": "64 bits integer", "format": "number", "not-list": ["int32", "string"], "maximum": 2147483647, "minimum": 0, "type": "number"}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
"""
class MessageCodeList(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param message_code: {"minimum": 1, "type": "number", "maximum": 2147483647, "format": "number"}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
"""
class Diameter(A10BaseClass):
"""Class Description::
diameter template.
Class diameter supports CRUD Operations and inherits from `common/A10BaseClass`.
This class is the `"PARENT"` class for this module.`
:param avp_list: {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"int32": {"description": "32 bits integer", "format": "number", "not-list": ["int64", "string"], "maximum": 2147483647, "minimum": 0, "type": "number"}, "mandatory": {"default": 0, "type": "number", "description": "mandatory avp", "format": "flag"}, "string": {"description": "String (string name, max length 127 bytes)", "format": "string", "minLength": 1, "not-list": ["int32", "int64"], "maxLength": 128, "type": "string"}, "avp": {"description": "customize avps for cer to the server (avp number)", "minimum": 0, "type": "number", "maximum": 2147483647, "format": "number"}, "int64": {"description": "64 bits integer", "format": "number", "not-list": ["int32", "string"], "maximum": 2147483647, "minimum": 0, "type": "number"}, "optional": true}}]}
:param service_group_name: {"description": "service group name, this is the service group that the message needs to be copied to", "format": "string", "minLength": 1, "optional": true, "maxLength": 127, "type": "string", "$ref": "/axapi/v3/slb/service-group"}
:param name: {"description": "diameter template Name", "format": "string-rlx", "minLength": 1, "optional": false, "maxLength": 63, "type": "string"}
:param dwr_time: {"description": "dwr health-check timer interval (in 100 milli second unit, default is 100, 0 means unset this option)", "format": "number", "default": 0, "optional": true, "maximum": 2147483647, "minimum": 0, "type": "number"}
:param avp_string: {"description": "pattern to be matched in the avp string name, max length 127 bytes", "format": "string", "minLength": 1, "optional": true, "maxLength": 128, "type": "string"}
:param idle_timeout: {"description": " user sesison idle timeout (in minutes, default is 5)", "format": "number", "default": 5, "optional": true, "maximum": 65535, "minimum": 1, "type": "number"}
:param uuid: {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"}
:param avp_code: {"description": "avp code", "format": "number", "type": "number", "maximum": 2147483647, "minimum": 1, "optional": true}
:param message_code_list: {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"optional": true, "message-code": {"minimum": 1, "type": "number", "maximum": 2147483647, "format": "number"}}}]}
:param origin_realm: {"description": "origin-realm name avp", "format": "string", "minLength": 1, "optional": true, "maxLength": 31, "type": "string"}
:param origin_host: {"description": "origin-host name avp", "format": "string", "minLength": 1, "optional": true, "maxLength": 31, "type": "string"}
:param customize_cea: {"default": 0, "optional": true, "type": "number", "description": "customizing cea response", "format": "flag"}
:param multiple_origin_host: {"default": 0, "optional": true, "type": "number", "description": "allowing multiple origin-host to a single server", "format": "flag"}
:param product_name: {"description": "product name avp", "format": "string", "minLength": 1, "optional": true, "maxLength": 31, "type": "string"}
:param session_age: {"description": "user session age allowed (default 10), this is not idle-time (in minutes)", "format": "number", "default": 10, "optional": true, "maximum": 65535, "minimum": 1, "type": "number"}
:param vendor_id: {"description": "vendor-id avp (Vendon Id)", "format": "number", "type": "number", "maximum": 2147483647, "minimum": 0, "optional": true}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
URL for this object::
`https://<Hostname|Ip address>//axapi/v3/slb/template/diameter/{name}`.
"""
| [
6738,
257,
940,
21282,
74,
13,
11321,
13,
32,
940,
14881,
9487,
1330,
317,
940,
14881,
9487,
628,
198,
4871,
5184,
79,
8053,
7,
32,
940,
14881,
9487,
2599,
198,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
1212,
1398,
857,
407,
1104,
8740,
8322,
16205,
3387,
779,
2560,
13,
628,
220,
220,
220,
1058,
17143,
493,
2624,
25,
19779,
11213,
1298,
366,
2624,
10340,
18253,
1600,
366,
18982,
1298,
366,
17618,
1600,
366,
1662,
12,
4868,
1298,
14631,
600,
2414,
1600,
366,
8841,
33116,
366,
47033,
1298,
362,
20198,
2780,
26780,
22,
11,
366,
39504,
1298,
657,
11,
366,
4906,
1298,
366,
17618,
20662,
198,
220,
220,
220,
1058,
17143,
13677,
25,
19779,
12286,
1298,
657,
11,
366,
4906,
1298,
366,
17618,
1600,
366,
11213,
1298,
366,
22249,
2870,
1196,
79,
1600,
366,
18982,
1298,
366,
32109,
20662,
198,
220,
220,
220,
1058,
17143,
4731,
25,
19779,
11213,
1298,
366,
10100,
357,
8841,
1438,
11,
3509,
4129,
18112,
9881,
42501,
366,
18982,
1298,
366,
8841,
1600,
366,
1084,
24539,
1298,
352,
11,
366,
1662,
12,
4868,
1298,
14631,
600,
2624,
1600,
366,
600,
2414,
33116,
366,
9806,
24539,
1298,
13108,
11,
366,
4906,
1298,
366,
8841,
20662,
198,
220,
220,
220,
1058,
17143,
1196,
79,
25,
19779,
11213,
1298,
366,
23144,
1096,
1196,
862,
329,
26074,
284,
262,
4382,
357,
615,
79,
1271,
42501,
366,
39504,
1298,
657,
11,
366,
4906,
1298,
366,
17618,
1600,
366,
47033,
1298,
362,
20198,
2780,
26780,
22,
11,
366,
18982,
1298,
366,
17618,
20662,
198,
220,
220,
220,
1058,
17143,
493,
2414,
25,
19779,
11213,
1298,
366,
2414,
10340,
18253,
1600,
366,
18982,
1298,
366,
17618,
1600,
366,
1662,
12,
4868,
1298,
14631,
600,
2624,
1600,
366,
8841,
33116,
366,
47033,
1298,
362,
20198,
2780,
26780,
22,
11,
366,
39504,
1298,
657,
11,
366,
4906,
1298,
366,
17618,
20662,
198,
220,
220,
220,
1058,
17143,
16232,
44148,
25,
383,
3335,
15741,
329,
30617,
4560,
290,
6246,
9041,
13,
33973,
284,
4600,
11321,
14,
25202,
62,
36436,
13,
9078,
63,
628,
220,
220,
220,
220,
628,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
628,
198,
4871,
16000,
10669,
8053,
7,
32,
940,
14881,
9487,
2599,
198,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
1212,
1398,
857,
407,
1104,
8740,
8322,
16205,
3387,
779,
2560,
13,
628,
220,
220,
220,
1058,
17143,
3275,
62,
8189,
25,
19779,
39504,
1298,
352,
11,
366,
4906,
1298,
366,
17618,
1600,
366,
47033,
1298,
362,
20198,
2780,
26780,
22,
11,
366,
18982,
1298,
366,
17618,
20662,
198,
220,
220,
220,
1058,
17143,
16232,
44148,
25,
383,
3335,
15741,
329,
30617,
4560,
290,
6246,
9041,
13,
33973,
284,
4600,
11321,
14,
25202,
62,
36436,
13,
9078,
63,
628,
220,
220,
220,
220,
628,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
628,
198,
4871,
360,
13173,
7,
32,
940,
14881,
9487,
2599,
198,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
9487,
12489,
3712,
198,
220,
220,
220,
14753,
11055,
13,
628,
220,
220,
220,
5016,
14753,
6971,
8740,
8322,
16205,
290,
10639,
896,
422,
4600,
11321,
14,
32,
940,
14881,
9487,
44646,
198,
220,
220,
220,
770,
1398,
318,
262,
4600,
1,
27082,
3525,
1,
63,
1398,
329,
428,
8265,
13,
63,
628,
220,
220,
220,
1058,
17143,
1196,
79,
62,
4868,
25,
19779,
1084,
23022,
1298,
352,
11,
366,
23814,
1298,
19779,
4906,
1298,
366,
15252,
25719,
366,
34642,
23022,
1298,
2081,
11,
366,
4906,
1298,
366,
18747,
1600,
366,
18747,
1298,
685,
4895,
48310,
1298,
19779,
600,
2624,
1298,
19779,
11213,
1298,
366,
2624,
10340,
18253,
1600,
366,
18982,
1298,
366,
17618,
1600,
366,
1662,
12,
4868,
1298,
14631,
600,
2414,
1600,
366,
8841,
33116,
366,
47033,
1298,
362,
20198,
2780,
26780,
22,
11,
366,
39504,
1298,
657,
11,
366,
4906,
1298,
366,
17618,
25719,
366,
22249,
2870,
1298,
19779,
12286,
1298,
657,
11,
366,
4906,
1298,
366,
17618,
1600,
366,
11213,
1298,
366,
22249,
2870,
1196,
79,
1600,
366,
18982,
1298,
366,
32109,
25719,
366,
8841,
1298,
19779,
11213,
1298,
366,
10100,
357,
8841,
1438,
11,
3509,
4129,
18112,
9881,
42501,
366,
18982,
1298,
366,
8841,
1600,
366,
1084,
24539,
1298,
352,
11,
366,
1662,
12,
4868,
1298,
14631,
600,
2624,
1600,
366,
600,
2414,
33116,
366,
9806,
24539,
1298,
13108,
11,
366,
4906,
1298,
366,
8841,
25719,
366,
615,
79,
1298,
19779,
11213,
1298,
366,
23144,
1096,
1196,
862,
329,
26074,
284,
262,
4382,
357,
615,
79,
1271,
42501,
366,
39504,
1298,
657,
11,
366,
4906,
1298,
366,
17618,
1600,
366,
47033,
1298,
362,
20198,
2780,
26780,
22,
11,
366,
18982,
1298,
366,
17618,
25719,
366,
600,
2414,
1298,
19779,
11213,
1298,
366,
2414,
10340,
18253,
1600,
366,
18982,
1298,
366,
17618,
1600,
366,
1662,
12,
4868,
1298,
14631,
600,
2624,
1600,
366,
8841,
33116,
366,
47033,
1298,
362,
20198,
2780,
26780,
22,
11,
366,
39504,
1298,
657,
11,
366,
4906,
1298,
366,
17618,
25719,
366,
25968,
1298,
2081,
11709,
48999,
198,
220,
220,
220,
1058,
17143,
2139,
62,
8094,
62,
3672,
25,
19779,
11213,
1298,
366,
15271,
1448,
1438,
11,
428,
318,
262,
2139,
1448,
326,
262,
3275,
2476,
284,
307,
18984,
284,
1600,
366,
18982,
1298,
366,
8841,
1600,
366,
1084,
24539,
1298,
352,
11,
366,
25968,
1298,
2081,
11,
366,
9806,
24539,
1298,
18112,
11,
366,
4906,
1298,
366,
8841,
1600,
17971,
5420,
1298,
12813,
897,
15042,
14,
85,
18,
14,
6649,
65,
14,
15271,
12,
8094,
20662,
198,
220,
220,
220,
1058,
17143,
1438,
25,
19779,
11213,
1298,
366,
67,
13173,
11055,
6530,
1600,
366,
18982,
1298,
366,
8841,
12,
45895,
87,
1600,
366,
1084,
24539,
1298,
352,
11,
366,
25968,
1298,
3991,
11,
366,
9806,
24539,
1298,
8093,
11,
366,
4906,
1298,
366,
8841,
20662,
198,
220,
220,
220,
1058,
17143,
288,
18351,
62,
2435,
25,
19779,
11213,
1298,
366,
67,
18351,
1535,
12,
9122,
19781,
16654,
357,
259,
1802,
3939,
72,
1218,
4326,
11,
4277,
318,
1802,
11,
657,
1724,
555,
2617,
428,
3038,
42501,
366,
18982,
1298,
366,
17618,
1600,
366,
12286,
1298,
657,
11,
366,
25968,
1298,
2081,
11,
366,
47033,
1298,
362,
20198,
2780,
26780,
22,
11,
366,
39504,
1298,
657,
11,
366,
4906,
1298,
366,
17618,
20662,
198,
220,
220,
220,
1058,
17143,
1196,
79,
62,
8841,
25,
19779,
11213,
1298,
366,
33279,
284,
307,
14451,
287,
262,
1196,
79,
4731,
1438,
11,
3509,
4129,
18112,
9881,
1600,
366,
18982,
1298,
366,
8841,
1600,
366,
1084,
24539,
1298,
352,
11,
366,
25968,
1298,
2081,
11,
366,
9806,
24539,
1298,
13108,
11,
366,
4906,
1298,
366,
8841,
20662,
198,
220,
220,
220,
1058,
17143,
21696,
62,
48678,
25,
19779,
11213,
1298,
366,
2836,
264,
274,
1653,
21696,
26827,
357,
259,
2431,
11,
4277,
318,
642,
42501,
366,
18982,
1298,
366,
17618,
1600,
366,
12286,
1298,
642,
11,
366,
25968,
1298,
2081,
11,
366,
47033,
1298,
45021,
2327,
11,
366,
39504,
1298,
352,
11,
366,
4906,
1298,
366,
17618,
20662,
198,
220,
220,
220,
1058,
17143,
334,
27112,
25,
19779,
11213,
1298,
366,
12303,
312,
286,
262,
2134,
1600,
366,
18982,
1298,
366,
8841,
1600,
366,
1084,
24539,
1298,
352,
11,
366,
4666,
1958,
12,
1662,
12,
40845,
1298,
352,
11,
366,
25968,
1298,
2081,
11,
366,
9806,
24539,
1298,
5598,
11,
366,
4906,
1298,
366,
8841,
20662,
198,
220,
220,
220,
1058,
17143,
1196,
79,
62,
8189,
25,
19779,
11213,
1298,
366,
615,
79,
2438,
1600,
366,
18982,
1298,
366,
17618,
1600,
366,
4906,
1298,
366,
17618,
1600,
366,
47033,
1298,
362,
20198,
2780,
26780,
22,
11,
366,
39504,
1298,
352,
11,
366,
25968,
1298,
2081,
92,
198,
220,
220,
220,
1058,
17143,
3275,
62,
8189,
62,
4868,
25,
19779,
1084,
23022,
1298,
352,
11,
366,
23814,
1298,
19779,
4906,
1298,
366,
15252,
25719,
366,
34642,
23022,
1298,
2081,
11,
366,
4906,
1298,
366,
18747,
1600,
366,
18747,
1298,
685,
4895,
48310,
1298,
19779,
25968,
1298,
2081,
11,
366,
20500,
12,
8189,
1298,
19779,
39504,
1298,
352,
11,
366,
4906,
1298,
366,
17618,
1600,
366,
47033,
1298,
362,
20198,
2780,
26780,
22,
11,
366,
18982,
1298,
366,
17618,
1,
42535,
48999,
198,
220,
220,
220,
1058,
17143,
8159,
62,
5305,
76,
25,
19779,
11213,
1298,
366,
47103,
12,
5305,
76,
1438,
1196,
79,
1600,
366,
18982,
1298,
366,
8841,
1600,
366,
1084,
24539,
1298,
352,
11,
366,
25968,
1298,
2081,
11,
366,
9806,
24539,
1298,
3261,
11,
366,
4906,
1298,
366,
8841,
20662,
198,
220,
220,
220,
1058,
17143,
8159,
62,
4774,
25,
19779,
11213,
1298,
366,
47103,
12,
4774,
1438,
1196,
79,
1600,
366,
18982,
1298,
366,
8841,
1600,
366,
1084,
24539,
1298,
352,
11,
366,
25968,
1298,
2081,
11,
366,
9806,
24539,
1298,
3261,
11,
366,
4906,
1298,
366,
8841,
20662,
198,
220,
220,
220,
1058,
17143,
24184,
62,
344,
64,
25,
19779,
12286,
1298,
657,
11,
366,
25968,
1298,
2081,
11,
366,
4906,
1298,
366,
17618,
1600,
366,
11213,
1298,
366,
23144,
2890,
2906,
64,
2882,
1600,
366,
18982,
1298,
366,
32109,
20662,
198,
220,
220,
220,
1058,
17143,
3294,
62,
47103,
62,
4774,
25,
19779,
12286,
1298,
657,
11,
366,
25968,
1298,
2081,
11,
366,
4906,
1298,
366,
17618,
1600,
366,
11213,
1298,
366,
439,
7855,
3294,
8159,
12,
4774,
284,
257,
2060,
4382,
1600,
366,
18982,
1298,
366,
32109,
20662,
198,
220,
220,
220,
1058,
17143,
1720,
62,
3672,
25,
19779,
11213,
1298,
366,
11167,
1438,
1196,
79,
1600,
366,
18982,
1298,
366,
8841,
1600,
366,
1084,
24539,
1298,
352,
11,
366,
25968,
1298,
2081,
11,
366,
9806,
24539,
1298,
3261,
11,
366,
4906,
1298,
366,
8841,
20662,
198,
220,
220,
220,
1058,
17143,
6246,
62,
496,
25,
19779,
11213,
1298,
366,
7220,
6246,
2479,
3142,
357,
12286,
838,
828,
428,
318,
407,
21696,
12,
2435,
357,
259,
2431,
42501,
366,
18982,
1298,
366,
17618,
1600,
366,
12286,
1298,
838,
11,
366,
25968,
1298,
2081,
11,
366,
47033,
1298,
45021,
2327,
11,
366,
39504,
1298,
352,
11,
366,
4906,
1298,
366,
17618,
20662,
198,
220,
220,
220,
1058,
17143,
18371,
62,
312,
25,
19779,
11213,
1298,
366,
85,
18738,
12,
312,
1196,
79,
357,
53,
43153,
5121,
42501,
366,
18982,
1298,
366,
17618,
1600,
366,
4906,
1298,
366,
17618,
1600,
366,
47033,
1298,
362,
20198,
2780,
26780,
22,
11,
366,
39504,
1298,
657,
11,
366,
25968,
1298,
2081,
92,
198,
220,
220,
220,
1058,
17143,
16232,
44148,
25,
383,
3335,
15741,
329,
30617,
4560,
290,
6246,
9041,
13,
33973,
284,
4600,
11321,
14,
25202,
62,
36436,
13,
9078,
63,
628,
220,
220,
220,
220,
628,
220,
220,
220,
10289,
329,
428,
2134,
3712,
198,
220,
220,
220,
4600,
5450,
1378,
27,
17932,
3672,
91,
40,
79,
2209,
29,
1003,
897,
15042,
14,
85,
18,
14,
6649,
65,
14,
28243,
14,
67,
13173,
14,
90,
3672,
92,
44646,
628,
220,
220,
220,
220,
628,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
628,
198
] | 3.087222 | 1,800 |
import os
import os.path
import sys
import json
import threading
import queue
import uuid
import alembic
import alembic.config
from appdirs import user_data_dir
from . import helper
from dexbot import APP_NAME, AUTHOR
from sqlalchemy import create_engine, Column, String, Integer, Float, Boolean
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, load_only
Base = declarative_base()
# For dexbot.sqlite file
storageDatabase = "dexbot.sqlite"
class Storage(dict):
""" Storage class
:param string category: The category to distinguish
different storage namespaces
"""
def save_order(self, order):
""" Save the order to the database
"""
order_id = order['id']
db_worker.save_order(self.category, order_id, order)
def save_order_extended(self, order, virtual=None, custom=None):
""" Save the order to the database providing additional data
:param dict order:
:param bool virtual: True = order is virtual order
:param str custom: any additional data
"""
order_id = order['id']
db_worker.save_order_extended(self.category, order_id, order, virtual, custom)
def remove_order(self, order):
""" Removes an order from the database
:param dict,str order: order to remove, could be an Order instance or just order id
"""
if isinstance(order, dict):
order_id = order['id']
else:
order_id = order
db_worker.remove_order(self.category, order_id)
def clear_orders(self):
""" Removes all worker's orders from the database
"""
db_worker.clear_orders(self.category)
def clear_orders_extended(self, worker=None, only_virtual=False, only_real=False, custom=None):
""" Removes worker's orders matching a criteria from the database
:param str worker: worker name (None means current worker name will be used)
:param bool only_virtual: True = only virtual orders
:param bool only_real: True = only real orders
:param str custom: filter orders by custom field
"""
if only_virtual and only_real:
raise ValueError('only_virtual and only_real are mutually exclusive')
if not worker:
worker = self.category
return db_worker.clear_orders_extended(worker, only_virtual, only_real, custom)
def fetch_orders(self, worker=None):
""" Get all the orders (or just specific worker's orders) from the database
:param str worker: worker name (None means current worker name will be used)
"""
if not worker:
worker = self.category
return db_worker.fetch_orders(worker)
def fetch_orders_extended(
self, worker=None, only_virtual=False, only_real=False, custom=None, return_ids_only=False
):
""" Get orders from the database in extended format (returning all columns)
:param str worker: worker name (None means current worker name will be used)
:param bool only_virtual: True = fetch only virtual orders
:param bool only_real: True = fetch only real orders
:param str custom: filter orders by custom field
:param bool return_ids_only: instead of returning full row data, return only order ids
:rtype: list
:return: list of dicts in format [{order_id: '', order: '', virtual: '', custom: ''}], or [order_id] if
return_ids_only used
"""
if only_virtual and only_real:
raise ValueError('only_virtual and only_real are mutually exclusive')
if not worker:
worker = self.category
return db_worker.fetch_orders_extended(worker, only_virtual, only_real, custom, return_ids_only)
@staticmethod
@staticmethod
@staticmethod
@staticmethod
class DatabaseWorker(threading.Thread):
""" Thread safe database worker
"""
@staticmethod
def run_migrations(script_location, dsn, stamp_only=False):
""" Apply database migrations using alembic
:param str script_location: path to migration scripts
:param str dsn: database URL
:param bool stamp_only: True = only mark the db as "head" without applying migrations
"""
alembic_cfg = alembic.config.Config()
alembic_cfg.set_main_option('script_location', script_location)
alembic_cfg.set_main_option('sqlalchemy.url', dsn)
if stamp_only:
# Mark db as "head" without applying migrations
alembic.command.stamp(alembic_cfg, "head")
else:
alembic.command.upgrade(alembic_cfg, 'head')
@staticmethod
def get_filter_by(worker, only_virtual, only_real, custom):
""" Make filter_by for sqlalchemy query based on args
"""
filter_by = {'worker': worker}
if only_virtual:
filter_by['virtual'] = True
elif only_real:
filter_by['virtual'] = False
if custom:
filter_by['custom'] = json.dumps(custom)
return filter_by
def _get_balance(self, account, worker, timestamp, base_asset, quote_asset, token):
""" Get first item that has bigger time as given timestamp and matches account and worker name
"""
result = (
self.session.query(Balances)
.filter(
Balances.account == account,
Balances.worker == worker,
Balances.base_symbol == base_asset,
Balances.quote_symbol == quote_asset,
Balances.timestamp > timestamp,
)
.first()
)
self._set_result(token, result)
def _get_recent_balance_entry(self, account, worker, base_asset, quote_asset, token):
""" Get most recent balance history item that matches account and worker name
"""
result = (
self.session.query(Balances)
.filter(
Balances.account == account,
Balances.worker == worker,
Balances.base_symbol == base_asset,
Balances.quote_symbol == quote_asset,
)
.order_by(Balances.id.desc())
.first()
)
self._set_result(token, result)
# Derive sqlite file directory
data_dir = user_data_dir(APP_NAME, AUTHOR)
sqlDataBaseFile = os.path.join(data_dir, storageDatabase)
# Create directory for sqlite file
helper.mkdir(data_dir)
db_worker = DatabaseWorker()
| [
11748,
28686,
198,
11748,
28686,
13,
6978,
198,
11748,
25064,
198,
11748,
33918,
198,
11748,
4704,
278,
198,
11748,
16834,
198,
11748,
334,
27112,
198,
11748,
31341,
2022,
291,
198,
11748,
31341,
2022,
291,
13,
11250,
198,
198,
6738,
598,
15908,
82,
1330,
2836,
62,
7890,
62,
15908,
198,
198,
6738,
764,
1330,
31904,
198,
6738,
36017,
13645,
1330,
43504,
62,
20608,
11,
44746,
198,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
11,
29201,
11,
10903,
11,
34142,
11,
48436,
11,
41146,
198,
6738,
44161,
282,
26599,
13,
2302,
13,
32446,
283,
876,
1330,
2377,
283,
876,
62,
8692,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
6246,
10297,
11,
3440,
62,
8807,
628,
198,
14881,
796,
2377,
283,
876,
62,
8692,
3419,
198,
198,
2,
1114,
36017,
13645,
13,
25410,
578,
2393,
198,
35350,
38105,
796,
366,
67,
1069,
13645,
13,
25410,
578,
1,
628,
628,
198,
198,
4871,
20514,
7,
11600,
2599,
198,
220,
220,
220,
37227,
20514,
1398,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
4731,
6536,
25,
383,
6536,
284,
15714,
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,
1180,
6143,
3891,
43076,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
3613,
62,
2875,
7,
944,
11,
1502,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
12793,
262,
1502,
284,
262,
6831,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1502,
62,
312,
796,
1502,
17816,
312,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
62,
28816,
13,
21928,
62,
2875,
7,
944,
13,
22872,
11,
1502,
62,
312,
11,
1502,
8,
628,
220,
220,
220,
825,
3613,
62,
2875,
62,
2302,
1631,
7,
944,
11,
1502,
11,
7166,
28,
14202,
11,
2183,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
12793,
262,
1502,
284,
262,
6831,
4955,
3224,
1366,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
8633,
1502,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
20512,
7166,
25,
6407,
796,
1502,
318,
7166,
1502,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
965,
2183,
25,
597,
3224,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1502,
62,
312,
796,
1502,
17816,
312,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
62,
28816,
13,
21928,
62,
2875,
62,
2302,
1631,
7,
944,
13,
22872,
11,
1502,
62,
312,
11,
1502,
11,
7166,
11,
2183,
8,
628,
220,
220,
220,
825,
4781,
62,
2875,
7,
944,
11,
1502,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3982,
5241,
281,
1502,
422,
262,
6831,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
8633,
11,
2536,
1502,
25,
1502,
284,
4781,
11,
714,
307,
281,
8284,
4554,
393,
655,
1502,
4686,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
7,
2875,
11,
8633,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1502,
62,
312,
796,
1502,
17816,
312,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1502,
62,
312,
796,
1502,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
62,
28816,
13,
28956,
62,
2875,
7,
944,
13,
22872,
11,
1502,
62,
312,
8,
628,
220,
220,
220,
825,
1598,
62,
6361,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3982,
5241,
477,
8383,
338,
6266,
422,
262,
6831,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
20613,
62,
28816,
13,
20063,
62,
6361,
7,
944,
13,
22872,
8,
628,
220,
220,
220,
825,
1598,
62,
6361,
62,
2302,
1631,
7,
944,
11,
8383,
28,
14202,
11,
691,
62,
32844,
28,
25101,
11,
691,
62,
5305,
28,
25101,
11,
2183,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3982,
5241,
8383,
338,
6266,
12336,
257,
9987,
422,
262,
6831,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
965,
8383,
25,
8383,
1438,
357,
14202,
1724,
1459,
8383,
1438,
481,
307,
973,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
20512,
691,
62,
32844,
25,
6407,
796,
691,
7166,
6266,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
20512,
691,
62,
5305,
25,
6407,
796,
691,
1103,
6266,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
965,
2183,
25,
8106,
6266,
416,
2183,
2214,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
691,
62,
32844,
290,
691,
62,
5305,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
8807,
62,
32844,
290,
691,
62,
5305,
389,
26519,
8568,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
8383,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8383,
796,
2116,
13,
22872,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
20613,
62,
28816,
13,
20063,
62,
6361,
62,
2302,
1631,
7,
28816,
11,
691,
62,
32844,
11,
691,
62,
5305,
11,
2183,
8,
628,
220,
220,
220,
825,
21207,
62,
6361,
7,
944,
11,
8383,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3497,
477,
262,
6266,
357,
273,
655,
2176,
8383,
338,
6266,
8,
422,
262,
6831,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
965,
8383,
25,
8383,
1438,
357,
14202,
1724,
1459,
8383,
1438,
481,
307,
973,
8,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
8383,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8383,
796,
2116,
13,
22872,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
20613,
62,
28816,
13,
69,
7569,
62,
6361,
7,
28816,
8,
628,
220,
220,
220,
825,
21207,
62,
6361,
62,
2302,
1631,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
11,
8383,
28,
14202,
11,
691,
62,
32844,
28,
25101,
11,
691,
62,
5305,
28,
25101,
11,
2183,
28,
14202,
11,
1441,
62,
2340,
62,
8807,
28,
25101,
198,
220,
220,
220,
15179,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3497,
6266,
422,
262,
6831,
287,
7083,
5794,
357,
7783,
278,
477,
15180,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
965,
8383,
25,
8383,
1438,
357,
14202,
1724,
1459,
8383,
1438,
481,
307,
973,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
20512,
691,
62,
32844,
25,
6407,
796,
21207,
691,
7166,
6266,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
20512,
691,
62,
5305,
25,
6407,
796,
21207,
691,
1103,
6266,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
965,
2183,
25,
8106,
6266,
416,
2183,
2214,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
20512,
1441,
62,
2340,
62,
8807,
25,
2427,
286,
8024,
1336,
5752,
1366,
11,
1441,
691,
1502,
220,
2340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
1351,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
1351,
286,
8633,
82,
287,
5794,
685,
90,
2875,
62,
312,
25,
705,
3256,
1502,
25,
705,
3256,
7166,
25,
705,
3256,
2183,
25,
10148,
92,
4357,
393,
685,
2875,
62,
312,
60,
611,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
62,
2340,
62,
8807,
973,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
691,
62,
32844,
290,
691,
62,
5305,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
8807,
62,
32844,
290,
691,
62,
5305,
389,
26519,
8568,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
8383,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8383,
796,
2116,
13,
22872,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
20613,
62,
28816,
13,
69,
7569,
62,
6361,
62,
2302,
1631,
7,
28816,
11,
691,
62,
32844,
11,
691,
62,
5305,
11,
2183,
11,
1441,
62,
2340,
62,
8807,
8,
628,
220,
220,
220,
2488,
12708,
24396,
628,
220,
220,
220,
2488,
12708,
24396,
628,
220,
220,
220,
2488,
12708,
24396,
628,
220,
220,
220,
2488,
12708,
24396,
628,
198,
4871,
24047,
12468,
263,
7,
16663,
278,
13,
16818,
2599,
198,
220,
220,
220,
37227,
14122,
3338,
6831,
8383,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
2488,
12708,
24396,
198,
220,
220,
220,
825,
1057,
62,
76,
3692,
602,
7,
12048,
62,
24886,
11,
288,
16184,
11,
17977,
62,
8807,
28,
25101,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
27967,
6831,
15720,
602,
1262,
31341,
2022,
291,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
965,
4226,
62,
24886,
25,
3108,
284,
13472,
14750,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
965,
288,
16184,
25,
6831,
10289,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
20512,
17977,
62,
8807,
25,
6407,
796,
691,
1317,
262,
20613,
355,
366,
2256,
1,
1231,
11524,
15720,
602,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
31341,
2022,
291,
62,
37581,
796,
31341,
2022,
291,
13,
11250,
13,
16934,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
31341,
2022,
291,
62,
37581,
13,
2617,
62,
12417,
62,
18076,
10786,
12048,
62,
24886,
3256,
4226,
62,
24886,
8,
198,
220,
220,
220,
220,
220,
220,
220,
31341,
2022,
291,
62,
37581,
13,
2617,
62,
12417,
62,
18076,
10786,
25410,
282,
26599,
13,
6371,
3256,
288,
16184,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
17977,
62,
8807,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2940,
20613,
355,
366,
2256,
1,
1231,
11524,
15720,
602,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31341,
2022,
291,
13,
21812,
13,
301,
696,
7,
282,
24419,
291,
62,
37581,
11,
366,
2256,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31341,
2022,
291,
13,
21812,
13,
929,
9526,
7,
282,
24419,
291,
62,
37581,
11,
705,
2256,
11537,
628,
220,
220,
220,
2488,
12708,
24396,
198,
220,
220,
220,
825,
651,
62,
24455,
62,
1525,
7,
28816,
11,
691,
62,
32844,
11,
691,
62,
5305,
11,
2183,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
6889,
8106,
62,
1525,
329,
44161,
282,
26599,
12405,
1912,
319,
26498,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
8106,
62,
1525,
796,
1391,
6,
28816,
10354,
8383,
92,
198,
220,
220,
220,
220,
220,
220,
220,
611,
691,
62,
32844,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8106,
62,
1525,
17816,
32844,
20520,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
691,
62,
5305,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8106,
62,
1525,
17816,
32844,
20520,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2183,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8106,
62,
1525,
17816,
23144,
20520,
796,
33918,
13,
67,
8142,
7,
23144,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
8106,
62,
1525,
628,
220,
220,
220,
825,
4808,
1136,
62,
20427,
7,
944,
11,
1848,
11,
8383,
11,
41033,
11,
2779,
62,
562,
316,
11,
9577,
62,
562,
316,
11,
11241,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3497,
717,
2378,
326,
468,
5749,
640,
355,
1813,
41033,
290,
7466,
1848,
290,
8383,
1438,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
29891,
13,
22766,
7,
24597,
1817,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
24455,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8528,
1817,
13,
23317,
6624,
1848,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8528,
1817,
13,
28816,
6624,
8383,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8528,
1817,
13,
8692,
62,
1837,
23650,
6624,
2779,
62,
562,
316,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8528,
1817,
13,
22708,
62,
1837,
23650,
6624,
9577,
62,
562,
316,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8528,
1817,
13,
16514,
27823,
1875,
41033,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
11085,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
2617,
62,
20274,
7,
30001,
11,
1255,
8,
628,
220,
220,
220,
825,
4808,
1136,
62,
49921,
62,
20427,
62,
13000,
7,
944,
11,
1848,
11,
8383,
11,
2779,
62,
562,
316,
11,
9577,
62,
562,
316,
11,
11241,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3497,
749,
2274,
5236,
2106,
2378,
326,
7466,
1848,
290,
8383,
1438,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
29891,
13,
22766,
7,
24597,
1817,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
24455,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8528,
1817,
13,
23317,
6624,
1848,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8528,
1817,
13,
28816,
6624,
8383,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8528,
1817,
13,
8692,
62,
1837,
23650,
6624,
2779,
62,
562,
316,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8528,
1817,
13,
22708,
62,
1837,
23650,
6624,
9577,
62,
562,
316,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
2875,
62,
1525,
7,
24597,
1817,
13,
312,
13,
20147,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
11085,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
2617,
62,
20274,
7,
30001,
11,
1255,
8,
628,
198,
2,
9626,
425,
44161,
578,
2393,
8619,
198,
7890,
62,
15908,
796,
2836,
62,
7890,
62,
15908,
7,
24805,
62,
20608,
11,
44746,
8,
198,
25410,
6601,
14881,
8979,
796,
28686,
13,
6978,
13,
22179,
7,
7890,
62,
15908,
11,
6143,
38105,
8,
198,
198,
2,
13610,
8619,
329,
44161,
578,
2393,
198,
2978,
525,
13,
28015,
15908,
7,
7890,
62,
15908,
8,
198,
198,
9945,
62,
28816,
796,
24047,
12468,
263,
3419,
198
] | 2.456186 | 2,716 |
from tcutils.util import *
from vnc_api.vnc_api import *
import vnc_api_test
class BDFixture(vnc_api_test.VncLibFixture):
'''
Bridge Domain Fixture
'''
def create_bd(self):
'''
Creates a bridge domain
'''
self.bd_obj = BridgeDomain(name=self.bd_name,
parent_obj=self.parent_obj,
mac_learning_enabled=self.mac_learning_enabled,
mac_limit_control=self.mac_limit_control,
mac_move_control=self.mac_move_control,
mac_aging_time=self.mac_aging_time,
isid=self.isid)
self.bd_uuid = self.vnc_lib.bridge_domain_create(self.bd_obj)
self.logger.info('Created Bridge Domain %s, UUID: %s' % (
self.vnc_lib.id_to_fq_name(self.bd_uuid), self.bd_uuid))
self._populate_attr()
return self.bd_obj
# end create_bd
def delete_bd(self, uuid=None):
'''
Delete Bridge Domain object
Args:
uuid : UUID of BridgeDomain object
'''
uuid = uuid or self.bd_uuid
self.vnc_lib.bridge_domain_delete(id=uuid)
self.logger.info('Deleted Bridge Domain %s' % (uuid))
# end delete_bd
def read_bd(self, uuid=None):
'''
Read Bridge Domain object
Args:
uuid : UUID of BridgeDomain object
'''
uuid = uuid or self.bd_uuid
bd_obj = self.vnc_lib.bridge_domain_read(id=uuid)
self.logger.info('Bridge Domain %s info %s' % (uuid,bd_obj))
return bd_obj
# end read_bd
def update_bd(self, **kwargs):
'''
Updates bridge domain
'''
self.parse_bd_kwargs(**kwargs)
self.vnc_h.update_bd(uuid=self.bd_uuid, **kwargs)
# end verify_on_setup
@retry(delay=2, tries=5)
def verify_bd_in_api_server(self):
""" Checks for Bridge Domain in API Server.
"""
self.api_verification_flag = True
cfgm_ip = self.inputs.cfgm_ips[0]
self.api_s_bd_obj = self.api_s_inspects[cfgm_ip].get_cs_bridge_domain(
bd_name=self.bd_name, refresh=True)
if not self.api_s_bd_obj:
self.logger.warn("Bridge Domain %s is not found in API-Server" %
(self.bd_name))
self.api_verification_flag = self.api_verification_flag and False
return False
if self.api_s_bd_obj['bridge-domain']['uuid'] != self.bd_uuid:
self.logger.warn(
"BD Object ID %s in API-Server is not what was created" % (
self.bd_uuid))
self.api_verification_flag = self.api_verification_flag and False
return False
if self.api_s_bd_obj['bridge-domain']['parent_type'] != 'virtual-network' or \
self.api_s_bd_obj['bridge-domain']['parent_uuid'] != self.parent_obj.uuid:
self.logger.warn(
"BD parent type %s and ID %s in API-Server is not as expected: %s" % (
self.api_s_bd_obj['bridge-domain']['parent_type'],
self.api_s_bd_obj['bridge-domain']['parent_uuid'],
self.parent_obj.uuid))
self.api_verification_flag = self.api_verification_flag and False
return False
if self.mac_learning_enabled and (
self.api_s_bd_obj['bridge-domain']['mac_learning_enabled'] !=
self.mac_learning_enabled):
self.logger.warn("BD mac_learning_enabled %s in API-Server is "
"not what was created %s" % (
self.api_s_bd_obj['bridge-domain']['mac_learning_enabled'],
self.mac_learning_enabled))
self.api_verification_flag = self.api_verification_flag and False
return False
if self.mac_limit_control and (
(self.api_s_bd_obj['bridge-domain']['mac_limit_control']
['mac_limit'] != self.mac_limit_control.mac_limit) or (
self.api_s_bd_obj['bridge-domain']['mac_limit_control']
['mac_limit_action'] != self.mac_limit_control.mac_limit_action)):
self.logger.warn("BD mac_limit_control %s in API-Server is "
"not what was created %s" % (
self.api_s_bd_obj['bridge-domain']['mac_limit_control'],
self.mac_limit_control))
self.api_verification_flag = self.api_verification_flag and False
return False
if self.mac_move_control and (
(self.api_s_bd_obj['bridge-domain']['mac_move_control']
['mac_move_limit'] != self.mac_move_control.mac_move_limit
) or (
self.api_s_bd_obj['bridge-domain']['mac_move_control']
['mac_move_limit_action'] !=
self.mac_move_control.mac_move_limit_action) or (
self.api_s_bd_obj['bridge-domain']['mac_move_control']
['mac_move_time_window'] !=
self.mac_move_control.mac_move_time_window)):
self.logger.warn("BD mac_move_control %s in API-Server is "
"not what was created %s" % (
self.api_s_bd_obj['bridge-domain']['mac_move_control'],
self.mac_move_control))
self.api_verification_flag = self.api_verification_flag and False
return False
if self.mac_aging_time and (self.api_s_bd_obj['bridge-domain']
['mac_aging_time'] != self.mac_aging_time):
self.logger.warn("BD mac_aging_time %s in API-Server is "
"not what was created %s" % (
self.api_s_bd_obj['bridge-domain']['mac_aging_time'],
self.mac_aging_time))
self.api_verification_flag = self.api_verification_flag and False
return False
if self.isid and (self.api_s_bd_obj['bridge-domain']['isid'] !=
self.isid):
self.logger.warn("BD isid %s in API-Server is "
"not what was created %s" % (
self.api_s_bd_obj['bridge-domain']['isid'],
self.isid))
self.api_verification_flag = self.api_verification_flag and False
return False
self.logger.info("Verifications in API Server %s for BD %s passed" %(
cfgm_ip, self.bd_name))
return True
# end verify_bd_in_api_server
@retry(delay=2, tries=2)
def verify_bd_for_vn_in_agent(self, vmi_uuid):
"""
Verify Bridge Domain for VN info in agent
"""
vn_obj = self.parent_obj
vmi_host = self.vnc_h.get_vmi_host_name(vmi_uuid)
if not vmi_host:
self.logger.error("VMI %s host could not be found from VNC API" % (
vmi_uuid))
return False
vmi_host_ip = self.inputs.get_host_ip(vmi_host)
bd_in_agent = self.agent_inspect[vmi_host_ip].get_bd(self.bd_uuid)
if not bd_in_agent:
self.logger.warn("Bridge Domain %s is not found in Agent %s" % (
self.bd_name, vmi_host_ip))
return False
#Verify expected values in agent
for bd in bd_in_agent:
if bd['vn'] != vn_obj.uuid:
self.logger.warn("VN uuid mismatch for Bridge Domain"
" in agent, actual: %s, expected: %s" % (
bd['vn'], vn_obj.uuid))
result = False
return result
if bd['uuid'] != self.bd_uuid:
self.logger.warn("BD uuid mismatch in agent"
", actual: %s, expected: %s" % (
bd['uuid'], self.bd_uuid))
result = False
return result
if int(bd['isid']) != self.isid:
self.logger.warn("isid mismatch for Bridge Domain"
" in agent, actual: %s, expected: %s" % (
bd['isid'], self.isid))
result = False
return result
if bd['pbb_etree_enabled'] != str(vn_obj.pbb_etree_enable):
self.logger.warn("pbb_etree_enable value mismatch for Bridge Domain"
" in agent, actual: %s, expected: %s" % (
bd['pbb_etree_enabled'], str(vn_obj.pbb_etree_enable)))
result = False
return result
if bool(bd['learning_enabled']) != self.mac_learning_enabled:
self.logger.warn("mac_learning_enabled value mismatch for Bridge Domain"
" in agent, actual: %s, expected: %s" % (
bd['learning_enabled'], self.mac_learning_enabled))
result = False
return result
#Uncomment BD name check, when bug 1665253 is fixed
if bd['name'] != self.fq_name_str:
self.logger.warn("Name mismatch for Bridge Domain"
" in agent, actual: %s, expected: %s" % (
bd['name'], self.bd_name))
result = False
return result
self.logger.info("Verifications in Agent %s for BD %s for VN info"
" passed" %(vmi_host_ip, self.bd_name))
return True
#end verify_bd_for_vn_in_agent
@retry(delay=2, tries=2)
def verify_bd_for_vmi_in_computes(self, vmi_uuid):
'''
Verify BD details in VMI in computes:
Verify in agent as well as vrouter
'''
if vmi_uuid:
vmi_host = self.vnc_h.get_vmi_host_name(vmi_uuid)
if not vmi_host:
self.logger.warn("VMI %s host could not be found from VNC API" % (
vmi_uuid))
return False
vmi_host_ip = self.inputs.get_host_ip(vmi_host)
vmis_in_agent = self.agent_inspect[vmi_host_ip].get_vna_tap_interface_by_vmi(vmi_uuid)
if not vmis_in_agent:
self.logger.warn("VMI %s is not found in Agent %s" % (
vmi_uuid, vmi_host_ip))
return False
vmi_in_agent = vmis_in_agent[0]
if not vmi_in_agent['bridge_domain_list']:
self.logger.warn("Bridge Domain for VMI %s is not found in Agent %s" % (
vmi_uuid, vmi_host_ip))
return False
bd_uuid_in_vmi = vmi_in_agent['bridge_domain_list'][0]['bridge_domain_uuid']
#Verify bd uuid in agent
if (self.bd_uuid != bd_uuid_in_vmi):
self.logger.warn("Bridge Domain uuid mismatch"
" in agent, actual: %s, expected: %s" % (
bd_uuid_in_vmi, self.bd_uuid))
result = False
return result
else:
self.logger.info("Verification for Bridge Domain uuid %s for "
"VMI %s passed in agent %s" % (
bd_uuid_in_vmi, vmi_uuid, vmi_host_ip))
#Vrouter verifications
#Interface verification
vmi_in_vrouter = self.agent_inspect[
vmi_host_ip].get_vrouter_interfaces_by_name(vmi_in_agent['name'])
#[TBD]Verify ISID and Bmac value here
#[TBD]Route table verification
return True
#end verify_bd_for_vmi_in_computes
@retry(delay=2, tries=2)
def verify_bd_not_in_agent(self):
""" Verify Bridge Domain not present in agent after BD is deleted.
"""
for ip in self.inputs.compute_ips:
bd_in_agent = self.agent_inspect[ip].get_bd(self.bd_uuid)
if bd_in_agent:
self.logger.warn("Bridge Domain %s is still seen in Agent %s as %s" % (
self.bd_name, ip, bd_in_agent))
return False
self.logger.info("Bridge Domain %s is removed from Agent %s" % (
self.bd_name, ip))
return True
#end verify_bd_not_in_agent
def verify_cleared_from_setup(self, verify=True):
'''
Verify that Bridge Domain is deleted from the setup
'''
if verify:
assert self.verify_bd_not_in_agent(), ("BD cleanup verification "
"failed in agent")
| [
6738,
256,
8968,
4487,
13,
22602,
1330,
1635,
198,
6738,
410,
10782,
62,
15042,
13,
85,
10782,
62,
15042,
1330,
1635,
198,
11748,
410,
10782,
62,
15042,
62,
9288,
198,
198,
4871,
347,
8068,
9602,
7,
85,
10782,
62,
15042,
62,
9288,
13,
53,
10782,
25835,
37,
9602,
2599,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
10290,
20021,
376,
9602,
198,
220,
220,
220,
705,
7061,
628,
198,
220,
220,
220,
825,
2251,
62,
17457,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7921,
274,
257,
7696,
7386,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17457,
62,
26801,
796,
10290,
43961,
7,
3672,
28,
944,
13,
17457,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2560,
62,
26801,
28,
944,
13,
8000,
62,
26801,
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,
8352,
62,
40684,
62,
25616,
28,
944,
13,
20285,
62,
40684,
62,
25616,
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,
8352,
62,
32374,
62,
13716,
28,
944,
13,
20285,
62,
32374,
62,
13716,
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,
8352,
62,
21084,
62,
13716,
28,
944,
13,
20285,
62,
21084,
62,
13716,
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,
8352,
62,
3039,
62,
2435,
28,
944,
13,
20285,
62,
3039,
62,
2435,
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,
318,
312,
28,
944,
13,
271,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17457,
62,
12303,
312,
796,
2116,
13,
85,
10782,
62,
8019,
13,
9458,
62,
27830,
62,
17953,
7,
944,
13,
17457,
62,
26801,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
10951,
10786,
41972,
10290,
20021,
4064,
82,
11,
471,
27586,
25,
4064,
82,
6,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
85,
10782,
62,
8019,
13,
312,
62,
1462,
62,
69,
80,
62,
3672,
7,
944,
13,
17457,
62,
12303,
312,
828,
2116,
13,
17457,
62,
12303,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
12924,
5039,
62,
35226,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
17457,
62,
26801,
198,
220,
220,
220,
1303,
886,
2251,
62,
17457,
628,
220,
220,
220,
825,
12233,
62,
17457,
7,
944,
11,
334,
27112,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
23520,
10290,
20021,
2134,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
334,
27112,
1058,
471,
27586,
286,
10290,
43961,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
334,
27112,
796,
334,
27112,
393,
2116,
13,
17457,
62,
12303,
312,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
85,
10782,
62,
8019,
13,
9458,
62,
27830,
62,
33678,
7,
312,
28,
12303,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
10951,
10786,
5005,
33342,
10290,
20021,
4064,
82,
6,
4064,
357,
12303,
312,
4008,
198,
220,
220,
220,
1303,
886,
12233,
62,
17457,
628,
220,
220,
220,
825,
1100,
62,
17457,
7,
944,
11,
334,
27112,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
4149,
10290,
20021,
2134,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
334,
27112,
1058,
471,
27586,
286,
10290,
43961,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
334,
27112,
796,
334,
27112,
393,
2116,
13,
17457,
62,
12303,
312,
198,
220,
220,
220,
220,
220,
220,
220,
275,
67,
62,
26801,
796,
2116,
13,
85,
10782,
62,
8019,
13,
9458,
62,
27830,
62,
961,
7,
312,
28,
12303,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
10951,
10786,
37385,
20021,
4064,
82,
7508,
4064,
82,
6,
4064,
357,
12303,
312,
11,
17457,
62,
26801,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
275,
67,
62,
26801,
198,
220,
220,
220,
1303,
886,
1100,
62,
17457,
628,
220,
220,
220,
825,
4296,
62,
17457,
7,
944,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28090,
7696,
7386,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
29572,
62,
17457,
62,
46265,
22046,
7,
1174,
46265,
22046,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
85,
10782,
62,
71,
13,
19119,
62,
17457,
7,
12303,
312,
28,
944,
13,
17457,
62,
12303,
312,
11,
12429,
46265,
22046,
8,
198,
220,
220,
220,
1303,
886,
11767,
62,
261,
62,
40406,
628,
198,
220,
220,
220,
2488,
1186,
563,
7,
40850,
28,
17,
11,
8404,
28,
20,
8,
198,
220,
220,
220,
825,
11767,
62,
17457,
62,
259,
62,
15042,
62,
15388,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
47719,
329,
10290,
20021,
287,
7824,
9652,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
30218,
39870,
62,
541,
796,
2116,
13,
15414,
82,
13,
37581,
76,
62,
2419,
58,
15,
60,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
796,
2116,
13,
15042,
62,
82,
62,
1040,
38046,
58,
37581,
76,
62,
541,
4083,
1136,
62,
6359,
62,
9458,
62,
27830,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
67,
62,
3672,
28,
944,
13,
17457,
62,
3672,
11,
14976,
28,
17821,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
407,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
37385,
20021,
4064,
82,
318,
407,
1043,
287,
7824,
12,
10697,
1,
4064,
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,
357,
944,
13,
17457,
62,
3672,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
796,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
290,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
12303,
312,
20520,
14512,
2116,
13,
17457,
62,
12303,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14529,
9515,
4522,
4064,
82,
287,
7824,
12,
10697,
318,
407,
644,
373,
2727,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17457,
62,
12303,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
796,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
290,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
8000,
62,
4906,
20520,
14512,
705,
32844,
12,
27349,
6,
393,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
8000,
62,
12303,
312,
20520,
14512,
2116,
13,
8000,
62,
26801,
13,
12303,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14529,
2560,
2099,
4064,
82,
290,
4522,
4064,
82,
287,
7824,
12,
10697,
318,
407,
355,
2938,
25,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
8000,
62,
4906,
6,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
8000,
62,
12303,
312,
6,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
8000,
62,
26801,
13,
12303,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
796,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
290,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
20285,
62,
40684,
62,
25616,
290,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
20285,
62,
40684,
62,
25616,
20520,
14512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20285,
62,
40684,
62,
25616,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
14529,
8352,
62,
40684,
62,
25616,
4064,
82,
287,
7824,
12,
10697,
318,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1662,
644,
373,
2727,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
20285,
62,
40684,
62,
25616,
6,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20285,
62,
40684,
62,
25616,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
796,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
290,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
20285,
62,
32374,
62,
13716,
290,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
944,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
20285,
62,
32374,
62,
13716,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
20285,
62,
32374,
20520,
14512,
2116,
13,
20285,
62,
32374,
62,
13716,
13,
20285,
62,
32374,
8,
393,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
20285,
62,
32374,
62,
13716,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
20285,
62,
32374,
62,
2673,
20520,
14512,
2116,
13,
20285,
62,
32374,
62,
13716,
13,
20285,
62,
32374,
62,
2673,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
14529,
8352,
62,
32374,
62,
13716,
4064,
82,
287,
7824,
12,
10697,
318,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1662,
644,
373,
2727,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
20285,
62,
32374,
62,
13716,
6,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20285,
62,
32374,
62,
13716,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
796,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
290,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
20285,
62,
21084,
62,
13716,
290,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
944,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
20285,
62,
21084,
62,
13716,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
20285,
62,
21084,
62,
32374,
20520,
14512,
2116,
13,
20285,
62,
21084,
62,
13716,
13,
20285,
62,
21084,
62,
32374,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
393,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
20285,
62,
21084,
62,
13716,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
20285,
62,
21084,
62,
32374,
62,
2673,
20520,
14512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20285,
62,
21084,
62,
13716,
13,
20285,
62,
21084,
62,
32374,
62,
2673,
8,
393,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
20285,
62,
21084,
62,
13716,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
20285,
62,
21084,
62,
2435,
62,
17497,
20520,
14512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20285,
62,
21084,
62,
13716,
13,
20285,
62,
21084,
62,
2435,
62,
17497,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
14529,
8352,
62,
21084,
62,
13716,
4064,
82,
287,
7824,
12,
10697,
318,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1662,
644,
373,
2727,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
20285,
62,
21084,
62,
13716,
6,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20285,
62,
21084,
62,
13716,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
796,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
290,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
20285,
62,
3039,
62,
2435,
290,
357,
944,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37250,
20285,
62,
3039,
62,
2435,
20520,
14512,
2116,
13,
20285,
62,
3039,
62,
2435,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
14529,
8352,
62,
3039,
62,
2435,
4064,
82,
287,
7824,
12,
10697,
318,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1662,
644,
373,
2727,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
20285,
62,
3039,
62,
2435,
6,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20285,
62,
3039,
62,
2435,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
796,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
290,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
271,
312,
290,
357,
944,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
271,
312,
20520,
14512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
271,
312,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
14529,
318,
312,
4064,
82,
287,
7824,
12,
10697,
318,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1662,
644,
373,
2727,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
82,
62,
17457,
62,
26801,
17816,
9458,
12,
27830,
6,
7131,
6,
271,
312,
6,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
271,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
796,
2116,
13,
15042,
62,
332,
2649,
62,
32109,
290,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
10951,
7203,
13414,
6637,
287,
7824,
9652,
4064,
82,
329,
28023,
4064,
82,
3804,
1,
4064,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30218,
39870,
62,
541,
11,
2116,
13,
17457,
62,
3672,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
6407,
198,
220,
220,
220,
1303,
886,
11767,
62,
17457,
62,
259,
62,
15042,
62,
15388,
628,
198,
220,
220,
220,
2488,
1186,
563,
7,
40850,
28,
17,
11,
8404,
28,
17,
8,
198,
220,
220,
220,
825,
11767,
62,
17457,
62,
1640,
62,
85,
77,
62,
259,
62,
25781,
7,
944,
11,
410,
11632,
62,
12303,
312,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
49899,
10290,
20021,
329,
569,
45,
7508,
287,
5797,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
410,
77,
62,
26801,
796,
2116,
13,
8000,
62,
26801,
628,
220,
220,
220,
220,
220,
220,
220,
410,
11632,
62,
4774,
796,
2116,
13,
85,
10782,
62,
71,
13,
1136,
62,
85,
11632,
62,
4774,
62,
3672,
7,
85,
11632,
62,
12303,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
410,
11632,
62,
4774,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
18224,
7203,
53,
8895,
4064,
82,
2583,
714,
407,
307,
1043,
422,
569,
7792,
7824,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
11632,
62,
12303,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
410,
11632,
62,
4774,
62,
541,
796,
2116,
13,
15414,
82,
13,
1136,
62,
4774,
62,
541,
7,
85,
11632,
62,
4774,
8,
628,
220,
220,
220,
220,
220,
220,
220,
275,
67,
62,
259,
62,
25781,
796,
2116,
13,
25781,
62,
1040,
806,
58,
85,
11632,
62,
4774,
62,
541,
4083,
1136,
62,
17457,
7,
944,
13,
17457,
62,
12303,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
275,
67,
62,
259,
62,
25781,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
37385,
20021,
4064,
82,
318,
407,
1043,
287,
15906,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17457,
62,
3672,
11,
410,
11632,
62,
4774,
62,
541,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
13414,
1958,
2938,
3815,
287,
5797,
198,
220,
220,
220,
220,
220,
220,
220,
329,
275,
67,
287,
275,
67,
62,
259,
62,
25781,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
275,
67,
17816,
85,
77,
20520,
14512,
410,
77,
62,
26801,
13,
12303,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
53,
45,
334,
27112,
46318,
329,
10290,
20021,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
287,
5797,
11,
4036,
25,
4064,
82,
11,
2938,
25,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
67,
17816,
85,
77,
6,
4357,
410,
77,
62,
26801,
13,
12303,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1255,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
275,
67,
17816,
12303,
312,
20520,
14512,
2116,
13,
17457,
62,
12303,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
14529,
334,
27112,
46318,
287,
5797,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33172,
4036,
25,
4064,
82,
11,
2938,
25,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
67,
17816,
12303,
312,
6,
4357,
2116,
13,
17457,
62,
12303,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1255,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
493,
7,
17457,
17816,
271,
312,
6,
12962,
14512,
2116,
13,
271,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
271,
312,
46318,
329,
10290,
20021,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
287,
5797,
11,
4036,
25,
4064,
82,
11,
2938,
25,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
67,
17816,
271,
312,
6,
4357,
2116,
13,
271,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1255,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
275,
67,
17816,
79,
11848,
62,
316,
631,
62,
25616,
20520,
14512,
965,
7,
85,
77,
62,
26801,
13,
79,
11848,
62,
316,
631,
62,
21633,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
79,
11848,
62,
316,
631,
62,
21633,
1988,
46318,
329,
10290,
20021,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
287,
5797,
11,
4036,
25,
4064,
82,
11,
2938,
25,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
67,
17816,
79,
11848,
62,
316,
631,
62,
25616,
6,
4357,
965,
7,
85,
77,
62,
26801,
13,
79,
11848,
62,
316,
631,
62,
21633,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1255,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
20512,
7,
17457,
17816,
40684,
62,
25616,
6,
12962,
14512,
2116,
13,
20285,
62,
40684,
62,
25616,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
20285,
62,
40684,
62,
25616,
1988,
46318,
329,
10290,
20021,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
287,
5797,
11,
4036,
25,
4064,
82,
11,
2938,
25,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
67,
17816,
40684,
62,
25616,
6,
4357,
2116,
13,
20285,
62,
40684,
62,
25616,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1255,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3118,
23893,
28023,
1438,
2198,
11,
618,
5434,
1467,
2996,
28592,
318,
5969,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
275,
67,
17816,
3672,
20520,
14512,
2116,
13,
69,
80,
62,
3672,
62,
2536,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
5376,
46318,
329,
10290,
20021,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
287,
5797,
11,
4036,
25,
4064,
82,
11,
2938,
25,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
67,
17816,
3672,
6,
4357,
2116,
13,
17457,
62,
3672,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1255,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
10951,
7203,
13414,
6637,
287,
15906,
4064,
82,
329,
28023,
4064,
82,
329,
569,
45,
7508,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3804,
1,
4064,
7,
85,
11632,
62,
4774,
62,
541,
11,
2116,
13,
17457,
62,
3672,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
6407,
198,
220,
220,
220,
1303,
437,
11767,
62,
17457,
62,
1640,
62,
85,
77,
62,
259,
62,
25781,
628,
220,
220,
220,
2488,
1186,
563,
7,
40850,
28,
17,
11,
8404,
28,
17,
8,
198,
220,
220,
220,
825,
11767,
62,
17457,
62,
1640,
62,
85,
11632,
62,
259,
62,
5589,
1769,
7,
944,
11,
410,
11632,
62,
12303,
312,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
49899,
28023,
3307,
287,
569,
8895,
287,
552,
1769,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49899,
287,
5797,
355,
880,
355,
410,
472,
353,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
611,
410,
11632,
62,
12303,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
11632,
62,
4774,
796,
2116,
13,
85,
10782,
62,
71,
13,
1136,
62,
85,
11632,
62,
4774,
62,
3672,
7,
85,
11632,
62,
12303,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
410,
11632,
62,
4774,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
53,
8895,
4064,
82,
2583,
714,
407,
307,
1043,
422,
569,
7792,
7824,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
11632,
62,
12303,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
11632,
62,
4774,
62,
541,
796,
2116,
13,
15414,
82,
13,
1136,
62,
4774,
62,
541,
7,
85,
11632,
62,
4774,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
25413,
62,
259,
62,
25781,
796,
2116,
13,
25781,
62,
1040,
806,
58,
85,
11632,
62,
4774,
62,
541,
4083,
1136,
62,
85,
2616,
62,
44335,
62,
39994,
62,
1525,
62,
85,
11632,
7,
85,
11632,
62,
12303,
312,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
410,
25413,
62,
259,
62,
25781,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
53,
8895,
4064,
82,
318,
407,
1043,
287,
15906,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
11632,
62,
12303,
312,
11,
410,
11632,
62,
4774,
62,
541,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
11632,
62,
259,
62,
25781,
796,
410,
25413,
62,
259,
62,
25781,
58,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
410,
11632,
62,
259,
62,
25781,
17816,
9458,
62,
27830,
62,
4868,
6,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
37385,
20021,
329,
569,
8895,
4064,
82,
318,
407,
1043,
287,
15906,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
11632,
62,
12303,
312,
11,
410,
11632,
62,
4774,
62,
541,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
67,
62,
12303,
312,
62,
259,
62,
85,
11632,
796,
410,
11632,
62,
259,
62,
25781,
17816,
9458,
62,
27830,
62,
4868,
6,
7131,
15,
7131,
6,
9458,
62,
27830,
62,
12303,
312,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
13414,
1958,
275,
67,
334,
27112,
287,
5797,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
357,
944,
13,
17457,
62,
12303,
312,
14512,
275,
67,
62,
12303,
312,
62,
259,
62,
85,
11632,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
37385,
20021,
334,
27112,
46318,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
287,
5797,
11,
4036,
25,
4064,
82,
11,
2938,
25,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
67,
62,
12303,
312,
62,
259,
62,
85,
11632,
11,
2116,
13,
17457,
62,
12303,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1255,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
10951,
7203,
13414,
2649,
329,
10290,
20021,
334,
27112,
4064,
82,
329,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
53,
8895,
4064,
82,
3804,
287,
5797,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
67,
62,
12303,
312,
62,
259,
62,
85,
11632,
11,
410,
11632,
62,
12303,
312,
11,
410,
11632,
62,
4774,
62,
541,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
53,
472,
353,
3326,
6637,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
39317,
19637,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
11632,
62,
259,
62,
85,
472,
353,
796,
2116,
13,
25781,
62,
1040,
806,
58,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
11632,
62,
4774,
62,
541,
4083,
1136,
62,
85,
472,
353,
62,
3849,
32186,
62,
1525,
62,
3672,
7,
85,
11632,
62,
259,
62,
25781,
17816,
3672,
6,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
58,
51,
14529,
60,
13414,
1958,
3180,
2389,
290,
347,
20285,
1988,
994,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
58,
51,
14529,
60,
43401,
3084,
19637,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
6407,
198,
220,
220,
220,
1303,
437,
11767,
62,
17457,
62,
1640,
62,
85,
11632,
62,
259,
62,
5589,
1769,
628,
220,
220,
220,
2488,
1186,
563,
7,
40850,
28,
17,
11,
8404,
28,
17,
8,
198,
220,
220,
220,
825,
11767,
62,
17457,
62,
1662,
62,
259,
62,
25781,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
49899,
10290,
20021,
407,
1944,
287,
5797,
706,
28023,
318,
13140,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
329,
20966,
287,
2116,
13,
15414,
82,
13,
5589,
1133,
62,
2419,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
67,
62,
259,
62,
25781,
796,
2116,
13,
25781,
62,
1040,
806,
58,
541,
4083,
1136,
62,
17457,
7,
944,
13,
17457,
62,
12303,
312,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
275,
67,
62,
259,
62,
25781,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
40539,
7203,
37385,
20021,
4064,
82,
318,
991,
1775,
287,
15906,
4064,
82,
355,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17457,
62,
3672,
11,
20966,
11,
275,
67,
62,
259,
62,
25781,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
1362,
13,
10951,
7203,
37385,
20021,
4064,
82,
318,
4615,
422,
15906,
4064,
82,
1,
4064,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17457,
62,
3672,
11,
20966,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
6407,
198,
220,
220,
220,
1303,
437,
11767,
62,
17457,
62,
1662,
62,
259,
62,
25781,
628,
220,
220,
220,
825,
11767,
62,
2375,
1144,
62,
6738,
62,
40406,
7,
944,
11,
11767,
28,
17821,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49899,
326,
10290,
20021,
318,
13140,
422,
262,
9058,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
611,
11767,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6818,
2116,
13,
332,
1958,
62,
17457,
62,
1662,
62,
259,
62,
25781,
22784,
5855,
14529,
27425,
19637,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
47904,
287,
5797,
4943,
628
] | 1.894121 | 6,498 |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
4818,
8079,
198,
6738,
5366,
13,
9945,
1330,
20613,
198,
6738,
5366,
13,
85,
17,
1330,
10011,
2611,
44,
4254,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198
] | 2.954545 | 44 |
# 094
# Display an array of five numbers. Ask the user to select one
# of the numbers. Once they have selected a number, display the
# position of that item in the array. If they enter something that
# is not in the array, ask them to try again until they select
# a relevant item.
import array as ar
import numpy as np
import random
from typing import List
def get_num_int(prompt: str) -> int:
"""Function to check if users input is an integer"""
while True:
try:
number = int(input(prompt))
return number
except Exception as e:
print(e)
def create_random_list(length: int = 50, lowest_num: int = 0,
highest_num: int = 90) -> List[int]:
"""Returns a random list at a user set len, and lower and upper
bounds"""
# used to test return_index function
random_list = list()
for i in range(length):
random_list.append(random.randint(lowest_num, highest_num))
return random_list
def return_index(tp, element) -> List[int]:
"""Returns all the indexes of an element"""
indexes = []
[indexes.append(index) for index, value in enumerate(tp)
if value == element]
return indexes
if __name__ == '__main__':
# Using built in array module
nums_ar = ar.array('i', create_random_list(5))
print(nums_ar)
while True:
num = get_num_int('Please select a number to get the index of'
'- ')
if num in nums_ar:
print(f'Index(s) of {num} are at '
f'{return_index(nums_ar, num)}')
break
# Using numpy module
nums_np = np.array(create_random_list(5), dtype=np.int32)
print(nums_np)
while True:
num = get_num_int('Please select a number to get the index of'
'- ')
if num in nums_np:
print(f'Index(s) of {num} are at '
f'{return_index(nums_np, num)}')
break
| [
2,
657,
5824,
198,
2,
16531,
281,
7177,
286,
1936,
3146,
13,
16981,
262,
2836,
284,
2922,
530,
198,
2,
286,
262,
3146,
13,
4874,
484,
423,
6163,
257,
1271,
11,
3359,
262,
198,
2,
2292,
286,
326,
2378,
287,
262,
7177,
13,
1002,
484,
3802,
1223,
326,
198,
2,
318,
407,
287,
262,
7177,
11,
1265,
606,
284,
1949,
757,
1566,
484,
2922,
198,
2,
257,
5981,
2378,
13,
198,
198,
11748,
7177,
355,
610,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4738,
198,
6738,
19720,
1330,
7343,
628,
198,
4299,
651,
62,
22510,
62,
600,
7,
16963,
457,
25,
965,
8,
4613,
493,
25,
198,
220,
220,
220,
37227,
22203,
284,
2198,
611,
2985,
5128,
318,
281,
18253,
37811,
628,
220,
220,
220,
981,
6407,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1271,
796,
493,
7,
15414,
7,
16963,
457,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1271,
628,
220,
220,
220,
220,
220,
220,
220,
2845,
35528,
355,
304,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
68,
8,
628,
198,
4299,
2251,
62,
25120,
62,
4868,
7,
13664,
25,
493,
796,
2026,
11,
9016,
62,
22510,
25,
493,
796,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4511,
62,
22510,
25,
493,
796,
4101,
8,
4613,
7343,
58,
600,
5974,
198,
220,
220,
220,
37227,
35561,
257,
4738,
1351,
379,
257,
2836,
900,
18896,
11,
290,
2793,
290,
6727,
198,
220,
220,
220,
22303,
37811,
628,
220,
220,
220,
1303,
973,
284,
1332,
1441,
62,
9630,
2163,
628,
220,
220,
220,
4738,
62,
4868,
796,
1351,
3419,
628,
220,
220,
220,
329,
1312,
287,
2837,
7,
13664,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
4738,
62,
4868,
13,
33295,
7,
25120,
13,
25192,
600,
7,
9319,
395,
62,
22510,
11,
4511,
62,
22510,
4008,
628,
220,
220,
220,
1441,
4738,
62,
4868,
628,
198,
4299,
1441,
62,
9630,
7,
34788,
11,
5002,
8,
4613,
7343,
58,
600,
5974,
198,
220,
220,
220,
37227,
35561,
477,
262,
39199,
286,
281,
5002,
37811,
628,
220,
220,
220,
39199,
796,
17635,
198,
220,
220,
220,
685,
9630,
274,
13,
33295,
7,
9630,
8,
329,
6376,
11,
1988,
287,
27056,
378,
7,
34788,
8,
198,
220,
220,
220,
220,
611,
1988,
6624,
5002,
60,
628,
220,
220,
220,
1441,
39199,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
628,
220,
220,
220,
1303,
8554,
3170,
287,
7177,
8265,
628,
220,
220,
220,
997,
82,
62,
283,
796,
610,
13,
18747,
10786,
72,
3256,
2251,
62,
25120,
62,
4868,
7,
20,
4008,
628,
220,
220,
220,
3601,
7,
77,
5700,
62,
283,
8,
628,
220,
220,
220,
981,
6407,
25,
628,
220,
220,
220,
220,
220,
220,
220,
997,
796,
651,
62,
22510,
62,
600,
10786,
5492,
2922,
257,
1271,
284,
651,
262,
6376,
286,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
12,
705,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
997,
287,
997,
82,
62,
283,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
69,
6,
15732,
7,
82,
8,
286,
1391,
22510,
92,
389,
379,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
6,
90,
7783,
62,
9630,
7,
77,
5700,
62,
283,
11,
997,
38165,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
628,
220,
220,
220,
1303,
8554,
299,
32152,
8265,
628,
220,
220,
220,
997,
82,
62,
37659,
796,
45941,
13,
18747,
7,
17953,
62,
25120,
62,
4868,
7,
20,
828,
288,
4906,
28,
37659,
13,
600,
2624,
8,
628,
220,
220,
220,
3601,
7,
77,
5700,
62,
37659,
8,
628,
198,
220,
220,
220,
981,
6407,
25,
628,
220,
220,
220,
220,
220,
220,
220,
997,
796,
651,
62,
22510,
62,
600,
10786,
5492,
2922,
257,
1271,
284,
651,
262,
6376,
286,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
12,
705,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
997,
287,
997,
82,
62,
37659,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
69,
6,
15732,
7,
82,
8,
286,
1391,
22510,
92,
389,
379,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
6,
90,
7783,
62,
9630,
7,
77,
5700,
62,
37659,
11,
997,
38165,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
628
] | 2.372176 | 841 |
import math
co = float(input('Comprimento do cateto oposto: '))
ca = float(input('Comprimento do cateto adjacente: '))
hi = math.hypot(co, ca)
print('A hipotenusa vai medir {:.2f}'.format(hi))
'''hi = (co ** 2 + ca ** 2) **(1/2)
print('A hipotenusa vai medir {:.2f}'.format(hi))''' '''Usando matematicamente sem precisar importar'''
| [
11748,
10688,
198,
1073,
796,
12178,
7,
15414,
10786,
5377,
1050,
3681,
78,
466,
3797,
27206,
1034,
455,
78,
25,
705,
4008,
198,
6888,
796,
12178,
7,
15414,
10786,
5377,
1050,
3681,
78,
466,
3797,
27206,
15909,
68,
25,
705,
4008,
198,
5303,
796,
10688,
13,
36362,
313,
7,
1073,
11,
1275,
8,
198,
4798,
10786,
32,
10359,
313,
268,
22064,
410,
1872,
1117,
343,
46110,
13,
17,
69,
92,
4458,
18982,
7,
5303,
4008,
198,
7061,
6,
5303,
796,
357,
1073,
12429,
362,
1343,
1275,
12429,
362,
8,
12429,
7,
16,
14,
17,
8,
198,
4798,
10786,
32,
10359,
313,
268,
22064,
410,
1872,
1117,
343,
46110,
13,
17,
69,
92,
4458,
18982,
7,
5303,
4008,
7061,
6,
220,
705,
7061,
5842,
25440,
2603,
368,
1512,
3263,
68,
5026,
3718,
271,
283,
1330,
283,
7061,
6,
198
] | 2.42029 | 138 |
# (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP
# Copyright 2017 Fujitsu LIMITED
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from debtcollector import removals
from jinja2 import Template
import jira
from oslo_config import cfg
import simplejson as json
import urllib
import yaml
from monasca_notification.plugins.abstract_notifier import AbstractNotifier
"""
Note:
This plugin doesn't support multi tenancy. Multi tenancy requires support for
multiple JIRA server url. JIRA doesn't support OAUTH2 tokens, we may need to get
the user credentials in query params and store them in monasca DB which we don't want to do.
That is the reason for not supporting true multitenancy.
MultiTenancy can be achieved by creating issues in different project for different tenant on
the same JIRA server.
notification.address = https://<jira_url>/?project=<project_name>
Jira Configuration
1) jira:
user: username
password: password
Sample notification:
monasca notification-create MyIssuer JIRA https://jira.hpcloud.net/?project=MyProject
monasca notification-create MyIssuer1 JIRA https://jira.hpcloud.net/?project=MyProject&
component=MyComponent
"""
CONF = cfg.CONF
jira_notifier_group = cfg.OptGroup(name='%s_notifier' % JiraNotifier.type)
jira_notifier_opts = [
cfg.IntOpt(name='timeout', default=5, min=1),
cfg.StrOpt(name='user', required=False),
cfg.StrOpt(name='password', required=False, secret=True),
cfg.StrOpt(name='custom_formatter', default=None),
cfg.StrOpt(name='proxy', default=None)
]
| [
2,
357,
34,
8,
15069,
1584,
30446,
15503,
6400,
446,
14973,
7712,
5834,
18470,
198,
2,
15069,
2177,
32671,
19831,
40880,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
198,
2,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
198,
6738,
5057,
33327,
273,
1330,
816,
709,
874,
198,
6738,
474,
259,
6592,
17,
1330,
37350,
198,
11748,
474,
8704,
198,
6738,
28686,
5439,
62,
11250,
1330,
30218,
70,
198,
11748,
2829,
17752,
355,
33918,
198,
11748,
2956,
297,
571,
198,
11748,
331,
43695,
198,
198,
6738,
937,
42688,
62,
1662,
2649,
13,
37390,
13,
397,
8709,
62,
1662,
7483,
1330,
27741,
3673,
7483,
198,
198,
37811,
198,
220,
220,
5740,
25,
198,
220,
220,
220,
220,
770,
13877,
1595,
470,
1104,
5021,
46543,
13,
15237,
46543,
4433,
1104,
329,
198,
220,
220,
220,
220,
3294,
449,
40,
3861,
4382,
19016,
13,
449,
40,
3861,
1595,
470,
1104,
440,
32,
24318,
17,
16326,
11,
356,
743,
761,
284,
651,
198,
220,
220,
220,
220,
262,
2836,
18031,
287,
12405,
42287,
290,
3650,
606,
287,
937,
42688,
20137,
543,
356,
836,
470,
765,
284,
466,
13,
198,
220,
220,
220,
220,
1320,
318,
262,
1738,
329,
407,
6493,
2081,
41785,
268,
3883,
13,
628,
220,
220,
220,
15237,
24893,
3883,
460,
307,
8793,
416,
4441,
2428,
287,
1180,
1628,
329,
1180,
18285,
319,
198,
220,
220,
220,
262,
976,
449,
40,
3861,
4382,
13,
628,
220,
220,
14483,
13,
21975,
796,
3740,
1378,
27,
73,
8704,
62,
6371,
29,
20924,
16302,
28,
27,
16302,
62,
3672,
29,
628,
220,
220,
449,
8704,
28373,
198,
220,
220,
220,
220,
220,
220,
352,
8,
474,
8704,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
25,
20579,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9206,
25,
9206,
628,
220,
220,
220,
27565,
14483,
25,
198,
220,
220,
220,
220,
220,
220,
937,
42688,
14483,
12,
17953,
2011,
27738,
15573,
449,
40,
3861,
3740,
1378,
73,
8704,
13,
24831,
17721,
13,
3262,
20924,
16302,
28,
3666,
16775,
198,
220,
220,
220,
220,
220,
220,
937,
42688,
14483,
12,
17953,
2011,
27738,
15573,
16,
449,
40,
3861,
3740,
1378,
73,
8704,
13,
24831,
17721,
13,
3262,
20924,
16302,
28,
3666,
16775,
5,
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,
7515,
28,
3666,
21950,
198,
198,
37811,
628,
198,
10943,
37,
796,
30218,
70,
13,
10943,
37,
628,
198,
198,
73,
8704,
62,
1662,
7483,
62,
8094,
796,
30218,
70,
13,
27871,
13247,
7,
3672,
11639,
4,
82,
62,
1662,
7483,
6,
4064,
449,
8704,
3673,
7483,
13,
4906,
8,
198,
73,
8704,
62,
1662,
7483,
62,
404,
912,
796,
685,
198,
220,
220,
220,
30218,
70,
13,
5317,
27871,
7,
3672,
11639,
48678,
3256,
4277,
28,
20,
11,
949,
28,
16,
828,
198,
220,
220,
220,
30218,
70,
13,
13290,
27871,
7,
3672,
11639,
7220,
3256,
2672,
28,
25101,
828,
198,
220,
220,
220,
30218,
70,
13,
13290,
27871,
7,
3672,
11639,
28712,
3256,
2672,
28,
25101,
11,
3200,
28,
17821,
828,
198,
220,
220,
220,
30218,
70,
13,
13290,
27871,
7,
3672,
11639,
23144,
62,
687,
1436,
3256,
4277,
28,
14202,
828,
198,
220,
220,
220,
30218,
70,
13,
13290,
27871,
7,
3672,
11639,
36436,
3256,
4277,
28,
14202,
8,
198,
60,
628,
198
] | 3.109195 | 696 |
from typing import List, Union
from ..base import BaseText2Vec
from ....base import catch_vector_errors
from ....doc_utils import ModelDefinition
from ....import_utils import *
from ....models_dict import MODEL_REQUIREMENTS
from datetime import date
if is_all_dependency_installed(MODEL_REQUIREMENTS['encoders-text-torch-transformers-auto']):
from transformers import AutoTokenizer, AutoModel
import torch
LegalBertModelDefinition = ModelDefinition(
model_id="text/legal-bert",
model_name="Legal Bert",
vector_length=768,
description="BERT has achieved impressive performance in several NLP tasks. However, there has been limited investigation on its adaptation guidelines in specialised domains. Here we focus on the legal domain, where we explore several approaches for applying BERT models to downstream legal tasks, evaluating on multiple datasets. Our findings indicate that the previous guidelines for pre-training and fine-tuning, often blindly followed, do not always generalize well in the legal domain. Thus we propose a systematic investigation of the available strategies when applying BERT in specialised domains. These are: (a) use the original BERT out of the box, (b) adapt BERT by additional pre-training on domain-specific corpora, and (c) pre-train BERT from scratch on domain-specific corpora. We also propose a broader hyper-parameter search space when fine-tuning for downstream tasks and we release LEGAL-BERT, a family of BERT models intended to assist legal NLP research, computational law, and legal technology applications.",
paper="https://arxiv.org/abs/2010.02559",
repo="https://huggingface.co/nlpaueb/legal-bert-base-uncased",
release_date=date(2020,10,6),
installation="pip install vectorhub[encoders-text-torch-transformers]",
example="""
#pip install vectorhub[encoders-text-torch-transformers]
from vectorhub.encoders.text.torch_transformers import LegalBert2Vec
model = LegalBert2Vec()
model.encode("I enjoy taking long walks along the beach with my dog.")
"""
)
__doc__ = LegalBertModelDefinition.create_docs()
| [
6738,
19720,
1330,
7343,
11,
4479,
198,
6738,
11485,
8692,
1330,
7308,
8206,
17,
53,
721,
198,
6738,
19424,
8692,
1330,
4929,
62,
31364,
62,
48277,
198,
6738,
19424,
15390,
62,
26791,
1330,
9104,
36621,
198,
6738,
19424,
11748,
62,
26791,
1330,
1635,
198,
6738,
19424,
27530,
62,
11600,
1330,
19164,
3698,
62,
2200,
49128,
28957,
198,
6738,
4818,
8079,
1330,
3128,
198,
361,
318,
62,
439,
62,
45841,
1387,
62,
37050,
7,
33365,
3698,
62,
2200,
49128,
28957,
17816,
12685,
375,
364,
12,
5239,
12,
13165,
354,
12,
35636,
364,
12,
23736,
20520,
2599,
198,
220,
220,
220,
422,
6121,
364,
1330,
11160,
30642,
7509,
11,
11160,
17633,
198,
220,
220,
220,
1330,
28034,
198,
198,
38263,
33,
861,
17633,
36621,
796,
9104,
36621,
7,
198,
220,
220,
220,
2746,
62,
312,
2625,
5239,
14,
18011,
12,
4835,
1600,
220,
198,
220,
220,
220,
2746,
62,
3672,
2625,
38263,
22108,
1600,
220,
198,
220,
220,
220,
15879,
62,
13664,
28,
30610,
11,
220,
198,
220,
220,
220,
6764,
2625,
13246,
51,
468,
8793,
8036,
2854,
287,
1811,
399,
19930,
8861,
13,
2102,
11,
612,
468,
587,
3614,
3645,
319,
663,
16711,
9949,
287,
2041,
1417,
18209,
13,
3423,
356,
2962,
319,
262,
2742,
7386,
11,
810,
356,
7301,
1811,
10581,
329,
11524,
347,
17395,
4981,
284,
33218,
2742,
8861,
11,
22232,
319,
3294,
40522,
13,
3954,
6373,
7603,
326,
262,
2180,
9949,
329,
662,
12,
34409,
290,
3734,
12,
28286,
278,
11,
1690,
39615,
3940,
11,
466,
407,
1464,
2276,
1096,
880,
287,
262,
2742,
7386,
13,
6660,
356,
18077,
257,
17895,
3645,
286,
262,
1695,
10064,
618,
11524,
347,
17395,
287,
2041,
1417,
18209,
13,
2312,
389,
25,
357,
64,
8,
779,
262,
2656,
347,
17395,
503,
286,
262,
3091,
11,
357,
65,
8,
6068,
347,
17395,
416,
3224,
662,
12,
34409,
319,
7386,
12,
11423,
3990,
64,
11,
290,
357,
66,
8,
662,
12,
27432,
347,
17395,
422,
12692,
319,
7386,
12,
11423,
3990,
64,
13,
775,
635,
18077,
257,
11622,
8718,
12,
17143,
2357,
2989,
2272,
618,
3734,
12,
28286,
278,
329,
33218,
8861,
290,
356,
2650,
20978,
1847,
12,
13246,
51,
11,
257,
1641,
286,
347,
17395,
4981,
5292,
284,
3342,
2742,
399,
19930,
2267,
11,
31350,
1099,
11,
290,
2742,
3037,
5479,
33283,
198,
220,
220,
220,
3348,
2625,
5450,
1378,
283,
87,
452,
13,
2398,
14,
8937,
14,
10333,
13,
36629,
3270,
1600,
220,
198,
220,
220,
220,
29924,
2625,
5450,
1378,
71,
1018,
2667,
2550,
13,
1073,
14,
21283,
8957,
518,
65,
14,
18011,
12,
4835,
12,
8692,
12,
19524,
839,
1600,
198,
220,
220,
220,
2650,
62,
4475,
28,
4475,
7,
42334,
11,
940,
11,
21,
828,
198,
220,
220,
220,
9988,
2625,
79,
541,
2721,
15879,
40140,
58,
12685,
375,
364,
12,
5239,
12,
13165,
354,
12,
35636,
364,
60,
1600,
198,
220,
220,
220,
1672,
2625,
15931,
198,
220,
220,
220,
1303,
79,
541,
2721,
15879,
40140,
58,
12685,
375,
364,
12,
5239,
12,
13165,
354,
12,
35636,
364,
60,
198,
220,
220,
220,
422,
15879,
40140,
13,
12685,
375,
364,
13,
5239,
13,
13165,
354,
62,
35636,
364,
1330,
16027,
33,
861,
17,
53,
721,
198,
220,
220,
220,
2746,
796,
16027,
33,
861,
17,
53,
721,
3419,
198,
220,
220,
220,
2746,
13,
268,
8189,
7203,
40,
2883,
2263,
890,
11114,
1863,
262,
10481,
351,
616,
3290,
19570,
198,
220,
220,
220,
37227,
198,
8,
198,
198,
834,
15390,
834,
796,
16027,
33,
861,
17633,
36621,
13,
17953,
62,
31628,
3419,
198
] | 3.620513 | 585 |
# -*- coding: utf-8 -*-
# Copyright 2017 Vector Creations Ltd
#
# 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 signedjson.key
from twisted.internet.defer import Deferred
import tests.unittest
KEY_1 = signedjson.key.decode_verify_key_base64(
"ed25519", "key1", "fP5l4JzpZPq/zdbBg5xx6lQGAAOM9/3w94cqiJ5jPrw"
)
KEY_2 = signedjson.key.decode_verify_key_base64(
"ed25519", "key2", "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
2177,
20650,
5844,
602,
12052,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
198,
11748,
4488,
17752,
13,
2539,
198,
198,
6738,
19074,
13,
37675,
13,
4299,
263,
1330,
2896,
17436,
198,
198,
11748,
5254,
13,
403,
715,
395,
198,
198,
20373,
62,
16,
796,
4488,
17752,
13,
2539,
13,
12501,
1098,
62,
332,
1958,
62,
2539,
62,
8692,
2414,
7,
198,
220,
220,
220,
366,
276,
13381,
1129,
1600,
366,
2539,
16,
1600,
366,
69,
47,
20,
75,
19,
41,
89,
79,
57,
47,
80,
14,
89,
9945,
33,
70,
20,
5324,
21,
75,
48,
38,
3838,
2662,
24,
14,
18,
86,
5824,
66,
40603,
41,
20,
73,
6836,
86,
1,
198,
8,
198,
20373,
62,
17,
796,
4488,
17752,
13,
2539,
13,
12501,
1098,
62,
332,
1958,
62,
2539,
62,
8692,
2414,
7,
198,
220,
220,
220,
366,
276,
13381,
1129,
1600,
366,
2539,
17,
1600,
366,
2949,
72,
21,
54,
80,
66,
35,
73,
15,
48,
76,
47,
87,
44175,
48,
80,
469,
89,
86,
51,
75,
33,
42,
41871,
80,
17231,
56,
16,
84,
17,
37,
88,
25527,
24,
84,
56,
86,
1,
198,
8,
628
] | 2.759531 | 341 |
import requests
import pandas as pd
import time
class AlpacaNewsRetriever:
"""
Class for getting historical news from Alpaca
__init__():
API_ID: your Alpaca ID
API_KEY: your Alpaca secret key
get_news():
symbol: Ticker of the stock. e.g. AAPL
start: start timestamp in RFC 3339 format. e.g. 01-01-2015
end: end timestamp in RFC 3339 format. e.g. 01-01-2019
limit: number of news per page, max 50.
return: a pandas dataframe contains the news
"""
"""
def get_news(self, symbol, start, end, limit=50):
raw_response = self.get_raw_request(symbol, start, end, limit)
if limit <= 50:
print(raw_response)
return self.post_process(raw_response, symbol)
else:
# TODO: add pagination to API call
return raw_response
"""
| [
11748,
7007,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
640,
628,
198,
4871,
978,
79,
22260,
9980,
9781,
380,
964,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5016,
329,
1972,
6754,
1705,
422,
978,
79,
22260,
198,
220,
220,
220,
11593,
15003,
834,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
7824,
62,
2389,
25,
534,
978,
79,
22260,
4522,
198,
220,
220,
220,
220,
220,
220,
220,
7824,
62,
20373,
25,
534,
978,
79,
22260,
3200,
1994,
628,
220,
220,
220,
651,
62,
10827,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
6194,
25,
309,
15799,
286,
262,
4283,
13,
304,
13,
70,
13,
31518,
43,
198,
220,
220,
220,
220,
220,
220,
220,
923,
25,
923,
41033,
287,
30978,
23460,
24,
5794,
13,
304,
13,
70,
13,
5534,
12,
486,
12,
4626,
198,
220,
220,
220,
220,
220,
220,
220,
886,
25,
886,
41033,
287,
30978,
23460,
24,
5794,
13,
304,
13,
70,
13,
5534,
12,
486,
12,
23344,
198,
220,
220,
220,
220,
220,
220,
220,
4179,
25,
1271,
286,
1705,
583,
2443,
11,
3509,
2026,
13,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
25,
257,
19798,
292,
1366,
14535,
4909,
262,
1705,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
825,
651,
62,
10827,
7,
944,
11,
6194,
11,
923,
11,
886,
11,
4179,
28,
1120,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
8246,
62,
26209,
796,
2116,
13,
1136,
62,
1831,
62,
25927,
7,
1837,
23650,
11,
923,
11,
886,
11,
4179,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4179,
19841,
2026,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
1831,
62,
26209,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
7353,
62,
14681,
7,
1831,
62,
26209,
11,
6194,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
16926,
46,
25,
751,
42208,
1883,
284,
7824,
869,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
8246,
62,
26209,
198,
220,
220,
220,
37227,
198
] | 2.336 | 375 |
import contextlib
import concurrent.futures
import os
import sys
import traceback
import typing
import itertools
from conducto.shared import (
async_utils,
client_utils,
types as t,
log,
)
import conducto
from . import dockerfile as dockerfile_mod, names
from conducto.shared import constants, imagepath
from . import names
CONST_EE = constants.ExecutionEnv
if sys.version_info >= (3, 7):
asynccontextmanager = contextlib.asynccontextmanager
else:
from conducto.shared import async_backport
asynccontextmanager = async_backport.asynccontextmanager
def relpath(path):
"""
Construct a path with decoration to enable translation inside a docker
image for a node. This may be used to construct path parameters to a
command line tool.
This is used internally by :py:class:`conducto.Exec` when used with a
Python callable to construct the command line which executes that callable
in the pipeline.
"""
ctxpath = Image.get_contextual_path(path)
return f"__conducto_path:{ctxpath.linear()}:endpath__"
class Repository:
"""A collection of images with different names"""
class Image:
"""
:param image: Specify the base image to start from. Code can be added with
various context* variables, and packages with install_* variables.
:type image: `str`
:param dockerfile: Use instead of :code:`image` and pass a path to a Dockerfile.
Relative paths are evaluated starting from the file where this code is
written. Unless :code:`context` is specified, it uses the directory of the
Dockerfile as the build context
:type dockerfile: `str`
:param dockerfile_text: Directly pass the text of a Dockerfile rather than linking
to one that's already written. If you want to use :code:`ADD` or :code:`COPY`
you must specify :code:`context` explicitly.
:type dockerfile_text: `str`
:param docker_build_args: Dict mapping names of arguments to
:code:`docker --build-args` to values
:type docker_build_args: `dict`
:param docker_auto_workdir: Set the work-dir to the destination of
:code:`copy_dir`. Default: :code:`True`
:type docker_auto_workdir: `bool`
:param context: Use this to specify a custom docker build context when
using :code:`dockerfile`.
:type context: `str`
:param copy_repo: Set to `True` to automatically copy the entire current Git repo
into the Docker image. Use this so that a single Image definition can either use
local code or can fetch from a remote repo.
**copy_dir mode**: Normal use of this parameter uses local code, so it sets
`copy_dir` to point to the root of the Git repo of the calling code.
**copy_url mode**: Specify `copy_branch` to use a remote repository. This is
commonly done for CI/CD. When specified, `copy_url` will be auto-populated.
:type copy_repo: `bool`
:param copy_dir: Path to a directory. All files in that directory (and its
subdirectories) will be copied into the generated Docker image.
:type copy_dir: `str`
:param copy_url: URL to a Git repo. Conducto will clone it and copy its
contents into the generated Docker image. Authenticate to private
GitHub repos with a URL like `https://{user}:{token}@github.com/...`.
See secrets for more info on how to store this securely. Must also
specify copy_branch.
:type copy_url: `str`
:param copy_branch: A specific branch name to clone. Required if using copy_url.
:type copy_branch: `str`
:param path_map: Dict that maps external_path to internal_path. Needed for
live debug and for passing callables to :py:class:`Exec` & :py:class:`Lazy`.
It can be inferred from :code:`copy_dir`, :code:`copy_url`, or :code:`copy_repo`;
if not using one of those, you must specify :code:`path_map` explicitly. This
typically happens when a user-generated Dockerfile copies the code into the image.
:type path_map: `None`
:param install_pip: List of Python packages for Conducto to :code:`pip install` into
the generated Docker image.
:type install_pip: `List[str]`
:param install_npm: List of npm packages for Conducto to :code:`npm i` into the
generated Docker image.
:type install_npm: `List[str]`
:param install_packages: List of packages to install with the appropriate Linux package
manager for this image's flavor.
:type install_packages: `List[str]`
:param install_docker: If :code:`True`, install Docker during build time.
:type install_docker: `bool`
:param shell: Which shell to use in this container. Defaults to :code:`co.Image.AUTO` to
auto-detect. :code:`AUTO` will prefer :code:`/bin/bash` when available, and fall back to
:code:`/bin/sh` otherwise.
:type shell: `str`
:param name: Name this `Image` so other Nodes can reference it by name. If
no name is given, one will automatically be generated from a list of
our favorite Pokemon. I choose you, angry-bulbasaur!
:type name: `str`
:param instantiation_directory: The directory of the file in which this image object was created. This is
used to determine where relative paths passed into co.Image are relative from. This is
automatically populated internally by conducto.
:type instantiation_directory: `str`
:param reqs_py: Deprecated. Use :code:`install_py` instead.
:param reqs_npm: Deprecated. Use :code:`install_npm` instead.
:param reqs_packages: Deprecated. Use :code:`install_packages` instead.
:param reqs_docker: Deprecated. Use :code:`install_docker` instead.
"""
_CONTEXT = None
AUTO = "__auto__"
@staticmethod
@staticmethod
# hack to get this to serialize
@property
# Note: these methods are not needed in non-python implementations
# co.Lazy(function) is not a thing in other languages
# and conducto share-directory should be called instead writing an Image.share_directory
@staticmethod
@staticmethod
register_directory = share_directory
def _non_conducto_dir():
"""
Walk the stack. The first file that's not in the Conducto dir is the one the user
called this from.
"""
op = os.path
if Image._CONTEXT is not None:
return op.dirname(op.abspath(Image._CONTEXT))
for frame, _lineno in traceback.walk_stack(None):
filename = frame.f_code.co_filename
if not filename.startswith(_conducto_dir):
return op.dirname(filename)
_conducto_dir = os.path.dirname(os.path.dirname(__file__)) + os.path.sep
| [
11748,
4732,
8019,
198,
11748,
24580,
13,
69,
315,
942,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
12854,
1891,
198,
11748,
19720,
198,
11748,
340,
861,
10141,
198,
198,
6738,
3189,
78,
13,
28710,
1330,
357,
198,
220,
220,
220,
30351,
62,
26791,
11,
198,
220,
220,
220,
5456,
62,
26791,
11,
198,
220,
220,
220,
3858,
355,
256,
11,
198,
220,
220,
220,
2604,
11,
198,
8,
198,
11748,
3189,
78,
198,
6738,
764,
1330,
36253,
7753,
355,
36253,
7753,
62,
4666,
11,
3891,
198,
198,
6738,
3189,
78,
13,
28710,
1330,
38491,
11,
2939,
6978,
198,
6738,
764,
1330,
3891,
198,
198,
10943,
2257,
62,
6500,
796,
38491,
13,
23002,
1009,
4834,
85,
198,
198,
361,
25064,
13,
9641,
62,
10951,
18189,
357,
18,
11,
767,
2599,
198,
220,
220,
220,
355,
2047,
535,
261,
5239,
37153,
796,
4732,
8019,
13,
292,
2047,
535,
261,
5239,
37153,
198,
17772,
25,
198,
220,
220,
220,
422,
3189,
78,
13,
28710,
1330,
30351,
62,
1891,
634,
628,
220,
220,
220,
355,
2047,
535,
261,
5239,
37153,
796,
30351,
62,
1891,
634,
13,
292,
2047,
535,
261,
5239,
37153,
628,
198,
4299,
823,
6978,
7,
6978,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
28407,
257,
3108,
351,
42050,
284,
7139,
11059,
2641,
257,
36253,
198,
220,
220,
220,
2939,
329,
257,
10139,
13,
220,
770,
743,
307,
973,
284,
5678,
3108,
10007,
284,
257,
198,
220,
220,
220,
3141,
1627,
2891,
13,
628,
220,
220,
220,
770,
318,
973,
20947,
416,
1058,
9078,
25,
4871,
25,
63,
36495,
78,
13,
23002,
63,
618,
973,
351,
257,
198,
220,
220,
220,
11361,
869,
540,
284,
5678,
262,
3141,
1627,
543,
42985,
326,
869,
540,
198,
220,
220,
220,
287,
262,
11523,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
269,
17602,
6978,
796,
7412,
13,
1136,
62,
22866,
723,
62,
6978,
7,
6978,
8,
198,
220,
220,
220,
1441,
277,
1,
834,
36495,
78,
62,
6978,
29164,
49464,
6978,
13,
29127,
3419,
38362,
437,
6978,
834,
1,
628,
198,
4871,
1432,
13264,
25,
198,
220,
220,
220,
37227,
32,
4947,
286,
4263,
351,
1180,
3891,
37811,
628,
198,
4871,
7412,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1058,
17143,
2939,
25,
220,
18291,
1958,
262,
2779,
2939,
284,
923,
422,
13,
6127,
460,
307,
2087,
351,
198,
220,
220,
220,
220,
220,
220,
220,
2972,
4732,
9,
9633,
11,
290,
10392,
351,
2721,
62,
9,
9633,
13,
198,
220,
220,
220,
1058,
4906,
2939,
25,
4600,
2536,
63,
628,
220,
220,
220,
1058,
17143,
36253,
7753,
25,
220,
5765,
2427,
286,
1058,
8189,
25,
63,
9060,
63,
290,
1208,
257,
3108,
284,
257,
25716,
7753,
13,
198,
220,
220,
220,
220,
220,
220,
220,
45344,
13532,
389,
16726,
3599,
422,
262,
2393,
810,
428,
2438,
318,
198,
220,
220,
220,
220,
220,
220,
220,
3194,
13,
17486,
1058,
8189,
25,
63,
22866,
63,
318,
7368,
11,
340,
3544,
262,
8619,
286,
262,
198,
220,
220,
220,
220,
220,
220,
220,
25716,
7753,
355,
262,
1382,
4732,
198,
220,
220,
220,
1058,
4906,
36253,
7753,
25,
4600,
2536,
63,
628,
220,
220,
220,
1058,
17143,
36253,
7753,
62,
5239,
25,
4128,
306,
1208,
262,
2420,
286,
257,
25716,
7753,
2138,
621,
17795,
198,
220,
220,
220,
220,
220,
220,
220,
284,
530,
326,
338,
1541,
3194,
13,
1002,
345,
765,
284,
779,
1058,
8189,
25,
63,
29266,
63,
393,
1058,
8189,
25,
63,
34,
3185,
56,
63,
198,
220,
220,
220,
220,
220,
220,
220,
345,
1276,
11986,
1058,
8189,
25,
63,
22866,
63,
11777,
13,
198,
220,
220,
220,
1058,
4906,
36253,
7753,
62,
5239,
25,
4600,
2536,
63,
628,
220,
220,
220,
1058,
17143,
36253,
62,
11249,
62,
22046,
25,
360,
713,
16855,
3891,
286,
7159,
284,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
8189,
25,
63,
45986,
1377,
11249,
12,
22046,
63,
284,
3815,
198,
220,
220,
220,
1058,
4906,
36253,
62,
11249,
62,
22046,
25,
4600,
11600,
63,
628,
220,
220,
220,
1058,
17143,
36253,
62,
23736,
62,
1818,
15908,
25,
5345,
262,
670,
12,
15908,
284,
262,
10965,
286,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
8189,
25,
63,
30073,
62,
15908,
44646,
15161,
25,
1058,
8189,
25,
63,
17821,
63,
198,
220,
220,
220,
1058,
4906,
36253,
62,
23736,
62,
1818,
15908,
25,
4600,
30388,
63,
628,
220,
220,
220,
1058,
17143,
4732,
25,
220,
5765,
428,
284,
11986,
257,
2183,
36253,
1382,
4732,
618,
198,
220,
220,
220,
220,
220,
220,
220,
1262,
1058,
8189,
25,
63,
45986,
7753,
44646,
198,
220,
220,
220,
1058,
4906,
4732,
25,
4600,
2536,
63,
628,
220,
220,
220,
1058,
17143,
4866,
62,
260,
7501,
25,
220,
5345,
284,
4600,
17821,
63,
284,
6338,
4866,
262,
2104,
1459,
15151,
29924,
198,
220,
220,
220,
220,
220,
220,
220,
656,
262,
25716,
2939,
13,
5765,
428,
523,
326,
257,
2060,
7412,
6770,
460,
2035,
779,
198,
220,
220,
220,
220,
220,
220,
220,
1957,
2438,
393,
460,
21207,
422,
257,
6569,
29924,
13,
198,
220,
220,
220,
220,
220,
220,
220,
12429,
30073,
62,
15908,
4235,
1174,
25,
14435,
779,
286,
428,
11507,
3544,
1957,
2438,
11,
523,
340,
5621,
198,
220,
220,
220,
220,
220,
220,
220,
4600,
30073,
62,
15908,
63,
284,
966,
284,
262,
6808,
286,
262,
15151,
29924,
286,
262,
4585,
2438,
13,
198,
220,
220,
220,
220,
220,
220,
220,
12429,
30073,
62,
6371,
4235,
1174,
25,
18291,
1958,
4600,
30073,
62,
1671,
3702,
63,
284,
779,
257,
6569,
16099,
13,
770,
318,
198,
220,
220,
220,
220,
220,
220,
220,
8811,
1760,
329,
14514,
14,
8610,
13,
1649,
7368,
11,
4600,
30073,
62,
6371,
63,
481,
307,
8295,
12,
12924,
4817,
13,
198,
220,
220,
220,
1058,
4906,
4866,
62,
260,
7501,
25,
4600,
30388,
63,
628,
220,
220,
220,
1058,
17143,
4866,
62,
15908,
25,
220,
10644,
284,
257,
8619,
13,
1439,
3696,
287,
326,
8619,
357,
392,
663,
198,
220,
220,
220,
220,
220,
220,
220,
850,
12942,
1749,
8,
481,
307,
18984,
656,
262,
7560,
25716,
2939,
13,
198,
220,
220,
220,
1058,
4906,
4866,
62,
15908,
25,
4600,
2536,
63,
628,
220,
220,
220,
1058,
17143,
4866,
62,
6371,
25,
220,
10289,
284,
257,
15151,
29924,
13,
28579,
78,
481,
17271,
340,
290,
4866,
663,
198,
220,
220,
220,
220,
220,
220,
220,
10154,
656,
262,
7560,
25716,
2939,
13,
31885,
5344,
284,
2839,
198,
220,
220,
220,
220,
220,
220,
220,
21722,
1128,
418,
351,
257,
10289,
588,
4600,
5450,
1378,
90,
7220,
92,
29164,
30001,
92,
31,
12567,
13,
785,
14,
986,
44646,
198,
220,
220,
220,
220,
220,
220,
220,
4091,
13141,
329,
517,
7508,
319,
703,
284,
3650,
428,
30835,
13,
12039,
635,
198,
220,
220,
220,
220,
220,
220,
220,
11986,
4866,
62,
1671,
3702,
13,
198,
220,
220,
220,
1058,
4906,
4866,
62,
6371,
25,
4600,
2536,
63,
628,
220,
220,
220,
1058,
17143,
4866,
62,
1671,
3702,
25,
220,
317,
2176,
8478,
1438,
284,
17271,
13,
20906,
611,
1262,
4866,
62,
6371,
13,
198,
220,
220,
220,
1058,
4906,
4866,
62,
1671,
3702,
25,
4600,
2536,
63,
628,
220,
220,
220,
1058,
17143,
3108,
62,
8899,
25,
220,
360,
713,
326,
8739,
7097,
62,
6978,
284,
5387,
62,
6978,
13,
10664,
276,
329,
198,
220,
220,
220,
220,
220,
220,
220,
2107,
14257,
290,
329,
6427,
869,
2977,
284,
1058,
9078,
25,
4871,
25,
63,
23002,
63,
1222,
1058,
9078,
25,
4871,
25,
63,
43,
12582,
44646,
198,
220,
220,
220,
220,
220,
220,
220,
632,
460,
307,
41240,
422,
1058,
8189,
25,
63,
30073,
62,
15908,
47671,
1058,
8189,
25,
63,
30073,
62,
6371,
47671,
393,
1058,
8189,
25,
63,
30073,
62,
260,
7501,
63,
26,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
1262,
530,
286,
883,
11,
345,
1276,
11986,
1058,
8189,
25,
63,
6978,
62,
8899,
63,
11777,
13,
770,
198,
220,
220,
220,
220,
220,
220,
220,
6032,
4325,
618,
257,
2836,
12,
27568,
25716,
7753,
9088,
262,
2438,
656,
262,
2939,
13,
198,
220,
220,
220,
1058,
4906,
3108,
62,
8899,
25,
4600,
14202,
63,
628,
220,
220,
220,
1058,
17143,
2721,
62,
79,
541,
25,
220,
7343,
286,
11361,
10392,
329,
28579,
78,
284,
1058,
8189,
25,
63,
79,
541,
2721,
63,
656,
198,
220,
220,
220,
220,
220,
220,
220,
262,
7560,
25716,
2939,
13,
198,
220,
220,
220,
1058,
4906,
2721,
62,
79,
541,
25,
4600,
8053,
58,
2536,
60,
63,
628,
220,
220,
220,
1058,
17143,
2721,
62,
77,
4426,
25,
7343,
286,
30599,
10392,
329,
28579,
78,
284,
1058,
8189,
25,
63,
77,
4426,
1312,
63,
656,
262,
198,
220,
220,
220,
220,
220,
220,
220,
7560,
25716,
2939,
13,
198,
220,
220,
220,
1058,
4906,
2721,
62,
77,
4426,
25,
4600,
8053,
58,
2536,
60,
63,
628,
220,
220,
220,
1058,
17143,
2721,
62,
43789,
25,
7343,
286,
10392,
284,
2721,
351,
262,
5035,
7020,
5301,
198,
220,
220,
220,
220,
220,
220,
220,
4706,
329,
428,
2939,
338,
9565,
13,
198,
220,
220,
220,
1058,
4906,
2721,
62,
43789,
25,
4600,
8053,
58,
2536,
60,
63,
628,
220,
220,
220,
1058,
17143,
2721,
62,
45986,
25,
1002,
1058,
8189,
25,
63,
17821,
47671,
2721,
25716,
1141,
1382,
640,
13,
198,
220,
220,
220,
1058,
4906,
2721,
62,
45986,
25,
4600,
30388,
63,
628,
220,
220,
220,
1058,
17143,
7582,
25,
9022,
7582,
284,
779,
287,
428,
9290,
13,
2896,
13185,
284,
1058,
8189,
25,
63,
1073,
13,
5159,
13,
39371,
46,
63,
284,
198,
220,
220,
220,
220,
220,
220,
220,
8295,
12,
15255,
478,
13,
1058,
8189,
25,
63,
39371,
46,
63,
481,
4702,
1058,
8189,
25,
63,
14,
8800,
14,
41757,
63,
618,
1695,
11,
290,
2121,
736,
284,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
8189,
25,
63,
14,
8800,
14,
1477,
63,
4306,
13,
198,
220,
220,
220,
1058,
4906,
7582,
25,
4600,
2536,
63,
628,
220,
220,
220,
1058,
17143,
1438,
25,
6530,
428,
4600,
5159,
63,
523,
584,
399,
4147,
460,
4941,
340,
416,
1438,
13,
1002,
198,
220,
220,
220,
220,
220,
220,
220,
645,
1438,
318,
1813,
11,
530,
481,
6338,
307,
7560,
422,
257,
1351,
286,
198,
220,
220,
220,
220,
220,
220,
220,
674,
4004,
14878,
13,
314,
3853,
345,
11,
7954,
12,
15065,
12093,
2899,
0,
198,
220,
220,
220,
1058,
4906,
1438,
25,
4600,
2536,
63,
628,
220,
220,
220,
1058,
17143,
9113,
3920,
62,
34945,
25,
383,
8619,
286,
262,
2393,
287,
543,
428,
2939,
2134,
373,
2727,
13,
770,
318,
198,
220,
220,
220,
220,
220,
220,
220,
973,
284,
5004,
810,
3585,
13532,
3804,
656,
763,
13,
5159,
389,
3585,
422,
13,
770,
318,
198,
220,
220,
220,
220,
220,
220,
220,
6338,
22331,
20947,
416,
3189,
78,
13,
198,
220,
220,
220,
1058,
4906,
9113,
3920,
62,
34945,
25,
4600,
2536,
63,
628,
220,
220,
220,
1058,
17143,
43089,
82,
62,
9078,
25,
220,
2129,
31023,
13,
5765,
1058,
8189,
25,
63,
17350,
62,
9078,
63,
2427,
13,
628,
220,
220,
220,
1058,
17143,
43089,
82,
62,
77,
4426,
25,
220,
2129,
31023,
13,
5765,
1058,
8189,
25,
63,
17350,
62,
77,
4426,
63,
2427,
13,
628,
220,
220,
220,
1058,
17143,
43089,
82,
62,
43789,
25,
220,
2129,
31023,
13,
5765,
1058,
8189,
25,
63,
17350,
62,
43789,
63,
2427,
13,
628,
220,
220,
220,
1058,
17143,
43089,
82,
62,
45986,
25,
220,
2129,
31023,
13,
5765,
1058,
8189,
25,
63,
17350,
62,
45986,
63,
2427,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
4808,
10943,
32541,
796,
6045,
628,
220,
220,
220,
47044,
46,
796,
366,
834,
23736,
834,
1,
628,
220,
220,
220,
2488,
12708,
24396,
628,
220,
220,
220,
2488,
12708,
24396,
628,
220,
220,
220,
1303,
8156,
284,
651,
428,
284,
11389,
1096,
198,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
1303,
5740,
25,
777,
5050,
389,
407,
2622,
287,
1729,
12,
29412,
25504,
198,
220,
220,
220,
1303,
763,
13,
43,
12582,
7,
8818,
8,
318,
407,
257,
1517,
287,
584,
8950,
198,
220,
220,
220,
1303,
290,
3189,
78,
2648,
12,
34945,
815,
307,
1444,
2427,
3597,
281,
7412,
13,
20077,
62,
34945,
628,
220,
220,
220,
2488,
12708,
24396,
628,
220,
220,
220,
2488,
12708,
24396,
628,
220,
220,
220,
7881,
62,
34945,
796,
2648,
62,
34945,
628,
198,
4299,
4808,
13159,
62,
36495,
78,
62,
15908,
33529,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6857,
262,
8931,
13,
383,
717,
2393,
326,
338,
407,
287,
262,
28579,
78,
26672,
318,
262,
530,
262,
2836,
198,
220,
220,
220,
1444,
428,
422,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1034,
796,
28686,
13,
6978,
198,
220,
220,
220,
611,
7412,
13557,
10943,
32541,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
1034,
13,
15908,
3672,
7,
404,
13,
397,
2777,
776,
7,
5159,
13557,
10943,
32541,
4008,
198,
220,
220,
220,
329,
5739,
11,
4808,
2815,
23397,
287,
12854,
1891,
13,
11152,
62,
25558,
7,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
29472,
796,
5739,
13,
69,
62,
8189,
13,
1073,
62,
34345,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
29472,
13,
9688,
2032,
342,
28264,
36495,
78,
62,
15908,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1034,
13,
15908,
3672,
7,
34345,
8,
628,
198,
62,
36495,
78,
62,
15908,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
1343,
28686,
13,
6978,
13,
325,
79,
198
] | 2.935696 | 2,286 |
"""
Quick lambda creator, useful for use in fmap, filter, etc.
e.g. List([1,2]).fmap(x + 1)
"""
from doufo import WrappedFunction, identity, Functor, FunctorArithmeticMixin
import operator
__all__ = ['QuickLambda', 'x']
class QuickLambda(WrappedFunction, FunctorArithmeticMixin):
"""
QuickLambda constructor.
"""
x = QuickLambda(identity)
| [
37811,
198,
21063,
37456,
13172,
11,
4465,
329,
779,
287,
277,
8899,
11,
8106,
11,
3503,
13,
198,
198,
68,
13,
70,
13,
7343,
26933,
16,
11,
17,
35944,
69,
8899,
7,
87,
1343,
352,
8,
198,
37811,
198,
6738,
2255,
6513,
1330,
27323,
1496,
22203,
11,
5369,
11,
11138,
2715,
11,
11138,
2715,
3163,
29848,
35608,
259,
198,
11748,
10088,
198,
198,
834,
439,
834,
796,
37250,
21063,
43,
4131,
6814,
3256,
705,
87,
20520,
628,
198,
4871,
12029,
43,
4131,
6814,
7,
36918,
1496,
22203,
11,
11138,
2715,
3163,
29848,
35608,
259,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
12029,
43,
4131,
6814,
23772,
13,
198,
220,
220,
220,
37227,
628,
198,
87,
796,
12029,
43,
4131,
6814,
7,
738,
414,
8,
198
] | 2.789063 | 128 |
"""A simple plugin manager. Rolling my own for three reasons:
1) Environmental scan did not give me quite what I wanted.
2) The super simple examples didn't support automatic/dynamic loading.
3) I kinda wanted to understand the process :)
"""
import os, sys
from datetime import datetime
import dir_watcher
import inspect
from IPython.utils.coloransi import TermColors as color
#pylint: disable=no-member
class PluginManager(object):
"""Plugin Manager for Workbench."""
def __init__(self, plugin_callback, plugin_dir = 'workers'):
"""Initialize the Plugin Manager for Workbench.
Args:
plugin_callback: The callback for plugin. This is called when plugin is added.
plugin_dir: The dir where plugin resides.
"""
# Set the callback, the plugin directory and load the plugins
self.plugin_callback = plugin_callback
self.plugin_dir = plugin_dir
self.load_all_plugins()
# Now setup dynamic monitoring of the plugins directory
self.watcher = dir_watcher.DirWatcher(self.plugin_path)
self.watcher.register_callbacks(self.on_created, self.on_modified, self.on_deleted)
self.watcher.start_monitoring()
def load_all_plugins(self):
"""Load all the plugins in the plugin directory"""
# Go through the existing python files in the plugin directory
self.plugin_path = os.path.realpath(self.plugin_dir)
sys.path.append(self.plugin_dir)
print '<<< Plugin Manager >>>'
for f in [os.path.join(self.plugin_dir, child) for child in os.listdir(self.plugin_dir)]:
# Skip certain files
if '.DS_Store' in f or '__init__.py' in f:
continue
# Add the plugin
self.add_plugin(f)
def on_created(self, file_list):
"""Watcher callback
Args:
event: The creation event.
"""
for plugin in file_list:
self.add_plugin(plugin)
def on_modified(self, file_list):
"""Watcher callback.
Args:
event: The modification event.
"""
for plugin in file_list:
self.add_plugin(plugin)
def on_deleted(self, file_list):
"""Watcher callback.
Args:
event: The modification event.
"""
for plugin in file_list:
self.remove_plugin(plugin)
def remove_plugin(self, f):
"""Remvoing a deleted plugin.
Args:
f: the filepath for the plugin.
"""
if f.endswith('.py'):
plugin_name = os.path.splitext(os.path.basename(f))[0]
print '- %s %sREMOVED' % (plugin_name, color.Red)
print '\t%sNote: still in memory, restart Workbench to remove...%s' % \
(color.Yellow, color.Normal)
def add_plugin(self, f):
"""Adding and verifying plugin.
Args:
f: the filepath for the plugin.
"""
if f.endswith('.py'):
# Just the basename without extension
plugin_name = os.path.splitext(os.path.basename(f))[0]
# It's possible the plugin has been modified and needs to be reloaded
if plugin_name in sys.modules:
try:
handler = reload(sys.modules[plugin_name])
print'\t- %s %sRELOAD%s' % (plugin_name, color.Yellow, color.Normal)
except ImportError, error:
print 'Failed to import plugin: %s (%s)' % (plugin_name, error)
return
else:
# Not already loaded so try to import it
try:
handler = __import__(plugin_name, globals(), locals(), [], -1)
except ImportError, error:
print 'Failed to import plugin: %s (%s)' % (plugin_name, error)
return
# Run the handler through plugin validation
plugin = self.validate(handler)
print '\t- %s %sOK%s' % (plugin_name, color.Green, color.Normal)
if plugin:
# Okay must be successfully loaded so capture the plugin meta-data,
# modification time and register the plugin through the callback
plugin['name'] = plugin_name
plugin['dependencies'] = plugin['class'].dependencies
plugin['docstring'] = plugin['class'].__doc__
plugin['mod_time'] = datetime.utcfromtimestamp(os.path.getmtime(f))
# Plugin may accept sample_sets as input
try:
plugin['sample_set_input'] = getattr(plugin['class'], 'sample_set_input')
except AttributeError:
plugin['sample_set_input'] = False
# Now pass the plugin back to workbench
self.plugin_callback(plugin)
def validate(self, handler):
"""Validate the plugin, each plugin must have the following:
1) The worker class must have an execute method: execute(self, input_data).
2) The worker class must have a dependencies list (even if it's empty).
3) The file must have a top level test() method.
Args:
handler: the loaded plugin.
"""
# Check for the test method first
test_method = self.plugin_test_validation(handler)
if not test_method:
return None
# Here we iterate through the classes found in the module and pick
# the first one that satisfies the validation
for name, plugin_class in inspect.getmembers(handler, inspect.isclass):
if self.plugin_class_validation(plugin_class):
return {'class':plugin_class, 'test':test_method}
# If we're here the plugin didn't pass validation
print 'Failure for plugin: %s' % (handler.__name__)
print 'Validation Error: Worker class is required to have a dependencies list and an execute method'
return None
def plugin_test_validation(self, handler):
"""Plugin validation.
Every workbench plugin must have top level test method.
Args:
handler: The loaded plugin.
Returns:
None if the test fails or the test function.
"""
methods = {name:func for name, func in inspect.getmembers(handler, callable)}
if 'test' not in methods.keys():
print 'Failure for plugin: %s' % (handler.__name__)
print 'Validation Error: The file must have a top level test() method'
return None
else:
return methods['test']
def plugin_class_validation(self, plugin_class):
"""Plugin validation
Every workbench plugin must have a dependencies list (even if it's empty).
Every workbench plugin must have an execute method.
Args:
plugin_class: The loaded plugun class.
Returns:
True if dependencies and execute are present, else False.
"""
try:
getattr(plugin_class, 'dependencies')
getattr(plugin_class, 'execute')
except AttributeError:
return False
return True
# Just create the class and run it for a test
def test():
"""Executes plugin_manager.py test."""
# This test actually does more than it appears. The workers directory
# will get scanned and stuff will get loaded into workbench.
def new_plugin(plugin):
"""new plugin callback """
print '%s' % (plugin['name'])
# Create Plugin Manager
plugin_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)),'../workers')
PluginManager(new_plugin, plugin_dir=plugin_dir)
if __name__ == "__main__":
test()
| [
37811,
32,
2829,
13877,
4706,
13,
21567,
616,
898,
329,
1115,
3840,
25,
198,
220,
220,
352,
8,
13272,
9367,
750,
407,
1577,
502,
2407,
644,
314,
2227,
13,
198,
220,
220,
362,
8,
383,
2208,
2829,
6096,
1422,
470,
1104,
11353,
14,
67,
28995,
11046,
13,
198,
220,
220,
513,
8,
314,
17855,
2227,
284,
1833,
262,
1429,
14373,
198,
37811,
198,
198,
11748,
28686,
11,
25064,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
26672,
62,
86,
34734,
198,
11748,
10104,
198,
6738,
6101,
7535,
13,
26791,
13,
8043,
504,
72,
1330,
35118,
5216,
669,
355,
3124,
198,
2,
79,
2645,
600,
25,
15560,
28,
3919,
12,
19522,
198,
198,
4871,
42636,
13511,
7,
15252,
2599,
198,
220,
220,
220,
37227,
37233,
9142,
329,
5521,
26968,
526,
15931,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
13877,
62,
47423,
11,
13877,
62,
15908,
796,
705,
22896,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
24243,
1096,
262,
42636,
9142,
329,
5521,
26968,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13877,
62,
47423,
25,
383,
23838,
329,
13877,
13,
770,
318,
1444,
618,
13877,
318,
2087,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13877,
62,
15908,
25,
383,
26672,
810,
13877,
29076,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
5345,
262,
23838,
11,
262,
13877,
8619,
290,
3440,
262,
20652,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
33803,
62,
47423,
796,
13877,
62,
47423,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
33803,
62,
15908,
796,
13877,
62,
15908,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2220,
62,
439,
62,
37390,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
2735,
9058,
8925,
9904,
286,
262,
20652,
8619,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
86,
34734,
796,
26672,
62,
86,
34734,
13,
35277,
54,
34734,
7,
944,
13,
33803,
62,
6978,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
86,
34734,
13,
30238,
62,
13345,
10146,
7,
944,
13,
261,
62,
25598,
11,
2116,
13,
261,
62,
41771,
11,
2116,
13,
261,
62,
2934,
33342,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
86,
34734,
13,
9688,
62,
41143,
278,
3419,
628,
220,
220,
220,
825,
3440,
62,
439,
62,
37390,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
8912,
477,
262,
20652,
287,
262,
13877,
8619,
37811,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
1514,
832,
262,
4683,
21015,
3696,
287,
262,
13877,
8619,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
33803,
62,
6978,
796,
28686,
13,
6978,
13,
5305,
6978,
7,
944,
13,
33803,
62,
15908,
8,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
6978,
13,
33295,
7,
944,
13,
33803,
62,
15908,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
16791,
27,
42636,
9142,
13163,
6,
198,
220,
220,
220,
220,
220,
220,
220,
329,
277,
287,
685,
418,
13,
6978,
13,
22179,
7,
944,
13,
33803,
62,
15908,
11,
1200,
8,
329,
1200,
287,
28686,
13,
4868,
15908,
7,
944,
13,
33803,
62,
15908,
8,
5974,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
32214,
1728,
3696,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
45302,
5258,
62,
22658,
6,
287,
277,
393,
705,
834,
15003,
834,
13,
9078,
6,
287,
277,
25,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2555,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
262,
13877,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2860,
62,
33803,
7,
69,
8,
628,
220,
220,
220,
825,
319,
62,
25598,
7,
944,
11,
2393,
62,
4868,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
54,
34734,
23838,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1785,
25,
383,
6282,
1785,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
329,
13877,
287,
2393,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2860,
62,
33803,
7,
33803,
8,
628,
220,
220,
220,
825,
319,
62,
41771,
7,
944,
11,
2393,
62,
4868,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
54,
34734,
23838,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1785,
25,
383,
17613,
1785,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
329,
13877,
287,
2393,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2860,
62,
33803,
7,
33803,
8,
628,
220,
220,
220,
825,
319,
62,
2934,
33342,
7,
944,
11,
2393,
62,
4868,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
54,
34734,
23838,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1785,
25,
383,
17613,
1785,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
329,
13877,
287,
2393,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
28956,
62,
33803,
7,
33803,
8,
628,
220,
220,
220,
825,
4781,
62,
33803,
7,
944,
11,
277,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
8413,
13038,
278,
257,
13140,
13877,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
25,
262,
2393,
6978,
329,
262,
13877,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
277,
13,
437,
2032,
342,
7,
4458,
9078,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13877,
62,
3672,
796,
28686,
13,
6978,
13,
22018,
578,
742,
7,
418,
13,
6978,
13,
12093,
12453,
7,
69,
4008,
58,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
12,
4064,
82,
4064,
82,
40726,
8874,
1961,
6,
4064,
357,
33803,
62,
3672,
11,
3124,
13,
7738,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
59,
83,
4,
82,
6425,
25,
991,
287,
4088,
11,
15765,
5521,
26968,
284,
4781,
986,
4,
82,
6,
4064,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
8043,
13,
39499,
11,
3124,
13,
26447,
8,
628,
220,
220,
220,
825,
751,
62,
33803,
7,
944,
11,
277,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
32901,
290,
45505,
13877,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
25,
262,
2393,
6978,
329,
262,
13877,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
277,
13,
437,
2032,
342,
7,
4458,
9078,
6,
2599,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2329,
262,
1615,
12453,
1231,
7552,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13877,
62,
3672,
796,
28686,
13,
6978,
13,
22018,
578,
742,
7,
418,
13,
6978,
13,
12093,
12453,
7,
69,
4008,
58,
15,
60,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
632,
338,
1744,
262,
13877,
468,
587,
9518,
290,
2476,
284,
307,
18126,
276,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
13877,
62,
3672,
287,
25064,
13,
18170,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21360,
796,
18126,
7,
17597,
13,
18170,
58,
33803,
62,
3672,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
6,
59,
83,
12,
4064,
82,
4064,
82,
16448,
41048,
4,
82,
6,
4064,
357,
33803,
62,
3672,
11,
3124,
13,
39499,
11,
3124,
13,
26447,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
17267,
12331,
11,
4049,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
37,
6255,
284,
1330,
13877,
25,
4064,
82,
37633,
82,
33047,
4064,
357,
33803,
62,
3672,
11,
4049,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
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,
1303,
1892,
1541,
9639,
523,
1949,
284,
1330,
340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21360,
796,
11593,
11748,
834,
7,
33803,
62,
3672,
11,
15095,
874,
22784,
17205,
22784,
685,
4357,
532,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
17267,
12331,
11,
4049,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
37,
6255,
284,
1330,
13877,
25,
4064,
82,
37633,
82,
33047,
4064,
357,
33803,
62,
3672,
11,
4049,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
5660,
262,
21360,
832,
13877,
21201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13877,
796,
2116,
13,
12102,
378,
7,
30281,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
59,
83,
12,
4064,
82,
4064,
82,
11380,
4,
82,
6,
4064,
357,
33803,
62,
3672,
11,
3124,
13,
13719,
11,
3124,
13,
26447,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
13877,
25,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
16805,
1276,
307,
7675,
9639,
523,
8006,
262,
13877,
13634,
12,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
17613,
640,
290,
7881,
262,
13877,
832,
262,
23838,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13877,
17816,
3672,
20520,
796,
13877,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13877,
17816,
45841,
3976,
20520,
796,
13877,
17816,
4871,
6,
4083,
45841,
3976,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13877,
17816,
15390,
8841,
20520,
796,
13877,
17816,
4871,
6,
4083,
834,
15390,
834,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13877,
17816,
4666,
62,
2435,
20520,
796,
4818,
8079,
13,
315,
66,
6738,
16514,
27823,
7,
418,
13,
6978,
13,
1136,
76,
2435,
7,
69,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
42636,
743,
2453,
6291,
62,
28709,
355,
5128,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13877,
17816,
39873,
62,
2617,
62,
15414,
20520,
796,
651,
35226,
7,
33803,
17816,
4871,
6,
4357,
705,
39873,
62,
2617,
62,
15414,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
3460,
4163,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13877,
17816,
39873,
62,
2617,
62,
15414,
20520,
796,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2735,
1208,
262,
13877,
736,
284,
670,
26968,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
33803,
62,
47423,
7,
33803,
8,
628,
220,
220,
220,
825,
26571,
7,
944,
11,
21360,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
7762,
20540,
262,
13877,
11,
1123,
13877,
1276,
423,
262,
1708,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
352,
8,
383,
8383,
1398,
1276,
423,
281,
12260,
2446,
25,
12260,
7,
944,
11,
5128,
62,
7890,
737,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
362,
8,
383,
8383,
1398,
1276,
423,
257,
20086,
1351,
357,
10197,
611,
340,
338,
6565,
737,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
513,
8,
383,
2393,
1276,
423,
257,
1353,
1241,
1332,
3419,
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,
21360,
25,
262,
9639,
13877,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
6822,
329,
262,
1332,
2446,
717,
198,
220,
220,
220,
220,
220,
220,
220,
1332,
62,
24396,
796,
2116,
13,
33803,
62,
9288,
62,
12102,
341,
7,
30281,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
1332,
62,
24396,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
6045,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3423,
356,
11629,
378,
832,
262,
6097,
1043,
287,
262,
8265,
290,
2298,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
262,
717,
530,
326,
45104,
262,
21201,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1438,
11,
13877,
62,
4871,
287,
10104,
13,
1136,
30814,
7,
30281,
11,
10104,
13,
271,
4871,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
33803,
62,
4871,
62,
12102,
341,
7,
33803,
62,
4871,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1391,
6,
4871,
10354,
33803,
62,
4871,
11,
705,
9288,
10354,
9288,
62,
24396,
92,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
1002,
356,
821,
994,
262,
13877,
1422,
470,
1208,
21201,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
50015,
329,
13877,
25,
4064,
82,
6,
4064,
357,
30281,
13,
834,
3672,
834,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
7762,
24765,
13047,
25,
35412,
1398,
318,
2672,
284,
423,
257,
20086,
1351,
290,
281,
12260,
2446,
6,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
6045,
628,
220,
220,
220,
825,
13877,
62,
9288,
62,
12102,
341,
7,
944,
11,
21360,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
37233,
21201,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
3887,
670,
26968,
13877,
1276,
423,
1353,
1241,
1332,
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,
21360,
25,
383,
9639,
13877,
13,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6045,
611,
262,
1332,
10143,
393,
262,
1332,
2163,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
5050,
796,
1391,
3672,
25,
20786,
329,
1438,
11,
25439,
287,
10104,
13,
1136,
30814,
7,
30281,
11,
869,
540,
38165,
198,
220,
220,
220,
220,
220,
220,
220,
611,
705,
9288,
6,
407,
287,
5050,
13,
13083,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
50015,
329,
13877,
25,
4064,
82,
6,
4064,
357,
30281,
13,
834,
3672,
834,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
7762,
24765,
13047,
25,
383,
2393,
1276,
423,
257,
1353,
1241,
1332,
3419,
2446,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
5050,
17816,
9288,
20520,
628,
220,
220,
220,
825,
13877,
62,
4871,
62,
12102,
341,
7,
944,
11,
13877,
62,
4871,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
37233,
21201,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
3887,
670,
26968,
13877,
1276,
423,
257,
20086,
1351,
357,
10197,
611,
340,
338,
6565,
737,
220,
198,
220,
220,
220,
220,
220,
220,
220,
3887,
670,
26968,
13877,
1276,
423,
281,
12260,
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,
13877,
62,
4871,
25,
383,
9639,
6107,
403,
1398,
13,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6407,
611,
20086,
290,
12260,
389,
1944,
11,
2073,
10352,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
651,
35226,
7,
33803,
62,
4871,
11,
705,
45841,
3976,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
651,
35226,
7,
33803,
62,
4871,
11,
705,
41049,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
3460,
4163,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
6407,
628,
198,
2,
2329,
2251,
262,
1398,
290,
1057,
340,
329,
257,
1332,
198,
4299,
1332,
33529,
198,
220,
220,
220,
37227,
23002,
1769,
13877,
62,
37153,
13,
9078,
1332,
526,
15931,
628,
220,
220,
220,
1303,
770,
1332,
1682,
857,
517,
621,
340,
3568,
13,
383,
3259,
8619,
198,
220,
220,
220,
1303,
481,
651,
28660,
290,
3404,
481,
651,
9639,
656,
670,
26968,
13,
198,
220,
220,
220,
825,
649,
62,
33803,
7,
33803,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3605,
13877,
23838,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
4,
82,
6,
4064,
357,
33803,
17816,
3672,
6,
12962,
628,
220,
220,
220,
1303,
13610,
42636,
9142,
198,
220,
220,
220,
13877,
62,
15908,
796,
28686,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
5305,
6978,
7,
834,
7753,
834,
36911,
6,
40720,
22896,
11537,
198,
220,
220,
220,
42636,
13511,
7,
3605,
62,
33803,
11,
13877,
62,
15908,
28,
33803,
62,
15908,
8,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1332,
3419,
198
] | 2.346487 | 3,345 |
import os
from subprocess import call
from mycroft import MycroftSkill
from .badge import MQTT_Client
from .util import wrap_text
class SwagBadge(MycroftSkill):
"""Provide interaction between Mycroft and a Swag Badge.
For more details on the Swag Badge from LinuxConfAu 2021 see:
http://www.openhardwareconf.org/wiki/Swagbadge2021
"""
def send_text_block(self, message):
"""Send utterance to Badge.
Splits text based on line length and prevents words being split
between the two screens.
Arguments:
message (Message): standard Mycroft Message object
"""
text = message.data.get("utterance")
if not text:
return
chars = int(self.LINE_LENGTH / self.NUM_SCREENS)
lines_per_screen = wrap_text(text, chars)
# Add spaces to log correctly across multiple screens.
padded_lines = [f"{l: <{chars}}" for l in lines_per_screen]
lines = [
x + y
for x, y in zip(
padded_lines[0 :: self.NUM_SCREENS], padded_lines[1 :: self.NUM_SCREENS]
)
]
for line in lines:
success, msg = self.mqttc.log_to_oled(line)
if not success:
self.log.error(msg)
break
def display_image(self, image="m32.png"):
"""Display an image on the Badge screen."""
image_path = os.path.join(self.root_dir, "images", image)
self.mqttc.render_image(image_path)
| [
11748,
28686,
198,
6738,
850,
14681,
1330,
869,
198,
6738,
616,
36714,
1330,
2011,
36714,
35040,
198,
6738,
764,
14774,
469,
1330,
337,
48,
15751,
62,
11792,
198,
6738,
764,
22602,
1330,
14441,
62,
5239,
628,
198,
4871,
2451,
363,
22069,
469,
7,
3666,
36714,
35040,
2599,
198,
220,
220,
220,
37227,
15946,
485,
10375,
1022,
2011,
36714,
290,
257,
2451,
363,
44308,
13,
628,
220,
220,
220,
1114,
517,
3307,
319,
262,
2451,
363,
44308,
422,
7020,
18546,
32,
84,
33448,
766,
25,
198,
220,
220,
220,
2638,
1378,
2503,
13,
9654,
10424,
1574,
10414,
13,
2398,
14,
15466,
14,
10462,
363,
14774,
469,
1238,
2481,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
3758,
62,
5239,
62,
9967,
7,
944,
11,
3275,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
25206,
10517,
590,
284,
44308,
13,
628,
220,
220,
220,
220,
220,
220,
220,
13341,
896,
2420,
1912,
319,
1627,
4129,
290,
15174,
2456,
852,
6626,
198,
220,
220,
220,
220,
220,
220,
220,
1022,
262,
734,
8947,
13,
628,
220,
220,
220,
220,
220,
220,
220,
20559,
2886,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3275,
357,
12837,
2599,
3210,
2011,
36714,
16000,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2420,
796,
3275,
13,
7890,
13,
1136,
7203,
10381,
590,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
2420,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
198,
220,
220,
220,
220,
220,
220,
220,
34534,
796,
493,
7,
944,
13,
24027,
62,
43,
49494,
1220,
2116,
13,
41359,
62,
6173,
2200,
16938,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3951,
62,
525,
62,
9612,
796,
14441,
62,
5239,
7,
5239,
11,
34534,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3060,
9029,
284,
2604,
9380,
1973,
3294,
8947,
13,
198,
220,
220,
220,
220,
220,
220,
220,
44582,
62,
6615,
796,
685,
69,
1,
90,
75,
25,
1279,
90,
354,
945,
11709,
1,
329,
300,
287,
3951,
62,
525,
62,
9612,
60,
198,
220,
220,
220,
220,
220,
220,
220,
3951,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
1343,
331,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
2124,
11,
331,
287,
19974,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
44582,
62,
6615,
58,
15,
7904,
2116,
13,
41359,
62,
6173,
2200,
16938,
4357,
44582,
62,
6615,
58,
16,
7904,
2116,
13,
41359,
62,
6173,
2200,
16938,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1627,
287,
3951,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1943,
11,
31456,
796,
2116,
13,
76,
80,
926,
66,
13,
6404,
62,
1462,
62,
45342,
7,
1370,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
1943,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6404,
13,
18224,
7,
19662,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
198,
220,
220,
220,
825,
3359,
62,
9060,
7,
944,
11,
2939,
2625,
76,
2624,
13,
11134,
1,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
23114,
281,
2939,
319,
262,
44308,
3159,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
2939,
62,
6978,
796,
28686,
13,
6978,
13,
22179,
7,
944,
13,
15763,
62,
15908,
11,
366,
17566,
1600,
2939,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
76,
80,
926,
66,
13,
13287,
62,
9060,
7,
9060,
62,
6978,
8,
628
] | 2.272864 | 667 |
# -*- coding: utf-8 -*-
from __future__ import division
'''
Copyright © 2014 by Virginia Polytechnic Institute and State University
All rights reserved
Virginia Polytechnic Institute and State University (Virginia Tech) owns the copyright for the BEMOSS software and its
associated documentation (“Software”) and retains rights to grant research rights under patents related to
the BEMOSS software to other academic institutions or non-profit research institutions.
You should carefully read the following terms and conditions before using this software.
Your use of this Software indicates your acceptance of this license agreement and all terms and conditions.
You are hereby licensed to use the Software for Non-Commercial Purpose only. Non-Commercial Purpose means the
use of the Software solely for research. Non-Commercial Purpose excludes, without limitation, any use of
the Software, as part of, or in any way in connection with a product or service which is sold, offered for sale,
licensed, leased, loaned, or rented. Permission to use, copy, modify, and distribute this compilation
for Non-Commercial Purpose to other academic institutions or non-profit research institutions is hereby granted
without fee, subject to the following terms of this license.
Commercial Use If you desire to use the software for profit-making or commercial purposes,
you agree to negotiate in good faith a license with Virginia Tech prior to such profit-making or commercial use.
Virginia Tech shall have no obligation to grant such license to you, and may grant exclusive or non-exclusive
licenses to others. You may contact the following by email to discuss commercial use: [email protected]
Limitation of Liability IN NO EVENT WILL VIRGINIA TECH, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE
OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF VIRGINIA TECH OR OTHER PARTY HAS BEEN ADVISED
OF THE POSSIBILITY OF SUCH DAMAGES.
For full terms and conditions, please visit https://bitbucket.org/bemoss/bemoss_os.
Address all correspondence regarding this license to Virginia Tech’s electronic mail address: [email protected]
__author__ = "Aditya Nugur"
__credits__ = ""
__version__ = "3.5"
__maintainer__ = "Aditya Nugur""
__email__ = "[email protected]"
__website__ = ""
__status__ = "Prototype"
__created__ = "2016-10-22 16:12:00"
__lastUpdated__ = "2016-10-25 13:25:00"
'''
from DeviceAPI.BaseAPI_Magnum import baseAPI_Magnum
from bemoss_lib.utils.BEMOSS_ONTOLOGY import BEMOSS_ONTOLOGY
debug = True
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
7061,
6,
198,
15269,
10673,
1946,
416,
6025,
12280,
23873,
291,
5136,
290,
1812,
2059,
198,
3237,
2489,
10395,
198,
198,
41017,
12280,
23873,
291,
5136,
290,
1812,
2059,
357,
41017,
9634,
8,
12216,
262,
6634,
329,
262,
347,
3620,
18420,
3788,
290,
663,
198,
32852,
10314,
357,
447,
250,
25423,
447,
251,
8,
290,
27452,
2489,
284,
7264,
2267,
2489,
739,
21216,
3519,
284,
198,
1169,
347,
3620,
18420,
3788,
284,
584,
8233,
6712,
393,
1729,
12,
9183,
2267,
6712,
13,
198,
1639,
815,
7773,
1100,
262,
1708,
2846,
290,
3403,
878,
1262,
428,
3788,
13,
198,
7120,
779,
286,
428,
10442,
9217,
534,
13427,
286,
428,
5964,
4381,
290,
477,
2846,
290,
3403,
13,
198,
198,
1639,
389,
29376,
11971,
284,
779,
262,
10442,
329,
8504,
12,
48401,
32039,
691,
13,
220,
8504,
12,
48401,
32039,
1724,
262,
198,
1904,
286,
262,
10442,
9944,
329,
2267,
13,
220,
8504,
12,
48401,
32039,
36833,
11,
1231,
17385,
11,
597,
779,
286,
198,
1169,
10442,
11,
355,
636,
286,
11,
393,
287,
597,
835,
287,
4637,
351,
257,
1720,
393,
2139,
543,
318,
2702,
11,
4438,
329,
5466,
11,
198,
36612,
11,
40352,
11,
8063,
276,
11,
393,
26399,
13,
220,
2448,
3411,
284,
779,
11,
4866,
11,
13096,
11,
290,
14983,
428,
23340,
198,
1640,
8504,
12,
48401,
32039,
284,
584,
8233,
6712,
393,
1729,
12,
9183,
2267,
6712,
318,
29376,
7520,
198,
19419,
6838,
11,
2426,
284,
262,
1708,
2846,
286,
428,
5964,
13,
198,
198,
48401,
5765,
1002,
345,
6227,
284,
779,
262,
3788,
329,
7630,
12,
8601,
393,
5068,
4959,
11,
198,
5832,
4236,
284,
16674,
287,
922,
4562,
257,
5964,
351,
6025,
9634,
3161,
284,
884,
7630,
12,
8601,
393,
5068,
779,
13,
198,
41017,
9634,
2236,
423,
645,
12990,
284,
7264,
884,
5964,
284,
345,
11,
290,
743,
7264,
8568,
393,
1729,
12,
41195,
198,
677,
4541,
284,
1854,
13,
921,
743,
2800,
262,
1708,
416,
3053,
284,
2112,
5068,
779,
25,
410,
83,
3974,
265,
658,
31,
85,
22504,
13,
2398,
198,
198,
19352,
3780,
286,
7455,
1799,
3268,
8005,
49261,
17682,
569,
4663,
38,
1268,
3539,
44999,
11,
6375,
15529,
25401,
16652,
56,
19494,
26720,
19164,
5064,
56,
5357,
14,
1581,
23848,
1797,
5446,
9865,
37780,
198,
10970,
46805,
7054,
19878,
44,
22470,
1961,
317,
8202,
6089,
11,
9348,
43031,
19146,
5390,
7013,
7473,
29506,
25552,
11,
47783,
2751,
15529,
41877,
11,
38846,
11,
19387,
25256,
1847,
6375,
198,
10943,
5188,
10917,
3525,
12576,
29506,
25552,
5923,
1797,
2751,
16289,
3963,
3336,
23210,
6375,
3268,
32,
25382,
5390,
23210,
3336,
46805,
357,
1268,
39149,
2751,
21728,
5626,
40880,
5390,
198,
43,
18420,
3963,
42865,
6375,
42865,
9348,
2751,
371,
10619,
1137,
1961,
3268,
26861,
4261,
6158,
6375,
406,
18420,
1546,
311,
7759,
29833,
1961,
11050,
7013,
6375,
2320,
46833,
16652,
11015,
6375,
317,
9677,
4146,
11335,
198,
19238,
3336,
46805,
5390,
43521,
6158,
13315,
15529,
25401,
46805,
50,
828,
45886,
16876,
569,
4663,
38,
1268,
3539,
44999,
6375,
25401,
16652,
56,
33930,
9348,
1677,
5984,
29817,
1961,
198,
19238,
3336,
28069,
11584,
25382,
3963,
13558,
3398,
29506,
25552,
13,
198,
198,
1890,
1336,
2846,
290,
3403,
11,
3387,
3187,
3740,
1378,
2545,
27041,
316,
13,
2398,
14,
65,
368,
793,
14,
65,
368,
793,
62,
418,
13,
198,
198,
20231,
477,
22440,
5115,
428,
5964,
284,
6025,
9634,
447,
247,
82,
7914,
6920,
2209,
25,
410,
83,
3974,
265,
658,
31,
85,
22504,
13,
2398,
198,
198,
834,
9800,
834,
796,
366,
2782,
414,
64,
45777,
333,
1,
198,
834,
66,
20696,
834,
796,
13538,
198,
834,
9641,
834,
796,
366,
18,
13,
20,
1,
198,
834,
76,
2913,
10613,
834,
796,
366,
2782,
414,
64,
45777,
333,
15931,
198,
834,
12888,
834,
796,
366,
324,
414,
64,
2624,
31,
36540,
13,
15532,
1,
198,
834,
732,
12485,
834,
796,
13538,
198,
834,
13376,
834,
796,
366,
19703,
8690,
1,
198,
834,
25598,
834,
796,
366,
5304,
12,
940,
12,
1828,
1467,
25,
1065,
25,
405,
1,
198,
834,
12957,
17354,
834,
796,
366,
5304,
12,
940,
12,
1495,
1511,
25,
1495,
25,
405,
1,
198,
7061,
6,
628,
198,
6738,
16232,
17614,
13,
14881,
17614,
62,
48017,
388,
1330,
2779,
17614,
62,
48017,
388,
198,
6738,
307,
76,
793,
62,
8019,
13,
26791,
13,
33,
3620,
18420,
62,
35830,
43781,
1330,
347,
3620,
18420,
62,
35830,
43781,
198,
24442,
796,
6407,
198
] | 3.783245 | 752 |
# Generated by Django 2.0.3 on 2018-03-23 03:23
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
18,
319,
2864,
12,
3070,
12,
1954,
7643,
25,
1954,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
628
] | 2.818182 | 44 |
import numpy as np
import torch.nn as nn
import torch
from dense_layer import DenseLayer
from fused_bias_activation import FusedBiasActivation
from base_layer import BaseLayer
from tensorboard_logger import TensorboardLogger
| [
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
198,
6738,
15715,
62,
29289,
1330,
360,
1072,
49925,
198,
6738,
43954,
62,
65,
4448,
62,
48545,
1330,
376,
1484,
33,
4448,
25526,
341,
198,
6738,
2779,
62,
29289,
1330,
7308,
49925,
198,
198,
6738,
11192,
273,
3526,
62,
6404,
1362,
1330,
309,
22854,
3526,
11187,
1362,
198
] | 3.53125 | 64 |
expected_output = {
'vrf': {
'default': {
'local_ldp_identifier': {
'10.52.31.247:0': {
'discovery_sources': {
'interfaces': {
'TenGigE0/0/0/5.2097': {
'ldp_id': {
'10.52.26.121:0': {
'established_date': 'Dec 18 16:49:16.538',
'established_elapsed': '3d00h',
'holdtime_sec': 15,
'proposed_local': 15,
'proposed_peer': 15
}
},
'recv': True,
'transport_ip_addr': '10.52.26.121',
'xmit': True
}
}
}
}
}
}
}
}
| [
198,
40319,
62,
22915,
796,
1391,
198,
220,
220,
220,
705,
37020,
69,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
12286,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
12001,
62,
335,
79,
62,
738,
7483,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
940,
13,
4309,
13,
3132,
13,
23753,
25,
15,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
67,
40821,
62,
82,
2203,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
3849,
32186,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
24893,
38,
328,
36,
15,
14,
15,
14,
15,
14,
20,
13,
1238,
5607,
10354,
1391,
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,
705,
335,
79,
62,
312,
10354,
1391,
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,
705,
940,
13,
4309,
13,
2075,
13,
19244,
25,
15,
10354,
1391,
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,
705,
27718,
62,
4475,
10354,
705,
10707,
1248,
1467,
25,
2920,
25,
1433,
13,
49561,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
27718,
62,
417,
28361,
10354,
705,
18,
67,
405,
71,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
2946,
2435,
62,
2363,
10354,
1315,
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,
705,
22930,
1335,
62,
12001,
10354,
1315,
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,
705,
22930,
1335,
62,
33350,
10354,
1315,
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,
1782,
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,
8964,
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,
705,
8344,
85,
10354,
6407,
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,
705,
7645,
634,
62,
541,
62,
29851,
10354,
705,
940,
13,
4309,
13,
2075,
13,
19244,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
87,
2781,
10354,
6407,
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,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
1782,
198,
92,
198
] | 1.27611 | 833 |
import requests
import json
from datetime import datetime
from cad_tickers.exchanges.tsx.gql_data import GQL
from typing import Union
def get_ticker_filings(
symbol: str,
fromDate: str = datetime.today().replace(day=1).strftime("%Y-%m-%d"),
toDate: str = datetime.today().strftime("%Y-%m-%d"),
limit: int = 100,
) -> Union[dict, None]:
"""
Parameters:
symbol - ticker symbol from tsx, no prefix
fromDate - start date to grab documents
toDate - end date to grab documents
limit - max number of documents to retrieve
Returns:
dict - :ref:`Quote By Symbol <quote_by_symbol_query>`
"""
payload = GQL.get_company_filings_payload
payload["variables"]["symbol"] = symbol
payload["variables"]["fromDate"] = fromDate
payload["variables"]["toDate"] = toDate
payload["variables"]["limit"] = limit
url = "https://app-money.tmx.com/graphql"
r = requests.post(
url,
data=json.dumps(payload),
headers={
"authority": "app-money.tmx.com",
"referer": f"https://money.tmx.com/en/quote/{symbol.upper()}",
"locale": "en",
"Content-Type": "application/json"
},
)
try:
if r.status_code == 403:
print(r.text)
return {}
else:
allData = r.json()
print(allData)
data = allData["data"]
return data
except KeyError as _e:
print(_e, symbol)
pass
# TODO rename this later
def get_news_and_events(
symbol: str,
page: int = 1,
limit: int = 100,
locale: str = "en",
) -> Union[dict, None]:
"""
Parameters:
symbol - ticker symbol from tsx, no prefix
page - start date to grab documents
limit - max number of documents to retrieve
locale - language
Returns:
dict - :ref:`Quote By Symbol <quote_by_symbol_query>`
"""
payload = GQL.get_company_news_events_payload
payload["variables"]["symbol"] = symbol
payload["variables"]["page"] = page
payload["variables"]["limit"] = limit
payload["variables"]["locale"] = locale
url = "https://app-money.tmx.com/graphql"
r = requests.post(
url,
data=json.dumps(payload),
headers={
"authority": "app-money.tmx.com",
"referer": f"https://money.tmx.com/en/quote/{symbol.upper()}",
"locale": "en",
"Content-Type": "application/json"
},
)
try:
# check headings
if r.status_code == 403:
print(r.text)
return {}
else:
allData = r.json()
data = allData["data"]
return data
except KeyError as _e:
return {}
if __name__ == "__main__":
art = get_news_and_events(
"PKK.CN", 1, 108
)
print(art)
| [
11748,
7007,
198,
11748,
33918,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
20603,
62,
83,
21630,
13,
1069,
36653,
13,
912,
87,
13,
70,
13976,
62,
7890,
1330,
402,
9711,
198,
6738,
19720,
1330,
4479,
628,
198,
4299,
651,
62,
83,
15799,
62,
10379,
654,
7,
198,
220,
220,
220,
6194,
25,
965,
11,
198,
220,
220,
220,
422,
10430,
25,
965,
796,
4818,
8079,
13,
40838,
22446,
33491,
7,
820,
28,
16,
737,
2536,
31387,
7203,
4,
56,
12,
4,
76,
12,
4,
67,
12340,
198,
220,
220,
220,
284,
10430,
25,
965,
796,
4818,
8079,
13,
40838,
22446,
2536,
31387,
7203,
4,
56,
12,
4,
76,
12,
4,
67,
12340,
198,
220,
220,
220,
4179,
25,
493,
796,
1802,
11,
198,
8,
4613,
4479,
58,
11600,
11,
6045,
5974,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
40117,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6194,
532,
4378,
263,
6194,
422,
40379,
87,
11,
645,
21231,
198,
220,
220,
220,
220,
220,
220,
220,
422,
10430,
532,
923,
3128,
284,
5552,
4963,
198,
220,
220,
220,
220,
220,
220,
220,
284,
10430,
532,
886,
3128,
284,
5552,
4963,
198,
220,
220,
220,
220,
220,
220,
220,
4179,
532,
3509,
1271,
286,
4963,
284,
19818,
198,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
8633,
532,
1058,
5420,
25,
63,
25178,
2750,
38357,
1279,
22708,
62,
1525,
62,
1837,
23650,
62,
22766,
29,
63,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
21437,
796,
402,
9711,
13,
1136,
62,
39722,
62,
10379,
654,
62,
15577,
2220,
198,
220,
220,
220,
21437,
14692,
25641,
2977,
1,
7131,
1,
1837,
23650,
8973,
796,
6194,
198,
220,
220,
220,
21437,
14692,
25641,
2977,
1,
7131,
1,
6738,
10430,
8973,
796,
422,
10430,
198,
220,
220,
220,
21437,
14692,
25641,
2977,
1,
7131,
1,
1462,
10430,
8973,
796,
284,
10430,
198,
220,
220,
220,
21437,
14692,
25641,
2977,
1,
7131,
1,
32374,
8973,
796,
4179,
198,
220,
220,
220,
19016,
796,
366,
5450,
1378,
1324,
12,
26316,
13,
17209,
87,
13,
785,
14,
34960,
13976,
1,
198,
220,
220,
220,
374,
796,
7007,
13,
7353,
7,
198,
220,
220,
220,
220,
220,
220,
220,
19016,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
28,
17752,
13,
67,
8142,
7,
15577,
2220,
828,
198,
220,
220,
220,
220,
220,
220,
220,
24697,
34758,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
9800,
414,
1298,
366,
1324,
12,
26316,
13,
17209,
87,
13,
785,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5420,
11882,
1298,
277,
1,
5450,
1378,
26316,
13,
17209,
87,
13,
785,
14,
268,
14,
22708,
14,
90,
1837,
23650,
13,
45828,
3419,
92,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
17946,
1000,
1298,
366,
268,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
19746,
12,
6030,
1298,
366,
31438,
14,
17752,
1,
198,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
374,
13,
13376,
62,
8189,
6624,
38210,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
81,
13,
5239,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
477,
6601,
796,
374,
13,
17752,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
439,
6601,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
477,
6601,
14692,
7890,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1366,
198,
220,
220,
220,
2845,
7383,
12331,
355,
4808,
68,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
28264,
68,
11,
6194,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
198,
2,
16926,
46,
36265,
428,
1568,
198,
4299,
651,
62,
10827,
62,
392,
62,
31534,
7,
198,
220,
220,
220,
6194,
25,
965,
11,
198,
220,
220,
220,
2443,
25,
493,
796,
352,
11,
198,
220,
220,
220,
4179,
25,
493,
796,
1802,
11,
198,
220,
220,
220,
36693,
25,
965,
796,
366,
268,
1600,
198,
8,
4613,
4479,
58,
11600,
11,
6045,
5974,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
40117,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6194,
532,
4378,
263,
6194,
422,
40379,
87,
11,
645,
21231,
198,
220,
220,
220,
220,
220,
220,
220,
2443,
532,
923,
3128,
284,
5552,
4963,
198,
220,
220,
220,
220,
220,
220,
220,
4179,
532,
3509,
1271,
286,
4963,
284,
19818,
198,
220,
220,
220,
220,
220,
220,
220,
36693,
532,
3303,
198,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
8633,
532,
1058,
5420,
25,
63,
25178,
2750,
38357,
1279,
22708,
62,
1525,
62,
1837,
23650,
62,
22766,
29,
63,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
21437,
796,
402,
9711,
13,
1136,
62,
39722,
62,
10827,
62,
31534,
62,
15577,
2220,
198,
220,
220,
220,
21437,
14692,
25641,
2977,
1,
7131,
1,
1837,
23650,
8973,
796,
6194,
198,
220,
220,
220,
21437,
14692,
25641,
2977,
1,
7131,
1,
7700,
8973,
796,
2443,
198,
220,
220,
220,
21437,
14692,
25641,
2977,
1,
7131,
1,
32374,
8973,
796,
4179,
198,
220,
220,
220,
21437,
14692,
25641,
2977,
1,
7131,
1,
17946,
1000,
8973,
796,
36693,
198,
220,
220,
220,
19016,
796,
366,
5450,
1378,
1324,
12,
26316,
13,
17209,
87,
13,
785,
14,
34960,
13976,
1,
198,
220,
220,
220,
374,
796,
7007,
13,
7353,
7,
198,
220,
220,
220,
220,
220,
220,
220,
19016,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
28,
17752,
13,
67,
8142,
7,
15577,
2220,
828,
198,
220,
220,
220,
220,
220,
220,
220,
24697,
34758,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
9800,
414,
1298,
366,
1324,
12,
26316,
13,
17209,
87,
13,
785,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5420,
11882,
1298,
277,
1,
5450,
1378,
26316,
13,
17209,
87,
13,
785,
14,
268,
14,
22708,
14,
90,
1837,
23650,
13,
45828,
3419,
92,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
17946,
1000,
1298,
366,
268,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
19746,
12,
6030,
1298,
366,
31438,
14,
17752,
1,
198,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2198,
1182,
654,
198,
220,
220,
220,
220,
220,
220,
220,
611,
374,
13,
13376,
62,
8189,
6624,
38210,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
81,
13,
5239,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
477,
6601,
796,
374,
13,
17752,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
477,
6601,
14692,
7890,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1366,
198,
220,
220,
220,
2845,
7383,
12331,
355,
4808,
68,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
23884,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1242,
796,
651,
62,
10827,
62,
392,
62,
31534,
7,
198,
220,
220,
220,
220,
220,
220,
220,
366,
47,
16601,
13,
44175,
1600,
352,
11,
15495,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
3601,
7,
433,
8,
198
] | 2.148065 | 1,344 |
from os.path import dirname, join
import json
| [
6738,
28686,
13,
6978,
1330,
26672,
3672,
11,
4654,
198,
11748,
33918,
198
] | 3.538462 | 13 |
from django.db import models
# Create your models here.
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
2,
13610,
534,
4981,
994,
13,
198
] | 3.5625 | 16 |
import os, sys
import numpy as np
import time
import math
from scipy.spatial.transform import Rotation as R
from skyfield.api import load,Topos
from skyfield.earthlib import terra, reverse_terra
from timeout import timeout, TimeoutError
timeout_time = int(os.getenv("TIMEOUT",60))
speed_of_light_km_ns = 0.000299792
au_to_km = 149598000
geo_orbit_km = 42164
sealevel_km = 6371
num_sats = int(os.getenv("NUM_SATS", 8))
minA = np.deg2rad(15)
maxA = np.deg2rad(35)
minDist = 5
maxDist = 15
def haversine_np(lon1, lat1, lon2, lat2):
"""
Calculate the great circle distance between two points
on the earth (specified in decimal degrees)
Reference:
https://stackoverflow.com/a/29546836/7657658
https://gist.github.com/mazzma12/6dbcc71ab3b579c08d66a968ff509901
"""
lon1, lat1, lon2, lat2 = map(np.radians, [lon1, lat1, lon2, lat2])
dlon = lon2 - lon1
dlat = lat2 - lat1
a = np.sin(dlat / 2.0)**2 + np.cos(lat1) * np.cos(lat2) * np.sin(dlon / 2.0)**2
c = 2 * np.arcsin(np.sqrt(a))
km = 6371 * c
return km
# Only rotate around the Z axis, changes Lon only
@timeout(timeout_time)
if __name__ == "__main__":
ts = load.timescale(builtin=True)
t = ts.utc(0)
SEED = int(os.getenv("SEED", 0)) & 0xFFFFFFFF
np.random.seed(SEED)
sys.stderr.write("SEED: {}\n".format(SEED))
Gll, Vg = GroundStation(t)
_, Vt = Transmitter(Gll, Vg, t)
_, Vs = Satellites(Gll, Vt)
# Time to randomize!!
np.random.seed( ( SEED + int(time.time()) ) & 0xFFFFFFFF )
r = randomRotation()
Gll = rotateCoords(r, Vg)
Tll = rotateCoords(r, Vt)
Slls = map(lambda V: rotateCoords(r, V), Vs)
sys.stderr.write("Rogue @ {}\n".format(Tll))
# Print out the details
sys.stdout.write("Ground Antenna (lat,lon):\n")
sys.stdout.write("\t{}, {}\n".format(Gll[0], Gll[1]))
sys.stdout.write("Satellites (#,lat,lon):\n")
ii = 1
for (lat,lon) in Slls:
sys.stdout.write("{},\t{},\t{}\n".format(ii,lat,lon))
ii += 1
sys.stdout.flush()
try:
doChallenge(Tll)
except TimeoutError:
sys.stdout.write("Timeout, Bye\n")
sys.stdout.flush()
| [
11748,
28686,
11,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
11748,
10688,
198,
6738,
629,
541,
88,
13,
2777,
34961,
13,
35636,
1330,
371,
14221,
355,
371,
198,
6738,
6766,
3245,
13,
15042,
1330,
3440,
11,
9126,
418,
198,
6738,
6766,
3245,
13,
16442,
8019,
1330,
1059,
430,
11,
9575,
62,
353,
430,
198,
198,
6738,
26827,
1330,
26827,
11,
3862,
448,
12331,
198,
198,
48678,
62,
2435,
796,
493,
7,
418,
13,
1136,
24330,
7203,
34694,
12425,
1600,
1899,
4008,
198,
198,
12287,
62,
1659,
62,
2971,
62,
13276,
62,
5907,
796,
657,
13,
830,
22579,
48156,
198,
559,
62,
1462,
62,
13276,
796,
24041,
3270,
33942,
198,
469,
78,
62,
42594,
62,
13276,
796,
5433,
23237,
220,
198,
325,
1000,
626,
62,
13276,
220,
796,
718,
38056,
198,
22510,
62,
82,
1381,
796,
493,
7,
418,
13,
1136,
24330,
7203,
41359,
62,
50,
33586,
1600,
807,
4008,
198,
198,
1084,
32,
796,
45941,
13,
13500,
17,
6335,
7,
1314,
8,
198,
9806,
32,
796,
45941,
13,
13500,
17,
6335,
7,
2327,
8,
198,
1084,
20344,
796,
642,
198,
9806,
20344,
796,
1315,
628,
198,
4299,
387,
690,
500,
62,
37659,
7,
14995,
16,
11,
3042,
16,
11,
300,
261,
17,
11,
3042,
17,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
27131,
378,
262,
1049,
9197,
5253,
1022,
734,
2173,
198,
220,
220,
220,
319,
262,
4534,
357,
23599,
287,
32465,
7370,
8,
198,
220,
220,
220,
20984,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3740,
1378,
25558,
2502,
11125,
13,
785,
14,
64,
14,
1959,
4051,
3104,
2623,
14,
29143,
29143,
23,
198,
220,
220,
220,
220,
198,
220,
220,
220,
3740,
1378,
70,
396,
13,
12567,
13,
785,
14,
76,
8101,
2611,
1065,
14,
21,
9945,
535,
4869,
397,
18,
65,
41734,
66,
2919,
67,
2791,
64,
38956,
487,
1120,
2079,
486,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
300,
261,
16,
11,
3042,
16,
11,
300,
261,
17,
11,
3042,
17,
796,
3975,
7,
37659,
13,
6335,
1547,
11,
685,
14995,
16,
11,
3042,
16,
11,
300,
261,
17,
11,
3042,
17,
12962,
628,
220,
220,
220,
288,
14995,
796,
300,
261,
17,
532,
300,
261,
16,
198,
220,
220,
220,
288,
15460,
796,
3042,
17,
532,
3042,
16,
628,
220,
220,
220,
257,
796,
45941,
13,
31369,
7,
67,
15460,
1220,
362,
13,
15,
8,
1174,
17,
1343,
45941,
13,
6966,
7,
15460,
16,
8,
1635,
45941,
13,
6966,
7,
15460,
17,
8,
1635,
45941,
13,
31369,
7,
67,
14995,
1220,
362,
13,
15,
8,
1174,
17,
628,
220,
220,
220,
269,
796,
362,
1635,
45941,
13,
5605,
31369,
7,
37659,
13,
31166,
17034,
7,
64,
4008,
198,
220,
220,
220,
10571,
796,
718,
38056,
1635,
269,
198,
220,
220,
220,
1441,
10571,
628,
628,
198,
2,
5514,
23064,
1088,
262,
1168,
16488,
11,
2458,
39295,
691,
198,
198,
31,
48678,
7,
48678,
62,
2435,
8,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
220,
198,
220,
220,
220,
40379,
796,
3440,
13,
22355,
38765,
7,
18780,
259,
28,
17821,
8,
198,
220,
220,
220,
256,
796,
40379,
13,
315,
66,
7,
15,
8,
628,
220,
220,
220,
7946,
1961,
796,
493,
7,
418,
13,
1136,
24330,
7203,
5188,
1961,
1600,
657,
4008,
1222,
657,
87,
29312,
29312,
198,
220,
220,
220,
45941,
13,
25120,
13,
28826,
7,
5188,
1961,
8,
198,
220,
220,
220,
25064,
13,
301,
1082,
81,
13,
13564,
7203,
5188,
1961,
25,
23884,
59,
77,
1911,
18982,
7,
5188,
1961,
4008,
628,
220,
220,
220,
402,
297,
11,
569,
70,
796,
13706,
12367,
7,
83,
8,
198,
220,
220,
220,
4808,
11,
569,
83,
796,
3602,
37974,
7,
38,
297,
11,
569,
70,
11,
256,
8,
198,
220,
220,
220,
4808,
11,
31280,
796,
311,
7528,
2737,
7,
38,
297,
11,
569,
83,
8,
628,
220,
220,
220,
1303,
3862,
284,
4738,
1096,
3228,
198,
220,
220,
220,
45941,
13,
25120,
13,
28826,
7,
357,
7946,
1961,
1343,
493,
7,
2435,
13,
2435,
28955,
1267,
1222,
657,
87,
29312,
29312,
1267,
198,
220,
220,
220,
374,
796,
4738,
49,
14221,
3419,
198,
220,
220,
220,
402,
297,
796,
23064,
7222,
3669,
7,
81,
11,
569,
70,
8,
198,
220,
220,
220,
309,
297,
796,
23064,
7222,
3669,
7,
81,
11,
569,
83,
8,
198,
220,
220,
220,
311,
297,
82,
796,
3975,
7,
50033,
569,
25,
23064,
7222,
3669,
7,
81,
11,
569,
828,
31280,
8,
628,
220,
220,
220,
25064,
13,
301,
1082,
81,
13,
13564,
7203,
48163,
2488,
23884,
59,
77,
1911,
18982,
7,
51,
297,
4008,
628,
220,
220,
220,
1303,
12578,
503,
262,
3307,
198,
220,
220,
220,
25064,
13,
19282,
448,
13,
13564,
7203,
35539,
3738,
13713,
357,
15460,
11,
14995,
2599,
59,
77,
4943,
198,
220,
220,
220,
25064,
13,
19282,
448,
13,
13564,
7203,
59,
83,
90,
5512,
23884,
59,
77,
1911,
18982,
7,
38,
297,
58,
15,
4357,
402,
297,
58,
16,
60,
4008,
198,
220,
220,
220,
25064,
13,
19282,
448,
13,
13564,
7203,
50,
7528,
2737,
17426,
11,
15460,
11,
14995,
2599,
59,
77,
4943,
198,
220,
220,
220,
21065,
796,
352,
198,
220,
220,
220,
329,
357,
15460,
11,
14995,
8,
287,
311,
297,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
19282,
448,
13,
13564,
7203,
90,
5512,
59,
83,
90,
5512,
59,
83,
90,
32239,
77,
1911,
18982,
7,
4178,
11,
15460,
11,
14995,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
21065,
15853,
352,
198,
220,
220,
220,
25064,
13,
19282,
448,
13,
25925,
3419,
628,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
466,
41812,
3540,
7,
51,
297,
8,
198,
220,
220,
220,
2845,
3862,
448,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
19282,
448,
13,
13564,
7203,
48031,
11,
47843,
59,
77,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
19282,
448,
13,
25925,
3419,
198,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
198
] | 2.163565 | 1,021 |
import os
| [
11748,
28686,
198
] | 3.333333 | 3 |
"""Hardware Backend for the SR V4 power board."""
import struct
from datetime import timedelta
from time import sleep
from typing import Callable, Dict, Mapping, Set, cast
import usb
from j5.backends.hardware.env import NotSupportedByHardwareError
from j5.backends.hardware.j5.raw_usb import (
RawUSBHardwareBackend,
ReadCommand,
WriteCommand,
handle_usb_error,
)
from j5.boards import Board
from j5.boards.sr.v4.power_board import PowerBoard, PowerOutputPosition
from j5.components import (
BatterySensorInterface,
ButtonInterface,
LEDInterface,
PiezoInterface,
PowerOutputInterface,
)
# The names and codes of these commands match the definitions in usb.h in the firmware
# source.
CMD_READ_OUTPUT: Mapping[int, ReadCommand] = {
output.value: ReadCommand(output.value, 4)
for output in PowerOutputPosition
}
CMD_READ_5VRAIL = ReadCommand(6, 4)
CMD_READ_BATTERY = ReadCommand(7, 8)
CMD_READ_BUTTON = ReadCommand(8, 4)
CMD_READ_FWVER = ReadCommand(9, 4)
CMD_WRITE_OUTPUT: Mapping[int, WriteCommand] = {
output.value: WriteCommand(output.value)
for output in PowerOutputPosition
}
CMD_WRITE_RUNLED = WriteCommand(6)
CMD_WRITE_ERRORLED = WriteCommand(7)
CMD_WRITE_PIEZO = WriteCommand(8)
class SRV4PowerBoardHardwareBackend(
PowerOutputInterface,
PiezoInterface,
ButtonInterface,
BatterySensorInterface,
LEDInterface,
RawUSBHardwareBackend,
):
"""The hardware implementation of the SR V4 power board."""
board = PowerBoard
@classmethod
@handle_usb_error
def discover(cls, find: Callable = usb.core.find) -> Set[Board]:
"""Discover boards that this backend can control."""
boards: Set[Board] = set()
device_list = find(idVendor=0x1bda, idProduct=0x0010, find_all=True)
for device in device_list:
backend = cls(device)
board = PowerBoard(backend.serial, backend)
boards.add(cast(Board, board))
return boards
@handle_usb_error
def check_firmware_version_supported(self) -> None:
"""Raises an exception if the firmware version is not supported."""
v = self.firmware_version
if v != "3":
raise NotImplementedError(f"this power board is running firmware "
f"version {v}, but only version 3 is supported")
@property
def firmware_version(self) -> str:
"""The firmware version reported by the board."""
version, = struct.unpack("<I", self._read(CMD_READ_FWVER))
return str(cast(int, version))
def get_power_output_enabled(self, identifier: int) -> bool:
"""Get whether a power output is enabled."""
try:
return self._output_states[identifier]
except KeyError:
raise ValueError(f"Invalid power output identifier {identifier!r}; "
f"valid identifiers are {CMD_WRITE_OUTPUT.keys()}") from None
def set_power_output_enabled(
self, identifier: int, enabled: bool,
) -> None:
"""Set whether a power output is enabled."""
try:
cmd = CMD_WRITE_OUTPUT[identifier]
except KeyError:
raise ValueError(f"Invalid power output identifier {identifier!r}; "
f"valid identifiers are {CMD_WRITE_OUTPUT.keys()}") from None
self._write(cmd, int(enabled))
self._output_states[identifier] = enabled
def get_power_output_current(self, identifier: int) -> float:
"""Get the current being drawn on a power output, in amperes."""
try:
cmd = CMD_READ_OUTPUT[identifier]
except KeyError:
raise ValueError(f"invalid power output identifier {identifier!r}; "
f"valid identifiers are {CMD_READ_OUTPUT.keys()}") from None
current, = struct.unpack("<I", self._read(cmd))
return cast(int, current) / 1000 # convert milliamps to amps
def buzz(self, identifier: int,
duration: timedelta, frequency: float) -> None:
"""Queue a pitch to be played."""
if identifier != 0:
raise ValueError(f"invalid piezo identifier {identifier!r}; "
f"the only valid identifier is 0")
duration_ms = round(duration / timedelta(milliseconds=1))
if duration_ms > 65535:
raise NotSupportedByHardwareError("Maximum piezo duration is 65535ms.")
frequency_int = int(round(frequency))
if frequency_int > 65535:
raise NotSupportedByHardwareError("Maximum piezo frequency is 65535Hz.")
data = struct.pack("<HH", frequency_int, duration_ms)
self._write(CMD_WRITE_PIEZO, data)
def get_button_state(self, identifier: int) -> bool:
"""Get the state of a button."""
if identifier != 0:
raise ValueError(f"invalid button identifier {identifier!r}; "
f"the only valid identifier is 0")
state, = struct.unpack("<I", self._read(CMD_READ_BUTTON))
return cast(int, state) != 0
def wait_until_button_pressed(self, identifier: int) -> None:
"""Halt the program until this button is pushed."""
while not self.get_button_state(identifier):
sleep(0.05)
def get_battery_sensor_voltage(self, identifier: int) -> float:
"""Get the voltage of a battery sensor."""
if identifier != 0:
raise ValueError(f"invalid battery sensor identifier {identifier!r}; "
f"the only valid identifier is 0")
current, voltage = struct.unpack("<II", self._read(CMD_READ_BATTERY))
return cast(int, voltage) / 1000 # convert millivolts to volts
def get_battery_sensor_current(self, identifier: int) -> float:
"""Get the current of a battery sensor."""
if identifier != 0:
raise ValueError(f"invalid battery sensor identifier {identifier!r}; "
f"the only valid identifier is 0")
current, voltage = struct.unpack("<II", self._read(CMD_READ_BATTERY))
return cast(int, current) / 1000 # convert milliamps to amps
def get_led_state(self, identifier: int) -> bool:
"""Get the state of an LED."""
return self._led_states[identifier]
def set_led_state(self, identifier: int, state: bool) -> None:
"""Set the state of an LED."""
cmds = {0: CMD_WRITE_RUNLED, 1: CMD_WRITE_ERRORLED}
try:
cmd = cmds[identifier]
except KeyError:
raise ValueError(f"invalid LED identifier {identifier!r}; valid identifiers "
f"are 0 (run LED) and 1 (error LED)") from None
self._write(cmd, int(state))
self._led_states[identifier] = state
| [
37811,
49865,
5157,
437,
329,
262,
16808,
569,
19,
1176,
3096,
526,
15931,
198,
198,
11748,
2878,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
6738,
640,
1330,
3993,
198,
6738,
19720,
1330,
4889,
540,
11,
360,
713,
11,
337,
5912,
11,
5345,
11,
3350,
198,
198,
11748,
38551,
198,
198,
6738,
474,
20,
13,
1891,
2412,
13,
10424,
1574,
13,
24330,
1330,
1892,
48181,
3886,
49865,
12331,
198,
6738,
474,
20,
13,
1891,
2412,
13,
10424,
1574,
13,
73,
20,
13,
1831,
62,
43319,
1330,
357,
198,
220,
220,
220,
16089,
27155,
49865,
7282,
437,
11,
198,
220,
220,
220,
4149,
21575,
11,
198,
220,
220,
220,
19430,
21575,
11,
198,
220,
220,
220,
5412,
62,
43319,
62,
18224,
11,
198,
8,
198,
6738,
474,
20,
13,
12821,
1330,
5926,
198,
6738,
474,
20,
13,
12821,
13,
27891,
13,
85,
19,
13,
6477,
62,
3526,
1330,
4333,
29828,
11,
4333,
26410,
26545,
198,
6738,
474,
20,
13,
5589,
3906,
1330,
357,
198,
220,
220,
220,
23490,
47864,
39317,
11,
198,
220,
220,
220,
20969,
39317,
11,
198,
220,
220,
220,
12365,
39317,
11,
198,
220,
220,
220,
21690,
10872,
39317,
11,
198,
220,
220,
220,
4333,
26410,
39317,
11,
198,
8,
198,
198,
2,
383,
3891,
290,
12416,
286,
777,
9729,
2872,
262,
17336,
287,
38551,
13,
71,
287,
262,
18779,
198,
2,
2723,
13,
198,
34,
12740,
62,
15675,
62,
2606,
7250,
3843,
25,
337,
5912,
58,
600,
11,
4149,
21575,
60,
796,
1391,
198,
220,
220,
220,
5072,
13,
8367,
25,
4149,
21575,
7,
22915,
13,
8367,
11,
604,
8,
198,
220,
220,
220,
329,
5072,
287,
4333,
26410,
26545,
198,
92,
198,
34,
12740,
62,
15675,
62,
20,
53,
3861,
4146,
796,
4149,
21575,
7,
21,
11,
604,
8,
198,
34,
12740,
62,
15675,
62,
47379,
5781,
56,
796,
4149,
21575,
7,
22,
11,
807,
8,
198,
34,
12740,
62,
15675,
62,
47526,
11357,
796,
4149,
21575,
7,
23,
11,
604,
8,
198,
34,
12740,
62,
15675,
62,
24160,
5959,
796,
4149,
21575,
7,
24,
11,
604,
8,
198,
198,
34,
12740,
62,
18564,
12709,
62,
2606,
7250,
3843,
25,
337,
5912,
58,
600,
11,
19430,
21575,
60,
796,
1391,
198,
220,
220,
220,
5072,
13,
8367,
25,
19430,
21575,
7,
22915,
13,
8367,
8,
198,
220,
220,
220,
329,
5072,
287,
4333,
26410,
26545,
198,
92,
198,
34,
12740,
62,
18564,
12709,
62,
49,
4944,
30465,
796,
19430,
21575,
7,
21,
8,
198,
34,
12740,
62,
18564,
12709,
62,
24908,
30465,
796,
19430,
21575,
7,
22,
8,
198,
34,
12740,
62,
18564,
12709,
62,
47,
10008,
57,
46,
796,
19430,
21575,
7,
23,
8,
628,
198,
4871,
16808,
53,
19,
13434,
29828,
49865,
7282,
437,
7,
198,
220,
220,
220,
4333,
26410,
39317,
11,
198,
220,
220,
220,
21690,
10872,
39317,
11,
198,
220,
220,
220,
20969,
39317,
11,
198,
220,
220,
220,
23490,
47864,
39317,
11,
198,
220,
220,
220,
12365,
39317,
11,
198,
220,
220,
220,
16089,
27155,
49865,
7282,
437,
11,
198,
2599,
198,
220,
220,
220,
37227,
464,
6890,
7822,
286,
262,
16808,
569,
19,
1176,
3096,
526,
15931,
628,
220,
220,
220,
3096,
796,
4333,
29828,
628,
220,
220,
220,
2488,
4871,
24396,
198,
220,
220,
220,
2488,
28144,
62,
43319,
62,
18224,
198,
220,
220,
220,
825,
7073,
7,
565,
82,
11,
1064,
25,
4889,
540,
796,
38551,
13,
7295,
13,
19796,
8,
4613,
5345,
58,
29828,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
44596,
11490,
326,
428,
30203,
460,
1630,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
11490,
25,
5345,
58,
29828,
60,
796,
900,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
3335,
62,
4868,
796,
1064,
7,
312,
53,
18738,
28,
15,
87,
16,
43444,
11,
4686,
15667,
28,
15,
87,
37187,
11,
1064,
62,
439,
28,
17821,
8,
198,
220,
220,
220,
220,
220,
220,
220,
329,
3335,
287,
3335,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30203,
796,
537,
82,
7,
25202,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3096,
796,
4333,
29828,
7,
1891,
437,
13,
46911,
11,
30203,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11490,
13,
2860,
7,
2701,
7,
29828,
11,
3096,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
11490,
628,
220,
220,
220,
2488,
28144,
62,
43319,
62,
18224,
628,
220,
220,
220,
825,
2198,
62,
69,
2533,
1574,
62,
9641,
62,
15999,
7,
944,
8,
4613,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
21762,
2696,
281,
6631,
611,
262,
18779,
2196,
318,
407,
4855,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
410,
796,
2116,
13,
69,
2533,
1574,
62,
9641,
198,
220,
220,
220,
220,
220,
220,
220,
611,
410,
14512,
366,
18,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
1892,
3546,
1154,
12061,
12331,
7,
69,
1,
5661,
1176,
3096,
318,
2491,
18779,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
9641,
1391,
85,
5512,
475,
691,
2196,
513,
318,
4855,
4943,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
18779,
62,
9641,
7,
944,
8,
4613,
965,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
464,
18779,
2196,
2098,
416,
262,
3096,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
2196,
11,
796,
2878,
13,
403,
8002,
7203,
27,
40,
1600,
2116,
13557,
961,
7,
34,
12740,
62,
15675,
62,
24160,
5959,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
965,
7,
2701,
7,
600,
11,
2196,
4008,
628,
220,
220,
220,
825,
651,
62,
6477,
62,
22915,
62,
25616,
7,
944,
11,
27421,
25,
493,
8,
4613,
20512,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3855,
1771,
257,
1176,
5072,
318,
9343,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
22915,
62,
27219,
58,
738,
7483,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
7383,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
1,
44651,
1176,
5072,
27421,
1391,
738,
7483,
0,
81,
19629,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
12102,
42814,
389,
1391,
34,
12740,
62,
18564,
12709,
62,
2606,
7250,
3843,
13,
13083,
3419,
92,
4943,
422,
6045,
628,
220,
220,
220,
825,
900,
62,
6477,
62,
22915,
62,
25616,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
11,
27421,
25,
493,
11,
9343,
25,
20512,
11,
198,
220,
220,
220,
1267,
4613,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
7248,
1771,
257,
1176,
5072,
318,
9343,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23991,
796,
327,
12740,
62,
18564,
12709,
62,
2606,
7250,
3843,
58,
738,
7483,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
7383,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
1,
44651,
1176,
5072,
27421,
1391,
738,
7483,
0,
81,
19629,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
12102,
42814,
389,
1391,
34,
12740,
62,
18564,
12709,
62,
2606,
7250,
3843,
13,
13083,
3419,
92,
4943,
422,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
13564,
7,
28758,
11,
493,
7,
25616,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
22915,
62,
27219,
58,
738,
7483,
60,
796,
9343,
628,
220,
220,
220,
825,
651,
62,
6477,
62,
22915,
62,
14421,
7,
944,
11,
27421,
25,
493,
8,
4613,
12178,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3855,
262,
1459,
852,
7428,
319,
257,
1176,
5072,
11,
287,
716,
431,
411,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23991,
796,
327,
12740,
62,
15675,
62,
2606,
7250,
3843,
58,
738,
7483,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
7383,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
1,
259,
12102,
1176,
5072,
27421,
1391,
738,
7483,
0,
81,
19629,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
12102,
42814,
389,
1391,
34,
12740,
62,
15675,
62,
2606,
7250,
3843,
13,
13083,
3419,
92,
4943,
422,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
1459,
11,
796,
2878,
13,
403,
8002,
7203,
27,
40,
1600,
2116,
13557,
961,
7,
28758,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
3350,
7,
600,
11,
1459,
8,
1220,
8576,
220,
1303,
10385,
3939,
72,
9430,
284,
45796,
628,
220,
220,
220,
825,
14713,
7,
944,
11,
27421,
25,
493,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9478,
25,
28805,
12514,
11,
8373,
25,
12178,
8,
4613,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
34991,
257,
7078,
284,
307,
2826,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
611,
27421,
14512,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
1,
259,
12102,
2508,
10872,
27421,
1391,
738,
7483,
0,
81,
19629,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
1169,
691,
4938,
27421,
318,
657,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
9478,
62,
907,
796,
2835,
7,
32257,
1220,
28805,
12514,
7,
17805,
27866,
24764,
28,
16,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
9478,
62,
907,
1875,
45021,
2327,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
1892,
48181,
3886,
49865,
12331,
7203,
40541,
2508,
10872,
9478,
318,
45021,
2327,
907,
19570,
628,
220,
220,
220,
220,
220,
220,
220,
8373,
62,
600,
796,
493,
7,
744,
7,
35324,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
8373,
62,
600,
1875,
45021,
2327,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
1892,
48181,
3886,
49865,
12331,
7203,
40541,
2508,
10872,
8373,
318,
45021,
2327,
7399,
19570,
628,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
2878,
13,
8002,
7203,
27,
16768,
1600,
8373,
62,
600,
11,
9478,
62,
907,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
13564,
7,
34,
12740,
62,
18564,
12709,
62,
47,
10008,
57,
46,
11,
1366,
8,
628,
220,
220,
220,
825,
651,
62,
16539,
62,
5219,
7,
944,
11,
27421,
25,
493,
8,
4613,
20512,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3855,
262,
1181,
286,
257,
4936,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
611,
27421,
14512,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
1,
259,
12102,
4936,
27421,
1391,
738,
7483,
0,
81,
19629,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
1169,
691,
4938,
27421,
318,
657,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
1181,
11,
796,
2878,
13,
403,
8002,
7203,
27,
40,
1600,
2116,
13557,
961,
7,
34,
12740,
62,
15675,
62,
47526,
11357,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
3350,
7,
600,
11,
1181,
8,
14512,
657,
628,
220,
220,
220,
825,
4043,
62,
28446,
62,
16539,
62,
45477,
7,
944,
11,
27421,
25,
493,
8,
4613,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
39,
2501,
262,
1430,
1566,
428,
4936,
318,
7121,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
981,
407,
2116,
13,
1136,
62,
16539,
62,
5219,
7,
738,
7483,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3993,
7,
15,
13,
2713,
8,
628,
220,
220,
220,
825,
651,
62,
65,
16296,
62,
82,
22854,
62,
37764,
496,
7,
944,
11,
27421,
25,
493,
8,
4613,
12178,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3855,
262,
15004,
286,
257,
6555,
12694,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
611,
27421,
14512,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
1,
259,
12102,
6555,
12694,
27421,
1391,
738,
7483,
0,
81,
19629,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
1169,
691,
4938,
27421,
318,
657,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
1459,
11,
15004,
796,
2878,
13,
403,
8002,
7203,
27,
3978,
1600,
2116,
13557,
961,
7,
34,
12740,
62,
15675,
62,
47379,
5781,
56,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
3350,
7,
600,
11,
15004,
8,
1220,
8576,
220,
1303,
10385,
3939,
452,
349,
912,
284,
46297,
628,
220,
220,
220,
825,
651,
62,
65,
16296,
62,
82,
22854,
62,
14421,
7,
944,
11,
27421,
25,
493,
8,
4613,
12178,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3855,
262,
1459,
286,
257,
6555,
12694,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
611,
27421,
14512,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
1,
259,
12102,
6555,
12694,
27421,
1391,
738,
7483,
0,
81,
19629,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
1169,
691,
4938,
27421,
318,
657,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
1459,
11,
15004,
796,
2878,
13,
403,
8002,
7203,
27,
3978,
1600,
2116,
13557,
961,
7,
34,
12740,
62,
15675,
62,
47379,
5781,
56,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
3350,
7,
600,
11,
1459,
8,
1220,
8576,
220,
1303,
10385,
3939,
72,
9430,
284,
45796,
628,
220,
220,
220,
825,
651,
62,
992,
62,
5219,
7,
944,
11,
27421,
25,
493,
8,
4613,
20512,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3855,
262,
1181,
286,
281,
12365,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
992,
62,
27219,
58,
738,
7483,
60,
628,
220,
220,
220,
825,
900,
62,
992,
62,
5219,
7,
944,
11,
27421,
25,
493,
11,
1181,
25,
20512,
8,
4613,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
7248,
262,
1181,
286,
281,
12365,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
23991,
82,
796,
1391,
15,
25,
327,
12740,
62,
18564,
12709,
62,
49,
4944,
30465,
11,
352,
25,
327,
12740,
62,
18564,
12709,
62,
24908,
30465,
92,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23991,
796,
23991,
82,
58,
738,
7483,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
7383,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
1,
259,
12102,
12365,
27421,
1391,
738,
7483,
0,
81,
19629,
4938,
42814,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
533,
657,
357,
5143,
12365,
8,
290,
352,
357,
18224,
12365,
8,
4943,
422,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
13564,
7,
28758,
11,
493,
7,
5219,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
992,
62,
27219,
58,
738,
7483,
60,
796,
1181,
198
] | 2.433155 | 2,805 |
"""Load a PEP 517 backend from inside the source tree.
"""
from contextlib import contextmanager
import importlib
import os
import pytoml
import sys
__version__ = '1.0'
@contextmanager
loader = HooksLoader(os.path.realpath(os.getcwd()))
| [
37811,
8912,
257,
350,
8905,
642,
1558,
30203,
422,
2641,
262,
2723,
5509,
13,
198,
37811,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
11748,
1330,
8019,
198,
11748,
28686,
198,
11748,
12972,
39532,
75,
198,
11748,
25064,
198,
198,
834,
9641,
834,
796,
705,
16,
13,
15,
6,
198,
198,
31,
22866,
37153,
198,
198,
29356,
796,
18531,
82,
17401,
7,
418,
13,
6978,
13,
5305,
6978,
7,
418,
13,
1136,
66,
16993,
3419,
4008,
198
] | 3.116883 | 77 |
from transformers import (
BertConfig,
BertForSequenceClassification,
BertTokenizer,
DistilBertConfig,
DistilBertForSequenceClassification,
DistilBertTokenizer,
RobertaConfig,
RobertaForSequenceClassification,
RobertaTokenizer,
XLMConfig,
XLMForSequenceClassification,
XLMTokenizer,
XLNetConfig,
XLNetForSequenceClassification,
XLNetTokenizer,
)
# Lookup for classes
MODEL_CLASSES = {
"bert": (BertConfig, BertForSequenceClassification, BertTokenizer),
"xlnet": (XLNetConfig, XLNetForSequenceClassification, XLNetTokenizer),
"xlm": (XLMConfig, XLMForSequenceClassification, XLMTokenizer),
"roberta": (RobertaConfig, RobertaForSequenceClassification, RobertaTokenizer),
"distilbert": (DistilBertConfig, DistilBertForSequenceClassification, DistilBertTokenizer),
}
| [
6738,
6121,
364,
1330,
357,
198,
220,
220,
220,
22108,
16934,
11,
198,
220,
220,
220,
22108,
1890,
44015,
594,
9487,
2649,
11,
198,
220,
220,
220,
22108,
30642,
7509,
11,
198,
220,
220,
220,
4307,
346,
33,
861,
16934,
11,
198,
220,
220,
220,
4307,
346,
33,
861,
1890,
44015,
594,
9487,
2649,
11,
198,
220,
220,
220,
4307,
346,
33,
861,
30642,
7509,
11,
198,
220,
220,
220,
5199,
64,
16934,
11,
198,
220,
220,
220,
5199,
64,
1890,
44015,
594,
9487,
2649,
11,
198,
220,
220,
220,
5199,
64,
30642,
7509,
11,
198,
220,
220,
220,
16276,
44,
16934,
11,
198,
220,
220,
220,
16276,
44,
1890,
44015,
594,
9487,
2649,
11,
198,
220,
220,
220,
16276,
13752,
4233,
7509,
11,
198,
220,
220,
220,
16276,
7934,
16934,
11,
198,
220,
220,
220,
16276,
7934,
1890,
44015,
594,
9487,
2649,
11,
198,
220,
220,
220,
16276,
7934,
30642,
7509,
11,
198,
8,
198,
198,
2,
6803,
929,
329,
6097,
198,
33365,
3698,
62,
31631,
1546,
796,
1391,
198,
220,
220,
220,
366,
4835,
1298,
357,
33,
861,
16934,
11,
22108,
1890,
44015,
594,
9487,
2649,
11,
22108,
30642,
7509,
828,
198,
220,
220,
220,
366,
87,
75,
3262,
1298,
357,
32457,
7934,
16934,
11,
16276,
7934,
1890,
44015,
594,
9487,
2649,
11,
16276,
7934,
30642,
7509,
828,
198,
220,
220,
220,
366,
87,
75,
76,
1298,
357,
55,
31288,
16934,
11,
16276,
44,
1890,
44015,
594,
9487,
2649,
11,
16276,
13752,
4233,
7509,
828,
198,
220,
220,
220,
366,
305,
4835,
64,
1298,
357,
15924,
8326,
16934,
11,
5199,
64,
1890,
44015,
594,
9487,
2649,
11,
5199,
64,
30642,
7509,
828,
198,
220,
220,
220,
366,
17080,
346,
4835,
1298,
357,
20344,
346,
33,
861,
16934,
11,
4307,
346,
33,
861,
1890,
44015,
594,
9487,
2649,
11,
4307,
346,
33,
861,
30642,
7509,
828,
198,
92,
198
] | 2.722581 | 310 |
from .cache import Cache
from .cached import cached
__all__ = (
"Cache",
"cached",
)
| [
6738,
764,
23870,
1330,
34088,
198,
6738,
764,
66,
2317,
1330,
39986,
628,
198,
834,
439,
834,
796,
357,
198,
220,
220,
220,
366,
30562,
1600,
198,
220,
220,
220,
366,
66,
2317,
1600,
198,
8,
198
] | 2.567568 | 37 |
# coding=utf-8
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from c.error import Error
from v.ui_lic_eliminar import Ui_Lic_Eliminar
| [
2,
19617,
28,
40477,
12,
23,
198,
6738,
9485,
48,
83,
19,
13,
48,
83,
8205,
72,
1330,
1635,
198,
6738,
9485,
48,
83,
19,
13,
48,
83,
14055,
1330,
1635,
198,
198,
6738,
269,
13,
18224,
1330,
13047,
198,
6738,
410,
13,
9019,
62,
677,
62,
417,
320,
22050,
1330,
471,
72,
62,
26656,
62,
36,
2475,
22050,
198,
197,
197,
198
] | 2.285714 | 63 |
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
from quantecon import LinearStateSpace
phi_1, phi_2, phi_3, phi_4 = 0.5, -0.2, 0, 0.5
sigma = 0.1
A = [[phi_1, phi_2, phi_3, phi_4],
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0]]
C = [[sigma], [0], [0], [0]]
G = [1, 0, 0, 0]
T = 30
ar = LinearStateSpace(A, C, G)
ymin, ymax = -0.8, 1.25
fig, ax = plt.subplots(figsize=(8, 4))
ax.set_xlim(ymin, ymax)
ax.set_xlabel(r'$y_t$', fontsize=16)
x, y = ar.replicate(T=T, num_reps=100000)
mu_x, mu_y, Sigma_x, Sigma_y = ar.stationary_distributions()
f_y = norm(loc=float(mu_y), scale=float(np.sqrt(Sigma_y)))
y = y.flatten()
ax.hist(y, bins=50, density=True, alpha=0.4)
ygrid = np.linspace(ymin, ymax, 150)
ax.plot(ygrid, f_y.pdf(ygrid), 'k-', lw=2, alpha=0.8, label='true density')
ax.legend()
plt.show()
| [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
629,
541,
88,
13,
34242,
1330,
2593,
198,
6738,
5554,
721,
261,
1330,
44800,
9012,
14106,
198,
198,
34846,
62,
16,
11,
872,
72,
62,
17,
11,
872,
72,
62,
18,
11,
872,
72,
62,
19,
796,
657,
13,
20,
11,
532,
15,
13,
17,
11,
657,
11,
657,
13,
20,
198,
82,
13495,
796,
657,
13,
16,
198,
198,
32,
796,
16410,
34846,
62,
16,
11,
872,
72,
62,
17,
11,
872,
72,
62,
18,
11,
872,
72,
62,
19,
4357,
198,
220,
220,
220,
220,
685,
16,
11,
220,
220,
220,
220,
657,
11,
220,
220,
220,
220,
657,
11,
220,
220,
220,
220,
657,
4357,
198,
220,
220,
220,
220,
685,
15,
11,
220,
220,
220,
220,
352,
11,
220,
220,
220,
220,
657,
11,
220,
220,
220,
220,
657,
4357,
198,
220,
220,
220,
220,
685,
15,
11,
220,
220,
220,
220,
657,
11,
220,
220,
220,
220,
352,
11,
220,
220,
220,
220,
657,
11907,
198,
34,
796,
16410,
82,
13495,
4357,
685,
15,
4357,
685,
15,
4357,
685,
15,
11907,
198,
38,
796,
685,
16,
11,
657,
11,
657,
11,
657,
60,
198,
198,
51,
796,
1542,
198,
283,
796,
44800,
9012,
14106,
7,
32,
11,
327,
11,
402,
8,
198,
198,
88,
1084,
11,
331,
9806,
796,
532,
15,
13,
23,
11,
352,
13,
1495,
198,
198,
5647,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
7,
5647,
7857,
16193,
23,
11,
604,
4008,
198,
198,
897,
13,
2617,
62,
87,
2475,
7,
88,
1084,
11,
331,
9806,
8,
198,
897,
13,
2617,
62,
87,
18242,
7,
81,
6,
3,
88,
62,
83,
3,
3256,
10369,
7857,
28,
1433,
8,
198,
198,
87,
11,
331,
796,
610,
13,
35666,
5344,
7,
51,
28,
51,
11,
997,
62,
260,
862,
28,
3064,
830,
8,
198,
30300,
62,
87,
11,
38779,
62,
88,
11,
31669,
62,
87,
11,
31669,
62,
88,
796,
610,
13,
17529,
560,
62,
17080,
2455,
507,
3419,
198,
69,
62,
88,
796,
2593,
7,
17946,
28,
22468,
7,
30300,
62,
88,
828,
5046,
28,
22468,
7,
37659,
13,
31166,
17034,
7,
50,
13495,
62,
88,
22305,
198,
198,
88,
796,
331,
13,
2704,
41769,
3419,
198,
897,
13,
10034,
7,
88,
11,
41701,
28,
1120,
11,
12109,
28,
17821,
11,
17130,
28,
15,
13,
19,
8,
198,
198,
88,
25928,
796,
45941,
13,
21602,
10223,
7,
88,
1084,
11,
331,
9806,
11,
6640,
8,
198,
897,
13,
29487,
7,
88,
25928,
11,
277,
62,
88,
13,
12315,
7,
88,
25928,
828,
705,
74,
12,
3256,
300,
86,
28,
17,
11,
17130,
28,
15,
13,
23,
11,
6167,
11639,
7942,
12109,
11537,
198,
897,
13,
1455,
437,
3419,
198,
489,
83,
13,
12860,
3419,
198
] | 1.868644 | 472 |
#!/usr/bin/env python2
import math
import parser as pr
while True:
print("\n CALCULATOR MENU")
print("1 for addition :")
print("2 for subtraction :")
print('3 for multiplication :')
print("4 for raise to power:")
print("5 for Division:")
print("6 for floor division:")
print("7 for factorial:")
print("8 for Statement based:")
choice=int(input("enter any choice:"))
if choice==1:
additon()
elif choice==2:
subtract()
elif choice==3:
multiplication()
elif choice==4:
power()
elif choice==5:
divide()
elif choice==6:
floor_division()
elif choice==7:
factorial()
elif choice==8:
statement_wrapper()
else:
print("wrong input")
exit(0)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
11748,
10688,
198,
11748,
30751,
355,
778,
198,
198,
4514,
6407,
25,
198,
220,
220,
220,
3601,
7203,
59,
77,
33290,
34,
6239,
25633,
41597,
52,
4943,
198,
220,
220,
220,
3601,
7203,
16,
329,
3090,
1058,
4943,
198,
220,
220,
220,
3601,
7203,
17,
329,
13284,
7861,
1058,
4943,
198,
220,
220,
220,
3601,
10786,
18,
329,
48473,
1058,
11537,
198,
220,
220,
220,
3601,
7203,
19,
329,
5298,
284,
1176,
25,
4943,
198,
220,
220,
220,
3601,
7203,
20,
329,
7458,
25,
4943,
198,
220,
220,
220,
3601,
7203,
21,
329,
4314,
7297,
25,
4943,
198,
220,
220,
220,
3601,
7203,
22,
329,
1109,
5132,
25,
4943,
198,
220,
220,
220,
3601,
7203,
23,
329,
21983,
1912,
25,
4943,
198,
220,
220,
220,
3572,
28,
600,
7,
15414,
7203,
9255,
597,
3572,
11097,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
628,
220,
220,
220,
611,
3572,
855,
16,
25,
198,
220,
220,
220,
220,
220,
220,
220,
751,
37752,
3419,
198,
220,
220,
220,
1288,
361,
3572,
855,
17,
25,
198,
220,
220,
220,
220,
220,
220,
220,
34128,
3419,
198,
220,
220,
220,
1288,
361,
3572,
855,
18,
25,
198,
220,
220,
220,
220,
220,
220,
220,
48473,
3419,
198,
220,
220,
220,
1288,
361,
3572,
855,
19,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1176,
3419,
198,
220,
220,
220,
1288,
361,
3572,
855,
20,
25,
198,
220,
220,
220,
220,
220,
220,
220,
14083,
3419,
198,
220,
220,
220,
1288,
361,
3572,
855,
21,
25,
198,
220,
220,
220,
220,
220,
220,
220,
4314,
62,
21426,
3419,
198,
220,
220,
220,
1288,
361,
3572,
855,
22,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1109,
5132,
3419,
198,
220,
220,
220,
1288,
361,
3572,
855,
23,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2643,
62,
48553,
3419,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
36460,
5128,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
8420,
7,
15,
8,
628
] | 2.238227 | 361 |
from datetime import datetime
from collections import defaultdict
import bisect
import numpy as np
import pandas as pd
from .core import new_dd_object, Series
from ..array.core import Array
from .utils import is_index_like, meta_nonempty
from . import methods
from ..base import tokenize
from ..highlevelgraph import HighLevelGraph
class _LocIndexer(_IndexerBase):
""" Helper class for the .loc accessor """
@property
def _loc(self, iindexer, cindexer):
""" Helper function for the .loc accessor """
if isinstance(iindexer, Series):
return self._loc_series(iindexer, cindexer)
elif isinstance(iindexer, Array):
return self._loc_array(iindexer, cindexer)
elif callable(iindexer):
return self._loc(iindexer(self.obj), cindexer)
if self.obj.known_divisions:
iindexer = self._maybe_partial_time_string(iindexer)
if isinstance(iindexer, slice):
return self._loc_slice(iindexer, cindexer)
elif isinstance(iindexer, (list, np.ndarray)):
return self._loc_list(iindexer, cindexer)
else:
# element should raise KeyError
return self._loc_element(iindexer, cindexer)
else:
if isinstance(iindexer, (list, np.ndarray)):
# applying map_pattition to each partitions
# results in duplicated NaN rows
msg = "Cannot index with list against unknown division"
raise KeyError(msg)
elif not isinstance(iindexer, slice):
iindexer = slice(iindexer, iindexer)
meta = self._make_meta(iindexer, cindexer)
return self.obj.map_partitions(
methods.try_loc, iindexer, cindexer, meta=meta
)
def _maybe_partial_time_string(self, iindexer):
"""
Convert index-indexer for partial time string slicing
if obj.index is DatetimeIndex / PeriodIndex
"""
idx = meta_nonempty(self.obj._meta.index)
iindexer = _maybe_partial_time_string(idx, iindexer, kind="loc")
return iindexer
def _partition_of_index_value(divisions, val):
"""In which partition does this value lie?
>>> _partition_of_index_value([0, 5, 10], 3)
0
>>> _partition_of_index_value([0, 5, 10], 8)
1
>>> _partition_of_index_value([0, 5, 10], 100)
1
>>> _partition_of_index_value([0, 5, 10], 5) # left-inclusive divisions
1
"""
if divisions[0] is None:
msg = "Can not use loc on DataFrame without known divisions"
raise ValueError(msg)
val = _coerce_loc_index(divisions, val)
i = bisect.bisect_right(divisions, val)
return min(len(divisions) - 2, max(0, i - 1))
def _partitions_of_index_values(divisions, values):
"""Return defaultdict of division and values pairs
Each key corresponds to the division which values are index values belong
to the division.
>>> sorted(_partitions_of_index_values([0, 5, 10], [3]).items())
[(0, [3])]
>>> sorted(_partitions_of_index_values([0, 5, 10], [3, 8, 5]).items())
[(0, [3]), (1, [8, 5])]
"""
if divisions[0] is None:
msg = "Can not use loc on DataFrame without known divisions"
raise ValueError(msg)
results = defaultdict(list)
values = pd.Index(values, dtype=object)
for val in values:
i = bisect.bisect_right(divisions, val)
div = min(len(divisions) - 2, max(0, i - 1))
results[div].append(val)
return results
def _coerce_loc_index(divisions, o):
"""Transform values to be comparable against divisions
This is particularly valuable to use with pandas datetimes
"""
if divisions and isinstance(divisions[0], datetime):
return pd.Timestamp(o)
if divisions and isinstance(divisions[0], np.datetime64):
return np.datetime64(o).astype(divisions[0].dtype)
return o
def _maybe_partial_time_string(index, indexer, kind):
"""
Convert indexer for partial string selection
if data has DatetimeIndex/PeriodIndex
"""
# do not pass dd.Index
assert is_index_like(index)
if not isinstance(index, (pd.DatetimeIndex, pd.PeriodIndex)):
return indexer
if isinstance(indexer, slice):
if isinstance(indexer.start, str):
start = index._maybe_cast_slice_bound(indexer.start, "left", kind)
else:
start = indexer.start
if isinstance(indexer.stop, str):
stop = index._maybe_cast_slice_bound(indexer.stop, "right", kind)
else:
stop = indexer.stop
return slice(start, stop)
elif isinstance(indexer, str):
start = index._maybe_cast_slice_bound(indexer, "left", "loc")
stop = index._maybe_cast_slice_bound(indexer, "right", "loc")
return slice(min(start, stop), max(start, stop))
return indexer
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
11748,
47457,
478,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
764,
7295,
1330,
649,
62,
1860,
62,
15252,
11,
7171,
198,
6738,
11485,
18747,
13,
7295,
1330,
15690,
198,
6738,
764,
26791,
1330,
318,
62,
9630,
62,
2339,
11,
13634,
62,
13159,
28920,
198,
6738,
764,
1330,
5050,
198,
6738,
11485,
8692,
1330,
11241,
1096,
198,
6738,
11485,
8929,
5715,
34960,
1330,
3334,
4971,
37065,
628,
628,
198,
4871,
4808,
33711,
15732,
263,
28264,
15732,
263,
14881,
2599,
198,
220,
220,
220,
37227,
5053,
525,
1398,
329,
262,
764,
17946,
1895,
273,
37227,
628,
220,
220,
220,
2488,
26745,
628,
220,
220,
220,
825,
4808,
17946,
7,
944,
11,
1312,
9630,
263,
11,
269,
9630,
263,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
5053,
525,
2163,
329,
262,
764,
17946,
1895,
273,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
7,
72,
9630,
263,
11,
7171,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
17946,
62,
25076,
7,
72,
9630,
263,
11,
269,
9630,
263,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
318,
39098,
7,
72,
9630,
263,
11,
15690,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
17946,
62,
18747,
7,
72,
9630,
263,
11,
269,
9630,
263,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
869,
540,
7,
72,
9630,
263,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
17946,
7,
72,
9630,
263,
7,
944,
13,
26801,
828,
269,
9630,
263,
8,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
26801,
13,
4002,
62,
7146,
3279,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
9630,
263,
796,
2116,
13557,
25991,
62,
47172,
62,
2435,
62,
8841,
7,
72,
9630,
263,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
7,
72,
9630,
263,
11,
16416,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
17946,
62,
48369,
7,
72,
9630,
263,
11,
269,
9630,
263,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
318,
39098,
7,
72,
9630,
263,
11,
357,
4868,
11,
45941,
13,
358,
18747,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
17946,
62,
4868,
7,
72,
9630,
263,
11,
269,
9630,
263,
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,
1303,
5002,
815,
5298,
7383,
12331,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
17946,
62,
30854,
7,
72,
9630,
263,
11,
269,
9630,
263,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
7,
72,
9630,
263,
11,
357,
4868,
11,
45941,
13,
358,
18747,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
11524,
3975,
62,
79,
1078,
653,
284,
1123,
43869,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2482,
287,
14184,
3474,
11013,
45,
15274,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
31456,
796,
366,
34,
34574,
6376,
351,
1351,
1028,
6439,
7297,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
7383,
12331,
7,
19662,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
407,
318,
39098,
7,
72,
9630,
263,
11,
16416,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
9630,
263,
796,
16416,
7,
72,
9630,
263,
11,
1312,
9630,
263,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13634,
796,
2116,
13557,
15883,
62,
28961,
7,
72,
9630,
263,
11,
269,
9630,
263,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
26801,
13,
8899,
62,
3911,
1756,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5050,
13,
28311,
62,
17946,
11,
1312,
9630,
263,
11,
269,
9630,
263,
11,
13634,
28,
28961,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
825,
4808,
25991,
62,
47172,
62,
2435,
62,
8841,
7,
944,
11,
1312,
9630,
263,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
38240,
6376,
12,
9630,
263,
329,
13027,
640,
4731,
49289,
198,
220,
220,
220,
220,
220,
220,
220,
611,
26181,
13,
9630,
318,
16092,
8079,
15732,
1220,
18581,
15732,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
87,
796,
13634,
62,
13159,
28920,
7,
944,
13,
26801,
13557,
28961,
13,
9630,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
9630,
263,
796,
4808,
25991,
62,
47172,
62,
2435,
62,
8841,
7,
312,
87,
11,
1312,
9630,
263,
11,
1611,
2625,
17946,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
1312,
9630,
263,
628,
198,
4299,
4808,
3911,
653,
62,
1659,
62,
9630,
62,
8367,
7,
7146,
3279,
11,
1188,
2599,
198,
220,
220,
220,
37227,
818,
543,
18398,
857,
428,
1988,
6486,
30,
628,
220,
220,
220,
13163,
4808,
3911,
653,
62,
1659,
62,
9630,
62,
8367,
26933,
15,
11,
642,
11,
838,
4357,
513,
8,
198,
220,
220,
220,
657,
198,
220,
220,
220,
13163,
4808,
3911,
653,
62,
1659,
62,
9630,
62,
8367,
26933,
15,
11,
642,
11,
838,
4357,
807,
8,
198,
220,
220,
220,
352,
198,
220,
220,
220,
13163,
4808,
3911,
653,
62,
1659,
62,
9630,
62,
8367,
26933,
15,
11,
642,
11,
838,
4357,
1802,
8,
198,
220,
220,
220,
352,
198,
220,
220,
220,
13163,
4808,
3911,
653,
62,
1659,
62,
9630,
62,
8367,
26933,
15,
11,
642,
11,
838,
4357,
642,
8,
220,
1303,
1364,
12,
259,
5731,
17397,
198,
220,
220,
220,
352,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
17397,
58,
15,
60,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
796,
366,
6090,
407,
779,
1179,
319,
6060,
19778,
1231,
1900,
17397,
1,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
19662,
8,
198,
220,
220,
220,
1188,
796,
4808,
1073,
263,
344,
62,
17946,
62,
9630,
7,
7146,
3279,
11,
1188,
8,
198,
220,
220,
220,
1312,
796,
47457,
478,
13,
41907,
478,
62,
3506,
7,
7146,
3279,
11,
1188,
8,
198,
220,
220,
220,
1441,
949,
7,
11925,
7,
7146,
3279,
8,
532,
362,
11,
3509,
7,
15,
11,
1312,
532,
352,
4008,
628,
198,
4299,
4808,
3911,
1756,
62,
1659,
62,
9630,
62,
27160,
7,
7146,
3279,
11,
3815,
2599,
198,
220,
220,
220,
37227,
13615,
4277,
11600,
286,
7297,
290,
3815,
14729,
198,
220,
220,
220,
5501,
1994,
24866,
284,
262,
7297,
543,
3815,
389,
6376,
3815,
5594,
198,
220,
220,
220,
284,
262,
7297,
13,
628,
220,
220,
220,
13163,
23243,
28264,
3911,
1756,
62,
1659,
62,
9630,
62,
27160,
26933,
15,
11,
642,
11,
838,
4357,
685,
18,
35944,
23814,
28955,
198,
220,
220,
220,
47527,
15,
11,
685,
18,
12962,
60,
198,
220,
220,
220,
13163,
23243,
28264,
3911,
1756,
62,
1659,
62,
9630,
62,
27160,
26933,
15,
11,
642,
11,
838,
4357,
685,
18,
11,
807,
11,
642,
35944,
23814,
28955,
198,
220,
220,
220,
47527,
15,
11,
685,
18,
46570,
357,
16,
11,
685,
23,
11,
642,
12962,
60,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
17397,
58,
15,
60,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
796,
366,
6090,
407,
779,
1179,
319,
6060,
19778,
1231,
1900,
17397,
1,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
19662,
8,
628,
220,
220,
220,
2482,
796,
4277,
11600,
7,
4868,
8,
198,
220,
220,
220,
3815,
796,
279,
67,
13,
15732,
7,
27160,
11,
288,
4906,
28,
15252,
8,
198,
220,
220,
220,
329,
1188,
287,
3815,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
796,
47457,
478,
13,
41907,
478,
62,
3506,
7,
7146,
3279,
11,
1188,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2659,
796,
949,
7,
11925,
7,
7146,
3279,
8,
532,
362,
11,
3509,
7,
15,
11,
1312,
532,
352,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2482,
58,
7146,
4083,
33295,
7,
2100,
8,
198,
220,
220,
220,
1441,
2482,
628,
198,
4299,
4808,
1073,
263,
344,
62,
17946,
62,
9630,
7,
7146,
3279,
11,
267,
2599,
198,
220,
220,
220,
37227,
41762,
3815,
284,
307,
13975,
1028,
17397,
628,
220,
220,
220,
770,
318,
3573,
8119,
284,
779,
351,
19798,
292,
4818,
46874,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
17397,
290,
318,
39098,
7,
7146,
3279,
58,
15,
4357,
4818,
8079,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
279,
67,
13,
14967,
27823,
7,
78,
8,
198,
220,
220,
220,
611,
17397,
290,
318,
39098,
7,
7146,
3279,
58,
15,
4357,
45941,
13,
19608,
8079,
2414,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
45941,
13,
19608,
8079,
2414,
7,
78,
737,
459,
2981,
7,
7146,
3279,
58,
15,
4083,
67,
4906,
8,
198,
220,
220,
220,
1441,
267,
628,
198,
4299,
4808,
25991,
62,
47172,
62,
2435,
62,
8841,
7,
9630,
11,
6376,
263,
11,
1611,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
38240,
6376,
263,
329,
13027,
4731,
6356,
198,
220,
220,
220,
611,
1366,
468,
16092,
8079,
15732,
14,
5990,
2101,
15732,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
466,
407,
1208,
49427,
13,
15732,
198,
220,
220,
220,
6818,
318,
62,
9630,
62,
2339,
7,
9630,
8,
628,
220,
220,
220,
611,
407,
318,
39098,
7,
9630,
11,
357,
30094,
13,
27354,
8079,
15732,
11,
279,
67,
13,
5990,
2101,
15732,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
6376,
263,
628,
220,
220,
220,
611,
318,
39098,
7,
9630,
263,
11,
16416,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
7,
9630,
263,
13,
9688,
11,
965,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
796,
6376,
13557,
25991,
62,
2701,
62,
48369,
62,
7784,
7,
9630,
263,
13,
9688,
11,
366,
9464,
1600,
1611,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
923,
796,
6376,
263,
13,
9688,
628,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
7,
9630,
263,
13,
11338,
11,
965,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2245,
796,
6376,
13557,
25991,
62,
2701,
62,
48369,
62,
7784,
7,
9630,
263,
13,
11338,
11,
366,
3506,
1600,
1611,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2245,
796,
6376,
263,
13,
11338,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
16416,
7,
9688,
11,
2245,
8,
628,
220,
220,
220,
1288,
361,
318,
39098,
7,
9630,
263,
11,
965,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
923,
796,
6376,
13557,
25991,
62,
2701,
62,
48369,
62,
7784,
7,
9630,
263,
11,
366,
9464,
1600,
366,
17946,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
2245,
796,
6376,
13557,
25991,
62,
2701,
62,
48369,
62,
7784,
7,
9630,
263,
11,
366,
3506,
1600,
366,
17946,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
16416,
7,
1084,
7,
9688,
11,
2245,
828,
3509,
7,
9688,
11,
2245,
4008,
628,
220,
220,
220,
1441,
6376,
263,
198
] | 2.380058 | 2,076 |
import numpy as np
import chainer
import chainer.functions as F
import chainer.links as L
| [
11748,
299,
32152,
355,
45941,
198,
11748,
6333,
263,
198,
11748,
6333,
263,
13,
12543,
2733,
355,
376,
198,
11748,
6333,
263,
13,
28751,
355,
406,
628,
628,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220
] | 2.547619 | 42 |
from packaging.version import Version
__credits__ = ["very1fake"]
__license__ = "MIT/Apache-2.0"
__version__ = "1.0.6"
__maintainer__ = "very1fake"
version = Version(__version__)
| [
6738,
16846,
13,
9641,
1330,
10628,
198,
198,
834,
66,
20696,
834,
796,
14631,
548,
16,
30706,
8973,
198,
198,
834,
43085,
834,
796,
366,
36393,
14,
25189,
4891,
12,
17,
13,
15,
1,
198,
834,
9641,
834,
796,
366,
16,
13,
15,
13,
21,
1,
198,
834,
76,
2913,
10613,
834,
796,
366,
548,
16,
30706,
1,
198,
198,
9641,
796,
10628,
7,
834,
9641,
834,
8,
198
] | 2.637681 | 69 |
# Returns k number of words sorted on their occurrence
if __name__ == '__main__':
inpt = input('Enter space seperated words: ').split()
k = int(
input(
'Enter the amount of words to retreive based on their occurance: ')
)
print(top_k_frequent_words(inpt, k))
| [
2,
16409,
479,
1271,
286,
2456,
23243,
319,
511,
19810,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
287,
457,
796,
5128,
10786,
17469,
2272,
384,
525,
515,
2456,
25,
705,
737,
35312,
3419,
198,
220,
220,
220,
479,
796,
493,
7,
198,
220,
220,
220,
220,
220,
220,
220,
5128,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
17469,
262,
2033,
286,
2456,
284,
1005,
260,
425,
1912,
319,
511,
3051,
590,
25,
705,
8,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
3601,
7,
4852,
62,
74,
62,
69,
46018,
62,
10879,
7,
259,
457,
11,
479,
4008,
198
] | 2.560345 | 116 |
# Generated by Django 3.2.5 on 2021-09-03 12:56
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
20,
319,
33448,
12,
2931,
12,
3070,
1105,
25,
3980,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from crypto_address_validator.validators import default_validator
from crypto_address_validator.validators import atom_validator
from crypto_address_validator.validators import bnb_validator
from crypto_address_validator.validators import aion_validator
from crypto_address_validator.validators import eos_validator
from crypto_address_validator.validators import iost_validator
from crypto_address_validator.validators import miota_validator
validators = {
'btc': default_validator,
'atom': atom_validator,
'bnb': bnb_validator,
'aion': aion_validator,
'eos': eos_validator,
'iost': iost_validator,
'miota': miota_validator
}
def validate(symbol: str, address: str) -> bool:
"""Validates the address of the passed symbol.
Args:
symbol (str): Currency symbol, e.g. 'btc' or 'atom'.
address (str): Currency address to validate.
Returns:
bool: Result of address validation.
"""
try:
validator = validators[symbol]
except (TypeError, KeyError):
print(f'"{symbol}" currency is not supported.')
return False
if not isinstance(address, str):
return False
# passes the address to the appropriate validator
return validator.is_valid_address(address)
| [
6738,
21473,
62,
21975,
62,
12102,
1352,
13,
12102,
2024,
1330,
4277,
62,
12102,
1352,
198,
6738,
21473,
62,
21975,
62,
12102,
1352,
13,
12102,
2024,
1330,
22037,
62,
12102,
1352,
198,
6738,
21473,
62,
21975,
62,
12102,
1352,
13,
12102,
2024,
1330,
275,
46803,
62,
12102,
1352,
198,
6738,
21473,
62,
21975,
62,
12102,
1352,
13,
12102,
2024,
1330,
257,
295,
62,
12102,
1352,
198,
6738,
21473,
62,
21975,
62,
12102,
1352,
13,
12102,
2024,
1330,
304,
418,
62,
12102,
1352,
198,
6738,
21473,
62,
21975,
62,
12102,
1352,
13,
12102,
2024,
1330,
1312,
455,
62,
12102,
1352,
198,
6738,
21473,
62,
21975,
62,
12102,
1352,
13,
12102,
2024,
1330,
21504,
4265,
62,
12102,
1352,
628,
198,
12102,
2024,
796,
1391,
198,
220,
220,
220,
705,
18347,
66,
10354,
4277,
62,
12102,
1352,
11,
198,
220,
220,
220,
705,
37696,
10354,
22037,
62,
12102,
1352,
11,
198,
220,
220,
220,
705,
31971,
10354,
275,
46803,
62,
12102,
1352,
11,
198,
220,
220,
220,
705,
64,
295,
10354,
257,
295,
62,
12102,
1352,
11,
198,
220,
220,
220,
705,
68,
418,
10354,
304,
418,
62,
12102,
1352,
11,
198,
220,
220,
220,
705,
72,
455,
10354,
1312,
455,
62,
12102,
1352,
11,
198,
220,
220,
220,
705,
11632,
4265,
10354,
21504,
4265,
62,
12102,
1352,
198,
92,
628,
198,
4299,
26571,
7,
1837,
23650,
25,
965,
11,
2209,
25,
965,
8,
4613,
20512,
25,
198,
220,
220,
220,
37227,
7762,
37051,
262,
2209,
286,
262,
3804,
6194,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6194,
357,
2536,
2599,
20113,
6194,
11,
304,
13,
70,
13,
705,
18347,
66,
6,
393,
705,
37696,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
2209,
357,
2536,
2599,
20113,
2209,
284,
26571,
13,
628,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
20512,
25,
25414,
286,
2209,
21201,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
4938,
1352,
796,
4938,
2024,
58,
1837,
23650,
60,
198,
220,
220,
220,
2845,
357,
6030,
12331,
11,
7383,
12331,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
69,
29653,
90,
1837,
23650,
36786,
7395,
318,
407,
4855,
2637,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
611,
407,
318,
39098,
7,
21975,
11,
965,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
1303,
8318,
262,
2209,
284,
262,
5035,
4938,
1352,
198,
220,
220,
220,
1441,
4938,
1352,
13,
271,
62,
12102,
62,
21975,
7,
21975,
8,
198
] | 2.853933 | 445 |
"""Based on which facebook groups have shared the fake news
published by specific domain names,
this script will generate a bipartite graph
with the facebook groups and the domain names"""
import pandas as pd
import numpy as np
import matplotlib as mpl
import networkx as nx
from networkx.algorithms import bipartite
import ural
import os
import sys
def clean_data(CLEAN_DATA_DIRECTORY, SCIENTIFIC_TOPIC, DATE):
"""Import and prepare the dataframe to be used to build the graphs"""
posts_path = os.path.join(".", CLEAN_DATA_DIRECTORY,
"fake_posts_" + SCIENTIFIC_TOPIC + "_" + DATE + ".csv")
posts_df = pd.read_csv(posts_path)
if DATE == "28_04_2020":
# Remove the url with parameters from the analysis because CT return wrong results for them:
posts_df['parameter_in_url'] = posts_df['url'].apply(lambda x: '?' in x)
posts_df = posts_df[posts_df['parameter_in_url']==False]
posts_df = posts_df[posts_df["platform"] == "Facebook"]
posts_df = posts_df.dropna(subset=['account_id', 'url'])
posts_df['account_id'] = posts_df['account_id'].apply(lambda x:int(x))
# Sometimes a same facebook group can share multiple times the same URL,
# creating multiple lines in the input CSV. We remove the duplicates here:
posts_df = posts_df[['url', 'account_name', 'account_id',
'account_subscriber_count', 'actual_like_count']]
posts_df = posts_df.drop_duplicates(subset=['url', 'account_id'], keep='last')
posts_df['domain_name'] = posts_df['url'].apply(lambda x: ural.get_domain_name(x))
if DATE == "28_04_2020":
# Remove the platforms from the analysis:
platforms = ["facebook.com", "youtube.com", "twitter.com", "wordpress.com", "instagram.com"]
posts_df = posts_df[~posts_df['domain_name'].isin(platforms)]
# We remove the facebook groups that have shared only one fake URL:
vc = posts_df['account_id'].value_counts()
posts_df = posts_df[posts_df['account_id'].isin(vc[vc > 1].index)]
# We prepare a dataframe to import the facebook group nodes with specific attributes:
# - the number of followers
# - the account name -> label
# - the fake news URL shared by this group -> node size
fb_group_df = posts_df[['account_id', 'account_name', 'account_subscriber_count']]\
.sort_values(by="account_subscriber_count", ascending=True)\
.drop_duplicates(subset = ['account_id'], keep='last')
temp = posts_df.groupby('account_id')['url'].apply(list)\
.to_frame().reset_index()
fb_group_df = fb_group_df.merge(temp, left_on='account_id', right_on='account_id', how='left')
fb_group_df['nb_fake_news_shared'] = fb_group_df['url'].apply(lambda x:len(x))
# We prepare a dataframe to import the facebook group nodes with specific attributes:
# - the fake news URL shared by this domain -> node size
domain_df = posts_df[['url', 'domain_name']].drop_duplicates()\
.groupby('domain_name')['url'].apply(list)\
.to_frame().reset_index()
domain_df['nb_fake_news_shared'] = domain_df['url'].apply(lambda x:len(x))
return posts_df, fb_group_df, domain_df
def print_statistics(fb_group_df, domain_df):
"""We print a few interesting statistics"""
print()
print("The top 10 of facebook groups sharing the more fake URLs:\n")
print(fb_group_df[["account_name", "nb_fake_news_shared", "account_subscriber_count"]]\
.sort_values(by='nb_fake_news_shared', ascending=False).head(10).to_string(index=False))
print()
print("The top 10 of domains sharing the more fake URLs:\n")
print(domain_df[["domain_name", "nb_fake_news_shared"]]\
.sort_values(by='nb_fake_news_shared', ascending=False).head(10).to_string(index=False))
print()
def create_graph(posts_df, fb_group_df, domain_df,
GRAPH_DIRECTORY, SCIENTIFIC_TOPIC, DATE):
"""Create the bipartite graph with the facebook groups and the domain names.
The edges represent the fact that this group has shared the URL coming from this domain."""
bipartite_graph = nx.Graph()
for _, row in fb_group_df.iterrows():
bipartite_graph.add_node(int(row['account_id']),
label=row['account_name'],
type="facebook_account_or_page",
nb_fake_news_shared=row['nb_fake_news_shared'],
nb_followers=row['account_subscriber_count'],
)
for _, row in domain_df.iterrows():
bipartite_graph.add_node(row['domain_name'],
type="domain_name",
nb_fake_news_shared=row['nb_fake_news_shared']
)
bipartite_graph.add_edges_from(list(posts_df[['domain_name', 'account_id']]\
.itertuples(index=False, name=None)))
bipartite_graph_path = os.path.join(".", GRAPH_DIRECTORY, SCIENTIFIC_TOPIC + "_" + DATE + ".gexf")
nx.write_gexf(bipartite_graph, bipartite_graph_path, encoding="utf-8")
return bipartite_graph
if __name__ == "__main__":
if len(sys.argv) >= 2:
if sys.argv[1] in ["COVID-19", "health", "climate"]:
SCIENTIFIC_TOPIC = sys.argv[1]
else:
print("Please enter only 'COVID-19', 'health' or 'climate' as argument.")
exit()
else:
SCIENTIFIC_TOPIC = "COVID-19"
print("The topic 'COVID-19' has been chosen by default.")
if len(sys.argv) >= 3:
DATE = sys.argv[2]
else:
DATE = "02_06_2020"
print("The date '{}' has been chosen by default.".format(DATE))
CLEAN_DATA_DIRECTORY = "clean_data"
GRAPH_DIRECTORY = "graph"
posts_df, fb_group_df, domain_df = clean_data(CLEAN_DATA_DIRECTORY, SCIENTIFIC_TOPIC, DATE)
print_statistics(fb_group_df, domain_df)
bipartite_graph = create_graph(posts_df, fb_group_df, domain_df,
GRAPH_DIRECTORY, SCIENTIFIC_TOPIC, DATE)
print("The '{}_{}.gexf' graph has been saved in the 'graph' folder.".format(SCIENTIFIC_TOPIC, DATE))
| [
37811,
15001,
319,
543,
23960,
2628,
423,
4888,
262,
8390,
1705,
198,
30271,
416,
2176,
7386,
3891,
11,
198,
5661,
4226,
481,
7716,
257,
14141,
433,
578,
4823,
220,
198,
4480,
262,
23960,
2628,
290,
262,
7386,
3891,
37811,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
355,
285,
489,
198,
11748,
3127,
87,
355,
299,
87,
198,
6738,
3127,
87,
13,
282,
7727,
907,
1330,
14141,
433,
578,
198,
11748,
220,
1523,
198,
198,
11748,
28686,
198,
11748,
25064,
628,
198,
4299,
3424,
62,
7890,
7,
29931,
1565,
62,
26947,
62,
17931,
23988,
15513,
11,
6374,
28495,
30643,
62,
35222,
2149,
11,
360,
6158,
2599,
198,
220,
220,
220,
37227,
20939,
290,
8335,
262,
1366,
14535,
284,
307,
973,
284,
1382,
262,
28770,
37811,
628,
220,
220,
220,
6851,
62,
6978,
796,
28686,
13,
6978,
13,
22179,
7203,
33283,
30301,
1565,
62,
26947,
62,
17931,
23988,
15513,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
30706,
62,
24875,
62,
1,
1343,
6374,
28495,
30643,
62,
35222,
2149,
1343,
45434,
1,
1343,
360,
6158,
1343,
27071,
40664,
4943,
198,
220,
220,
220,
6851,
62,
7568,
796,
279,
67,
13,
961,
62,
40664,
7,
24875,
62,
6978,
8,
628,
220,
220,
220,
611,
360,
6158,
6624,
366,
2078,
62,
3023,
62,
42334,
1298,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
17220,
262,
19016,
351,
10007,
422,
262,
3781,
780,
16356,
1441,
2642,
2482,
329,
606,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6851,
62,
7568,
17816,
17143,
2357,
62,
259,
62,
6371,
20520,
796,
6851,
62,
7568,
17816,
6371,
6,
4083,
39014,
7,
50033,
2124,
25,
705,
8348,
287,
2124,
8,
198,
220,
220,
220,
220,
220,
220,
220,
6851,
62,
7568,
796,
6851,
62,
7568,
58,
24875,
62,
7568,
17816,
17143,
2357,
62,
259,
62,
6371,
20520,
855,
25101,
60,
628,
220,
220,
220,
6851,
62,
7568,
796,
6851,
62,
7568,
58,
24875,
62,
7568,
14692,
24254,
8973,
6624,
366,
12025,
8973,
198,
220,
220,
220,
6851,
62,
7568,
796,
6851,
62,
7568,
13,
14781,
2616,
7,
7266,
2617,
28,
17816,
23317,
62,
312,
3256,
705,
6371,
6,
12962,
198,
220,
220,
220,
6851,
62,
7568,
17816,
23317,
62,
312,
20520,
796,
6851,
62,
7568,
17816,
23317,
62,
312,
6,
4083,
39014,
7,
50033,
2124,
25,
600,
7,
87,
4008,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
8975,
257,
976,
23960,
1448,
460,
2648,
3294,
1661,
262,
976,
10289,
11,
220,
198,
220,
220,
220,
1303,
4441,
3294,
3951,
287,
262,
5128,
44189,
13,
775,
4781,
262,
14184,
16856,
994,
25,
198,
220,
220,
220,
6851,
62,
7568,
796,
6851,
62,
7568,
58,
17816,
6371,
3256,
705,
23317,
62,
3672,
3256,
705,
23317,
62,
312,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
23317,
62,
7266,
1416,
24735,
62,
9127,
3256,
705,
50039,
62,
2339,
62,
9127,
6,
11907,
198,
220,
220,
220,
6851,
62,
7568,
796,
6851,
62,
7568,
13,
14781,
62,
646,
489,
16856,
7,
7266,
2617,
28,
17816,
6371,
3256,
705,
23317,
62,
312,
6,
4357,
1394,
11639,
12957,
11537,
628,
220,
220,
220,
6851,
62,
7568,
17816,
27830,
62,
3672,
20520,
796,
6851,
62,
7568,
17816,
6371,
6,
4083,
39014,
7,
50033,
2124,
25,
220,
1523,
13,
1136,
62,
27830,
62,
3672,
7,
87,
4008,
628,
220,
220,
220,
611,
360,
6158,
6624,
366,
2078,
62,
3023,
62,
42334,
1298,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
17220,
262,
9554,
422,
262,
3781,
25,
198,
220,
220,
220,
220,
220,
220,
220,
9554,
796,
14631,
19024,
13,
785,
1600,
366,
11604,
13,
785,
1600,
366,
6956,
13,
785,
1600,
366,
40346,
13,
785,
1600,
366,
8625,
6713,
13,
785,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
6851,
62,
7568,
796,
6851,
62,
7568,
58,
93,
24875,
62,
7568,
17816,
27830,
62,
3672,
6,
4083,
45763,
7,
24254,
82,
15437,
628,
220,
220,
220,
1303,
775,
4781,
262,
23960,
2628,
326,
423,
4888,
691,
530,
8390,
10289,
25,
198,
220,
220,
220,
410,
66,
796,
6851,
62,
7568,
17816,
23317,
62,
312,
6,
4083,
8367,
62,
9127,
82,
3419,
198,
220,
220,
220,
6851,
62,
7568,
796,
6851,
62,
7568,
58,
24875,
62,
7568,
17816,
23317,
62,
312,
6,
4083,
45763,
7,
28435,
58,
28435,
1875,
352,
4083,
9630,
15437,
628,
220,
220,
220,
1303,
775,
8335,
257,
1366,
14535,
284,
1330,
262,
23960,
1448,
13760,
351,
2176,
12608,
25,
198,
220,
220,
220,
1303,
532,
262,
1271,
286,
10569,
198,
220,
220,
220,
1303,
532,
262,
1848,
1438,
4613,
6167,
198,
220,
220,
220,
1303,
532,
262,
8390,
1705,
10289,
4888,
416,
428,
1448,
4613,
10139,
2546,
198,
220,
220,
220,
277,
65,
62,
8094,
62,
7568,
796,
6851,
62,
7568,
58,
17816,
23317,
62,
312,
3256,
705,
23317,
62,
3672,
3256,
705,
23317,
62,
7266,
1416,
24735,
62,
9127,
6,
11907,
59,
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,
764,
30619,
62,
27160,
7,
1525,
2625,
23317,
62,
7266,
1416,
24735,
62,
9127,
1600,
41988,
28,
17821,
19415,
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,
764,
14781,
62,
646,
489,
16856,
7,
7266,
2617,
796,
37250,
23317,
62,
312,
6,
4357,
1394,
11639,
12957,
11537,
628,
220,
220,
220,
20218,
796,
6851,
62,
7568,
13,
8094,
1525,
10786,
23317,
62,
312,
11537,
17816,
6371,
6,
4083,
39014,
7,
4868,
19415,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
1462,
62,
14535,
22446,
42503,
62,
9630,
3419,
198,
220,
220,
220,
277,
65,
62,
8094,
62,
7568,
796,
277,
65,
62,
8094,
62,
7568,
13,
647,
469,
7,
29510,
11,
1364,
62,
261,
11639,
23317,
62,
312,
3256,
826,
62,
261,
11639,
23317,
62,
312,
3256,
703,
11639,
9464,
11537,
198,
220,
220,
220,
277,
65,
62,
8094,
62,
7568,
17816,
46803,
62,
30706,
62,
10827,
62,
28710,
20520,
796,
277,
65,
62,
8094,
62,
7568,
17816,
6371,
6,
4083,
39014,
7,
50033,
2124,
25,
11925,
7,
87,
4008,
628,
220,
220,
220,
1303,
775,
8335,
257,
1366,
14535,
284,
1330,
262,
23960,
1448,
13760,
351,
2176,
12608,
25,
198,
220,
220,
220,
1303,
532,
262,
8390,
1705,
10289,
4888,
416,
428,
7386,
4613,
10139,
2546,
198,
220,
220,
220,
7386,
62,
7568,
796,
6851,
62,
7568,
58,
17816,
6371,
3256,
705,
27830,
62,
3672,
20520,
4083,
14781,
62,
646,
489,
16856,
3419,
59,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
8094,
1525,
10786,
27830,
62,
3672,
11537,
17816,
6371,
6,
4083,
39014,
7,
4868,
19415,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
1462,
62,
14535,
22446,
42503,
62,
9630,
3419,
198,
220,
220,
220,
7386,
62,
7568,
17816,
46803,
62,
30706,
62,
10827,
62,
28710,
20520,
796,
7386,
62,
7568,
17816,
6371,
6,
4083,
39014,
7,
50033,
2124,
25,
11925,
7,
87,
4008,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1441,
6851,
62,
7568,
11,
277,
65,
62,
8094,
62,
7568,
11,
7386,
62,
7568,
628,
198,
4299,
3601,
62,
14269,
3969,
7,
21855,
62,
8094,
62,
7568,
11,
7386,
62,
7568,
2599,
198,
220,
220,
220,
37227,
1135,
3601,
257,
1178,
3499,
7869,
37811,
628,
220,
220,
220,
3601,
3419,
198,
220,
220,
220,
3601,
7203,
464,
1353,
838,
286,
23960,
2628,
7373,
262,
517,
8390,
32336,
7479,
77,
4943,
198,
220,
220,
220,
3601,
7,
21855,
62,
8094,
62,
7568,
58,
14692,
23317,
62,
3672,
1600,
366,
46803,
62,
30706,
62,
10827,
62,
28710,
1600,
366,
23317,
62,
7266,
1416,
24735,
62,
9127,
8973,
60,
59,
198,
220,
220,
220,
220,
220,
220,
220,
764,
30619,
62,
27160,
7,
1525,
11639,
46803,
62,
30706,
62,
10827,
62,
28710,
3256,
41988,
28,
25101,
737,
2256,
7,
940,
737,
1462,
62,
8841,
7,
9630,
28,
25101,
4008,
628,
220,
220,
220,
3601,
3419,
198,
220,
220,
220,
3601,
7203,
464,
1353,
838,
286,
18209,
7373,
262,
517,
8390,
32336,
7479,
77,
4943,
198,
220,
220,
220,
3601,
7,
27830,
62,
7568,
58,
14692,
27830,
62,
3672,
1600,
366,
46803,
62,
30706,
62,
10827,
62,
28710,
8973,
60,
59,
198,
220,
220,
220,
220,
220,
220,
220,
764,
30619,
62,
27160,
7,
1525,
11639,
46803,
62,
30706,
62,
10827,
62,
28710,
3256,
41988,
28,
25101,
737,
2256,
7,
940,
737,
1462,
62,
8841,
7,
9630,
28,
25101,
4008,
628,
220,
220,
220,
3601,
3419,
628,
198,
4299,
2251,
62,
34960,
7,
24875,
62,
7568,
11,
277,
65,
62,
8094,
62,
7568,
11,
7386,
62,
7568,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10863,
31300,
62,
17931,
23988,
15513,
11,
6374,
28495,
30643,
62,
35222,
2149,
11,
360,
6158,
2599,
198,
220,
220,
220,
37227,
16447,
262,
14141,
433,
578,
4823,
351,
262,
23960,
2628,
290,
262,
7386,
3891,
13,
198,
220,
220,
220,
383,
13015,
2380,
262,
1109,
326,
428,
1448,
468,
4888,
262,
10289,
2406,
422,
428,
7386,
526,
15931,
628,
220,
220,
220,
14141,
433,
578,
62,
34960,
796,
299,
87,
13,
37065,
3419,
628,
220,
220,
220,
329,
4808,
11,
5752,
287,
277,
65,
62,
8094,
62,
7568,
13,
2676,
8516,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
14141,
433,
578,
62,
34960,
13,
2860,
62,
17440,
7,
600,
7,
808,
17816,
23317,
62,
312,
20520,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6167,
28,
808,
17816,
23317,
62,
3672,
6,
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,
2099,
2625,
19024,
62,
23317,
62,
273,
62,
7700,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
65,
62,
30706,
62,
10827,
62,
28710,
28,
808,
17816,
46803,
62,
30706,
62,
10827,
62,
28710,
6,
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,
299,
65,
62,
27780,
364,
28,
808,
17816,
23317,
62,
7266,
1416,
24735,
62,
9127,
6,
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,
1267,
628,
220,
220,
220,
329,
4808,
11,
5752,
287,
7386,
62,
7568,
13,
2676,
8516,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
14141,
433,
578,
62,
34960,
13,
2860,
62,
17440,
7,
808,
17816,
27830,
62,
3672,
6,
4357,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
2625,
27830,
62,
3672,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
65,
62,
30706,
62,
10827,
62,
28710,
28,
808,
17816,
46803,
62,
30706,
62,
10827,
62,
28710,
20520,
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,
1267,
198,
220,
220,
220,
220,
198,
220,
220,
220,
14141,
433,
578,
62,
34960,
13,
2860,
62,
276,
3212,
62,
6738,
7,
4868,
7,
24875,
62,
7568,
58,
17816,
27830,
62,
3672,
3256,
705,
23317,
62,
312,
6,
11907,
59,
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,
764,
270,
861,
84,
2374,
7,
9630,
28,
25101,
11,
1438,
28,
14202,
22305,
628,
220,
220,
220,
14141,
433,
578,
62,
34960,
62,
6978,
796,
28686,
13,
6978,
13,
22179,
7203,
33283,
10863,
31300,
62,
17931,
23988,
15513,
11,
6374,
28495,
30643,
62,
35222,
2149,
1343,
45434,
1,
1343,
360,
6158,
1343,
27071,
25636,
69,
4943,
198,
220,
220,
220,
299,
87,
13,
13564,
62,
25636,
69,
7,
65,
541,
433,
578,
62,
34960,
11,
14141,
433,
578,
62,
34960,
62,
6978,
11,
21004,
2625,
40477,
12,
23,
4943,
628,
220,
220,
220,
1441,
14141,
433,
578,
62,
34960,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
628,
220,
220,
220,
611,
18896,
7,
17597,
13,
853,
85,
8,
18189,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
25064,
13,
853,
85,
58,
16,
60,
287,
14631,
8220,
11008,
12,
1129,
1600,
366,
13948,
1600,
366,
42570,
1,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6374,
28495,
30643,
62,
35222,
2149,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
5492,
3802,
691,
705,
8220,
11008,
12,
1129,
3256,
705,
13948,
6,
393,
705,
42570,
6,
355,
4578,
19570,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8420,
3419,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6374,
28495,
30643,
62,
35222,
2149,
796,
366,
8220,
11008,
12,
1129,
1,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
464,
7243,
705,
8220,
11008,
12,
1129,
6,
468,
587,
7147,
416,
4277,
19570,
628,
220,
220,
220,
611,
18896,
7,
17597,
13,
853,
85,
8,
18189,
513,
25,
198,
220,
220,
220,
220,
220,
220,
220,
360,
6158,
796,
25064,
13,
853,
85,
58,
17,
60,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
360,
6158,
796,
366,
2999,
62,
3312,
62,
42334,
1,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
464,
3128,
705,
90,
92,
6,
468,
587,
7147,
416,
4277,
526,
13,
18982,
7,
35,
6158,
4008,
628,
220,
220,
220,
30301,
1565,
62,
26947,
62,
17931,
23988,
15513,
796,
366,
27773,
62,
7890,
1,
198,
220,
220,
220,
10863,
31300,
62,
17931,
23988,
15513,
796,
366,
34960,
1,
628,
220,
220,
220,
6851,
62,
7568,
11,
277,
65,
62,
8094,
62,
7568,
11,
7386,
62,
7568,
796,
3424,
62,
7890,
7,
29931,
1565,
62,
26947,
62,
17931,
23988,
15513,
11,
6374,
28495,
30643,
62,
35222,
2149,
11,
360,
6158,
8,
628,
220,
220,
220,
3601,
62,
14269,
3969,
7,
21855,
62,
8094,
62,
7568,
11,
7386,
62,
7568,
8,
628,
220,
220,
220,
14141,
433,
578,
62,
34960,
796,
2251,
62,
34960,
7,
24875,
62,
7568,
11,
277,
65,
62,
8094,
62,
7568,
11,
7386,
62,
7568,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10863,
31300,
62,
17931,
23988,
15513,
11,
6374,
28495,
30643,
62,
35222,
2149,
11,
360,
6158,
8,
198,
220,
220,
220,
3601,
7203,
464,
705,
90,
92,
23330,
27422,
25636,
69,
6,
4823,
468,
587,
7448,
287,
262,
705,
34960,
6,
9483,
526,
13,
18982,
7,
6173,
28495,
30643,
62,
35222,
2149,
11,
360,
6158,
4008,
198
] | 2.312088 | 2,730 |
# -*- coding: utf-8 -*- #
# Copyright 2017 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A utility library to support interaction with the Tool Results service."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import collections
import time
from googlecloudsdk.api_lib.firebase.test import exceptions
from googlecloudsdk.api_lib.util import apis
from googlecloudsdk.core import properties
from googlecloudsdk.core.console import progress_tracker
from six.moves.urllib import parse
import uritemplate
_STATUS_INTERVAL_SECS = 3
class ToolResultsIds(
collections.namedtuple('ToolResultsIds', ['history_id', 'execution_id'])):
"""A tuple to hold the history & execution IDs returned from Tool Results.
Fields:
history_id: a string with the Tool Results history ID to publish to.
execution_id: a string with the ID of the Tool Results execution.
"""
def CreateToolResultsUiUrl(project_id, tool_results_ids):
"""Create the URL for a test's Tool Results UI in the Firebase App Manager.
Args:
project_id: string containing the user's GCE project ID.
tool_results_ids: a ToolResultsIds object holding history & execution IDs.
Returns:
A url to the Tool Results UI.
"""
url_base = properties.VALUES.test.results_base_url.Get()
if not url_base:
url_base = 'https://console.firebase.google.com'
url_end = uritemplate.expand(
'project/{project}/testlab/histories/{history}/matrices/{execution}', {
'project': project_id,
'history': tool_results_ids.history_id,
'execution': tool_results_ids.execution_id
})
return parse.urljoin(url_base, url_end)
def GetToolResultsIds(matrix,
matrix_monitor,
status_interval=_STATUS_INTERVAL_SECS):
"""Gets the Tool Results history ID and execution ID for a test matrix.
Sometimes the IDs are available immediately after a test matrix is created.
If not, we keep checking the matrix until the Testing and Tool Results
services have had enough time to create/assign the IDs, giving the user
continuous feedback using gcloud core's ProgressTracker class.
Args:
matrix: a TestMatrix which was just created by the Testing service.
matrix_monitor: a MatrixMonitor object.
status_interval: float, number of seconds to sleep between status checks.
Returns:
A ToolResultsIds tuple containing the history ID and execution ID, which
are shared by all TestExecutions in the TestMatrix.
Raises:
BadMatrixError: if the matrix finishes without both ToolResults IDs.
"""
history_id = None
execution_id = None
msg = 'Creating individual test executions'
with progress_tracker.ProgressTracker(msg, autotick=True):
while True:
if matrix.resultStorage.toolResultsExecution:
history_id = matrix.resultStorage.toolResultsExecution.historyId
execution_id = matrix.resultStorage.toolResultsExecution.executionId
if history_id and execution_id:
break
if matrix.state in matrix_monitor.completed_matrix_states:
raise exceptions.BadMatrixError(_ErrorFromInvalidMatrix(matrix))
time.sleep(status_interval)
matrix = matrix_monitor.GetTestMatrixStatus()
return ToolResultsIds(history_id=history_id, execution_id=execution_id)
def _ErrorFromInvalidMatrix(matrix):
"""Produces a human-readable error message from an invalid matrix."""
messages = apis.GetMessagesModule('testing', 'v1')
enum_values = messages.TestMatrix.InvalidMatrixDetailsValueValuesEnum
error_dict = {
enum_values.MALFORMED_APK:
'The app APK is not a valid Android application',
enum_values.MALFORMED_TEST_APK:
'The test APK is not a valid Android instrumentation test',
enum_values.NO_MANIFEST:
'The app APK is missing the manifest file',
enum_values.NO_PACKAGE_NAME:
'The APK manifest file is missing the package name',
enum_values.TEST_SAME_AS_APP:
'The test APK has the same package name as the app APK',
enum_values.NO_INSTRUMENTATION:
'The test APK declares no instrumentation tags in the manifest',
enum_values.NO_SIGNATURE:
'At least one supplied APK file has a missing or invalid signature',
enum_values.INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE:
("The test runner class specified by the user or the test APK's "
'manifest file is not compatible with Android Test Orchestrator. '
'Please use AndroidJUnitRunner version 1.0 or higher'),
enum_values.NO_TEST_RUNNER_CLASS:
('The test APK does not contain the test runner class specified by '
'the user or the manifest file. The test runner class name may be '
'incorrect, or the class may be mislocated in the app APK.'),
enum_values.NO_LAUNCHER_ACTIVITY:
'The app APK does not specify a main launcher activity',
enum_values.FORBIDDEN_PERMISSIONS:
'The app declares one or more permissions that are not allowed',
enum_values.INVALID_ROBO_DIRECTIVES:
'Cannot have multiple robo-directives with the same resource name',
enum_values.INVALID_DIRECTIVE_ACTION:
'Robo Directive includes at least one invalid action definition.',
enum_values.INVALID_RESOURCE_NAME:
'Robo Directive resource name contains invalid characters: ":" '
' (colon) or " " (space)',
enum_values.TEST_LOOP_INTENT_FILTER_NOT_FOUND:
'The app does not have a correctly formatted game-loop intent filter',
enum_values.SCENARIO_LABEL_NOT_DECLARED:
'A scenario-label was not declared in the manifest file',
enum_values.SCENARIO_LABEL_MALFORMED:
'A scenario-label in the manifest includes invalid numbers or ranges',
enum_values.SCENARIO_NOT_DECLARED:
'A scenario-number was not declared in the manifest file',
enum_values.DEVICE_ADMIN_RECEIVER:
'Device administrator applications are not allowed',
enum_values.MALFORMED_XC_TEST_ZIP:
'The XCTest zip file was malformed. The zip did not contain a single '
'.xctestrun file and the contents of the DerivedData/Build/Products '
'directory.',
enum_values.BUILT_FOR_IOS_SIMULATOR:
'The provided XCTest was built for the iOS simulator rather than for '
'a physical device',
enum_values.NO_TESTS_IN_XC_TEST_ZIP:
'The .xctestrun file did not specify any test targets to run',
enum_values.USE_DESTINATION_ARTIFACTS:
'One or more of the test targets defined in the .xctestrun file '
'specifies "UseDestinationArtifacts", which is not allowed',
enum_values.TEST_NOT_APP_HOSTED:
'One or more of the test targets defined in the .xctestrun file '
'does not have a host binary to run on the physical iOS device, '
'which may cause errors when running xcodebuild',
enum_values.NO_CODE_APK:
'"hasCode" is false in the Manifest. Tested APKs must contain code',
enum_values.INVALID_INPUT_APK:
'Either the provided input APK path was malformed, the APK file does '
'not exist, or the user does not have permission to access the file',
enum_values.INVALID_APK_PREVIEW_SDK:
"Your app targets a preview version of the Android SDK that's "
'incompatible with the selected devices.',
enum_values.PLIST_CANNOT_BE_PARSED:
'One or more of the Info.plist files in the zip could not be parsed',
enum_values.INVALID_PACKAGE_NAME:
'The APK application ID (aka package name) is invalid. See also '
'https://developer.android.com/studio/build/application-id',
enum_values.MALFORMED_IPA:
'The app IPA is not a valid iOS application',
enum_values.MISSING_URL_SCHEME:
'The iOS game loop application does not register the custom URL '
'scheme',
enum_values.MALFORMED_APP_BUNDLE:
'The iOS application bundle (.app) is invalid',
}
details_enum = matrix.invalidMatrixDetails
if details_enum in error_dict:
return ('\nMatrix [{m}] failed during validation: {e}.'.format(
m=matrix.testMatrixId, e=error_dict[details_enum]))
# Use a generic message if the enum is unknown or unspecified/unavailable.
return (
'\nMatrix [{m}] unexpectedly reached final status {s} without returning '
'a URL to any test results in the Firebase console. Please re-check the '
'validity of your test files and parameters and try again.'.format(
m=matrix.testMatrixId, s=matrix.state))
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
1303,
198,
2,
15069,
2177,
3012,
11419,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
37811,
32,
10361,
5888,
284,
1104,
10375,
351,
262,
16984,
15691,
2139,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
17268,
198,
11748,
640,
198,
198,
6738,
23645,
17721,
21282,
74,
13,
15042,
62,
8019,
13,
6495,
8692,
13,
9288,
1330,
13269,
198,
6738,
23645,
17721,
21282,
74,
13,
15042,
62,
8019,
13,
22602,
1330,
2471,
271,
198,
6738,
23645,
17721,
21282,
74,
13,
7295,
1330,
6608,
198,
6738,
23645,
17721,
21282,
74,
13,
7295,
13,
41947,
1330,
4371,
62,
2213,
10735,
198,
198,
6738,
2237,
13,
76,
5241,
13,
333,
297,
571,
1330,
21136,
198,
11748,
2956,
9186,
6816,
198,
198,
62,
35744,
2937,
62,
41358,
23428,
62,
23683,
50,
796,
513,
628,
198,
4871,
16984,
25468,
7390,
82,
7,
198,
220,
220,
220,
17268,
13,
13190,
83,
29291,
10786,
25391,
25468,
7390,
82,
3256,
37250,
23569,
62,
312,
3256,
705,
18558,
1009,
62,
312,
6,
12962,
2599,
198,
220,
37227,
32,
46545,
284,
1745,
262,
2106,
1222,
9706,
32373,
4504,
422,
16984,
15691,
13,
628,
220,
23948,
25,
198,
220,
220,
220,
2106,
62,
312,
25,
257,
4731,
351,
262,
16984,
15691,
2106,
4522,
284,
7715,
284,
13,
198,
220,
220,
220,
9706,
62,
312,
25,
257,
4731,
351,
262,
4522,
286,
262,
16984,
15691,
9706,
13,
198,
220,
37227,
628,
198,
4299,
13610,
25391,
25468,
52,
72,
28165,
7,
16302,
62,
312,
11,
2891,
62,
43420,
62,
2340,
2599,
198,
220,
37227,
16447,
262,
10289,
329,
257,
1332,
338,
16984,
15691,
12454,
287,
262,
3764,
8692,
2034,
9142,
13,
628,
220,
943,
14542,
25,
198,
220,
220,
220,
1628,
62,
312,
25,
4731,
7268,
262,
2836,
338,
402,
5222,
1628,
4522,
13,
198,
220,
220,
220,
2891,
62,
43420,
62,
2340,
25,
257,
16984,
25468,
7390,
82,
2134,
4769,
2106,
1222,
9706,
32373,
13,
628,
220,
16409,
25,
198,
220,
220,
220,
317,
19016,
284,
262,
16984,
15691,
12454,
13,
198,
220,
37227,
198,
220,
19016,
62,
8692,
796,
6608,
13,
23428,
35409,
13,
9288,
13,
43420,
62,
8692,
62,
6371,
13,
3855,
3419,
198,
220,
611,
407,
19016,
62,
8692,
25,
198,
220,
220,
220,
19016,
62,
8692,
796,
705,
5450,
1378,
41947,
13,
6495,
8692,
13,
13297,
13,
785,
6,
628,
220,
19016,
62,
437,
796,
2956,
9186,
6816,
13,
11201,
392,
7,
198,
220,
220,
220,
220,
220,
705,
16302,
14,
90,
16302,
92,
14,
9288,
23912,
14,
10034,
1749,
14,
90,
23569,
92,
14,
6759,
45977,
14,
90,
18558,
1009,
92,
3256,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
16302,
10354,
1628,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
23569,
10354,
2891,
62,
43420,
62,
2340,
13,
23569,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
18558,
1009,
10354,
2891,
62,
43420,
62,
2340,
13,
18558,
1009,
62,
312,
198,
220,
220,
220,
220,
220,
32092,
198,
220,
1441,
21136,
13,
6371,
22179,
7,
6371,
62,
8692,
11,
19016,
62,
437,
8,
628,
198,
4299,
3497,
25391,
25468,
7390,
82,
7,
6759,
8609,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17593,
62,
41143,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3722,
62,
3849,
2100,
28,
62,
35744,
2937,
62,
41358,
23428,
62,
23683,
50,
2599,
198,
220,
37227,
38,
1039,
262,
16984,
15691,
2106,
4522,
290,
9706,
4522,
329,
257,
1332,
17593,
13,
628,
220,
8975,
262,
32373,
389,
1695,
3393,
706,
257,
1332,
17593,
318,
2727,
13,
198,
220,
1002,
407,
11,
356,
1394,
10627,
262,
17593,
1566,
262,
23983,
290,
16984,
15691,
198,
220,
2594,
423,
550,
1576,
640,
284,
2251,
14,
562,
570,
262,
32373,
11,
3501,
262,
2836,
198,
220,
12948,
7538,
1262,
308,
17721,
4755,
338,
18387,
35694,
1398,
13,
628,
220,
943,
14542,
25,
198,
220,
220,
220,
17593,
25,
257,
6208,
46912,
543,
373,
655,
2727,
416,
262,
23983,
2139,
13,
198,
220,
220,
220,
17593,
62,
41143,
25,
257,
24936,
35479,
2134,
13,
198,
220,
220,
220,
3722,
62,
3849,
2100,
25,
12178,
11,
1271,
286,
4201,
284,
3993,
1022,
3722,
8794,
13,
628,
220,
16409,
25,
198,
220,
220,
220,
317,
16984,
25468,
7390,
82,
46545,
7268,
262,
2106,
4522,
290,
9706,
4522,
11,
543,
198,
220,
220,
220,
389,
4888,
416,
477,
6208,
23002,
3508,
287,
262,
6208,
46912,
13,
628,
220,
7567,
2696,
25,
198,
220,
220,
220,
7772,
46912,
12331,
25,
611,
262,
17593,
20271,
1231,
1111,
16984,
25468,
32373,
13,
198,
220,
37227,
198,
220,
2106,
62,
312,
796,
6045,
198,
220,
9706,
62,
312,
796,
6045,
198,
220,
31456,
796,
705,
32071,
1981,
1332,
30632,
6,
198,
220,
351,
4371,
62,
2213,
10735,
13,
32577,
35694,
7,
19662,
11,
1960,
313,
624,
28,
17821,
2599,
198,
220,
220,
220,
981,
6407,
25,
198,
220,
220,
220,
220,
220,
611,
17593,
13,
20274,
31425,
13,
25981,
25468,
23002,
1009,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2106,
62,
312,
796,
17593,
13,
20274,
31425,
13,
25981,
25468,
23002,
1009,
13,
23569,
7390,
198,
220,
220,
220,
220,
220,
220,
220,
9706,
62,
312,
796,
17593,
13,
20274,
31425,
13,
25981,
25468,
23002,
1009,
13,
18558,
1009,
7390,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2106,
62,
312,
290,
9706,
62,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
628,
220,
220,
220,
220,
220,
611,
17593,
13,
5219,
287,
17593,
62,
41143,
13,
785,
16838,
62,
6759,
8609,
62,
27219,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
13269,
13,
22069,
46912,
12331,
28264,
12331,
4863,
44651,
46912,
7,
6759,
8609,
4008,
628,
220,
220,
220,
220,
220,
640,
13,
42832,
7,
13376,
62,
3849,
2100,
8,
198,
220,
220,
220,
220,
220,
17593,
796,
17593,
62,
41143,
13,
3855,
14402,
46912,
19580,
3419,
628,
220,
1441,
16984,
25468,
7390,
82,
7,
23569,
62,
312,
28,
23569,
62,
312,
11,
9706,
62,
312,
28,
18558,
1009,
62,
312,
8,
628,
198,
4299,
4808,
12331,
4863,
44651,
46912,
7,
6759,
8609,
2599,
198,
220,
37227,
11547,
728,
257,
1692,
12,
46155,
4049,
3275,
422,
281,
12515,
17593,
526,
15931,
198,
220,
6218,
796,
2471,
271,
13,
3855,
36479,
1095,
26796,
10786,
33407,
3256,
705,
85,
16,
11537,
198,
220,
33829,
62,
27160,
796,
6218,
13,
14402,
46912,
13,
44651,
46912,
24259,
11395,
40161,
4834,
388,
198,
220,
4049,
62,
11600,
796,
1391,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
42126,
21389,
1961,
62,
2969,
42,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
598,
3486,
42,
318,
407,
257,
4938,
5565,
3586,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
42126,
21389,
1961,
62,
51,
6465,
62,
2969,
42,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
1332,
3486,
42,
318,
407,
257,
4938,
5565,
8875,
341,
1332,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
15285,
62,
10725,
5064,
6465,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
598,
3486,
42,
318,
4814,
262,
10561,
2393,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
15285,
62,
47,
8120,
11879,
62,
20608,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
3486,
42,
10561,
2393,
318,
4814,
262,
5301,
1438,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
51,
6465,
62,
50,
10067,
62,
1921,
62,
24805,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
1332,
3486,
42,
468,
262,
976,
5301,
1438,
355,
262,
598,
3486,
42,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
15285,
62,
1268,
18601,
5883,
3525,
6234,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
1332,
3486,
42,
24183,
645,
8875,
341,
15940,
287,
262,
10561,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
15285,
62,
46224,
40086,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
2953,
1551,
530,
14275,
3486,
42,
2393,
468,
257,
4814,
393,
12515,
9877,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
1268,
18601,
5883,
3525,
6234,
62,
1581,
3398,
1546,
5446,
25633,
62,
1268,
9858,
47,
1404,
34563,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5855,
464,
1332,
17490,
1398,
7368,
416,
262,
2836,
393,
262,
1332,
3486,
42,
338,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
805,
8409,
2393,
318,
407,
11670,
351,
5565,
6208,
30369,
2536,
1352,
13,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
5492,
779,
5565,
41,
26453,
49493,
2196,
352,
13,
15,
393,
2440,
33809,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
15285,
62,
51,
6465,
62,
49,
4944,
21479,
62,
31631,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19203,
464,
1332,
3486,
42,
857,
407,
3994,
262,
1332,
17490,
1398,
7368,
416,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
1169,
2836,
393,
262,
10561,
2393,
13,
383,
1332,
17490,
1398,
1438,
743,
307,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
1939,
47315,
11,
393,
262,
1398,
743,
307,
2984,
75,
10533,
287,
262,
598,
3486,
42,
2637,
828,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
15285,
62,
13534,
47461,
1137,
62,
10659,
3824,
9050,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
598,
3486,
42,
857,
407,
11986,
257,
1388,
24008,
3842,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
13775,
33,
2389,
41819,
62,
18973,
44,
16744,
11053,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
598,
24183,
530,
393,
517,
21627,
326,
389,
407,
3142,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
1268,
23428,
2389,
62,
13252,
8202,
62,
17931,
23988,
42472,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
34,
34574,
423,
3294,
686,
2127,
12,
12942,
1083,
351,
262,
976,
8271,
1438,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
1268,
23428,
2389,
62,
17931,
23988,
9306,
62,
44710,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
14350,
78,
34736,
3407,
379,
1551,
530,
12515,
2223,
6770,
2637,
11,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
1268,
23428,
2389,
62,
19535,
31033,
62,
20608,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
14350,
78,
34736,
8271,
1438,
4909,
12515,
3435,
25,
366,
11097,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
357,
4033,
261,
8,
393,
366,
366,
357,
13200,
8,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
51,
6465,
62,
21982,
3185,
62,
12394,
3525,
62,
46700,
5781,
62,
11929,
62,
37,
15919,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
598,
857,
407,
423,
257,
9380,
39559,
983,
12,
26268,
6824,
8106,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
6173,
1677,
1503,
9399,
62,
48780,
3698,
62,
11929,
62,
41374,
43,
1503,
1961,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
32,
8883,
12,
18242,
373,
407,
6875,
287,
262,
10561,
2393,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
6173,
1677,
1503,
9399,
62,
48780,
3698,
62,
42126,
21389,
1961,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
32,
8883,
12,
18242,
287,
262,
10561,
3407,
12515,
3146,
393,
16069,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
6173,
1677,
1503,
9399,
62,
11929,
62,
41374,
43,
1503,
1961,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
32,
8883,
12,
17618,
373,
407,
6875,
287,
262,
10561,
2393,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
7206,
27389,
62,
2885,
23678,
62,
2200,
5222,
38757,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
24728,
18382,
5479,
389,
407,
3142,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
42126,
21389,
1961,
62,
55,
34,
62,
51,
6465,
62,
57,
4061,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
1395,
4177,
395,
19974,
2393,
373,
6428,
12214,
13,
383,
19974,
750,
407,
3994,
257,
2060,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45302,
87,
310,
395,
5143,
2393,
290,
262,
10154,
286,
262,
9626,
1572,
6601,
14,
15580,
14,
48650,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
34945,
2637,
11,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
19499,
4146,
51,
62,
13775,
62,
40,
2640,
62,
48913,
6239,
25633,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
2810,
1395,
4177,
395,
373,
3170,
329,
262,
8969,
35375,
2138,
621,
329,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
64,
3518,
3335,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
15285,
62,
51,
1546,
4694,
62,
1268,
62,
55,
34,
62,
51,
6465,
62,
57,
4061,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
764,
87,
310,
395,
5143,
2393,
750,
407,
11986,
597,
1332,
6670,
284,
1057,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
19108,
62,
35,
6465,
1268,
6234,
62,
7227,
5064,
2246,
4694,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
3198,
393,
517,
286,
262,
1332,
6670,
5447,
287,
262,
764,
87,
310,
395,
5143,
2393,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
16684,
6945,
366,
11041,
24159,
1883,
8001,
37199,
1600,
543,
318,
407,
3142,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
51,
6465,
62,
11929,
62,
24805,
62,
39,
10892,
1961,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
3198,
393,
517,
286,
262,
1332,
6670,
5447,
287,
262,
764,
87,
310,
395,
5143,
2393,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
22437,
407,
423,
257,
2583,
13934,
284,
1057,
319,
262,
3518,
8969,
3335,
11,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
4758,
743,
2728,
8563,
618,
2491,
2124,
8189,
11249,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
15285,
62,
34,
16820,
62,
2969,
42,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
1,
10134,
10669,
1,
318,
3991,
287,
262,
36757,
13,
6208,
276,
3486,
42,
82,
1276,
3994,
2438,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
1268,
23428,
2389,
62,
1268,
30076,
62,
2969,
42,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
32478,
262,
2810,
5128,
3486,
42,
3108,
373,
6428,
12214,
11,
262,
3486,
42,
2393,
857,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
1662,
2152,
11,
393,
262,
2836,
857,
407,
423,
7170,
284,
1895,
262,
2393,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
1268,
23428,
2389,
62,
2969,
42,
62,
46437,
28206,
62,
10305,
42,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7120,
598,
6670,
257,
12714,
2196,
286,
262,
5565,
26144,
326,
338,
366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
259,
38532,
351,
262,
6163,
4410,
2637,
11,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
6489,
8808,
62,
44565,
11929,
62,
12473,
62,
27082,
50,
1961,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
3198,
393,
517,
286,
262,
14151,
13,
489,
396,
3696,
287,
262,
19974,
714,
407,
307,
44267,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
1268,
23428,
2389,
62,
47,
8120,
11879,
62,
20608,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
3486,
42,
3586,
4522,
357,
8130,
5301,
1438,
8,
318,
12515,
13,
4091,
635,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
5450,
1378,
16244,
263,
13,
19411,
13,
785,
14,
19149,
952,
14,
11249,
14,
31438,
12,
312,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
42126,
21389,
1961,
62,
4061,
32,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
598,
27966,
318,
407,
257,
4938,
8969,
3586,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
44,
16744,
2751,
62,
21886,
62,
50,
3398,
3620,
36,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
8969,
983,
9052,
3586,
857,
407,
7881,
262,
2183,
10289,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
15952,
1326,
3256,
198,
220,
220,
220,
220,
220,
33829,
62,
27160,
13,
42126,
21389,
1961,
62,
24805,
62,
33,
4944,
35,
2538,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
464,
8969,
3586,
18537,
20262,
1324,
8,
318,
12515,
3256,
198,
220,
1782,
198,
220,
3307,
62,
44709,
796,
17593,
13,
259,
12102,
46912,
24259,
198,
220,
611,
3307,
62,
44709,
287,
4049,
62,
11600,
25,
198,
220,
220,
220,
1441,
19203,
59,
77,
46912,
685,
90,
76,
92,
60,
4054,
1141,
21201,
25,
1391,
68,
92,
2637,
13,
18982,
7,
198,
220,
220,
220,
220,
220,
220,
220,
285,
28,
6759,
8609,
13,
9288,
46912,
7390,
11,
304,
28,
18224,
62,
11600,
58,
36604,
62,
44709,
60,
4008,
198,
220,
1303,
5765,
257,
14276,
3275,
611,
262,
33829,
318,
6439,
393,
29547,
14,
403,
15182,
13,
198,
220,
1441,
357,
198,
220,
220,
220,
220,
220,
705,
59,
77,
46912,
685,
90,
76,
92,
60,
25884,
4251,
2457,
3722,
1391,
82,
92,
1231,
8024,
705,
198,
220,
220,
220,
220,
220,
705,
64,
10289,
284,
597,
1332,
2482,
287,
262,
3764,
8692,
8624,
13,
4222,
302,
12,
9122,
262,
705,
198,
220,
220,
220,
220,
220,
705,
12102,
414,
286,
534,
1332,
3696,
290,
10007,
290,
1949,
757,
2637,
13,
18982,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
285,
28,
6759,
8609,
13,
9288,
46912,
7390,
11,
264,
28,
6759,
8609,
13,
5219,
4008,
198
] | 2.815277 | 3,286 |
# created by Angus Clark 9/2/17 updated 27/2/17
# ToDo impliment traceroute function into this
# Perhaps get rid of unnecessary itemediate temp file
import socket
import os
import json
import my_traceroute
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = '130.56.253.43'
#print host
port = 5201 # Change port (must enable security settigns of server)
s.bind((host,port))
s.listen(5)
MAX_HOPS = 30 # max hops for traceroute
while True:
c, addr = s.accept() #accept incoming Connection
f = open('temp.json','wb') # open blank binary to dump incoming data
#print addr[0]
l = c.recv(1024)
while(l):
# Dump data into temp file and get next chunk of data
f.write(l)
l = c.recv(1024)
f.close()
c.close()
tempfile = open('temp.json','rb')
info = json.load(tempfile)
info["UserInfo"]["ip"] = addr[0] # store ip address of sender
last_addr = '0.0.0.0' # placeholder for first iteration
for hop in range(1,MAX_HOPS):
result = my_traceroute.traceroute(hop, info["UserInfo"]["ip"])
#print result
if result == -1:
break
if result[1] == last_addr:
break
info["TRACEROUTE"][str(result[0])] = {}
info["TRACEROUTE"][str(result[0])].update({'node':result[1], 'rtt':result[2]})
last_addr = result[1]
id = info["UserInfo"]["user id"]
timestamp = info["UserInfo"]["timestamp"]
os.system('mkdir /home/ubuntu/data/'+id)
path = "/home/ubuntu/data/" + id + "/"
filename = timestamp + '.json'
savefile = open(path + filename, 'w+')
savefile.write(json.dumps(info))
savefile.close() | [
2,
2727,
416,
41182,
11264,
860,
14,
17,
14,
1558,
6153,
2681,
14,
17,
14,
1558,
198,
2,
1675,
5211,
4114,
3681,
491,
11736,
13192,
2163,
656,
428,
220,
198,
2,
8673,
651,
5755,
286,
13114,
2378,
276,
9386,
20218,
2393,
198,
198,
11748,
17802,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
616,
62,
2213,
11736,
13192,
198,
198,
82,
796,
17802,
13,
44971,
7,
44971,
13,
8579,
62,
1268,
2767,
11,
17802,
13,
50,
11290,
62,
2257,
32235,
8,
220,
198,
4774,
796,
705,
12952,
13,
3980,
13,
28592,
13,
3559,
6,
198,
2,
4798,
2583,
198,
634,
796,
642,
1264,
1303,
9794,
2493,
357,
27238,
7139,
2324,
2970,
570,
82,
286,
4382,
8,
198,
82,
13,
21653,
19510,
4774,
11,
634,
4008,
198,
82,
13,
4868,
268,
7,
20,
8,
198,
22921,
62,
39,
30737,
796,
1542,
1303,
3509,
29438,
329,
491,
11736,
13192,
198,
198,
4514,
6407,
25,
198,
220,
220,
220,
269,
11,
37817,
796,
264,
13,
13635,
3419,
1303,
13635,
15619,
26923,
198,
220,
220,
220,
277,
796,
1280,
10786,
29510,
13,
17752,
41707,
39346,
11537,
1303,
1280,
9178,
13934,
284,
10285,
15619,
1366,
198,
220,
220,
220,
1303,
4798,
37817,
58,
15,
60,
198,
220,
220,
220,
300,
796,
269,
13,
8344,
85,
7,
35500,
8,
198,
220,
220,
220,
981,
7,
75,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
360,
931,
1366,
656,
20218,
2393,
290,
651,
1306,
16058,
286,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
277,
13,
13564,
7,
75,
8,
198,
220,
220,
220,
220,
220,
220,
220,
300,
796,
269,
13,
8344,
85,
7,
35500,
8,
198,
220,
220,
220,
277,
13,
19836,
3419,
198,
220,
220,
220,
269,
13,
19836,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
20218,
7753,
796,
1280,
10786,
29510,
13,
17752,
41707,
26145,
11537,
198,
220,
220,
220,
7508,
796,
33918,
13,
2220,
7,
29510,
7753,
8,
198,
220,
220,
220,
7508,
14692,
12982,
12360,
1,
7131,
1,
541,
8973,
796,
37817,
58,
15,
60,
1303,
3650,
20966,
2209,
286,
29788,
198,
220,
220,
220,
220,
198,
220,
220,
220,
938,
62,
29851,
796,
705,
15,
13,
15,
13,
15,
13,
15,
6,
1303,
46076,
329,
717,
24415,
198,
220,
220,
220,
329,
1725,
287,
2837,
7,
16,
11,
22921,
62,
39,
30737,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
616,
62,
2213,
11736,
13192,
13,
2213,
11736,
13192,
7,
8548,
11,
7508,
14692,
12982,
12360,
1,
7131,
1,
541,
8973,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
4798,
1255,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1255,
6624,
532,
16,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1255,
58,
16,
60,
6624,
938,
62,
29851,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
7508,
14692,
5446,
2246,
1137,
2606,
9328,
1,
7131,
2536,
7,
20274,
58,
15,
12962,
60,
796,
23884,
198,
220,
220,
220,
220,
220,
220,
220,
7508,
14692,
5446,
2246,
1137,
2606,
9328,
1,
7131,
2536,
7,
20274,
58,
15,
12962,
4083,
19119,
15090,
6,
17440,
10354,
20274,
58,
16,
4357,
705,
81,
926,
10354,
20274,
58,
17,
60,
30072,
198,
220,
220,
220,
220,
220,
220,
220,
938,
62,
29851,
796,
1255,
58,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
4686,
796,
7508,
14692,
12982,
12360,
1,
7131,
1,
7220,
4686,
8973,
198,
220,
220,
220,
41033,
796,
7508,
14692,
12982,
12360,
1,
7131,
1,
16514,
27823,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
28686,
13,
10057,
10786,
28015,
15908,
1220,
11195,
14,
32230,
14,
7890,
14,
6,
10,
312,
8,
198,
220,
220,
220,
3108,
796,
12813,
11195,
14,
32230,
14,
7890,
30487,
1343,
4686,
1343,
12813,
1,
198,
220,
220,
220,
29472,
796,
41033,
1343,
45302,
17752,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
3613,
7753,
796,
1280,
7,
6978,
1343,
29472,
11,
705,
86,
10,
11537,
198,
220,
220,
220,
3613,
7753,
13,
13564,
7,
17752,
13,
67,
8142,
7,
10951,
4008,
198,
220,
220,
220,
3613,
7753,
13,
19836,
3419
] | 2.310298 | 738 |
import numpy as np
import faiss
| [
11748,
299,
32152,
355,
45941,
198,
11748,
24685,
747,
628
] | 3.3 | 10 |
import asyncio
import base64
import datetime
import hashlib
import json
import os
import smopy
import traceback
from json import JSONDecodeError
from uuid import uuid4
import bcrypt
import peewee
from PIL import Image, ImageDraw
from peewee import (
Model,
CharField,
TextField,
IntegerField,
ForeignKeyField,
DateTimeField,
BooleanField,
)
from playhouse.sqlite_ext import (
SqliteExtDatabase,
FTSModel)
from pysyncobj import SyncObj, replicated
from asgiref.sync import sync_to_async
from . import PATH_DATABASE
loop = asyncio.get_event_loop()
pragmas = [
('journal_mode', 'wal'),
('cache_size', -1024 * 32)]
db = SqliteExtDatabase(PATH_DATABASE, pragmas=pragmas)
| [
11748,
30351,
952,
198,
11748,
2779,
2414,
198,
11748,
4818,
8079,
198,
11748,
12234,
8019,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
895,
11081,
198,
11748,
12854,
1891,
198,
6738,
33918,
1330,
19449,
10707,
1098,
12331,
198,
6738,
334,
27112,
1330,
334,
27112,
19,
198,
198,
11748,
275,
29609,
198,
11748,
613,
413,
1453,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
25302,
198,
6738,
613,
413,
1453,
1330,
357,
198,
220,
220,
220,
9104,
11,
198,
220,
220,
220,
3178,
15878,
11,
198,
220,
220,
220,
8255,
15878,
11,
198,
220,
220,
220,
34142,
15878,
11,
198,
220,
220,
220,
8708,
9218,
15878,
11,
198,
220,
220,
220,
7536,
7575,
15878,
11,
198,
220,
220,
220,
41146,
15878,
11,
198,
8,
198,
6738,
711,
4803,
13,
25410,
578,
62,
2302,
1330,
357,
198,
220,
220,
220,
311,
13976,
578,
11627,
38105,
11,
198,
220,
220,
220,
376,
4694,
17633,
8,
198,
6738,
279,
893,
13361,
26801,
1330,
35908,
49201,
11,
35108,
198,
6738,
355,
70,
557,
69,
13,
27261,
1330,
17510,
62,
1462,
62,
292,
13361,
198,
198,
6738,
764,
1330,
46490,
62,
35,
1404,
6242,
11159,
198,
198,
26268,
796,
30351,
952,
13,
1136,
62,
15596,
62,
26268,
3419,
198,
198,
1050,
363,
5356,
796,
685,
198,
220,
220,
220,
19203,
24891,
62,
14171,
3256,
705,
16783,
33809,
198,
220,
220,
220,
19203,
23870,
62,
7857,
3256,
532,
35500,
1635,
3933,
15437,
198,
198,
9945,
796,
311,
13976,
578,
11627,
38105,
7,
34219,
62,
35,
1404,
6242,
11159,
11,
23864,
5356,
28,
1050,
363,
5356,
8,
628,
628,
628,
628,
198
] | 2.738636 | 264 |
import unittest
import torch
import gqnlib
if __name__ == "__main__":
unittest.main()
| [
198,
11748,
555,
715,
395,
198,
198,
11748,
28034,
198,
198,
11748,
308,
80,
77,
8019,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.4 | 40 |
#!/usr/bin/env python
from get_listed_companies import get_listed_companies_from_cache
import tldextract
if __name__ == '__main__':
run_scan('helsinki', True)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
651,
62,
17935,
62,
34390,
444,
1330,
651,
62,
17935,
62,
34390,
444,
62,
6738,
62,
23870,
198,
11748,
256,
335,
2302,
974,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1057,
62,
35836,
10786,
2978,
82,
38799,
3256,
6407,
8,
198,
220,
220,
220,
220
] | 2.6 | 65 |
# -*- coding: utf-8 -*-
"""
Created on 2018/12/27 11:32 AM
---------
@summary: 账号昂贵、限制查询次数及使用时间的用户UserPool
---------
@author: Boris
@email: [email protected]
"""
import os
import random
import time
from enum import Enum, unique
from typing import Optional, List
from feapder import setting
from feapder.db.redisdb import RedisDB
from feapder.network.user_pool.base_user_pool import GoldUser, UserPoolInterface
from feapder.utils import metrics
from feapder.utils.log import log
from feapder.utils.redis_lock import RedisLock
from feapder.utils.tools import send_msg
@unique
class GoldUserPool(UserPoolInterface):
"""
账号昂贵、限制查询次数的用户的UserPool
"""
def __init__(
self,
redis_key,
*,
users: List[GoldUser],
keep_alive=False,
):
"""
@param redis_key: user存放在redis中的key前缀
@param users: 账号信息
@param keep_alive: 是否保持常驻,以便user不足时立即补充
"""
self._tab_user_pool = setting.TAB_USER_POOL.format(
redis_key=redis_key, user_type="gold"
)
self.users = users
self._keep_alive = keep_alive
self._redisdb = RedisDB()
self._users_id = []
if not users:
raise ValueError("not users")
# 给user的类属性复制
self.users[0].__class__.redisdb = self._redisdb
self.users[0].__class__.redis_key = self._tab_user_pool
self.__init_metrics()
self.__sync_users_base_info()
self.__sycn_users_info()
def login(self, user: GoldUser) -> GoldUser:
"""
登录 生产cookie
"""
raise NotImplementedError
def get_user(
self,
block=True,
username=None,
used_for_spider_name=None,
not_limit_use_interval=False,
) -> Optional[GoldUser]:
"""
@params username: 获取指定的用户
@params used_for_spider_name: 独享式使用,独享爬虫的名字。其他爬虫不可抢占
@params block: 无用户时是否等待
@params not_limit_frequence: 不限制使用频率
@return: GoldUser
"""
while True:
try:
user_id = username or self._get_user_id()
user_str = None
if user_id:
user_str = self._redisdb.hget(self._tab_user_pool, user_id)
if (not user_id or not user_str) and block:
self._keep_alive = False
self.run(username)
continue
# 取到用户
user = GoldUser(**eval(user_str))
# 独占式使用,若为其他爬虫,检查等待使用时间是否超过独占时间,若超过则可以使用
if (
user.get_used_for_spider_name()
and user.get_used_for_spider_name() != used_for_spider_name
):
wait_time = time.time() - user.get_last_use_time()
if wait_time < user.exclusive_time:
log.info(
"用户{} 被 {} 爬虫独占,需等待 {} 秒后才可使用".format(
user.username,
user.get_used_for_spider_name(),
user.exclusive_time - wait_time,
)
)
time.sleep(1)
continue
if not user.is_overwork() and user.is_at_work_time():
if not user.cookies:
log.debug(f"用户 {user.username} 未登录,尝试登录")
self._keep_alive = False
self.run(username)
continue
if not_limit_use_interval or user.is_time_to_use():
user.set_used_for_spider_name(used_for_spider_name)
log.debug("使用用户 {}".format(user.username))
self.record_user_status(user.user_id, GoldUserStatus.USED)
return user
else:
log.debug("{} 用户使用间隔过短 查看下一个用户".format(user.username))
time.sleep(1)
continue
else:
if not user.is_at_work_time():
log.info("用户 {} 不在工作时间 sleep 60s".format(user.username))
if block:
time.sleep(60)
continue
else:
return None
except Exception as e:
log.exception(e)
time.sleep(1)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2864,
14,
1065,
14,
1983,
1367,
25,
2624,
3001,
198,
45537,
198,
31,
49736,
25,
5525,
112,
99,
20998,
115,
23626,
224,
164,
112,
113,
23513,
165,
247,
238,
26344,
35050,
253,
98,
46237,
95,
162,
105,
94,
46763,
108,
20998,
232,
45635,
18796,
101,
33768,
114,
29785,
112,
21410,
18796,
101,
22755,
115,
12982,
27201,
198,
45537,
198,
31,
9800,
25,
25026,
198,
31,
12888,
25,
220,
275,
37279,
62,
4528,
84,
31,
12792,
4529,
13,
785,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
640,
198,
6738,
33829,
1330,
2039,
388,
11,
3748,
198,
6738,
19720,
1330,
32233,
11,
7343,
198,
198,
6738,
730,
499,
1082,
1330,
4634,
198,
6738,
730,
499,
1082,
13,
9945,
13,
445,
9409,
65,
1330,
2297,
271,
11012,
198,
6738,
730,
499,
1082,
13,
27349,
13,
7220,
62,
7742,
13,
8692,
62,
7220,
62,
7742,
1330,
3561,
12982,
11,
11787,
27201,
39317,
198,
6738,
730,
499,
1082,
13,
26791,
1330,
20731,
198,
6738,
730,
499,
1082,
13,
26791,
13,
6404,
1330,
2604,
198,
6738,
730,
499,
1082,
13,
26791,
13,
445,
271,
62,
5354,
1330,
2297,
271,
25392,
198,
6738,
730,
499,
1082,
13,
26791,
13,
31391,
1330,
3758,
62,
19662,
628,
198,
31,
34642,
628,
198,
4871,
3561,
12982,
27201,
7,
12982,
27201,
39317,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5525,
112,
99,
20998,
115,
23626,
224,
164,
112,
113,
23513,
165,
247,
238,
26344,
35050,
253,
98,
46237,
95,
162,
105,
94,
46763,
108,
21410,
18796,
101,
22755,
115,
21410,
12982,
27201,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2266,
271,
62,
2539,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1635,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2985,
25,
7343,
58,
13306,
12982,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
1394,
62,
282,
425,
28,
25101,
11,
198,
220,
220,
220,
15179,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
17143,
2266,
271,
62,
2539,
25,
2836,
27764,
246,
162,
242,
122,
28839,
101,
445,
271,
40792,
21410,
2539,
30298,
235,
163,
120,
222,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
17143,
2985,
25,
5525,
112,
99,
20998,
115,
46479,
94,
162,
223,
107,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
17143,
1394,
62,
282,
425,
25,
10545,
246,
107,
28938,
99,
46479,
251,
162,
234,
223,
30585,
116,
165,
102,
119,
171,
120,
234,
20015,
98,
160,
122,
123,
7220,
38834,
164,
114,
111,
33768,
114,
44165,
233,
39355,
111,
26193,
98,
17739,
227,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
8658,
62,
7220,
62,
7742,
796,
4634,
13,
5603,
33,
62,
29904,
62,
16402,
3535,
13,
18982,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2266,
271,
62,
2539,
28,
445,
271,
62,
2539,
11,
2836,
62,
4906,
2625,
24267,
1,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
18417,
796,
2985,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
14894,
62,
282,
425,
796,
1394,
62,
282,
425,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
445,
9409,
65,
796,
2297,
271,
11012,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
18417,
62,
312,
796,
17635,
628,
220,
220,
220,
220,
220,
220,
220,
611,
407,
2985,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7203,
1662,
2985,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
13328,
119,
247,
7220,
21410,
163,
109,
119,
161,
109,
252,
45250,
100,
13783,
235,
26344,
114,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
18417,
58,
15,
4083,
834,
4871,
834,
13,
445,
9409,
65,
796,
2116,
13557,
445,
9409,
65,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
18417,
58,
15,
4083,
834,
4871,
834,
13,
445,
271,
62,
2539,
796,
2116,
13557,
8658,
62,
7220,
62,
7742,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
834,
15003,
62,
4164,
10466,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
834,
27261,
62,
18417,
62,
8692,
62,
10951,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
834,
1837,
31522,
62,
18417,
62,
10951,
3419,
628,
220,
220,
220,
825,
17594,
7,
944,
11,
2836,
25,
3561,
12982,
8,
4613,
3561,
12982,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
13328,
247,
119,
37605,
243,
13328,
242,
253,
12859,
100,
44453,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
1892,
3546,
1154,
12061,
12331,
628,
220,
220,
220,
825,
651,
62,
7220,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2512,
28,
17821,
11,
198,
220,
220,
220,
220,
220,
220,
220,
20579,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
973,
62,
1640,
62,
2777,
1304,
62,
3672,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
407,
62,
32374,
62,
1904,
62,
3849,
2100,
28,
25101,
11,
198,
220,
220,
220,
1267,
4613,
32233,
58,
13306,
12982,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
37266,
20579,
25,
5525,
236,
115,
20998,
244,
162,
234,
229,
22522,
248,
21410,
18796,
101,
22755,
115,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
37266,
973,
62,
1640,
62,
2777,
1304,
62,
3672,
25,
13328,
233,
105,
12859,
104,
28156,
237,
45635,
18796,
101,
171,
120,
234,
45379,
105,
12859,
104,
163,
230,
105,
164,
247,
104,
21410,
28938,
235,
27764,
245,
16764,
17739,
114,
20015,
244,
163,
230,
105,
164,
247,
104,
38834,
20998,
107,
162,
232,
95,
39355,
254,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
37266,
2512,
25,
10545,
245,
254,
18796,
101,
22755,
115,
33768,
114,
42468,
28938,
99,
163,
255,
231,
36181,
227,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
37266,
407,
62,
32374,
62,
69,
8897,
594,
25,
220,
38834,
165,
247,
238,
26344,
114,
45635,
18796,
101,
165,
95,
239,
163,
236,
229,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
7783,
25,
3561,
12982,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
981,
6407,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
312,
796,
20579,
393,
2116,
13557,
1136,
62,
7220,
62,
312,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
2536,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2836,
62,
312,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
2536,
796,
2116,
13557,
445,
9409,
65,
13,
71,
1136,
7,
944,
13557,
8658,
62,
7220,
62,
7742,
11,
2836,
62,
312,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
357,
1662,
2836,
62,
312,
393,
407,
2836,
62,
2536,
8,
290,
2512,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
14894,
62,
282,
425,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5143,
7,
29460,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2555,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
10263,
237,
244,
26344,
108,
18796,
101,
22755,
115,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
796,
3561,
12982,
7,
1174,
18206,
7,
7220,
62,
2536,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
13328,
233,
105,
39355,
254,
28156,
237,
45635,
18796,
101,
171,
120,
234,
164,
233,
98,
10310,
118,
17739,
114,
20015,
244,
163,
230,
105,
164,
247,
104,
171,
120,
234,
162,
96,
222,
162,
253,
98,
163,
255,
231,
36181,
227,
45635,
18796,
101,
33768,
114,
29785,
112,
42468,
28938,
99,
164,
41678,
32573,
229,
45379,
105,
39355,
254,
33768,
114,
29785,
112,
171,
120,
234,
164,
233,
98,
164,
41678,
32573,
229,
26344,
247,
20998,
107,
20015,
98,
45635,
18796,
101,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
13,
1136,
62,
1484,
62,
1640,
62,
2777,
1304,
62,
3672,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
2836,
13,
1136,
62,
1484,
62,
1640,
62,
2777,
1304,
62,
3672,
3419,
14512,
973,
62,
1640,
62,
2777,
1304,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15179,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4043,
62,
2435,
796,
640,
13,
2435,
3419,
532,
2836,
13,
1136,
62,
12957,
62,
1904,
62,
2435,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
4043,
62,
2435,
1279,
2836,
13,
41195,
62,
2435,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
18796,
101,
22755,
115,
90,
92,
5525,
95,
104,
23884,
13328,
230,
105,
164,
247,
104,
45379,
105,
39355,
254,
171,
120,
234,
165,
250,
222,
163,
255,
231,
36181,
227,
23884,
13328,
100,
240,
28938,
236,
33699,
235,
20998,
107,
45635,
18796,
101,
1911,
18982,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
13,
29460,
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,
2836,
13,
1136,
62,
1484,
62,
1640,
62,
2777,
1304,
62,
3672,
22784,
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,
2836,
13,
41195,
62,
2435,
532,
4043,
62,
2435,
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,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
640,
13,
42832,
7,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2555,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
2836,
13,
271,
62,
2502,
1818,
3419,
290,
2836,
13,
271,
62,
265,
62,
1818,
62,
2435,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
2836,
13,
27916,
444,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
24442,
7,
69,
1,
18796,
101,
22755,
115,
1391,
7220,
13,
29460,
92,
42164,
103,
163,
247,
119,
37605,
243,
171,
120,
234,
22887,
251,
46237,
243,
163,
247,
119,
37605,
243,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
14894,
62,
282,
425,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5143,
7,
29460,
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,
2555,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
62,
32374,
62,
1904,
62,
3849,
2100,
393,
2836,
13,
271,
62,
2435,
62,
1462,
62,
1904,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
13,
2617,
62,
1484,
62,
1640,
62,
2777,
1304,
62,
3672,
7,
1484,
62,
1640,
62,
2777,
1304,
62,
3672,
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,
2604,
13,
24442,
7203,
45635,
18796,
101,
18796,
101,
22755,
115,
23884,
1911,
18982,
7,
7220,
13,
29460,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
22105,
62,
7220,
62,
13376,
7,
7220,
13,
7220,
62,
312,
11,
3561,
12982,
19580,
13,
2937,
1961,
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,
1441,
2836,
198,
220,
220,
220,
220,
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,
220,
220,
220,
220,
2604,
13,
24442,
7203,
90,
92,
13328,
242,
101,
22755,
115,
45635,
18796,
101,
29785,
112,
49694,
242,
32573,
229,
163,
253,
255,
10545,
253,
98,
40367,
233,
10310,
233,
31660,
10310,
103,
18796,
101,
22755,
115,
1911,
18982,
7,
7220,
13,
29460,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
640,
13,
42832,
7,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2555,
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,
611,
407,
2836,
13,
271,
62,
265,
62,
1818,
62,
2435,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
18796,
101,
22755,
115,
23884,
220,
38834,
28839,
101,
32432,
98,
43291,
33768,
114,
29785,
112,
3993,
3126,
82,
1911,
18982,
7,
7220,
13,
29460,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2512,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
640,
13,
42832,
7,
1899,
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,
2555,
198,
220,
220,
220,
220,
220,
220,
220,
220,
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,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
6045,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
35528,
355,
304,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
1069,
4516,
7,
68,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
640,
13,
42832,
7,
16,
8,
198
] | 1.55163 | 2,915 |
"""Test kytos.core.events module."""
from unittest import TestCase
from kytos.core.events import KytosEvent
class TestKytosEvent(TestCase):
"""KytosEvent tests."""
def setUp(self):
"""Instantiate a KytosEvent."""
self.event = KytosEvent('kytos/core.any')
def test__str__(self):
"""Test __str__ method."""
self.assertEqual(str(self.event), 'kytos/core.any')
def test__repr__(self):
"""Test __repr__ method."""
self.event.content = {"destination": "dest",
"source": "src",
"message": "msg"}
expected = "KytosEvent('kytos/core.any', {'destination': 'dest', " + \
"'source': 'src', 'message': 'msg'})"
self.assertEqual(repr(self.event), expected)
def test_destination(self):
"""Test destination property and set_destination method."""
self.assertEqual(self.event.destination, None)
self.event.set_destination('dest')
self.assertEqual(self.event.destination, 'dest')
def test_source(self):
"""Test source property and set_source method."""
self.assertEqual(self.event.source, None)
self.event.set_source('src')
self.assertEqual(self.event.source, 'src')
def test_message(self):
"""Test message property."""
self.assertEqual(self.event.message, None)
self.event.content = {"message": "msg"}
self.assertEqual(self.event.message, 'msg')
| [
37811,
14402,
479,
20760,
418,
13,
7295,
13,
31534,
8265,
526,
15931,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
479,
20760,
418,
13,
7295,
13,
31534,
1330,
11118,
83,
418,
9237,
628,
198,
4871,
6208,
42,
20760,
418,
9237,
7,
14402,
20448,
2599,
198,
220,
220,
220,
37227,
42,
20760,
418,
9237,
5254,
526,
15931,
628,
220,
220,
220,
825,
900,
4933,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
49933,
9386,
257,
11118,
83,
418,
9237,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15596,
796,
11118,
83,
418,
9237,
10786,
2584,
83,
418,
14,
7295,
13,
1092,
11537,
628,
220,
220,
220,
825,
1332,
834,
2536,
834,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
14402,
11593,
2536,
834,
2446,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
2536,
7,
944,
13,
15596,
828,
705,
2584,
83,
418,
14,
7295,
13,
1092,
11537,
628,
220,
220,
220,
825,
1332,
834,
260,
1050,
834,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
14402,
11593,
260,
1050,
834,
2446,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15596,
13,
11299,
796,
19779,
16520,
1883,
1298,
366,
16520,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10459,
1298,
366,
10677,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
20500,
1298,
366,
19662,
20662,
198,
220,
220,
220,
220,
220,
220,
220,
2938,
796,
366,
42,
20760,
418,
9237,
10786,
2584,
83,
418,
14,
7295,
13,
1092,
3256,
1391,
6,
16520,
1883,
10354,
705,
16520,
3256,
366,
1343,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
24018,
10459,
10354,
705,
10677,
3256,
705,
20500,
10354,
705,
19662,
6,
92,
16725,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
260,
1050,
7,
944,
13,
15596,
828,
2938,
8,
628,
220,
220,
220,
825,
1332,
62,
16520,
1883,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
14402,
10965,
3119,
290,
900,
62,
16520,
1883,
2446,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
944,
13,
15596,
13,
16520,
1883,
11,
6045,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15596,
13,
2617,
62,
16520,
1883,
10786,
16520,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
944,
13,
15596,
13,
16520,
1883,
11,
705,
16520,
11537,
628,
220,
220,
220,
825,
1332,
62,
10459,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
14402,
2723,
3119,
290,
900,
62,
10459,
2446,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
944,
13,
15596,
13,
10459,
11,
6045,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15596,
13,
2617,
62,
10459,
10786,
10677,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
944,
13,
15596,
13,
10459,
11,
705,
10677,
11537,
628,
220,
220,
220,
825,
1332,
62,
20500,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
14402,
3275,
3119,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
944,
13,
15596,
13,
20500,
11,
6045,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15596,
13,
11299,
796,
19779,
20500,
1298,
366,
19662,
20662,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
944,
13,
15596,
13,
20500,
11,
705,
19662,
11537,
198
] | 2.269173 | 665 |
#Get sentence from user
sentence = input('Enter the sentence you want to translate : ').strip().lower()
#Spliting sentence into words
words = sentence.split()
#Converting words to pig latin
latin_words = []
for word in words :
if word[0] in "aeiou" :
latin_word = word + 'yay'
latin_words.append(latin_word)
else:
vowel_pos = 0
for letter in word :
if letter not in "aeiou" :
vowel_pos = vowel_pos +1
else:
break
cons = word[:vowel_pos]
rest = word[vowel_pos:]
latin_word = rest + cons + 'ay'
latin_words.append(latin_word)
#Stick back words back together
output = " ".join(latin_words)
#Printing final output
print(output)
| [
2,
3855,
6827,
422,
2836,
201,
198,
34086,
594,
796,
5128,
10786,
17469,
262,
6827,
345,
765,
284,
15772,
1058,
705,
737,
36311,
22446,
21037,
3419,
201,
198,
201,
198,
2,
26568,
1780,
6827,
656,
2456,
201,
198,
10879,
796,
6827,
13,
35312,
3419,
201,
198,
201,
198,
2,
3103,
48820,
2456,
284,
12967,
3042,
259,
201,
198,
75,
10680,
62,
10879,
796,
17635,
201,
198,
201,
198,
1640,
1573,
287,
2456,
1058,
201,
198,
220,
220,
220,
611,
1573,
58,
15,
60,
287,
366,
3609,
72,
280,
1,
1058,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3042,
259,
62,
4775,
796,
1573,
1343,
705,
88,
323,
6,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3042,
259,
62,
10879,
13,
33295,
7,
75,
10680,
62,
4775,
8,
201,
198,
201,
198,
220,
220,
220,
2073,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
48617,
62,
1930,
796,
657,
201,
198,
220,
220,
220,
220,
220,
220,
220,
329,
3850,
287,
1573,
1058,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
3850,
407,
287,
366,
3609,
72,
280,
1,
1058,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
48617,
62,
1930,
796,
48617,
62,
1930,
1343,
16,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
762,
796,
1573,
58,
25,
85,
322,
417,
62,
1930,
60,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1334,
796,
1573,
58,
85,
322,
417,
62,
1930,
47715,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3042,
259,
62,
4775,
796,
1334,
1343,
762,
1343,
705,
323,
6,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3042,
259,
62,
10879,
13,
33295,
7,
75,
10680,
62,
4775,
8,
201,
198,
201,
198,
2,
1273,
624,
736,
2456,
736,
1978,
201,
198,
22915,
796,
366,
27071,
22179,
7,
75,
10680,
62,
10879,
8,
201,
198,
201,
198,
2,
18557,
278,
2457,
5072,
201,
198,
4798,
7,
22915,
8,
201,
198
] | 2.109043 | 376 |
"""Tests for models.Users.
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from datetime import datetime
from random import randrange
import uuid
import pytz
from django.test import TestCase
from ccm.common import crdt
from endagaweb import models
class UserTests(TestBase):
"""
We can manage subscriber balances.
"""
def test_sub_get_balance(self):
""" Test the balance property. """
bal = randrange(1, 1000)
sub = self.add_sub(self.gen_imsi(),
balance=bal)
self.assertEqual(sub.balance, bal)
| [
37811,
51,
3558,
329,
4981,
13,
14490,
13,
198,
198,
15269,
357,
66,
8,
1584,
12,
25579,
11,
3203,
11,
3457,
13,
198,
3237,
2489,
10395,
13,
198,
198,
1212,
2723,
2438,
318,
11971,
739,
262,
347,
10305,
12,
7635,
5964,
1043,
287,
262,
198,
43,
2149,
24290,
2393,
287,
262,
6808,
8619,
286,
428,
2723,
5509,
13,
1052,
3224,
7264,
198,
1659,
12701,
2489,
460,
307,
1043,
287,
262,
28748,
15365,
2393,
287,
262,
976,
8619,
13,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
4738,
1330,
43720,
9521,
198,
11748,
334,
27112,
198,
198,
11748,
12972,
22877,
198,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
198,
6738,
269,
11215,
13,
11321,
1330,
1067,
28664,
198,
6738,
886,
363,
707,
1765,
1330,
4981,
628,
198,
198,
4871,
11787,
51,
3558,
7,
14402,
14881,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
775,
460,
6687,
32944,
25223,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
825,
1332,
62,
7266,
62,
1136,
62,
20427,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
6208,
262,
5236,
3119,
13,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
3652,
796,
43720,
9521,
7,
16,
11,
8576,
8,
198,
220,
220,
220,
220,
220,
220,
220,
850,
796,
2116,
13,
2860,
62,
7266,
7,
944,
13,
5235,
62,
12078,
72,
22784,
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,
5236,
28,
6893,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30493,
36,
13255,
7,
7266,
13,
20427,
11,
3652,
8,
628
] | 3.015576 | 321 |
"""
import os
print(os.getcwd())
"""
#OR#
from time import *
from os import *
print(getcwd())
print(name) ## OS name
print(path.abspath('.'))
print(listdir('.'))
mkdir("india") ## making directory
sleep(2)
rename("india","india2") ## renaming directory
sleep(2)
rmdir("india2") ## removing directory
| [
37811,
198,
11748,
28686,
198,
4798,
7,
418,
13,
1136,
66,
16993,
28955,
198,
37811,
198,
220,
220,
220,
1303,
1581,
2,
198,
6738,
640,
1330,
1635,
198,
6738,
28686,
1330,
1635,
198,
4798,
7,
1136,
66,
16993,
28955,
198,
4798,
7,
3672,
8,
22492,
7294,
1438,
198,
4798,
7,
6978,
13,
397,
2777,
776,
10786,
2637,
4008,
198,
4798,
7,
4868,
15908,
10786,
2637,
4008,
198,
28015,
15908,
7203,
521,
544,
4943,
22492,
1642,
8619,
198,
42832,
7,
17,
8,
198,
918,
480,
7203,
521,
544,
2430,
521,
544,
17,
4943,
22492,
8851,
3723,
8619,
198,
42832,
7,
17,
8,
198,
81,
9132,
343,
7203,
521,
544,
17,
4943,
22492,
10829,
8619,
198
] | 2.666667 | 114 |
import time
from pyresparser import ResumeParser
import os
from scripts.whatsapp import WhatsApp
# spacy.load('en_core_web_sm')
| [
198,
11748,
640,
198,
6738,
12972,
4363,
28198,
1330,
1874,
2454,
46677,
198,
11748,
28686,
198,
6738,
14750,
13,
1929,
1381,
1324,
1330,
37666,
198,
2,
599,
1590,
13,
2220,
10786,
268,
62,
7295,
62,
12384,
62,
5796,
11537,
628,
628,
628
] | 3.190476 | 42 |
import os
from math import log10
from multiprocessing import cpu_count
from typing import Dict, Any, Tuple, Union
import arrow
import click
from numpy import ndarray
import jesse.helpers as jh
import jesse.services.required_candles as required_candles
from jesse import exceptions
from jesse.config import config
from jesse.modes.backtest_mode import load_candles, simulator
from jesse.routes import router
from jesse.services import metrics as stats
from jesse.services.validators import validate_routes
from jesse.store import store
from .Genetics import Genetics
os.environ['NUMEXPR_MAX_THREADS'] = str(cpu_count())
| [
11748,
28686,
198,
6738,
10688,
1330,
2604,
940,
198,
6738,
18540,
305,
919,
278,
1330,
42804,
62,
9127,
198,
6738,
19720,
1330,
360,
713,
11,
4377,
11,
309,
29291,
11,
4479,
198,
198,
11748,
15452,
198,
11748,
3904,
198,
6738,
299,
32152,
1330,
299,
67,
18747,
198,
198,
11748,
474,
35270,
13,
16794,
364,
355,
474,
71,
198,
11748,
474,
35270,
13,
30416,
13,
35827,
62,
46188,
829,
355,
2672,
62,
46188,
829,
198,
6738,
474,
35270,
1330,
13269,
198,
6738,
474,
35270,
13,
11250,
1330,
4566,
198,
6738,
474,
35270,
13,
76,
4147,
13,
1891,
9288,
62,
14171,
1330,
3440,
62,
46188,
829,
11,
35375,
198,
6738,
474,
35270,
13,
81,
448,
274,
1330,
20264,
198,
6738,
474,
35270,
13,
30416,
1330,
20731,
355,
9756,
198,
6738,
474,
35270,
13,
30416,
13,
12102,
2024,
1330,
26571,
62,
81,
448,
274,
198,
6738,
474,
35270,
13,
8095,
1330,
3650,
198,
6738,
764,
13746,
14596,
1330,
43574,
198,
198,
418,
13,
268,
2268,
17816,
41359,
6369,
4805,
62,
22921,
62,
4221,
15675,
50,
20520,
796,
965,
7,
36166,
62,
9127,
28955,
628,
628
] | 3.434066 | 182 |
import pytest
from http_basic_auth import parse_header, generate_header, BasicAuthException
@pytest.mark.parametrize("token,expect", [
('Basic dGVzdDpzZWNyZXQ=', ('test', 'secret')),
('BASIC dGVzdDpzZWNyZXQx', ('test', 'secret1')),
('BaSiC dGVzdDpzZWM6cmV0MQ==', ('test', 'sec:ret1')),
('Basic \t bmFtZTp9e3NkYXNkJyI=', ('name', '}{sdasd\'\"')),
('Basic 8J+YgTrQv9Cw0YA6w7bQu9GM', ('😁', 'пар:öль')),
])
@pytest.mark.parametrize("header", [
'',
'BasicdGVzdDpzZWNyZXQ=',
'BASI dGVzdDpzZWNyZXQx',
'dGVzdDpzZWM6cmV0MQ==',
None,
1,
])
@pytest.mark.parametrize("token,login_password", [
('Basic dGVzdDpzZWNyZXQ=', ('test', 'secret')),
('Basic dGVzdDpzZWNyZXQx', ('test', 'secret1')),
('Basic dGVzdDpzZWM6cmV0MQ==', ('test', 'sec:ret1')),
('Basic bmFtZTp9e3NkYXNkJyI=', ('name', '}{sdasd\'\"')),
('Basic 8J+YgTrQv9Cw0YA6w7bQu9GM', ('😁', 'пар:öль')),
])
@pytest.mark.parametrize("token,expect", [
('Basic 8J+YgTrQv9Cw0YA6w7bQu9GM', ('😁', 'пар:öль')),
])
@pytest.mark.parametrize("token,login_password", [
('Basic 8J+YgTrQv9Cw0YA6w7bQu9GM', ('😁', 'пар:öль')),
])
| [
11748,
12972,
9288,
198,
198,
6738,
2638,
62,
35487,
62,
18439,
1330,
21136,
62,
25677,
11,
7716,
62,
25677,
11,
14392,
30515,
16922,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
2736,
7203,
30001,
11,
1069,
806,
1600,
685,
198,
220,
220,
220,
19203,
26416,
288,
37094,
89,
67,
35,
79,
89,
57,
29767,
88,
40692,
48,
28,
3256,
19203,
9288,
3256,
705,
21078,
11537,
828,
198,
220,
220,
220,
19203,
33,
1921,
2149,
288,
37094,
89,
67,
35,
79,
89,
57,
29767,
88,
40692,
48,
87,
3256,
19203,
9288,
3256,
705,
21078,
16,
11537,
828,
198,
220,
220,
220,
19203,
34458,
42801,
34,
288,
37094,
89,
67,
35,
79,
89,
57,
22117,
21,
11215,
53,
15,
49215,
855,
3256,
19203,
9288,
3256,
705,
2363,
25,
1186,
16,
11537,
828,
198,
220,
220,
220,
19203,
26416,
220,
220,
220,
3467,
83,
275,
76,
37,
83,
57,
51,
79,
24,
68,
18,
45,
74,
56,
55,
45,
74,
41,
88,
40,
28,
3256,
19203,
3672,
3256,
705,
18477,
21282,
292,
67,
43054,
7879,
11537,
828,
198,
220,
220,
220,
19203,
26416,
807,
41,
10,
56,
70,
2898,
48,
85,
24,
34,
86,
15,
44947,
21,
86,
22,
65,
4507,
24,
15548,
3256,
19203,
47249,
223,
3256,
705,
140,
123,
16142,
21169,
25,
9101,
30143,
45367,
11537,
828,
198,
12962,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
2736,
7203,
25677,
1600,
685,
198,
220,
220,
220,
705,
3256,
198,
220,
220,
220,
705,
26416,
67,
37094,
89,
67,
35,
79,
89,
57,
29767,
88,
40692,
48,
28,
3256,
198,
220,
220,
220,
705,
33,
1921,
40,
288,
37094,
89,
67,
35,
79,
89,
57,
29767,
88,
40692,
48,
87,
3256,
198,
220,
220,
220,
705,
67,
37094,
89,
67,
35,
79,
89,
57,
22117,
21,
11215,
53,
15,
49215,
855,
3256,
198,
220,
220,
220,
6045,
11,
198,
220,
220,
220,
352,
11,
198,
12962,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
2736,
7203,
30001,
11,
38235,
62,
28712,
1600,
685,
198,
220,
220,
220,
19203,
26416,
288,
37094,
89,
67,
35,
79,
89,
57,
29767,
88,
40692,
48,
28,
3256,
19203,
9288,
3256,
705,
21078,
11537,
828,
198,
220,
220,
220,
19203,
26416,
288,
37094,
89,
67,
35,
79,
89,
57,
29767,
88,
40692,
48,
87,
3256,
19203,
9288,
3256,
705,
21078,
16,
11537,
828,
198,
220,
220,
220,
19203,
26416,
288,
37094,
89,
67,
35,
79,
89,
57,
22117,
21,
11215,
53,
15,
49215,
855,
3256,
19203,
9288,
3256,
705,
2363,
25,
1186,
16,
11537,
828,
198,
220,
220,
220,
19203,
26416,
275,
76,
37,
83,
57,
51,
79,
24,
68,
18,
45,
74,
56,
55,
45,
74,
41,
88,
40,
28,
3256,
19203,
3672,
3256,
705,
18477,
21282,
292,
67,
43054,
7879,
11537,
828,
198,
220,
220,
220,
19203,
26416,
807,
41,
10,
56,
70,
2898,
48,
85,
24,
34,
86,
15,
44947,
21,
86,
22,
65,
4507,
24,
15548,
3256,
19203,
47249,
223,
3256,
705,
140,
123,
16142,
21169,
25,
9101,
30143,
45367,
11537,
828,
198,
12962,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
2736,
7203,
30001,
11,
1069,
806,
1600,
685,
198,
220,
220,
220,
19203,
26416,
807,
41,
10,
56,
70,
2898,
48,
85,
24,
34,
86,
15,
44947,
21,
86,
22,
65,
4507,
24,
15548,
3256,
19203,
47249,
223,
3256,
705,
140,
123,
16142,
21169,
25,
9101,
30143,
45367,
11537,
828,
198,
12962,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
2736,
7203,
30001,
11,
38235,
62,
28712,
1600,
685,
198,
220,
220,
220,
19203,
26416,
807,
41,
10,
56,
70,
2898,
48,
85,
24,
34,
86,
15,
44947,
21,
86,
22,
65,
4507,
24,
15548,
3256,
19203,
47249,
223,
3256,
705,
140,
123,
16142,
21169,
25,
9101,
30143,
45367,
11537,
828,
198,
12962,
198
] | 1.786834 | 638 |
__author__ = 'nicole'
| [
834,
9800,
834,
796,
705,
6988,
2305,
6,
198
] | 2.444444 | 9 |
import discord
import importlib
from discord.ext import commands
channels = [725776681159098408, 728691486115233804, 738967638964830341, 725566843766571112, 732288159060328529, 739199815627440232, 730887667491012720, 729753696199508088]
client = MyClient()
client.run('YourTokenHere')
| [
11748,
36446,
198,
11748,
1330,
8019,
198,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
198,
354,
8961,
796,
685,
45151,
3324,
35809,
1157,
3270,
2931,
23,
26200,
11,
767,
2078,
3388,
1415,
4521,
15363,
1954,
23734,
19,
11,
767,
29769,
42548,
29769,
34287,
1270,
33660,
11,
767,
13381,
2791,
5705,
2718,
2791,
3553,
1157,
1065,
11,
8854,
1828,
3459,
1314,
3829,
35642,
26279,
1959,
11,
767,
2670,
21113,
21599,
1983,
25644,
24339,
11,
767,
1270,
46660,
28933,
2920,
8784,
1983,
1238,
11,
767,
1959,
2425,
2623,
4846,
19104,
1120,
1795,
3459,
60,
198,
198,
16366,
796,
2011,
11792,
3419,
198,
16366,
13,
5143,
10786,
7120,
30642,
4342,
11537,
198
] | 2.618182 | 110 |
"""
file : graph.py
author(s) : Thomas LINTANF, Laurent CALYDON
Version : 6.0
Definition de la classe Graph qui permet de stocker un graph orienté et de lui
appliquer différents algorithmes.
"""
import csv
import logging as log
class Graph:
"""
classe Graph : représente un graphe orienté
Version: 5.0
"""
def __init__(self):
"""
Constructeur de la classe Graph
Version: 4.0
"""
self.nb_sommets = 0
self.nb_arcs = 0
self.m_adjacence = []
self.m_valeurs = []
self.contient_circuit = 'u'
self.rang = []
self.est_ordonnancement = 'u'
self.dates_au_plus_tot = []
self.dates_au_plus_tard = []
self.marges_totales = []
self.marges_libres = []
def read_file(self, address):
"""
Charge un graphe depuis un fichier txt au format csv
version : 1.3
"""
l_rows = []
with open(address) as csvfile:
reader = csv.reader(csvfile, delimiter=';', quoting=csv.QUOTE_NONNUMERIC)
# stockage temporaire des données dans un tableau
for row in reader:
l_rows.append([int(i) for i in row])
log.info('Chargement du fichier : %s', address)
# extraction du nombre de sommets et d'arcs
self.nb_sommets = int(l_rows[0][0])
log.info('%d sommets', self.nb_sommets)
self.nb_arcs = int(l_rows[1][0])
log.info('%d arcs', self.nb_sommets)
# Initialisation des matrices d'adjacense et des valeurs
for _ in range(0, self.nb_sommets):
ligne_adjacence = []
ligne_valeur = []
for _ in range(0, self.nb_sommets):
ligne_adjacence.append(False)
ligne_valeur.append('*')
self.m_adjacence.append(ligne_adjacence)
self.m_valeurs.append(ligne_valeur)
log.info('Initialisation des matrices')
# écriture des arcs dans les matrice
log.info('Chargement des arcs')
for arc in l_rows[2:]:
sommet_depart = int(arc[0])
sommet_arrivee = int(arc[1])
poid = arc[2]
self.m_adjacence[sommet_depart][sommet_arrivee] = True
self.m_valeurs[sommet_depart][sommet_arrivee] = poid
log.info('%d --> %d = %d', sommet_depart, sommet_arrivee, poid)
# to do: Améliorer l'affichage des matices
def __str__(self):
"""
Fonction de représentation au format string
Version: 1.1
"""
repr_str = "Graphe :\n - {0} sommets`\n - {1} arcs\n".format(self.nb_sommets, self.nb_arcs)
repr_str += "Matrice d'Adjacence :\n\t"
for sommet in range(0, self.nb_sommets):
repr_str += "{0}\t".format(sommet)
repr_str += '\n'
indice = 0
for ligne in self.m_adjacence:
repr_str += "{0}\t".format(indice)
for case in ligne:
repr_str += "{0}\t".format('V' if case else 'F')
repr_str += '\n'
indice += 1
repr_str += 'Matrice des Valeurs :\n'
repr_str += "\t"
for sommet in range(0, self.nb_sommets):
repr_str += "{0}\t".format(sommet)
repr_str += '\n'
indice = 0
for ligne in self.m_valeurs:
repr_str += "{0}\t".format(indice)
for case in ligne:
repr_str += "{0}\t".format(case)
repr_str += '\n'
indice += 1
return repr_str
def detection_circuit(self):
"""
Cherche si le graphe contient un circuit
Retourne True si le graphe contient au moins un circuit False sinon
Écrit également le resultat sur la propriété contient_circuit
Version: 1.2
"""
log.info("Detection de circuit\nMéthode de détection des points d'entrés")
liste_sommets = list(range(0, self.nb_sommets))
continuer = True
while continuer:
continuer = False
sommet_a_supr = []
# Recherche des sommets sans prédécesseur
for sommet_arrivee in liste_sommets:
has_pred = False
for sommet_depart in liste_sommets:
has_pred = has_pred or self.m_adjacence[sommet_depart][sommet_arrivee]
if not has_pred:
sommet_a_supr.append(sommet_arrivee)
# Suppression des sommets sans prédécesseur
for sommet in sommet_a_supr:
liste_sommets.remove(sommet)
# Sortie de boucle si on a pas retiré de sommets
continuer = len(sommet_a_supr) > 0 and len(liste_sommets) > 0
log.info("Points d'entrés :")
if continuer:
log.info(sommet_a_supr)
log.info("Sommets restant :\n%s", liste_sommets)
else:
log.info('Aucun')
# On regarde si il reste des sommets pour savoir si il y a un circuit
self.contient_circuit = len(liste_sommets) != 0
if self.contient_circuit:
log.info('Le graphe contient au moins un circuit')
else:
log.info('Le graphe ne contient aucun circuit')
return self.contient_circuit
def calc_rang(self):
"""
Calcul le rang de chaque sommet du graphe
version: 1.2
"""
if self.contient_circuit == 'u':
log.warning("Calcul des rangs impossible : detectionCircuit() doit être lancée avant")
elif self.contient_circuit:
log.warning("Impossible de calculer les rangs : présence d'un circuit")
else:
# Intialisation de la liste des rangs
self.rang = [0 for _ in range(0, self.nb_sommets)]
liste_sommets = list(range(0, self.nb_sommets))
continuer = True
rang = 0
while continuer:
# Recherche des sommets sans prédécesseur
sommet_a_supr = []
for sommet_arrivee in liste_sommets:
has_pred = False
for sommet_depart in liste_sommets:
has_pred = has_pred or self.m_adjacence[sommet_depart][sommet_arrivee]
if not has_pred:
sommet_a_supr.append(sommet_arrivee)
# Suppression des sommets sans prédécesseur
for sommet in sommet_a_supr:
liste_sommets.remove(sommet)
self.rang[sommet] = rang
log.info("Rang courant = %d\nPoints d'entrés :\n%s", rang, sommet_a_supr)
rang += 1
continuer = len(liste_sommets) > 0
log.info("Graphe vide\nRangs calculés")
log.info("Sommets :\t%s", ''.join(["%d\t" % i for i in range(0, self.nb_sommets)]))
log.info("Rang :\t\t%s", ''.join(["%d\t" % i for i in self.rang]))
def est_graph_ordonnancement(self):
"""
Vérifie si c'est un graphe d'ordonnancement
Version: 1.2
"""
log.info("Verification qu'il s'agit d'un graphe d'ordonnancement :")
# Détection d'un seul point d'entrée
res = self.rang.count(0) == 1
log.info("A qu'un seul point d'entree : %s", res)
# Détection d'un seul point de sortie
ans = self.rang.count(max(self.rang)) == 1
log.info("A qu'un seul point de sortie : %s", ans)
res = res and ans
# Vérification de la présence d'un circuit
ans = not self.contient_circuit
log.info("Ne contient pas un circuit: %s", ans)
res = res and ans
# Vérification des poids identiques pour tous les arcs incidents vers l’extérieur à un sommet
ans = True
for ligne in self.m_valeurs:
i = 0
while ligne[i] == '*' and i < self.nb_sommets-1:
i += 1
# Vérification pas d’arcs à valeur négative.
is_pos = True
if ligne[i] != '*':
is_pos = ligne[i] >= 0
ans = ans and is_pos
for case in ligne:
ans = ans and (case == '*' or case == ligne[i])
log.info("Arcs incidents extérieurs positifs et égaux pour chaque sommet: %s", ans)
res = res and ans
# Arcs incidents vers l’extérieur au point d’entrée de valeur nulle
i = self.rang.index(0)
ans = True
for case in self.m_valeurs[i]:
ans = ans and (case == '*' or case == 0)
log.info("Arcs incidents extérieurs du point d'entrée à valeur 0 : %s", ans)
res = res and ans
if res:
log.info("Le graphe est un graphe d'ordonnancement")
else:
log.info("Le graphe n'est pas un graphe d'ordonnancement")
self.est_ordonnancement = res
return res
def calc_calend_plus_tot(self):
"""
Calcul le calendrier au plus tôt si le graphe est un graphe d'ordonnancement
version: 1.0
"""
if self.est_ordonnancement == 'u':
log.error("Le graphe n'as pas été testé pour l'ordonnancement")
elif self.est_ordonnancement:
log.info("Calcul du calendrier au plus tôt")
# Création de la liste des sommets ordonnés par rang croissant
sommets = []
for rang in range(0, max(self.rang)+1):
for sommet in range(0, self.nb_sommets):
if self.rang[sommet] == rang:
sommets.append(sommet)
# Initialisation du calendrier
for i in range(self.nb_sommets):
self.dates_au_plus_tot.append('*')
# Date de départ
i = self.rang.index(0)
self.dates_au_plus_tot[i] = 0
sommets.remove(i)
log.info("Sommet 0 date au plus tot : 0")
for sommet in sommets:
# Construction de la liste des prédécesseurs
liste_pred = []
for pred in range(0, self.nb_sommets):
if self.m_adjacence[pred][sommet]:
liste_pred.append(pred)
# Calcul des dates par prédécesseurs
dates = []
for pred in liste_pred:
dates.append(self.dates_au_plus_tot[pred] + self.m_valeurs[pred][sommet])
# Calcul de la dates au plus tôt
self.dates_au_plus_tot[sommet] = max(dates)
log.info("Sommet %d date au plus tot : %d", sommet, self.dates_au_plus_tot[sommet])
log.info("\nSommets:\t\t\t%s", ''.join('%d\t' % i for i in range(0, self.nb_sommets)))
log.info("Dates au plus tot:\t%s", ''.join('%s\t' % i for i in self.dates_au_plus_tot))
else:
log.error("Le graphe n'est pas un graphe d'ordonnancement")
def calc_calend_plus_tard(self):
"""
Calcul du calendrier au plus tard
version: 1.0
"""
if len(self.dates_au_plus_tot) > 0:
log.info("Calcul du calendrier au plus tard :")
# Création de la liste des sommets ordonnés par rang décroissant
sommets = []
for rang in range(0, max(self.rang)+1):
for sommet in range(0, self.nb_sommets):
if self.rang[sommet] == rang:
sommets.insert(0, sommet)
# Initialisation du calendrier
self.dates_au_plus_tard = ['*' for _ in range(0, self.nb_sommets)]
# Date de fin
fin = self.rang.index(max(self.rang))
self.dates_au_plus_tard[fin] = self.dates_au_plus_tot[fin]
sommets.remove(fin)
log.info("Sommet %d date au plus tard : %d", fin, self.dates_au_plus_tard[fin])
for sommet in sommets:
# Construction de la liste des successeurs
liste_succ = []
for succ in range(0, self.nb_sommets):
if self.m_adjacence[sommet][succ]:
liste_succ.append(succ)
# Calcul des dates par successeur
dates = []
for succ in liste_succ:
dates.append(self.dates_au_plus_tard[succ] - self.m_valeurs[sommet][succ])
# Calcule de la dates au plus tard
self.dates_au_plus_tard[sommet] = min(dates)
log.info("Sommet %d date au plus tard : %d",
sommet, self.dates_au_plus_tard[sommet])
log.info("\nSommets:\t\t\t%s", ''.join('%d\t' % i for i in range(0, self.nb_sommets)))
log.info("Dates au plus tard:\t%s",
''.join('%d\t' % i for i in self.dates_au_plus_tard))
else:
log.error("Le calendrier au plus tôt n'est pas calculé")
def calc_marges(self):
"""
Calcul les marges totales et libres
version: 1.1
"""
# Calcul des marges totales
log.info("Calcule des marges Totales :")
for i in range(0, self.nb_sommets):
self.marges_totales.append(self.dates_au_plus_tard[i] - self.dates_au_plus_tot[i])
log.info("Sommet %d --> marge totale : %d", i, self.marges_totales[i])
log.info("\nSommets:\t\t%s", ''.join('%d\t' % i for i in range(0, self.nb_sommets)))
log.info("Marges Totales:\t%s", ''.join('%d\t' % i for i in self.marges_totales))
# Calcul des marges libres
log.info("Calcul des marges Libres :")
for sommet in range(0, self.nb_sommets - 1):
# Construction de la liste des successeurs
liste_succ = []
for succ in range(0, self.nb_sommets):
if self.m_adjacence[sommet][succ]:
liste_succ.append(succ)
# Calcul de la marge libre par successeur
marges_libres = []
for succ in liste_succ:
marges_libres.append(
self.dates_au_plus_tot[succ]
- self.dates_au_plus_tot[sommet]
- self.m_valeurs[sommet][succ])
self.marges_libres.append(min(marges_libres))
log.info("Sommet %d --> marge libre %d", sommet, self.marges_libres[sommet])
self.marges_libres.append(0)
log.info("Sommet %d --> marge libre %d",
self.nb_sommets-1, self.marges_libres[self.nb_sommets-1])
log.info("\nSommets:\t\t%s", ''.join('%d\t' % i for i in range(0, self.nb_sommets)))
log.info("Marges Libres:\t%s", ''.join('%d\t' % i for i in self.marges_libres))
| [
37811,
198,
220,
220,
220,
2393,
1058,
4823,
13,
9078,
198,
220,
220,
220,
1772,
7,
82,
8,
1058,
5658,
406,
12394,
1565,
37,
11,
39734,
33290,
35755,
1340,
198,
220,
220,
220,
10628,
1058,
718,
13,
15,
628,
220,
220,
220,
30396,
390,
8591,
537,
21612,
29681,
45567,
583,
4164,
390,
4283,
263,
555,
4823,
11367,
2634,
2123,
390,
300,
9019,
198,
220,
220,
220,
3680,
1557,
263,
814,
2634,
1156,
82,
8385,
6880,
13,
198,
37811,
198,
198,
11748,
269,
21370,
198,
11748,
18931,
355,
2604,
198,
198,
4871,
29681,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
537,
21612,
29681,
220,
1058,
41575,
20954,
21872,
555,
23360,
258,
11367,
2634,
198,
220,
220,
220,
220,
220,
220,
220,
10628,
25,
642,
13,
15,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28407,
23365,
390,
8591,
537,
21612,
29681,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10628,
25,
604,
13,
15,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
46803,
62,
82,
2002,
1039,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
46803,
62,
5605,
82,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
76,
62,
324,
30482,
594,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
76,
62,
41161,
1834,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3642,
1153,
62,
21170,
5013,
796,
705,
84,
6,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
36985,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
395,
62,
9999,
41601,
434,
796,
705,
84,
6,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
446,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30887,
274,
62,
83,
313,
2040,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30887,
274,
62,
8019,
411,
796,
17635,
628,
220,
220,
220,
825,
1100,
62,
7753,
7,
944,
11,
2209,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
20260,
555,
23360,
258,
1207,
84,
271,
555,
277,
488,
959,
256,
742,
35851,
5794,
269,
21370,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2196,
1058,
352,
13,
18,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
300,
62,
8516,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
21975,
8,
355,
269,
21370,
7753,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9173,
796,
269,
21370,
13,
46862,
7,
40664,
7753,
11,
46728,
2676,
11639,
26,
3256,
28411,
28,
40664,
13,
10917,
23051,
62,
45,
1340,
41359,
1137,
2149,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
4283,
496,
10042,
7626,
748,
836,
77,
2634,
274,
288,
504,
555,
3084,
559,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
5752,
287,
9173,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
62,
8516,
13,
33295,
26933,
600,
7,
72,
8,
329,
1312,
287,
5752,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
10786,
28316,
972,
7043,
277,
488,
959,
1058,
4064,
82,
3256,
2209,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
22236,
7043,
299,
2381,
260,
390,
264,
2002,
1039,
2123,
288,
6,
5605,
82,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
46803,
62,
82,
2002,
1039,
796,
493,
7,
75,
62,
8516,
58,
15,
7131,
15,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
10786,
4,
67,
264,
2002,
1039,
3256,
2116,
13,
46803,
62,
82,
2002,
1039,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
46803,
62,
5605,
82,
796,
493,
7,
75,
62,
8516,
58,
16,
7131,
15,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
10786,
4,
67,
44606,
3256,
2116,
13,
46803,
62,
82,
2002,
1039,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
20768,
5612,
748,
2603,
45977,
288,
6,
324,
30482,
1072,
2123,
748,
410,
1000,
1834,
198,
220,
220,
220,
220,
220,
220,
220,
329,
4808,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
48946,
62,
324,
30482,
594,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
48946,
62,
41161,
333,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
4808,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
48946,
62,
324,
30482,
594,
13,
33295,
7,
25101,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
48946,
62,
41161,
333,
13,
33295,
10786,
9,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
76,
62,
324,
30482,
594,
13,
33295,
7,
75,
48946,
62,
324,
30482,
594,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
76,
62,
41161,
1834,
13,
33295,
7,
75,
48946,
62,
41161,
333,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
10786,
24243,
5612,
748,
2603,
45977,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
38251,
22213,
495,
748,
44606,
288,
504,
10287,
2603,
20970,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
10786,
28316,
972,
748,
44606,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
329,
10389,
287,
300,
62,
8516,
58,
17,
25,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
316,
62,
10378,
433,
796,
493,
7,
5605,
58,
15,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
316,
62,
283,
11590,
68,
796,
493,
7,
5605,
58,
16,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
745,
312,
796,
10389,
58,
17,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
76,
62,
324,
30482,
594,
58,
82,
2002,
316,
62,
10378,
433,
7131,
82,
2002,
316,
62,
283,
11590,
68,
60,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
76,
62,
41161,
1834,
58,
82,
2002,
316,
62,
10378,
433,
7131,
82,
2002,
316,
62,
283,
11590,
68,
60,
796,
745,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
10786,
4,
67,
14610,
4064,
67,
796,
4064,
67,
3256,
264,
2002,
316,
62,
10378,
433,
11,
264,
2002,
316,
62,
283,
11590,
68,
11,
745,
312,
8,
628,
220,
220,
220,
1303,
284,
466,
25,
1703,
2634,
4528,
11934,
300,
6,
2001,
488,
496,
748,
2603,
1063,
198,
220,
220,
220,
825,
11593,
2536,
834,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
376,
261,
596,
390,
41575,
20954,
298,
341,
35851,
5794,
4731,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10628,
25,
352,
13,
16,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
796,
366,
38,
2416,
258,
1058,
59,
77,
532,
1391,
15,
92,
264,
2002,
1039,
63,
59,
77,
532,
1391,
16,
92,
44606,
59,
77,
1911,
18982,
7,
944,
13,
46803,
62,
82,
2002,
1039,
11,
2116,
13,
46803,
62,
5605,
82,
8,
198,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
366,
19044,
20970,
288,
6,
2782,
30482,
594,
1058,
59,
77,
59,
83,
1,
198,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
45144,
15,
32239,
83,
1911,
18982,
7,
82,
2002,
316,
8,
198,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
705,
59,
77,
6,
198,
220,
220,
220,
220,
220,
220,
220,
773,
501,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
329,
300,
48946,
287,
2116,
13,
76,
62,
324,
30482,
594,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
45144,
15,
32239,
83,
1911,
18982,
7,
521,
501,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1339,
287,
300,
48946,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
45144,
15,
32239,
83,
1911,
18982,
10786,
53,
6,
611,
1339,
2073,
705,
37,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
705,
59,
77,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
773,
501,
15853,
352,
628,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
705,
19044,
20970,
748,
31832,
1834,
1058,
59,
77,
6,
198,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
37082,
83,
1,
198,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
45144,
15,
32239,
83,
1911,
18982,
7,
82,
2002,
316,
8,
198,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
705,
59,
77,
6,
628,
220,
220,
220,
220,
220,
220,
220,
773,
501,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
329,
300,
48946,
287,
2116,
13,
76,
62,
41161,
1834,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
45144,
15,
32239,
83,
1911,
18982,
7,
521,
501,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1339,
287,
300,
48946,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
45144,
15,
32239,
83,
1911,
18982,
7,
7442,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41575,
62,
2536,
15853,
705,
59,
77,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
773,
501,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
41575,
62,
2536,
628,
220,
220,
220,
825,
13326,
62,
21170,
5013,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19305,
2395,
33721,
443,
23360,
258,
542,
1153,
555,
10349,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4990,
454,
710,
6407,
33721,
443,
23360,
258,
542,
1153,
35851,
6941,
1040,
555,
10349,
10352,
7813,
261,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43052,
22213,
38251,
13528,
972,
443,
1255,
265,
969,
8591,
15159,
25125,
2634,
542,
1153,
62,
21170,
5013,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10628,
25,
352,
13,
17,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
11242,
3213,
390,
10349,
59,
77,
44,
2634,
400,
1098,
390,
288,
25125,
3213,
748,
2173,
288,
6,
298,
81,
20954,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
1351,
68,
62,
82,
2002,
1039,
796,
1351,
7,
9521,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
11143,
263,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
981,
11143,
263,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11143,
263,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
316,
62,
64,
62,
37330,
81,
796,
17635,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3311,
372,
2395,
748,
264,
2002,
1039,
38078,
778,
2634,
67,
2634,
728,
325,
333,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
62,
283,
11590,
68,
287,
1351,
68,
62,
82,
2002,
1039,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
468,
62,
28764,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
62,
10378,
433,
287,
1351,
68,
62,
82,
2002,
1039,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
468,
62,
28764,
796,
468,
62,
28764,
393,
2116,
13,
76,
62,
324,
30482,
594,
58,
82,
2002,
316,
62,
10378,
433,
7131,
82,
2002,
316,
62,
283,
11590,
68,
60,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
468,
62,
28764,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
316,
62,
64,
62,
37330,
81,
13,
33295,
7,
82,
2002,
316,
62,
283,
11590,
68,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
8105,
2234,
748,
264,
2002,
1039,
38078,
778,
2634,
67,
2634,
728,
325,
333,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
287,
264,
2002,
316,
62,
64,
62,
37330,
81,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1351,
68,
62,
82,
2002,
1039,
13,
28956,
7,
82,
2002,
316,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
33947,
494,
390,
35833,
2375,
33721,
319,
257,
38836,
1005,
343,
2634,
390,
264,
2002,
1039,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11143,
263,
796,
18896,
7,
82,
2002,
316,
62,
64,
62,
37330,
81,
8,
1875,
657,
290,
18896,
7,
4868,
68,
62,
82,
2002,
1039,
8,
1875,
657,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
40710,
288,
6,
298,
81,
20954,
1058,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
11143,
263,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7,
82,
2002,
316,
62,
64,
62,
37330,
81,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
50,
2002,
1039,
1334,
415,
1058,
59,
77,
4,
82,
1600,
1351,
68,
62,
82,
2002,
1039,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
10786,
32,
1229,
403,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
1550,
2754,
68,
33721,
4229,
1334,
68,
748,
264,
2002,
1039,
12797,
6799,
10840,
33721,
4229,
331,
257,
555,
10349,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3642,
1153,
62,
21170,
5013,
796,
18896,
7,
4868,
68,
62,
82,
2002,
1039,
8,
14512,
657,
628,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
3642,
1153,
62,
21170,
5013,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
10786,
3123,
23360,
258,
542,
1153,
35851,
6941,
1040,
555,
10349,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
10786,
3123,
23360,
258,
497,
542,
1153,
257,
1229,
403,
10349,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
3642,
1153,
62,
21170,
5013,
628,
220,
220,
220,
825,
42302,
62,
36985,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27131,
443,
28077,
390,
17792,
4188,
264,
2002,
316,
7043,
23360,
258,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2196,
25,
352,
13,
17,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
3642,
1153,
62,
21170,
5013,
6624,
705,
84,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
43917,
7203,
9771,
3129,
748,
374,
27725,
5340,
1058,
13326,
31560,
5013,
3419,
466,
270,
6184,
103,
33945,
300,
1192,
22161,
1196,
415,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
2116,
13,
3642,
1153,
62,
21170,
5013,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
43917,
7203,
26950,
4733,
390,
5204,
263,
10287,
374,
27725,
1058,
778,
20954,
594,
288,
6,
403,
10349,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2558,
498,
5612,
390,
8591,
1351,
68,
748,
374,
27725,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
36985,
796,
685,
15,
329,
4808,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
15437,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1351,
68,
62,
82,
2002,
1039,
796,
1351,
7,
9521,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11143,
263,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28077,
796,
657,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
981,
11143,
263,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3311,
372,
2395,
748,
264,
2002,
1039,
38078,
778,
2634,
67,
2634,
728,
325,
333,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
316,
62,
64,
62,
37330,
81,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
62,
283,
11590,
68,
287,
1351,
68,
62,
82,
2002,
1039,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
468,
62,
28764,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
62,
10378,
433,
287,
1351,
68,
62,
82,
2002,
1039,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
468,
62,
28764,
796,
468,
62,
28764,
393,
2116,
13,
76,
62,
324,
30482,
594,
58,
82,
2002,
316,
62,
10378,
433,
7131,
82,
2002,
316,
62,
283,
11590,
68,
60,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
468,
62,
28764,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
316,
62,
64,
62,
37330,
81,
13,
33295,
7,
82,
2002,
316,
62,
283,
11590,
68,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
8105,
2234,
748,
264,
2002,
1039,
38078,
778,
2634,
67,
2634,
728,
325,
333,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
287,
264,
2002,
316,
62,
64,
62,
37330,
81,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1351,
68,
62,
82,
2002,
1039,
13,
28956,
7,
82,
2002,
316,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
36985,
58,
82,
2002,
316,
60,
796,
28077,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
49,
648,
1093,
415,
796,
4064,
67,
59,
77,
40710,
288,
6,
298,
81,
20954,
1058,
59,
77,
4,
82,
1600,
28077,
11,
264,
2002,
316,
62,
64,
62,
37330,
81,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28077,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11143,
263,
796,
18896,
7,
4868,
68,
62,
82,
2002,
1039,
8,
1875,
657,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
38,
2416,
258,
18784,
59,
77,
49,
27725,
5204,
20954,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
50,
2002,
1039,
1058,
59,
83,
4,
82,
1600,
705,
4458,
22179,
7,
14692,
4,
67,
59,
83,
1,
4064,
1312,
329,
1312,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
15437,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
49,
648,
1058,
59,
83,
59,
83,
4,
82,
1600,
705,
4458,
22179,
7,
14692,
4,
67,
59,
83,
1,
4064,
1312,
329,
1312,
287,
2116,
13,
36985,
60,
4008,
628,
220,
220,
220,
825,
1556,
62,
34960,
62,
9999,
41601,
434,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
569,
42445,
361,
494,
33721,
269,
6,
395,
555,
23360,
258,
288,
6,
9999,
41601,
434,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10628,
25,
352,
13,
17,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
13414,
2649,
627,
6,
346,
264,
6,
363,
270,
288,
6,
403,
23360,
258,
288,
6,
9999,
41601,
434,
1058,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
360,
25125,
3213,
288,
6,
403,
384,
377,
966,
288,
6,
298,
81,
22161,
198,
220,
220,
220,
220,
220,
220,
220,
581,
796,
2116,
13,
36985,
13,
9127,
7,
15,
8,
6624,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
32,
627,
6,
403,
384,
377,
966,
288,
6,
298,
631,
1058,
4064,
82,
1600,
581,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
360,
25125,
3213,
288,
6,
403,
384,
377,
966,
390,
3297,
494,
198,
220,
220,
220,
220,
220,
220,
220,
9093,
796,
2116,
13,
36985,
13,
9127,
7,
9806,
7,
944,
13,
36985,
4008,
6624,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
32,
627,
6,
403,
384,
377,
966,
390,
3297,
494,
1058,
4064,
82,
1600,
9093,
8,
198,
220,
220,
220,
220,
220,
220,
220,
581,
796,
581,
290,
9093,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
569,
2634,
38763,
390,
8591,
778,
20954,
594,
288,
6,
403,
10349,
198,
220,
220,
220,
220,
220,
220,
220,
9093,
796,
407,
2116,
13,
3642,
1153,
62,
21170,
5013,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
8199,
542,
1153,
38836,
555,
10349,
25,
4064,
82,
1600,
9093,
8,
198,
220,
220,
220,
220,
220,
220,
220,
581,
796,
581,
290,
9093,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
569,
2634,
38763,
748,
745,
2340,
1852,
6368,
12797,
256,
516,
10287,
44606,
10207,
1646,
300,
447,
247,
2302,
2634,
5034,
333,
28141,
555,
264,
2002,
316,
198,
220,
220,
220,
220,
220,
220,
220,
9093,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
329,
300,
48946,
287,
2116,
13,
76,
62,
41161,
1834,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
796,
657,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
981,
300,
48946,
58,
72,
60,
6624,
705,
9,
6,
290,
1312,
1279,
2116,
13,
46803,
62,
82,
2002,
1039,
12,
16,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
15853,
352,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
569,
2634,
38763,
38836,
288,
447,
247,
5605,
82,
28141,
410,
1000,
333,
299,
2634,
70,
876,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
1930,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
300,
48946,
58,
72,
60,
14512,
705,
9,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
1930,
796,
300,
48946,
58,
72,
60,
18189,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9093,
796,
9093,
290,
318,
62,
1930,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1339,
287,
300,
48946,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9093,
796,
9093,
290,
357,
7442,
6624,
705,
9,
6,
393,
1339,
6624,
300,
48946,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
3163,
6359,
10207,
1070,
2634,
5034,
1834,
46436,
361,
82,
2123,
38251,
70,
14644,
12797,
17792,
4188,
264,
2002,
316,
25,
4064,
82,
1600,
9093,
8,
198,
220,
220,
220,
220,
220,
220,
220,
581,
796,
581,
290,
9093,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
943,
6359,
10207,
1646,
300,
447,
247,
2302,
2634,
5034,
333,
35851,
966,
288,
447,
247,
298,
81,
22161,
390,
410,
1000,
333,
299,
377,
293,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
796,
2116,
13,
36985,
13,
9630,
7,
15,
8,
628,
220,
220,
220,
220,
220,
220,
220,
9093,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1339,
287,
2116,
13,
76,
62,
41161,
1834,
58,
72,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9093,
796,
9093,
290,
357,
7442,
6624,
705,
9,
6,
393,
1339,
6624,
657,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
3163,
6359,
10207,
1070,
2634,
5034,
1834,
7043,
966,
288,
6,
298,
81,
22161,
28141,
410,
1000,
333,
657,
1058,
4064,
82,
1600,
9093,
8,
198,
220,
220,
220,
220,
220,
220,
220,
581,
796,
581,
290,
9093,
628,
220,
220,
220,
220,
220,
220,
220,
611,
581,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
3123,
23360,
258,
1556,
555,
23360,
258,
288,
6,
9999,
41601,
434,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
3123,
23360,
258,
299,
6,
395,
38836,
555,
23360,
258,
288,
6,
9999,
41601,
434,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
395,
62,
9999,
41601,
434,
796,
581,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
581,
628,
220,
220,
220,
825,
42302,
62,
9948,
437,
62,
9541,
62,
83,
313,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27131,
443,
2386,
437,
5277,
35851,
5556,
256,
27083,
83,
33721,
443,
23360,
258,
1556,
555,
23360,
258,
288,
6,
9999,
41601,
434,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2196,
25,
352,
13,
15,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
395,
62,
9999,
41601,
434,
6624,
705,
84,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
18224,
7203,
3123,
23360,
258,
299,
6,
292,
38836,
220,
25125,
2634,
1332,
2634,
12797,
300,
6,
9999,
41601,
434,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
2116,
13,
395,
62,
9999,
41601,
434,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
9771,
3129,
7043,
2386,
437,
5277,
35851,
5556,
256,
27083,
83,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3864,
2634,
341,
390,
8591,
1351,
68,
748,
264,
2002,
1039,
2760,
261,
77,
20954,
1582,
28077,
6763,
747,
415,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
1039,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
28077,
287,
2837,
7,
15,
11,
3509,
7,
944,
13,
36985,
47762,
16,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
36985,
58,
82,
2002,
316,
60,
6624,
28077,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
1039,
13,
33295,
7,
82,
2002,
316,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
20768,
5612,
7043,
2386,
437,
5277,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2837,
7,
944,
13,
46803,
62,
82,
2002,
1039,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
13,
33295,
10786,
9,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
7536,
390,
39073,
3911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
796,
2116,
13,
36985,
13,
9630,
7,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
58,
72,
60,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
1039,
13,
28956,
7,
72,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
50,
2002,
316,
657,
3128,
35851,
5556,
2006,
1058,
657,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
287,
264,
2002,
1039,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
20395,
390,
8591,
1351,
68,
748,
778,
2634,
67,
2634,
728,
325,
1834,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1351,
68,
62,
28764,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
2747,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
76,
62,
324,
30482,
594,
58,
28764,
7131,
82,
2002,
316,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1351,
68,
62,
28764,
13,
33295,
7,
28764,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
27131,
748,
9667,
1582,
778,
2634,
67,
2634,
728,
325,
1834,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9667,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
2747,
287,
1351,
68,
62,
28764,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9667,
13,
33295,
7,
944,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
58,
28764,
60,
1343,
2116,
13,
76,
62,
41161,
1834,
58,
28764,
7131,
82,
2002,
316,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
27131,
390,
8591,
9667,
35851,
5556,
256,
27083,
83,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
58,
82,
2002,
316,
60,
796,
3509,
7,
19581,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
50,
2002,
316,
4064,
67,
3128,
35851,
5556,
2006,
1058,
4064,
67,
1600,
264,
2002,
316,
11,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
58,
82,
2002,
316,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
59,
77,
50,
2002,
1039,
7479,
83,
59,
83,
59,
83,
4,
82,
1600,
705,
4458,
22179,
10786,
4,
67,
59,
83,
6,
4064,
1312,
329,
1312,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
35,
689,
35851,
5556,
2006,
7479,
83,
4,
82,
1600,
705,
4458,
22179,
10786,
4,
82,
59,
83,
6,
4064,
1312,
329,
1312,
287,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
18224,
7203,
3123,
23360,
258,
299,
6,
395,
38836,
555,
23360,
258,
288,
6,
9999,
41601,
434,
4943,
628,
220,
220,
220,
825,
42302,
62,
9948,
437,
62,
9541,
62,
83,
446,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27131,
7043,
2386,
437,
5277,
35851,
5556,
256,
446,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2196,
25,
352,
13,
15,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
18896,
7,
944,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
8,
1875,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
9771,
3129,
7043,
2386,
437,
5277,
35851,
5556,
256,
446,
1058,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3864,
2634,
341,
390,
8591,
1351,
68,
748,
264,
2002,
1039,
2760,
261,
77,
20954,
1582,
28077,
39073,
19915,
747,
415,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
1039,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
28077,
287,
2837,
7,
15,
11,
3509,
7,
944,
13,
36985,
47762,
16,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
36985,
58,
82,
2002,
316,
60,
6624,
28077,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
1039,
13,
28463,
7,
15,
11,
264,
2002,
316,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
20768,
5612,
7043,
2386,
437,
5277,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
446,
796,
37250,
9,
6,
329,
4808,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
15437,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
7536,
390,
957,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
957,
796,
2116,
13,
36985,
13,
9630,
7,
9806,
7,
944,
13,
36985,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
446,
58,
15643,
60,
796,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
58,
15643,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
1039,
13,
28956,
7,
15643,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
50,
2002,
316,
4064,
67,
3128,
35851,
5556,
256,
446,
1058,
4064,
67,
1600,
957,
11,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
446,
58,
15643,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
287,
264,
2002,
1039,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
20395,
390,
8591,
1351,
68,
748,
17458,
35270,
1834,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1351,
68,
62,
2385,
535,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
17458,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
76,
62,
324,
30482,
594,
58,
82,
2002,
316,
7131,
2385,
535,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1351,
68,
62,
2385,
535,
13,
33295,
7,
2385,
535,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
27131,
748,
9667,
1582,
17458,
35270,
333,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9667,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
17458,
287,
1351,
68,
62,
2385,
535,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9667,
13,
33295,
7,
944,
13,
19581,
62,
559,
62,
9541,
62,
83,
446,
58,
2385,
535,
60,
532,
2116,
13,
76,
62,
41161,
1834,
58,
82,
2002,
316,
7131,
2385,
535,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2199,
23172,
390,
8591,
9667,
35851,
5556,
256,
446,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
446,
58,
82,
2002,
316,
60,
796,
949,
7,
19581,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
50,
2002,
316,
4064,
67,
3128,
35851,
5556,
256,
446,
1058,
4064,
67,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
2002,
316,
11,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
446,
58,
82,
2002,
316,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
59,
77,
50,
2002,
1039,
7479,
83,
59,
83,
59,
83,
4,
82,
1600,
705,
4458,
22179,
10786,
4,
67,
59,
83,
6,
4064,
1312,
329,
1312,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
35,
689,
35851,
5556,
256,
446,
7479,
83,
4,
82,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
4458,
22179,
10786,
4,
67,
59,
83,
6,
4064,
1312,
329,
1312,
287,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
446,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
18224,
7203,
3123,
2386,
437,
5277,
35851,
5556,
256,
27083,
83,
299,
6,
395,
38836,
5204,
2634,
4943,
628,
220,
220,
220,
825,
42302,
62,
30887,
274,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27131,
10287,
6145,
274,
2006,
2040,
2123,
9195,
411,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2196,
25,
352,
13,
16,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
27131,
748,
6145,
274,
2006,
2040,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
9771,
23172,
748,
6145,
274,
20323,
2040,
1058,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30887,
274,
62,
83,
313,
2040,
13,
33295,
7,
944,
13,
19581,
62,
559,
62,
9541,
62,
83,
446,
58,
72,
60,
532,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
58,
72,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
50,
2002,
316,
4064,
67,
14610,
285,
1376,
2006,
1000,
1058,
4064,
67,
1600,
1312,
11,
2116,
13,
30887,
274,
62,
83,
313,
2040,
58,
72,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
59,
77,
50,
2002,
1039,
7479,
83,
59,
83,
4,
82,
1600,
705,
4458,
22179,
10786,
4,
67,
59,
83,
6,
4064,
1312,
329,
1312,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
24428,
274,
20323,
2040,
7479,
83,
4,
82,
1600,
705,
4458,
22179,
10786,
4,
67,
59,
83,
6,
4064,
1312,
329,
1312,
287,
2116,
13,
30887,
274,
62,
83,
313,
2040,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
27131,
748,
6145,
274,
9195,
411,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
9771,
3129,
748,
6145,
274,
7980,
411,
1058,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
329,
264,
2002,
316,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
532,
352,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
20395,
390,
8591,
1351,
68,
748,
17458,
35270,
1834,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1351,
68,
62,
2385,
535,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
17458,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
76,
62,
324,
30482,
594,
58,
82,
2002,
316,
7131,
2385,
535,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1351,
68,
62,
2385,
535,
13,
33295,
7,
2385,
535,
8,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
27131,
390,
8591,
285,
1376,
9195,
260,
1582,
17458,
35270,
333,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6145,
274,
62,
8019,
411,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
17458,
287,
1351,
68,
62,
2385,
535,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6145,
274,
62,
8019,
411,
13,
33295,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
58,
2385,
535,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
2116,
13,
19581,
62,
559,
62,
9541,
62,
83,
313,
58,
82,
2002,
316,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
2116,
13,
76,
62,
41161,
1834,
58,
82,
2002,
316,
7131,
2385,
535,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30887,
274,
62,
8019,
411,
13,
33295,
7,
1084,
7,
30887,
274,
62,
8019,
411,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
50,
2002,
316,
4064,
67,
14610,
285,
1376,
9195,
260,
4064,
67,
1600,
264,
2002,
316,
11,
2116,
13,
30887,
274,
62,
8019,
411,
58,
82,
2002,
316,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
30887,
274,
62,
8019,
411,
13,
33295,
7,
15,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
50,
2002,
316,
4064,
67,
14610,
285,
1376,
9195,
260,
4064,
67,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
46803,
62,
82,
2002,
1039,
12,
16,
11,
2116,
13,
30887,
274,
62,
8019,
411,
58,
944,
13,
46803,
62,
82,
2002,
1039,
12,
16,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
59,
77,
50,
2002,
1039,
7479,
83,
59,
83,
4,
82,
1600,
705,
4458,
22179,
10786,
4,
67,
59,
83,
6,
4064,
1312,
329,
1312,
287,
2837,
7,
15,
11,
2116,
13,
46803,
62,
82,
2002,
1039,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
10951,
7203,
24428,
274,
7980,
411,
7479,
83,
4,
82,
1600,
705,
4458,
22179,
10786,
4,
67,
59,
83,
6,
4064,
1312,
329,
1312,
287,
2116,
13,
30887,
274,
62,
8019,
411,
4008,
198
] | 1.87034 | 7,913 |
#EJEMPLO DE BLINKING CON RASPBERRY PI
#Escrito por Gl4r3
import RPi.GPIO as GPIO #importamos la libreria y cambiamos su nombre por "GPIO"
import time #necesario para los delays
#establecemos el sistema de numeracion que queramos, en mi caso BCM
GPIO.setmode(GPIO.BCM)
#configuramos el pin GPIO17 como una salida
GPIO.setup(17, GPIO.OUT)
#encendemos y apagamos el led 5 veces
for i in range(0,200):
GPIO.output(17, GPIO.HIGH)
time.sleep(0.05)
GPIO.output(17, GPIO.LOW)
time.sleep(0.05)
GPIO.cleanup() #devuelve los pines a su estado inicial
| [
2,
36,
41,
3620,
6489,
46,
5550,
9878,
17248,
2751,
7102,
371,
1921,
47,
13246,
18276,
30434,
198,
2,
47051,
39834,
16964,
2671,
19,
81,
18,
198,
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
1303,
11748,
321,
418,
8591,
9195,
260,
7496,
331,
269,
4131,
1789,
418,
424,
299,
2381,
260,
16964,
366,
16960,
9399,
1,
198,
11748,
640,
1303,
710,
728,
4982,
31215,
22346,
16119,
198,
220,
198,
2,
395,
540,
344,
16785,
1288,
264,
396,
19687,
390,
5470,
49443,
8358,
42517,
321,
418,
11,
551,
21504,
6124,
78,
11843,
44,
198,
16960,
9399,
13,
2617,
14171,
7,
16960,
9399,
13,
2749,
44,
8,
198,
220,
198,
2,
11250,
333,
321,
418,
1288,
6757,
50143,
1558,
401,
78,
555,
64,
3664,
3755,
198,
16960,
9399,
13,
40406,
7,
1558,
11,
50143,
13,
12425,
8,
198,
220,
198,
2,
12685,
437,
368,
418,
331,
2471,
363,
321,
418,
1288,
2957,
642,
1569,
728,
198,
1640,
1312,
287,
2837,
7,
15,
11,
2167,
2599,
628,
220,
220,
220,
50143,
13,
22915,
7,
1558,
11,
50143,
13,
39,
18060,
8,
198,
220,
220,
220,
640,
13,
42832,
7,
15,
13,
2713,
8,
198,
220,
220,
220,
50143,
13,
22915,
7,
1558,
11,
50143,
13,
43,
3913,
8,
198,
220,
220,
220,
640,
13,
42832,
7,
15,
13,
2713,
8,
198,
198,
16960,
9399,
13,
27773,
929,
3419,
220,
1303,
7959,
2731,
303,
22346,
279,
1127,
257,
424,
1556,
4533,
287,
6652,
198
] | 2.344398 | 241 |
# coding: utf-8
"""
Blog Post endpoints
\"Use these endpoints for interacting with Blog Posts, Blog Authors, and Blog Tags\" # noqa: E501
The version of the OpenAPI document: v3
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from hubspot.cms.blogs.blog_posts.configuration import Configuration
class Styles(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
"vertical_alignment": "str",
"background_color": "RGBAColor",
"background_image": "BackgroundImage",
"background_gradient": "Gradient",
"max_width_section_centering": "int",
"force_full_width_section": "bool",
"flexbox_positioning": "str",
}
attribute_map = {
"vertical_alignment": "verticalAlignment",
"background_color": "backgroundColor",
"background_image": "backgroundImage",
"background_gradient": "backgroundGradient",
"max_width_section_centering": "maxWidthSectionCentering",
"force_full_width_section": "forceFullWidthSection",
"flexbox_positioning": "flexboxPositioning",
}
def __init__(
self,
vertical_alignment=None,
background_color=None,
background_image=None,
background_gradient=None,
max_width_section_centering=None,
force_full_width_section=None,
flexbox_positioning=None,
local_vars_configuration=None,
): # noqa: E501
"""Styles - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._vertical_alignment = None
self._background_color = None
self._background_image = None
self._background_gradient = None
self._max_width_section_centering = None
self._force_full_width_section = None
self._flexbox_positioning = None
self.discriminator = None
self.vertical_alignment = vertical_alignment
self.background_color = background_color
self.background_image = background_image
self.background_gradient = background_gradient
self.max_width_section_centering = max_width_section_centering
self.force_full_width_section = force_full_width_section
self.flexbox_positioning = flexbox_positioning
@property
def vertical_alignment(self):
"""Gets the vertical_alignment of this Styles. # noqa: E501
:return: The vertical_alignment of this Styles. # noqa: E501
:rtype: str
"""
return self._vertical_alignment
@vertical_alignment.setter
def vertical_alignment(self, vertical_alignment):
"""Sets the vertical_alignment of this Styles.
:param vertical_alignment: The vertical_alignment of this Styles. # noqa: E501
:type: str
"""
if (
self.local_vars_configuration.client_side_validation
and vertical_alignment is None
): # noqa: E501
raise ValueError(
"Invalid value for `vertical_alignment`, must not be `None`"
) # noqa: E501
allowed_values = ["TOP", "MIDDLE", "BOTTOM"] # noqa: E501
if (
self.local_vars_configuration.client_side_validation
and vertical_alignment not in allowed_values
): # noqa: E501
raise ValueError(
"Invalid value for `vertical_alignment` ({0}), must be one of {1}".format( # noqa: E501
vertical_alignment, allowed_values
)
)
self._vertical_alignment = vertical_alignment
@property
def background_color(self):
"""Gets the background_color of this Styles. # noqa: E501
:return: The background_color of this Styles. # noqa: E501
:rtype: RGBAColor
"""
return self._background_color
@background_color.setter
def background_color(self, background_color):
"""Sets the background_color of this Styles.
:param background_color: The background_color of this Styles. # noqa: E501
:type: RGBAColor
"""
if (
self.local_vars_configuration.client_side_validation
and background_color is None
): # noqa: E501
raise ValueError(
"Invalid value for `background_color`, must not be `None`"
) # noqa: E501
self._background_color = background_color
@property
def background_image(self):
"""Gets the background_image of this Styles. # noqa: E501
:return: The background_image of this Styles. # noqa: E501
:rtype: BackgroundImage
"""
return self._background_image
@background_image.setter
def background_image(self, background_image):
"""Sets the background_image of this Styles.
:param background_image: The background_image of this Styles. # noqa: E501
:type: BackgroundImage
"""
if (
self.local_vars_configuration.client_side_validation
and background_image is None
): # noqa: E501
raise ValueError(
"Invalid value for `background_image`, must not be `None`"
) # noqa: E501
self._background_image = background_image
@property
def background_gradient(self):
"""Gets the background_gradient of this Styles. # noqa: E501
:return: The background_gradient of this Styles. # noqa: E501
:rtype: Gradient
"""
return self._background_gradient
@background_gradient.setter
def background_gradient(self, background_gradient):
"""Sets the background_gradient of this Styles.
:param background_gradient: The background_gradient of this Styles. # noqa: E501
:type: Gradient
"""
if (
self.local_vars_configuration.client_side_validation
and background_gradient is None
): # noqa: E501
raise ValueError(
"Invalid value for `background_gradient`, must not be `None`"
) # noqa: E501
self._background_gradient = background_gradient
@property
def max_width_section_centering(self):
"""Gets the max_width_section_centering of this Styles. # noqa: E501
:return: The max_width_section_centering of this Styles. # noqa: E501
:rtype: int
"""
return self._max_width_section_centering
@max_width_section_centering.setter
def max_width_section_centering(self, max_width_section_centering):
"""Sets the max_width_section_centering of this Styles.
:param max_width_section_centering: The max_width_section_centering of this Styles. # noqa: E501
:type: int
"""
if (
self.local_vars_configuration.client_side_validation
and max_width_section_centering is None
): # noqa: E501
raise ValueError(
"Invalid value for `max_width_section_centering`, must not be `None`"
) # noqa: E501
self._max_width_section_centering = max_width_section_centering
@property
def force_full_width_section(self):
"""Gets the force_full_width_section of this Styles. # noqa: E501
:return: The force_full_width_section of this Styles. # noqa: E501
:rtype: bool
"""
return self._force_full_width_section
@force_full_width_section.setter
def force_full_width_section(self, force_full_width_section):
"""Sets the force_full_width_section of this Styles.
:param force_full_width_section: The force_full_width_section of this Styles. # noqa: E501
:type: bool
"""
if (
self.local_vars_configuration.client_side_validation
and force_full_width_section is None
): # noqa: E501
raise ValueError(
"Invalid value for `force_full_width_section`, must not be `None`"
) # noqa: E501
self._force_full_width_section = force_full_width_section
@property
def flexbox_positioning(self):
"""Gets the flexbox_positioning of this Styles. # noqa: E501
:return: The flexbox_positioning of this Styles. # noqa: E501
:rtype: str
"""
return self._flexbox_positioning
@flexbox_positioning.setter
def flexbox_positioning(self, flexbox_positioning):
"""Sets the flexbox_positioning of this Styles.
:param flexbox_positioning: The flexbox_positioning of this Styles. # noqa: E501
:type: str
"""
if (
self.local_vars_configuration.client_side_validation
and flexbox_positioning is None
): # noqa: E501
raise ValueError(
"Invalid value for `flexbox_positioning`, must not be `None`"
) # noqa: E501
allowed_values = [
"TOP_LEFT",
"TOP_CENTER",
"TOP_RIGHT",
"MIDDLE_LEFT",
"MIDDLE_CENTER",
"MIDDLE_RIGHT",
"BOTTOM_LEFT",
"BOTTOM_CENTER",
"BOTTOM_RIGHT",
] # noqa: E501
if (
self.local_vars_configuration.client_side_validation
and flexbox_positioning not in allowed_values
): # noqa: E501
raise ValueError(
"Invalid value for `flexbox_positioning` ({0}), must be one of {1}".format( # noqa: E501
flexbox_positioning, allowed_values
)
)
self._flexbox_positioning = flexbox_positioning
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(
map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)
)
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(
map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict")
else item,
value.items(),
)
)
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, Styles):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, Styles):
return True
return self.to_dict() != other.to_dict()
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
14001,
2947,
886,
13033,
628,
220,
220,
220,
19990,
11041,
777,
886,
13033,
329,
24986,
351,
14001,
12043,
11,
14001,
46665,
11,
290,
14001,
44789,
7879,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
383,
2196,
286,
262,
4946,
17614,
3188,
25,
410,
18,
198,
220,
220,
220,
2980,
515,
416,
25,
3740,
1378,
9654,
15042,
12,
8612,
1352,
13,
13670,
198,
37811,
628,
198,
11748,
279,
4798,
198,
11748,
302,
220,
1303,
645,
20402,
25,
376,
21844,
198,
198,
11748,
2237,
198,
198,
6738,
12575,
20485,
13,
46406,
13,
49096,
13,
14036,
62,
24875,
13,
11250,
3924,
1330,
28373,
628,
198,
4871,
44963,
7,
15252,
2599,
198,
220,
220,
220,
37227,
16580,
25,
770,
1398,
318,
8295,
7560,
416,
4946,
17614,
35986,
13,
198,
220,
220,
220,
6524,
25,
3740,
1378,
9654,
15042,
12,
8612,
1352,
13,
13670,
628,
220,
220,
220,
2141,
407,
4370,
262,
1398,
14500,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
220,
220,
1280,
15042,
62,
19199,
357,
11600,
2599,
383,
1994,
318,
11688,
1438,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
262,
1988,
318,
11688,
2099,
13,
198,
220,
220,
220,
220,
220,
11688,
62,
8899,
357,
11600,
2599,
383,
1994,
318,
11688,
1438,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
262,
1988,
318,
33918,
1994,
287,
6770,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1280,
15042,
62,
19199,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
1851,
605,
62,
282,
16747,
1298,
366,
2536,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
25249,
62,
8043,
1298,
366,
36982,
2246,
45621,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
25249,
62,
9060,
1298,
366,
21756,
5159,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
25249,
62,
49607,
1298,
366,
42731,
1153,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
9806,
62,
10394,
62,
5458,
62,
1087,
1586,
1298,
366,
600,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
3174,
62,
12853,
62,
10394,
62,
5458,
1298,
366,
30388,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
32880,
3524,
62,
9150,
278,
1298,
366,
2536,
1600,
198,
220,
220,
220,
1782,
628,
220,
220,
220,
11688,
62,
8899,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
1851,
605,
62,
282,
16747,
1298,
366,
1851,
605,
2348,
16747,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
25249,
62,
8043,
1298,
366,
25249,
10258,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
25249,
62,
9060,
1298,
366,
25249,
5159,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
25249,
62,
49607,
1298,
366,
25249,
42731,
1153,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
9806,
62,
10394,
62,
5458,
62,
1087,
1586,
1298,
366,
9806,
30916,
16375,
19085,
1586,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
3174,
62,
12853,
62,
10394,
62,
5458,
1298,
366,
3174,
13295,
30916,
16375,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
32880,
3524,
62,
9150,
278,
1298,
366,
32880,
3524,
26545,
278,
1600,
198,
220,
220,
220,
1782,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
11,
198,
220,
220,
220,
220,
220,
220,
220,
11723,
62,
282,
16747,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4469,
62,
8043,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4469,
62,
9060,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4469,
62,
49607,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2700,
62,
12853,
62,
10394,
62,
5458,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7059,
3524,
62,
9150,
278,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1957,
62,
85,
945,
62,
11250,
3924,
28,
14202,
11,
198,
220,
220,
220,
15179,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
18716,
829,
532,
257,
2746,
5447,
287,
4946,
17614,
37811,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1957,
62,
85,
945,
62,
11250,
3924,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1957,
62,
85,
945,
62,
11250,
3924,
796,
28373,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12001,
62,
85,
945,
62,
11250,
3924,
796,
1957,
62,
85,
945,
62,
11250,
3924,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
1851,
605,
62,
282,
16747,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25249,
62,
8043,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25249,
62,
9060,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25249,
62,
49607,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
9806,
62,
10394,
62,
5458,
62,
1087,
1586,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
3174,
62,
12853,
62,
10394,
62,
5458,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
32880,
3524,
62,
9150,
278,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15410,
3036,
20900,
796,
6045,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
1851,
605,
62,
282,
16747,
796,
11723,
62,
282,
16747,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
25249,
62,
8043,
796,
4469,
62,
8043,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
25249,
62,
9060,
796,
4469,
62,
9060,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
25249,
62,
49607,
796,
4469,
62,
49607,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
9806,
62,
10394,
62,
5458,
62,
1087,
1586,
796,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3174,
62,
12853,
62,
10394,
62,
5458,
796,
2700,
62,
12853,
62,
10394,
62,
5458,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
32880,
3524,
62,
9150,
278,
796,
7059,
3524,
62,
9150,
278,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
11723,
62,
282,
16747,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
11723,
62,
282,
16747,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
11723,
62,
282,
16747,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
1851,
605,
62,
282,
16747,
628,
220,
220,
220,
2488,
1851,
605,
62,
282,
16747,
13,
2617,
353,
198,
220,
220,
220,
825,
11723,
62,
282,
16747,
7,
944,
11,
11723,
62,
282,
16747,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
11723,
62,
282,
16747,
286,
428,
44963,
13,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
11723,
62,
282,
16747,
25,
383,
11723,
62,
282,
16747,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12001,
62,
85,
945,
62,
11250,
3924,
13,
16366,
62,
1589,
62,
12102,
341,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
11723,
62,
282,
16747,
318,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
15179,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44651,
1988,
329,
4600,
1851,
605,
62,
282,
16747,
47671,
1276,
407,
307,
4600,
14202,
63,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
3142,
62,
27160,
796,
14631,
35222,
1600,
366,
44,
2389,
35,
2538,
1600,
366,
33,
29089,
2662,
8973,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12001,
62,
85,
945,
62,
11250,
3924,
13,
16366,
62,
1589,
62,
12102,
341,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
11723,
62,
282,
16747,
407,
287,
3142,
62,
27160,
198,
220,
220,
220,
220,
220,
220,
220,
15179,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44651,
1988,
329,
4600,
1851,
605,
62,
282,
16747,
63,
37913,
15,
92,
828,
1276,
307,
530,
286,
1391,
16,
92,
1911,
18982,
7,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11723,
62,
282,
16747,
11,
3142,
62,
27160,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
1851,
605,
62,
282,
16747,
796,
11723,
62,
282,
16747,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
4469,
62,
8043,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
4469,
62,
8043,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
4469,
62,
8043,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
25228,
2246,
45621,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
25249,
62,
8043,
628,
220,
220,
220,
2488,
25249,
62,
8043,
13,
2617,
353,
198,
220,
220,
220,
825,
4469,
62,
8043,
7,
944,
11,
4469,
62,
8043,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
4469,
62,
8043,
286,
428,
44963,
13,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
4469,
62,
8043,
25,
383,
4469,
62,
8043,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
25228,
2246,
45621,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12001,
62,
85,
945,
62,
11250,
3924,
13,
16366,
62,
1589,
62,
12102,
341,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
4469,
62,
8043,
318,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
15179,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44651,
1988,
329,
4600,
25249,
62,
8043,
47671,
1276,
407,
307,
4600,
14202,
63,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25249,
62,
8043,
796,
4469,
62,
8043,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
4469,
62,
9060,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
4469,
62,
9060,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
4469,
62,
9060,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
25353,
5159,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
25249,
62,
9060,
628,
220,
220,
220,
2488,
25249,
62,
9060,
13,
2617,
353,
198,
220,
220,
220,
825,
4469,
62,
9060,
7,
944,
11,
4469,
62,
9060,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
4469,
62,
9060,
286,
428,
44963,
13,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
4469,
62,
9060,
25,
383,
4469,
62,
9060,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
25353,
5159,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12001,
62,
85,
945,
62,
11250,
3924,
13,
16366,
62,
1589,
62,
12102,
341,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
4469,
62,
9060,
318,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
15179,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44651,
1988,
329,
4600,
25249,
62,
9060,
47671,
1276,
407,
307,
4600,
14202,
63,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25249,
62,
9060,
796,
4469,
62,
9060,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
4469,
62,
49607,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
4469,
62,
49607,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
4469,
62,
49607,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
17701,
1153,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
25249,
62,
49607,
628,
220,
220,
220,
2488,
25249,
62,
49607,
13,
2617,
353,
198,
220,
220,
220,
825,
4469,
62,
49607,
7,
944,
11,
4469,
62,
49607,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
4469,
62,
49607,
286,
428,
44963,
13,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
4469,
62,
49607,
25,
383,
4469,
62,
49607,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
17701,
1153,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12001,
62,
85,
945,
62,
11250,
3924,
13,
16366,
62,
1589,
62,
12102,
341,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
4469,
62,
49607,
318,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
15179,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44651,
1988,
329,
4600,
25249,
62,
49607,
47671,
1276,
407,
307,
4600,
14202,
63,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25249,
62,
49607,
796,
4469,
62,
49607,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
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,
9806,
62,
10394,
62,
5458,
62,
1087,
1586,
628,
220,
220,
220,
2488,
9806,
62,
10394,
62,
5458,
62,
1087,
1586,
13,
2617,
353,
198,
220,
220,
220,
825,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
7,
944,
11,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
286,
428,
44963,
13,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
25,
383,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
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,
611,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12001,
62,
85,
945,
62,
11250,
3924,
13,
16366,
62,
1589,
62,
12102,
341,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
318,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
15179,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44651,
1988,
329,
4600,
9806,
62,
10394,
62,
5458,
62,
1087,
1586,
47671,
1276,
407,
307,
4600,
14202,
63,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
9806,
62,
10394,
62,
5458,
62,
1087,
1586,
796,
3509,
62,
10394,
62,
5458,
62,
1087,
1586,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
2700,
62,
12853,
62,
10394,
62,
5458,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
2700,
62,
12853,
62,
10394,
62,
5458,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
2700,
62,
12853,
62,
10394,
62,
5458,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
20512,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
3174,
62,
12853,
62,
10394,
62,
5458,
628,
220,
220,
220,
2488,
3174,
62,
12853,
62,
10394,
62,
5458,
13,
2617,
353,
198,
220,
220,
220,
825,
2700,
62,
12853,
62,
10394,
62,
5458,
7,
944,
11,
2700,
62,
12853,
62,
10394,
62,
5458,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
2700,
62,
12853,
62,
10394,
62,
5458,
286,
428,
44963,
13,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
2700,
62,
12853,
62,
10394,
62,
5458,
25,
383,
2700,
62,
12853,
62,
10394,
62,
5458,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
20512,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12001,
62,
85,
945,
62,
11250,
3924,
13,
16366,
62,
1589,
62,
12102,
341,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
2700,
62,
12853,
62,
10394,
62,
5458,
318,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
15179,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44651,
1988,
329,
4600,
3174,
62,
12853,
62,
10394,
62,
5458,
47671,
1276,
407,
307,
4600,
14202,
63,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
3174,
62,
12853,
62,
10394,
62,
5458,
796,
2700,
62,
12853,
62,
10394,
62,
5458,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
7059,
3524,
62,
9150,
278,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
7059,
3524,
62,
9150,
278,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
7059,
3524,
62,
9150,
278,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
32880,
3524,
62,
9150,
278,
628,
220,
220,
220,
2488,
32880,
3524,
62,
9150,
278,
13,
2617,
353,
198,
220,
220,
220,
825,
7059,
3524,
62,
9150,
278,
7,
944,
11,
7059,
3524,
62,
9150,
278,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
7059,
3524,
62,
9150,
278,
286,
428,
44963,
13,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
7059,
3524,
62,
9150,
278,
25,
383,
7059,
3524,
62,
9150,
278,
286,
428,
44963,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12001,
62,
85,
945,
62,
11250,
3924,
13,
16366,
62,
1589,
62,
12102,
341,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
7059,
3524,
62,
9150,
278,
318,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
15179,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44651,
1988,
329,
4600,
32880,
3524,
62,
9150,
278,
47671,
1276,
407,
307,
4600,
14202,
63,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
3142,
62,
27160,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
35222,
62,
2538,
9792,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
35222,
62,
43960,
1137,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
35222,
62,
49,
9947,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44,
2389,
35,
2538,
62,
2538,
9792,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44,
2389,
35,
2538,
62,
43960,
1137,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44,
2389,
35,
2538,
62,
49,
9947,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
33,
29089,
2662,
62,
2538,
9792,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
33,
29089,
2662,
62,
43960,
1137,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
33,
29089,
2662,
62,
49,
9947,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
2361,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12001,
62,
85,
945,
62,
11250,
3924,
13,
16366,
62,
1589,
62,
12102,
341,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
7059,
3524,
62,
9150,
278,
407,
287,
3142,
62,
27160,
198,
220,
220,
220,
220,
220,
220,
220,
15179,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
44651,
1988,
329,
4600,
32880,
3524,
62,
9150,
278,
63,
37913,
15,
92,
828,
1276,
307,
530,
286,
1391,
16,
92,
1911,
18982,
7,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7059,
3524,
62,
9150,
278,
11,
3142,
62,
27160,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
32880,
3524,
62,
9150,
278,
796,
7059,
3524,
62,
9150,
278,
628,
220,
220,
220,
825,
284,
62,
11600,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
35561,
262,
2746,
6608,
355,
257,
8633,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
23884,
628,
220,
220,
220,
220,
220,
220,
220,
329,
708,
81,
11,
4808,
287,
2237,
13,
2676,
23814,
7,
944,
13,
9654,
15042,
62,
19199,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
651,
35226,
7,
944,
11,
708,
81,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
7,
8367,
11,
1351,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
58,
35226,
60,
796,
1351,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3975,
7,
50033,
2124,
25,
2124,
13,
1462,
62,
11600,
3419,
611,
468,
35226,
7,
87,
11,
366,
1462,
62,
11600,
4943,
2073,
2124,
11,
1988,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
468,
35226,
7,
8367,
11,
366,
1462,
62,
11600,
1,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
58,
35226,
60,
796,
1988,
13,
1462,
62,
11600,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
318,
39098,
7,
8367,
11,
8633,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
58,
35226,
60,
796,
8633,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3975,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37456,
2378,
25,
357,
9186,
58,
15,
4357,
2378,
58,
16,
4083,
1462,
62,
11600,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
468,
35226,
7,
9186,
58,
16,
4357,
366,
1462,
62,
11600,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
2378,
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,
1988,
13,
23814,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
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,
1255,
58,
35226,
60,
796,
1988,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
1255,
628,
220,
220,
220,
825,
284,
62,
2536,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
35561,
262,
4731,
10552,
286,
262,
2746,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
279,
4798,
13,
79,
18982,
7,
944,
13,
1462,
62,
11600,
28955,
628,
220,
220,
220,
825,
11593,
260,
1050,
834,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
1890,
4600,
4798,
63,
290,
4600,
381,
22272,
63,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
1462,
62,
2536,
3419,
628,
220,
220,
220,
825,
11593,
27363,
834,
7,
944,
11,
584,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
35561,
2081,
611,
1111,
5563,
389,
4961,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
318,
39098,
7,
847,
11,
44963,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
1462,
62,
11600,
3419,
6624,
584,
13,
1462,
62,
11600,
3419,
628,
220,
220,
220,
825,
11593,
710,
834,
7,
944,
11,
584,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
35561,
2081,
611,
1111,
5563,
389,
407,
4961,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
318,
39098,
7,
847,
11,
44963,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
6407,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
1462,
62,
11600,
3419,
14512,
584,
13,
1462,
62,
11600,
3419,
198
] | 2.236079 | 5,244 |
import urllib2
# Base class for image finders.
# This method must be implemented in the derived class.
# Download the file at the specified URL and save it.
if __name__ == "__main__":
f = find_image(["mountain", "alps"])
download_image(f, "mount.jpg")
| [
11748,
2956,
297,
571,
17,
198,
198,
2,
7308,
1398,
329,
2939,
1064,
364,
13,
198,
220,
220,
220,
1303,
770,
2446,
1276,
307,
9177,
287,
262,
10944,
1398,
13,
628,
220,
220,
220,
1303,
10472,
262,
2393,
379,
262,
7368,
10289,
290,
3613,
340,
13,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
277,
796,
1064,
62,
9060,
7,
14692,
14948,
391,
1600,
366,
282,
862,
8973,
8,
198,
220,
220,
220,
4321,
62,
9060,
7,
69,
11,
366,
14948,
13,
9479,
4943,
198
] | 2.913978 | 93 |
from .address import Address
from .calculator_result import CalculatorResult
from .reference_city import ReferenceCity | [
6738,
764,
21975,
1330,
17917,
198,
6738,
764,
9948,
3129,
1352,
62,
20274,
1330,
43597,
23004,
198,
6738,
764,
35790,
62,
19205,
1330,
20984,
14941
] | 4.72 | 25 |
# Modification 2020 RangiLyu
# Copyright 2018-2019 Open-MMLab.
# 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 torch
from functools import partial
def images_to_levels(target, num_level_anchors):
"""Convert targets by image to targets by feature level.
[target_img0, target_img1] -> [target_level0, target_level1, ...]
"""
target = torch.stack(target, 0)
level_targets = []
start = 0
for n in num_level_anchors:
end = start + n
level_targets.append(target[:, start:end].squeeze(0))
start = end
return level_targets
def unmap(data, count, inds, fill=0):
""" Unmap a subset of item (data) back to the original set of items (of
size count) """
if data.dim() == 1:
ret = data.new_full((count, ), fill)
ret[inds.type(torch.bool)] = data
else:
new_size = (count, ) + data.size()[1:]
ret = data.new_full(new_size, fill)
ret[inds.type(torch.bool), :] = data
return ret | [
2,
3401,
2649,
12131,
371,
648,
72,
43,
24767,
198,
2,
15069,
2864,
12,
23344,
4946,
12,
44,
5805,
397,
13,
198,
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,
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,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
198,
11748,
28034,
198,
6738,
1257,
310,
10141,
1330,
13027,
628,
198,
198,
4299,
4263,
62,
1462,
62,
46170,
7,
16793,
11,
997,
62,
5715,
62,
3702,
669,
2599,
198,
220,
220,
220,
37227,
3103,
1851,
6670,
416,
2939,
284,
6670,
416,
3895,
1241,
13,
628,
220,
220,
220,
685,
16793,
62,
9600,
15,
11,
2496,
62,
9600,
16,
60,
4613,
685,
16793,
62,
5715,
15,
11,
2496,
62,
5715,
16,
11,
2644,
60,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2496,
796,
28034,
13,
25558,
7,
16793,
11,
657,
8,
198,
220,
220,
220,
1241,
62,
83,
853,
1039,
796,
17635,
198,
220,
220,
220,
923,
796,
657,
198,
220,
220,
220,
329,
299,
287,
997,
62,
5715,
62,
3702,
669,
25,
198,
220,
220,
220,
220,
220,
220,
220,
886,
796,
923,
1343,
299,
198,
220,
220,
220,
220,
220,
220,
220,
1241,
62,
83,
853,
1039,
13,
33295,
7,
16793,
58,
45299,
923,
25,
437,
4083,
16485,
1453,
2736,
7,
15,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
923,
796,
886,
198,
220,
220,
220,
1441,
1241,
62,
83,
853,
1039,
628,
198,
4299,
555,
8899,
7,
7890,
11,
954,
11,
773,
82,
11,
6070,
28,
15,
2599,
198,
220,
220,
220,
37227,
791,
8899,
257,
24637,
286,
2378,
357,
7890,
8,
736,
284,
262,
2656,
900,
286,
3709,
357,
1659,
198,
220,
220,
220,
2546,
954,
8,
37227,
198,
220,
220,
220,
611,
1366,
13,
27740,
3419,
6624,
352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1005,
796,
1366,
13,
3605,
62,
12853,
19510,
9127,
11,
10612,
6070,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1005,
58,
521,
82,
13,
4906,
7,
13165,
354,
13,
30388,
15437,
796,
1366,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
7857,
796,
357,
9127,
11,
1267,
1343,
1366,
13,
7857,
3419,
58,
16,
47715,
198,
220,
220,
220,
220,
220,
220,
220,
1005,
796,
1366,
13,
3605,
62,
12853,
7,
3605,
62,
7857,
11,
6070,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1005,
58,
521,
82,
13,
4906,
7,
13165,
354,
13,
30388,
828,
1058,
60,
796,
1366,
198,
220,
220,
220,
1441,
1005
] | 2.780899 | 534 |
import typing
from collections import Counter
import numpy as np
from pytest import approx
from zero_play.connect4.game import Connect4State
from zero_play.game_state import GameState
from zero_play.heuristic import Heuristic
from zero_play.mcts_player import SearchNode, MctsPlayer, SearchManager
from zero_play.playout import Playout
from zero_play.tictactoe.state import TicTacToeState
class EarlyChoiceHeuristic(FirstChoiceHeuristic):
""" Thinks each move is 90% as good as the previous option. """
def test_choose_moves_at_random():
""" Early moves are chosen from a weighted random population. """
np.random.seed(0)
start_state = TicTacToeState()
state1 = TicTacToeState("""\
...
...
X..
""")
player = MctsPlayer(start_state,
iteration_count=80,
heuristic=EarlyChoiceHeuristic())
moves = set()
for _ in range(10):
move = player.choose_move(state1)
moves.add(move)
player.search_manager.reset()
assert 1 < len(moves)
def test_search_manager_with_opponent():
""" Like when opponent is not sharing the SearchManager. """
start_state = TicTacToeState()
manager = SearchManager(start_state, Playout())
manager.search(start_state, iterations=10)
node = manager.current_node.children[0] # Didn't call get_best_move().
move = 0
state2 = start_state.make_move(move)
first_value_count = node.value_count
manager.search(state2, iterations=10)
second_value_count = node.value_count
assert first_value_count > 0
assert first_value_count + 10 == second_value_count
def test_win_scores_one():
""" Expose bug where search continues after a game-ending position. """
state1 = TicTacToeState("""\
..X
XX.
OO.
""")
player = MctsPlayer(TicTacToeState(), state1.X_PLAYER, iteration_count=100)
move = player.choose_move(state1)
search_node1 = player.search_manager.current_node.parent
for child_node in search_node1.children:
if child_node.move == 8:
assert child_node.average_value == 1.0
assert move == 8
| [
11748,
19720,
198,
6738,
17268,
1330,
15034,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
12972,
9288,
1330,
5561,
198,
198,
6738,
6632,
62,
1759,
13,
8443,
19,
13,
6057,
1330,
8113,
19,
9012,
198,
6738,
6632,
62,
1759,
13,
6057,
62,
5219,
1330,
3776,
9012,
198,
6738,
6632,
62,
1759,
13,
258,
27915,
1330,
679,
27915,
198,
6738,
6632,
62,
1759,
13,
76,
310,
82,
62,
7829,
1330,
11140,
19667,
11,
337,
310,
82,
14140,
11,
11140,
13511,
198,
6738,
6632,
62,
1759,
13,
1759,
448,
1330,
3811,
448,
198,
6738,
6632,
62,
1759,
13,
83,
713,
529,
2577,
13,
5219,
1330,
309,
291,
51,
330,
2514,
68,
9012,
628,
198,
198,
4871,
12556,
46770,
1544,
27915,
7,
5962,
46770,
1544,
27915,
2599,
198,
220,
220,
220,
37227,
536,
2973,
1123,
1445,
318,
4101,
4,
355,
922,
355,
262,
2180,
3038,
13,
37227,
628,
628,
628,
628,
628,
628,
198,
198,
4299,
1332,
62,
6679,
577,
62,
76,
5241,
62,
265,
62,
25120,
33529,
198,
220,
220,
220,
37227,
12556,
6100,
389,
7147,
422,
257,
26356,
4738,
3265,
13,
37227,
198,
220,
220,
220,
45941,
13,
25120,
13,
28826,
7,
15,
8,
198,
220,
220,
220,
923,
62,
5219,
796,
309,
291,
51,
330,
2514,
68,
9012,
3419,
198,
220,
220,
220,
1181,
16,
796,
309,
291,
51,
330,
2514,
68,
9012,
7203,
15931,
59,
198,
986,
198,
986,
198,
55,
492,
198,
15931,
4943,
198,
220,
220,
220,
2137,
796,
337,
310,
82,
14140,
7,
9688,
62,
5219,
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,
24415,
62,
9127,
28,
1795,
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,
339,
27915,
28,
20457,
46770,
1544,
27915,
28955,
628,
220,
220,
220,
6100,
796,
900,
3419,
198,
220,
220,
220,
329,
4808,
287,
2837,
7,
940,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1445,
796,
2137,
13,
6679,
577,
62,
21084,
7,
5219,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
6100,
13,
2860,
7,
21084,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2137,
13,
12947,
62,
37153,
13,
42503,
3419,
628,
220,
220,
220,
6818,
352,
1279,
18896,
7,
76,
5241,
8,
628,
628,
198,
198,
4299,
1332,
62,
12947,
62,
37153,
62,
4480,
62,
10365,
3471,
33529,
198,
220,
220,
220,
37227,
4525,
618,
6125,
318,
407,
7373,
262,
11140,
13511,
13,
37227,
198,
220,
220,
220,
923,
62,
5219,
796,
309,
291,
51,
330,
2514,
68,
9012,
3419,
198,
220,
220,
220,
4706,
796,
11140,
13511,
7,
9688,
62,
5219,
11,
3811,
448,
28955,
198,
220,
220,
220,
4706,
13,
12947,
7,
9688,
62,
5219,
11,
34820,
28,
940,
8,
198,
220,
220,
220,
10139,
796,
4706,
13,
14421,
62,
17440,
13,
17197,
58,
15,
60,
220,
1303,
31279,
470,
869,
651,
62,
13466,
62,
21084,
22446,
198,
220,
220,
220,
1445,
796,
657,
198,
220,
220,
220,
1181,
17,
796,
923,
62,
5219,
13,
15883,
62,
21084,
7,
21084,
8,
628,
220,
220,
220,
717,
62,
8367,
62,
9127,
796,
10139,
13,
8367,
62,
9127,
198,
220,
220,
220,
4706,
13,
12947,
7,
5219,
17,
11,
34820,
28,
940,
8,
198,
220,
220,
220,
1218,
62,
8367,
62,
9127,
796,
10139,
13,
8367,
62,
9127,
628,
220,
220,
220,
6818,
717,
62,
8367,
62,
9127,
1875,
657,
198,
220,
220,
220,
6818,
717,
62,
8367,
62,
9127,
1343,
838,
6624,
1218,
62,
8367,
62,
9127,
628,
628,
198,
4299,
1332,
62,
5404,
62,
1416,
2850,
62,
505,
33529,
198,
220,
220,
220,
37227,
1475,
3455,
5434,
810,
2989,
4477,
706,
257,
983,
12,
1571,
2292,
13,
37227,
198,
220,
220,
220,
1181,
16,
796,
309,
291,
51,
330,
2514,
68,
9012,
7203,
15931,
59,
198,
492,
55,
198,
8051,
13,
198,
6684,
13,
198,
15931,
4943,
628,
220,
220,
220,
2137,
796,
337,
310,
82,
14140,
7,
51,
291,
51,
330,
2514,
68,
9012,
22784,
1181,
16,
13,
55,
62,
31519,
1137,
11,
24415,
62,
9127,
28,
3064,
8,
628,
220,
220,
220,
1445,
796,
2137,
13,
6679,
577,
62,
21084,
7,
5219,
16,
8,
628,
220,
220,
220,
2989,
62,
17440,
16,
796,
2137,
13,
12947,
62,
37153,
13,
14421,
62,
17440,
13,
8000,
198,
220,
220,
220,
329,
1200,
62,
17440,
287,
2989,
62,
17440,
16,
13,
17197,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1200,
62,
17440,
13,
21084,
6624,
807,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6818,
1200,
62,
17440,
13,
23913,
62,
8367,
6624,
352,
13,
15,
198,
220,
220,
220,
6818,
1445,
6624,
807,
628
] | 2.673777 | 797 |
import unittest
import moddb
from test.test_config import username, password
| [
11748,
555,
715,
395,
198,
11748,
953,
9945,
198,
198,
6738,
1332,
13,
9288,
62,
11250,
1330,
20579,
11,
9206,
198
] | 3.714286 | 21 |
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2020 Nathaniel Fitzenrider <https://github.com/nfitzen>
#
# SPDX-License-Identifier: CC0-1.0
import itertools
from typing import List
from copy import deepcopy
with open('input.txt') as f:
data = list(list(s.strip()) for s in f.readlines())
def update(state: List[List[str]]) -> List[List[str]]:
'''Returns the updated seating state.'''
newState = deepcopy(state)
for i, row in enumerate(state):
for j, v in enumerate(row):
adj = []
for k, l in itertools.product(range(-1, 2), repeat=2):
if not (k == 0 and l == 0) and (i+k >= 0 and j+l >= 0):
try:
adj.append(state[i+k][j+l])
except:
pass
numAdj = adj.count('#')
if v == 'L' and numAdj == 0:
newState[i][j] = '#'
elif v == '#' and numAdj >= 4:
newState[i][j] = 'L'
return newState
old = None
new = deepcopy(data)
while old != new:
old = deepcopy(new)
new = update(old)
# print('\n'.join(''.join(l) for l in new) + '\n')
print(sum(map(list.count, new, itertools.repeat('#'))))
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
30628,
55,
12,
8979,
15269,
8206,
25,
12131,
49536,
16703,
268,
49449,
1279,
5450,
1378,
12567,
13,
785,
14,
77,
69,
4224,
268,
29,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
12624,
15,
12,
16,
13,
15,
198,
198,
11748,
340,
861,
10141,
198,
6738,
19720,
1330,
7343,
198,
6738,
4866,
1330,
2769,
30073,
198,
198,
4480,
1280,
10786,
15414,
13,
14116,
11537,
355,
277,
25,
198,
220,
220,
220,
1366,
796,
1351,
7,
4868,
7,
82,
13,
36311,
28955,
329,
264,
287,
277,
13,
961,
6615,
28955,
198,
198,
4299,
4296,
7,
5219,
25,
7343,
58,
8053,
58,
2536,
11907,
8,
4613,
7343,
58,
8053,
58,
2536,
60,
5974,
198,
220,
220,
220,
705,
7061,
35561,
262,
6153,
24800,
1181,
2637,
7061,
198,
220,
220,
220,
649,
9012,
796,
2769,
30073,
7,
5219,
8,
198,
220,
220,
220,
329,
1312,
11,
5752,
287,
27056,
378,
7,
5219,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
329,
474,
11,
410,
287,
27056,
378,
7,
808,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9224,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
479,
11,
300,
287,
340,
861,
10141,
13,
11167,
7,
9521,
32590,
16,
11,
362,
828,
9585,
28,
17,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
357,
74,
6624,
657,
290,
300,
6624,
657,
8,
290,
357,
72,
10,
74,
18189,
657,
290,
474,
10,
75,
18189,
657,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9224,
13,
33295,
7,
5219,
58,
72,
10,
74,
7131,
73,
10,
75,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
997,
2782,
73,
796,
9224,
13,
9127,
10786,
2,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
410,
6624,
705,
43,
6,
290,
997,
2782,
73,
6624,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
649,
9012,
58,
72,
7131,
73,
60,
796,
705,
2,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
410,
6624,
705,
2,
6,
290,
997,
2782,
73,
18189,
604,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
649,
9012,
58,
72,
7131,
73,
60,
796,
705,
43,
6,
198,
220,
220,
220,
1441,
649,
9012,
198,
198,
727,
796,
6045,
198,
3605,
796,
2769,
30073,
7,
7890,
8,
198,
198,
4514,
1468,
14512,
649,
25,
198,
220,
220,
220,
1468,
796,
2769,
30073,
7,
3605,
8,
198,
220,
220,
220,
649,
796,
4296,
7,
727,
8,
198,
220,
220,
220,
1303,
3601,
10786,
59,
77,
4458,
22179,
10786,
4458,
22179,
7,
75,
8,
329,
300,
287,
649,
8,
1343,
705,
59,
77,
11537,
198,
198,
4798,
7,
16345,
7,
8899,
7,
4868,
13,
9127,
11,
649,
11,
340,
861,
10141,
13,
44754,
10786,
2,
6,
35514,
198
] | 2.013223 | 605 |
from MultVAE_Dataset import *
from MultVAE_model import *
from torch import nn
from torch.utils.data import DataLoader
from datetime import datetime
import argparse
from scipy import sparse
import numpy as np
import mlflow.pytorch
| [
6738,
7854,
11731,
36,
62,
27354,
292,
316,
1330,
1635,
198,
6738,
7854,
11731,
36,
62,
19849,
1330,
1635,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
1822,
29572,
198,
6738,
629,
541,
88,
1330,
29877,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
285,
1652,
9319,
13,
9078,
13165,
354,
628
] | 3.362319 | 69 |
from threading import Lock
_name_spaces = {
'': UniqueIDGenerator(),
'nodes': UniqueIDGenerator(),
'view_runtimes': UniqueIDGenerator(),
}
| [
6738,
4704,
278,
1330,
13656,
628,
198,
198,
62,
3672,
62,
2777,
2114,
796,
1391,
198,
220,
220,
220,
10148,
25,
30015,
2389,
8645,
1352,
22784,
198,
220,
220,
220,
705,
77,
4147,
10354,
30015,
2389,
8645,
1352,
22784,
198,
220,
220,
220,
705,
1177,
62,
81,
2797,
999,
10354,
30015,
2389,
8645,
1352,
22784,
198,
92,
628
] | 2.672414 | 58 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.