content
stringlengths 1
1.04M
| input_ids
sequencelengths 1
774k
| ratio_char_token
float64 0.38
22.9
| token_count
int64 1
774k
|
---|---|---|---|
from django.db import models
from datetime import datetime
from publish.models import Publishable
# publishable model with a reverse relation to
# page (as a child)
# non-publishable reverse relation to page (as a child)
update_pub_date.pub_date = datetime.now()
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
7715,
13,
27530,
1330,
8525,
1836,
540,
628,
628,
628,
628,
198,
2,
7715,
540,
2746,
351,
257,
9575,
8695,
284,
198,
2,
2443,
357,
292,
257,
1200,
8,
628,
198,
2,
1729,
12,
12984,
1836,
540,
9575,
8695,
284,
2443,
357,
292,
257,
1200,
8,
198,
198,
19119,
62,
12984,
62,
4475,
13,
12984,
62,
4475,
796,
4818,
8079,
13,
2197,
3419,
628,
198
] | 3.407407 | 81 |
import sqlite3
import glob
import os
import click
from flask import current_app, g
from flask.cli import with_appcontext
@click.command('init-db')
@with_appcontext
| [
11748,
44161,
578,
18,
198,
11748,
15095,
198,
11748,
28686,
198,
11748,
3904,
198,
6738,
42903,
1330,
1459,
62,
1324,
11,
308,
198,
6738,
42903,
13,
44506,
1330,
351,
62,
1324,
22866,
628,
628,
198,
198,
31,
12976,
13,
21812,
10786,
15003,
12,
9945,
11537,
198,
31,
4480,
62,
1324,
22866,
628
] | 3.269231 | 52 |
import os
import angr
import nose
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries/tests'))
arches = {'x86_64'}
if __name__ == "__main__":
main()
| [
11748,
28686,
198,
11748,
281,
2164,
198,
11748,
9686,
628,
198,
9288,
62,
24886,
796,
965,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
5305,
6978,
7,
834,
7753,
834,
36911,
705,
40720,
40720,
8800,
3166,
14,
41989,
6,
4008,
198,
283,
2052,
796,
1391,
6,
87,
4521,
62,
2414,
6,
92,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.45122 | 82 |
from datetime import datetime
import logging
# LOGGING SETTINGS
# Save detailed information to log file
handler_file = logging.FileHandler("jarvis.log")
handler_file.setFormatter(logging.Formatter(
"%(asctime)s %(levelname)s %(filename)s:%(lineno)d - %(message)s",
"%Y-%m-%d %H:%M:%S"
))
# Output simple information to stderr
handler_stderr = logging.StreamHandler()
handler_stderr.setFormatter(logging.Formatter("%(levelname)s: %(message)s"))
# Log everything of level INFO or higher (everything apart from DEBUG)
logging.basicConfig(
level=logging.INFO,
handlers=[
handler_file,
handler_stderr
]
)
# END LOGGING SETTINGS
def stdin() -> str:
"""
Use this to input commands for Jarvis if the desired way fails
"""
return input("Command: ")
def stdout(response: str):
"""
Use this to output Jarvis's response if the desired way fails
"""
print(response)
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
18931,
198,
198,
2,
41605,
38,
2751,
25823,
51,
20754,
198,
198,
2,
12793,
6496,
1321,
284,
2604,
2393,
198,
30281,
62,
7753,
796,
18931,
13,
8979,
25060,
7203,
9491,
4703,
13,
6404,
4943,
198,
30281,
62,
7753,
13,
2617,
8479,
1436,
7,
6404,
2667,
13,
8479,
1436,
7,
198,
220,
220,
220,
36521,
7,
292,
310,
524,
8,
82,
4064,
7,
5715,
3672,
8,
82,
4064,
7,
34345,
8,
82,
25,
4,
7,
2815,
23397,
8,
67,
532,
4064,
7,
20500,
8,
82,
1600,
198,
220,
220,
220,
36521,
56,
12,
4,
76,
12,
4,
67,
4064,
39,
25,
4,
44,
25,
4,
50,
1,
198,
4008,
198,
198,
2,
25235,
2829,
1321,
284,
336,
1082,
81,
198,
30281,
62,
301,
1082,
81,
796,
18931,
13,
12124,
25060,
3419,
198,
30281,
62,
301,
1082,
81,
13,
2617,
8479,
1436,
7,
6404,
2667,
13,
8479,
1436,
7203,
4,
7,
5715,
3672,
8,
82,
25,
4064,
7,
20500,
8,
82,
48774,
198,
198,
2,
5972,
2279,
286,
1241,
24890,
393,
2440,
357,
37814,
5475,
422,
16959,
8,
198,
6404,
2667,
13,
35487,
16934,
7,
198,
220,
220,
220,
1241,
28,
6404,
2667,
13,
10778,
11,
198,
220,
220,
220,
32847,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
21360,
62,
7753,
11,
198,
220,
220,
220,
220,
220,
220,
220,
21360,
62,
301,
1082,
81,
198,
220,
220,
220,
2361,
198,
8,
198,
198,
2,
23578,
41605,
38,
2751,
25823,
51,
20754,
198,
198,
4299,
14367,
259,
3419,
4613,
965,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5765,
428,
284,
5128,
9729,
329,
46595,
611,
262,
10348,
835,
10143,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1441,
5128,
7203,
21575,
25,
366,
8,
198,
198,
4299,
14367,
448,
7,
26209,
25,
965,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5765,
428,
284,
5072,
46595,
338,
2882,
611,
262,
10348,
835,
10143,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
3601,
7,
26209,
8,
198
] | 2.727273 | 341 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 - cologler <[email protected]>
# ----------
#
# ----------
import io
__all__ = [
'FormatError',
'SfoFile',
'PSVGameSfo',
'PSPGameSfo',
]
_BYTE_ORDER = 'little'
if __name__ == '__main__':
for i in range(0, 1):
test(r'test_res\param_%s.sfo' % str(i).rjust(2, '0')) | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
2,
201,
198,
2,
15069,
357,
66,
8,
1584,
532,
269,
928,
1754,
1279,
15688,
1659,
75,
86,
31,
14816,
13,
785,
29,
201,
198,
2,
24200,
438,
201,
198,
2,
220,
201,
198,
2,
24200,
438,
201,
198,
201,
198,
11748,
33245,
201,
198,
201,
198,
834,
439,
834,
796,
685,
201,
198,
220,
220,
220,
705,
26227,
12331,
3256,
201,
198,
220,
220,
220,
705,
50,
6513,
8979,
3256,
201,
198,
220,
220,
220,
705,
3705,
53,
8777,
50,
6513,
3256,
201,
198,
220,
220,
220,
705,
3705,
6968,
480,
50,
6513,
3256,
201,
198,
60,
201,
198,
201,
198,
62,
17513,
9328,
62,
12532,
1137,
796,
705,
31629,
6,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,
220,
220,
220,
329,
1312,
287,
2837,
7,
15,
11,
352,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1332,
7,
81,
470,
395,
62,
411,
59,
17143,
62,
4,
82,
13,
82,
6513,
6,
4064,
965,
7,
72,
737,
81,
3137,
7,
17,
11,
705,
15,
6,
4008
] | 1.853774 | 212 |
import factory
from bluebottle.payments.models import Payment, OrderPayment
from bluebottle.payments_logger.models import PaymentLogEntry
from .orders import OrderFactory
| [
11748,
8860,
198,
198,
6738,
4171,
10985,
293,
13,
15577,
902,
13,
27530,
1330,
28784,
11,
8284,
19197,
434,
198,
6738,
4171,
10985,
293,
13,
15577,
902,
62,
6404,
1362,
13,
27530,
1330,
28784,
11187,
30150,
198,
6738,
764,
6361,
1330,
8284,
22810,
628,
198
] | 3.866667 | 45 |
import pytest
from telliot_feed_examples.feeds.matic_usd_feed import matic_usd_median_feed
@pytest.mark.asyncio
| [
11748,
12972,
9288,
198,
198,
6738,
1560,
5151,
62,
12363,
62,
1069,
12629,
13,
12363,
82,
13,
13849,
62,
385,
67,
62,
12363,
1330,
285,
1512,
62,
385,
67,
62,
1150,
666,
62,
12363,
628,
198,
31,
9078,
9288,
13,
4102,
13,
292,
13361,
952,
628
] | 2.521739 | 46 |
from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'motels_db',
}
}
ALLOWED_HOSTS = []
CORS_ORIGIN_ALLOW_ALL = True
DEBUG = True
SECRET_KEY = 'test'
INSTALLED_APPS += (
'autofixture',
'debug_toolbar',
'django_extensions',
)
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',),
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.AllowAny',
),
'DEFAULT_RENDERER_CLASSES': (
'rest_framework.renderers.JSONRenderer',
'rest_framework.renderers.BrowsableAPIRenderer',
),
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.TokenAuthentication',
),
'DEFAULT_PAGINATION_CLASS':
'rest_framework.pagination.LimitOffsetPagination',
'PAGE_SIZE': 10,
}
| [
6738,
764,
8692,
1330,
1635,
201,
198,
201,
198,
35,
1404,
6242,
1921,
1546,
796,
1391,
201,
198,
220,
220,
220,
705,
12286,
10354,
1391,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
26808,
8881,
10354,
705,
28241,
14208,
13,
3642,
822,
13,
70,
271,
13,
9945,
13,
1891,
2412,
13,
7353,
70,
271,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
20608,
10354,
705,
27926,
1424,
62,
9945,
3256,
201,
198,
220,
220,
220,
1782,
201,
198,
92,
201,
198,
201,
198,
7036,
3913,
1961,
62,
39,
10892,
50,
796,
17635,
201,
198,
201,
198,
34,
20673,
62,
1581,
3528,
1268,
62,
7036,
3913,
62,
7036,
796,
6407,
201,
198,
201,
198,
30531,
796,
6407,
201,
198,
201,
198,
23683,
26087,
62,
20373,
796,
705,
9288,
6,
201,
198,
201,
198,
38604,
7036,
1961,
62,
2969,
3705,
15853,
357,
201,
198,
220,
220,
220,
705,
2306,
1659,
9602,
3256,
201,
198,
220,
220,
220,
705,
24442,
62,
25981,
5657,
3256,
201,
198,
220,
220,
220,
705,
28241,
14208,
62,
2302,
5736,
3256,
201,
198,
8,
201,
198,
201,
198,
44,
2389,
35,
2538,
33746,
62,
31631,
1546,
15853,
357,
201,
198,
220,
220,
220,
705,
24442,
62,
25981,
5657,
13,
27171,
1574,
13,
27509,
25391,
5657,
34621,
1574,
3256,
201,
198,
8,
201,
198,
201,
198,
49,
6465,
62,
10913,
2390,
6217,
14670,
796,
1391,
201,
198,
220,
220,
220,
705,
7206,
38865,
62,
46700,
5781,
62,
31098,
1677,
5258,
10354,
19203,
2118,
62,
30604,
13,
10379,
1010,
13,
35,
73,
14208,
22417,
7282,
437,
3256,
828,
201,
198,
220,
220,
220,
705,
7206,
38865,
62,
18973,
44,
40373,
62,
31631,
1546,
10354,
357,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
2118,
62,
30604,
13,
525,
8481,
13,
35265,
7149,
3256,
201,
198,
220,
220,
220,
10612,
201,
198,
220,
220,
220,
705,
7206,
38865,
62,
49,
10619,
1137,
1137,
62,
31631,
1546,
10354,
357,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
2118,
62,
30604,
13,
10920,
19288,
13,
40386,
49,
437,
11882,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
2118,
62,
30604,
13,
10920,
19288,
13,
33,
8516,
540,
2969,
4663,
437,
11882,
3256,
201,
198,
220,
220,
220,
10612,
201,
198,
220,
220,
220,
705,
7206,
38865,
62,
32,
24318,
3525,
2149,
6234,
62,
31631,
1546,
10354,
357,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
2118,
62,
30604,
13,
41299,
3299,
13,
36044,
47649,
3299,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
2118,
62,
30604,
13,
41299,
3299,
13,
30642,
47649,
3299,
3256,
201,
198,
220,
220,
220,
10612,
201,
198,
220,
220,
220,
705,
7206,
38865,
62,
4537,
38,
1268,
6234,
62,
31631,
10354,
201,
198,
220,
220,
220,
705,
2118,
62,
30604,
13,
79,
363,
1883,
13,
39184,
34519,
47,
363,
1883,
3256,
201,
198,
220,
220,
220,
705,
4537,
8264,
62,
33489,
10354,
838,
11,
201,
198,
92,
201,
198
] | 2.140562 | 498 |
import sys
import cubey
if __name__ == "__main__":
if len(sys.argv) != 2:
print "Gimme a serial port!"
sys.exit(1)
serialPort = sys.argv[1]
main(serialPort)
| [
11748,
25064,
198,
11748,
13617,
2959,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
611,
18896,
7,
17597,
13,
853,
85,
8,
14512,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
366,
38,
320,
1326,
257,
11389,
2493,
2474,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
628,
220,
220,
220,
11389,
13924,
796,
25064,
13,
853,
85,
58,
16,
60,
628,
220,
220,
220,
1388,
7,
46911,
13924,
8,
198
] | 2.136364 | 88 |
import PySimpleGUI as sg
from .base import GeneratorBase
| [
11748,
9485,
26437,
40156,
355,
264,
70,
198,
6738,
764,
8692,
1330,
35986,
14881,
628
] | 3.866667 | 15 |
import requests
from flask import Flask, render_template, request, redirect
base_url = "http://hn.algolia.com/api/v1"
# This URL gets the newest stories.
new = f"{base_url}/search_by_date?tags=story"
# This URL gets the most popular stories
popular = f"{base_url}/search?tags=story"
# This function makes the URL to get the detail of a storie by id.
# Heres the documentation: https://hn.algolia.com/api
db = {}
app = Flask("DayNine")
@app.route("/")
@app.route("/<id>")
app.run(host="0.0.0.0") | [
11748,
7007,
198,
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
2581,
11,
18941,
198,
198,
8692,
62,
6371,
796,
366,
4023,
1378,
21116,
13,
14016,
22703,
13,
785,
14,
15042,
14,
85,
16,
1,
198,
198,
2,
770,
10289,
3011,
262,
15530,
3923,
13,
198,
3605,
796,
277,
1,
90,
8692,
62,
6371,
92,
14,
12947,
62,
1525,
62,
4475,
30,
31499,
28,
13571,
1,
198,
198,
2,
770,
10289,
3011,
262,
749,
2968,
3923,
198,
47568,
796,
277,
1,
90,
8692,
62,
6371,
92,
14,
12947,
30,
31499,
28,
13571,
1,
628,
198,
2,
770,
2163,
1838,
262,
10289,
284,
651,
262,
3703,
286,
257,
336,
19257,
416,
4686,
13,
198,
2,
679,
411,
262,
10314,
25,
3740,
1378,
21116,
13,
14016,
22703,
13,
785,
14,
15042,
198,
198,
9945,
796,
23884,
198,
1324,
796,
46947,
7203,
12393,
37603,
4943,
198,
198,
31,
1324,
13,
38629,
7203,
14,
4943,
198,
198,
31,
1324,
13,
38629,
7203,
14,
27,
312,
29,
4943,
198,
198,
1324,
13,
5143,
7,
4774,
2625,
15,
13,
15,
13,
15,
13,
15,
4943
] | 2.794444 | 180 |
from django.conf import settings
from django.contrib import admin
from django.conf.urls import url, include
from django.conf.urls.static import static
from rest_framework import routers
#from feewaiver import views, users_api, api
from feewaiver import views, api
from ledger.urls import urlpatterns as ledger_patterns
from feewaiver.utils import are_migrations_running
# API patterns
router = routers.DefaultRouter()
router.register(r'feewaivers',api.FeeWaiverViewSet)
router.register(r'feewaivers_paginated',api.FeeWaiverPaginatedViewSet)
router.register(r'participants',api.ParticipantsViewSet)
router.register(r'parks',api.ParkViewSet)
router.register(r'campgrounds',api.CampGroundViewSet)
router.register(r'temporary_document', api.TemporaryDocumentCollectionViewSet)
api_patterns = [
#url(r'^api/profile$', users_api.GetProfile.as_view(), name='get-profile'),
#url(r'^api/department_users$', users_api.DepartmentUserList.as_view(), name='department-users-list'),
#url(r'^api/filtered_users$', users_api.UserListFilterView.as_view(), name='filtered_users'),
url(r'^api/',include(router.urls)),
]
# URL Patterns
urlpatterns = [
url(r'^ledger/admin/', admin.site.urls, name='ledger_admin'),
url(r'', include(api_patterns)),
url(r'^$', views.FeeWaiverRoutingView.as_view(), name='ds_home'),
url(r'^contact/', views.FeeWaiverContactView.as_view(), name='ds_contact'),
url(r'^admin_data/', views.FeeWaiverAdminDataView.as_view(), name='admin_data'),
url(r'^further_info/', views.FeeWaiverFurtherInformationView.as_view(), name='ds_further_info'),
url(r'^internal/', views.InternalView.as_view(), name='internal'),
url(r'^external/', views.ExternalView.as_view(), name='external'),
url(r'^account/$', views.ExternalView.as_view(), name='manage-account'),
url(r'^profiles/', views.ExternalView.as_view(), name='manage-profiles'),
url(r'^help/(?P<application_type>[^/]+)/(?P<help_type>[^/]+)/$', views.HelpView.as_view(), name='help'),
url(r'^mgt-commands/$', views.ManagementCommandsView.as_view(), name='mgt-commands'),
url(r'^internal/fee_waiver/(?P<feewaiver_pk>\d+)/$', views.InternalFeeWaiverView.as_view(), name='internal-feewaiver-detail'),
url(r'^history/fee_waiver/(?P<pk>\d+)/$', views.FeeWaiverHistoryCompareView.as_view(), name='feewaiver_history'),
] + ledger_patterns
if settings.DEBUG: # Serve media locally in development.
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.SHOW_DEBUG_TOOLBAR:
import debug_toolbar
urlpatterns = [
url('__debug__/', include(debug_toolbar.urls)),
] + urlpatterns
| [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
11,
2291,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12708,
1330,
9037,
198,
6738,
1334,
62,
30604,
1330,
41144,
198,
2,
6738,
730,
413,
64,
1428,
1330,
5009,
11,
2985,
62,
15042,
11,
40391,
198,
6738,
730,
413,
64,
1428,
1330,
5009,
11,
40391,
198,
198,
6738,
37208,
13,
6371,
82,
1330,
19016,
33279,
82,
355,
37208,
62,
33279,
82,
198,
6738,
730,
413,
64,
1428,
13,
26791,
1330,
389,
62,
76,
3692,
602,
62,
20270,
198,
198,
2,
7824,
7572,
198,
472,
353,
796,
41144,
13,
19463,
49,
39605,
3419,
198,
472,
353,
13,
30238,
7,
81,
6,
5036,
413,
64,
1191,
3256,
15042,
13,
37,
1453,
33484,
1428,
7680,
7248,
8,
198,
472,
353,
13,
30238,
7,
81,
6,
5036,
413,
64,
1191,
62,
79,
363,
3898,
3256,
15042,
13,
37,
1453,
33484,
1428,
47,
363,
3898,
7680,
7248,
8,
198,
472,
353,
13,
30238,
7,
81,
6,
48013,
1187,
3256,
15042,
13,
34363,
1187,
7680,
7248,
8,
198,
472,
353,
13,
30238,
7,
81,
6,
1845,
591,
3256,
15042,
13,
25478,
7680,
7248,
8,
198,
472,
353,
13,
30238,
7,
81,
6,
16544,
40520,
3256,
15042,
13,
21111,
35539,
7680,
7248,
8,
198,
472,
353,
13,
30238,
7,
81,
470,
33080,
62,
22897,
3256,
40391,
13,
12966,
5551,
24941,
36307,
7680,
7248,
8,
198,
198,
15042,
62,
33279,
82,
796,
685,
198,
220,
220,
220,
1303,
6371,
7,
81,
6,
61,
15042,
14,
13317,
3,
3256,
2985,
62,
15042,
13,
3855,
37046,
13,
292,
62,
1177,
22784,
1438,
11639,
1136,
12,
13317,
33809,
198,
220,
220,
220,
1303,
6371,
7,
81,
6,
61,
15042,
14,
10378,
1823,
62,
18417,
3,
3256,
2985,
62,
15042,
13,
36261,
12982,
8053,
13,
292,
62,
1177,
22784,
1438,
11639,
10378,
1823,
12,
18417,
12,
4868,
33809,
198,
220,
220,
220,
1303,
6371,
7,
81,
6,
61,
15042,
14,
10379,
4400,
62,
18417,
3,
3256,
2985,
62,
15042,
13,
12982,
8053,
22417,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
10379,
4400,
62,
18417,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
15042,
14,
3256,
17256,
7,
472,
353,
13,
6371,
82,
36911,
198,
60,
198,
198,
2,
10289,
47020,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
992,
1362,
14,
28482,
14,
3256,
13169,
13,
15654,
13,
6371,
82,
11,
1438,
11639,
992,
1362,
62,
28482,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
3256,
2291,
7,
15042,
62,
33279,
82,
36911,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
3,
3256,
5009,
13,
37,
1453,
33484,
1428,
49,
13660,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
9310,
62,
11195,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
32057,
14,
3256,
5009,
13,
37,
1453,
33484,
1428,
17829,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
9310,
62,
32057,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
28482,
62,
7890,
14,
3256,
5009,
13,
37,
1453,
33484,
1428,
46787,
6601,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
28482,
62,
7890,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
69,
1914,
62,
10951,
14,
3256,
5009,
13,
37,
1453,
33484,
1428,
13518,
21918,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
9310,
62,
69,
1914,
62,
10951,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
32538,
14,
3256,
5009,
13,
37693,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
32538,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
22615,
14,
3256,
5009,
13,
41506,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
22615,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
23317,
32624,
3256,
5009,
13,
41506,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
805,
496,
12,
23317,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
5577,
2915,
14,
3256,
5009,
13,
41506,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
805,
496,
12,
5577,
2915,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
16794,
29006,
30,
47,
27,
31438,
62,
4906,
36937,
61,
14,
48688,
20679,
7,
30,
47,
27,
16794,
62,
4906,
36937,
61,
14,
48688,
20679,
3,
3256,
5009,
13,
22087,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
16794,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
11296,
83,
12,
9503,
1746,
32624,
3256,
5009,
13,
48032,
6935,
1746,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
11296,
83,
12,
9503,
1746,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
32538,
14,
39071,
62,
10247,
1428,
29006,
30,
47,
27,
5036,
413,
64,
1428,
62,
79,
74,
29,
59,
67,
10,
20679,
3,
3256,
5009,
13,
37693,
37,
1453,
33484,
1428,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
32538,
12,
5036,
413,
64,
1428,
12,
49170,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
23569,
14,
39071,
62,
10247,
1428,
29006,
30,
47,
27,
79,
74,
29,
59,
67,
10,
20679,
3,
3256,
5009,
13,
37,
1453,
33484,
1428,
18122,
41488,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
5036,
413,
64,
1428,
62,
23569,
33809,
198,
60,
1343,
37208,
62,
33279,
82,
198,
198,
361,
6460,
13,
30531,
25,
220,
1303,
35557,
2056,
15726,
287,
2478,
13,
198,
220,
220,
220,
19016,
33279,
82,
15853,
9037,
7,
33692,
13,
30733,
3539,
62,
21886,
11,
3188,
62,
15763,
28,
33692,
13,
30733,
3539,
62,
13252,
2394,
8,
198,
198,
361,
6460,
13,
9693,
3913,
62,
30531,
62,
10468,
3535,
33,
1503,
25,
198,
220,
220,
220,
1330,
14257,
62,
25981,
5657,
198,
220,
220,
220,
19016,
33279,
82,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
19016,
10786,
834,
24442,
834,
14,
3256,
2291,
7,
24442,
62,
25981,
5657,
13,
6371,
82,
36911,
198,
220,
220,
220,
2361,
1343,
19016,
33279,
82,
628
] | 2.667002 | 994 |
from pid import PID
from lowpass import LowPassFilter
from yaw_controller import YawController
import rospy
GAS_DENSITY = 2.858
ONE_MPH = 0.44704
| [
6738,
46514,
1330,
37022,
198,
6738,
1877,
6603,
1330,
7754,
14478,
22417,
198,
6738,
331,
707,
62,
36500,
1330,
575,
707,
22130,
198,
11748,
686,
2777,
88,
198,
198,
38,
1921,
62,
35,
16938,
9050,
796,
362,
13,
23,
3365,
198,
11651,
62,
7378,
39,
796,
657,
13,
2598,
32869,
628,
197,
197,
198
] | 2.796296 | 54 |
import torch
import torch.nn as nn
from torch.utils import data
from datetime import datetime
import collections
import os
import random as rnd
import copy
from Modeling.Pytorch.utilis_rnn_specific import *
from SI_Toolkit.load_and_normalize import load_normalization_info, load_data, normalize_df, denormalize_df
def get_device():
"""
Small function to correctly send data to GPU or CPU depending what is available
"""
if torch.cuda.is_available():
device = torch.device('cuda:0')
else:
device = torch.device('cpu')
return device
# Set seeds everywhere required to make results reproducible
# Print parameter count
# https://stackoverflow.com/questions/49201236/check-the-total-number-of-parameters-in-a-pytorch-model
def load_pretrained_rnn(net, pt_path, device):
"""
A function loading parameters (weights and biases) from a previous training to a net RNN instance
:param net: An instance of RNN
:param pt_path: path to .pt file storing weights and biases
:return: No return. Modifies net in place.
"""
pre_trained_model = torch.load(pt_path, map_location=device)
print("Loading Model: ", pt_path)
print('')
pre_trained_model = list(pre_trained_model.items())
new_state_dict = collections.OrderedDict()
count = 0
num_param_key = len(pre_trained_model)
for key, value in net.state_dict().items():
if count >= num_param_key:
break
layer_name, weights = pre_trained_model[count]
new_state_dict[key] = weights
# print("Pre-trained Layer: %s - Loaded into new layer: %s" % (layer_name, key))
count += 1
print('')
net.load_state_dict(new_state_dict)
# Initialize weights and biases - should be only applied if no pretrained net loaded
# FIXME: To tailor this sequence class according to the commands and state_variables of cartpole
class Sequence(nn.Module):
""""
Our RNN class.
"""
def reset(self):
"""
Reset the network (not the weights!)
"""
self.sample_counter = 0
self.h = [None] * len(self.h_size)
self.c = [None] * len(self.h_size)
self.output = None
self.outputs = []
def forward(self, rnn_input):
"""
Predicts future CartPole states IN "OPEN LOOP"
(at every time step prediction for the next time step is done based on the true CartPole state)
"""
# Initialize hidden layers - this change at every call as the batch size may vary
for i in range(len(self.h_size)):
self.h[i] = torch.zeros(rnn_input.size(1), self.h_size[i], dtype=torch.float).to(self.device)
self.c[i] = torch.zeros(rnn_input.size(1), self.h_size[i], dtype=torch.float).to(self.device)
# The for loop takes the consecutive time steps from input plugs them into RNN and save the outputs into a list
# THE NETWORK GETS ALWAYS THE GROUND TRUTH, THE REAL STATE OF THE CARTPOLE, AS ITS INPUT
# IT PREDICTS THE STATE OF THE CARTPOLE ONE TIME STEP AHEAD BASED ON TRUE STATE NOW
for iteration, input_t in enumerate(rnn_input.chunk(rnn_input.size(0), dim=0)):
# Propagate input through RNN layers
if self.rnn_type == 'LSTM':
self.h[0], self.c[0] = self.layers[0](input_t.squeeze(0), (self.h[0], self.c[0]))
for i in range(len(self.h_size) - 1):
self.h[i + 1], self.c[i + 1] = self.layers[i + 1](self.h[i], (self.h[i + 1], self.c[i + 1]))
else:
self.h[0] = self.layers[0](input_t.squeeze(0), self.h[0])
for i in range(len(self.h_size) - 1):
self.h[i + 1] = self.layers[i + 1](self.h[i], self.h[i + 1])
self.output = self.layers[-1](self.h[-1])
self.outputs += [self.output]
self.sample_counter = self.sample_counter + 1
# In the train mode we want to continue appending the outputs by calling forward function
# The outputs will be saved internally in the network instance as a list
# Otherwise we want to transform outputs list to a tensor and return it
return self.output
import pandas as pd
#
# def load_data(a, filepath=None, columns_list=None, norm_inf=False, rnn_full_name=None, downsample=1):
# if filepath is None:
# filepath = a.val_file_name
#
# if columns_list is None:
# columns_list = list(set(a.inputs_list).union(set(a.outputs_list)))
#
# if type(filepath) == list:
# filepaths = filepath
# else:
# filepaths = [filepath]
#
# all_dfs = [] # saved separately to get normalization
# all_time_axes = []
#
# for one_filepath in filepaths:
# # Load dataframe
# print('loading data from ' + str(one_filepath))
# print('')
# df = pd.read_csv(one_filepath, comment='#')
# df=df.iloc[::downsample].reset_index()
#
# # You can shift dt by one time step to know "now" the timestep till the next row
# if a.cheat_dt:
# if 'dt' in df:
# df['dt'] = df['dt'].shift(-1)
# df = df[:-1]
#
# # FIXME: Make calculation of dt compatible with downsampling
# # Get time axis as separate Dataframe
# if 'time' in df.columns:
# t = df['time']
# elif 'dt' in df.columns:
# dt = df['dt']
# t = dt.cumsum()
# t.rename('time', inplace=True)
# else:
# t = pd.Series([])
# t.rename('time', inplace=True)
#
# time_axis = t
# all_time_axes.append(time_axis)
#
# # Get only relevant subset of columns
# if columns_list == 'all':
# pass
# else:
# df = df[columns_list]
#
# all_dfs.append(df)
#
#
# return all_dfs, all_time_axes
#
# # This way of doing normalization is fine for long data sets and (relatively) short sequence lengths
# # The points from the edges of the datasets count too little
# def calculate_normalization_info(df, PATH_TO_EXPERIMENT_RECORDINGS, rnn_full_name):
# if type(df) is list:
# df_total = pd.concat(df)
# else:
# df_total = df
#
# if 'time' in df_total.columns:
# df_total.drop('time',
# axis='columns', inplace=True)
#
# df_mean = df_total.mean(axis=0)
# df_std = df_total.std(axis=0)
# df_max = df_total.max(axis=0)
# df_min = df_total.min(axis=0)
# frame = {'mean': df_mean, 'std': df_std, 'max': df_max, 'min': df_min}
# df_norm_info = pd.DataFrame(frame).transpose()
#
# df_norm_info.to_csv(PATH_TO_EXPERIMENT_RECORDINGS + rnn_full_name + '-norm' + '.csv')
#
# # Plot historgrams to make the firs check about gaussian assumption
# # for feature in df_total.columns:
# # plt.hist(df_total[feature].to_numpy(), 50, density=True, facecolor='g', alpha=0.75)
# # plt.title(feature)
# # plt.show()
#
# return df_norm_info
#
#
# def load_normalization_info(PATH_TO_EXPERIMENT_RECORDINGS, rnn_full_name):
# return pd.read_csv(PATH_TO_EXPERIMENT_RECORDINGS + rnn_full_name + '-norm' + '.csv', index_col=0)
#
#
# def normalize_df(dfs, normalization_info, normalization_type='minmax_sym'):
# if normalization_type == 'gaussian':
# def normalize_feature(col):
# col_mean = normalization_info.loc['mean', col.name]
# col_std = normalization_info.loc['std', col.name]
# return (col - col_mean) / col_std
# elif normalization_type == 'minmax_pos':
# def normalize_feature(col):
# col_min = normalization_info.loc['min', col.name]
# col_max = normalization_info.loc['max', col.name]
# return (col - col_min) / (col_max - col_min)
# elif normalization_type == 'minmax_sym':
# def normalize_feature(col):
# col_min = normalization_info.loc['min', col.name]
# col_max = normalization_info.loc['max', col.name]
# return -1.0 + 2.0 * (col - col_min) / (col_max - col_min)
#
# if type(dfs) is list:
# for i in range(len(dfs)):
# dfs[i] = dfs[i].apply(normalize_feature, axis=0)
# else:
# dfs = dfs.apply(normalize_feature, axis=0)
#
# return dfs
#
#
# def denormalize_df(dfs, normalization_info, normalization_type='minmax_sym'):
# if normalization_type == 'gaussian':
# def denormalize_feature(col):
# col_mean = normalization_info.loc['mean', col.name]
# col_std = normalization_info.loc['std', col.name]
# return col * col_std + col_mean
# elif normalization_type == 'minmax_pos':
# def denormalize_feature(col):
# col_min = normalization_info.loc['min', col.name]
# col_max = normalization_info.loc['max', col.name]
# return col * (col_max - col_min) + col_min
# elif normalization_type == 'minmax_sym':
# def denormalize_feature(col):
# col_min = normalization_info.loc['min', col.name]
# col_max = normalization_info.loc['max', col.name]
# return ((col + 1.0) / 2.0) * (col_max - col_min) + col_min
#
# if type(dfs) is list:
# for i in range(len(dfs)):
# dfs[i] = dfs[i].apply(denormalize_feature, axis=0)
# else:
# dfs = dfs.apply(denormalize_feature, axis=0)
#
# return dfs
def plot_results(net,
args,
dataset=None,
normalization_info = None,
time_axes=None,
filepath=None,
inputs_list=None,
outputs_list=None,
closed_loop_list=None,
seq_len=None,
warm_up_len=None,
closed_loop_enabled=False,
comment='',
rnn_full_name=None,
save=False,
close_loop_idx=512):
"""
This function accepts RNN instance, arguments and CartPole instance.
It runs one random experiment with CartPole,
inputs the data into RNN and check how well RNN predicts CartPole state one time step ahead of time
"""
rnn_full_name = net.rnn_full_name
if filepath is None:
filepath = args.val_file_name
if type(filepath) == list:
filepath = filepath[0]
if warm_up_len is None:
warm_up_len = args.warm_up_len
if seq_len is None:
seq_len = args.seq_len
if inputs_list is None:
inputs_list = args.inputs_list
if inputs_list is None:
raise ValueError('RNN inputs not provided!')
if outputs_list is None:
outputs_list = args.outputs_list
if outputs_list is None:
raise ValueError('RNN outputs not provided!')
if closed_loop_enabled and (closed_loop_list is None):
closed_loop_list = args.close_loop_for
if closed_loop_list is None:
raise ValueError('RNN closed-loop-inputs not provided!')
net.reset()
net.eval()
device = get_device()
if normalization_info is None:
normalization_info = load_normalization_info(args.PATH_TO_EXPERIMENT_RECORDINGS, rnn_full_name)
if dataset is None or time_axes is None:
test_dfs, time_axes = load_data(args, filepath)
test_dfs_norm = normalize_df(test_dfs, normalization_info)
test_set = Dataset(test_dfs_norm, args, time_axes=time_axes, seq_len=seq_len)
del test_dfs
else:
test_set = copy.deepcopy(dataset)
test_set.reset_seq_len(seq_len=seq_len)
# Format the experiment data
features, targets, time_axis = test_set.get_experiment(1) # Put number in brackets to get the same idx at every run
features_pd = pd.DataFrame(data=features, columns=inputs_list)
targets_pd = pd.DataFrame(data=targets, columns=outputs_list)
rnn_outputs = pd.DataFrame(columns=outputs_list)
warm_up_idx = 0
rnn_input_0 = copy.deepcopy(features_pd.iloc[0])
# Does not bring anything. Why? 0-state shouldn't have zero internal state due to biases...
while warm_up_idx < warm_up_len:
rnn_input = rnn_input_0
rnn_input = np.squeeze(rnn_input.to_numpy())
rnn_input = torch.from_numpy(rnn_input).float().unsqueeze(0).unsqueeze(0).to(device)
net(rnn_input=rnn_input)
warm_up_idx += 1
net.outputs = []
net.sample_counter = 0
idx_cl = 0
close_the_loop = False
for index, row in features_pd.iterrows():
rnn_input = pd.DataFrame(copy.deepcopy(row)).transpose().reset_index(drop=True)
if idx_cl == close_loop_idx:
close_the_loop = True
if closed_loop_enabled and close_the_loop and (normalized_rnn_output is not None):
rnn_input[closed_loop_list] = normalized_rnn_output[closed_loop_list]
rnn_input = np.squeeze(rnn_input.to_numpy())
rnn_input = torch.from_numpy(rnn_input).float().unsqueeze(0).unsqueeze(0).to(device)
normalized_rnn_output = net(rnn_input=rnn_input)
normalized_rnn_output = np.squeeze(normalized_rnn_output.detach().cpu().numpy()).tolist()
normalized_rnn_output = copy.deepcopy(pd.DataFrame(data=[normalized_rnn_output], columns=outputs_list))
rnn_outputs = rnn_outputs.append(copy.deepcopy(normalized_rnn_output), ignore_index=True)
idx_cl += 1
targets_pd_denorm = denormalize_df(targets_pd, normalization_info)
rnn_outputs_denorm = denormalize_df(rnn_outputs, normalization_info)
fig, axs = plot_results_specific(targets_pd_denorm, rnn_outputs_denorm, time_axis, comment, closed_loop_enabled, close_loop_idx)
plt.show()
if save:
# Make folders if not yet exist
try:
os.makedirs('save_plots')
except FileExistsError:
pass
dateTimeObj = datetime.now()
timestampStr = dateTimeObj.strftime("-%d%b%Y_%H%M%S")
if rnn_full_name is not None:
fig.savefig('./save_plots/' + rnn_full_name + timestampStr + '.png')
else:
fig.savefig('./save_plots/' + timestampStr + '.png')
| [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
28034,
13,
26791,
1330,
1366,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
11748,
17268,
198,
11748,
28686,
198,
198,
11748,
4738,
355,
374,
358,
198,
198,
11748,
4866,
198,
198,
6738,
9104,
278,
13,
20519,
13165,
354,
13,
22602,
271,
62,
81,
20471,
62,
11423,
1330,
1635,
198,
6738,
25861,
62,
25391,
15813,
13,
2220,
62,
392,
62,
11265,
1096,
1330,
3440,
62,
11265,
1634,
62,
10951,
11,
3440,
62,
7890,
11,
3487,
1096,
62,
7568,
11,
2853,
6636,
1096,
62,
7568,
628,
198,
4299,
651,
62,
25202,
33529,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
10452,
2163,
284,
9380,
3758,
1366,
284,
11362,
393,
9135,
6906,
644,
318,
1695,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
28034,
13,
66,
15339,
13,
271,
62,
15182,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
3335,
796,
28034,
13,
25202,
10786,
66,
15339,
25,
15,
11537,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3335,
796,
28034,
13,
25202,
10786,
36166,
11537,
198,
220,
220,
220,
1441,
3335,
628,
198,
2,
5345,
11904,
8347,
2672,
284,
787,
2482,
8186,
37369,
628,
198,
198,
2,
12578,
11507,
954,
198,
2,
3740,
1378,
25558,
2502,
11125,
13,
785,
14,
6138,
507,
14,
2920,
1264,
24940,
14,
9122,
12,
1169,
12,
23350,
12,
17618,
12,
1659,
12,
17143,
7307,
12,
259,
12,
64,
12,
9078,
13165,
354,
12,
19849,
628,
198,
4299,
3440,
62,
5310,
13363,
62,
81,
20471,
7,
3262,
11,
42975,
62,
6978,
11,
3335,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
317,
2163,
11046,
10007,
357,
43775,
290,
29275,
8,
422,
257,
2180,
3047,
284,
257,
2010,
371,
6144,
4554,
198,
220,
220,
220,
1058,
17143,
2010,
25,
1052,
4554,
286,
371,
6144,
198,
220,
220,
220,
1058,
17143,
42975,
62,
6978,
25,
3108,
284,
764,
457,
2393,
23069,
19590,
290,
29275,
198,
220,
220,
220,
1058,
7783,
25,
1400,
1441,
13,
3401,
6945,
2010,
287,
1295,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
662,
62,
35311,
62,
19849,
796,
28034,
13,
2220,
7,
457,
62,
6978,
11,
3975,
62,
24886,
28,
25202,
8,
198,
220,
220,
220,
3601,
7203,
19031,
9104,
25,
33172,
42975,
62,
6978,
8,
198,
220,
220,
220,
3601,
7,
7061,
8,
628,
220,
220,
220,
662,
62,
35311,
62,
19849,
796,
1351,
7,
3866,
62,
35311,
62,
19849,
13,
23814,
28955,
198,
220,
220,
220,
649,
62,
5219,
62,
11600,
796,
17268,
13,
35422,
1068,
35,
713,
3419,
198,
220,
220,
220,
954,
796,
657,
198,
220,
220,
220,
997,
62,
17143,
62,
2539,
796,
18896,
7,
3866,
62,
35311,
62,
19849,
8,
198,
220,
220,
220,
329,
1994,
11,
1988,
287,
2010,
13,
5219,
62,
11600,
22446,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
611,
954,
18189,
997,
62,
17143,
62,
2539,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
7679,
62,
3672,
11,
19590,
796,
662,
62,
35311,
62,
19849,
58,
9127,
60,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
5219,
62,
11600,
58,
2539,
60,
796,
19590,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
6719,
12,
35311,
34398,
25,
4064,
82,
532,
42485,
656,
649,
7679,
25,
4064,
82,
1,
4064,
357,
29289,
62,
3672,
11,
1994,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
954,
15853,
352,
198,
220,
220,
220,
3601,
7,
7061,
8,
198,
220,
220,
220,
2010,
13,
2220,
62,
5219,
62,
11600,
7,
3605,
62,
5219,
62,
11600,
8,
628,
198,
2,
20768,
1096,
19590,
290,
29275,
532,
815,
307,
691,
5625,
611,
645,
2181,
13363,
2010,
9639,
628,
628,
198,
2,
44855,
11682,
25,
1675,
35280,
428,
8379,
1398,
1864,
284,
262,
9729,
290,
1181,
62,
25641,
2977,
286,
6383,
36869,
198,
4871,
45835,
7,
20471,
13,
26796,
2599,
198,
220,
220,
220,
13538,
15931,
198,
220,
220,
220,
3954,
371,
6144,
1398,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
13259,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
30027,
262,
3127,
357,
1662,
262,
19590,
8133,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
39873,
62,
24588,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
71,
796,
685,
14202,
60,
1635,
18896,
7,
944,
13,
71,
62,
7857,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
796,
685,
14202,
60,
1635,
18896,
7,
944,
13,
71,
62,
7857,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
22915,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
22915,
82,
796,
17635,
628,
220,
220,
220,
825,
2651,
7,
944,
11,
374,
20471,
62,
15414,
2599,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
14322,
14137,
2003,
13690,
47,
2305,
2585,
3268,
366,
3185,
1677,
17579,
3185,
1,
198,
220,
220,
220,
220,
220,
220,
220,
357,
265,
790,
640,
2239,
17724,
329,
262,
1306,
640,
2239,
318,
1760,
1912,
319,
262,
2081,
13690,
47,
2305,
1181,
8,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
20768,
1096,
7104,
11685,
532,
428,
1487,
379,
790,
869,
355,
262,
15458,
2546,
743,
7565,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2837,
7,
11925,
7,
944,
13,
71,
62,
7857,
8,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
71,
58,
72,
60,
796,
28034,
13,
9107,
418,
7,
81,
20471,
62,
15414,
13,
7857,
7,
16,
828,
2116,
13,
71,
62,
7857,
58,
72,
4357,
288,
4906,
28,
13165,
354,
13,
22468,
737,
1462,
7,
944,
13,
25202,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
66,
58,
72,
60,
796,
28034,
13,
9107,
418,
7,
81,
20471,
62,
15414,
13,
7857,
7,
16,
828,
2116,
13,
71,
62,
7857,
58,
72,
4357,
288,
4906,
28,
13165,
354,
13,
22468,
737,
1462,
7,
944,
13,
25202,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
383,
329,
9052,
2753,
262,
12785,
640,
4831,
422,
5128,
37008,
606,
656,
371,
6144,
290,
3613,
262,
23862,
656,
257,
1351,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3336,
49791,
17151,
50,
49576,
3336,
10863,
15919,
7579,
24318,
11,
3336,
32744,
35454,
3963,
3336,
327,
7227,
16402,
2538,
11,
7054,
42437,
3268,
30076,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
7283,
4810,
1961,
2149,
4694,
3336,
35454,
3963,
3336,
327,
7227,
16402,
2538,
16329,
20460,
49154,
317,
37682,
29809,
1961,
6177,
26751,
35454,
20229,
198,
220,
220,
220,
220,
220,
220,
220,
329,
24415,
11,
5128,
62,
83,
287,
27056,
378,
7,
81,
20471,
62,
15414,
13,
354,
2954,
7,
81,
20471,
62,
15414,
13,
7857,
7,
15,
828,
5391,
28,
15,
8,
2599,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
8772,
37861,
5128,
832,
371,
6144,
11685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
81,
20471,
62,
4906,
6624,
705,
43,
2257,
44,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
71,
58,
15,
4357,
2116,
13,
66,
58,
15,
60,
796,
2116,
13,
75,
6962,
58,
15,
16151,
15414,
62,
83,
13,
16485,
1453,
2736,
7,
15,
828,
357,
944,
13,
71,
58,
15,
4357,
2116,
13,
66,
58,
15,
60,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2837,
7,
11925,
7,
944,
13,
71,
62,
7857,
8,
532,
352,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
71,
58,
72,
1343,
352,
4357,
2116,
13,
66,
58,
72,
1343,
352,
60,
796,
2116,
13,
75,
6962,
58,
72,
1343,
352,
16151,
944,
13,
71,
58,
72,
4357,
357,
944,
13,
71,
58,
72,
1343,
352,
4357,
2116,
13,
66,
58,
72,
1343,
352,
60,
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,
2116,
13,
71,
58,
15,
60,
796,
2116,
13,
75,
6962,
58,
15,
16151,
15414,
62,
83,
13,
16485,
1453,
2736,
7,
15,
828,
2116,
13,
71,
58,
15,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2837,
7,
11925,
7,
944,
13,
71,
62,
7857,
8,
532,
352,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
71,
58,
72,
1343,
352,
60,
796,
2116,
13,
75,
6962,
58,
72,
1343,
352,
16151,
944,
13,
71,
58,
72,
4357,
2116,
13,
71,
58,
72,
1343,
352,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
22915,
796,
2116,
13,
75,
6962,
58,
12,
16,
16151,
944,
13,
71,
58,
12,
16,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
22915,
82,
15853,
685,
944,
13,
22915,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
39873,
62,
24588,
796,
2116,
13,
39873,
62,
24588,
1343,
352,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
554,
262,
4512,
4235,
356,
765,
284,
2555,
598,
1571,
262,
23862,
416,
4585,
2651,
2163,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
383,
23862,
481,
307,
7448,
20947,
287,
262,
3127,
4554,
355,
257,
1351,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
15323,
356,
765,
284,
6121,
23862,
1351,
284,
257,
11192,
273,
290,
1441,
340,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
22915,
628,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
2,
198,
2,
825,
3440,
62,
7890,
7,
64,
11,
2393,
6978,
28,
14202,
11,
15180,
62,
4868,
28,
14202,
11,
2593,
62,
10745,
28,
25101,
11,
374,
20471,
62,
12853,
62,
3672,
28,
14202,
11,
21838,
1403,
28,
16,
2599,
198,
2,
220,
220,
220,
220,
611,
2393,
6978,
318,
6045,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2393,
6978,
796,
257,
13,
2100,
62,
7753,
62,
3672,
198,
2,
198,
2,
220,
220,
220,
220,
611,
15180,
62,
4868,
318,
6045,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
15180,
62,
4868,
796,
1351,
7,
2617,
7,
64,
13,
15414,
82,
62,
4868,
737,
24592,
7,
2617,
7,
64,
13,
22915,
82,
62,
4868,
22305,
198,
2,
198,
2,
220,
220,
220,
220,
611,
2099,
7,
7753,
6978,
8,
6624,
1351,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2393,
6978,
82,
796,
2393,
6978,
198,
2,
220,
220,
220,
220,
2073,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2393,
6978,
82,
796,
685,
7753,
6978,
60,
198,
2,
198,
2,
220,
220,
220,
220,
477,
62,
7568,
82,
796,
17635,
220,
1303,
7448,
13869,
284,
651,
3487,
1634,
198,
2,
220,
220,
220,
220,
477,
62,
2435,
62,
897,
274,
796,
17635,
198,
2,
198,
2,
220,
220,
220,
220,
329,
530,
62,
7753,
6978,
287,
2393,
6978,
82,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
8778,
1366,
14535,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
25138,
1366,
422,
705,
1343,
965,
7,
505,
62,
7753,
6978,
4008,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
7061,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
796,
279,
67,
13,
961,
62,
40664,
7,
505,
62,
7753,
6978,
11,
2912,
11639,
2,
11537,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
28,
7568,
13,
346,
420,
58,
3712,
30371,
1403,
4083,
42503,
62,
9630,
3419,
198,
2,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
921,
460,
6482,
288,
83,
416,
530,
640,
2239,
284,
760,
366,
2197,
1,
262,
4628,
395,
538,
10597,
262,
1306,
5752,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
611,
257,
13,
46799,
62,
28664,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
28664,
6,
287,
47764,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
17816,
28664,
20520,
796,
47764,
17816,
28664,
6,
4083,
30846,
32590,
16,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
796,
47764,
58,
21912,
16,
60,
198,
2,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
44855,
11682,
25,
6889,
17952,
286,
288,
83,
11670,
351,
21838,
321,
11347,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3497,
640,
16488,
355,
4553,
6060,
14535,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
2435,
6,
287,
47764,
13,
28665,
82,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
796,
47764,
17816,
2435,
20520,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
705,
28664,
6,
287,
47764,
13,
28665,
82,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
83,
796,
47764,
17816,
28664,
20520,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
796,
288,
83,
13,
66,
5700,
388,
3419,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
13,
918,
480,
10786,
2435,
3256,
287,
5372,
28,
17821,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
796,
279,
67,
13,
27996,
26933,
12962,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
13,
918,
480,
10786,
2435,
3256,
287,
5372,
28,
17821,
8,
198,
2,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
640,
62,
22704,
796,
256,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
477,
62,
2435,
62,
897,
274,
13,
33295,
7,
2435,
62,
22704,
8,
198,
2,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
3497,
691,
5981,
24637,
286,
15180,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
611,
15180,
62,
4868,
6624,
705,
439,
10354,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
796,
47764,
58,
28665,
82,
62,
4868,
60,
198,
2,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
477,
62,
7568,
82,
13,
33295,
7,
7568,
8,
198,
2,
198,
2,
198,
2,
220,
220,
220,
220,
1441,
477,
62,
7568,
82,
11,
477,
62,
2435,
62,
897,
274,
628,
198,
2,
198,
2,
1303,
770,
835,
286,
1804,
3487,
1634,
318,
3734,
329,
890,
1366,
5621,
290,
357,
2411,
9404,
8,
1790,
8379,
20428,
198,
2,
1303,
383,
2173,
422,
262,
13015,
286,
262,
40522,
954,
1165,
1310,
198,
2,
825,
15284,
62,
11265,
1634,
62,
10951,
7,
7568,
11,
46490,
62,
10468,
62,
6369,
18973,
3955,
3525,
62,
38827,
12532,
20754,
11,
374,
20471,
62,
12853,
62,
3672,
2599,
198,
2,
220,
220,
220,
220,
611,
2099,
7,
7568,
8,
318,
1351,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
62,
23350,
796,
279,
67,
13,
1102,
9246,
7,
7568,
8,
198,
2,
220,
220,
220,
220,
2073,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
62,
23350,
796,
47764,
198,
2,
198,
2,
220,
220,
220,
220,
611,
705,
2435,
6,
287,
47764,
62,
23350,
13,
28665,
82,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
47764,
62,
23350,
13,
14781,
10786,
2435,
3256,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16488,
11639,
28665,
82,
3256,
287,
5372,
28,
17821,
8,
198,
2,
198,
2,
220,
220,
220,
220,
47764,
62,
32604,
796,
47764,
62,
23350,
13,
32604,
7,
22704,
28,
15,
8,
198,
2,
220,
220,
220,
220,
47764,
62,
19282,
796,
47764,
62,
23350,
13,
19282,
7,
22704,
28,
15,
8,
198,
2,
220,
220,
220,
220,
47764,
62,
9806,
796,
47764,
62,
23350,
13,
9806,
7,
22704,
28,
15,
8,
198,
2,
220,
220,
220,
220,
47764,
62,
1084,
796,
47764,
62,
23350,
13,
1084,
7,
22704,
28,
15,
8,
198,
2,
220,
220,
220,
220,
5739,
796,
1391,
6,
32604,
10354,
47764,
62,
32604,
11,
705,
19282,
10354,
47764,
62,
19282,
11,
705,
9806,
10354,
47764,
62,
9806,
11,
705,
1084,
10354,
47764,
62,
1084,
92,
198,
2,
220,
220,
220,
220,
47764,
62,
27237,
62,
10951,
796,
279,
67,
13,
6601,
19778,
7,
14535,
737,
7645,
3455,
3419,
198,
2,
198,
2,
220,
220,
220,
220,
47764,
62,
27237,
62,
10951,
13,
1462,
62,
40664,
7,
34219,
62,
10468,
62,
6369,
18973,
3955,
3525,
62,
38827,
12532,
20754,
1343,
374,
20471,
62,
12853,
62,
3672,
1343,
705,
12,
27237,
6,
1343,
45302,
40664,
11537,
198,
2,
198,
2,
220,
220,
220,
220,
1303,
28114,
1554,
2398,
9474,
284,
787,
262,
277,
17062,
2198,
546,
31986,
31562,
13196,
198,
2,
220,
220,
220,
220,
1303,
329,
3895,
287,
47764,
62,
23350,
13,
28665,
82,
25,
198,
2,
220,
220,
220,
220,
1303,
220,
220,
220,
220,
458,
83,
13,
10034,
7,
7568,
62,
23350,
58,
30053,
4083,
1462,
62,
77,
32152,
22784,
2026,
11,
12109,
28,
17821,
11,
1986,
8043,
11639,
70,
3256,
17130,
28,
15,
13,
2425,
8,
198,
2,
220,
220,
220,
220,
1303,
220,
220,
220,
220,
458,
83,
13,
7839,
7,
30053,
8,
198,
2,
220,
220,
220,
220,
1303,
220,
220,
220,
220,
458,
83,
13,
12860,
3419,
198,
2,
198,
2,
220,
220,
220,
220,
1441,
47764,
62,
27237,
62,
10951,
198,
2,
198,
2,
198,
2,
825,
3440,
62,
11265,
1634,
62,
10951,
7,
34219,
62,
10468,
62,
6369,
18973,
3955,
3525,
62,
38827,
12532,
20754,
11,
374,
20471,
62,
12853,
62,
3672,
2599,
198,
2,
220,
220,
220,
220,
1441,
279,
67,
13,
961,
62,
40664,
7,
34219,
62,
10468,
62,
6369,
18973,
3955,
3525,
62,
38827,
12532,
20754,
1343,
374,
20471,
62,
12853,
62,
3672,
1343,
705,
12,
27237,
6,
1343,
45302,
40664,
3256,
6376,
62,
4033,
28,
15,
8,
198,
2,
198,
2,
198,
2,
825,
3487,
1096,
62,
7568,
7,
7568,
82,
11,
3487,
1634,
62,
10951,
11,
3487,
1634,
62,
4906,
11639,
1084,
9806,
62,
37047,
6,
2599,
198,
2,
220,
220,
220,
220,
611,
3487,
1634,
62,
4906,
6624,
705,
4908,
31562,
10354,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
825,
3487,
1096,
62,
30053,
7,
4033,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
32604,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
32604,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
19282,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
19282,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
4033,
532,
951,
62,
32604,
8,
1220,
951,
62,
19282,
198,
2,
220,
220,
220,
220,
1288,
361,
3487,
1634,
62,
4906,
6624,
705,
1084,
9806,
62,
1930,
10354,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
825,
3487,
1096,
62,
30053,
7,
4033,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
1084,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
1084,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
9806,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
9806,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
4033,
532,
951,
62,
1084,
8,
1220,
357,
4033,
62,
9806,
532,
951,
62,
1084,
8,
198,
2,
220,
220,
220,
220,
1288,
361,
3487,
1634,
62,
4906,
6624,
705,
1084,
9806,
62,
37047,
10354,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
825,
3487,
1096,
62,
30053,
7,
4033,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
1084,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
1084,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
9806,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
9806,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
532,
16,
13,
15,
1343,
362,
13,
15,
1635,
357,
4033,
532,
951,
62,
1084,
8,
1220,
357,
4033,
62,
9806,
532,
951,
62,
1084,
8,
198,
2,
198,
2,
220,
220,
220,
220,
611,
2099,
7,
7568,
82,
8,
318,
1351,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2837,
7,
11925,
7,
7568,
82,
8,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
9501,
58,
72,
60,
796,
288,
9501,
58,
72,
4083,
39014,
7,
11265,
1096,
62,
30053,
11,
16488,
28,
15,
8,
198,
2,
220,
220,
220,
220,
2073,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
288,
9501,
796,
288,
9501,
13,
39014,
7,
11265,
1096,
62,
30053,
11,
16488,
28,
15,
8,
198,
2,
198,
2,
220,
220,
220,
220,
1441,
288,
9501,
198,
2,
198,
2,
198,
2,
825,
2853,
6636,
1096,
62,
7568,
7,
7568,
82,
11,
3487,
1634,
62,
10951,
11,
3487,
1634,
62,
4906,
11639,
1084,
9806,
62,
37047,
6,
2599,
198,
2,
220,
220,
220,
220,
611,
3487,
1634,
62,
4906,
6624,
705,
4908,
31562,
10354,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
825,
2853,
6636,
1096,
62,
30053,
7,
4033,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
32604,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
32604,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
19282,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
19282,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
951,
1635,
951,
62,
19282,
1343,
951,
62,
32604,
198,
2,
220,
220,
220,
220,
1288,
361,
3487,
1634,
62,
4906,
6624,
705,
1084,
9806,
62,
1930,
10354,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
825,
2853,
6636,
1096,
62,
30053,
7,
4033,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
1084,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
1084,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
9806,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
9806,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
951,
1635,
357,
4033,
62,
9806,
532,
951,
62,
1084,
8,
1343,
951,
62,
1084,
198,
2,
220,
220,
220,
220,
1288,
361,
3487,
1634,
62,
4906,
6624,
705,
1084,
9806,
62,
37047,
10354,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
825,
2853,
6636,
1096,
62,
30053,
7,
4033,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
1084,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
1084,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
62,
9806,
796,
3487,
1634,
62,
10951,
13,
17946,
17816,
9806,
3256,
951,
13,
3672,
60,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
14808,
4033,
1343,
352,
13,
15,
8,
1220,
362,
13,
15,
8,
1635,
357,
4033,
62,
9806,
532,
951,
62,
1084,
8,
1343,
951,
62,
1084,
198,
2,
198,
2,
220,
220,
220,
220,
611,
2099,
7,
7568,
82,
8,
318,
1351,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2837,
7,
11925,
7,
7568,
82,
8,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
9501,
58,
72,
60,
796,
288,
9501,
58,
72,
4083,
39014,
7,
6559,
6636,
1096,
62,
30053,
11,
16488,
28,
15,
8,
198,
2,
220,
220,
220,
220,
2073,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
288,
9501,
796,
288,
9501,
13,
39014,
7,
6559,
6636,
1096,
62,
30053,
11,
16488,
28,
15,
8,
198,
2,
198,
2,
220,
220,
220,
220,
1441,
288,
9501,
628,
198,
198,
4299,
7110,
62,
43420,
7,
3262,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26498,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27039,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3487,
1634,
62,
10951,
796,
6045,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
640,
62,
897,
274,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2393,
6978,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17311,
62,
4868,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23862,
62,
4868,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4838,
62,
26268,
62,
4868,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33756,
62,
11925,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5814,
62,
929,
62,
11925,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4838,
62,
26268,
62,
25616,
28,
25101,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2912,
11639,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
20471,
62,
12853,
62,
3672,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3613,
28,
25101,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1969,
62,
26268,
62,
312,
87,
28,
25836,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
770,
2163,
18178,
371,
6144,
4554,
11,
7159,
290,
13690,
47,
2305,
4554,
13,
198,
220,
220,
220,
632,
4539,
530,
4738,
6306,
351,
13690,
47,
2305,
11,
198,
220,
220,
220,
17311,
262,
1366,
656,
371,
6144,
290,
2198,
703,
880,
371,
6144,
26334,
13690,
47,
2305,
1181,
530,
640,
2239,
4058,
286,
640,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
374,
20471,
62,
12853,
62,
3672,
796,
2010,
13,
81,
20471,
62,
12853,
62,
3672,
628,
220,
220,
220,
611,
2393,
6978,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2393,
6978,
796,
26498,
13,
2100,
62,
7753,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2099,
7,
7753,
6978,
8,
6624,
1351,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2393,
6978,
796,
2393,
6978,
58,
15,
60,
628,
220,
220,
220,
611,
5814,
62,
929,
62,
11925,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5814,
62,
929,
62,
11925,
796,
26498,
13,
31975,
62,
929,
62,
11925,
628,
220,
220,
220,
611,
33756,
62,
11925,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
33756,
62,
11925,
796,
26498,
13,
41068,
62,
11925,
628,
220,
220,
220,
611,
17311,
62,
4868,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
17311,
62,
4868,
796,
26498,
13,
15414,
82,
62,
4868,
198,
220,
220,
220,
220,
220,
220,
220,
611,
17311,
62,
4868,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
49,
6144,
17311,
407,
2810,
0,
11537,
628,
220,
220,
220,
611,
23862,
62,
4868,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
23862,
62,
4868,
796,
26498,
13,
22915,
82,
62,
4868,
198,
220,
220,
220,
220,
220,
220,
220,
611,
23862,
62,
4868,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
49,
6144,
23862,
407,
2810,
0,
11537,
628,
220,
220,
220,
611,
4838,
62,
26268,
62,
25616,
290,
357,
20225,
62,
26268,
62,
4868,
318,
6045,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
4838,
62,
26268,
62,
4868,
796,
26498,
13,
19836,
62,
26268,
62,
1640,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4838,
62,
26268,
62,
4868,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
49,
6144,
4838,
12,
26268,
12,
15414,
82,
407,
2810,
0,
11537,
628,
220,
220,
220,
2010,
13,
42503,
3419,
198,
220,
220,
220,
2010,
13,
18206,
3419,
198,
220,
220,
220,
3335,
796,
651,
62,
25202,
3419,
628,
220,
220,
220,
611,
3487,
1634,
62,
10951,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3487,
1634,
62,
10951,
796,
3440,
62,
11265,
1634,
62,
10951,
7,
22046,
13,
34219,
62,
10468,
62,
6369,
18973,
3955,
3525,
62,
38827,
12532,
20754,
11,
374,
20471,
62,
12853,
62,
3672,
8,
628,
220,
220,
220,
611,
27039,
318,
6045,
393,
640,
62,
897,
274,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1332,
62,
7568,
82,
11,
640,
62,
897,
274,
796,
3440,
62,
7890,
7,
22046,
11,
2393,
6978,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1332,
62,
7568,
82,
62,
27237,
796,
3487,
1096,
62,
7568,
7,
9288,
62,
7568,
82,
11,
3487,
1634,
62,
10951,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1332,
62,
2617,
796,
16092,
292,
316,
7,
9288,
62,
7568,
82,
62,
27237,
11,
26498,
11,
640,
62,
897,
274,
28,
2435,
62,
897,
274,
11,
33756,
62,
11925,
28,
41068,
62,
11925,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1619,
1332,
62,
7568,
82,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1332,
62,
2617,
796,
4866,
13,
22089,
30073,
7,
19608,
292,
316,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1332,
62,
2617,
13,
42503,
62,
41068,
62,
11925,
7,
41068,
62,
11925,
28,
41068,
62,
11925,
8,
628,
220,
220,
220,
1303,
18980,
262,
6306,
1366,
198,
220,
220,
220,
3033,
11,
6670,
11,
640,
62,
22704,
796,
1332,
62,
2617,
13,
1136,
62,
23100,
3681,
7,
16,
8,
220,
1303,
5930,
1271,
287,
28103,
284,
651,
262,
976,
4686,
87,
379,
790,
1057,
628,
220,
220,
220,
3033,
62,
30094,
796,
279,
67,
13,
6601,
19778,
7,
7890,
28,
40890,
11,
15180,
28,
15414,
82,
62,
4868,
8,
198,
220,
220,
220,
6670,
62,
30094,
796,
279,
67,
13,
6601,
19778,
7,
7890,
28,
83,
853,
1039,
11,
15180,
28,
22915,
82,
62,
4868,
8,
628,
220,
220,
220,
374,
20471,
62,
22915,
82,
796,
279,
67,
13,
6601,
19778,
7,
28665,
82,
28,
22915,
82,
62,
4868,
8,
628,
220,
220,
220,
5814,
62,
929,
62,
312,
87,
796,
657,
198,
220,
220,
220,
374,
20471,
62,
15414,
62,
15,
796,
4866,
13,
22089,
30073,
7,
40890,
62,
30094,
13,
346,
420,
58,
15,
12962,
198,
220,
220,
220,
1303,
8314,
407,
2222,
1997,
13,
4162,
30,
657,
12,
5219,
6584,
470,
423,
6632,
5387,
1181,
2233,
284,
29275,
986,
198,
220,
220,
220,
981,
5814,
62,
929,
62,
312,
87,
1279,
5814,
62,
929,
62,
11925,
25,
198,
220,
220,
220,
220,
220,
220,
220,
374,
20471,
62,
15414,
796,
374,
20471,
62,
15414,
62,
15,
198,
220,
220,
220,
220,
220,
220,
220,
374,
20471,
62,
15414,
796,
45941,
13,
16485,
1453,
2736,
7,
81,
20471,
62,
15414,
13,
1462,
62,
77,
32152,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
374,
20471,
62,
15414,
796,
28034,
13,
6738,
62,
77,
32152,
7,
81,
20471,
62,
15414,
737,
22468,
22446,
13271,
421,
1453,
2736,
7,
15,
737,
13271,
421,
1453,
2736,
7,
15,
737,
1462,
7,
25202,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2010,
7,
81,
20471,
62,
15414,
28,
81,
20471,
62,
15414,
8,
198,
220,
220,
220,
220,
220,
220,
220,
5814,
62,
929,
62,
312,
87,
15853,
352,
198,
220,
220,
220,
2010,
13,
22915,
82,
796,
17635,
198,
220,
220,
220,
2010,
13,
39873,
62,
24588,
796,
657,
628,
220,
220,
220,
4686,
87,
62,
565,
796,
657,
198,
220,
220,
220,
1969,
62,
1169,
62,
26268,
796,
10352,
628,
220,
220,
220,
329,
6376,
11,
5752,
287,
3033,
62,
30094,
13,
2676,
8516,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
374,
20471,
62,
15414,
796,
279,
67,
13,
6601,
19778,
7,
30073,
13,
22089,
30073,
7,
808,
29720,
7645,
3455,
22446,
42503,
62,
9630,
7,
14781,
28,
17821,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4686,
87,
62,
565,
6624,
1969,
62,
26268,
62,
312,
87,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1969,
62,
1169,
62,
26268,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
611,
4838,
62,
26268,
62,
25616,
290,
1969,
62,
1169,
62,
26268,
290,
357,
11265,
1143,
62,
81,
20471,
62,
22915,
318,
407,
6045,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
20471,
62,
15414,
58,
20225,
62,
26268,
62,
4868,
60,
796,
39279,
62,
81,
20471,
62,
22915,
58,
20225,
62,
26268,
62,
4868,
60,
198,
220,
220,
220,
220,
220,
220,
220,
374,
20471,
62,
15414,
796,
45941,
13,
16485,
1453,
2736,
7,
81,
20471,
62,
15414,
13,
1462,
62,
77,
32152,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
374,
20471,
62,
15414,
796,
28034,
13,
6738,
62,
77,
32152,
7,
81,
20471,
62,
15414,
737,
22468,
22446,
13271,
421,
1453,
2736,
7,
15,
737,
13271,
421,
1453,
2736,
7,
15,
737,
1462,
7,
25202,
8,
198,
220,
220,
220,
220,
220,
220,
220,
39279,
62,
81,
20471,
62,
22915,
796,
2010,
7,
81,
20471,
62,
15414,
28,
81,
20471,
62,
15414,
8,
198,
220,
220,
220,
220,
220,
220,
220,
39279,
62,
81,
20471,
62,
22915,
796,
45941,
13,
16485,
1453,
2736,
7,
11265,
1143,
62,
81,
20471,
62,
22915,
13,
15255,
620,
22446,
36166,
22446,
77,
32152,
3419,
737,
83,
349,
396,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
39279,
62,
81,
20471,
62,
22915,
796,
4866,
13,
22089,
30073,
7,
30094,
13,
6601,
19778,
7,
7890,
41888,
11265,
1143,
62,
81,
20471,
62,
22915,
4357,
15180,
28,
22915,
82,
62,
4868,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
374,
20471,
62,
22915,
82,
796,
374,
20471,
62,
22915,
82,
13,
33295,
7,
30073,
13,
22089,
30073,
7,
11265,
1143,
62,
81,
20471,
62,
22915,
828,
8856,
62,
9630,
28,
17821,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
87,
62,
565,
15853,
352,
628,
220,
220,
220,
6670,
62,
30094,
62,
6559,
579,
796,
2853,
6636,
1096,
62,
7568,
7,
83,
853,
1039,
62,
30094,
11,
3487,
1634,
62,
10951,
8,
198,
220,
220,
220,
374,
20471,
62,
22915,
82,
62,
6559,
579,
796,
2853,
6636,
1096,
62,
7568,
7,
81,
20471,
62,
22915,
82,
11,
3487,
1634,
62,
10951,
8,
198,
220,
220,
220,
2336,
11,
7877,
82,
796,
7110,
62,
43420,
62,
11423,
7,
83,
853,
1039,
62,
30094,
62,
6559,
579,
11,
374,
20471,
62,
22915,
82,
62,
6559,
579,
11,
640,
62,
22704,
11,
2912,
11,
4838,
62,
26268,
62,
25616,
11,
1969,
62,
26268,
62,
312,
87,
8,
628,
220,
220,
220,
458,
83,
13,
12860,
3419,
628,
220,
220,
220,
611,
3613,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
6889,
24512,
611,
407,
1865,
2152,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28686,
13,
76,
4335,
17062,
10786,
21928,
62,
489,
1747,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
9220,
3109,
1023,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
220,
220,
220,
220,
3128,
7575,
49201,
796,
4818,
8079,
13,
2197,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
41033,
13290,
796,
3128,
7575,
49201,
13,
2536,
31387,
7203,
12,
4,
67,
4,
65,
4,
56,
62,
4,
39,
4,
44,
4,
50,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
611,
374,
20471,
62,
12853,
62,
3672,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2336,
13,
21928,
5647,
7,
4458,
14,
21928,
62,
489,
1747,
14,
6,
1343,
374,
20471,
62,
12853,
62,
3672,
1343,
41033,
13290,
1343,
45302,
11134,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2336,
13,
21928,
5647,
7,
4458,
14,
21928,
62,
489,
1747,
14,
6,
1343,
41033,
13290,
1343,
45302,
11134,
11537,
198
] | 2.189903 | 6,477 |
# -*- coding: utf-8 -*-
"""
.. admonition:: License
Copyright 2019 CNES
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the specific language governing permissions and
limitations under the License.
"""
import argparse
from resto_client.base_exceptions import RestoClientDesignError
from resto_client.services.service_access import (AuthenticationServiceAccess, RestoServiceAccess)
from resto_client.settings.resto_client_config import resto_client_print
from resto_client.settings.servers_database import DB_SERVERS
from .parser_common import CliFunctionReturnType
from .parser_settings import (SERVER_ARGNAME, RESTO_URL_ARGNAME, RESTO_PROTOCOL_ARGNAME,
AUTH_URL_ARGNAME, AUTH_PROTOCOL_ARGNAME)
def cli_create_server(args: argparse.Namespace) -> CliFunctionReturnType:
"""
CLI adapter to create a server definition
:param args: arguments parsed by the CLI parser
:returns: the resto client parameters and the resto server possibly built by this command.
"""
# TODO: Modify ServiceAcces such that lower is implemented in them
resto_access = RestoServiceAccess(getattr(args, RESTO_URL_ARGNAME),
getattr(args, RESTO_PROTOCOL_ARGNAME).lower())
auth_access = AuthenticationServiceAccess(getattr(args, AUTH_URL_ARGNAME),
getattr(args, AUTH_PROTOCOL_ARGNAME).lower())
DB_SERVERS.create_server(getattr(args, SERVER_ARGNAME), resto_access, auth_access)
return None, None
def cli_delete_server(args: argparse.Namespace) -> CliFunctionReturnType:
"""
CLI adapter to delete a server definition
:param args: arguments parsed by the CLI parser
:returns: the resto client parameters and the resto server possibly built by this command.
"""
DB_SERVERS.delete(getattr(args, SERVER_ARGNAME))
return None, None
def cli_edit_server(args: argparse.Namespace) -> CliFunctionReturnType:
"""
CLI adapter to edit the server characteristics
:param args: arguments parsed by the CLI parser
:raises RestoClientDesignError: unconditionally, as this function is not implemented yet
"""
raise RestoClientDesignError('Edit server unimplemented')
def cli_show_servers(args: argparse.Namespace) -> CliFunctionReturnType:
"""
CLI adapter to show the servers database
:param args: arguments parsed by the CLI parser
:returns: the resto client parameters and the resto server possibly built by this command.
"""
_ = args # to avoid pylint warning
resto_client_print(DB_SERVERS)
return None, None
# We need to specify argparse._SubParsersAction for mypy to run. Thus pylint squeals.
# pylint: disable=protected-access
def add_configure_server_subparser(sub_parsers: argparse._SubParsersAction) -> None:
"""
Add the 'configure_server' subparser
:param sub_parsers: argparse object used to add a parser for that subcommand.
"""
parser_configure_server = sub_parsers.add_parser(
'configure_server', help='configure servers known by resto_client.',
description='Allows to create, modify or delete servers characteristics: url, type, etc.',
epilog='Servers definition is stored in a configuration file and can be edited using this'
' command.')
help_msg = 'For more help: {} <parameter> -h'.format(parser_configure_server.prog)
sub_parsers_configure_server = parser_configure_server.add_subparsers(description=help_msg)
add_config_server_create_parser(sub_parsers_configure_server)
add_config_server_delete_parser(sub_parsers_configure_server)
add_config_server_edit_parser(sub_parsers_configure_server)
add_config_server_show_parser(sub_parsers_configure_server)
def add_config_server_create_parser(
sub_parsers_configure_server: argparse._SubParsersAction) -> None:
"""
Update the 'configure_server' command subparser with options for 'configure_server create'
:param sub_parsers_configure_server: argparse object used to add a parser for that subcommand.
"""
subparser = sub_parsers_configure_server.add_parser(
'create', help='create a new server',
description='Create a new server in the servers configuration database.')
_add_positional_args_parser(subparser)
subparser.set_defaults(func=cli_create_server)
def add_config_server_delete_parser(
sub_parsers_configure_server: argparse._SubParsersAction) -> None:
"""
Update the 'configure_server' command subparser with options for 'configure_server delete'
:param sub_parsers_configure_server: argparse object used to add a parser for that subcommand.
"""
subparser = sub_parsers_configure_server.add_parser(
'delete', help='delete an existing server',
description='Delete a server from the configuration database.')
subparser.add_argument(SERVER_ARGNAME, help='name of the server to delete')
subparser.set_defaults(func=cli_delete_server)
def add_config_server_edit_parser(
sub_parsers_configure_server: argparse._SubParsersAction) -> None:
"""
Update the 'configure_server' command subparser with options for 'configure_server edit'
:param sub_parsers_configure_server: argparse object used to add a parser for that subcommand.
"""
subparser = sub_parsers_configure_server.add_parser(
'edit', help='edit server characteristics',
description='Edit the characteristics of a server existing in the configuration database.')
_add_positional_args_parser(subparser)
subparser.set_defaults(func=cli_edit_server)
def add_config_server_show_parser(
sub_parsers_configure_server: argparse._SubParsersAction) -> None:
"""
Update the 'configure_server' command subparser with options for 'configure_server show'
:param sub_parsers_configure_server: argparse object used to add a parser for that subcommand.
"""
subparser = sub_parsers_configure_server.add_parser(
'show', help='show servers database',
description='Show all the servers defined in the database with their configuration.')
subparser.set_defaults(func=cli_show_servers)
def _add_positional_args_parser(subparser: argparse.ArgumentParser) -> None:
"""
Add the positional arguments parsing rules for configure_server subcommands
:param subparser: parser to be supplemented with positional arguments.
"""
subparser.add_argument(SERVER_ARGNAME, help='name of the server')
group_resto = subparser.add_argument_group('resto service')
group_resto.add_argument(RESTO_URL_ARGNAME, help='URL of the resto server')
group_resto.add_argument(RESTO_PROTOCOL_ARGNAME,
choices=RestoServiceAccess.supported_protocols(),
help='Protocol of the resto server')
group_auth = subparser.add_argument_group('authentication service')
group_auth.add_argument(AUTH_URL_ARGNAME, nargs='?', help='URL of the authentication server')
group_auth.add_argument(AUTH_PROTOCOL_ARGNAME,
choices=AuthenticationServiceAccess.supported_protocols(),
help='Protocol of the authentication server')
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
492,
37202,
653,
3712,
13789,
628,
220,
220,
15069,
13130,
31171,
1546,
628,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
407,
779,
428,
2393,
2845,
198,
220,
220,
287,
11846,
351,
262,
13789,
13,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
628,
220,
220,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
628,
220,
220,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
9387,
739,
262,
13789,
198,
220,
220,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
198,
220,
220,
393,
17142,
13,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
220,
220,
11247,
739,
262,
13789,
13,
198,
37811,
198,
11748,
1822,
29572,
198,
198,
6738,
1334,
78,
62,
16366,
13,
8692,
62,
1069,
11755,
1330,
8324,
78,
11792,
23067,
12331,
198,
6738,
1334,
78,
62,
16366,
13,
30416,
13,
15271,
62,
15526,
1330,
357,
47649,
3299,
16177,
15457,
11,
8324,
78,
16177,
15457,
8,
198,
6738,
1334,
78,
62,
16366,
13,
33692,
13,
2118,
78,
62,
16366,
62,
11250,
1330,
1334,
78,
62,
16366,
62,
4798,
198,
6738,
1334,
78,
62,
16366,
13,
33692,
13,
2655,
690,
62,
48806,
1330,
20137,
62,
35009,
28884,
198,
198,
6738,
764,
48610,
62,
11321,
1330,
1012,
72,
22203,
13615,
6030,
198,
6738,
764,
48610,
62,
33692,
1330,
357,
35009,
5959,
62,
1503,
16630,
10067,
11,
30617,
46,
62,
21886,
62,
1503,
16630,
10067,
11,
30617,
46,
62,
4805,
2394,
4503,
3535,
62,
1503,
16630,
10067,
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,
37195,
62,
21886,
62,
1503,
16630,
10067,
11,
37195,
62,
4805,
2394,
4503,
3535,
62,
1503,
16630,
10067,
8,
628,
198,
4299,
537,
72,
62,
17953,
62,
15388,
7,
22046,
25,
1822,
29572,
13,
36690,
10223,
8,
4613,
1012,
72,
22203,
13615,
6030,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
43749,
21302,
284,
2251,
257,
4382,
6770,
628,
220,
220,
220,
1058,
17143,
26498,
25,
7159,
44267,
416,
262,
43749,
30751,
198,
220,
220,
220,
1058,
7783,
82,
25,
262,
1334,
78,
5456,
10007,
290,
262,
1334,
78,
4382,
5457,
3170,
416,
428,
3141,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
16926,
46,
25,
3401,
1958,
4809,
17320,
274,
884,
326,
2793,
318,
9177,
287,
606,
198,
220,
220,
220,
1334,
78,
62,
15526,
796,
8324,
78,
16177,
15457,
7,
1136,
35226,
7,
22046,
11,
30617,
46,
62,
21886,
62,
1503,
16630,
10067,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
651,
35226,
7,
22046,
11,
30617,
46,
62,
4805,
2394,
4503,
3535,
62,
1503,
16630,
10067,
737,
21037,
28955,
198,
220,
220,
220,
6284,
62,
15526,
796,
48191,
16177,
15457,
7,
1136,
35226,
7,
22046,
11,
37195,
62,
21886,
62,
1503,
16630,
10067,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
651,
35226,
7,
22046,
11,
37195,
62,
4805,
2394,
4503,
3535,
62,
1503,
16630,
10067,
737,
21037,
28955,
198,
220,
220,
220,
20137,
62,
35009,
28884,
13,
17953,
62,
15388,
7,
1136,
35226,
7,
22046,
11,
18871,
5959,
62,
1503,
16630,
10067,
828,
1334,
78,
62,
15526,
11,
6284,
62,
15526,
8,
198,
220,
220,
220,
1441,
6045,
11,
6045,
628,
198,
4299,
537,
72,
62,
33678,
62,
15388,
7,
22046,
25,
1822,
29572,
13,
36690,
10223,
8,
4613,
1012,
72,
22203,
13615,
6030,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
43749,
21302,
284,
12233,
257,
4382,
6770,
628,
220,
220,
220,
1058,
17143,
26498,
25,
7159,
44267,
416,
262,
43749,
30751,
198,
220,
220,
220,
1058,
7783,
82,
25,
262,
1334,
78,
5456,
10007,
290,
262,
1334,
78,
4382,
5457,
3170,
416,
428,
3141,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
20137,
62,
35009,
28884,
13,
33678,
7,
1136,
35226,
7,
22046,
11,
18871,
5959,
62,
1503,
16630,
10067,
4008,
198,
220,
220,
220,
1441,
6045,
11,
6045,
628,
198,
4299,
537,
72,
62,
19312,
62,
15388,
7,
22046,
25,
1822,
29572,
13,
36690,
10223,
8,
4613,
1012,
72,
22203,
13615,
6030,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
43749,
21302,
284,
4370,
262,
4382,
9695,
628,
220,
220,
220,
1058,
17143,
26498,
25,
7159,
44267,
416,
262,
43749,
30751,
198,
220,
220,
220,
1058,
430,
2696,
8324,
78,
11792,
23067,
12331,
25,
31776,
8736,
11,
355,
428,
2163,
318,
407,
9177,
1865,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5298,
8324,
78,
11792,
23067,
12331,
10786,
18378,
4382,
28418,
1154,
12061,
11537,
628,
198,
4299,
537,
72,
62,
12860,
62,
2655,
690,
7,
22046,
25,
1822,
29572,
13,
36690,
10223,
8,
4613,
1012,
72,
22203,
13615,
6030,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
43749,
21302,
284,
905,
262,
9597,
6831,
628,
220,
220,
220,
1058,
17143,
26498,
25,
7159,
44267,
416,
262,
43749,
30751,
198,
220,
220,
220,
1058,
7783,
82,
25,
262,
1334,
78,
5456,
10007,
290,
262,
1334,
78,
4382,
5457,
3170,
416,
428,
3141,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
4808,
796,
26498,
220,
1303,
284,
3368,
279,
2645,
600,
6509,
198,
220,
220,
220,
1334,
78,
62,
16366,
62,
4798,
7,
11012,
62,
35009,
28884,
8,
198,
220,
220,
220,
1441,
6045,
11,
6045,
628,
198,
2,
775,
761,
284,
11986,
1822,
29572,
13557,
7004,
47,
945,
364,
12502,
329,
616,
9078,
284,
1057,
13,
6660,
279,
2645,
600,
2809,
10621,
13,
198,
2,
279,
2645,
600,
25,
15560,
28,
24326,
12,
15526,
198,
4299,
751,
62,
11250,
495,
62,
15388,
62,
7266,
48610,
7,
7266,
62,
79,
945,
364,
25,
1822,
29572,
13557,
7004,
47,
945,
364,
12502,
8,
4613,
6045,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3060,
262,
705,
11250,
495,
62,
15388,
6,
22718,
28198,
628,
220,
220,
220,
1058,
17143,
850,
62,
79,
945,
364,
25,
1822,
29572,
2134,
973,
284,
751,
257,
30751,
329,
326,
850,
21812,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
30751,
62,
11250,
495,
62,
15388,
796,
850,
62,
79,
945,
364,
13,
2860,
62,
48610,
7,
198,
220,
220,
220,
220,
220,
220,
220,
705,
11250,
495,
62,
15388,
3256,
1037,
11639,
11250,
495,
9597,
1900,
416,
1334,
78,
62,
16366,
2637,
11,
198,
220,
220,
220,
220,
220,
220,
220,
6764,
11639,
34934,
284,
2251,
11,
13096,
393,
12233,
9597,
9695,
25,
19016,
11,
2099,
11,
3503,
2637,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2462,
346,
519,
11639,
7089,
690,
6770,
318,
8574,
287,
257,
8398,
2393,
290,
460,
307,
13012,
1262,
428,
6,
198,
220,
220,
220,
220,
220,
220,
220,
705,
3141,
2637,
8,
198,
220,
220,
220,
1037,
62,
19662,
796,
705,
1890,
517,
1037,
25,
23884,
1279,
17143,
2357,
29,
532,
71,
4458,
18982,
7,
48610,
62,
11250,
495,
62,
15388,
13,
1676,
70,
8,
198,
220,
220,
220,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
796,
30751,
62,
11250,
495,
62,
15388,
13,
2860,
62,
7266,
79,
945,
364,
7,
11213,
28,
16794,
62,
19662,
8,
628,
220,
220,
220,
751,
62,
11250,
62,
15388,
62,
17953,
62,
48610,
7,
7266,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
8,
198,
220,
220,
220,
751,
62,
11250,
62,
15388,
62,
33678,
62,
48610,
7,
7266,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
8,
198,
220,
220,
220,
751,
62,
11250,
62,
15388,
62,
19312,
62,
48610,
7,
7266,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
8,
198,
220,
220,
220,
751,
62,
11250,
62,
15388,
62,
12860,
62,
48610,
7,
7266,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
8,
628,
198,
4299,
751,
62,
11250,
62,
15388,
62,
17953,
62,
48610,
7,
198,
220,
220,
220,
220,
220,
220,
220,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
25,
1822,
29572,
13557,
7004,
47,
945,
364,
12502,
8,
4613,
6045,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
10133,
262,
705,
11250,
495,
62,
15388,
6,
3141,
22718,
28198,
351,
3689,
329,
705,
11250,
495,
62,
15388,
2251,
6,
628,
220,
220,
220,
1058,
17143,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
25,
1822,
29572,
2134,
973,
284,
751,
257,
30751,
329,
326,
850,
21812,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
22718,
28198,
796,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
13,
2860,
62,
48610,
7,
198,
220,
220,
220,
220,
220,
220,
220,
705,
17953,
3256,
1037,
11639,
17953,
257,
649,
4382,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
6764,
11639,
16447,
257,
649,
4382,
287,
262,
9597,
8398,
6831,
2637,
8,
198,
220,
220,
220,
4808,
2860,
62,
1930,
1859,
62,
22046,
62,
48610,
7,
7266,
48610,
8,
198,
220,
220,
220,
22718,
28198,
13,
2617,
62,
12286,
82,
7,
20786,
28,
44506,
62,
17953,
62,
15388,
8,
628,
198,
4299,
751,
62,
11250,
62,
15388,
62,
33678,
62,
48610,
7,
198,
220,
220,
220,
220,
220,
220,
220,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
25,
1822,
29572,
13557,
7004,
47,
945,
364,
12502,
8,
4613,
6045,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
10133,
262,
705,
11250,
495,
62,
15388,
6,
3141,
22718,
28198,
351,
3689,
329,
705,
11250,
495,
62,
15388,
12233,
6,
628,
220,
220,
220,
1058,
17143,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
25,
1822,
29572,
2134,
973,
284,
751,
257,
30751,
329,
326,
850,
21812,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
22718,
28198,
796,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
13,
2860,
62,
48610,
7,
198,
220,
220,
220,
220,
220,
220,
220,
705,
33678,
3256,
1037,
11639,
33678,
281,
4683,
4382,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
6764,
11639,
38727,
257,
4382,
422,
262,
8398,
6831,
2637,
8,
198,
220,
220,
220,
22718,
28198,
13,
2860,
62,
49140,
7,
35009,
5959,
62,
1503,
16630,
10067,
11,
1037,
11639,
3672,
286,
262,
4382,
284,
12233,
11537,
198,
220,
220,
220,
22718,
28198,
13,
2617,
62,
12286,
82,
7,
20786,
28,
44506,
62,
33678,
62,
15388,
8,
628,
198,
4299,
751,
62,
11250,
62,
15388,
62,
19312,
62,
48610,
7,
198,
220,
220,
220,
220,
220,
220,
220,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
25,
1822,
29572,
13557,
7004,
47,
945,
364,
12502,
8,
4613,
6045,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
10133,
262,
705,
11250,
495,
62,
15388,
6,
3141,
22718,
28198,
351,
3689,
329,
705,
11250,
495,
62,
15388,
4370,
6,
628,
220,
220,
220,
1058,
17143,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
25,
1822,
29572,
2134,
973,
284,
751,
257,
30751,
329,
326,
850,
21812,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
22718,
28198,
796,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
13,
2860,
62,
48610,
7,
198,
220,
220,
220,
220,
220,
220,
220,
705,
19312,
3256,
1037,
11639,
19312,
4382,
9695,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
6764,
11639,
18378,
262,
9695,
286,
257,
4382,
4683,
287,
262,
8398,
6831,
2637,
8,
198,
220,
220,
220,
4808,
2860,
62,
1930,
1859,
62,
22046,
62,
48610,
7,
7266,
48610,
8,
198,
220,
220,
220,
22718,
28198,
13,
2617,
62,
12286,
82,
7,
20786,
28,
44506,
62,
19312,
62,
15388,
8,
628,
198,
4299,
751,
62,
11250,
62,
15388,
62,
12860,
62,
48610,
7,
198,
220,
220,
220,
220,
220,
220,
220,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
25,
1822,
29572,
13557,
7004,
47,
945,
364,
12502,
8,
4613,
6045,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
10133,
262,
705,
11250,
495,
62,
15388,
6,
3141,
22718,
28198,
351,
3689,
329,
705,
11250,
495,
62,
15388,
905,
6,
628,
220,
220,
220,
1058,
17143,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
25,
1822,
29572,
2134,
973,
284,
751,
257,
30751,
329,
326,
850,
21812,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
22718,
28198,
796,
850,
62,
79,
945,
364,
62,
11250,
495,
62,
15388,
13,
2860,
62,
48610,
7,
198,
220,
220,
220,
220,
220,
220,
220,
705,
12860,
3256,
1037,
11639,
12860,
9597,
6831,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
6764,
11639,
15307,
477,
262,
9597,
5447,
287,
262,
6831,
351,
511,
8398,
2637,
8,
198,
220,
220,
220,
22718,
28198,
13,
2617,
62,
12286,
82,
7,
20786,
28,
44506,
62,
12860,
62,
2655,
690,
8,
628,
198,
4299,
4808,
2860,
62,
1930,
1859,
62,
22046,
62,
48610,
7,
7266,
48610,
25,
1822,
29572,
13,
28100,
1713,
46677,
8,
4613,
6045,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3060,
262,
45203,
7159,
32096,
3173,
329,
17425,
62,
15388,
850,
9503,
1746,
628,
220,
220,
220,
1058,
17143,
22718,
28198,
25,
30751,
284,
307,
41610,
351,
45203,
7159,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
22718,
28198,
13,
2860,
62,
49140,
7,
35009,
5959,
62,
1503,
16630,
10067,
11,
1037,
11639,
3672,
286,
262,
4382,
11537,
198,
220,
220,
220,
1448,
62,
2118,
78,
796,
22718,
28198,
13,
2860,
62,
49140,
62,
8094,
10786,
2118,
78,
2139,
11537,
198,
220,
220,
220,
1448,
62,
2118,
78,
13,
2860,
62,
49140,
7,
49,
6465,
46,
62,
21886,
62,
1503,
16630,
10067,
11,
1037,
11639,
21886,
286,
262,
1334,
78,
4382,
11537,
198,
220,
220,
220,
1448,
62,
2118,
78,
13,
2860,
62,
49140,
7,
49,
6465,
46,
62,
4805,
2394,
4503,
3535,
62,
1503,
16630,
10067,
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,
7747,
28,
19452,
78,
16177,
15457,
13,
15999,
62,
11235,
4668,
82,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
11639,
19703,
4668,
286,
262,
1334,
78,
4382,
11537,
198,
220,
220,
220,
1448,
62,
18439,
796,
22718,
28198,
13,
2860,
62,
49140,
62,
8094,
10786,
41299,
3299,
2139,
11537,
198,
220,
220,
220,
1448,
62,
18439,
13,
2860,
62,
49140,
7,
32,
24318,
62,
21886,
62,
1503,
16630,
10067,
11,
299,
22046,
11639,
30,
3256,
1037,
11639,
21886,
286,
262,
18239,
4382,
11537,
198,
220,
220,
220,
1448,
62,
18439,
13,
2860,
62,
49140,
7,
32,
24318,
62,
4805,
2394,
4503,
3535,
62,
1503,
16630,
10067,
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,
7747,
28,
47649,
3299,
16177,
15457,
13,
15999,
62,
11235,
4668,
82,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
11639,
19703,
4668,
286,
262,
18239,
4382,
11537,
198
] | 2.889392 | 2,649 |
import torch
from os.path import join, isdir, isfile
from os import listdir
import re
from src.wlstm.models import ReBiL
| [
11748,
28034,
198,
6738,
28686,
13,
6978,
1330,
4654,
11,
318,
15908,
11,
318,
7753,
198,
6738,
28686,
1330,
1351,
15908,
198,
11748,
302,
198,
198,
6738,
12351,
13,
40989,
301,
76,
13,
27530,
1330,
797,
23286,
43,
198
] | 3.128205 | 39 |
#!/usr/bin/env python3
import RPi.GPIO as GPIO # Import Raspberry Pi GPIO library
import os, time
os.system('mpg123 -g100 /home/pi/paw_patrol_courte.mp3 &')
GPIO.setwarnings(False) # Ignore warning for now
GPIO.setmode(GPIO.BOARD) # Use physical pin numbering
GPIO.setup(10, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) # Set pin 10 to be an input pin and set initial value to be pulled low (off)
GPIO.add_event_detect(10,GPIO.RISING,callback=button_callback,bouncetime=4000) # Setup event on pin 10 rising edge
GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) # Set pin 10 to be an input pin and set initial value to be pulled low (off)
GPIO.add_event_detect(13,GPIO.RISING,callback=button_callback2,bouncetime=4000) # Setup event on pin 10 rising edge
while True:
time.sleep(100000)
GPIO.cleanup() # Clean up
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
1303,
17267,
24244,
13993,
50143,
5888,
198,
11748,
28686,
11,
640,
628,
198,
418,
13,
10057,
10786,
3149,
70,
10163,
220,
532,
70,
3064,
1220,
11195,
14,
14415,
14,
79,
707,
62,
8071,
3225,
62,
43220,
660,
13,
3149,
18,
1222,
11537,
198,
16960,
9399,
13,
2617,
40539,
654,
7,
25101,
8,
1303,
41032,
6509,
329,
783,
198,
16960,
9399,
13,
2617,
14171,
7,
16960,
9399,
13,
8202,
9795,
8,
1303,
5765,
3518,
6757,
47622,
198,
16960,
9399,
13,
40406,
7,
940,
11,
50143,
13,
1268,
11,
2834,
62,
929,
62,
2902,
28,
16960,
9399,
13,
5105,
35,
62,
41925,
8,
1303,
5345,
6757,
838,
284,
307,
281,
5128,
6757,
290,
900,
4238,
1988,
284,
307,
5954,
1877,
357,
2364,
8,
198,
16960,
9399,
13,
2860,
62,
15596,
62,
15255,
478,
7,
940,
11,
16960,
9399,
13,
49,
1797,
2751,
11,
47423,
28,
16539,
62,
47423,
11,
65,
977,
66,
8079,
28,
27559,
8,
1303,
31122,
1785,
319,
6757,
838,
7396,
5743,
628,
198,
16960,
9399,
13,
40406,
7,
1485,
11,
50143,
13,
1268,
11,
2834,
62,
929,
62,
2902,
28,
16960,
9399,
13,
5105,
35,
62,
41925,
8,
1303,
5345,
6757,
838,
284,
307,
281,
5128,
6757,
290,
900,
4238,
1988,
284,
307,
5954,
1877,
357,
2364,
8,
198,
16960,
9399,
13,
2860,
62,
15596,
62,
15255,
478,
7,
1485,
11,
16960,
9399,
13,
49,
1797,
2751,
11,
47423,
28,
16539,
62,
47423,
17,
11,
65,
977,
66,
8079,
28,
27559,
8,
1303,
31122,
1785,
319,
6757,
838,
7396,
5743,
198,
4514,
6407,
25,
198,
220,
220,
220,
640,
13,
42832,
7,
3064,
830,
8,
198,
16960,
9399,
13,
27773,
929,
3419,
1303,
5985,
510,
198
] | 2.762712 | 295 |
import time
import sys
if __name__ == '__main__':
'''
@log_called_times_decorator
def ff():
print 'f'
while True:
ff()
time.sleep(1)
'''
print_progress(45)
print ''
print_progress(x=20,max=200) | [
11748,
640,
198,
11748,
25064,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
2488,
6404,
62,
7174,
62,
22355,
62,
12501,
273,
1352,
198,
220,
220,
220,
825,
31246,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
69,
6,
198,
220,
220,
220,
220,
198,
220,
220,
220,
981,
6407,
25,
198,
220,
220,
220,
220,
220,
220,
220,
31246,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
640,
13,
42832,
7,
16,
8,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
198,
220,
220,
220,
3601,
62,
33723,
7,
2231,
8,
198,
220,
220,
220,
3601,
10148,
198,
220,
220,
220,
3601,
62,
33723,
7,
87,
28,
1238,
11,
9806,
28,
2167,
8
] | 1.925926 | 135 |
from typing import List
from os import getcwd
from os.path import basename
from pkg_resources import resource_filename
from logging import Logger
from logging import getLogger
from pygame import event as Event
from pygame import Surface
from pygame.font import Font
from albow.References import AttrRef
from albow.References import ItemRef
from albow.themes.Theme import Theme
from albow.core.ui.Widget import Widget
from albow.core.ui.Screen import Screen
from albow.dialog.FileDialogUtilities import request_old_filename
from albow.dialog.TitledDialog import TitledDialog
from albow.core.ui.Shell import Shell
from albow.core.ui.AlbowEventLoop import AlbowEventLoop
from albow.menu.Menu import Menu
from albow.menu.MenuBar import MenuBar
from albow.menu.MenuItem import MenuItem
from albow.layout.Column import Column
from albow.layout.Row import Row
from albow.layout.Frame import Frame
from albow.widgets.Label import Label
from albow.widgets.ValueDisplay import ValueDisplay
from org.hasii.chip8.Version import Version
from org.hasii.chip8.Chip8 import Chip8
from org.hasii.chip8.keyboard.Chip8KeyPadKeys import Chip8KeyPadKeys
from org.hasii.chip8.Chip8RegisterName import Chip8RegisterName
from org.hasii.chip8.ui.Chip8Screen import Chip8Screen
from org.hasii.chip8.errors.InvalidIndexRegisterValue import InvalidIndexRegisterValue
from org.hasii.chip8.errors.UnknownInstructionError import UnknownInstructionError
from org.hasii.chip8.errors.UnKnownSpecialRegistersSubOpCode import UnKnownSpecialRegistersSubOpCode
from org.hasii.chip8.ui.Chip8UIStack import Chip8UIStack
from org.hasii.chip8.ui.Chip8UIInstructionList import Chip8UIInstructionList
from org.hasii.chip8.ui.Chip8Beep import Chip8Beep
| [
198,
6738,
19720,
1330,
7343,
198,
198,
6738,
28686,
1330,
651,
66,
16993,
198,
6738,
28686,
13,
6978,
1330,
1615,
12453,
198,
198,
6738,
279,
10025,
62,
37540,
1330,
8271,
62,
34345,
198,
198,
6738,
18931,
1330,
5972,
1362,
198,
6738,
18931,
1330,
651,
11187,
1362,
198,
198,
6738,
12972,
6057,
1330,
1785,
355,
8558,
198,
6738,
12972,
6057,
1330,
20321,
198,
6738,
12972,
6057,
13,
10331,
1330,
24060,
198,
198,
6738,
435,
8176,
13,
19927,
1330,
3460,
81,
8134,
198,
6738,
435,
8176,
13,
19927,
1330,
9097,
8134,
198,
198,
6738,
435,
8176,
13,
1169,
6880,
13,
47863,
1330,
26729,
198,
198,
6738,
435,
8176,
13,
7295,
13,
9019,
13,
38300,
1330,
370,
17484,
198,
6738,
435,
8176,
13,
7295,
13,
9019,
13,
23901,
1330,
15216,
198,
198,
6738,
435,
8176,
13,
38969,
519,
13,
8979,
44204,
18274,
2410,
1330,
2581,
62,
727,
62,
34345,
198,
6738,
435,
8176,
13,
38969,
519,
13,
51,
7803,
44204,
1330,
7659,
992,
44204,
198,
198,
6738,
435,
8176,
13,
7295,
13,
9019,
13,
23248,
1330,
17537,
198,
6738,
435,
8176,
13,
7295,
13,
9019,
13,
2348,
8176,
9237,
39516,
1330,
978,
8176,
9237,
39516,
198,
198,
6738,
435,
8176,
13,
26272,
13,
23381,
1330,
21860,
198,
6738,
435,
8176,
13,
26272,
13,
23381,
10374,
1330,
21860,
10374,
198,
6738,
435,
8176,
13,
26272,
13,
23381,
7449,
1330,
21860,
7449,
198,
198,
6738,
435,
8176,
13,
39786,
13,
39470,
1330,
29201,
198,
6738,
435,
8176,
13,
39786,
13,
25166,
1330,
11314,
198,
198,
6738,
435,
8176,
13,
39786,
13,
19778,
1330,
25184,
198,
198,
6738,
435,
8176,
13,
28029,
11407,
13,
33986,
1330,
36052,
198,
6738,
435,
8176,
13,
28029,
11407,
13,
11395,
23114,
1330,
11052,
23114,
198,
198,
6738,
8745,
13,
10134,
4178,
13,
35902,
23,
13,
14815,
1330,
10628,
198,
198,
6738,
8745,
13,
10134,
4178,
13,
35902,
23,
13,
49985,
23,
1330,
17869,
23,
198,
6738,
8745,
13,
10134,
4178,
13,
35902,
23,
13,
2539,
3526,
13,
49985,
23,
9218,
26114,
40729,
1330,
17869,
23,
9218,
26114,
40729,
198,
6738,
8745,
13,
10134,
4178,
13,
35902,
23,
13,
49985,
23,
38804,
5376,
1330,
17869,
23,
38804,
5376,
198,
6738,
8745,
13,
10134,
4178,
13,
35902,
23,
13,
9019,
13,
49985,
23,
23901,
1330,
17869,
23,
23901,
198,
198,
6738,
8745,
13,
10134,
4178,
13,
35902,
23,
13,
48277,
13,
44651,
15732,
38804,
11395,
1330,
17665,
15732,
38804,
11395,
198,
6738,
8745,
13,
10134,
4178,
13,
35902,
23,
13,
48277,
13,
20035,
6310,
2762,
12331,
1330,
16185,
6310,
2762,
12331,
198,
6738,
8745,
13,
10134,
4178,
13,
35902,
23,
13,
48277,
13,
3118,
29870,
13409,
8081,
6223,
7004,
18257,
10669,
1330,
791,
29870,
13409,
8081,
6223,
7004,
18257,
10669,
198,
198,
6738,
8745,
13,
10134,
4178,
13,
35902,
23,
13,
9019,
13,
49985,
23,
10080,
25896,
1330,
17869,
23,
10080,
25896,
198,
6738,
8745,
13,
10134,
4178,
13,
35902,
23,
13,
9019,
13,
49985,
23,
10080,
6310,
2762,
8053,
1330,
17869,
23,
10080,
6310,
2762,
8053,
198,
6738,
8745,
13,
10134,
4178,
13,
35902,
23,
13,
9019,
13,
49985,
23,
3856,
538,
1330,
17869,
23,
3856,
538,
628
] | 3.340426 | 517 |
from pyretina.mc import monte_carlo
import numpy as np
import json
import os
import os.path as osp
import shutil
number_of_events = 10
if __name__ == "__main__":
main("config/mc.json") | [
6738,
12972,
1186,
1437,
13,
23209,
1330,
937,
660,
62,
7718,
5439,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
33918,
198,
198,
11748,
28686,
198,
11748,
28686,
13,
6978,
355,
267,
2777,
198,
11748,
4423,
346,
198,
198,
17618,
62,
1659,
62,
31534,
796,
838,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
1388,
7203,
11250,
14,
23209,
13,
17752,
4943
] | 2.753623 | 69 |
import logging
import os
import time
from math import inf
from os import environ
from threading import Thread
import requests
from redis import Redis
from block import Block
from blockchain import Blockchain
from peer2peer import PeerToPeerMessage
from transaction import Transaction
logging.basicConfig(level=logging.DEBUG)
if __name__ == "__main__":
miner = Miner()
miner.routine()
| [
11748,
18931,
198,
11748,
28686,
198,
11748,
640,
198,
6738,
10688,
1330,
1167,
198,
6738,
28686,
1330,
551,
2268,
198,
6738,
4704,
278,
1330,
14122,
198,
198,
11748,
7007,
198,
6738,
2266,
271,
1330,
2297,
271,
198,
198,
6738,
2512,
1330,
9726,
198,
6738,
11779,
1330,
29724,
198,
6738,
12720,
17,
33350,
1330,
41139,
2514,
6435,
263,
12837,
198,
6738,
8611,
1330,
45389,
198,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
30531,
8,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
16285,
796,
29295,
3419,
198,
220,
220,
220,
16285,
13,
81,
28399,
3419,
198
] | 3.651376 | 109 |
from ._timeit import timeit
from ._progressbar import pbar_sql_query
from ._retry import retry
| [
6738,
47540,
2435,
270,
1330,
640,
270,
198,
6738,
47540,
33723,
5657,
1330,
279,
5657,
62,
25410,
62,
22766,
198,
6738,
47540,
1186,
563,
1330,
1005,
563,
198
] | 3.392857 | 28 |
# -*- coding: utf-8 -*-
DEBUG = True
db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
response.generic_patterns = ['*'] if request.is_local else []
from gluon.tools import Auth, Service, prettydate
auth = Auth(db)
auth.define_tables(username=False, signature=False)
service = Service()
## configure email
mail = auth.settings.mailer
mail.settings.server = 'logging' or 'smtp.gmail.com:587'
mail.settings.sender = '[email protected]'
mail.settings.login = 'username:password'
## configure auth policy
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False
auth.settings.reset_password_requires_verification = True
## if you need to use OpenID, Facebook, MySpace, Twitter, Linkedin, etc.
## register with janrain.com, write your domain:api_key in private/janrain.key
from gluon.contrib.login_methods.rpx_account import use_janrain
use_janrain(auth, filename='private/janrain.key')
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
30531,
796,
6407,
198,
198,
9945,
796,
360,
1847,
10786,
25410,
578,
1378,
35350,
13,
25410,
578,
3256,
7742,
62,
7857,
28,
16,
11,
9122,
62,
411,
8520,
28,
17816,
439,
6,
12962,
198,
198,
26209,
13,
41357,
62,
33279,
82,
796,
37250,
9,
20520,
611,
2581,
13,
271,
62,
12001,
2073,
17635,
198,
6738,
1278,
84,
261,
13,
31391,
1330,
26828,
11,
4809,
11,
2495,
4475,
198,
18439,
796,
26828,
7,
9945,
8,
198,
18439,
13,
13086,
62,
83,
2977,
7,
29460,
28,
25101,
11,
9877,
28,
25101,
8,
198,
15271,
796,
4809,
3419,
198,
198,
2235,
17425,
3053,
198,
4529,
796,
6284,
13,
33692,
13,
4529,
263,
198,
4529,
13,
33692,
13,
15388,
796,
705,
6404,
2667,
6,
393,
705,
5796,
34788,
13,
14816,
13,
785,
25,
44617,
6,
198,
4529,
13,
33692,
13,
82,
2194,
796,
705,
5832,
31,
14816,
13,
785,
6,
198,
4529,
13,
33692,
13,
38235,
796,
705,
29460,
25,
28712,
6,
198,
198,
2235,
17425,
6284,
2450,
198,
18439,
13,
33692,
13,
2301,
33397,
62,
47911,
62,
332,
2649,
796,
10352,
198,
18439,
13,
33692,
13,
2301,
33397,
62,
47911,
62,
21064,
2100,
796,
10352,
198,
18439,
13,
33692,
13,
42503,
62,
28712,
62,
47911,
62,
332,
2649,
796,
6407,
198,
198,
2235,
611,
345,
761,
284,
779,
4946,
2389,
11,
3203,
11,
2011,
14106,
11,
3009,
11,
7502,
27152,
11,
3503,
13,
198,
2235,
7881,
351,
42897,
3201,
13,
785,
11,
3551,
534,
7386,
25,
15042,
62,
2539,
287,
2839,
14,
13881,
3201,
13,
2539,
198,
6738,
1278,
84,
261,
13,
3642,
822,
13,
38235,
62,
24396,
82,
13,
81,
8416,
62,
23317,
1330,
779,
62,
13881,
3201,
198,
1904,
62,
13881,
3201,
7,
18439,
11,
29472,
11639,
19734,
14,
13881,
3201,
13,
2539,
11537,
628
] | 3.10356 | 309 |
from .report_api import ReportAPI
| [
6738,
764,
13116,
62,
15042,
1330,
6358,
17614,
198
] | 3.777778 | 9 |
import pandas as pd
import numpy as np
from sklearn.preprocessing import normalize
from .sparse_matrix_builder import build_from_conceptnet_table
from .formats import load_hdf, save_hdf
def retrofit(row_labels, dense_frame, sparse_csr,
iterations=5, verbosity=0, max_cleanup_iters=20,
orig_vec_weight=0.15):
"""
Retrofitting is a process of combining information from a machine-learned
space of term vectors with further structured information about those
terms. It was originally presented in this 2015 NAACL paper by Manaal
Faruqui, Jesse Dodge, Sujay Jauhar, Chris Dyer, Eduard Hovy, and Noah
Smith, "Retrofitting Word Vectors to Semantic Lexicons":
https://www.cs.cmu.edu/~hovy/papers/15HLT-retrofitting-word-vectors.pdf
This function implements a variant that I've been calling "wide
retrofitting", which extends the process to learn vectors for terms that
were outside the original space.
`row_labels` is the list of terms that we want to have vectors for.
`dense_frame` is a DataFrame assigning vectors to some of these terms.
`sparse_csr` is a SciPy sparse square matrix, whose rows and columns are
implicitly labeled with `row_labels`. The entries of this matrix are
positive for terms that we know are related from our structured data.
(This is an awkward form of input, but unfortunately there is no good
way to represent sparse labeled data in Pandas.)
`sharded_retrofit` is responsible for building `row_labels` and `sparse_csr`
appropriately.
"""
# Initialize a DataFrame with rows that we know
retroframe = pd.DataFrame(
index=row_labels, columns=dense_frame.columns, dtype='f'
)
retroframe.update(dense_frame)
# orig_weights = 1 for known vectors, 0 for unknown vectors
orig_weights = 1 - retroframe.iloc[:, 0].isnull()
orig_vec_indicators = (orig_weights.values != 0)
orig_vecs = retroframe.fillna(0).values
# Subtract the mean so that vectors don't just clump around common
# hypernyms
orig_vecs[orig_vec_indicators] -= orig_vecs[orig_vec_indicators].mean(0)
# Delete the frame we built, we won't need its indices again until the end
del retroframe
vecs = orig_vecs
for iteration in range(iterations):
if verbosity >= 1:
print('Retrofitting: Iteration %s of %s' % (iteration+1, iterations))
# Since the sparse weight matrix is row-stochastic and has self-loops,
# pre-multiplication by it replaces each vector by a weighted average
# of itself and its neighbors. We really want to take the average
# of (itself and) the nonzero neighbors, which we can do by dividing
# the average with all the neighbors by the total of the weights of the
# nonzero neighbors. This avoids unduly shrinking vectors assigned to
# terms with lots of zero neighbors.
# Find, for every term, the total weight of its nonzero neighbors.
nonzero_indicators = (np.abs(vecs).sum(1) != 0)
total_neighbor_weights = sparse_csr.dot(nonzero_indicators)
# Now average with all the neighbors.
vecs = sparse_csr.dot(vecs)
# Now divide each vector (row) by the associated total weight.
# Some of the total weights could be zero, but only for rows that,
# before averaging, were zero and had all neighbors zero, whence
# after averaging will be zero. So only do the division for rows
# that are nonzero now, after averaging. Also, we reshape the total
# weights into a column vector so that numpy will broadcast the
# division by weights across the columns of the embedding matrix.
nonzero_indicators = (np.abs(vecs).sum(1) != 0)
total_neighbor_weights = total_neighbor_weights[nonzero_indicators]
total_neighbor_weights = total_neighbor_weights.reshape((len(total_neighbor_weights), 1))
vecs[nonzero_indicators] /= total_neighbor_weights
# Re-center the (new) non-zero vectors.
vecs[nonzero_indicators] -= vecs[nonzero_indicators].mean(0)
# Average known rows with original vectors
vecs[orig_vec_indicators, :] = \
(1.0 - orig_vec_weight) * vecs[orig_vec_indicators, :] + orig_vec_weight * orig_vecs[orig_vec_indicators, :]
# Clean up as many all-zero vectors as possible. Zero vectors
# can either come from components of the conceptnet graph that
# don't contain any terms from the embedding we are currently
# retrofitting (and there is nothing we can do about those here,
# but when retrofitting is done on that embedding they should be
# taken care of then) or from terms whose distance in the graph is
# larger than the number of retrofitting iterations used above; we
# propagate non-zero values to those terms by averaging over their
# non-zero neighbors. Note that this propagation can never reach
# the first class of terms, so we can't necessarily expect the
# number of zero vectors to go to zero at any one invocation of
# this code.
n_zero_indicators_old = -1
for iteration in range(max_cleanup_iters):
zero_indicators = (np.abs(vecs).sum(1) == 0)
n_zero_indicators = np.sum(zero_indicators)
if n_zero_indicators == 0 or n_zero_indicators == n_zero_indicators_old:
break
n_zero_indicators_old = n_zero_indicators
# First replace each zero vector (row) by the weighted average of all its
# neighbors.
vecs[zero_indicators, :] = sparse_csr[zero_indicators, :].dot(vecs)
# Now divide each newly nonzero vector (row) by the total weight of its
# old nonzero neighbors.
new_nonzero_indicators = np.logical_and(zero_indicators, np.abs(vecs).sum(1) != 0)
total_neighbor_weights = sparse_csr[new_nonzero_indicators, :].dot(np.logical_not(zero_indicators))
total_neighbor_weights = total_neighbor_weights.reshape((len(total_neighbor_weights), 1))
vecs[new_nonzero_indicators, :] /= total_neighbor_weights
else:
print('Warning: cleanup iteration limit exceeded.')
retroframe = pd.DataFrame(data=vecs, index=row_labels, columns=dense_frame.columns)
return retroframe
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
13,
3866,
36948,
1330,
3487,
1096,
198,
6738,
764,
82,
29572,
62,
6759,
8609,
62,
38272,
1330,
1382,
62,
6738,
62,
43169,
3262,
62,
11487,
198,
6738,
764,
687,
1381,
1330,
3440,
62,
71,
7568,
11,
3613,
62,
71,
7568,
628,
628,
198,
4299,
12175,
11147,
7,
808,
62,
23912,
1424,
11,
15715,
62,
14535,
11,
29877,
62,
6359,
81,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
34820,
28,
20,
11,
15942,
16579,
28,
15,
11,
3509,
62,
27773,
929,
62,
270,
364,
28,
1238,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1796,
62,
35138,
62,
6551,
28,
15,
13,
1314,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
29884,
32232,
318,
257,
1429,
286,
19771,
1321,
422,
257,
4572,
12,
35720,
276,
198,
220,
220,
220,
2272,
286,
3381,
30104,
351,
2252,
20793,
1321,
546,
883,
198,
220,
220,
220,
2846,
13,
632,
373,
6198,
5545,
287,
428,
1853,
11746,
2246,
43,
3348,
416,
17493,
282,
198,
220,
220,
220,
6755,
84,
421,
72,
11,
18033,
26048,
11,
1778,
33708,
449,
559,
9869,
11,
5180,
360,
9860,
11,
40766,
446,
367,
27796,
11,
290,
18394,
198,
220,
220,
220,
4176,
11,
366,
9781,
305,
32232,
9678,
569,
478,
669,
284,
12449,
5109,
17210,
34280,
1298,
628,
220,
220,
220,
220,
220,
220,
220,
3740,
1378,
2503,
13,
6359,
13,
11215,
84,
13,
15532,
14,
93,
71,
27796,
14,
40491,
14,
1314,
6581,
51,
12,
1186,
305,
32232,
12,
4775,
12,
303,
5217,
13,
12315,
628,
220,
220,
220,
770,
2163,
23986,
257,
15304,
326,
314,
1053,
587,
4585,
366,
4421,
198,
220,
220,
220,
12175,
32232,
1600,
543,
14582,
262,
1429,
284,
2193,
30104,
329,
2846,
326,
198,
220,
220,
220,
547,
2354,
262,
2656,
2272,
13,
628,
220,
220,
220,
4600,
808,
62,
23912,
1424,
63,
318,
262,
1351,
286,
2846,
326,
356,
765,
284,
423,
30104,
329,
13,
628,
220,
220,
220,
4600,
67,
1072,
62,
14535,
63,
318,
257,
6060,
19778,
38875,
30104,
284,
617,
286,
777,
2846,
13,
628,
220,
220,
220,
4600,
82,
29572,
62,
6359,
81,
63,
318,
257,
10286,
20519,
29877,
6616,
17593,
11,
3025,
15274,
290,
15180,
389,
198,
220,
220,
220,
31821,
15494,
351,
4600,
808,
62,
23912,
1424,
44646,
383,
12784,
286,
428,
17593,
389,
198,
220,
220,
220,
3967,
329,
2846,
326,
356,
760,
389,
3519,
422,
674,
20793,
1366,
13,
198,
220,
220,
220,
357,
1212,
318,
281,
13006,
1296,
286,
5128,
11,
475,
12716,
612,
318,
645,
922,
198,
220,
220,
220,
835,
284,
2380,
29877,
15494,
1366,
287,
16492,
292,
2014,
628,
220,
220,
220,
4600,
1477,
10676,
62,
1186,
305,
11147,
63,
318,
4497,
329,
2615,
4600,
808,
62,
23912,
1424,
63,
290,
4600,
82,
29572,
62,
6359,
81,
63,
198,
220,
220,
220,
20431,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
20768,
1096,
257,
6060,
19778,
351,
15274,
326,
356,
760,
198,
220,
220,
220,
12175,
14535,
796,
279,
67,
13,
6601,
19778,
7,
198,
220,
220,
220,
220,
220,
220,
220,
6376,
28,
808,
62,
23912,
1424,
11,
15180,
28,
67,
1072,
62,
14535,
13,
28665,
82,
11,
288,
4906,
11639,
69,
6,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
12175,
14535,
13,
19119,
7,
67,
1072,
62,
14535,
8,
628,
220,
220,
220,
1303,
1796,
62,
43775,
796,
352,
329,
1900,
30104,
11,
657,
329,
6439,
30104,
198,
220,
220,
220,
1796,
62,
43775,
796,
352,
532,
12175,
14535,
13,
346,
420,
58,
45299,
657,
4083,
271,
8423,
3419,
198,
220,
220,
220,
1796,
62,
35138,
62,
521,
44549,
796,
357,
11612,
62,
43775,
13,
27160,
14512,
657,
8,
198,
220,
220,
220,
1796,
62,
303,
6359,
796,
12175,
14535,
13,
20797,
2616,
7,
15,
737,
27160,
628,
220,
220,
220,
1303,
3834,
83,
974,
262,
1612,
523,
326,
30104,
836,
470,
655,
537,
931,
1088,
2219,
198,
220,
220,
220,
1303,
8718,
3281,
907,
198,
220,
220,
220,
1796,
62,
303,
6359,
58,
11612,
62,
35138,
62,
521,
44549,
60,
48185,
1796,
62,
303,
6359,
58,
11612,
62,
35138,
62,
521,
44549,
4083,
32604,
7,
15,
8,
628,
220,
220,
220,
1303,
23520,
262,
5739,
356,
3170,
11,
356,
1839,
470,
761,
663,
36525,
757,
1566,
262,
886,
198,
220,
220,
220,
1619,
12175,
14535,
628,
220,
220,
220,
1569,
6359,
796,
1796,
62,
303,
6359,
198,
220,
220,
220,
329,
24415,
287,
2837,
7,
2676,
602,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
611,
15942,
16579,
18189,
352,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
9781,
305,
32232,
25,
40806,
341,
4064,
82,
286,
4064,
82,
6,
4064,
357,
2676,
341,
10,
16,
11,
34820,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
4619,
262,
29877,
3463,
17593,
318,
5752,
12,
301,
5374,
3477,
290,
468,
2116,
12,
5439,
2840,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
662,
12,
47945,
3299,
416,
340,
24020,
1123,
15879,
416,
257,
26356,
2811,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
286,
2346,
290,
663,
12020,
13,
220,
775,
1107,
765,
284,
1011,
262,
2811,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
286,
357,
270,
944,
290,
8,
262,
1729,
22570,
12020,
11,
543,
356,
460,
466,
416,
27241,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
262,
2811,
351,
477,
262,
12020,
416,
262,
2472,
286,
262,
19590,
286,
262,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1729,
22570,
12020,
13,
220,
770,
30940,
3318,
2062,
27382,
30104,
8686,
284,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2846,
351,
6041,
286,
6632,
12020,
13,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
9938,
11,
329,
790,
3381,
11,
262,
2472,
3463,
286,
663,
1729,
22570,
12020,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1729,
22570,
62,
521,
44549,
796,
357,
37659,
13,
8937,
7,
303,
6359,
737,
16345,
7,
16,
8,
14512,
657,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
710,
394,
2865,
62,
43775,
796,
29877,
62,
6359,
81,
13,
26518,
7,
13159,
22570,
62,
521,
44549,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
2735,
2811,
351,
477,
262,
12020,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1569,
6359,
796,
29877,
62,
6359,
81,
13,
26518,
7,
303,
6359,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
2735,
14083,
1123,
15879,
357,
808,
8,
416,
262,
3917,
2472,
3463,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2773,
286,
262,
2472,
19590,
714,
307,
6632,
11,
475,
691,
329,
15274,
326,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
878,
20430,
11,
547,
6632,
290,
550,
477,
12020,
6632,
11,
44012,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
706,
20430,
481,
307,
6632,
13,
220,
1406,
691,
466,
262,
7297,
329,
15274,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
326,
389,
1729,
22570,
783,
11,
706,
20430,
13,
220,
4418,
11,
356,
27179,
1758,
262,
2472,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
19590,
656,
257,
5721,
15879,
523,
326,
299,
32152,
481,
7025,
262,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
7297,
416,
19590,
1973,
262,
15180,
286,
262,
11525,
12083,
17593,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1729,
22570,
62,
521,
44549,
796,
357,
37659,
13,
8937,
7,
303,
6359,
737,
16345,
7,
16,
8,
14512,
657,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
710,
394,
2865,
62,
43775,
796,
2472,
62,
710,
394,
2865,
62,
43775,
58,
13159,
22570,
62,
521,
44549,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
710,
394,
2865,
62,
43775,
796,
2472,
62,
710,
394,
2865,
62,
43775,
13,
3447,
1758,
19510,
11925,
7,
23350,
62,
710,
394,
2865,
62,
43775,
828,
352,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1569,
6359,
58,
13159,
22570,
62,
521,
44549,
60,
1220,
28,
2472,
62,
710,
394,
2865,
62,
43775,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
797,
12,
16159,
262,
357,
3605,
8,
1729,
12,
22570,
30104,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1569,
6359,
58,
13159,
22570,
62,
521,
44549,
60,
48185,
1569,
6359,
58,
13159,
22570,
62,
521,
44549,
4083,
32604,
7,
15,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
13475,
1900,
15274,
351,
2656,
30104,
198,
220,
220,
220,
220,
220,
220,
220,
1569,
6359,
58,
11612,
62,
35138,
62,
521,
44549,
11,
1058,
60,
796,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
16,
13,
15,
532,
1796,
62,
35138,
62,
6551,
8,
1635,
1569,
6359,
58,
11612,
62,
35138,
62,
521,
44549,
11,
1058,
60,
1343,
1796,
62,
35138,
62,
6551,
1635,
1796,
62,
303,
6359,
58,
11612,
62,
35138,
62,
521,
44549,
11,
1058,
60,
628,
220,
220,
220,
1303,
5985,
510,
355,
867,
477,
12,
22570,
30104,
355,
1744,
13,
220,
12169,
30104,
198,
220,
220,
220,
1303,
460,
2035,
1282,
422,
6805,
286,
262,
3721,
3262,
4823,
326,
198,
220,
220,
220,
1303,
836,
470,
3994,
597,
2846,
422,
262,
11525,
12083,
356,
389,
3058,
198,
220,
220,
220,
1303,
12175,
32232,
357,
392,
612,
318,
2147,
356,
460,
466,
546,
883,
994,
11,
198,
220,
220,
220,
1303,
475,
618,
12175,
32232,
318,
1760,
319,
326,
11525,
12083,
484,
815,
307,
198,
220,
220,
220,
1303,
2077,
1337,
286,
788,
8,
393,
422,
2846,
3025,
5253,
287,
262,
4823,
318,
198,
220,
220,
220,
1303,
4025,
621,
262,
1271,
286,
12175,
32232,
34820,
973,
2029,
26,
356,
198,
220,
220,
220,
1303,
47933,
1729,
12,
22570,
3815,
284,
883,
2846,
416,
20430,
625,
511,
198,
220,
220,
220,
1303,
1729,
12,
22570,
12020,
13,
220,
5740,
326,
428,
43594,
460,
1239,
3151,
198,
220,
220,
220,
1303,
262,
717,
1398,
286,
2846,
11,
523,
356,
460,
470,
6646,
1607,
262,
198,
220,
220,
220,
1303,
1271,
286,
6632,
30104,
284,
467,
284,
6632,
379,
597,
530,
43219,
286,
198,
220,
220,
220,
1303,
428,
2438,
13,
198,
220,
220,
220,
299,
62,
22570,
62,
521,
44549,
62,
727,
796,
532,
16,
198,
220,
220,
220,
329,
24415,
287,
2837,
7,
9806,
62,
27773,
929,
62,
270,
364,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
6632,
62,
521,
44549,
796,
357,
37659,
13,
8937,
7,
303,
6359,
737,
16345,
7,
16,
8,
6624,
657,
8,
198,
220,
220,
220,
220,
220,
220,
220,
299,
62,
22570,
62,
521,
44549,
796,
45941,
13,
16345,
7,
22570,
62,
521,
44549,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
299,
62,
22570,
62,
521,
44549,
6624,
657,
393,
299,
62,
22570,
62,
521,
44549,
6624,
299,
62,
22570,
62,
521,
44549,
62,
727,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
299,
62,
22570,
62,
521,
44549,
62,
727,
796,
299,
62,
22570,
62,
521,
44549,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3274,
6330,
1123,
6632,
15879,
357,
808,
8,
416,
262,
26356,
2811,
286,
477,
663,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
12020,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1569,
6359,
58,
22570,
62,
521,
44549,
11,
1058,
60,
796,
29877,
62,
6359,
81,
58,
22570,
62,
521,
44549,
11,
1058,
4083,
26518,
7,
303,
6359,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2735,
14083,
1123,
8308,
1729,
22570,
15879,
357,
808,
8,
416,
262,
2472,
3463,
286,
663,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1468,
1729,
22570,
12020,
13,
198,
220,
220,
220,
220,
220,
220,
220,
649,
62,
13159,
22570,
62,
521,
44549,
796,
45941,
13,
6404,
605,
62,
392,
7,
22570,
62,
521,
44549,
11,
45941,
13,
8937,
7,
303,
6359,
737,
16345,
7,
16,
8,
14512,
657,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
710,
394,
2865,
62,
43775,
796,
29877,
62,
6359,
81,
58,
3605,
62,
13159,
22570,
62,
521,
44549,
11,
1058,
4083,
26518,
7,
37659,
13,
6404,
605,
62,
1662,
7,
22570,
62,
521,
44549,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
710,
394,
2865,
62,
43775,
796,
2472,
62,
710,
394,
2865,
62,
43775,
13,
3447,
1758,
19510,
11925,
7,
23350,
62,
710,
394,
2865,
62,
43775,
828,
352,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1569,
6359,
58,
3605,
62,
13159,
22570,
62,
521,
44549,
11,
1058,
60,
1220,
28,
2472,
62,
710,
394,
2865,
62,
43775,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
20361,
25,
27425,
24415,
4179,
20672,
2637,
8,
628,
220,
220,
220,
12175,
14535,
796,
279,
67,
13,
6601,
19778,
7,
7890,
28,
303,
6359,
11,
6376,
28,
808,
62,
23912,
1424,
11,
15180,
28,
67,
1072,
62,
14535,
13,
28665,
82,
8,
198,
220,
220,
220,
1441,
12175,
14535,
198
] | 2.847197 | 2,212 |
# Code from https://medium.com/datadriveninvestor/use-python-to-value-a-stock-automatically-3b520422ab6 by Bohmian
# Importing required modules
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import numpy as np
import time
from config import financial_model_prep
pd.set_option('display.max_columns', None)
# Settings to produce nice plots in a Jupyter notebook
plt.style.use('fivethirtyeight')
plt.rcParams['figure.figsize'] = [15, 10]
import seaborn as sns
# To extract and parse fundamental data from finviz website
import requests
from bs4 import BeautifulSoup as bs
import warnings
warnings.filterwarnings('ignore')
# For parsing financial statements data from financialmodelingprep api
from urllib.request import urlopen
import json
# inputs
base_url = "https://financialmodelingprep.com/api/v3/"
tickers = ['AAL']
apiKey = financial_model_prep()
cash_flows = []
total_debts = []
cash_and_ST_investments_list = []
betas = []
discount_rates = []
EPS_growth_5Ys = []
EPS_growth_6Y_to_10Ys = []
EPS_growth_11Y_to_20Ys = []
shares_outstandings = []
intrinsic_values = []
current_prices = []
margins_safety = []
valid_tickers = []
for ticker in tickers:
try:
q_cash_flow_statement = pd.DataFrame(get_jsonparsed_data(base_url+'cash-flow-statement/' + ticker + '?period=quarter' + '&apikey=' + apiKey))
q_cash_flow_statement = q_cash_flow_statement.set_index('date').iloc[:4] # extract for last 4 quarters
q_cash_flow_statement = q_cash_flow_statement.apply(pd.to_numeric, errors='coerce')
cash_flow_statement = pd.DataFrame(get_jsonparsed_data(base_url+'cash-flow-statement/' + ticker + '?apikey=' + apiKey))
cash_flow_statement = cash_flow_statement.set_index('date')
cash_flow_statement = cash_flow_statement.apply(pd.to_numeric, errors='coerce')
ttm_cash_flow_statement = q_cash_flow_statement.sum() # sum up last 4 quarters to get TTM cash flow
cash_flow_statement = cash_flow_statement[::-1].append(ttm_cash_flow_statement.rename('TTM')).drop(['netIncome'], axis=1)
final_cash_flow_statement = cash_flow_statement[::-1] # reverse list to show most recent ones first
# final_cash_flow_statement[['freeCashFlow']].iloc[::-1].iloc[-15:].plot(kind='bar', title=ticker + ' Cash Flows')
# plt.show()
q_balance_statement = pd.DataFrame(get_jsonparsed_data(base_url+'balance-sheet-statement/' + ticker + '?period=quarter' + '&apikey=' + apiKey))
q_balance_statement = q_balance_statement.set_index('date')
q_balance_statement = q_balance_statement.apply(pd.to_numeric, errors='coerce')
cash_flow = final_cash_flow_statement.iloc[0]['freeCashFlow']
total_debt = q_balance_statement.iloc[0]['totalDebt']
cash_and_ST_investments = q_balance_statement.iloc[0]['cashAndShortTermInvestments']
# print("Free Cash Flow: ", cash_flow)
# print("Total Debt: ", total_debt)
# print("Cash and ST Investments: ", cash_and_ST_investments)
# List of data we want to extract from Finviz Table
metric = ['Price', 'EPS next 5Y', 'Beta', 'Shs Outstand']
finviz_data = get_finviz_data(ticker)
# print('\nFinViz Data:\n' + str(finviz_data))
Beta = finviz_data['Beta']
discount_rate = 7
if(Beta<0.80):
discount_rate = 5
elif(Beta>=0.80 and Beta<1):
discount_rate = 6
elif(Beta>=1 and Beta<1.1):
discount_rate = 6.5
elif(Beta>=1.1 and Beta<1.2):
discount_rate = 7
elif(Beta>=1.2 and Beta<1.3):
discount_rate =7.5
elif(Beta>=1.3 and Beta<1.4):
discount_rate = 8
elif(Beta>=1.4 and Beta<1.6):
discount_rate = 8.5
elif(Beta>=1.61):
discount_rate = 9
# print("\nDiscount Rate: ", discount_rate)
EPS_growth_5Y = finviz_data['EPS next 5Y']
EPS_growth_6Y_to_10Y = EPS_growth_5Y/2 # Half the previous growth rate, conservative estimate
EPS_growth_11Y_to_20Y = np.minimum(EPS_growth_6Y_to_10Y, 4) # Slightly higher than long term inflation rate, conservative estimate
shares_outstanding = round(finviz_data['Shs Outstand'])
# print("Free Cash Flow: ", cash_flow)
# print("Total Debt: ", total_debt)
# print("Cash and ST Investments: ", cash_and_ST_investments)
# print("EPS Growth 5Y: ", EPS_growth_5Y)
# print("EPS Growth 6Y to 10Y: ", EPS_growth_6Y_to_10Y)
# print("EPS Growth 11Y to 20Y: ", EPS_growth_11Y_to_20Y)
# print("Discount Rate: ", discount_rate)
# print("Shares Outstanding: ", shares_outstanding)
intrinsic_value = round(calculate_intrinsic_value(cash_flow, total_debt, cash_and_ST_investments,
EPS_growth_5Y, EPS_growth_6Y_to_10Y, EPS_growth_11Y_to_20Y,
shares_outstanding, discount_rate), 2)
# print("\nIntrinsic Value: ", intrinsic_value)
current_price = finviz_data['Price']
# print("Current Price: ", current_price)
change = round(((intrinsic_value-current_price)/current_price)*100, 2)
# print("Margin of Safety: ", margin_safety)
cash_flows.append(cash_flow)
total_debts.append(total_debt)
cash_and_ST_investments_list.append(cash_and_ST_investments)
betas.append(Beta)
discount_rates.append(discount_rate)
EPS_growth_5Ys.append(EPS_growth_5Y)
EPS_growth_6Y_to_10Ys.append(EPS_growth_6Y_to_10Y)
EPS_growth_11Y_to_20Ys.append(EPS_growth_11Y_to_20Y)
shares_outstandings.append(shares_outstanding)
intrinsic_values.append(intrinsic_value)
current_prices.append(current_price)
margins_safety.append(change)
valid_tickers.append(ticker)
except:
pass
df = pd.DataFrame(np.column_stack([valid_tickers, cash_flows, total_debts, cash_and_ST_investments_list, betas, discount_rates, EPS_growth_5Ys, EPS_growth_6Y_to_10Ys, EPS_growth_11Y_to_20Ys, shares_outstandings, intrinsic_values, current_prices, margins_safety]),
columns=['Ticker', 'Cash Flow', 'Total Debt', 'Cash and ST investment', 'Beta', 'Discount Rate', 'EPS Growth 5 Y', 'EPS Growth 6-10 Y', 'EPS Growth 11-20 Y', 'Shares Outstanding', 'Intrinsic Value', 'Current Price', 'Margin Safety']).set_index('Ticker')
df = df.sort_values(['Margin Safety'], ascending=True)
df.to_csv(f'{time.time()}.csv')
print (df) | [
2,
6127,
422,
3740,
1378,
24132,
13,
785,
14,
19608,
324,
380,
574,
24859,
273,
14,
1904,
12,
29412,
12,
1462,
12,
8367,
12,
64,
12,
13578,
12,
2306,
296,
4142,
12,
18,
65,
20,
18638,
1828,
397,
21,
416,
347,
34028,
666,
198,
198,
2,
17267,
278,
2672,
13103,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
6738,
4566,
1330,
3176,
62,
19849,
62,
46012,
198,
30094,
13,
2617,
62,
18076,
10786,
13812,
13,
9806,
62,
28665,
82,
3256,
6045,
8,
198,
198,
2,
16163,
284,
4439,
3621,
21528,
287,
257,
449,
929,
88,
353,
20922,
198,
489,
83,
13,
7635,
13,
1904,
10786,
13261,
400,
5893,
26022,
11537,
198,
489,
83,
13,
6015,
10044,
4105,
17816,
26875,
13,
5647,
7857,
20520,
796,
685,
1314,
11,
838,
60,
198,
11748,
384,
397,
1211,
355,
3013,
82,
198,
198,
2,
1675,
7925,
290,
21136,
7531,
1366,
422,
957,
85,
528,
3052,
198,
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
355,
275,
82,
198,
11748,
14601,
198,
40539,
654,
13,
24455,
40539,
654,
10786,
46430,
11537,
198,
198,
2,
1114,
32096,
3176,
6299,
1366,
422,
3176,
4666,
10809,
46012,
40391,
198,
6738,
2956,
297,
571,
13,
25927,
1330,
19016,
9654,
198,
11748,
33918,
198,
198,
2,
17311,
198,
8692,
62,
6371,
796,
366,
5450,
1378,
46921,
4666,
10809,
46012,
13,
785,
14,
15042,
14,
85,
18,
30487,
198,
83,
21630,
796,
37250,
32,
1847,
20520,
198,
15042,
9218,
796,
3176,
62,
19849,
62,
46012,
3419,
198,
198,
30350,
62,
44041,
796,
17635,
198,
23350,
62,
11275,
912,
796,
17635,
198,
30350,
62,
392,
62,
2257,
62,
24859,
902,
62,
4868,
796,
17635,
198,
11181,
292,
796,
17635,
198,
15410,
608,
62,
9700,
796,
17635,
198,
36,
3705,
62,
27922,
62,
20,
56,
82,
796,
17635,
198,
36,
3705,
62,
27922,
62,
21,
56,
62,
1462,
62,
940,
56,
82,
796,
17635,
198,
36,
3705,
62,
27922,
62,
1157,
56,
62,
1462,
62,
1238,
56,
82,
796,
17635,
198,
1477,
3565,
62,
448,
1481,
654,
796,
17635,
198,
600,
81,
1040,
291,
62,
27160,
796,
17635,
198,
14421,
62,
1050,
1063,
796,
17635,
198,
30887,
1040,
62,
44708,
796,
17635,
198,
12102,
62,
83,
21630,
796,
17635,
198,
198,
1640,
4378,
263,
287,
4378,
364,
25,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
62,
30350,
62,
11125,
62,
26090,
796,
279,
67,
13,
6601,
19778,
7,
1136,
62,
17752,
79,
945,
276,
62,
7890,
7,
8692,
62,
6371,
10,
6,
30350,
12,
11125,
12,
26090,
14,
6,
1343,
4378,
263,
1343,
705,
30,
41007,
28,
24385,
6,
1343,
705,
5,
499,
522,
88,
11639,
1343,
40391,
9218,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
62,
30350,
62,
11125,
62,
26090,
796,
10662,
62,
30350,
62,
11125,
62,
26090,
13,
2617,
62,
9630,
10786,
4475,
27691,
346,
420,
58,
25,
19,
60,
1303,
7925,
329,
938,
604,
13620,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
62,
30350,
62,
11125,
62,
26090,
796,
10662,
62,
30350,
62,
11125,
62,
26090,
13,
39014,
7,
30094,
13,
1462,
62,
77,
39223,
11,
8563,
11639,
1073,
263,
344,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
5003,
62,
11125,
62,
26090,
796,
279,
67,
13,
6601,
19778,
7,
1136,
62,
17752,
79,
945,
276,
62,
7890,
7,
8692,
62,
6371,
10,
6,
30350,
12,
11125,
12,
26090,
14,
6,
1343,
4378,
263,
1343,
705,
30,
499,
522,
88,
11639,
1343,
40391,
9218,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
5003,
62,
11125,
62,
26090,
796,
5003,
62,
11125,
62,
26090,
13,
2617,
62,
9630,
10786,
4475,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
5003,
62,
11125,
62,
26090,
796,
5003,
62,
11125,
62,
26090,
13,
39014,
7,
30094,
13,
1462,
62,
77,
39223,
11,
8563,
11639,
1073,
263,
344,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
256,
17209,
62,
30350,
62,
11125,
62,
26090,
796,
10662,
62,
30350,
62,
11125,
62,
26090,
13,
16345,
3419,
1303,
2160,
510,
938,
604,
13620,
284,
651,
309,
15972,
5003,
5202,
198,
220,
220,
220,
220,
220,
220,
220,
5003,
62,
11125,
62,
26090,
796,
5003,
62,
11125,
62,
26090,
58,
3712,
12,
16,
4083,
33295,
7,
926,
76,
62,
30350,
62,
11125,
62,
26090,
13,
918,
480,
10786,
15751,
44,
11537,
737,
14781,
7,
17816,
3262,
818,
2958,
6,
4357,
16488,
28,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2457,
62,
30350,
62,
11125,
62,
26090,
796,
5003,
62,
11125,
62,
26090,
58,
3712,
12,
16,
60,
1303,
9575,
1351,
284,
905,
749,
2274,
3392,
717,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2457,
62,
30350,
62,
11125,
62,
26090,
58,
17816,
5787,
35361,
37535,
20520,
4083,
346,
420,
58,
3712,
12,
16,
4083,
346,
420,
58,
12,
1314,
25,
4083,
29487,
7,
11031,
11639,
5657,
3256,
3670,
28,
83,
15799,
1343,
705,
16210,
1610,
1666,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
458,
83,
13,
12860,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
62,
20427,
62,
26090,
796,
279,
67,
13,
6601,
19778,
7,
1136,
62,
17752,
79,
945,
276,
62,
7890,
7,
8692,
62,
6371,
10,
6,
20427,
12,
21760,
12,
26090,
14,
6,
1343,
4378,
263,
1343,
705,
30,
41007,
28,
24385,
6,
1343,
705,
5,
499,
522,
88,
11639,
1343,
40391,
9218,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
62,
20427,
62,
26090,
796,
10662,
62,
20427,
62,
26090,
13,
2617,
62,
9630,
10786,
4475,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
62,
20427,
62,
26090,
796,
10662,
62,
20427,
62,
26090,
13,
39014,
7,
30094,
13,
1462,
62,
77,
39223,
11,
8563,
11639,
1073,
263,
344,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
5003,
62,
11125,
796,
2457,
62,
30350,
62,
11125,
62,
26090,
13,
346,
420,
58,
15,
7131,
6,
5787,
35361,
37535,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
11275,
83,
796,
10662,
62,
20427,
62,
26090,
13,
346,
420,
58,
15,
7131,
6,
23350,
16587,
83,
20520,
220,
198,
220,
220,
220,
220,
220,
220,
220,
5003,
62,
392,
62,
2257,
62,
24859,
902,
796,
10662,
62,
20427,
62,
26090,
13,
346,
420,
58,
15,
7131,
6,
30350,
1870,
16438,
40596,
19070,
902,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
11146,
16210,
27782,
25,
33172,
5003,
62,
11125,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
14957,
30319,
25,
33172,
2472,
62,
11275,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
35361,
290,
3563,
46568,
25,
33172,
5003,
62,
392,
62,
2257,
62,
24859,
902,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
7343,
286,
1366,
356,
765,
284,
7925,
422,
4463,
85,
528,
8655,
198,
220,
220,
220,
220,
220,
220,
220,
18663,
796,
37250,
18124,
3256,
705,
36,
3705,
1306,
642,
56,
3256,
705,
43303,
3256,
705,
2484,
82,
3806,
1481,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
957,
85,
528,
62,
7890,
796,
651,
62,
15643,
85,
528,
62,
7890,
7,
83,
15799,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
10786,
59,
77,
18467,
53,
528,
6060,
7479,
77,
6,
1343,
965,
7,
15643,
85,
528,
62,
7890,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
17993,
796,
957,
85,
528,
62,
7890,
17816,
43303,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
9780,
62,
4873,
796,
767,
198,
220,
220,
220,
220,
220,
220,
220,
611,
7,
43303,
27,
15,
13,
1795,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9780,
62,
4873,
796,
642,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
7,
43303,
29,
28,
15,
13,
1795,
290,
17993,
27,
16,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9780,
62,
4873,
796,
718,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
7,
43303,
29,
28,
16,
290,
17993,
27,
16,
13,
16,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9780,
62,
4873,
796,
718,
13,
20,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
7,
43303,
29,
28,
16,
13,
16,
290,
17993,
27,
16,
13,
17,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9780,
62,
4873,
796,
767,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
7,
43303,
29,
28,
16,
13,
17,
290,
17993,
27,
16,
13,
18,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9780,
62,
4873,
796,
22,
13,
20,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
7,
43303,
29,
28,
16,
13,
18,
290,
17993,
27,
16,
13,
19,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9780,
62,
4873,
796,
807,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
7,
43303,
29,
28,
16,
13,
19,
290,
17993,
27,
16,
13,
21,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9780,
62,
4873,
796,
807,
13,
20,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
7,
43303,
29,
28,
16,
13,
5333,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9780,
62,
4873,
796,
860,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
59,
77,
15642,
608,
14806,
25,
33172,
9780,
62,
4873,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
47013,
62,
27922,
62,
20,
56,
796,
957,
85,
528,
62,
7890,
17816,
36,
3705,
1306,
642,
56,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
47013,
62,
27922,
62,
21,
56,
62,
1462,
62,
940,
56,
796,
47013,
62,
27922,
62,
20,
56,
14,
17,
220,
1303,
13139,
262,
2180,
3349,
2494,
11,
5940,
8636,
198,
220,
220,
220,
220,
220,
220,
220,
47013,
62,
27922,
62,
1157,
56,
62,
1462,
62,
1238,
56,
220,
796,
45941,
13,
39504,
7,
36,
3705,
62,
27922,
62,
21,
56,
62,
1462,
62,
940,
56,
11,
604,
8,
220,
1303,
49365,
2440,
621,
890,
3381,
10610,
2494,
11,
5940,
8636,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
7303,
62,
448,
5646,
796,
2835,
7,
15643,
85,
528,
62,
7890,
17816,
2484,
82,
3806,
1481,
6,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
11146,
16210,
27782,
25,
33172,
5003,
62,
11125,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
14957,
30319,
25,
33172,
2472,
62,
11275,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
35361,
290,
3563,
46568,
25,
33172,
5003,
62,
392,
62,
2257,
62,
24859,
902,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
36,
3705,
19045,
642,
56,
25,
33172,
47013,
62,
27922,
62,
20,
56,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
36,
3705,
19045,
718,
56,
284,
838,
56,
25,
33172,
47013,
62,
27922,
62,
21,
56,
62,
1462,
62,
940,
56,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
36,
3705,
19045,
1367,
56,
284,
1160,
56,
25,
33172,
47013,
62,
27922,
62,
1157,
56,
62,
1462,
62,
1238,
56,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
15642,
608,
14806,
25,
33172,
9780,
62,
4873,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
43566,
3806,
5646,
25,
33172,
7303,
62,
448,
5646,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
28327,
62,
8367,
796,
2835,
7,
9948,
3129,
378,
62,
600,
81,
1040,
291,
62,
8367,
7,
30350,
62,
11125,
11,
2472,
62,
11275,
83,
11,
5003,
62,
392,
62,
2257,
62,
24859,
902,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
47013,
62,
27922,
62,
20,
56,
11,
47013,
62,
27922,
62,
21,
56,
62,
1462,
62,
940,
56,
11,
47013,
62,
27922,
62,
1157,
56,
62,
1462,
62,
1238,
56,
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,
7303,
62,
448,
5646,
11,
9780,
62,
4873,
828,
362,
8,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
59,
77,
5317,
81,
1040,
291,
11052,
25,
33172,
28327,
62,
8367,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1459,
62,
20888,
796,
957,
85,
528,
62,
7890,
17816,
18124,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
11297,
7886,
25,
33172,
1459,
62,
20888,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1487,
796,
2835,
19510,
7,
600,
81,
1040,
291,
62,
8367,
12,
14421,
62,
20888,
20679,
14421,
62,
20888,
27493,
3064,
11,
362,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
3601,
7203,
24428,
259,
286,
11233,
25,
33172,
10330,
62,
44708,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
5003,
62,
44041,
13,
33295,
7,
30350,
62,
11125,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
11275,
912,
13,
33295,
7,
23350,
62,
11275,
83,
8,
198,
220,
220,
220,
220,
220,
220,
220,
5003,
62,
392,
62,
2257,
62,
24859,
902,
62,
4868,
13,
33295,
7,
30350,
62,
392,
62,
2257,
62,
24859,
902,
8,
198,
220,
220,
220,
220,
220,
220,
220,
731,
292,
13,
33295,
7,
43303,
8,
198,
220,
220,
220,
220,
220,
220,
220,
9780,
62,
9700,
13,
33295,
7,
15410,
608,
62,
4873,
8,
198,
220,
220,
220,
220,
220,
220,
220,
47013,
62,
27922,
62,
20,
56,
82,
13,
33295,
7,
36,
3705,
62,
27922,
62,
20,
56,
8,
198,
220,
220,
220,
220,
220,
220,
220,
47013,
62,
27922,
62,
21,
56,
62,
1462,
62,
940,
56,
82,
13,
33295,
7,
36,
3705,
62,
27922,
62,
21,
56,
62,
1462,
62,
940,
56,
8,
198,
220,
220,
220,
220,
220,
220,
220,
47013,
62,
27922,
62,
1157,
56,
62,
1462,
62,
1238,
56,
82,
13,
33295,
7,
36,
3705,
62,
27922,
62,
1157,
56,
62,
1462,
62,
1238,
56,
8,
198,
220,
220,
220,
220,
220,
220,
220,
7303,
62,
448,
1481,
654,
13,
33295,
7,
1477,
3565,
62,
448,
5646,
8,
198,
220,
220,
220,
220,
220,
220,
220,
28327,
62,
27160,
13,
33295,
7,
600,
81,
1040,
291,
62,
8367,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1459,
62,
1050,
1063,
13,
33295,
7,
14421,
62,
20888,
8,
198,
220,
220,
220,
220,
220,
220,
220,
20241,
62,
44708,
13,
33295,
7,
3803,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4938,
62,
83,
21630,
13,
33295,
7,
83,
15799,
8,
198,
220,
220,
220,
2845,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
220,
198,
7568,
796,
279,
67,
13,
6601,
19778,
7,
37659,
13,
28665,
62,
25558,
26933,
12102,
62,
83,
21630,
11,
5003,
62,
44041,
11,
2472,
62,
11275,
912,
11,
5003,
62,
392,
62,
2257,
62,
24859,
902,
62,
4868,
11,
731,
292,
11,
9780,
62,
9700,
11,
47013,
62,
27922,
62,
20,
56,
82,
11,
47013,
62,
27922,
62,
21,
56,
62,
1462,
62,
940,
56,
82,
11,
47013,
62,
27922,
62,
1157,
56,
62,
1462,
62,
1238,
56,
82,
11,
7303,
62,
448,
1481,
654,
11,
28327,
62,
27160,
11,
1459,
62,
1050,
1063,
11,
20241,
62,
44708,
46570,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15180,
28,
17816,
51,
15799,
3256,
705,
35361,
27782,
3256,
705,
14957,
30319,
3256,
705,
35361,
290,
3563,
4896,
3256,
705,
43303,
3256,
705,
15642,
608,
14806,
3256,
705,
36,
3705,
19045,
642,
575,
3256,
705,
36,
3705,
19045,
718,
12,
940,
575,
3256,
705,
36,
3705,
19045,
1367,
12,
1238,
575,
3256,
705,
43566,
3806,
5646,
3256,
705,
5317,
81,
1040,
291,
11052,
3256,
705,
11297,
7886,
3256,
705,
24428,
259,
11233,
20520,
737,
2617,
62,
9630,
10786,
51,
15799,
11537,
198,
7568,
796,
47764,
13,
30619,
62,
27160,
7,
17816,
24428,
259,
11233,
6,
4357,
41988,
28,
17821,
8,
198,
7568,
13,
1462,
62,
40664,
7,
69,
6,
90,
2435,
13,
2435,
3419,
27422,
40664,
11537,
198,
4798,
357,
7568,
8
] | 2.231202 | 3,019 |
"""Extract simple aggregation features
Reference: https://www.kaggle.com/gpreda/lanl-earthquake-eda-and-prediction
"""
import sys
import numpy as np
import pandas as pd
from pathlib import Path
from tqdm import tqdm
import competition as cc
from common import stop_watch
TRAIN_CSV_DIRECTORY_PATH = cc.INPUT_PATH / sys.argv[1]
TRAIN_CSV_LIST = list(TRAIN_CSV_DIRECTORY_PATH.glob('**/*.csv'))
@stop_watch
if __name__ == "__main__":
train_csv_path = cc.FEATURE_PATH / "{}".format(sys.argv[1])
train_csv_l = [str(item) for item in TRAIN_CSV_LIST]
extract_features(train_csv_l, train_csv_path)
test_csv_path = cc.FEATURE_PATH / "test"
test_csv_l = [str(item) for item in cc.TEST_CSV_LIST]
extract_features(test_csv_l, test_csv_path)
| [
37811,
11627,
974,
2829,
46500,
3033,
628,
220,
220,
220,
20984,
25,
3740,
1378,
2503,
13,
74,
9460,
293,
13,
785,
14,
70,
28764,
64,
14,
9620,
75,
12,
16442,
421,
539,
12,
18082,
12,
392,
12,
28764,
2867,
198,
37811,
198,
198,
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
11748,
5449,
355,
36624,
198,
6738,
2219,
1330,
2245,
62,
8340,
198,
198,
51,
3861,
1268,
62,
7902,
53,
62,
17931,
23988,
15513,
62,
34219,
796,
36624,
13,
1268,
30076,
62,
34219,
1220,
25064,
13,
853,
85,
58,
16,
60,
198,
51,
3861,
1268,
62,
7902,
53,
62,
45849,
796,
1351,
7,
51,
3861,
1268,
62,
7902,
53,
62,
17931,
23988,
15513,
62,
34219,
13,
4743,
672,
10786,
1174,
15211,
13,
40664,
6,
4008,
628,
198,
31,
11338,
62,
8340,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
4512,
62,
40664,
62,
6978,
796,
36624,
13,
15112,
40086,
62,
34219,
1220,
45144,
92,
1911,
18982,
7,
17597,
13,
853,
85,
58,
16,
12962,
198,
220,
220,
220,
4512,
62,
40664,
62,
75,
796,
685,
2536,
7,
9186,
8,
329,
2378,
287,
29125,
1268,
62,
7902,
53,
62,
45849,
60,
198,
220,
220,
220,
7925,
62,
40890,
7,
27432,
62,
40664,
62,
75,
11,
4512,
62,
40664,
62,
6978,
8,
198,
220,
220,
220,
1332,
62,
40664,
62,
6978,
796,
36624,
13,
15112,
40086,
62,
34219,
1220,
366,
9288,
1,
198,
220,
220,
220,
1332,
62,
40664,
62,
75,
796,
685,
2536,
7,
9186,
8,
329,
2378,
287,
36624,
13,
51,
6465,
62,
7902,
53,
62,
45849,
60,
198,
220,
220,
220,
7925,
62,
40890,
7,
9288,
62,
40664,
62,
75,
11,
1332,
62,
40664,
62,
6978,
8,
198
] | 2.46129 | 310 |
import os
from datetime import datetime
import json
import matplotlib.pyplot as plt
from tqdm import tqdm
import torch
import numpy as np
from skimage import measure
from shapely.geometry import Polygon, MultiPolygon
from PIL import Image
import cv2
#model = torch.hub.load('pytorch/vision:v0.10.0', 'deeplabv3_resnet50', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.10.0', 'deeplabv3_resnet101', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.10.0', 'deeplabv3_mobilenet_v3_large', pretrained=True)
model.eval()
from torchvision import transforms
COCO_INFO = {
"description": "",
"url": "",
"version": "1",
"year": 2022,
"contributor": "MSR CV Group",
"date_created": datetime.now().strftime("%m/%d/%Y")
}
COCO_LICENSES = [{
"url": "",
"id": 0,
"name": "License"
}]
if __name__ == "__main__":
data_dir = "E:/Research/Images/FineGrained/StanfordCars/train_bing/" | [
198,
11748,
28686,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
33918,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
198,
11748,
28034,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
9060,
1330,
3953,
220,
198,
6738,
5485,
306,
13,
469,
15748,
1330,
12280,
14520,
11,
15237,
34220,
14520,
198,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
269,
85,
17,
198,
198,
2,
19849,
796,
28034,
13,
40140,
13,
2220,
10786,
9078,
13165,
354,
14,
10178,
25,
85,
15,
13,
940,
13,
15,
3256,
705,
67,
1453,
489,
397,
85,
18,
62,
411,
3262,
1120,
3256,
2181,
13363,
28,
17821,
8,
198,
19849,
796,
28034,
13,
40140,
13,
2220,
10786,
9078,
13165,
354,
14,
10178,
25,
85,
15,
13,
940,
13,
15,
3256,
705,
67,
1453,
489,
397,
85,
18,
62,
411,
3262,
8784,
3256,
2181,
13363,
28,
17821,
8,
198,
2,
2746,
796,
28034,
13,
40140,
13,
2220,
10786,
9078,
13165,
354,
14,
10178,
25,
85,
15,
13,
940,
13,
15,
3256,
705,
67,
1453,
489,
397,
85,
18,
62,
76,
25898,
268,
316,
62,
85,
18,
62,
11664,
3256,
2181,
13363,
28,
17821,
8,
198,
19849,
13,
18206,
3419,
198,
198,
6738,
28034,
10178,
1330,
31408,
198,
198,
34,
4503,
46,
62,
10778,
796,
1391,
198,
220,
220,
220,
366,
11213,
1298,
366,
1600,
198,
220,
220,
220,
366,
6371,
1298,
366,
1600,
198,
220,
220,
220,
366,
9641,
1298,
366,
16,
1600,
198,
220,
220,
220,
366,
1941,
1298,
33160,
11,
198,
220,
220,
220,
366,
3642,
2455,
273,
1298,
366,
5653,
49,
26196,
4912,
1600,
198,
220,
220,
220,
366,
4475,
62,
25598,
1298,
4818,
8079,
13,
2197,
22446,
2536,
31387,
7203,
4,
76,
14,
4,
67,
14,
4,
56,
4943,
198,
92,
198,
198,
34,
4503,
46,
62,
43,
2149,
16938,
1546,
796,
685,
90,
198,
220,
220,
220,
366,
6371,
1298,
366,
1600,
198,
220,
220,
220,
366,
312,
1298,
657,
11,
198,
220,
220,
220,
366,
3672,
1298,
366,
34156,
1,
198,
92,
60,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
628,
220,
220,
220,
1366,
62,
15908,
796,
366,
36,
14079,
25104,
14,
29398,
14,
34389,
8642,
1328,
14,
32140,
3841,
34,
945,
14,
27432,
62,
4623,
30487
] | 2.428941 | 387 |
import mock
import unittest
from matrix.common.query.expression_query_results_reader import ExpressionQueryResultsReader
| [
11748,
15290,
198,
11748,
555,
715,
395,
198,
198,
6738,
17593,
13,
11321,
13,
22766,
13,
38011,
62,
22766,
62,
43420,
62,
46862,
1330,
41986,
20746,
25468,
33634,
628
] | 4.241379 | 29 |
################################################################################
#
# Description: This script provides the formal specification of the study data
# that will be extracted from the OpenSAFELY database.
#
# Output: output/data/input_*.csv.gz
#
# Author(s): M Green (edited by H Curtis)
# Date last updated: 03/02/2022
#
################################################################################
# IMPORT STATEMENTS ----
## Import code building blocks from cohort extractor package
from cohortextractor import (
StudyDefinition,
patients,
codelist_from_csv,
codelist,
filter_codes_by_category,
combine_codelists,
Measure
)
## Import codelists from codelist.py (which pulls them from the codelist folder)
from codelists import *
# DEFINE STUDY POPULATION ----
## Define study time variables
from datetime import date
campaign_start = "2021-12-16"
end_date = date.today().isoformat()
## Define study population and variables
study = StudyDefinition(
# PRELIMINARIES ----
## Configure the expectations framework
default_expectations = {
"date": {"earliest": "2021-11-01", "latest": "today"},
"rate": "uniform",
"incidence": 0.4,
},
## Define index date
index_date = campaign_start,
# POPULATION ----
population = patients.satisfying(
"""
(registered_eligible OR registered_treated)
AND
NOT has_died
AND
(sotrovimab_covid_therapeutics
OR molnupiravir_covid_therapeutics
OR casirivimab_covid_therapeutics
OR covid_test_positive
)
""",
has_died = patients.died_from_any_cause(
on_or_before = "index_date - 1 day",
returning = "binary_flag",
),
),
# TREATMENT - NEUTRALISING MONOCLONAL ANTIBODIES OR ANTIVIRALS ----
## Sotrovimab
sotrovimab_covid_therapeutics = patients.with_covid_therapeutics(
#with_these_statuses = ["Approved", "Treatment Complete"],
with_these_therapeutics = "Sotrovimab",
with_these_indications = "non_hospitalised",
on_or_after = "index_date",
find_first_match_in_period = True,
returning = "date",
date_format = "YYYY-MM-DD",
return_expectations = {
"date": {"earliest": "2021-12-20"},
"incidence": 0.4
},
),
### Molnupiravir
molnupiravir_covid_therapeutics = patients.with_covid_therapeutics(
#with_these_statuses = ["Approved", "Treatment Complete"],
with_these_therapeutics = "Molnupiravir",
with_these_indications = "non_hospitalised",
on_or_after = "index_date",
find_first_match_in_period = True,
returning = "date",
date_format = "YYYY-MM-DD",
return_expectations = {
"date": {"earliest": "2021-12-20"},
"incidence": 0.4
},
),
### Casirivimab and imdevimab
casirivimab_covid_therapeutics = patients.with_covid_therapeutics(
#with_these_statuses = ["Approved", "Treatment Complete"],
with_these_therapeutics = "Casirivimab and imdevimab",
with_these_indications = "non_hospitalised",
on_or_after = "index_date",
find_first_match_in_period = True,
returning = "date",
date_format = "YYYY-MM-DD",
return_expectations = {
"date": {"earliest": "2021-12-20"},
"incidence": 0.4
},
),
date_treated = patients.minimum_of(
"sotrovimab_covid_therapeutics",
"molnupiravir_covid_therapeutics",
"casirivimab_covid_therapeutics",
),
# ELIGIBILITY CRITERIA VARIABLES ----
## Inclusion criteria variables
### SARS-CoV-2 test
# Note patients are eligible for treatment if diagnosed <=5d ago
# in the latest 5 days there may be patients identified as eligible who have not yet been treated
covid_test_positive = patients.with_test_result_in_sgss(
pathogen = "SARS-CoV-2",
test_result = "positive",
returning = "binary_flag",
on_or_after = "index_date - 5 days",
find_first_match_in_period = True,
restrict_to_earliest_specimen_date = False,
return_expectations = {
"incidence": 0.2
},
),
covid_test_date = patients.with_test_result_in_sgss(
pathogen = "SARS-CoV-2",
test_result = "positive",
find_first_match_in_period = True,
restrict_to_earliest_specimen_date = False,
returning = "date",
date_format = "YYYY-MM-DD",
on_or_after = "index_date - 5 days",
return_expectations = {
"date": {"earliest": "2021-12-20", "latest": "index_date"},
"incidence": 0.9
},
),
covid_positive_test_type = patients.with_test_result_in_sgss(
pathogen = "SARS-CoV-2",
test_result = "positive",
returning = "case_category",
on_or_after = "index_date - 5 days",
restrict_to_earliest_specimen_date = True,
return_expectations = {
"category": {"ratios": {"LFT_Only": 0.4, "PCR_Only": 0.4, "LFT_WithPCR": 0.2}},
"incidence": 0.2,
},
),
covid_positive_previous_30_days = patients.with_test_result_in_sgss(
pathogen = "SARS-CoV-2",
test_result = "positive",
returning = "binary_flag",
between = ["covid_test_date - 31 days", "covid_test_date - 1 day"],
find_last_match_in_period = True,
restrict_to_earliest_specimen_date = False,
return_expectations = {
"incidence": 0.05
},
),
### Onset of symptoms of COVID-19
symptomatic_covid_test = patients.with_test_result_in_sgss(
pathogen = "SARS-CoV-2",
test_result = "any",
returning = "symptomatic",
on_or_after = "index_date - 5 days",
find_first_match_in_period = True,
restrict_to_earliest_specimen_date = False,
return_expectations={
"incidence": 0.1,
"category": {
"ratios": {
"": 0.2,
"N": 0.2,
"Y": 0.6,
}
},
},
),
covid_symptoms_snomed = patients.with_these_clinical_events(
covid_symptoms_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
on_or_after = "index_date - 5 days",
),
# CENSORING ----
registered_eligible = patients.registered_as_of("covid_test_date"),
registered_treated = patients.registered_as_of("date_treated"),
## Death of any cause
death_date = patients.died_from_any_cause(
returning = "date_of_death",
date_format = "YYYY-MM-DD",
on_or_after = "covid_test_date",
return_expectations = {
"date": {"earliest": "2021-12-20", "latest": "index_date"},
"incidence": 0.1
},
),
## De-registration
dereg_date = patients.date_deregistered_from_all_supported_practices(
on_or_after = "covid_test_date",
date_format = "YYYY-MM-DD",
return_expectations = {
"date": {"earliest": "2021-12-20", "latest": "index_date"},
"incidence": 0.1
},
),
### Blueteq ‘high risk’ cohort
high_risk_cohort_covid_therapeutics = patients.with_covid_therapeutics(
with_these_statuses = ["Approved", "Treatment Complete"],
with_these_therapeutics = ["Sotrovimab", "Molnupiravir","Casirivimab and imdevimab"],
with_these_indications = "non_hospitalised",
on_or_after = "index_date",
find_first_match_in_period = True,
returning = "risk_group",
date_format = "YYYY-MM-DD",
return_expectations = {
"rate": "universal",
"category": {
"ratios": {
"Down's syndrome": 0.1,
"Sickle cell disease": 0.1,
"solid cancer": 0.1,
"haematological diseases, stem cell transplant recipients": 0.1,
"renal disease": 0.1,
"liver disease": 0.1,
"immune-mediated inflammatory disorders (IMID)": 0.2,
"Primary immune deficiencies": 0.1,
"HIV/AIDS": 0.1,},},
},
),
### NHSD ‘high risk’ cohort (codelist to be defined if/when data avaliable)
# high_risk_cohort_nhsd = patients.with_these_clinical_events(
# high_risk_cohort_nhsd_codes,
# between = [campaign_start, index_date],
# returning = "date",
# date_format = "YYYY-MM-DD",
# find_first_match_in_period = True,
# ),
## Exclusion criteria
### Pattern of clinical presentation indicates that there is recovery rather than risk of deterioration from infection
# (not currently possible to define/code)
### Require hospitalisation for COVID-19
## NB this data lags behind the therapeutics/testing data so may be missing
covid_hospital_admission_date = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = covid_icd10_codes,
on_or_after = "index_date - 5 days",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
return_expectations = {
"date": {"earliest": "index_date - 5 days", "latest": "index_date"},
"rate": "uniform",
"incidence": 0.05
},
),
### New supplemental oxygen requirement specifically for the management of COVID-19 symptoms
# (not currently possible to define/code)
### Children weighing less than 40kg
# (not currently possible to define/code)
### Children aged under 12 years
age = patients.age_as_of(
"index_date",
return_expectations = {
"rate": "universal",
"int": {"distribution": "population_ages"},
"incidence" : 0.9
},
),
### Known hypersensitivity reaction to the active substances or to any of the excipients of sotrovimab
# (not currently possible to define/code)
# HIGH RISK GROUPS ----
## Down's syndrome
downs_syndrome_nhsd_snomed = patients.with_these_clinical_events(
downs_syndrome_nhsd_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
downs_syndrome_nhsd_icd10 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = downs_syndrome_nhsd_icd10_codes,
find_first_match_in_period = True,
date_format = "YYYY-MM-DD",
),
downs_syndrome_nhsd = patients.minimum_of("downs_syndrome_nhsd_snomed", "downs_syndrome_nhsd_icd10"),
## Sickle cell disease
sickle_cell_disease_nhsd_snomed = patients.with_these_clinical_events(
sickle_cell_disease_nhsd_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
sickle_cell_disease_nhsd_icd10 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = sickle_cell_disease_nhsd_icd10_codes,
find_first_match_in_period = True,
date_format = "YYYY-MM-DD",
),
sickle_cell_disease_nhsd = patients.minimum_of("sickle_cell_disease_nhsd_snomed", "sickle_cell_disease_nhsd_icd10"),
## Solid cancer
cancer_opensafely_snomed = patients.with_these_clinical_events(
combine_codelists(
non_haematological_cancer_opensafely_snomed_codes,
lung_cancer_opensafely_snomed_codes,
chemotherapy_radiotherapy_opensafely_snomed_codes
),
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
## Haematological diseases
haematopoietic_stem_cell_transplant_nhsd_snomed = patients.with_these_clinical_events(
haematopoietic_stem_cell_transplant_nhsd_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
haematopoietic_stem_cell_transplant_nhsd_icd10 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = haematopoietic_stem_cell_transplant_nhsd_icd10_codes,
find_first_match_in_period = True,
date_format = "YYYY-MM-DD",
),
haematopoietic_stem_cell_transplant_nhsd_opcs4 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_procedures = haematopoietic_stem_cell_transplant_nhsd_opcs4_codes,
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
return_expectations = {
"date": {"earliest": "2020-02-01"},
"rate": "exponential_increase",
"incidence": 0.01,
},
),
# haematological_malignancies_nhsd_snomed = patients.with_these_clinical_events(
# haematological_malignancies_nhsd_snomed_codes,
# returning = "date",
# date_format = "YYYY-MM-DD",
# find_first_match_in_period = True,
# #on_or_before = "end_date",
# ),
haematological_malignancies_nhsd_icd10 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = haematological_malignancies_nhsd_icd10_codes,
find_first_match_in_period = True,
date_format = "YYYY-MM-DD",
),
haematological_disease_nhsd = patients.minimum_of("haematopoietic_stem_cell_transplant_nhsd_snomed",
"haematopoietic_stem_cell_transplant_nhsd_icd10",
"haematopoietic_stem_cell_transplant_nhsd_opcs4",
#"haematological_malignancies_nhsd_snomed",
"haematological_malignancies_nhsd_icd10"),
## Renal disease
ckd_stage_5_nhsd_snomed = patients.with_these_clinical_events(
ckd_stage_5_nhsd_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
ckd_stage_5_nhsd_icd10 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = ckd_stage_5_nhsd_icd10_codes,
find_first_match_in_period = True,
date_format = "YYYY-MM-DD",
),
ckd_stage_5_nhsd = patients.minimum_of("ckd_stage_5_nhsd_snomed", "ckd_stage_5_nhsd_icd10"),
## Liver disease
liver_disease_nhsd_snomed = patients.with_these_clinical_events(
ckd_stage_5_nhsd_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
liver_disease_nhsd_icd10 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = ckd_stage_5_nhsd_icd10_codes,
find_first_match_in_period = True,
date_format = "YYYY-MM-DD",
),
liver_disease_nhsd = patients.minimum_of("liver_disease_nhsd_snomed", "liver_disease_nhsd_icd10"),
## Immune-mediated inflammatory disorders (IMID)
imid_nhsd = patients.with_these_clinical_events(
codelist = combine_codelists(immunosuppresant_drugs_dmd_codes, immunosuppresant_drugs_snomed_codes,
oral_steroid_drugs_dmd_codes,
oral_steroid_drugs_snomed_codes),
returning = "date",
find_last_match_in_period = True,
date_format = "YYYY-MM-DD",
),
## Primary immune deficiencies
immunosupression_nhsd = patients.with_these_clinical_events(
immunosupression_nhsd_codes,
returning = "date",
find_last_match_in_period = True,
date_format = "YYYY-MM-DD",
),
## HIV/AIDs
hiv_aids_nhsd_snomed = patients.with_these_clinical_events(
hiv_aids_nhsd_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
hiv_aids_nhsd_icd10 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = hiv_aids_nhsd_icd10_codes,
find_first_match_in_period = True,
date_format = "YYYY-MM-DD",
),
hiv_aids_nhsd = patients.minimum_of("hiv_aids_nhsd_snomed", "hiv_aids_nhsd_icd10"),
## Solid organ transplant
solid_organ_transplant_nhsd_snomed = patients.with_these_clinical_events(
solid_organ_transplant_nhsd_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
solid_organ_transplant_nhsd_opcs4 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_procedures = solid_organ_transplant_nhsd_opcs4_codes,
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
return_expectations = {
"date": {"earliest": "2020-02-01"},
"rate": "exponential_increase",
"incidence": 0.01,
},
),
solid_organ_transplant_nhsd = patients.minimum_of("solid_organ_transplant_nhsd_snomed", "solid_organ_transplant_nhsd_opcs4"),
## Rare neurological conditions
### Multiple sclerosis
multiple_sclerosis_nhsd_snomed = patients.with_these_clinical_events(
multiple_sclerosis_nhsd_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
multiple_sclerosis_nhsd_icd10 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = multiple_sclerosis_nhsd_icd10_codes,
find_first_match_in_period = True,
date_format = "YYYY-MM-DD",
),
multiple_sclerosis_nhsd = patients.minimum_of("multiple_sclerosis_nhsd_snomed", "multiple_sclerosis_nhsd_icd10"),
### Motor neurone disease
motor_neurone_disease_nhsd_snomed = patients.with_these_clinical_events(
motor_neurone_disease_nhsd_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
motor_neurone_disease_nhsd_icd10 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = motor_neurone_disease_nhsd_icd10_codes,
find_first_match_in_period = True,
date_format = "YYYY-MM-DD",
),
motor_neurone_disease_nhsd = patients.minimum_of("motor_neurone_disease_nhsd_snomed", "motor_neurone_disease_nhsd_icd10"),
### Myasthenia gravis
myasthenia_gravis_nhsd_snomed = patients.with_these_clinical_events(
myasthenia_gravis_nhsd_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
myasthenia_gravis_nhsd_icd10 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = myasthenia_gravis_nhsd_icd10_codes,
find_first_match_in_period = True,
date_format = "YYYY-MM-DD",
),
myasthenia_gravis_nhsd = patients.minimum_of("myasthenia_gravis_nhsd_snomed", "myasthenia_gravis_nhsd_icd10"),
### Huntington’s disease
huntingtons_disease_nhsd_snomed = patients.with_these_clinical_events(
huntingtons_disease_nhsd_snomed_codes,
returning = "date",
date_format = "YYYY-MM-DD",
find_first_match_in_period = True,
),
huntingtons_disease_nhsd_icd10 = patients.admitted_to_hospital(
returning = "date_admitted",
with_these_diagnoses = huntingtons_disease_nhsd_icd10_codes,
find_first_match_in_period = True,
date_format = "YYYY-MM-DD",
),
huntingtons_disease_nhsd = patients.minimum_of("huntingtons_disease_nhsd_snomed", "huntingtons_disease_nhsd_icd10"),
# CLINICAL/DEMOGRAPHIC COVARIATES ----
## Sex
sex = patients.sex(
return_expectations = {
"rate": "universal",
"category": {"ratios": {"M": 0.49, "F": 0.51}},
}
),
## Ethnicity
ethnicity_primis = patients.with_these_clinical_events(
ethnicity_primis_codes,
returning = "category",
find_last_match_in_period = True,
include_date_of_match = False,
return_expectations = {
"category": {"ratios": {"1": 0.2, "2": 0.2, "3": 0.2, "4": 0.2, "5": 0.2}},
"incidence": 0.75,
},
),
ethnicity_sus = patients.with_ethnicity_from_sus(
returning = "group_6",
use_most_frequent_code = True,
return_expectations = {
"category": {"ratios": {"1": 0.2, "2": 0.2, "3": 0.2, "4": 0.2, "5": 0.2}},
"incidence": 0.8,
},
),
## Index of multiple deprivation
imd = patients.categorised_as(
{"0": "DEFAULT",
"1": """index_of_multiple_deprivation >=1 AND index_of_multiple_deprivation < 32844*1/5""",
"2": """index_of_multiple_deprivation >= 32844*1/5 AND index_of_multiple_deprivation < 32844*2/5""",
"3": """index_of_multiple_deprivation >= 32844*2/5 AND index_of_multiple_deprivation < 32844*3/5""",
"4": """index_of_multiple_deprivation >= 32844*3/5 AND index_of_multiple_deprivation < 32844*4/5""",
"5": """index_of_multiple_deprivation >= 32844*4/5 """,
},
index_of_multiple_deprivation = patients.address_as_of(
"index_date",
returning = "index_of_multiple_deprivation",
round_to_nearest = 100,
),
return_expectations = {
"rate": "universal",
"category": {
"ratios": {
"0": 0.01,
"1": 0.20,
"2": 0.20,
"3": 0.20,
"4": 0.20,
"5": 0.19,
}},
},
),
## Region - NHS England 9 regions
region_nhs = patients.registered_practice_as_of(
"index_date",
returning = "nuts1_region_name",
return_expectations = {
"rate": "universal",
"category": {
"ratios": {
"North East": 0.1,
"North West": 0.1,
"Yorkshire and The Humber": 0.1,
"East Midlands": 0.1,
"West Midlands": 0.1,
"East": 0.1,
"London": 0.2,
"South West": 0.1,
"South East": 0.1,},},
},
),
region_covid_therapeutics = patients.with_covid_therapeutics(
#with_these_statuses = ["Approved", "Treatment Complete"],
with_these_therapeutics = ["Sotrovimab", "Molnupiravir", "Casirivimab and imdevimab"],
with_these_indications = "non_hospitalised",
on_or_after = "index_date",
find_first_match_in_period = True,
returning = "region",
return_expectations = {
"rate": "universal",
"category": {
"ratios": {
"North East": 0.1,
"North West": 0.1,
"Yorkshire and The Humber": 0.1,
"East Midlands": 0.1,
"West Midlands": 0.1,
"East": 0.1,
"London": 0.2,
"South West": 0.1,
"South East": 0.1,},},
},
),
## CMDUs/ICS
)
| [
29113,
29113,
14468,
198,
2,
198,
2,
12489,
25,
770,
4226,
3769,
262,
8766,
20855,
286,
262,
2050,
1366,
220,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
326,
481,
307,
21242,
422,
262,
4946,
4090,
37,
30943,
6831,
13,
198,
2,
198,
2,
25235,
25,
5072,
14,
7890,
14,
15414,
62,
24620,
40664,
13,
34586,
198,
2,
198,
2,
6434,
7,
82,
2599,
337,
3469,
357,
42131,
416,
367,
25157,
8,
198,
2,
7536,
938,
6153,
25,
7643,
14,
2999,
14,
1238,
1828,
198,
2,
198,
29113,
29113,
14468,
628,
198,
2,
30023,
9863,
15486,
12529,
50,
13498,
198,
198,
2235,
17267,
2438,
2615,
7021,
422,
20812,
7925,
273,
5301,
198,
6738,
20812,
2302,
40450,
1330,
357,
198,
220,
12481,
36621,
11,
198,
220,
3871,
11,
198,
220,
14873,
46331,
62,
6738,
62,
40664,
11,
198,
220,
14873,
46331,
11,
198,
220,
8106,
62,
40148,
62,
1525,
62,
22872,
11,
198,
220,
12082,
62,
19815,
417,
1023,
11,
198,
220,
24291,
198,
8,
198,
198,
2235,
17267,
14873,
417,
1023,
422,
14873,
46331,
13,
9078,
357,
4758,
16194,
606,
422,
262,
14873,
46331,
9483,
8,
198,
6738,
14873,
417,
1023,
1330,
1635,
198,
220,
220,
198,
220,
220,
198,
2,
23449,
8881,
49348,
56,
37586,
6239,
6234,
13498,
198,
198,
2235,
2896,
500,
2050,
640,
9633,
198,
6738,
4818,
8079,
1330,
3128,
198,
198,
35012,
62,
9688,
796,
366,
1238,
2481,
12,
1065,
12,
1433,
1,
198,
437,
62,
4475,
796,
3128,
13,
40838,
22446,
26786,
18982,
3419,
628,
198,
2235,
2896,
500,
2050,
3265,
290,
9633,
198,
44517,
796,
12481,
36621,
7,
198,
220,
220,
198,
220,
1303,
350,
16448,
3955,
1268,
1503,
11015,
13498,
198,
220,
220,
198,
220,
22492,
17056,
495,
262,
9027,
9355,
198,
220,
4277,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
366,
4475,
1298,
19779,
451,
11318,
1298,
366,
1238,
2481,
12,
1157,
12,
486,
1600,
366,
42861,
1298,
366,
40838,
25719,
198,
220,
220,
220,
366,
4873,
1298,
366,
403,
6933,
1600,
198,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
19,
11,
198,
220,
8964,
198,
220,
220,
198,
220,
22492,
2896,
500,
6376,
3128,
198,
220,
6376,
62,
4475,
796,
1923,
62,
9688,
11,
198,
220,
220,
198,
220,
1303,
37586,
6239,
6234,
13498,
198,
220,
3265,
796,
3871,
13,
82,
17403,
1112,
7,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
357,
33736,
62,
31595,
6375,
6823,
62,
37182,
8,
198,
220,
220,
220,
5357,
198,
220,
220,
220,
5626,
468,
62,
67,
798,
198,
220,
220,
220,
5357,
198,
220,
220,
220,
357,
82,
313,
18657,
320,
397,
62,
66,
709,
312,
62,
490,
1758,
48063,
220,
198,
220,
220,
220,
220,
220,
6375,
285,
10875,
929,
343,
615,
343,
62,
66,
709,
312,
62,
490,
1758,
48063,
220,
198,
220,
220,
220,
220,
220,
6375,
6124,
343,
452,
320,
397,
62,
66,
709,
312,
62,
490,
1758,
48063,
198,
220,
220,
220,
220,
220,
6375,
39849,
312,
62,
9288,
62,
24561,
198,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
13538,
1600,
198,
220,
220,
220,
220,
198,
220,
220,
220,
468,
62,
67,
798,
796,
3871,
13,
67,
798,
62,
6738,
62,
1092,
62,
25587,
7,
198,
220,
220,
220,
220,
220,
319,
62,
273,
62,
19052,
796,
366,
9630,
62,
4475,
532,
352,
1110,
1600,
198,
220,
220,
220,
220,
220,
8024,
796,
366,
39491,
62,
32109,
1600,
198,
220,
220,
220,
10612,
198,
220,
220,
220,
220,
198,
220,
10612,
198,
220,
220,
198,
220,
220,
198,
220,
220,
198,
220,
1303,
43236,
1404,
10979,
532,
10635,
3843,
35296,
1797,
2751,
25000,
4503,
43,
1340,
1847,
3537,
51,
9865,
3727,
11015,
6375,
3537,
51,
3824,
4663,
23333,
13498,
628,
220,
22492,
311,
313,
18657,
320,
397,
198,
220,
264,
313,
18657,
320,
397,
62,
66,
709,
312,
62,
490,
1758,
48063,
796,
3871,
13,
4480,
62,
66,
709,
312,
62,
490,
1758,
48063,
7,
198,
220,
220,
220,
1303,
4480,
62,
27218,
62,
14269,
2664,
796,
14631,
4677,
305,
1079,
1600,
366,
51,
21731,
13248,
33116,
198,
220,
220,
220,
351,
62,
27218,
62,
490,
1758,
48063,
796,
366,
50,
313,
18657,
320,
397,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
521,
3736,
796,
366,
13159,
62,
49257,
1417,
1600,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
9630,
62,
4475,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4475,
1298,
19779,
451,
11318,
1298,
366,
1238,
2481,
12,
1065,
12,
1238,
25719,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
19,
198,
220,
220,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
44386,
337,
10875,
929,
343,
615,
343,
198,
220,
285,
10875,
929,
343,
615,
343,
62,
66,
709,
312,
62,
490,
1758,
48063,
796,
3871,
13,
4480,
62,
66,
709,
312,
62,
490,
1758,
48063,
7,
198,
220,
220,
220,
1303,
4480,
62,
27218,
62,
14269,
2664,
796,
14631,
4677,
305,
1079,
1600,
366,
51,
21731,
13248,
33116,
198,
220,
220,
220,
351,
62,
27218,
62,
490,
1758,
48063,
796,
366,
44,
10875,
929,
343,
615,
343,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
521,
3736,
796,
366,
13159,
62,
49257,
1417,
1600,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
9630,
62,
4475,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4475,
1298,
19779,
451,
11318,
1298,
366,
1238,
2481,
12,
1065,
12,
1238,
25719,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
19,
198,
220,
220,
220,
220,
220,
8964,
198,
220,
10612,
628,
220,
44386,
11294,
343,
452,
320,
397,
290,
545,
7959,
320,
397,
198,
220,
6124,
343,
452,
320,
397,
62,
66,
709,
312,
62,
490,
1758,
48063,
796,
3871,
13,
4480,
62,
66,
709,
312,
62,
490,
1758,
48063,
7,
198,
220,
220,
220,
1303,
4480,
62,
27218,
62,
14269,
2664,
796,
14631,
4677,
305,
1079,
1600,
366,
51,
21731,
13248,
33116,
198,
220,
220,
220,
351,
62,
27218,
62,
490,
1758,
48063,
796,
366,
35155,
343,
452,
320,
397,
290,
545,
7959,
320,
397,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
521,
3736,
796,
366,
13159,
62,
49257,
1417,
1600,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
9630,
62,
4475,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4475,
1298,
19779,
451,
11318,
1298,
366,
1238,
2481,
12,
1065,
12,
1238,
25719,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
19,
198,
220,
220,
220,
220,
220,
8964,
198,
220,
10612,
220,
198,
220,
220,
198,
220,
3128,
62,
37182,
796,
3871,
13,
39504,
62,
1659,
7,
198,
220,
220,
220,
366,
82,
313,
18657,
320,
397,
62,
66,
709,
312,
62,
490,
1758,
48063,
1600,
198,
220,
220,
220,
366,
76,
10875,
929,
343,
615,
343,
62,
66,
709,
312,
62,
490,
1758,
48063,
1600,
198,
220,
220,
220,
366,
34004,
343,
452,
320,
397,
62,
66,
709,
312,
62,
490,
1758,
48063,
1600,
198,
220,
10612,
628,
220,
1303,
17852,
3528,
40,
25382,
8740,
2043,
1137,
3539,
569,
1503,
3539,
9148,
1546,
13498,
198,
220,
220,
198,
220,
22492,
554,
4717,
9987,
9633,
198,
220,
220,
198,
220,
44386,
311,
27415,
12,
7222,
53,
12,
17,
1332,
198,
220,
1303,
5740,
3871,
389,
8867,
329,
3513,
611,
14641,
19841,
20,
67,
2084,
198,
220,
1303,
287,
262,
3452,
642,
1528,
612,
743,
307,
3871,
5174,
355,
8867,
508,
423,
407,
1865,
587,
5716,
198,
220,
39849,
312,
62,
9288,
62,
24561,
796,
3871,
13,
4480,
62,
9288,
62,
20274,
62,
259,
62,
45213,
824,
7,
198,
220,
220,
220,
3108,
6644,
796,
366,
50,
27415,
12,
7222,
53,
12,
17,
1600,
198,
220,
220,
220,
1332,
62,
20274,
796,
366,
24561,
1600,
198,
220,
220,
220,
8024,
796,
366,
39491,
62,
32109,
1600,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
9630,
62,
4475,
532,
642,
1528,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
4239,
62,
1462,
62,
451,
11318,
62,
16684,
19027,
62,
4475,
796,
10352,
11,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
17,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
39849,
312,
62,
9288,
62,
4475,
796,
3871,
13,
4480,
62,
9288,
62,
20274,
62,
259,
62,
45213,
824,
7,
198,
220,
220,
220,
3108,
6644,
796,
366,
50,
27415,
12,
7222,
53,
12,
17,
1600,
198,
220,
220,
220,
1332,
62,
20274,
796,
366,
24561,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
4239,
62,
1462,
62,
451,
11318,
62,
16684,
19027,
62,
4475,
796,
10352,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
9630,
62,
4475,
532,
642,
1528,
1600,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4475,
1298,
19779,
451,
11318,
1298,
366,
1238,
2481,
12,
1065,
12,
1238,
1600,
366,
42861,
1298,
366,
9630,
62,
4475,
25719,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
24,
198,
220,
220,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
39849,
312,
62,
24561,
62,
9288,
62,
4906,
796,
3871,
13,
4480,
62,
9288,
62,
20274,
62,
259,
62,
45213,
824,
7,
198,
220,
220,
220,
3108,
6644,
796,
366,
50,
27415,
12,
7222,
53,
12,
17,
1600,
198,
220,
220,
220,
1332,
62,
20274,
796,
366,
24561,
1600,
198,
220,
220,
220,
8024,
796,
366,
7442,
62,
22872,
1600,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
9630,
62,
4475,
532,
642,
1528,
1600,
198,
220,
220,
220,
4239,
62,
1462,
62,
451,
11318,
62,
16684,
19027,
62,
4475,
796,
6407,
11,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
22872,
1298,
19779,
10366,
4267,
1298,
19779,
43,
9792,
62,
10049,
1298,
657,
13,
19,
11,
366,
5662,
49,
62,
10049,
1298,
657,
13,
19,
11,
366,
43,
9792,
62,
3152,
5662,
49,
1298,
657,
13,
17,
92,
5512,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
17,
11,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
39849,
312,
62,
24561,
62,
3866,
1442,
62,
1270,
62,
12545,
796,
3871,
13,
4480,
62,
9288,
62,
20274,
62,
259,
62,
45213,
824,
7,
198,
220,
220,
220,
3108,
6644,
796,
366,
50,
27415,
12,
7222,
53,
12,
17,
1600,
198,
220,
220,
220,
1332,
62,
20274,
796,
366,
24561,
1600,
198,
220,
220,
220,
8024,
796,
366,
39491,
62,
32109,
1600,
198,
220,
220,
220,
1022,
796,
14631,
66,
709,
312,
62,
9288,
62,
4475,
532,
3261,
1528,
1600,
366,
66,
709,
312,
62,
9288,
62,
4475,
532,
352,
1110,
33116,
198,
220,
220,
220,
1064,
62,
12957,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
4239,
62,
1462,
62,
451,
11318,
62,
16684,
19027,
62,
4475,
796,
10352,
11,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
2713,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
44386,
1550,
2617,
286,
7460,
286,
7375,
11008,
12,
1129,
198,
220,
6585,
13730,
62,
66,
709,
312,
62,
9288,
796,
3871,
13,
4480,
62,
9288,
62,
20274,
62,
259,
62,
45213,
824,
7,
198,
220,
220,
220,
3108,
6644,
796,
366,
50,
27415,
12,
7222,
53,
12,
17,
1600,
198,
220,
220,
220,
1332,
62,
20274,
796,
366,
1092,
1600,
198,
220,
220,
220,
8024,
796,
366,
37047,
457,
13730,
1600,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
9630,
62,
4475,
532,
642,
1528,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
4239,
62,
1462,
62,
451,
11318,
62,
16684,
19027,
62,
4475,
796,
10352,
11,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
34758,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
366,
22872,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
10366,
4267,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1298,
657,
13,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
45,
1298,
657,
13,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
56,
1298,
657,
13,
21,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
39849,
312,
62,
37047,
35533,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
39849,
312,
62,
37047,
35533,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
9630,
62,
4475,
532,
642,
1528,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
220,
198,
220,
220,
198,
220,
1303,
327,
16938,
1581,
2751,
13498,
198,
220,
220,
198,
220,
6823,
62,
31595,
796,
3871,
13,
33736,
62,
292,
62,
1659,
7203,
66,
709,
312,
62,
9288,
62,
4475,
12340,
628,
220,
6823,
62,
37182,
796,
3871,
13,
33736,
62,
292,
62,
1659,
7203,
4475,
62,
37182,
12340,
628,
198,
220,
22492,
5830,
286,
597,
2728,
198,
220,
1918,
62,
4475,
796,
3871,
13,
67,
798,
62,
6738,
62,
1092,
62,
25587,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
1659,
62,
22595,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
66,
709,
312,
62,
9288,
62,
4475,
1600,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4475,
1298,
19779,
451,
11318,
1298,
366,
1238,
2481,
12,
1065,
12,
1238,
1600,
366,
42861,
1298,
366,
9630,
62,
4475,
25719,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
16,
198,
220,
220,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
22492,
1024,
12,
2301,
33397,
198,
220,
390,
2301,
62,
4475,
796,
3871,
13,
4475,
62,
67,
567,
70,
23187,
62,
6738,
62,
439,
62,
15999,
62,
29152,
1063,
7,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
66,
709,
312,
62,
9288,
62,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4475,
1298,
19779,
451,
11318,
1298,
366,
1238,
2481,
12,
1065,
12,
1238,
1600,
366,
42861,
1298,
366,
9630,
62,
4475,
25719,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
16,
198,
220,
220,
220,
220,
220,
8964,
198,
220,
10612,
628,
198,
220,
44386,
12391,
14471,
80,
564,
246,
8929,
2526,
447,
247,
20812,
198,
220,
1029,
62,
19121,
62,
1073,
71,
419,
62,
66,
709,
312,
62,
490,
1758,
48063,
796,
3871,
13,
4480,
62,
66,
709,
312,
62,
490,
1758,
48063,
7,
198,
220,
220,
220,
351,
62,
27218,
62,
14269,
2664,
796,
14631,
4677,
305,
1079,
1600,
366,
51,
21731,
13248,
33116,
198,
220,
220,
220,
351,
62,
27218,
62,
490,
1758,
48063,
796,
14631,
50,
313,
18657,
320,
397,
1600,
366,
44,
10875,
929,
343,
615,
343,
2430,
35155,
343,
452,
320,
397,
290,
545,
7959,
320,
397,
33116,
198,
220,
220,
220,
351,
62,
27218,
62,
521,
3736,
796,
366,
13159,
62,
49257,
1417,
1600,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
9630,
62,
4475,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
8024,
796,
366,
19121,
62,
8094,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4873,
1298,
366,
40082,
1600,
198,
220,
220,
220,
220,
220,
366,
22872,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
10366,
4267,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8048,
338,
14027,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
50,
39423,
2685,
4369,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
39390,
4890,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3099,
368,
265,
2770,
10040,
11,
10717,
2685,
23319,
20352,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
918,
282,
4369,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
75,
1428,
4369,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
38345,
12,
38363,
23760,
11916,
357,
3955,
2389,
8,
1298,
657,
13,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
35170,
10900,
33589,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
39,
3824,
14,
39338,
1298,
657,
13,
16,
11,
5512,
5512,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
44386,
18183,
35,
564,
246,
8929,
2526,
447,
247,
20812,
357,
19815,
46331,
284,
307,
5447,
611,
14,
12518,
1366,
37441,
3379,
8,
198,
220,
1303,
1029,
62,
19121,
62,
1073,
71,
419,
62,
77,
11994,
67,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
1303,
220,
220,
1029,
62,
19121,
62,
1073,
71,
419,
62,
77,
11994,
67,
62,
40148,
11,
198,
220,
1303,
220,
220,
1022,
796,
685,
35012,
62,
9688,
11,
6376,
62,
4475,
4357,
198,
220,
1303,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
1303,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
1303,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
1303,
10612,
198,
220,
220,
198,
220,
22492,
1475,
4717,
9987,
198,
220,
220,
198,
220,
44386,
23939,
286,
8668,
10470,
9217,
326,
612,
318,
7628,
2138,
621,
2526,
286,
38495,
422,
10280,
198,
220,
1303,
220,
220,
357,
1662,
3058,
1744,
284,
8160,
14,
8189,
8,
198,
220,
220,
198,
220,
44386,
9394,
557,
4436,
5612,
329,
7375,
11008,
12,
1129,
198,
220,
22492,
41354,
428,
1366,
300,
3775,
2157,
262,
20094,
48063,
14,
33407,
1366,
523,
743,
307,
4814,
198,
220,
39849,
312,
62,
49257,
62,
324,
3411,
62,
4475,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
39849,
312,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
9630,
62,
4475,
532,
642,
1528,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4475,
1298,
19779,
451,
11318,
1298,
366,
9630,
62,
4475,
532,
642,
1528,
1600,
366,
42861,
1298,
366,
9630,
62,
4475,
25719,
198,
220,
220,
220,
220,
220,
366,
4873,
1298,
366,
403,
6933,
1600,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
2713,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
44386,
968,
34885,
11863,
9079,
5734,
329,
262,
4542,
286,
7375,
11008,
12,
1129,
7460,
198,
220,
1303,
220,
220,
357,
1662,
3058,
1744,
284,
8160,
14,
8189,
8,
198,
220,
220,
198,
220,
44386,
8990,
21990,
1342,
621,
2319,
10025,
198,
220,
1303,
220,
220,
357,
1662,
3058,
1744,
284,
8160,
14,
8189,
8,
198,
220,
220,
198,
220,
44386,
8990,
9722,
739,
1105,
812,
198,
220,
2479,
796,
3871,
13,
496,
62,
292,
62,
1659,
7,
198,
220,
220,
220,
366,
9630,
62,
4475,
1600,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4873,
1298,
366,
40082,
1600,
198,
220,
220,
220,
220,
220,
366,
600,
1298,
19779,
17080,
3890,
1298,
366,
39748,
62,
1095,
25719,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1,
1058,
657,
13,
24,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
44386,
29454,
45086,
40545,
6317,
284,
262,
4075,
15938,
393,
284,
597,
286,
262,
2859,
541,
2334,
286,
264,
313,
18657,
320,
397,
198,
220,
1303,
220,
220,
357,
1662,
3058,
1744,
284,
8160,
14,
8189,
8,
198,
220,
220,
198,
220,
220,
198,
220,
220,
198,
220,
1303,
34677,
45698,
42,
10863,
2606,
3705,
13498,
198,
220,
220,
198,
220,
22492,
5588,
338,
14027,
198,
220,
21838,
62,
1837,
358,
5998,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
21838,
62,
1837,
358,
5998,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
21838,
62,
1837,
358,
5998,
62,
77,
11994,
67,
62,
291,
67,
940,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
21838,
62,
1837,
358,
5998,
62,
77,
11994,
67,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
21838,
62,
1837,
358,
5998,
62,
77,
11994,
67,
796,
3871,
13,
39504,
62,
1659,
7203,
30371,
62,
1837,
358,
5998,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
366,
30371,
62,
1837,
358,
5998,
62,
77,
11994,
67,
62,
291,
67,
940,
12340,
220,
198,
220,
220,
198,
220,
22492,
32181,
293,
2685,
4369,
198,
220,
6639,
293,
62,
3846,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
6639,
293,
62,
3846,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
6639,
293,
62,
3846,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
291,
67,
940,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
6639,
293,
62,
3846,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
6639,
293,
62,
3846,
62,
67,
786,
589,
62,
77,
11994,
67,
796,
3871,
13,
39504,
62,
1659,
7203,
82,
39423,
62,
3846,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
366,
82,
39423,
62,
3846,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
291,
67,
940,
12340,
220,
198,
220,
220,
198,
220,
22492,
15831,
4890,
198,
220,
4890,
62,
44813,
8635,
306,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
12082,
62,
19815,
417,
1023,
7,
198,
220,
220,
220,
220,
220,
1729,
62,
3099,
368,
265,
2770,
62,
48870,
62,
44813,
8635,
306,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
220,
220,
12317,
62,
48870,
62,
44813,
8635,
306,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
220,
220,
34696,
62,
6335,
72,
18952,
62,
44813,
8635,
306,
62,
16184,
12657,
62,
40148,
198,
220,
220,
220,
10612,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
22492,
9398,
368,
265,
2770,
10040,
198,
220,
387,
368,
265,
404,
78,
1155,
291,
62,
927,
62,
3846,
62,
7645,
15060,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
387,
368,
265,
404,
78,
1155,
291,
62,
927,
62,
3846,
62,
7645,
15060,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
387,
368,
265,
404,
78,
1155,
291,
62,
927,
62,
3846,
62,
7645,
15060,
62,
77,
11994,
67,
62,
291,
67,
940,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
387,
368,
265,
404,
78,
1155,
291,
62,
927,
62,
3846,
62,
7645,
15060,
62,
77,
11994,
67,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
387,
368,
265,
404,
78,
1155,
291,
62,
927,
62,
3846,
62,
7645,
15060,
62,
77,
11994,
67,
62,
404,
6359,
19,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
1676,
771,
942,
796,
387,
368,
265,
404,
78,
1155,
291,
62,
927,
62,
3846,
62,
7645,
15060,
62,
77,
11994,
67,
62,
404,
6359,
19,
62,
40148,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4475,
1298,
19779,
451,
11318,
1298,
366,
42334,
12,
2999,
12,
486,
25719,
198,
220,
220,
220,
220,
220,
366,
4873,
1298,
366,
11201,
35470,
62,
24988,
589,
1600,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
486,
11,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
1303,
387,
368,
265,
2770,
62,
7617,
570,
16183,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
1303,
220,
220,
387,
368,
265,
2770,
62,
7617,
570,
16183,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
1303,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
1303,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
1303,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
1303,
220,
220,
1303,
261,
62,
273,
62,
19052,
796,
366,
437,
62,
4475,
1600,
198,
220,
1303,
10612,
198,
220,
220,
198,
220,
387,
368,
265,
2770,
62,
7617,
570,
16183,
62,
77,
11994,
67,
62,
291,
67,
940,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
387,
368,
265,
2770,
62,
7617,
570,
16183,
62,
77,
11994,
67,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
387,
368,
265,
2770,
62,
67,
786,
589,
62,
77,
11994,
67,
796,
3871,
13,
39504,
62,
1659,
7203,
3099,
368,
265,
404,
78,
1155,
291,
62,
927,
62,
3846,
62,
7645,
15060,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3099,
368,
265,
404,
78,
1155,
291,
62,
927,
62,
3846,
62,
7645,
15060,
62,
77,
11994,
67,
62,
291,
67,
940,
1600,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3099,
368,
265,
404,
78,
1155,
291,
62,
927,
62,
3846,
62,
7645,
15060,
62,
77,
11994,
67,
62,
404,
6359,
19,
1600,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1,
3099,
368,
265,
2770,
62,
7617,
570,
16183,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3099,
368,
265,
2770,
62,
7617,
570,
16183,
62,
77,
11994,
67,
62,
291,
67,
940,
12340,
220,
198,
220,
220,
198,
220,
220,
198,
220,
22492,
7152,
282,
4369,
198,
220,
269,
74,
67,
62,
14247,
62,
20,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
269,
74,
67,
62,
14247,
62,
20,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
269,
74,
67,
62,
14247,
62,
20,
62,
77,
11994,
67,
62,
291,
67,
940,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
269,
74,
67,
62,
14247,
62,
20,
62,
77,
11994,
67,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
269,
74,
67,
62,
14247,
62,
20,
62,
77,
11994,
67,
796,
3871,
13,
39504,
62,
1659,
7203,
694,
67,
62,
14247,
62,
20,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
366,
694,
67,
62,
14247,
62,
20,
62,
77,
11994,
67,
62,
291,
67,
940,
12340,
220,
198,
220,
220,
198,
220,
22492,
45036,
4369,
198,
220,
14383,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
269,
74,
67,
62,
14247,
62,
20,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
14383,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
291,
67,
940,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
269,
74,
67,
62,
14247,
62,
20,
62,
77,
11994,
67,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
14383,
62,
67,
786,
589,
62,
77,
11994,
67,
796,
3871,
13,
39504,
62,
1659,
7203,
75,
1428,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
366,
75,
1428,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
291,
67,
940,
12340,
220,
198,
220,
220,
198,
220,
22492,
9543,
1726,
12,
38363,
23760,
11916,
357,
3955,
2389,
8,
198,
220,
545,
312,
62,
77,
11994,
67,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
14873,
46331,
796,
12082,
62,
19815,
417,
1023,
7,
320,
6199,
418,
7211,
411,
415,
62,
30349,
82,
62,
67,
9132,
62,
40148,
11,
16217,
418,
7211,
411,
415,
62,
30349,
82,
62,
16184,
12657,
62,
40148,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12886,
62,
1706,
1868,
62,
30349,
82,
62,
67,
9132,
62,
40148,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12886,
62,
1706,
1868,
62,
30349,
82,
62,
16184,
12657,
62,
40148,
828,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
1064,
62,
12957,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
22492,
21087,
10900,
33589,
198,
220,
16217,
418,
929,
2234,
62,
77,
11994,
67,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
16217,
418,
929,
2234,
62,
77,
11994,
67,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
1064,
62,
12957,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
22492,
10498,
14,
32,
47954,
198,
220,
289,
452,
62,
1698,
82,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
289,
452,
62,
1698,
82,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
289,
452,
62,
1698,
82,
62,
77,
11994,
67,
62,
291,
67,
940,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
289,
452,
62,
1698,
82,
62,
77,
11994,
67,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
289,
452,
62,
1698,
82,
62,
77,
11994,
67,
796,
3871,
13,
39504,
62,
1659,
7203,
71,
452,
62,
1698,
82,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
366,
71,
452,
62,
1698,
82,
62,
77,
11994,
67,
62,
291,
67,
940,
12340,
198,
220,
220,
198,
220,
22492,
15831,
1618,
23319,
198,
220,
4735,
62,
9971,
62,
7645,
15060,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
4735,
62,
9971,
62,
7645,
15060,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
4735,
62,
9971,
62,
7645,
15060,
62,
77,
11994,
67,
62,
404,
6359,
19,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
1676,
771,
942,
796,
4735,
62,
9971,
62,
7645,
15060,
62,
77,
11994,
67,
62,
404,
6359,
19,
62,
40148,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4475,
1298,
19779,
451,
11318,
1298,
366,
42334,
12,
2999,
12,
486,
25719,
198,
220,
220,
220,
220,
220,
366,
4873,
1298,
366,
11201,
35470,
62,
24988,
589,
1600,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
486,
11,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
4735,
62,
9971,
62,
7645,
15060,
62,
77,
11994,
67,
796,
3871,
13,
39504,
62,
1659,
7203,
39390,
62,
9971,
62,
7645,
15060,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
366,
39390,
62,
9971,
62,
7645,
15060,
62,
77,
11994,
67,
62,
404,
6359,
19,
12340,
220,
198,
220,
220,
198,
220,
22492,
14423,
30232,
3403,
198,
220,
220,
198,
220,
44386,
20401,
46225,
198,
220,
3294,
62,
82,
31399,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
3294,
62,
82,
31399,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
3294,
62,
82,
31399,
62,
77,
11994,
67,
62,
291,
67,
940,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
3294,
62,
82,
31399,
62,
77,
11994,
67,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
3294,
62,
82,
31399,
62,
77,
11994,
67,
796,
3871,
13,
39504,
62,
1659,
7203,
48101,
62,
82,
31399,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
366,
48101,
62,
82,
31399,
62,
77,
11994,
67,
62,
291,
67,
940,
12340,
220,
198,
220,
220,
198,
220,
44386,
12533,
11943,
505,
4369,
198,
220,
5584,
62,
710,
333,
505,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
5584,
62,
710,
333,
505,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
5584,
62,
710,
333,
505,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
291,
67,
940,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
5584,
62,
710,
333,
505,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
5584,
62,
710,
333,
505,
62,
67,
786,
589,
62,
77,
11994,
67,
796,
3871,
13,
39504,
62,
1659,
7203,
76,
20965,
62,
710,
333,
505,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
366,
76,
20965,
62,
710,
333,
505,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
291,
67,
940,
12340,
198,
220,
220,
198,
220,
44386,
2011,
459,
831,
544,
9067,
271,
198,
220,
616,
459,
831,
544,
62,
70,
16956,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
616,
459,
831,
544,
62,
70,
16956,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
616,
459,
831,
544,
62,
70,
16956,
62,
77,
11994,
67,
62,
291,
67,
940,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
616,
459,
831,
544,
62,
70,
16956,
62,
77,
11994,
67,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
616,
459,
831,
544,
62,
70,
16956,
62,
77,
11994,
67,
796,
3871,
13,
39504,
62,
1659,
7203,
1820,
459,
831,
544,
62,
70,
16956,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
366,
1820,
459,
831,
544,
62,
70,
16956,
62,
77,
11994,
67,
62,
291,
67,
940,
12340,
198,
220,
220,
198,
220,
44386,
40644,
447,
247,
82,
4369,
198,
220,
10988,
27288,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
16184,
12657,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
10988,
27288,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
16184,
12657,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
4475,
1600,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
10612,
198,
220,
220,
198,
220,
10988,
27288,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
291,
67,
940,
796,
3871,
13,
324,
3291,
62,
1462,
62,
49257,
7,
198,
220,
220,
220,
8024,
796,
366,
4475,
62,
324,
3291,
1600,
198,
220,
220,
220,
351,
62,
27218,
62,
47356,
4629,
796,
10988,
27288,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
291,
67,
940,
62,
40148,
11,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
3128,
62,
18982,
796,
366,
26314,
26314,
12,
12038,
12,
16458,
1600,
198,
220,
10612,
198,
220,
220,
198,
220,
10988,
27288,
62,
67,
786,
589,
62,
77,
11994,
67,
796,
3871,
13,
39504,
62,
1659,
7203,
20088,
889,
27288,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
16184,
12657,
1600,
366,
20088,
889,
27288,
62,
67,
786,
589,
62,
77,
11994,
67,
62,
291,
67,
940,
12340,
198,
220,
220,
198,
220,
220,
198,
220,
220,
198,
1303,
7852,
1268,
20151,
14,
39429,
49656,
31300,
2149,
7375,
53,
33604,
29462,
13498,
198,
220,
220,
198,
220,
22492,
14419,
198,
220,
1714,
796,
3871,
13,
8044,
7,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4873,
1298,
366,
40082,
1600,
198,
220,
220,
220,
220,
220,
366,
22872,
1298,
19779,
10366,
4267,
1298,
19779,
44,
1298,
657,
13,
2920,
11,
366,
37,
1298,
657,
13,
4349,
92,
5512,
198,
220,
220,
220,
1782,
198,
220,
10612,
198,
220,
220,
198,
220,
22492,
48021,
414,
198,
220,
26289,
62,
19795,
271,
796,
3871,
13,
4480,
62,
27218,
62,
47367,
62,
31534,
7,
198,
220,
220,
220,
26289,
62,
19795,
271,
62,
40148,
11,
198,
220,
220,
220,
8024,
796,
366,
22872,
1600,
198,
220,
220,
220,
1064,
62,
12957,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
2291,
62,
4475,
62,
1659,
62,
15699,
796,
10352,
11,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
22872,
1298,
19779,
10366,
4267,
1298,
19779,
16,
1298,
657,
13,
17,
11,
366,
17,
1298,
657,
13,
17,
11,
366,
18,
1298,
657,
13,
17,
11,
366,
19,
1298,
657,
13,
17,
11,
366,
20,
1298,
657,
13,
17,
92,
5512,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
2425,
11,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
26289,
62,
82,
385,
796,
3871,
13,
4480,
62,
38546,
414,
62,
6738,
62,
82,
385,
7,
198,
220,
220,
220,
8024,
796,
366,
8094,
62,
21,
1600,
220,
220,
198,
220,
220,
220,
779,
62,
1712,
62,
69,
46018,
62,
8189,
796,
6407,
11,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
22872,
1298,
19779,
10366,
4267,
1298,
19779,
16,
1298,
657,
13,
17,
11,
366,
17,
1298,
657,
13,
17,
11,
366,
18,
1298,
657,
13,
17,
11,
366,
19,
1298,
657,
13,
17,
11,
366,
20,
1298,
657,
13,
17,
92,
5512,
198,
220,
220,
220,
220,
220,
366,
1939,
1704,
1298,
657,
13,
23,
11,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
22492,
12901,
286,
3294,
28922,
198,
220,
545,
67,
796,
3871,
13,
66,
47467,
1417,
62,
292,
7,
198,
220,
220,
220,
19779,
15,
1298,
366,
7206,
38865,
1600,
198,
220,
220,
220,
220,
220,
366,
16,
1298,
37227,
9630,
62,
1659,
62,
48101,
62,
10378,
380,
10473,
18189,
16,
5357,
6376,
62,
1659,
62,
48101,
62,
10378,
380,
10473,
1279,
39093,
2598,
9,
16,
14,
20,
15931,
1600,
198,
220,
220,
220,
220,
220,
366,
17,
1298,
37227,
9630,
62,
1659,
62,
48101,
62,
10378,
380,
10473,
18189,
39093,
2598,
9,
16,
14,
20,
5357,
6376,
62,
1659,
62,
48101,
62,
10378,
380,
10473,
1279,
39093,
2598,
9,
17,
14,
20,
15931,
1600,
198,
220,
220,
220,
220,
220,
366,
18,
1298,
37227,
9630,
62,
1659,
62,
48101,
62,
10378,
380,
10473,
18189,
39093,
2598,
9,
17,
14,
20,
5357,
6376,
62,
1659,
62,
48101,
62,
10378,
380,
10473,
1279,
39093,
2598,
9,
18,
14,
20,
15931,
1600,
198,
220,
220,
220,
220,
220,
366,
19,
1298,
37227,
9630,
62,
1659,
62,
48101,
62,
10378,
380,
10473,
18189,
39093,
2598,
9,
18,
14,
20,
5357,
6376,
62,
1659,
62,
48101,
62,
10378,
380,
10473,
1279,
39093,
2598,
9,
19,
14,
20,
15931,
1600,
198,
220,
220,
220,
220,
220,
366,
20,
1298,
37227,
9630,
62,
1659,
62,
48101,
62,
10378,
380,
10473,
18189,
39093,
2598,
9,
19,
14,
20,
13538,
1600,
198,
220,
220,
220,
8964,
198,
220,
220,
220,
6376,
62,
1659,
62,
48101,
62,
10378,
380,
10473,
796,
3871,
13,
21975,
62,
292,
62,
1659,
7,
198,
220,
220,
220,
220,
220,
366,
9630,
62,
4475,
1600,
198,
220,
220,
220,
220,
220,
8024,
796,
366,
9630,
62,
1659,
62,
48101,
62,
10378,
380,
10473,
1600,
198,
220,
220,
220,
220,
220,
2835,
62,
1462,
62,
710,
12423,
796,
1802,
11,
198,
220,
220,
220,
10612,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4873,
1298,
366,
40082,
1600,
198,
220,
220,
220,
220,
220,
366,
22872,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
10366,
4267,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15,
1298,
657,
13,
486,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
16,
1298,
657,
13,
1238,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
17,
1298,
657,
13,
1238,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
18,
1298,
657,
13,
1238,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
19,
1298,
657,
13,
1238,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
20,
1298,
657,
13,
1129,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
5512,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
22492,
17718,
532,
18183,
4492,
860,
7652,
198,
220,
3814,
62,
77,
11994,
796,
3871,
13,
33736,
62,
39541,
62,
292,
62,
1659,
7,
198,
220,
220,
220,
366,
9630,
62,
4475,
1600,
198,
220,
220,
220,
8024,
796,
366,
31381,
16,
62,
36996,
62,
3672,
1600,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4873,
1298,
366,
40082,
1600,
198,
220,
220,
220,
220,
220,
366,
22872,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
10366,
4267,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14157,
3687,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14157,
2688,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
56,
29918,
290,
383,
367,
4494,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
25234,
47989,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15045,
47989,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
25234,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
23421,
1298,
657,
13,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14942,
2688,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14942,
3687,
1298,
657,
13,
16,
11,
5512,
5512,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
3814,
62,
66,
709,
312,
62,
490,
1758,
48063,
796,
3871,
13,
4480,
62,
66,
709,
312,
62,
490,
1758,
48063,
7,
198,
220,
220,
220,
1303,
4480,
62,
27218,
62,
14269,
2664,
796,
14631,
4677,
305,
1079,
1600,
366,
51,
21731,
13248,
33116,
198,
220,
220,
220,
351,
62,
27218,
62,
490,
1758,
48063,
796,
14631,
50,
313,
18657,
320,
397,
1600,
366,
44,
10875,
929,
343,
615,
343,
1600,
366,
35155,
343,
452,
320,
397,
290,
545,
7959,
320,
397,
33116,
198,
220,
220,
220,
351,
62,
27218,
62,
521,
3736,
796,
366,
13159,
62,
49257,
1417,
1600,
198,
220,
220,
220,
319,
62,
273,
62,
8499,
796,
366,
9630,
62,
4475,
1600,
198,
220,
220,
220,
1064,
62,
11085,
62,
15699,
62,
259,
62,
41007,
796,
6407,
11,
198,
220,
220,
220,
8024,
796,
366,
36996,
1600,
198,
220,
220,
220,
1441,
62,
1069,
806,
602,
796,
1391,
198,
220,
220,
220,
220,
220,
366,
4873,
1298,
366,
40082,
1600,
198,
220,
220,
220,
220,
220,
366,
22872,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
10366,
4267,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14157,
3687,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14157,
2688,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
56,
29918,
290,
383,
367,
4494,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
25234,
47989,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15045,
47989,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
25234,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
23421,
1298,
657,
13,
17,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14942,
2688,
1298,
657,
13,
16,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14942,
3687,
1298,
657,
13,
16,
11,
5512,
5512,
198,
220,
220,
220,
8964,
198,
220,
10612,
198,
220,
220,
198,
220,
22492,
327,
12740,
5842,
14,
19505,
198,
220,
220,
198,
220,
220,
198,
220,
220,
198,
220,
220,
198,
220,
220,
198,
8,
628,
198
] | 2.292791 | 9,447 |
import sqlalchemy
from contextlib import contextmanager
from typing import List, Iterator, Optional, Union, Tuple
import logging
from google.cloud.bigquery.dbapi.connection import Connection
from google.cloud.bigquery.client import Client
from google.cloud.bigquery.job import ExtractJobConfig
from records_mover.db.unloader import Unloader
from records_mover.records.records_format import BaseRecordsFormat, AvroRecordsFormat
from records_mover.url.base import BaseDirectoryUrl
from records_mover.url.resolver import UrlResolver
from records_mover.records.unload_plan import RecordsUnloadPlan
from records_mover.records.records_directory import RecordsDirectory
from records_mover.db.errors import NoTemporaryBucketConfiguration
logger = logging.getLogger(__name__)
| [
11748,
44161,
282,
26599,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
6738,
19720,
1330,
7343,
11,
40806,
1352,
11,
32233,
11,
4479,
11,
309,
29291,
198,
11748,
18931,
198,
6738,
23645,
13,
17721,
13,
14261,
22766,
13,
9945,
15042,
13,
38659,
1330,
26923,
198,
6738,
23645,
13,
17721,
13,
14261,
22766,
13,
16366,
1330,
20985,
198,
6738,
23645,
13,
17721,
13,
14261,
22766,
13,
21858,
1330,
29677,
33308,
16934,
198,
6738,
4406,
62,
76,
2502,
13,
9945,
13,
403,
29356,
1330,
791,
29356,
198,
6738,
4406,
62,
76,
2502,
13,
8344,
3669,
13,
8344,
3669,
62,
18982,
1330,
7308,
6690,
3669,
26227,
11,
5184,
305,
6690,
3669,
26227,
198,
6738,
4406,
62,
76,
2502,
13,
6371,
13,
8692,
1330,
7308,
43055,
28165,
198,
6738,
4406,
62,
76,
2502,
13,
6371,
13,
411,
14375,
1330,
8799,
75,
4965,
14375,
198,
6738,
4406,
62,
76,
2502,
13,
8344,
3669,
13,
403,
2220,
62,
11578,
1330,
13407,
3118,
2220,
20854,
198,
6738,
4406,
62,
76,
2502,
13,
8344,
3669,
13,
8344,
3669,
62,
34945,
1330,
13407,
43055,
198,
6738,
4406,
62,
76,
2502,
13,
9945,
13,
48277,
1330,
1400,
12966,
5551,
33,
38811,
38149,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628
] | 3.697115 | 208 |
common_config = {
}
train_config = {
"dataset_name": "matterport",
"model_name": "ResNet18SkipConnection",
"in_channel": 9,
"device_ids": [0],
"seed": 7122,
"num_workers": 8,
"mode": "train",
"train_path": "/tmp2/tsunghan/new_matterport/v1",
"lr": 1e-4,
"batch_size": 8,
"loss_func": {('depth(L2)', 'depth_L2_loss', 1.)},
"load_model_path": None,
"param_only": False,
"validation": True,
"valid_path": "/tmp2/tsunghan/new_matterport/v1",
"epoches": 100,
"save_prefix": "",
}
test_config = {
"dataset_name": "matterport",
"model_name": "ResNet18SkipConnection",
"in_channel": 9,
"device_ids": [0, 1, 2, 3],
"seed": 7122,
"num_workers": 8,
"mode": "test",
"test_path": "/tmp2/tsunghan/new_matterport/v1",
"lr": 1e-4,
"batch_size": 1,
"loss_func": {('depth(L2)', 'depth_L2_loss', 1.), ('img_grad', 'img_grad_loss', 1e-3)},
"load_model_path": "/tmp2/tsunghan/twcc_data/twcc_experience_resnet/matterport_ResNet18SkipConnection_b10_lr0.0001_/epoch_13.pt",
"param_only": True,
"epoches": 100,
"save_prefix": "resnet",
"output":"/tmp2/tsunghan/experiment_result/mat_npy/r18sc_epo13",
}
| [
198,
11321,
62,
11250,
796,
1391,
198,
220,
220,
220,
1782,
198,
198,
27432,
62,
11250,
796,
1391,
198,
220,
220,
220,
366,
19608,
292,
316,
62,
3672,
1298,
366,
47635,
634,
1600,
198,
220,
220,
220,
366,
19849,
62,
3672,
1298,
366,
4965,
7934,
1507,
50232,
32048,
1600,
198,
220,
220,
220,
366,
259,
62,
17620,
1298,
860,
11,
198,
220,
220,
220,
366,
25202,
62,
2340,
1298,
685,
15,
4357,
198,
220,
220,
220,
366,
28826,
1298,
767,
18376,
11,
628,
220,
220,
220,
366,
22510,
62,
22896,
1298,
807,
11,
198,
220,
220,
220,
366,
14171,
1298,
366,
27432,
1600,
198,
220,
220,
220,
366,
27432,
62,
6978,
1298,
12813,
22065,
17,
14,
912,
403,
6064,
14,
3605,
62,
47635,
634,
14,
85,
16,
1600,
198,
220,
220,
220,
366,
14050,
1298,
352,
68,
12,
19,
11,
198,
220,
220,
220,
366,
43501,
62,
7857,
1298,
807,
11,
198,
220,
220,
220,
366,
22462,
62,
20786,
1298,
1391,
10786,
18053,
7,
43,
17,
8,
3256,
705,
18053,
62,
43,
17,
62,
22462,
3256,
352,
2014,
5512,
198,
220,
220,
220,
366,
2220,
62,
19849,
62,
6978,
1298,
6045,
11,
198,
220,
220,
220,
366,
17143,
62,
8807,
1298,
10352,
11,
198,
220,
220,
220,
366,
12102,
341,
1298,
6407,
11,
198,
220,
220,
220,
366,
12102,
62,
6978,
1298,
12813,
22065,
17,
14,
912,
403,
6064,
14,
3605,
62,
47635,
634,
14,
85,
16,
1600,
198,
220,
220,
220,
366,
538,
420,
956,
1298,
1802,
11,
198,
220,
220,
220,
366,
21928,
62,
40290,
1298,
366,
1600,
198,
92,
198,
198,
9288,
62,
11250,
796,
1391,
198,
220,
220,
220,
366,
19608,
292,
316,
62,
3672,
1298,
366,
47635,
634,
1600,
198,
220,
220,
220,
366,
19849,
62,
3672,
1298,
366,
4965,
7934,
1507,
50232,
32048,
1600,
198,
220,
220,
220,
366,
259,
62,
17620,
1298,
860,
11,
198,
220,
220,
220,
366,
25202,
62,
2340,
1298,
685,
15,
11,
352,
11,
362,
11,
513,
4357,
198,
220,
220,
220,
366,
28826,
1298,
767,
18376,
11,
198,
220,
220,
220,
366,
22510,
62,
22896,
1298,
807,
11,
628,
220,
220,
220,
366,
14171,
1298,
366,
9288,
1600,
198,
220,
220,
220,
366,
9288,
62,
6978,
1298,
12813,
22065,
17,
14,
912,
403,
6064,
14,
3605,
62,
47635,
634,
14,
85,
16,
1600,
198,
220,
220,
220,
366,
14050,
1298,
352,
68,
12,
19,
11,
198,
220,
220,
220,
366,
43501,
62,
7857,
1298,
352,
11,
198,
220,
220,
220,
366,
22462,
62,
20786,
1298,
1391,
10786,
18053,
7,
43,
17,
8,
3256,
705,
18053,
62,
43,
17,
62,
22462,
3256,
352,
12179,
19203,
9600,
62,
9744,
3256,
705,
9600,
62,
9744,
62,
22462,
3256,
352,
68,
12,
18,
8,
5512,
198,
220,
220,
220,
366,
2220,
62,
19849,
62,
6978,
1298,
12813,
22065,
17,
14,
912,
403,
6064,
14,
4246,
535,
62,
7890,
14,
4246,
535,
62,
23100,
1240,
62,
411,
3262,
14,
47635,
634,
62,
4965,
7934,
1507,
50232,
32048,
62,
65,
940,
62,
14050,
15,
13,
18005,
62,
14,
538,
5374,
62,
1485,
13,
457,
1600,
198,
220,
220,
220,
366,
17143,
62,
8807,
1298,
6407,
11,
198,
220,
220,
220,
366,
538,
420,
956,
1298,
1802,
11,
198,
220,
220,
220,
366,
21928,
62,
40290,
1298,
366,
411,
3262,
1600,
198,
220,
220,
220,
366,
22915,
15473,
22065,
17,
14,
912,
403,
6064,
14,
23100,
3681,
62,
20274,
14,
6759,
62,
77,
9078,
14,
81,
1507,
1416,
62,
538,
78,
1485,
1600,
198,
92,
198
] | 2.098107 | 581 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 17-8-13 上午11:33
# @Author : Tom.Lee
# @CopyRight : 2016-2017 OpenBridge by yihecloud
# @File : demo.py
# @Product : PyCharm
# @Docs :
# @Source :
import os
from apscheduler.schedulers.blocking import BlockingScheduler
if __name__ == '__main__':
scheduler = BlockingScheduler()
scheduler.add_job('sys:stdout.write', 'interval', seconds=3, args=['tick ...\n'])
print('Press Ctrl+{0} to exit'.format('Break' if os.name == 'nt' else 'C'))
try:
scheduler.start()
except (KeyboardInterrupt, SystemExit):
pass
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
7575,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
1596,
12,
23,
12,
1485,
220,
41468,
39355,
230,
1157,
25,
2091,
198,
2,
2488,
13838,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
4186,
13,
24338,
198,
2,
2488,
29881,
11028,
220,
220,
220,
220,
220,
1058,
1584,
12,
5539,
4946,
37385,
416,
331,
72,
258,
17721,
198,
2,
2488,
8979,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
13605,
13,
9078,
198,
2,
2488,
15667,
220,
220,
220,
220,
220,
220,
220,
1058,
9485,
1925,
1670,
198,
2,
2488,
23579,
82,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
220,
198,
2,
2488,
7416,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
220,
628,
198,
11748,
28686,
198,
198,
6738,
257,
862,
1740,
18173,
13,
1416,
704,
377,
364,
13,
41938,
1330,
1086,
8629,
50,
1740,
18173,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
6038,
18173,
796,
1086,
8629,
50,
1740,
18173,
3419,
198,
220,
220,
220,
6038,
18173,
13,
2860,
62,
21858,
10786,
17597,
25,
19282,
448,
13,
13564,
3256,
705,
3849,
2100,
3256,
4201,
28,
18,
11,
26498,
28,
17816,
42298,
2644,
59,
77,
6,
12962,
198,
220,
220,
220,
3601,
10786,
13800,
19212,
10,
90,
15,
92,
284,
8420,
4458,
18982,
10786,
31737,
6,
611,
28686,
13,
3672,
6624,
705,
429,
6,
2073,
705,
34,
6,
4008,
628,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6038,
18173,
13,
9688,
3419,
198,
220,
220,
220,
2845,
357,
9218,
3526,
9492,
3622,
11,
4482,
30337,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
198
] | 2.135922 | 309 |
from __future__ import absolute_import
import atexit
from . import Users
from . import Devices
from . import Collections
from . import Messaging
from . import Code
from .Developers import * # allows you to import Developer from ClearBladeCore
from . import cbLogs
#############
# USERS #
#############
###############
# DEVICES #
###############
############
# DATA #
############
############
# MQTT #
############
############
# CODE #
############
| [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
11748,
379,
37023,
198,
6738,
764,
1330,
18987,
198,
6738,
764,
1330,
29362,
198,
6738,
764,
1330,
50004,
198,
6738,
764,
1330,
10626,
3039,
198,
6738,
764,
1330,
6127,
198,
6738,
764,
19246,
364,
1330,
1635,
220,
1303,
3578,
345,
284,
1330,
23836,
422,
11459,
47520,
14055,
198,
6738,
764,
1330,
269,
65,
11187,
82,
628,
198,
220,
220,
220,
1303,
7804,
4242,
198,
220,
220,
220,
1303,
220,
220,
1294,
4877,
220,
220,
1303,
198,
220,
220,
220,
1303,
7804,
4242,
628,
220,
220,
220,
1303,
7804,
4242,
2235,
198,
220,
220,
220,
1303,
220,
220,
5550,
53,
34444,
220,
220,
1303,
198,
220,
220,
220,
1303,
7804,
4242,
2235,
628,
220,
220,
220,
1303,
7804,
21017,
198,
220,
220,
220,
1303,
220,
220,
42865,
220,
220,
1303,
198,
220,
220,
220,
1303,
7804,
21017,
628,
220,
220,
220,
1303,
7804,
21017,
198,
220,
220,
220,
1303,
220,
220,
337,
48,
15751,
220,
220,
1303,
198,
220,
220,
220,
1303,
7804,
21017,
628,
220,
220,
220,
1303,
7804,
21017,
198,
220,
220,
220,
1303,
220,
220,
42714,
220,
220,
1303,
198,
220,
220,
220,
1303,
7804,
21017,
628
] | 2.722222 | 198 |
if __name__ == '__main__':
__main__()
| [
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
11593,
12417,
834,
3419,
198
] | 2.142857 | 21 |
""" CRUD class for Projects app """
from crudbuilder.abstract import BaseCrudBuilder
from .models.project import Project
from .models.stakeholder import Stakeholder
class ProjectCrud(BaseCrudBuilder):
""" CRUD class for Project model """
model = Project
search_fields = ["id", "name", "description"]
tables2_fields = ("name", "description", 'is_closed')
tables2_css_class = "table table-bordered table-condensed"
login_required = True
permission_required = True
# tables2_pagination = 20 # default is 10
modelform_excludes = ['created']
# permissions = {}
# custom_templates = {}
class StakeholderCrud(BaseCrudBuilder):
""" CRUD class for Stakeholder model """
model = Stakeholder
search_fields = ["full_name", ]
tables2_fields = ("full_name", "organization")
tables2_css_class = "table table-bordered table-condensed"
login_required = True
permission_required = True
modelform_excludes = ['created']
| [
37811,
8740,
8322,
1398,
329,
29898,
598,
37227,
198,
6738,
1067,
463,
38272,
13,
397,
8709,
1330,
7308,
13916,
463,
32875,
198,
198,
6738,
764,
27530,
13,
16302,
1330,
4935,
198,
6738,
764,
27530,
13,
301,
539,
13829,
1330,
520,
539,
13829,
628,
198,
4871,
4935,
13916,
463,
7,
14881,
13916,
463,
32875,
2599,
198,
220,
220,
220,
37227,
8740,
8322,
1398,
329,
4935,
2746,
37227,
198,
220,
220,
220,
2746,
796,
4935,
198,
220,
220,
220,
2989,
62,
25747,
796,
14631,
312,
1600,
366,
3672,
1600,
366,
11213,
8973,
198,
220,
220,
220,
8893,
17,
62,
25747,
796,
5855,
3672,
1600,
366,
11213,
1600,
705,
271,
62,
20225,
11537,
198,
220,
220,
220,
8893,
17,
62,
25471,
62,
4871,
796,
366,
11487,
3084,
12,
65,
24071,
3084,
12,
17561,
15385,
1,
198,
220,
220,
220,
17594,
62,
35827,
796,
6407,
198,
220,
220,
220,
7170,
62,
35827,
796,
6407,
198,
220,
220,
220,
1303,
8893,
17,
62,
79,
363,
1883,
796,
1160,
220,
1303,
4277,
318,
838,
198,
220,
220,
220,
2746,
687,
62,
1069,
13955,
796,
37250,
25598,
20520,
628,
220,
220,
220,
1303,
21627,
796,
23884,
198,
220,
220,
220,
1303,
2183,
62,
11498,
17041,
796,
23884,
628,
198,
4871,
520,
539,
13829,
13916,
463,
7,
14881,
13916,
463,
32875,
2599,
198,
220,
220,
220,
37227,
8740,
8322,
1398,
329,
520,
539,
13829,
2746,
37227,
198,
220,
220,
220,
2746,
796,
520,
539,
13829,
198,
220,
220,
220,
2989,
62,
25747,
796,
14631,
12853,
62,
3672,
1600,
2361,
198,
220,
220,
220,
8893,
17,
62,
25747,
796,
5855,
12853,
62,
3672,
1600,
366,
9971,
1634,
4943,
198,
220,
220,
220,
8893,
17,
62,
25471,
62,
4871,
796,
366,
11487,
3084,
12,
65,
24071,
3084,
12,
17561,
15385,
1,
628,
220,
220,
220,
17594,
62,
35827,
796,
6407,
198,
220,
220,
220,
7170,
62,
35827,
796,
6407,
198,
220,
220,
220,
2746,
687,
62,
1069,
13955,
796,
37250,
25598,
20520,
628
] | 3.052632 | 323 |
import FWCore.ParameterSet.Config as cms
omtfFwVersionSource = cms.ESSource(
"EmptyESSource",
recordName = cms.string('L1TMuonOverlapFwVersionRcd'),
iovIsRunNotTime = cms.bool(True),
firstValid = cms.vuint32(1)
)
###OMTF FW ESProducer.
omtfFwVersion = cms.ESProducer(
"L1TMuonOverlapFwVersionESProducer",
algoVersion = cms.uint32(0x110),
layersVersion = cms.uint32(6),
patternsVersion = cms.uint32(3),
synthDate = cms.string("2001-01-01 00:00")
)
| [
11748,
48849,
14055,
13,
36301,
7248,
13,
16934,
355,
269,
907,
198,
198,
296,
27110,
37,
86,
14815,
7416,
796,
269,
907,
13,
1546,
7416,
7,
198,
220,
220,
220,
366,
40613,
1546,
7416,
1600,
198,
220,
220,
220,
1700,
5376,
796,
269,
907,
13,
8841,
10786,
43,
16,
15972,
84,
261,
5886,
37796,
37,
86,
14815,
49,
10210,
33809,
198,
220,
220,
220,
1312,
709,
3792,
10987,
3673,
7575,
796,
269,
907,
13,
30388,
7,
17821,
828,
198,
220,
220,
220,
717,
47139,
796,
269,
907,
13,
85,
28611,
2624,
7,
16,
8,
198,
8,
198,
198,
21017,
2662,
10234,
48849,
9428,
2076,
2189,
13,
198,
296,
27110,
37,
86,
14815,
796,
269,
907,
13,
1546,
11547,
2189,
7,
198,
220,
220,
220,
366,
43,
16,
15972,
84,
261,
5886,
37796,
37,
86,
14815,
1546,
11547,
2189,
1600,
198,
220,
220,
220,
435,
2188,
14815,
796,
269,
907,
13,
28611,
2624,
7,
15,
87,
11442,
828,
198,
220,
220,
220,
11685,
14815,
796,
269,
907,
13,
28611,
2624,
7,
21,
828,
198,
220,
220,
220,
7572,
14815,
796,
269,
907,
13,
28611,
2624,
7,
18,
828,
198,
220,
220,
220,
33549,
10430,
796,
269,
907,
13,
8841,
7203,
14585,
12,
486,
12,
486,
3571,
25,
405,
4943,
198,
8,
628
] | 2.303318 | 211 |
from __future__ import unicode_literals
import frappe
from frappe.utils import getdate, validate_email_add, today
import datetime
from planning.planning.myfunction import mail_format_pms,actual_date_update,close_task_update
@frappe.whitelist()
@frappe.whitelist()
@frappe.whitelist()
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
11748,
5306,
27768,
198,
6738,
5306,
27768,
13,
26791,
1330,
651,
4475,
11,
26571,
62,
12888,
62,
2860,
11,
1909,
198,
11748,
4818,
8079,
198,
6738,
5410,
13,
11578,
768,
13,
1820,
8818,
1330,
6920,
62,
18982,
62,
79,
907,
11,
50039,
62,
4475,
62,
19119,
11,
19836,
62,
35943,
62,
19119,
198,
198,
31,
69,
430,
27768,
13,
1929,
270,
46331,
3419,
628,
628,
198,
198,
31,
69,
430,
27768,
13,
1929,
270,
46331,
3419,
628,
197,
198,
31,
69,
430,
27768,
13,
1929,
270,
46331,
3419,
198,
197
] | 2.910891 | 101 |
import json
import subprocess
import sys
import redis
| [
11748,
33918,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
198,
11748,
2266,
271,
628,
628
] | 3.625 | 16 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
from six.moves import urllib
from girder.api.rest import getApiUrl
from girder.exceptions import RestException
from girder.models.setting import Setting
from .base import ProviderBase
from .. import constants
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
29113,
29113,
7804,
4242,
21017,
198,
2,
220,
15069,
10897,
1574,
3457,
13,
198,
2,
198,
2,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
262,
366,
34156,
1,
5619,
198,
2,
220,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
220,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
220,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
220,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
220,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
220,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
220,
11247,
739,
262,
13789,
13,
198,
29113,
29113,
7804,
4242,
21017,
198,
198,
6738,
2237,
13,
76,
5241,
1330,
2956,
297,
571,
198,
198,
6738,
37370,
1082,
13,
15042,
13,
2118,
1330,
651,
32,
14415,
28165,
198,
6738,
37370,
1082,
13,
1069,
11755,
1330,
8324,
16922,
198,
6738,
37370,
1082,
13,
27530,
13,
33990,
1330,
25700,
198,
6738,
764,
8692,
1330,
32549,
14881,
198,
6738,
11485,
1330,
38491,
628
] | 3.984064 | 251 |
from rest_framework import routers
from .api import TodoViewSet
router = routers.DefaultRouter()
router.register('api/todos', TodoViewSet, 'todos')
urlpatterns = router.urls
| [
6738,
1334,
62,
30604,
1330,
41144,
198,
198,
6738,
764,
15042,
1330,
309,
24313,
7680,
7248,
198,
198,
472,
353,
796,
41144,
13,
19463,
49,
39605,
3419,
198,
472,
353,
13,
30238,
10786,
15042,
14,
83,
375,
418,
3256,
309,
24313,
7680,
7248,
11,
705,
83,
375,
418,
11537,
198,
198,
6371,
33279,
82,
796,
20264,
13,
6371,
82,
198
] | 2.95 | 60 |
import os
import pandas as pd
import configuration
| [
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
11748,
8398,
628
] | 3.785714 | 14 |
import sys
from converter import processPreTrainModels
if __name__ == '__main__':
if len(sys.argv) < 4:
print("usage: {} proto caffemodel output_dir".format(sys.argv[0]))
exit(0)
proto = sys.argv[1]
model = sys.argv[2]
output = sys.argv[3]
file_path = processPreTrainModels(
proto,
model,
output)
print("file_path is", file_path) | [
198,
11748,
25064,
198,
6738,
38394,
1330,
1429,
6719,
44077,
5841,
1424,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
611,
18896,
7,
17597,
13,
853,
85,
8,
1279,
604,
25,
198,
220,
220,
220,
3601,
7203,
26060,
25,
23884,
44876,
1275,
487,
368,
375,
417,
5072,
62,
15908,
1911,
18982,
7,
17597,
13,
853,
85,
58,
15,
60,
4008,
198,
220,
220,
220,
8420,
7,
15,
8,
198,
220,
220,
220,
220,
198,
220,
44876,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
220,
2746,
796,
25064,
13,
853,
85,
58,
17,
60,
198,
220,
5072,
796,
25064,
13,
853,
85,
58,
18,
60,
198,
220,
220,
220,
220,
198,
220,
2393,
62,
6978,
796,
1429,
6719,
44077,
5841,
1424,
7,
198,
220,
220,
220,
44876,
11,
198,
220,
220,
220,
2746,
11,
198,
220,
220,
220,
5072,
8,
198,
220,
220,
220,
220,
198,
220,
3601,
7203,
7753,
62,
6978,
318,
1600,
2393,
62,
6978,
8
] | 2.290909 | 165 |
from unittest import TestCase
from mock import Mock
from cloudshell.cp.aws.domain.common.vm_details_provider import VmDetailsProvider
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
15290,
1330,
44123,
198,
198,
6738,
6279,
29149,
13,
13155,
13,
8356,
13,
27830,
13,
11321,
13,
14761,
62,
36604,
62,
15234,
1304,
1330,
569,
76,
24259,
29495,
628
] | 3.578947 | 38 |
#!/bin/env python
"""Evaluate a demosaicking model."""
import argparse
import os
import time
import torch as th
from torch.utils.data import DataLoader
import numpy as np
import ttools
from ttools.modules.image_operators import crop_like
import demosaicnet
LOG = ttools.get_logger(__name__)
def main(args):
"""Entrypoint to the training."""
# Load model parameters from checkpoint, if any
# meta = ttools.Checkpointer.load_meta(args.checkpoint_dir)
# if meta is None:
# LOG.warning("No checkpoint found at %s, aborting.", args.checkpoint_dir)
# return
meta = {
'mode': 'bayer',
'depth': 15,
'width': 64
}
data = demosaicnet.Dataset(args.data, download=False,
mode=meta["mode"],
subset=demosaicnet.TEST_SUBSET)
dataloader = DataLoader(
data, batch_size=1, num_workers=4, pin_memory=True, shuffle=False)
if meta["mode"] == demosaicnet.BAYER_MODE:
model = demosaicnet.BayerDemosaick(depth=meta["depth"],
width=meta["width"],
pretrained=True,
pad=False)
elif meta["mode"] == demosaicnet.XTRANS_MODE:
model = demosaicnet.XTransDemosaick(depth=meta["depth"],
width=meta["width"],
pretrained=True,
pad=False)
# checkpointer = ttools.Checkpointer(args.checkpoint_dir, model, meta=meta)
# checkpointer.load_latest() # Resume from checkpoint, if any.
state_dict = th.load(args.checkpoint_dir)
model.load_state_dict(state_dict)
# No need for gradients
for p in model.parameters():
p.requires_grad = False
mse_fn = th.nn.MSELoss()
psnr_fn = PSNR()
device = "cpu"
if th.cuda.is_available():
device = "cuda"
LOG.info("Using CUDA")
count = 0
mse = 0.0
psnr = 0.0
for idx, batch in enumerate(dataloader):
mosaic = batch[0].to(device)
target = batch[1].to(device)
output = model(mosaic)
target = crop_like(target, output)
output = th.clamp(output, 0, 1)
psnr_ = psnr_fn(output, target).item()
mse_ = mse_fn(output, target).item()
psnr += psnr_
mse += mse_
count += 1
LOG.info("Image %04d, PSNR = %.1f dB, MSE = %.5f", idx, psnr_, mse_)
mse /= count
psnr /= count
LOG.info("-----------------------------------")
LOG.info("Average, PSNR = %.1f dB, MSE = %.5f", psnr, mse)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("data", help="root directory for the demosaicnet dataset.")
parser.add_argument("checkpoint_dir", help="directory with the model checkpoints.")
args = parser.parse_args()
ttools.set_logger(False)
main(args)
| [
2,
48443,
8800,
14,
24330,
21015,
198,
37811,
36,
2100,
4985,
257,
1357,
8546,
7958,
2746,
526,
15931,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
640,
198,
198,
11748,
28034,
355,
294,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
256,
31391,
198,
6738,
256,
31391,
13,
18170,
13,
9060,
62,
3575,
2024,
1330,
13833,
62,
2339,
198,
198,
11748,
1357,
8546,
291,
3262,
628,
198,
25294,
796,
256,
31391,
13,
1136,
62,
6404,
1362,
7,
834,
3672,
834,
8,
198,
198,
4299,
1388,
7,
22046,
2599,
198,
220,
220,
220,
37227,
30150,
4122,
284,
262,
3047,
526,
15931,
628,
220,
220,
220,
1303,
8778,
2746,
10007,
422,
26954,
11,
611,
597,
198,
220,
220,
220,
1303,
13634,
796,
256,
31391,
13,
9787,
29536,
13,
2220,
62,
28961,
7,
22046,
13,
9122,
4122,
62,
15908,
8,
198,
220,
220,
220,
1303,
611,
13634,
318,
6045,
25,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
41605,
13,
43917,
7203,
2949,
26954,
1043,
379,
4064,
82,
11,
15614,
278,
33283,
26498,
13,
9122,
4122,
62,
15908,
8,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
1441,
198,
220,
220,
220,
13634,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
14171,
10354,
705,
65,
2794,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
18053,
10354,
1315,
11,
198,
220,
220,
220,
220,
220,
220,
220,
705,
10394,
10354,
5598,
198,
220,
220,
220,
1782,
628,
220,
220,
220,
1366,
796,
1357,
8546,
291,
3262,
13,
27354,
292,
316,
7,
22046,
13,
7890,
11,
4321,
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,
4235,
28,
28961,
14692,
14171,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
24637,
28,
9536,
8546,
291,
3262,
13,
51,
6465,
62,
12564,
4462,
2767,
8,
198,
220,
220,
220,
4818,
282,
1170,
263,
796,
6060,
17401,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
11,
15458,
62,
7857,
28,
16,
11,
997,
62,
22896,
28,
19,
11,
6757,
62,
31673,
28,
17821,
11,
36273,
28,
25101,
8,
628,
220,
220,
220,
611,
13634,
14692,
14171,
8973,
6624,
1357,
8546,
291,
3262,
13,
4339,
56,
1137,
62,
49058,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2746,
796,
1357,
8546,
291,
3262,
13,
33,
2794,
11522,
8546,
624,
7,
18053,
28,
28961,
14692,
18053,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9647,
28,
28961,
14692,
10394,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2181,
13363,
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,
14841,
28,
25101,
8,
198,
220,
220,
220,
1288,
361,
13634,
14692,
14171,
8973,
6624,
1357,
8546,
291,
3262,
13,
55,
5446,
15037,
62,
49058,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2746,
796,
1357,
8546,
291,
3262,
13,
55,
8291,
11522,
8546,
624,
7,
18053,
28,
28961,
14692,
18053,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9647,
28,
28961,
14692,
10394,
33116,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2181,
13363,
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,
14841,
28,
25101,
8,
628,
220,
220,
220,
1303,
2198,
29536,
796,
256,
31391,
13,
9787,
29536,
7,
22046,
13,
9122,
4122,
62,
15908,
11,
2746,
11,
13634,
28,
28961,
8,
198,
220,
220,
220,
1303,
2198,
29536,
13,
2220,
62,
42861,
3419,
220,
1303,
1874,
2454,
422,
26954,
11,
611,
597,
13,
198,
220,
220,
220,
1181,
62,
11600,
796,
294,
13,
2220,
7,
22046,
13,
9122,
4122,
62,
15908,
8,
198,
220,
220,
220,
2746,
13,
2220,
62,
5219,
62,
11600,
7,
5219,
62,
11600,
8,
628,
220,
220,
220,
1303,
1400,
761,
329,
3915,
2334,
198,
220,
220,
220,
329,
279,
287,
2746,
13,
17143,
7307,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
279,
13,
47911,
62,
9744,
796,
10352,
628,
220,
220,
220,
285,
325,
62,
22184,
796,
294,
13,
20471,
13,
5653,
3698,
793,
3419,
198,
220,
220,
220,
279,
16184,
81,
62,
22184,
796,
6599,
24723,
3419,
628,
220,
220,
220,
3335,
796,
366,
36166,
1,
198,
220,
220,
220,
611,
294,
13,
66,
15339,
13,
271,
62,
15182,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
3335,
796,
366,
66,
15339,
1,
198,
220,
220,
220,
220,
220,
220,
220,
41605,
13,
10951,
7203,
12814,
29369,
5631,
4943,
628,
220,
220,
220,
954,
796,
657,
198,
220,
220,
220,
285,
325,
796,
657,
13,
15,
198,
220,
220,
220,
279,
16184,
81,
796,
657,
13,
15,
198,
220,
220,
220,
329,
4686,
87,
11,
15458,
287,
27056,
378,
7,
67,
10254,
1170,
263,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
47076,
796,
15458,
58,
15,
4083,
1462,
7,
25202,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2496,
796,
15458,
58,
16,
4083,
1462,
7,
25202,
8,
198,
220,
220,
220,
220,
220,
220,
220,
5072,
796,
2746,
7,
76,
8546,
291,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2496,
796,
13833,
62,
2339,
7,
16793,
11,
5072,
8,
628,
220,
220,
220,
220,
220,
220,
220,
5072,
796,
294,
13,
565,
696,
7,
22915,
11,
657,
11,
352,
8,
628,
220,
220,
220,
220,
220,
220,
220,
279,
16184,
81,
62,
796,
279,
16184,
81,
62,
22184,
7,
22915,
11,
2496,
737,
9186,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
285,
325,
62,
796,
285,
325,
62,
22184,
7,
22915,
11,
2496,
737,
9186,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
279,
16184,
81,
15853,
279,
16184,
81,
62,
198,
220,
220,
220,
220,
220,
220,
220,
285,
325,
15853,
285,
325,
62,
198,
220,
220,
220,
220,
220,
220,
220,
954,
15853,
352,
628,
220,
220,
220,
220,
220,
220,
220,
41605,
13,
10951,
7203,
5159,
4064,
3023,
67,
11,
6599,
24723,
796,
4064,
13,
16,
69,
30221,
11,
337,
5188,
796,
4064,
13,
20,
69,
1600,
4686,
87,
11,
279,
16184,
81,
62,
11,
285,
325,
62,
8,
628,
220,
220,
220,
285,
325,
1220,
28,
954,
198,
220,
220,
220,
279,
16184,
81,
1220,
28,
954,
628,
220,
220,
220,
41605,
13,
10951,
7203,
3880,
6329,
4943,
198,
220,
220,
220,
41605,
13,
10951,
7203,
26287,
11,
6599,
24723,
796,
4064,
13,
16,
69,
30221,
11,
337,
5188,
796,
4064,
13,
20,
69,
1600,
279,
16184,
81,
11,
285,
325,
8,
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,
3419,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
7890,
1600,
1037,
2625,
15763,
8619,
329,
262,
1357,
8546,
291,
3262,
27039,
19570,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
9122,
4122,
62,
15908,
1600,
1037,
2625,
34945,
351,
262,
2746,
36628,
19570,
198,
220,
220,
220,
26498,
796,
30751,
13,
29572,
62,
22046,
3419,
198,
220,
220,
220,
256,
31391,
13,
2617,
62,
6404,
1362,
7,
25101,
8,
198,
220,
220,
220,
1388,
7,
22046,
8,
198
] | 2.091289 | 1,435 |
'''
@author: Sebastian Lapuschkin
@maintainer: Sebastian Lapuschkin
@contact: [email protected], [email protected]
@date: 30.09.2015
@version: 1.0
@copyright: Copyright (c) 2015-2017, Sebastian Lapuschkin, Alexander Binder, Gregoire Montavon, Klaus-Robert Mueller, Wojciech Samek
@license : BSD-2-Clause
'''
import modules
import model_io
import numpy as np ; na = np.newaxis
D,N = 2,200000
#this is the XOR problem.
X = np.random.rand(N,D) #we want [NxD] data
X = (X > 0.5)*1.0
Y = X[:,0] == X[:,1]
Y = (np.vstack((Y, np.invert(Y)))*1.0).T # and [NxC] labels
X += np.random.randn(N,D)*0.1 # add some noise to the data.
#build a network
nn = modules.Sequential([modules.Linear(2,3), modules.Tanh(),modules.Linear(3,15), modules.Tanh(), modules.Linear(15,15), modules.Tanh(), modules.Linear(15,3), modules.Tanh() ,modules.Linear(3,2), modules.SoftMax()])
#train the network.
nn.train(X,Y,Xval=X,Yval=Y, batchsize = 5)
#save the network
model_io.write(nn, '../xor_net_small_1000.txt')
| [
7061,
6,
198,
31,
9800,
25,
26190,
26944,
385,
354,
5116,
198,
31,
76,
2913,
10613,
25,
26190,
26944,
385,
354,
5116,
198,
31,
32057,
25,
384,
65,
459,
666,
13,
37796,
385,
354,
5116,
31,
71,
5303,
13,
69,
430,
403,
71,
30288,
13,
2934,
11,
266,
13210,
66,
494,
354,
13,
31642,
74,
31,
71,
5303,
13,
69,
430,
403,
71,
30288,
13,
2934,
198,
31,
4475,
25,
1542,
13,
2931,
13,
4626,
198,
31,
9641,
25,
352,
13,
15,
198,
31,
22163,
4766,
25,
15069,
357,
66,
8,
220,
1853,
12,
5539,
11,
26190,
26944,
385,
354,
5116,
11,
10009,
347,
5540,
11,
11955,
2188,
557,
5575,
615,
261,
11,
49739,
12,
19156,
17768,
11,
370,
13210,
66,
494,
354,
16766,
74,
198,
31,
43085,
1058,
347,
10305,
12,
17,
12,
2601,
682,
198,
7061,
6,
198,
198,
11748,
13103,
198,
11748,
2746,
62,
952,
198,
198,
11748,
299,
32152,
355,
45941,
2162,
12385,
796,
45941,
13,
3605,
22704,
198,
198,
35,
11,
45,
796,
362,
11,
33470,
198,
198,
2,
5661,
318,
262,
1395,
1581,
1917,
13,
198,
55,
796,
45941,
13,
25120,
13,
25192,
7,
45,
11,
35,
8,
1303,
732,
765,
685,
45,
87,
35,
60,
1366,
198,
55,
796,
357,
55,
1875,
657,
13,
20,
27493,
16,
13,
15,
198,
56,
796,
1395,
58,
45299,
15,
60,
6624,
1395,
58,
45299,
16,
60,
198,
56,
796,
357,
37659,
13,
85,
25558,
19510,
56,
11,
45941,
13,
259,
1851,
7,
56,
22305,
9,
16,
13,
15,
737,
51,
1303,
290,
685,
45,
87,
34,
60,
14722,
198,
198,
55,
15853,
45941,
13,
25120,
13,
25192,
77,
7,
45,
11,
35,
27493,
15,
13,
16,
1303,
751,
617,
7838,
284,
262,
1366,
13,
198,
198,
2,
11249,
257,
3127,
198,
20471,
796,
13103,
13,
44015,
1843,
26933,
18170,
13,
14993,
451,
7,
17,
11,
18,
828,
13103,
13,
45557,
71,
22784,
18170,
13,
14993,
451,
7,
18,
11,
1314,
828,
13103,
13,
45557,
71,
22784,
13103,
13,
14993,
451,
7,
1314,
11,
1314,
828,
13103,
13,
45557,
71,
22784,
13103,
13,
14993,
451,
7,
1314,
11,
18,
828,
13103,
13,
45557,
71,
3419,
837,
18170,
13,
14993,
451,
7,
18,
11,
17,
828,
13103,
13,
18380,
11518,
3419,
12962,
198,
2,
27432,
262,
3127,
13,
198,
20471,
13,
27432,
7,
55,
11,
56,
11,
55,
2100,
28,
55,
11,
56,
2100,
28,
56,
11,
15458,
7857,
796,
642,
8,
198,
198,
2,
21928,
262,
3127,
198,
19849,
62,
952,
13,
13564,
7,
20471,
11,
705,
40720,
87,
273,
62,
3262,
62,
17470,
62,
12825,
13,
14116,
11537,
628,
628
] | 2.373272 | 434 |
#!/usr/bin/env python3
from aws_cdk import App
from python.python_stack import PythonStack
app = App()
PythonStack(app, "TestStack")
app.synth()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
6738,
3253,
82,
62,
10210,
74,
1330,
2034,
198,
198,
6738,
21015,
13,
29412,
62,
25558,
1330,
11361,
25896,
628,
198,
1324,
796,
2034,
3419,
198,
37906,
25896,
7,
1324,
11,
366,
14402,
25896,
4943,
198,
198,
1324,
13,
28869,
400,
3419,
198
] | 2.811321 | 53 |
from abc import ABCMeta, abstractmethod, abstractproperty
class ParslExecutor(metaclass=ABCMeta):
"""Define the strict interface for all Executor classes.
This is a metaclass that only enforces concrete implementations of
functionality by the child classes.
In addition to the listed methods, a ParslExecutor instance must always
have a member field:
label: str - a human readable label for the executor, unique
with respect to other executors.
An executor may optionally expose:
storage_access: List[parsl.data_provider.staging.Staging] - a list of staging
providers that will be used for file staging. In the absence of this
attribute, or if this attribute is `None`, then a default value of
`parsl.data_provider.staging.default_staging` will be used by the
staging code.
Typechecker note: Ideally storage_access would be declared on executor
__init__ methods as List[Staging] - however, lists are by default
invariant, not co-variant, and it looks like @typeguard cannot be
persuaded otherwise. So if you're implementing an executor and want to
@typeguard the constructor, you'll have to use List[Any] here.
"""
@abstractmethod
def start(self, *args, **kwargs):
"""Start the executor.
Any spin-up operations (for example: starting thread pools) should be performed here.
"""
pass
@abstractmethod
def submit(self, *args, **kwargs):
"""Submit.
We haven't yet decided on what the args to this can be,
whether it should just be func, args, kwargs or be the partially evaluated
fn
"""
pass
@abstractmethod
def scale_out(self, *args, **kwargs):
"""Scale out method.
We should have the scale out method simply take resource object
which will have the scaling methods, scale_out itself should be a coroutine, since
scaling tasks can be slow.
"""
pass
@abstractmethod
def scale_in(self, blocks):
"""Scale in method.
Cause the executor to reduce the number of blocks by count.
We should have the scale in method simply take resource object
which will have the scaling methods, scale_in itself should be a coroutine, since
scaling tasks can be slow.
"""
pass
@abstractmethod
def shutdown(self, *args, **kwargs):
"""Shutdown the executor.
This includes all attached resources such as workers and controllers.
"""
pass
@abstractproperty
def scaling_enabled(self):
"""Specify if scaling is enabled.
The callers of ParslExecutors need to differentiate between Executors
and Executors wrapped in a resource provider
"""
pass
@property
def run_dir(self):
"""Path to the run directory.
"""
return self._run_dir
@run_dir.setter
@property
def hub_address(self):
"""Address to the Hub for monitoring.
"""
return self._hub_address
@hub_address.setter
@property
def hub_port(self):
"""Port to the Hub for monitoring.
"""
return self._hub_port
@hub_port.setter
| [
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396,
11,
12531,
26745,
628,
198,
4871,
23042,
75,
23002,
38409,
7,
4164,
330,
31172,
28,
24694,
48526,
2599,
198,
220,
220,
220,
37227,
7469,
500,
262,
7646,
7071,
329,
477,
8393,
38409,
6097,
13,
628,
220,
220,
220,
770,
318,
257,
1138,
330,
31172,
326,
691,
551,
27087,
10017,
25504,
286,
198,
220,
220,
220,
11244,
416,
262,
1200,
6097,
13,
628,
220,
220,
220,
554,
3090,
284,
262,
5610,
5050,
11,
257,
23042,
75,
23002,
38409,
4554,
1276,
1464,
198,
220,
220,
220,
423,
257,
2888,
2214,
25,
628,
220,
220,
220,
220,
220,
220,
6167,
25,
965,
532,
257,
1692,
31744,
6167,
329,
262,
3121,
273,
11,
3748,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
351,
2461,
284,
584,
3121,
669,
13,
628,
220,
220,
220,
1052,
3121,
273,
743,
42976,
15651,
25,
628,
220,
220,
220,
220,
220,
220,
6143,
62,
15526,
25,
7343,
58,
79,
945,
75,
13,
7890,
62,
15234,
1304,
13,
301,
3039,
13,
1273,
3039,
60,
532,
257,
1351,
286,
29475,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9549,
326,
481,
307,
973,
329,
2393,
29475,
13,
554,
262,
8889,
286,
428,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11688,
11,
393,
611,
428,
11688,
318,
4600,
14202,
47671,
788,
257,
4277,
1988,
286,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4600,
79,
945,
75,
13,
7890,
62,
15234,
1304,
13,
301,
3039,
13,
12286,
62,
301,
3039,
63,
481,
307,
973,
416,
262,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29475,
2438,
13,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5994,
9122,
263,
3465,
25,
40067,
6143,
62,
15526,
561,
307,
6875,
319,
3121,
273,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11593,
15003,
834,
5050,
355,
7343,
58,
1273,
3039,
60,
532,
2158,
11,
8341,
389,
416,
4277,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25275,
415,
11,
407,
763,
12,
25641,
415,
11,
290,
340,
3073,
588,
2488,
4906,
14864,
2314,
307,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25562,
4306,
13,
1406,
611,
345,
821,
15427,
281,
3121,
273,
290,
765,
284,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2488,
4906,
14864,
262,
23772,
11,
345,
1183,
423,
284,
779,
7343,
58,
7149,
60,
994,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
2488,
397,
8709,
24396,
198,
220,
220,
220,
825,
923,
7,
944,
11,
1635,
22046,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
10434,
262,
3121,
273,
13,
628,
220,
220,
220,
220,
220,
220,
220,
4377,
7906,
12,
929,
4560,
357,
1640,
1672,
25,
3599,
4704,
20354,
8,
815,
307,
6157,
994,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
628,
220,
220,
220,
2488,
397,
8709,
24396,
198,
220,
220,
220,
825,
9199,
7,
944,
11,
1635,
22046,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
45135,
13,
628,
220,
220,
220,
220,
220,
220,
220,
775,
4398,
470,
1865,
3066,
319,
644,
262,
26498,
284,
428,
460,
307,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1771,
340,
815,
655,
307,
25439,
11,
26498,
11,
479,
86,
22046,
393,
307,
262,
12387,
16726,
198,
220,
220,
220,
220,
220,
220,
220,
24714,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
628,
220,
220,
220,
2488,
397,
8709,
24396,
198,
220,
220,
220,
825,
5046,
62,
448,
7,
944,
11,
1635,
22046,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
29990,
503,
2446,
13,
628,
220,
220,
220,
220,
220,
220,
220,
775,
815,
423,
262,
5046,
503,
2446,
2391,
1011,
8271,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
543,
481,
423,
262,
20796,
5050,
11,
5046,
62,
448,
2346,
815,
307,
257,
1162,
28399,
11,
1201,
198,
220,
220,
220,
220,
220,
220,
220,
20796,
8861,
460,
307,
3105,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
628,
220,
220,
220,
2488,
397,
8709,
24396,
198,
220,
220,
220,
825,
5046,
62,
259,
7,
944,
11,
7021,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
29990,
287,
2446,
13,
628,
220,
220,
220,
220,
220,
220,
220,
24228,
262,
3121,
273,
284,
4646,
262,
1271,
286,
7021,
416,
954,
13,
628,
220,
220,
220,
220,
220,
220,
220,
775,
815,
423,
262,
5046,
287,
2446,
2391,
1011,
8271,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
543,
481,
423,
262,
20796,
5050,
11,
5046,
62,
259,
2346,
815,
307,
257,
1162,
28399,
11,
1201,
198,
220,
220,
220,
220,
220,
220,
220,
20796,
8861,
460,
307,
3105,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
628,
220,
220,
220,
2488,
397,
8709,
24396,
198,
220,
220,
220,
825,
18325,
7,
944,
11,
1635,
22046,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
39079,
2902,
262,
3121,
273,
13,
628,
220,
220,
220,
220,
220,
220,
220,
770,
3407,
477,
7223,
4133,
884,
355,
3259,
290,
20624,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
628,
220,
220,
220,
2488,
397,
8709,
26745,
198,
220,
220,
220,
825,
20796,
62,
25616,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
22882,
1958,
611,
20796,
318,
9343,
13,
628,
220,
220,
220,
220,
220,
220,
220,
383,
869,
364,
286,
23042,
75,
23002,
315,
669,
761,
284,
28754,
1022,
8393,
315,
669,
198,
220,
220,
220,
220,
220,
220,
220,
290,
8393,
315,
669,
12908,
287,
257,
8271,
10131,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
1057,
62,
15908,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
15235,
284,
262,
1057,
8619,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
5143,
62,
15908,
628,
220,
220,
220,
2488,
5143,
62,
15908,
13,
2617,
353,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
12575,
62,
21975,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
20231,
284,
262,
14699,
329,
9904,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
40140,
62,
21975,
628,
220,
220,
220,
2488,
40140,
62,
21975,
13,
2617,
353,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
12575,
62,
634,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
13924,
284,
262,
14699,
329,
9904,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
40140,
62,
634,
628,
220,
220,
220,
2488,
40140,
62,
634,
13,
2617,
353,
198
] | 2.665345 | 1,261 |
def fourier_transform(yi):
"""a, b = fourier_transform(yi).
Real-valued Fourier transform that determines the
coefficients of the Fourier series for a given
signal y. The coefficients of the cosine terms are
returned in the array a; those of the sine terms
in the array b. Frequencies start at zero and do
not exceed the Nyquist frequency.
yi = {y1,y2,...,xn}
"""
xi = np.arange(yi.size)
length = yi.size // 2 + 1
a, b = np.empty(length), np.empty(length)
# Compute zero and Nyquist frequency cases
a[0] = np.mean(yi)
a[-1] = yi @ np.cos(np.pi * xi) / yi.size
b[0] = 0.0
b[-1] = 0.0
# Compute ordinary cases (overwrite Nyquist if odd length)
for index in range(1, length + yi.size % 2 - 1):
arg = 2.0 * np.pi * xi * index / yi.size
a[index] = 2.0 / yi.size * yi @ np.cos(arg)
b[index] = 2.0 / yi.size * yi @ np.sin(arg)
return a, b | [
4299,
46287,
5277,
62,
35636,
7,
48111,
2599,
198,
220,
220,
220,
37227,
64,
11,
275,
796,
46287,
5277,
62,
35636,
7,
48111,
737,
198,
220,
220,
220,
6416,
12,
39728,
34296,
5277,
6121,
326,
15947,
262,
198,
220,
220,
220,
44036,
286,
262,
34296,
5277,
2168,
329,
257,
1813,
198,
220,
220,
220,
6737,
331,
13,
383,
44036,
286,
262,
8615,
500,
2846,
389,
198,
220,
220,
220,
4504,
287,
262,
7177,
257,
26,
883,
286,
262,
264,
500,
2846,
198,
220,
220,
220,
287,
262,
7177,
275,
13,
22192,
3976,
923,
379,
6632,
290,
466,
198,
220,
220,
220,
407,
7074,
262,
17735,
30062,
8373,
13,
198,
220,
220,
220,
331,
72,
220,
220,
220,
220,
796,
1391,
88,
16,
11,
88,
17,
42303,
11,
87,
77,
92,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2124,
72,
796,
45941,
13,
283,
858,
7,
48111,
13,
7857,
8,
198,
220,
220,
220,
4129,
796,
331,
72,
13,
7857,
3373,
362,
1343,
352,
198,
220,
220,
220,
257,
11,
275,
796,
45941,
13,
28920,
7,
13664,
828,
45941,
13,
28920,
7,
13664,
8,
198,
220,
220,
220,
1303,
3082,
1133,
6632,
290,
17735,
30062,
8373,
2663,
198,
220,
220,
220,
257,
58,
15,
60,
796,
45941,
13,
32604,
7,
48111,
8,
198,
220,
220,
220,
257,
58,
12,
16,
60,
796,
331,
72,
2488,
45941,
13,
6966,
7,
37659,
13,
14415,
1635,
2124,
72,
8,
1220,
331,
72,
13,
7857,
198,
220,
220,
220,
275,
58,
15,
60,
796,
657,
13,
15,
198,
220,
220,
220,
275,
58,
12,
16,
60,
796,
657,
13,
15,
220,
198,
220,
220,
220,
1303,
3082,
1133,
8850,
2663,
357,
2502,
13564,
17735,
30062,
611,
5629,
4129,
8,
198,
220,
220,
220,
329,
6376,
287,
2837,
7,
16,
11,
4129,
1343,
331,
72,
13,
7857,
4064,
362,
532,
352,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1822,
796,
362,
13,
15,
1635,
45941,
13,
14415,
1635,
2124,
72,
1635,
6376,
1220,
331,
72,
13,
7857,
198,
220,
220,
220,
220,
220,
220,
220,
257,
58,
9630,
60,
796,
362,
13,
15,
1220,
331,
72,
13,
7857,
1635,
331,
72,
2488,
45941,
13,
6966,
7,
853,
8,
198,
220,
220,
220,
220,
220,
220,
220,
275,
58,
9630,
60,
796,
362,
13,
15,
1220,
331,
72,
13,
7857,
1635,
331,
72,
2488,
45941,
13,
31369,
7,
853,
8,
198,
220,
220,
220,
1441,
257,
11,
275
] | 2.320988 | 405 |
import cv2
import numpy as np
from math import pow, sqrt
points = []
letters = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
image = np.zeros((512, 512, 3), np.uint8)
while True:
cv2.putText(image, f'TO CLEAR THE POINTS PRESS (c)', (20, 20), cv2.FONT_HERSHEY_PLAIN, 1, (255, 255, 255), 1)
cv2.imshow("DISTANCE BETWEEN TWO POINTS", image)
cv2.setMouseCallback("DISTANCE BETWEEN TWO POINTS", mouseEvent, None)
key = cv2.waitKey(1)
if key & 0xFF == 27:
cv2.destroyAllWindows()
break
elif key & 0xFF == ord('c'):
image = np.zeros((512, 512, 3), np.uint8)
points = []
# cm = pixels / 96 * 2.54
| [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
10688,
1330,
7182,
11,
19862,
17034,
198,
198,
13033,
796,
17635,
198,
15653,
796,
1351,
7203,
24694,
32988,
17511,
23852,
42,
31288,
45,
3185,
48,
49,
2257,
52,
30133,
34278,
57,
4943,
198,
9060,
796,
45941,
13,
9107,
418,
19510,
25836,
11,
22243,
11,
513,
828,
45941,
13,
28611,
23,
8,
198,
198,
4514,
6407,
25,
198,
220,
220,
220,
269,
85,
17,
13,
1996,
8206,
7,
9060,
11,
277,
6,
10468,
30301,
1503,
3336,
19922,
1268,
4694,
44310,
357,
66,
8,
3256,
357,
1238,
11,
1160,
828,
269,
85,
17,
13,
37,
35830,
62,
39,
4877,
13909,
56,
62,
6489,
29833,
11,
352,
11,
357,
13381,
11,
14280,
11,
14280,
828,
352,
8,
198,
220,
220,
220,
269,
85,
17,
13,
320,
12860,
7203,
35,
8808,
19240,
38651,
8845,
1677,
35288,
19922,
1268,
4694,
1600,
2939,
8,
198,
220,
220,
220,
269,
85,
17,
13,
2617,
39643,
47258,
7203,
35,
8808,
19240,
38651,
8845,
1677,
35288,
19922,
1268,
4694,
1600,
10211,
9237,
11,
6045,
8,
198,
220,
220,
220,
1994,
796,
269,
85,
17,
13,
17077,
9218,
7,
16,
8,
198,
220,
220,
220,
611,
1994,
1222,
657,
87,
5777,
6624,
2681,
25,
198,
220,
220,
220,
220,
220,
220,
220,
269,
85,
17,
13,
41659,
3237,
11209,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
1288,
361,
1994,
1222,
657,
87,
5777,
6624,
2760,
10786,
66,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
2939,
796,
45941,
13,
9107,
418,
19510,
25836,
11,
22243,
11,
513,
828,
45941,
13,
28611,
23,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2173,
796,
17635,
198,
2,
12067,
796,
17848,
1220,
9907,
1635,
362,
13,
4051,
198
] | 2.141414 | 297 |
import json
import pandas as pd
import numpy as np
from pandas import DataFrame
"""
output
"""
# Note: some output is shortened to save spaces.
# This file introduces methods to group data.
# Data from https://github.com/mwaskom/seaborn-data
df = pd.read_csv('E:\\tips.csv')
"""
total_bill tip sex smoker day time size
0 16.99 1.01 Female No Sun Dinner 2
1 10.34 1.66 Male No Sun Dinner 3
2 21.01 3.50 Male No Sun Dinner 3
3 23.68 3.31 Male No Sun Dinner 2
4 24.59 3.61 Female No Sun Dinner 4
5 25.29 4.71 Male No Sun Dinner 4
.. ... ... ... ... ... ... ...
240 27.18 2.00 Female Yes Sat Dinner 2
241 22.67 2.00 Male Yes Sat Dinner 2
242 17.82 1.75 Male No Sat Dinner 2
243 18.78 3.00 Female No Thur Dinner 2
[244 rows x 7 columns]
"""
# ------------------------------------------------------------------------------
# if we want to form group based on 'day' column
group = df.groupby('day')
# print out the first value (first line) in each group
print (group.first())
"""
total_bill tip sex smoker time size
day
Fri 28.97 3.00 Male Yes Dinner 2
Sat 20.65 3.35 Male No Dinner 3
Sun 16.99 1.01 Female No Dinner 2
Thur 27.20 4.00 Male No Lunch 4
"""
# print out the last value (last line) in each group
print (group.first())
"""
total_bill tip sex smoker time size
day
Fri 10.09 2.00 Female Yes Lunch 2
Sat 17.82 1.75 Male No Dinner 2
Sun 15.69 1.50 Male Yes Dinner 2
Thur 18.78 3.00 Female No Dinner 2
"""
| [
11748,
33918,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
19798,
292,
1330,
6060,
19778,
198,
198,
37811,
198,
22915,
198,
37811,
198,
2,
5740,
25,
617,
5072,
318,
34464,
284,
3613,
9029,
13,
198,
198,
2,
770,
2393,
20718,
5050,
284,
1448,
1366,
13,
198,
198,
2,
6060,
422,
3740,
1378,
12567,
13,
785,
14,
76,
86,
2093,
296,
14,
325,
397,
1211,
12,
7890,
198,
7568,
796,
279,
67,
13,
961,
62,
40664,
10786,
36,
25,
6852,
41315,
13,
40664,
11537,
198,
198,
37811,
198,
220,
220,
220,
220,
2472,
62,
35546,
220,
220,
8171,
220,
220,
220,
220,
1714,
41644,
220,
220,
1110,
220,
220,
220,
640,
220,
2546,
198,
15,
220,
220,
220,
220,
220,
220,
220,
220,
1467,
13,
2079,
220,
352,
13,
486,
220,
15396,
220,
220,
220,
220,
1400,
220,
220,
3825,
220,
34584,
220,
220,
220,
220,
362,
198,
16,
220,
220,
220,
220,
220,
220,
220,
220,
838,
13,
2682,
220,
352,
13,
2791,
220,
220,
220,
12674,
220,
220,
220,
220,
1400,
220,
220,
3825,
220,
34584,
220,
220,
220,
220,
513,
198,
17,
220,
220,
220,
220,
220,
220,
220,
220,
2310,
13,
486,
220,
513,
13,
1120,
220,
220,
220,
12674,
220,
220,
220,
220,
1400,
220,
220,
3825,
220,
34584,
220,
220,
220,
220,
513,
198,
18,
220,
220,
220,
220,
220,
220,
220,
220,
2242,
13,
3104,
220,
513,
13,
3132,
220,
220,
220,
12674,
220,
220,
220,
220,
1400,
220,
220,
3825,
220,
34584,
220,
220,
220,
220,
362,
198,
19,
220,
220,
220,
220,
220,
220,
220,
220,
1987,
13,
3270,
220,
513,
13,
5333,
220,
15396,
220,
220,
220,
220,
1400,
220,
220,
3825,
220,
34584,
220,
220,
220,
220,
604,
198,
20,
220,
220,
220,
220,
220,
220,
220,
220,
1679,
13,
1959,
220,
604,
13,
4869,
220,
220,
220,
12674,
220,
220,
220,
220,
1400,
220,
220,
3825,
220,
34584,
220,
220,
220,
220,
604,
198,
492,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2644,
220,
220,
2644,
220,
220,
220,
220,
2644,
220,
220,
220,
2644,
220,
220,
2644,
220,
220,
220,
220,
2644,
220,
220,
2644,
198,
16102,
220,
220,
220,
220,
220,
220,
2681,
13,
1507,
220,
362,
13,
405,
220,
15396,
220,
220,
220,
3363,
220,
220,
7031,
220,
34584,
220,
220,
220,
220,
362,
198,
28872,
220,
220,
220,
220,
220,
220,
2534,
13,
3134,
220,
362,
13,
405,
220,
220,
220,
12674,
220,
220,
220,
3363,
220,
220,
7031,
220,
34584,
220,
220,
220,
220,
362,
198,
27877,
220,
220,
220,
220,
220,
220,
1596,
13,
6469,
220,
352,
13,
2425,
220,
220,
220,
12674,
220,
220,
220,
220,
1400,
220,
220,
7031,
220,
34584,
220,
220,
220,
220,
362,
198,
26660,
220,
220,
220,
220,
220,
220,
1248,
13,
3695,
220,
513,
13,
405,
220,
15396,
220,
220,
220,
220,
1400,
220,
36975,
220,
34584,
220,
220,
220,
220,
362,
198,
58,
25707,
15274,
2124,
767,
15180,
60,
198,
37811,
198,
198,
2,
16529,
26171,
198,
2,
611,
356,
765,
284,
1296,
1448,
1912,
319,
705,
820,
6,
5721,
198,
198,
8094,
796,
47764,
13,
8094,
1525,
10786,
820,
11537,
198,
198,
2,
3601,
503,
262,
717,
1988,
357,
11085,
1627,
8,
287,
1123,
1448,
198,
4798,
357,
8094,
13,
11085,
28955,
198,
198,
37811,
198,
220,
220,
220,
220,
220,
2472,
62,
35546,
220,
220,
8171,
220,
220,
220,
220,
1714,
41644,
220,
220,
220,
640,
220,
2546,
198,
820,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
30214,
220,
220,
220,
220,
220,
220,
220,
2579,
13,
5607,
220,
513,
13,
405,
220,
220,
220,
12674,
220,
220,
220,
3363,
220,
34584,
220,
220,
220,
220,
362,
198,
20245,
220,
220,
220,
220,
220,
220,
220,
1160,
13,
2996,
220,
513,
13,
2327,
220,
220,
220,
12674,
220,
220,
220,
220,
1400,
220,
34584,
220,
220,
220,
220,
513,
198,
16012,
220,
220,
220,
220,
220,
220,
220,
1467,
13,
2079,
220,
352,
13,
486,
220,
15396,
220,
220,
220,
220,
1400,
220,
34584,
220,
220,
220,
220,
362,
198,
817,
333,
220,
220,
220,
220,
220,
220,
2681,
13,
1238,
220,
604,
13,
405,
220,
220,
220,
12674,
220,
220,
220,
220,
1400,
220,
220,
40514,
220,
220,
220,
220,
604,
198,
37811,
198,
198,
2,
3601,
503,
262,
938,
1988,
357,
12957,
1627,
8,
287,
1123,
1448,
198,
4798,
357,
8094,
13,
11085,
28955,
198,
198,
37811,
198,
220,
220,
220,
220,
220,
2472,
62,
35546,
220,
220,
8171,
220,
220,
220,
220,
1714,
41644,
220,
220,
220,
640,
220,
2546,
198,
820,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
30214,
220,
220,
220,
220,
220,
220,
220,
838,
13,
2931,
220,
362,
13,
405,
220,
15396,
220,
220,
220,
3363,
220,
220,
40514,
220,
220,
220,
220,
362,
198,
20245,
220,
220,
220,
220,
220,
220,
220,
1596,
13,
6469,
220,
352,
13,
2425,
220,
220,
220,
12674,
220,
220,
220,
220,
1400,
220,
34584,
220,
220,
220,
220,
362,
198,
16012,
220,
220,
220,
220,
220,
220,
220,
1315,
13,
3388,
220,
352,
13,
1120,
220,
220,
220,
12674,
220,
220,
220,
3363,
220,
34584,
220,
220,
220,
220,
362,
198,
817,
333,
220,
220,
220,
220,
220,
220,
1248,
13,
3695,
220,
513,
13,
405,
220,
15396,
220,
220,
220,
220,
1400,
220,
34584,
220,
220,
220,
220,
362,
198,
37811,
198
] | 1.973658 | 987 |
# -*- coding: utf-8 -*-
# Copyright (C) 2012, Almar Klein
#
# Visvis is distributed under the terms of the (new) BSD License.
# The full license can be found in 'license.txt'.
def reportIssue():
""" help()
Open a webbrowser with the visvis website at the issue list.
"""
import webbrowser
webbrowser.open("http://code.google.com/p/visvis/issues/list")
if __name__ == '__main__':
reportIssue()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
34,
8,
2321,
11,
978,
3876,
22864,
198,
2,
198,
2,
6911,
4703,
318,
9387,
739,
262,
2846,
286,
262,
357,
3605,
8,
347,
10305,
13789,
13,
198,
2,
383,
1336,
5964,
460,
307,
1043,
287,
705,
43085,
13,
14116,
4458,
198,
198,
4299,
989,
45147,
33529,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
1037,
3419,
198,
220,
220,
220,
220,
198,
220,
220,
220,
4946,
257,
3992,
40259,
351,
262,
1490,
4703,
3052,
379,
262,
2071,
1351,
13,
198,
220,
220,
220,
220,
198,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1330,
3992,
40259,
198,
220,
220,
220,
3992,
40259,
13,
9654,
7203,
4023,
1378,
8189,
13,
13297,
13,
785,
14,
79,
14,
4703,
4703,
14,
37165,
14,
4868,
4943,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
989,
45147,
3419,
198
] | 2.638554 | 166 |
#!/usr/bin/python
def printme3( str ):
"This prints a passed string into this function"
print(str)
return
def printme3too( str ):
"This prints a passed string into this function"
print(str)
return
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
4299,
3601,
1326,
18,
7,
965,
15179,
198,
220,
220,
366,
1212,
20842,
257,
3804,
4731,
656,
428,
2163,
1,
198,
220,
220,
3601,
7,
2536,
8,
198,
220,
220,
1441,
198,
198,
4299,
3601,
1326,
18,
18820,
7,
965,
15179,
198,
220,
220,
366,
1212,
20842,
257,
3804,
4731,
656,
428,
2163,
1,
198,
220,
220,
3601,
7,
2536,
8,
198,
220,
220,
1441,
198
] | 2.893333 | 75 |
"""
Week 2, day 7, lec 7
"""
# i = 5
# while i >= 0:
# i = i - 1
# if i == 3:
# # break #breaks the smallest loop
# # continue #skips the current iteration and moves on
# # pass #does nothing, but is placehold if you need something for syntax
# print(i)
# for word in 'hello world'.split():
# print(word)
# for str_item in word:
# if str_item == '1':
# break
# print(str_item)
# try:
# print(1/0)
# except ZeroDivisionError:
# print('error')
i = 5
while i >= 0:
try:
print(1/(i-3))
except:
pass
i = i - 1 | [
37811,
198,
20916,
362,
11,
1110,
767,
11,
443,
66,
767,
198,
37811,
198,
198,
2,
1312,
796,
642,
198,
2,
981,
1312,
18189,
657,
25,
198,
2,
220,
220,
220,
220,
1312,
796,
1312,
532,
352,
198,
2,
220,
220,
220,
220,
611,
1312,
6624,
513,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2270,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
30058,
262,
18197,
9052,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2555,
220,
220,
220,
220,
220,
1303,
8135,
2419,
262,
1459,
24415,
290,
6100,
319,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
1208,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
22437,
2147,
11,
475,
318,
1295,
2946,
611,
345,
761,
1223,
329,
15582,
198,
2,
220,
220,
220,
220,
3601,
7,
72,
8,
198,
198,
2,
329,
1573,
287,
705,
31373,
995,
4458,
35312,
33529,
198,
2,
220,
220,
220,
220,
3601,
7,
4775,
8,
198,
2,
220,
220,
220,
220,
329,
965,
62,
9186,
287,
1573,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
611,
965,
62,
9186,
6624,
705,
16,
10354,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
2536,
62,
9186,
8,
198,
198,
2,
1949,
25,
198,
2,
220,
220,
220,
220,
3601,
7,
16,
14,
15,
8,
198,
2,
2845,
12169,
24095,
1166,
12331,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
10786,
18224,
11537,
198,
198,
72,
796,
642,
198,
4514,
1312,
18189,
657,
25,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
16,
29006,
72,
12,
18,
4008,
198,
220,
220,
220,
2845,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
1312,
796,
1312,
532,
352
] | 1.981481 | 324 |
import pandas as pd
import numpy as np
from collections import Counter
from datetime import datetime
from nltk.tokenize import RegexpTokenizer
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
import re
def annotate_logs(comments, tickets):
"""
Annotates comments and tickets with additional information:
1. whether the body was updated (Boolean)
2. the number of PRs and issues opened by the comment author at the time
of the comment posting
3. comment order (comment dataframe only)
4. identify whether ticket is closed (Boolean; ticket dataframe only)
5. identify whether a comment is associated to an issue or a PR
Requires: pandas
Parameters
----------
comments : pd.DataFrame
tickets : pd.DataFrame
Returns
-------
The same dataframe, but with additional columns
Examples
--------
>> import pandas as pd
>> import utils
>> tickets = pd.read_csv("data/numpy/issues.tsv", sep="\t")
>> comments = pd.read_csv("data/numpy/comments.tsv", sep="\t")
>> comments, tickets = utils.annotate_logs(comments, tickets)
"""
# identify whether the body of comments or tickets were updated
comments["was_updated"] = comments["created_at"] != comments["updated_at"]
tickets["was_updated"] = tickets["created_at"] != tickets["updated_at"]
# comments df: add number of PRs created by author to date
num_PR_per_pers = [
sum((tickets["created_at"] < created_at) &
(tickets["type"] == "pull_request") &
(tickets["author_id"] == author_id))
for created_at, author_id
in zip(comments["created_at"], comments["author_id"])]
comments["num_PR_created"] = num_PR_per_pers
# issues df: add number of PRs created by author to date
num_PR_per_pers = [
sum((tickets["created_at"] < created_at) &
(tickets["type"] == "pull_request") &
(tickets["author_id"] == author_id))
for created_at, author_id
in zip(tickets["created_at"], tickets["author_id"])]
tickets["num_PR_created"] = num_PR_per_pers
# comments df: add number of issues created by author to date
num_issue_per_pers = [
sum((tickets["created_at"] < created_at) &
(tickets["type"] == "issue") &
(tickets["author_id"] == author_id))
for created_at, author_id
in zip(comments["created_at"], comments["author_id"])]
comments["num_issue_created"] = num_issue_per_pers
# tickets df: add number of issues created by author to date
num_issue_per_pers = [
sum((tickets["created_at"] < created_at) &
(tickets["type"] == "issue") &
(tickets["author_id"] == author_id))
for created_at, author_id
in zip(tickets["created_at"], tickets["author_id"])]
tickets["num_issue_created"] = num_issue_per_pers
# track the comment order
comments['comment_order'] = comments.sort_values(by=['created_at']) \
.groupby(by=['ticket_id']) \
.cumcount()
# identify whether the PR is closed
tickets['is_closed'] = pd.notnull(tickets['closed_at'])
mask = tickets["closed_at"].isnull()
tickets.loc[mask, "closed_at"] = pd.to_datetime(datetime.now())
open_duration = (
pd.to_datetime(tickets["closed_at"]) -
pd.to_datetime(tickets["created_at"]))
tickets["open_duration"] = open_duration.apply(
lambda x: x.total_seconds())
# Now we want to remove this estimate for anything created before 1970
m = [True if c.startswith("1970") else False
for c in tickets["created_at"]]
tickets.loc[m, "open_duration"] = np.nan
# For each comment, get the information on when the corresponding ticket
# has been opened when it is available (comments can also be added to
# commits)
tickets.set_index("ticket_id", inplace=True, drop=False)
# We're using the reindex function to tacket the case where we don't have
# the ticket associated to a particular comment.
comments["ticket_created_at"] = tickets.reindex(
comments["ticket_id"])["created_at"].values
comments["type"] = tickets.reindex(
comments["ticket_id"])["type"].values
# Reset the old index
tickets.set_index("id", inplace=True, drop=False)
# return the dataframes
return comments, tickets
def body_cleanup(comments, grateful_list, bot_list):
"""
Prepare comment or issue dataframe for text analysis:
1. Count number of times gratitude words appear in HTML comments
(i.e., auto-generated templates for PRs and issues provided
by projects)
2. Remove HTML comments
3. Remove quoted text
4. Strip newlines
5. Count and remove code blocks
6. Identify other users referenced in body
7. Flag whether the author was a bot
Requires: pandas , nltk , collections , re
Parameters
----------
comments : pd.DataFrame, ideally annotated with `annotate_logs()`;
can be run with either comments df or issues/tickets df
grateful_list : list or pd.Series of gratitude words to identify;
currently works only with grateful unigrams
bot_list : list or pd.Series of bot usernames to be ignored
Returns
-------
The same dataframe, but with cleaned body text and new columns
(code_blocks , referenced_users , bot_flag)
Examples
--------
>> import pandas as pd
>> import utils
>> comments = pd.read_csv("data/numpy/comments.tsv", sep="\t")
>> comments, tickets = utils.annotate.annotate_logs(comments, tickets)
>> comments = utils.annotate.body_cleanup(comments, bot_list_df)
"""
# replace all NaN with empty strings
comments['body'] = comments['body'].replace(np.nan, '', regex=True)
# count thanks in HTML comments
comments['html_comments'] = comments['body'].str.findall('(\<\!--.*?--\>)').apply(' '.join)
# tokenize and count words
tokenizer = RegexpTokenizer(r'\w+')
comments['html_tokenized'] = comments['html_comments'].apply(str.lower).apply(tokenizer.tokenize)
comments['html_word_count'] = comments['html_tokenized'].apply(lambda x: Counter(x))
# count words if they're in our grateful list
comments['automatic_grateful_count'] = (
comments['html_word_count'].apply(
lambda x: np.sum([v for k, v in x.items()
if k in grateful_list])))
# let us know which ones were used
comments['automatic_grateful_list'] = (
comments['html_word_count'].apply(
lambda x: [k for k in x if k in grateful_list]))
# remove the columns we don't need anymore
comments = comments.drop(columns=['html_tokenized',
'html_word_count'])
# remove the HTML comments from the body
comments['body'] = (comments['body'].str.replace(
"(<!--.*?-->)", " ",
regex=True,
flags=re.DOTALL))
# remove text quotes
comments['body'] = (comments['body'].replace(
"(^|\n|\r)+\>.*(?=\n|$)", " ",
regex=True))
# remove newlines
comments['body'] = (comments['body'].replace(
"[\n\r]+", " ", regex=True))
# count and then remove code blocks
comments['code_blocks'] = comments['body'].str.count("\`{3}")/2
comments['body'] = (comments['body'].replace(
"\`{3}.*\`{3}", " ", regex=True))
# identify other humans
comments['referenced_users'] = comments['body'].str.findall('@\w{1,}')
# identify bots
comments['bot_flag'] = comments['author_name'].isin(bot_list)
# return our dataframe
return comments
def add_sentiment(comments):
"""
Add sentiment analysis scores to comments dataframe:
* negative emotion
* positive emotion
* neutral emotion
* compound emotion
Requires: pandas , vaderSentiment
For more on vaderSentiment, see https://github.com/cjhutto/vaderSentiment
Parameters
----------
comments : pd.DataFrame
ideally after `annotate_logs()` and `body_cleanup()`;
can be run with either comments df or issues/tickets df
Returns
-------
The same dataframe but with new sentiment columns
Examples
--------
>> import pandas as pd
>> import utils
>> comments = pd.read_csv("data/numpy/comments.tsv", sep="\t")
>> comments, tickets = utils.annotate.annotate_logs(comments, tickets)
>> comments = utils.annotate.body_cleanup(comments, bot_list_df)
>> comments = utils.annotate.add_sentiment(comments)
"""
# initialize sentiment analyzer
analyser = SentimentIntensityAnalyzer()
# remove NaNs
comments['body'] = comments['body'].replace(np.nan, ' ', regex=True)
# run sentiment analyzer over each comment body
sentiment_df = (
comments['body']
.apply(analyser.polarity_scores)
.astype(str)
.str.strip('{}')
.str.split(', ', expand=True))
# split the emotion output dictionary into new columns
# (thanks to https://stackoverflow.com/a/13053267 for partial solution)
comments['negative_emotion'] = sentiment_df[0].str.split(
': ').str[-1].astype(float)
comments['neutral_emotion'] = sentiment_df[1].str.split(
': ').str[-1].astype(float)
comments['positive_emotion'] = sentiment_df[2].str.split(
': ').str[-1].astype(float)
comments['compound_emotion'] = sentiment_df[3].str.split(
': ').str[-1].astype(float)
# return our dataframe
return comments
def add_gratitude(comments, grateful_list):
"""
Track expressions of gratitude:
* overall counts
* specific words
Thanks to https://stackoverflow.com/a/47686394
Requires: pandas , nltk , collections
Parameters
----------
comments : pd.DataFrame
ideally after `annotate_logs()` and `body_cleanup()`;
can be run with either comments df or issues/tickets df
grateful_list : list or pd.Series of gratitude words to identify;
currently works only with grateful unigrams
Returns
-------
The same dataframe but with new gratitude columns
Examples
--------
>> import pandas as pd
>> import utils
>> comments = pd.read_csv("data/numpy/comments.tsv", sep="\t")
>> comments, tickets = utils.annotate.annotate_logs(comments, tickets)
>> comments = utils.annotate.body_cleanup(comments, bot_list_df)
>> comments = utils.annotate.add_gratitude(comments)
"""
# tokenize and count words
tokenizer = RegexpTokenizer(r'\w+')
comments['tokenized'] = comments['body'].apply(
str.lower).apply(tokenizer.tokenize)
comments['word_count'] = comments['tokenized'].apply(lambda x: Counter(x))
# count words if they're in our grateful list
comments['grateful_count'] = (
comments['word_count'].apply(
lambda x: np.sum([v for k, v in x.items()
if k in grateful_list])))
# let us know which ones were used
comments['grateful_list'] = (
comments['word_count'].apply(
lambda x: [k for k in x if k in grateful_list]))
# remove the columns we don't need anymore
comments = comments.drop(columns=['tokenized', 'word_count'])
# spit back our dataframe now
return comments
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
17268,
1330,
15034,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
299,
2528,
74,
13,
30001,
1096,
1330,
797,
25636,
79,
30642,
7509,
198,
6738,
410,
5067,
31837,
3681,
13,
85,
5067,
31837,
3681,
1330,
11352,
3681,
5317,
6377,
37702,
9107,
198,
11748,
302,
628,
198,
4299,
24708,
378,
62,
6404,
82,
7,
15944,
11,
8587,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1052,
1662,
689,
3651,
290,
8587,
351,
3224,
1321,
25,
628,
220,
220,
220,
352,
13,
1771,
262,
1767,
373,
6153,
357,
46120,
13087,
8,
198,
220,
220,
220,
362,
13,
262,
1271,
286,
4810,
82,
290,
2428,
4721,
416,
262,
2912,
1772,
379,
262,
640,
198,
220,
220,
220,
220,
220,
220,
220,
220,
286,
262,
2912,
10754,
198,
220,
220,
220,
513,
13,
2912,
1502,
357,
23893,
1366,
14535,
691,
8,
198,
220,
220,
220,
604,
13,
5911,
1771,
7846,
318,
4838,
357,
46120,
13087,
26,
7846,
1366,
14535,
691,
8,
198,
220,
220,
220,
642,
13,
5911,
1771,
257,
2912,
318,
3917,
284,
281,
2071,
393,
257,
4810,
628,
220,
220,
220,
26848,
25,
19798,
292,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
3651,
1058,
279,
67,
13,
6601,
19778,
628,
220,
220,
220,
8587,
1058,
279,
67,
13,
6601,
19778,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
383,
976,
1366,
14535,
11,
475,
351,
3224,
15180,
628,
220,
220,
220,
21066,
198,
220,
220,
220,
24200,
198,
220,
220,
220,
9609,
1330,
19798,
292,
355,
279,
67,
198,
220,
220,
220,
9609,
1330,
3384,
4487,
198,
220,
220,
220,
9609,
8587,
796,
279,
67,
13,
961,
62,
40664,
7203,
7890,
14,
77,
32152,
14,
37165,
13,
912,
85,
1600,
41767,
2625,
59,
83,
4943,
198,
220,
220,
220,
9609,
3651,
796,
279,
67,
13,
961,
62,
40664,
7203,
7890,
14,
77,
32152,
14,
15944,
13,
912,
85,
1600,
41767,
2625,
59,
83,
4943,
198,
220,
220,
220,
9609,
3651,
11,
8587,
796,
3384,
4487,
13,
34574,
378,
62,
6404,
82,
7,
15944,
11,
8587,
8,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1303,
5911,
1771,
262,
1767,
286,
3651,
393,
8587,
547,
6153,
198,
220,
220,
220,
3651,
14692,
9776,
62,
43162,
8973,
796,
3651,
14692,
25598,
62,
265,
8973,
14512,
3651,
14692,
43162,
62,
265,
8973,
198,
220,
220,
220,
8587,
14692,
9776,
62,
43162,
8973,
796,
8587,
14692,
25598,
62,
265,
8973,
14512,
8587,
14692,
43162,
62,
265,
8973,
628,
220,
220,
220,
1303,
3651,
47764,
25,
751,
1271,
286,
4810,
82,
2727,
416,
1772,
284,
3128,
198,
220,
220,
220,
997,
62,
4805,
62,
525,
62,
19276,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
2160,
19510,
83,
15970,
14692,
25598,
62,
265,
8973,
1279,
2727,
62,
265,
8,
1222,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
83,
15970,
14692,
4906,
8973,
6624,
366,
31216,
62,
25927,
4943,
1222,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
83,
15970,
14692,
9800,
62,
312,
8973,
6624,
1772,
62,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
329,
2727,
62,
265,
11,
1772,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
287,
19974,
7,
15944,
14692,
25598,
62,
265,
33116,
3651,
14692,
9800,
62,
312,
8973,
15437,
198,
220,
220,
220,
3651,
14692,
22510,
62,
4805,
62,
25598,
8973,
796,
997,
62,
4805,
62,
525,
62,
19276,
628,
220,
220,
220,
1303,
2428,
47764,
25,
751,
1271,
286,
4810,
82,
2727,
416,
1772,
284,
3128,
198,
220,
220,
220,
997,
62,
4805,
62,
525,
62,
19276,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
2160,
19510,
83,
15970,
14692,
25598,
62,
265,
8973,
1279,
2727,
62,
265,
8,
1222,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
83,
15970,
14692,
4906,
8973,
6624,
366,
31216,
62,
25927,
4943,
1222,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
83,
15970,
14692,
9800,
62,
312,
8973,
6624,
1772,
62,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
329,
2727,
62,
265,
11,
1772,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
287,
19974,
7,
83,
15970,
14692,
25598,
62,
265,
33116,
8587,
14692,
9800,
62,
312,
8973,
15437,
198,
220,
220,
220,
8587,
14692,
22510,
62,
4805,
62,
25598,
8973,
796,
997,
62,
4805,
62,
525,
62,
19276,
628,
220,
220,
220,
1303,
3651,
47764,
25,
751,
1271,
286,
2428,
2727,
416,
1772,
284,
3128,
198,
220,
220,
220,
997,
62,
21949,
62,
525,
62,
19276,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
2160,
19510,
83,
15970,
14692,
25598,
62,
265,
8973,
1279,
2727,
62,
265,
8,
1222,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
83,
15970,
14692,
4906,
8973,
6624,
366,
21949,
4943,
1222,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
83,
15970,
14692,
9800,
62,
312,
8973,
6624,
1772,
62,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
329,
2727,
62,
265,
11,
1772,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
287,
19974,
7,
15944,
14692,
25598,
62,
265,
33116,
3651,
14692,
9800,
62,
312,
8973,
15437,
198,
220,
220,
220,
3651,
14692,
22510,
62,
21949,
62,
25598,
8973,
796,
997,
62,
21949,
62,
525,
62,
19276,
628,
220,
220,
220,
1303,
8587,
47764,
25,
751,
1271,
286,
2428,
2727,
416,
1772,
284,
3128,
198,
220,
220,
220,
997,
62,
21949,
62,
525,
62,
19276,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
2160,
19510,
83,
15970,
14692,
25598,
62,
265,
8973,
1279,
2727,
62,
265,
8,
1222,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
83,
15970,
14692,
4906,
8973,
6624,
366,
21949,
4943,
1222,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
83,
15970,
14692,
9800,
62,
312,
8973,
6624,
1772,
62,
312,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
329,
2727,
62,
265,
11,
1772,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
287,
19974,
7,
83,
15970,
14692,
25598,
62,
265,
33116,
8587,
14692,
9800,
62,
312,
8973,
15437,
198,
220,
220,
220,
8587,
14692,
22510,
62,
21949,
62,
25598,
8973,
796,
997,
62,
21949,
62,
525,
62,
19276,
628,
220,
220,
220,
1303,
2610,
262,
2912,
1502,
198,
220,
220,
220,
3651,
17816,
23893,
62,
2875,
20520,
796,
3651,
13,
30619,
62,
27160,
7,
1525,
28,
17816,
25598,
62,
265,
6,
12962,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
8094,
1525,
7,
1525,
28,
17816,
43350,
62,
312,
6,
12962,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
36340,
9127,
3419,
628,
220,
220,
220,
1303,
5911,
1771,
262,
4810,
318,
4838,
198,
220,
220,
220,
8587,
17816,
271,
62,
20225,
20520,
796,
279,
67,
13,
1662,
8423,
7,
83,
15970,
17816,
20225,
62,
265,
6,
12962,
198,
220,
220,
220,
9335,
796,
8587,
14692,
20225,
62,
265,
1,
4083,
271,
8423,
3419,
198,
220,
220,
220,
8587,
13,
17946,
58,
27932,
11,
366,
20225,
62,
265,
8973,
796,
279,
67,
13,
1462,
62,
19608,
8079,
7,
19608,
8079,
13,
2197,
28955,
198,
220,
220,
220,
1280,
62,
32257,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
279,
67,
13,
1462,
62,
19608,
8079,
7,
83,
15970,
14692,
20225,
62,
265,
8973,
8,
532,
198,
220,
220,
220,
220,
220,
220,
220,
279,
67,
13,
1462,
62,
19608,
8079,
7,
83,
15970,
14692,
25598,
62,
265,
8973,
4008,
198,
220,
220,
220,
8587,
14692,
9654,
62,
32257,
8973,
796,
1280,
62,
32257,
13,
39014,
7,
198,
220,
220,
220,
220,
220,
220,
220,
37456,
2124,
25,
2124,
13,
23350,
62,
43012,
28955,
628,
220,
220,
220,
1303,
2735,
356,
765,
284,
4781,
428,
8636,
329,
1997,
2727,
878,
8069,
198,
220,
220,
220,
285,
796,
685,
17821,
611,
269,
13,
9688,
2032,
342,
7203,
30986,
4943,
2073,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
329,
269,
287,
8587,
14692,
25598,
62,
265,
8973,
60,
198,
220,
220,
220,
8587,
13,
17946,
58,
76,
11,
366,
9654,
62,
32257,
8973,
796,
45941,
13,
12647,
628,
220,
220,
220,
1303,
1114,
1123,
2912,
11,
651,
262,
1321,
319,
618,
262,
11188,
7846,
198,
220,
220,
220,
1303,
468,
587,
4721,
618,
340,
318,
1695,
357,
15944,
460,
635,
307,
2087,
284,
198,
220,
220,
220,
1303,
23463,
8,
198,
220,
220,
220,
8587,
13,
2617,
62,
9630,
7203,
43350,
62,
312,
1600,
287,
5372,
28,
17821,
11,
4268,
28,
25101,
8,
628,
220,
220,
220,
1303,
775,
821,
1262,
262,
302,
9630,
2163,
284,
6331,
316,
262,
1339,
810,
356,
836,
470,
423,
198,
220,
220,
220,
1303,
262,
7846,
3917,
284,
257,
1948,
2912,
13,
198,
220,
220,
220,
3651,
14692,
43350,
62,
25598,
62,
265,
8973,
796,
8587,
13,
260,
9630,
7,
198,
220,
220,
220,
220,
220,
220,
220,
3651,
14692,
43350,
62,
312,
8973,
8,
14692,
25598,
62,
265,
1,
4083,
27160,
198,
220,
220,
220,
3651,
14692,
4906,
8973,
796,
8587,
13,
260,
9630,
7,
198,
220,
220,
220,
220,
220,
220,
220,
3651,
14692,
43350,
62,
312,
8973,
8,
14692,
4906,
1,
4083,
27160,
198,
220,
220,
220,
1303,
30027,
262,
1468,
6376,
198,
220,
220,
220,
8587,
13,
2617,
62,
9630,
7203,
312,
1600,
287,
5372,
28,
17821,
11,
4268,
28,
25101,
8,
628,
220,
220,
220,
1303,
1441,
262,
1366,
37805,
198,
220,
220,
220,
1441,
3651,
11,
8587,
628,
198,
4299,
1767,
62,
27773,
929,
7,
15944,
11,
14066,
62,
4868,
11,
10214,
62,
4868,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
43426,
2912,
393,
2071,
1366,
14535,
329,
2420,
3781,
25,
198,
220,
220,
220,
220,
198,
220,
220,
220,
352,
13,
2764,
1271,
286,
1661,
24083,
2456,
1656,
287,
11532,
3651,
198,
220,
220,
220,
220,
220,
220,
220,
357,
72,
13,
68,
1539,
8295,
12,
27568,
24019,
329,
4810,
82,
290,
2428,
2810,
198,
220,
220,
220,
220,
220,
220,
220,
416,
4493,
8,
198,
220,
220,
220,
362,
13,
17220,
11532,
3651,
198,
220,
220,
220,
513,
13,
17220,
10947,
2420,
198,
220,
220,
220,
604,
13,
18508,
649,
6615,
198,
220,
220,
220,
642,
13,
2764,
290,
4781,
2438,
7021,
198,
220,
220,
220,
718,
13,
11440,
1958,
584,
2985,
20717,
287,
1767,
198,
220,
220,
220,
767,
13,
19762,
1771,
262,
1772,
373,
257,
10214,
628,
220,
220,
220,
26848,
25,
19798,
292,
837,
299,
2528,
74,
837,
17268,
837,
302,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
3651,
1058,
279,
67,
13,
6601,
19778,
11,
30274,
24708,
515,
351,
4600,
34574,
378,
62,
6404,
82,
3419,
63,
26,
198,
220,
220,
220,
220,
220,
220,
220,
460,
307,
1057,
351,
2035,
3651,
47764,
393,
2428,
14,
83,
15970,
47764,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
14066,
62,
4868,
1058,
1351,
393,
279,
67,
13,
27996,
286,
24083,
2456,
284,
5911,
26,
198,
220,
220,
220,
220,
220,
220,
220,
3058,
2499,
691,
351,
14066,
555,
328,
9474,
628,
220,
220,
220,
10214,
62,
4868,
1058,
1351,
393,
279,
67,
13,
27996,
286,
10214,
514,
1142,
1047,
284,
307,
9514,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
383,
976,
1366,
14535,
11,
475,
351,
20750,
1767,
2420,
290,
649,
15180,
198,
220,
220,
220,
357,
8189,
62,
27372,
837,
20717,
62,
18417,
837,
10214,
62,
32109,
8,
628,
220,
220,
220,
21066,
198,
220,
220,
220,
24200,
198,
220,
220,
220,
9609,
1330,
19798,
292,
355,
279,
67,
198,
220,
220,
220,
9609,
1330,
3384,
4487,
198,
220,
220,
220,
9609,
3651,
796,
279,
67,
13,
961,
62,
40664,
7203,
7890,
14,
77,
32152,
14,
15944,
13,
912,
85,
1600,
41767,
2625,
59,
83,
4943,
198,
220,
220,
220,
9609,
3651,
11,
8587,
796,
3384,
4487,
13,
34574,
378,
13,
34574,
378,
62,
6404,
82,
7,
15944,
11,
8587,
8,
198,
220,
220,
220,
9609,
3651,
796,
3384,
4487,
13,
34574,
378,
13,
2618,
62,
27773,
929,
7,
15944,
11,
10214,
62,
4868,
62,
7568,
8,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
6330,
477,
11013,
45,
351,
6565,
13042,
198,
220,
220,
220,
3651,
17816,
2618,
20520,
796,
3651,
17816,
2618,
6,
4083,
33491,
7,
37659,
13,
12647,
11,
705,
3256,
40364,
28,
17821,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
954,
5176,
287,
11532,
3651,
198,
220,
220,
220,
3651,
17816,
6494,
62,
15944,
20520,
796,
3651,
17816,
2618,
6,
4083,
2536,
13,
19796,
439,
10786,
38016,
27,
59,
28112,
15885,
30,
438,
59,
43734,
27691,
39014,
10786,
45302,
22179,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
11241,
1096,
290,
954,
2456,
198,
220,
220,
220,
11241,
7509,
796,
797,
25636,
79,
30642,
7509,
7,
81,
6,
59,
86,
10,
11537,
198,
220,
220,
220,
3651,
17816,
6494,
62,
30001,
1143,
20520,
796,
3651,
17816,
6494,
62,
15944,
6,
4083,
39014,
7,
2536,
13,
21037,
737,
39014,
7,
30001,
7509,
13,
30001,
1096,
8,
198,
220,
220,
220,
3651,
17816,
6494,
62,
4775,
62,
9127,
20520,
796,
3651,
17816,
6494,
62,
30001,
1143,
6,
4083,
39014,
7,
50033,
2124,
25,
15034,
7,
87,
4008,
628,
220,
220,
220,
1303,
954,
2456,
611,
484,
821,
287,
674,
14066,
1351,
198,
220,
220,
220,
3651,
17816,
37800,
62,
2164,
11850,
62,
9127,
20520,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
3651,
17816,
6494,
62,
4775,
62,
9127,
6,
4083,
39014,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37456,
2124,
25,
45941,
13,
16345,
26933,
85,
329,
479,
11,
410,
287,
2124,
13,
23814,
3419,
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,
611,
479,
287,
14066,
62,
4868,
60,
22305,
628,
220,
220,
220,
1303,
1309,
514,
760,
543,
3392,
547,
973,
198,
220,
220,
220,
3651,
17816,
37800,
62,
2164,
11850,
62,
4868,
20520,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
3651,
17816,
6494,
62,
4775,
62,
9127,
6,
4083,
39014,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37456,
2124,
25,
685,
74,
329,
479,
287,
2124,
611,
479,
287,
14066,
62,
4868,
60,
4008,
628,
220,
220,
220,
1303,
4781,
262,
15180,
356,
836,
470,
761,
7471,
198,
220,
220,
220,
3651,
796,
3651,
13,
14781,
7,
28665,
82,
28,
17816,
6494,
62,
30001,
1143,
3256,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
6494,
62,
4775,
62,
9127,
6,
12962,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
4781,
262,
11532,
3651,
422,
262,
1767,
198,
220,
220,
220,
3651,
17816,
2618,
20520,
796,
357,
15944,
17816,
2618,
6,
4083,
2536,
13,
33491,
7,
198,
220,
220,
220,
220,
220,
220,
220,
30629,
27,
28112,
15885,
30,
46904,
42501,
366,
33172,
198,
220,
220,
220,
220,
220,
220,
220,
40364,
28,
17821,
11,
198,
220,
220,
220,
220,
220,
220,
220,
9701,
28,
260,
13,
35,
2394,
7036,
4008,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
4781,
2420,
13386,
198,
220,
220,
220,
3651,
17816,
2618,
20520,
796,
357,
15944,
17816,
2618,
6,
4083,
33491,
7,
198,
220,
220,
220,
220,
220,
220,
220,
30629,
61,
91,
59,
77,
91,
59,
81,
47762,
59,
29,
15885,
7,
30,
28,
59,
77,
91,
3,
42501,
366,
33172,
198,
220,
220,
220,
220,
220,
220,
220,
40364,
28,
17821,
4008,
628,
220,
220,
220,
1303,
4781,
649,
6615,
198,
220,
220,
220,
3651,
17816,
2618,
20520,
796,
357,
15944,
17816,
2618,
6,
4083,
33491,
7,
198,
220,
220,
220,
220,
220,
220,
220,
12878,
59,
77,
59,
81,
48688,
1600,
366,
33172,
40364,
28,
17821,
4008,
628,
220,
220,
220,
1303,
954,
290,
788,
4781,
2438,
7021,
198,
220,
220,
220,
3651,
17816,
8189,
62,
27372,
20520,
796,
3651,
17816,
2618,
6,
4083,
2536,
13,
9127,
7203,
59,
63,
90,
18,
92,
4943,
14,
17,
198,
220,
220,
220,
3651,
17816,
2618,
20520,
796,
357,
15944,
17816,
2618,
6,
4083,
33491,
7,
198,
220,
220,
220,
220,
220,
220,
220,
37082,
63,
90,
18,
92,
15885,
59,
63,
90,
18,
92,
1600,
366,
33172,
40364,
28,
17821,
4008,
628,
220,
220,
220,
1303,
5911,
584,
5384,
198,
220,
220,
220,
3651,
17816,
5420,
14226,
771,
62,
18417,
20520,
796,
3651,
17816,
2618,
6,
4083,
2536,
13,
19796,
439,
10786,
31,
59,
86,
90,
16,
11,
92,
11537,
628,
220,
220,
220,
1303,
5911,
29641,
198,
220,
220,
220,
3651,
17816,
13645,
62,
32109,
20520,
796,
3651,
17816,
9800,
62,
3672,
6,
4083,
45763,
7,
13645,
62,
4868,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
1441,
674,
1366,
14535,
198,
220,
220,
220,
1441,
3651,
628,
198,
4299,
751,
62,
34086,
3681,
7,
15944,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3060,
15598,
3781,
8198,
284,
3651,
1366,
14535,
25,
198,
220,
220,
220,
1635,
4633,
9942,
198,
220,
220,
220,
1635,
3967,
9942,
198,
220,
220,
220,
1635,
8500,
9942,
198,
220,
220,
220,
1635,
13061,
9942,
628,
220,
220,
220,
26848,
25,
19798,
292,
837,
410,
5067,
31837,
3681,
628,
220,
220,
220,
1114,
517,
319,
410,
5067,
31837,
3681,
11,
766,
3740,
1378,
12567,
13,
785,
14,
66,
73,
71,
315,
1462,
14,
85,
5067,
31837,
3681,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
3651,
1058,
279,
67,
13,
6601,
19778,
198,
220,
220,
220,
220,
220,
220,
220,
30274,
706,
4600,
34574,
378,
62,
6404,
82,
3419,
63,
290,
4600,
2618,
62,
27773,
929,
3419,
63,
26,
198,
220,
220,
220,
220,
220,
220,
220,
460,
307,
1057,
351,
2035,
3651,
47764,
393,
2428,
14,
83,
15970,
47764,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
383,
976,
1366,
14535,
475,
351,
649,
15598,
15180,
628,
220,
220,
220,
21066,
198,
220,
220,
220,
24200,
198,
220,
220,
220,
9609,
1330,
19798,
292,
355,
279,
67,
198,
220,
220,
220,
9609,
1330,
3384,
4487,
198,
220,
220,
220,
9609,
3651,
796,
279,
67,
13,
961,
62,
40664,
7203,
7890,
14,
77,
32152,
14,
15944,
13,
912,
85,
1600,
41767,
2625,
59,
83,
4943,
198,
220,
220,
220,
9609,
3651,
11,
8587,
796,
3384,
4487,
13,
34574,
378,
13,
34574,
378,
62,
6404,
82,
7,
15944,
11,
8587,
8,
198,
220,
220,
220,
9609,
3651,
796,
3384,
4487,
13,
34574,
378,
13,
2618,
62,
27773,
929,
7,
15944,
11,
10214,
62,
4868,
62,
7568,
8,
198,
220,
220,
220,
9609,
3651,
796,
3384,
4487,
13,
34574,
378,
13,
2860,
62,
34086,
3681,
7,
15944,
8,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1303,
41216,
15598,
4284,
9107,
198,
220,
220,
220,
11090,
263,
796,
11352,
3681,
5317,
6377,
37702,
9107,
3419,
628,
220,
220,
220,
1303,
4781,
11013,
47503,
198,
220,
220,
220,
3651,
17816,
2618,
20520,
796,
3651,
17816,
2618,
6,
4083,
33491,
7,
37659,
13,
12647,
11,
705,
46083,
40364,
28,
17821,
8,
628,
220,
220,
220,
1303,
1057,
15598,
4284,
9107,
625,
1123,
2912,
1767,
198,
220,
220,
220,
15598,
62,
7568,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
3651,
17816,
2618,
20520,
198,
220,
220,
220,
220,
220,
220,
220,
764,
39014,
7,
272,
26266,
263,
13,
79,
6192,
414,
62,
1416,
2850,
8,
198,
220,
220,
220,
220,
220,
220,
220,
764,
459,
2981,
7,
2536,
8,
198,
220,
220,
220,
220,
220,
220,
220,
764,
2536,
13,
36311,
10786,
90,
92,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
764,
2536,
13,
35312,
7,
3256,
46083,
4292,
28,
17821,
4008,
628,
220,
220,
220,
1303,
6626,
262,
9942,
5072,
22155,
656,
649,
15180,
198,
220,
220,
220,
1303,
357,
27547,
284,
3740,
1378,
25558,
2502,
11125,
13,
785,
14,
64,
14,
12952,
4310,
25674,
329,
13027,
4610,
8,
198,
220,
220,
220,
3651,
17816,
31591,
62,
368,
9650,
20520,
796,
15598,
62,
7568,
58,
15,
4083,
2536,
13,
35312,
7,
198,
220,
220,
220,
220,
220,
220,
220,
705,
25,
705,
737,
2536,
58,
12,
16,
4083,
459,
2981,
7,
22468,
8,
198,
220,
220,
220,
3651,
17816,
29797,
62,
368,
9650,
20520,
796,
15598,
62,
7568,
58,
16,
4083,
2536,
13,
35312,
7,
198,
220,
220,
220,
220,
220,
220,
220,
705,
25,
705,
737,
2536,
58,
12,
16,
4083,
459,
2981,
7,
22468,
8,
198,
220,
220,
220,
3651,
17816,
24561,
62,
368,
9650,
20520,
796,
15598,
62,
7568,
58,
17,
4083,
2536,
13,
35312,
7,
198,
220,
220,
220,
220,
220,
220,
220,
705,
25,
705,
737,
2536,
58,
12,
16,
4083,
459,
2981,
7,
22468,
8,
198,
220,
220,
220,
3651,
17816,
5589,
633,
62,
368,
9650,
20520,
796,
15598,
62,
7568,
58,
18,
4083,
2536,
13,
35312,
7,
198,
220,
220,
220,
220,
220,
220,
220,
705,
25,
705,
737,
2536,
58,
12,
16,
4083,
459,
2981,
7,
22468,
8,
628,
220,
220,
220,
1303,
1441,
674,
1366,
14535,
198,
220,
220,
220,
1441,
3651,
628,
198,
4299,
751,
62,
2164,
265,
3984,
7,
15944,
11,
14066,
62,
4868,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
17762,
14700,
286,
24083,
25,
198,
220,
220,
220,
1635,
4045,
9853,
198,
220,
220,
220,
1635,
2176,
2456,
628,
220,
220,
220,
6930,
284,
3740,
1378,
25558,
2502,
11125,
13,
785,
14,
64,
14,
2857,
33808,
34626,
628,
220,
220,
220,
26848,
25,
19798,
292,
837,
299,
2528,
74,
837,
17268,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
3651,
1058,
279,
67,
13,
6601,
19778,
198,
220,
220,
220,
220,
220,
220,
220,
30274,
706,
4600,
34574,
378,
62,
6404,
82,
3419,
63,
290,
4600,
2618,
62,
27773,
929,
3419,
63,
26,
198,
220,
220,
220,
220,
220,
220,
220,
460,
307,
1057,
351,
2035,
3651,
47764,
393,
2428,
14,
83,
15970,
47764,
628,
220,
220,
220,
14066,
62,
4868,
1058,
1351,
393,
279,
67,
13,
27996,
286,
24083,
2456,
284,
5911,
26,
198,
220,
220,
220,
220,
220,
220,
220,
3058,
2499,
691,
351,
14066,
555,
328,
9474,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
383,
976,
1366,
14535,
475,
351,
649,
24083,
15180,
628,
220,
220,
220,
21066,
198,
220,
220,
220,
24200,
198,
220,
220,
220,
9609,
1330,
19798,
292,
355,
279,
67,
198,
220,
220,
220,
9609,
1330,
3384,
4487,
198,
220,
220,
220,
9609,
3651,
796,
279,
67,
13,
961,
62,
40664,
7203,
7890,
14,
77,
32152,
14,
15944,
13,
912,
85,
1600,
41767,
2625,
59,
83,
4943,
198,
220,
220,
220,
9609,
3651,
11,
8587,
796,
3384,
4487,
13,
34574,
378,
13,
34574,
378,
62,
6404,
82,
7,
15944,
11,
8587,
8,
198,
220,
220,
220,
9609,
3651,
796,
3384,
4487,
13,
34574,
378,
13,
2618,
62,
27773,
929,
7,
15944,
11,
10214,
62,
4868,
62,
7568,
8,
198,
220,
220,
220,
9609,
3651,
796,
3384,
4487,
13,
34574,
378,
13,
2860,
62,
2164,
265,
3984,
7,
15944,
8,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
1303,
11241,
1096,
290,
954,
2456,
198,
220,
220,
220,
11241,
7509,
796,
797,
25636,
79,
30642,
7509,
7,
81,
6,
59,
86,
10,
11537,
198,
220,
220,
220,
3651,
17816,
30001,
1143,
20520,
796,
3651,
17816,
2618,
6,
4083,
39014,
7,
198,
220,
220,
220,
220,
220,
220,
220,
965,
13,
21037,
737,
39014,
7,
30001,
7509,
13,
30001,
1096,
8,
198,
220,
220,
220,
3651,
17816,
4775,
62,
9127,
20520,
796,
3651,
17816,
30001,
1143,
6,
4083,
39014,
7,
50033,
2124,
25,
15034,
7,
87,
4008,
628,
220,
220,
220,
1303,
954,
2456,
611,
484,
821,
287,
674,
14066,
1351,
198,
220,
220,
220,
3651,
17816,
2164,
11850,
62,
9127,
20520,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
3651,
17816,
4775,
62,
9127,
6,
4083,
39014,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37456,
2124,
25,
45941,
13,
16345,
26933,
85,
329,
479,
11,
410,
287,
2124,
13,
23814,
3419,
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,
611,
479,
287,
14066,
62,
4868,
60,
22305,
628,
220,
220,
220,
1303,
1309,
514,
760,
543,
3392,
547,
973,
198,
220,
220,
220,
3651,
17816,
2164,
11850,
62,
4868,
20520,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
3651,
17816,
4775,
62,
9127,
6,
4083,
39014,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37456,
2124,
25,
685,
74,
329,
479,
287,
2124,
611,
479,
287,
14066,
62,
4868,
60,
4008,
628,
220,
220,
220,
1303,
4781,
262,
15180,
356,
836,
470,
761,
7471,
198,
220,
220,
220,
3651,
796,
3651,
13,
14781,
7,
28665,
82,
28,
17816,
30001,
1143,
3256,
705,
4775,
62,
9127,
6,
12962,
628,
220,
220,
220,
1303,
27591,
736,
674,
1366,
14535,
783,
198,
220,
220,
220,
1441,
3651,
198
] | 2.62787 | 4,356 |
from lldbsuite.test import decorators
from lldbsuite.test import lldbinline
lldbinline.MakeInlineTest(
__file__, globals(), [
decorators.skipIfFreeBSD, decorators.skipIfLinux,
decorators.skipIfWindows,
decorators.expectedFailureAll(
oslist=['macosx'], archs=['i386'],
bugnumber='rdar://28656677')])
| [
6738,
32660,
67,
1443,
84,
578,
13,
9288,
1330,
11705,
2024,
198,
6738,
32660,
67,
1443,
84,
578,
13,
9288,
1330,
32660,
67,
8800,
1370,
198,
198,
297,
67,
8800,
1370,
13,
12050,
818,
1370,
14402,
7,
198,
220,
220,
220,
11593,
7753,
834,
11,
15095,
874,
22784,
685,
198,
220,
220,
220,
220,
220,
220,
220,
11705,
2024,
13,
48267,
1532,
11146,
21800,
11,
11705,
2024,
13,
48267,
1532,
19314,
11,
198,
220,
220,
220,
220,
220,
220,
220,
11705,
2024,
13,
48267,
1532,
11209,
11,
198,
220,
220,
220,
220,
220,
220,
220,
11705,
2024,
13,
40319,
50015,
3237,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28686,
4868,
28,
17816,
20285,
418,
87,
6,
4357,
3934,
82,
28,
17816,
72,
21734,
6,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
809,
4593,
4494,
11639,
4372,
283,
1378,
2078,
2996,
2791,
3324,
11537,
12962,
198
] | 2.242038 | 157 |
"""Adapt repository rules in npm_import.bzl to be called from MODULE.bazel
See https://bazel.build/docs/bzlmod#extension-definition
"""
load("//js/private:pnpm_utils.bzl", "pnpm_utils")
load("//js/private:translate_pnpm_lock.bzl", translate_pnpm_lock_lib = "translate_pnpm_lock")
load("//js:npm_import.bzl", "npm_import", "translate_pnpm_lock")
load("//js/private:transitive_closure.bzl", "translate_to_transitive_closure")
npm = module_extension(
implementation = _extension_impl,
tag_classes = {
"translate_pnpm_lock": tag_class(attrs = dict({"name": attr.string()}, **translate_pnpm_lock_lib.attrs)),
# todo: support individual packages as well
# "package": tag_class(attrs = dict({"name": attr.string()}, **_npm_import.attrs)),
},
)
| [
37811,
48003,
16099,
3173,
287,
30599,
62,
11748,
13,
65,
48274,
284,
307,
1444,
422,
33893,
13,
65,
41319,
198,
6214,
3740,
1378,
65,
41319,
13,
11249,
14,
31628,
14,
65,
48274,
4666,
2,
2302,
3004,
12,
46758,
198,
37811,
198,
198,
2220,
7203,
1003,
8457,
14,
19734,
25,
21999,
4426,
62,
26791,
13,
65,
48274,
1600,
366,
21999,
4426,
62,
26791,
4943,
198,
2220,
7203,
1003,
8457,
14,
19734,
25,
7645,
17660,
62,
21999,
4426,
62,
5354,
13,
65,
48274,
1600,
15772,
62,
21999,
4426,
62,
5354,
62,
8019,
796,
366,
7645,
17660,
62,
21999,
4426,
62,
5354,
4943,
198,
2220,
7203,
1003,
8457,
25,
77,
4426,
62,
11748,
13,
65,
48274,
1600,
366,
77,
4426,
62,
11748,
1600,
366,
7645,
17660,
62,
21999,
4426,
62,
5354,
4943,
198,
2220,
7203,
1003,
8457,
14,
19734,
25,
7645,
1800,
62,
17966,
13,
65,
48274,
1600,
366,
7645,
17660,
62,
1462,
62,
7645,
1800,
62,
17966,
4943,
198,
198,
77,
4426,
796,
8265,
62,
2302,
3004,
7,
198,
220,
220,
220,
7822,
796,
4808,
2302,
3004,
62,
23928,
11,
198,
220,
220,
220,
7621,
62,
37724,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
7645,
17660,
62,
21999,
4426,
62,
5354,
1298,
7621,
62,
4871,
7,
1078,
3808,
796,
8633,
7,
4895,
3672,
1298,
708,
81,
13,
8841,
3419,
5512,
12429,
7645,
17660,
62,
21999,
4426,
62,
5354,
62,
8019,
13,
1078,
3808,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
284,
4598,
25,
1104,
1981,
10392,
355,
880,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
366,
26495,
1298,
7621,
62,
4871,
7,
1078,
3808,
796,
8633,
7,
4895,
3672,
1298,
708,
81,
13,
8841,
3419,
5512,
12429,
62,
77,
4426,
62,
11748,
13,
1078,
3808,
36911,
198,
220,
220,
220,
8964,
198,
8,
198
] | 2.574751 | 301 |
# Copyright 2015-2018 Yelp 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.
import datetime
import difflib
import glob
import hashlib
import json
import logging
import os
import pkgutil
import re
import subprocess
import traceback
from string import Formatter
from typing import List
from typing import Tuple
import yaml
from service_configuration_lib import read_extra_service_information
from service_configuration_lib import read_yaml_file
from service_configuration_lib.spark_config import generate_clusterman_metrics_entries
from service_configuration_lib.spark_config import get_aws_credentials
from service_configuration_lib.spark_config import get_resources_requested
from service_configuration_lib.spark_config import get_spark_conf
from service_configuration_lib.spark_config import K8S_AUTH_FOLDER
from service_configuration_lib.spark_config import stringify_spark_env
from paasta_tools.mesos_tools import mesos_services_running_here
try:
from yaml.cyaml import CSafeDumper as Dumper
except ImportError: # pragma: no cover (no libyaml-dev / pypy)
Dumper = yaml.SafeDumper # type: ignore
from paasta_tools.clusterman import get_clusterman_metrics
from paasta_tools.tron.client import TronClient
from paasta_tools.tron import tron_command_context
from paasta_tools.utils import DEFAULT_SOA_DIR
from paasta_tools.utils import DockerParameter
from paasta_tools.utils import DockerVolume
from paasta_tools.utils import InstanceConfig
from paasta_tools.utils import InvalidInstanceConfig
from paasta_tools.utils import load_system_paasta_config
from paasta_tools.utils import SystemPaastaConfig
from paasta_tools.utils import load_v2_deployments_json
from paasta_tools.utils import NoConfigurationForServiceError
from paasta_tools.utils import NoDeploymentsAvailable
from paasta_tools.utils import time_cache
from paasta_tools.utils import filter_templates_from_config
from paasta_tools.spark_tools import get_webui_url
from paasta_tools.spark_tools import inject_spark_conf_str
from paasta_tools import monitoring_tools
from paasta_tools.monitoring_tools import list_teams
from typing import Optional
from typing import Dict
from typing import Any
log = logging.getLogger(__name__)
logging.getLogger("tron").setLevel(logging.WARNING)
MASTER_NAMESPACE = "MASTER"
SPACER = "."
VALID_MONITORING_KEYS = set(
json.loads(
pkgutil.get_data("paasta_tools.cli", "schemas/tron_schema.json").decode()
)["definitions"]["job"]["properties"]["monitoring"]["properties"].keys()
)
MESOS_EXECUTOR_NAMES = ("paasta", "spark")
DEFAULT_AWS_REGION = "us-west-2"
clusterman_metrics, _ = get_clusterman_metrics()
class TronConfig(dict):
"""System-level configuration for Tron."""
def get_cluster_name(self):
""":returns The name of the Tron cluster"""
try:
return self["cluster_name"]
except KeyError:
raise TronNotConfigured(
"Could not find name of Tron cluster in system Tron config"
)
def get_url(self):
""":returns The URL for the Tron master's API"""
try:
return self["url"]
except KeyError:
raise TronNotConfigured(
"Could not find URL of Tron master in system Tron config"
)
def decompose_instance(instance):
"""Get (job_name, action_name) from an instance."""
decomposed = instance.split(SPACER)
if len(decomposed) != 2:
raise InvalidInstanceConfig("Invalid instance name: %s" % instance)
return (decomposed[0], decomposed[1])
def decompose_executor_id(executor_id) -> Tuple[str, str, int, str]:
"""(service, job, run_number, action)"""
service, job, str_run_number, action, _ = executor_id.split(SPACER)
return (service, job, int(str_run_number), action)
def parse_time_variables(command: str, parse_time: datetime.datetime = None) -> str:
"""Parses an input string and uses the Tron-style dateparsing
to replace time variables. Currently supports only the date/time
variables listed in the tron documentation:
http://tron.readthedocs.io/en/latest/command_context.html#built-in-cc
:param input_string: input string to be parsed
:param parse_time: Reference Datetime object to parse the date and time strings, defaults to now.
:returns: A string with the date and time variables replaced
"""
if parse_time is None:
parse_time = datetime.datetime.now()
# We build up a tron context object that has the right
# methods to parse tron-style time syntax
job_context = tron_command_context.JobRunContext(
tron_command_context.CommandContext()
)
# The tron context object needs the run_time attribute set so it knows
# how to interpret the date strings
job_context.job_run.run_time = parse_time
return StringFormatter(job_context).format(command)
class TronJobConfig:
"""Represents a job in Tron, consisting of action(s) and job-level configuration values."""
def format_tron_action_dict(action_config):
"""Generate a dict of tronfig for an action, from the TronActionConfig.
:param job_config: TronActionConfig
"""
executor = action_config.get_executor()
result = {
"command": action_config.get_cmd(),
"executor": executor,
"requires": action_config.get_requires(),
"node": action_config.get_node(),
"retries": action_config.get_retries(),
"retries_delay": action_config.get_retries_delay(),
"expected_runtime": action_config.get_expected_runtime(),
"trigger_downstreams": action_config.get_trigger_downstreams(),
"triggered_by": action_config.get_triggered_by(),
"on_upstream_rerun": action_config.get_on_upstream_rerun(),
"trigger_timeout": action_config.get_trigger_timeout(),
}
if executor in MESOS_EXECUTOR_NAMES:
result["executor"] = "mesos"
result["cpus"] = action_config.get_cpus()
result["mem"] = action_config.get_mem()
result["disk"] = action_config.get_disk()
result["env"] = action_config.get_env()
result["extra_volumes"] = format_volumes(action_config.get_extra_volumes())
result["docker_parameters"] = [
{"key": param["key"], "value": param["value"]}
for param in action_config.format_docker_parameters()
]
constraint_labels = ["attribute", "operator", "value"]
result["constraints"] = [
dict(zip(constraint_labels, constraint))
for constraint in action_config.get_calculated_constraints()
]
result["docker_image"] = action_config.get_docker_url()
# Only pass non-None values, so Tron will use defaults for others
return {key: val for key, val in result.items() if val is not None}
def format_tron_job_dict(job_config):
"""Generate a dict of tronfig for a job, from the TronJobConfig.
:param job_config: TronJobConfig
"""
action_dict = {
action_config.get_action_name(): format_tron_action_dict(action_config)
for action_config in job_config.get_actions()
}
result = {
"node": job_config.get_node(),
"schedule": job_config.get_schedule(),
"actions": action_dict,
"monitoring": job_config.get_monitoring(),
"queueing": job_config.get_queueing(),
"run_limit": job_config.get_run_limit(),
"all_nodes": job_config.get_all_nodes(),
"enabled": job_config.get_enabled(),
"allow_overlap": job_config.get_allow_overlap(),
"max_runtime": job_config.get_max_runtime(),
"time_zone": job_config.get_time_zone(),
"expected_runtime": job_config.get_expected_runtime(),
}
cleanup_config = job_config.get_cleanup_action()
if cleanup_config:
cleanup_action = format_tron_action_dict(cleanup_config)
result["cleanup_action"] = cleanup_action
# Only pass non-None values, so Tron will use defaults for others
return {key: val for key, val in result.items() if val is not None}
@time_cache(ttl=5)
def load_tron_service_config_no_cache(
service,
cluster,
load_deployments=True,
soa_dir=DEFAULT_SOA_DIR,
for_validation=False,
):
"""Load all configured jobs for a service, and any additional config values."""
config = read_extra_service_information(
service_name=service, extra_info=f"tron-{cluster}", soa_dir=soa_dir
)
jobs = filter_templates_from_config(config)
job_configs = [
TronJobConfig(
name=name,
service=service,
cluster=cluster,
config_dict=job,
load_deployments=load_deployments,
soa_dir=soa_dir,
for_validation=for_validation,
)
for name, job in jobs.items()
]
return job_configs
def create_complete_config(service, cluster, soa_dir=DEFAULT_SOA_DIR):
"""Generate a namespace configuration file for Tron, for a service."""
job_configs = load_tron_service_config(
service=service, cluster=cluster, load_deployments=True, soa_dir=soa_dir
)
preproccessed_config = {}
preproccessed_config["jobs"] = {
job_config.get_name(): format_tron_job_dict(job_config)
for job_config in job_configs
}
return yaml.dump(preproccessed_config, Dumper=Dumper, default_flow_style=False)
def list_tron_clusters(service: str, soa_dir: str = DEFAULT_SOA_DIR) -> List[str]:
"""Returns the Tron clusters a service is configured to deploy to."""
search_re = r"/tron-([0-9a-z-_]*)\.yaml$"
service_dir = os.path.join(soa_dir, service)
clusters = []
for filename in glob.glob(f"{service_dir}/*.yaml"):
cluster_re_match = re.search(search_re, filename)
if cluster_re_match is not None:
clusters.append(cluster_re_match.group(1))
return clusters
def parse_service_instance_from_executor_id(task_id: str) -> Tuple[str, str]:
"""Parses tron mesos task ids, like schematizer.traffic_generator.28414.turnstyle.46da87d7-6092-4ed4-b926-ffa7b21c7785"""
try:
service, job, job_run, action, uuid = task_id.split(".")
except Exception as e:
log.warning(
f"Couldn't parse the mesos task id into a valid tron job: {task_id}: {e}"
)
service, job, action = "unknown_service", "unknown_job", "unknown_action"
return service, f"{job}.{action}"
| [
2,
15069,
1853,
12,
7908,
44628,
3457,
13,
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,
11748,
4818,
8079,
198,
11748,
814,
8019,
198,
11748,
15095,
198,
11748,
12234,
8019,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
279,
10025,
22602,
198,
11748,
302,
198,
11748,
850,
14681,
198,
11748,
12854,
1891,
198,
6738,
4731,
1330,
5178,
1436,
198,
6738,
19720,
1330,
7343,
198,
6738,
19720,
1330,
309,
29291,
198,
198,
11748,
331,
43695,
198,
6738,
2139,
62,
11250,
3924,
62,
8019,
1330,
1100,
62,
26086,
62,
15271,
62,
17018,
198,
6738,
2139,
62,
11250,
3924,
62,
8019,
1330,
1100,
62,
88,
43695,
62,
7753,
198,
6738,
2139,
62,
11250,
3924,
62,
8019,
13,
2777,
668,
62,
11250,
1330,
7716,
62,
565,
436,
2224,
62,
4164,
10466,
62,
298,
1678,
198,
6738,
2139,
62,
11250,
3924,
62,
8019,
13,
2777,
668,
62,
11250,
1330,
651,
62,
8356,
62,
66,
445,
14817,
198,
6738,
2139,
62,
11250,
3924,
62,
8019,
13,
2777,
668,
62,
11250,
1330,
651,
62,
37540,
62,
25927,
276,
198,
6738,
2139,
62,
11250,
3924,
62,
8019,
13,
2777,
668,
62,
11250,
1330,
651,
62,
2777,
668,
62,
10414,
198,
6738,
2139,
62,
11250,
3924,
62,
8019,
13,
2777,
668,
62,
11250,
1330,
509,
23,
50,
62,
32,
24318,
62,
37,
3535,
14418,
198,
6738,
2139,
62,
11250,
3924,
62,
8019,
13,
2777,
668,
62,
11250,
1330,
4731,
1958,
62,
2777,
668,
62,
24330,
198,
198,
6738,
14187,
40197,
62,
31391,
13,
6880,
418,
62,
31391,
1330,
18842,
418,
62,
30416,
62,
20270,
62,
1456,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
331,
43695,
13,
948,
43695,
1330,
9429,
8635,
35,
15829,
355,
360,
15829,
198,
16341,
17267,
12331,
25,
220,
1303,
23864,
2611,
25,
645,
3002,
357,
3919,
9195,
88,
43695,
12,
7959,
1220,
279,
4464,
88,
8,
198,
220,
220,
220,
360,
15829,
796,
331,
43695,
13,
31511,
35,
15829,
220,
1303,
2099,
25,
8856,
198,
198,
6738,
14187,
40197,
62,
31391,
13,
565,
436,
2224,
1330,
651,
62,
565,
436,
2224,
62,
4164,
10466,
198,
6738,
14187,
40197,
62,
31391,
13,
83,
1313,
13,
16366,
1330,
833,
261,
11792,
198,
6738,
14187,
40197,
62,
31391,
13,
83,
1313,
1330,
491,
261,
62,
21812,
62,
22866,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
5550,
38865,
62,
15821,
32,
62,
34720,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
25716,
36301,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
25716,
31715,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
2262,
590,
16934,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
17665,
33384,
16934,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
3440,
62,
10057,
62,
8957,
40197,
62,
11250,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
4482,
28875,
40197,
16934,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
3440,
62,
85,
17,
62,
2934,
1420,
902,
62,
17752,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
1400,
38149,
1890,
16177,
12331,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
1400,
49322,
902,
10493,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
640,
62,
23870,
198,
6738,
14187,
40197,
62,
31391,
13,
26791,
1330,
8106,
62,
11498,
17041,
62,
6738,
62,
11250,
198,
6738,
14187,
40197,
62,
31391,
13,
2777,
668,
62,
31391,
1330,
651,
62,
12384,
9019,
62,
6371,
198,
6738,
14187,
40197,
62,
31391,
13,
2777,
668,
62,
31391,
1330,
8677,
62,
2777,
668,
62,
10414,
62,
2536,
198,
198,
6738,
14187,
40197,
62,
31391,
1330,
9904,
62,
31391,
198,
6738,
14187,
40197,
62,
31391,
13,
41143,
278,
62,
31391,
1330,
1351,
62,
660,
4105,
198,
6738,
19720,
1330,
32233,
198,
6738,
19720,
1330,
360,
713,
198,
6738,
19720,
1330,
4377,
198,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
6404,
2667,
13,
1136,
11187,
1362,
7203,
83,
1313,
11074,
2617,
4971,
7,
6404,
2667,
13,
31502,
8,
198,
198,
31180,
5781,
62,
45,
29559,
47,
11598,
796,
366,
31180,
5781,
1,
198,
4303,
2246,
1137,
796,
366,
526,
198,
23428,
2389,
62,
27857,
2043,
1581,
2751,
62,
7336,
16309,
796,
900,
7,
198,
220,
220,
220,
33918,
13,
46030,
7,
198,
220,
220,
220,
220,
220,
220,
220,
279,
10025,
22602,
13,
1136,
62,
7890,
7203,
8957,
40197,
62,
31391,
13,
44506,
1600,
366,
1416,
4411,
292,
14,
83,
1313,
62,
15952,
2611,
13,
17752,
11074,
12501,
1098,
3419,
198,
220,
220,
220,
1267,
14692,
4299,
50101,
1,
7131,
1,
21858,
1,
7131,
1,
48310,
1,
7131,
1,
41143,
278,
1,
7131,
1,
48310,
1,
4083,
13083,
3419,
198,
8,
198,
44,
1546,
2640,
62,
6369,
2943,
3843,
1581,
62,
45,
29559,
796,
5855,
8957,
40197,
1600,
366,
2777,
668,
4943,
198,
7206,
38865,
62,
12298,
50,
62,
31553,
2849,
796,
366,
385,
12,
7038,
12,
17,
1,
198,
565,
436,
2224,
62,
4164,
10466,
11,
4808,
796,
651,
62,
565,
436,
2224,
62,
4164,
10466,
3419,
628,
628,
198,
4871,
833,
261,
16934,
7,
11600,
2599,
198,
220,
220,
220,
37227,
11964,
12,
5715,
8398,
329,
833,
261,
526,
15931,
628,
220,
220,
220,
825,
651,
62,
565,
5819,
62,
3672,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
13538,
1298,
7783,
82,
383,
1438,
286,
262,
833,
261,
13946,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
14692,
565,
5819,
62,
3672,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
7383,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
833,
261,
3673,
16934,
1522,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
23722,
407,
1064,
1438,
286,
833,
261,
13946,
287,
1080,
833,
261,
4566,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
825,
651,
62,
6371,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
13538,
1298,
7783,
82,
383,
10289,
329,
262,
833,
261,
4958,
338,
7824,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
14692,
6371,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
7383,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
833,
261,
3673,
16934,
1522,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
23722,
407,
1064,
10289,
286,
833,
261,
4958,
287,
1080,
833,
261,
4566,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
628,
628,
198,
4299,
26969,
3455,
62,
39098,
7,
39098,
2599,
198,
220,
220,
220,
37227,
3855,
357,
21858,
62,
3672,
11,
2223,
62,
3672,
8,
422,
281,
4554,
526,
15931,
198,
220,
220,
220,
38237,
1335,
796,
4554,
13,
35312,
7,
4303,
2246,
1137,
8,
198,
220,
220,
220,
611,
18896,
7,
12501,
3361,
1335,
8,
14512,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
17665,
33384,
16934,
7203,
44651,
4554,
1438,
25,
4064,
82,
1,
4064,
4554,
8,
198,
220,
220,
220,
1441,
357,
12501,
3361,
1335,
58,
15,
4357,
38237,
1335,
58,
16,
12962,
628,
198,
4299,
26969,
3455,
62,
18558,
38409,
62,
312,
7,
18558,
38409,
62,
312,
8,
4613,
309,
29291,
58,
2536,
11,
965,
11,
493,
11,
965,
5974,
198,
220,
220,
220,
13538,
18109,
15271,
11,
1693,
11,
1057,
62,
17618,
11,
2223,
8,
37811,
198,
220,
220,
220,
2139,
11,
1693,
11,
965,
62,
5143,
62,
17618,
11,
2223,
11,
4808,
796,
3121,
273,
62,
312,
13,
35312,
7,
4303,
2246,
1137,
8,
198,
220,
220,
220,
1441,
357,
15271,
11,
1693,
11,
493,
7,
2536,
62,
5143,
62,
17618,
828,
2223,
8,
628,
198,
198,
4299,
21136,
62,
2435,
62,
25641,
2977,
7,
21812,
25,
965,
11,
21136,
62,
2435,
25,
4818,
8079,
13,
19608,
8079,
796,
6045,
8,
4613,
965,
25,
198,
220,
220,
220,
37227,
47,
945,
274,
281,
5128,
4731,
290,
3544,
262,
833,
261,
12,
7635,
3128,
79,
945,
278,
198,
220,
220,
220,
284,
6330,
640,
9633,
13,
16888,
6971,
691,
262,
3128,
14,
2435,
198,
220,
220,
220,
9633,
5610,
287,
262,
491,
261,
10314,
25,
198,
220,
220,
220,
2638,
1378,
83,
1313,
13,
961,
83,
704,
420,
82,
13,
952,
14,
268,
14,
42861,
14,
21812,
62,
22866,
13,
6494,
2,
18780,
12,
259,
12,
535,
628,
220,
220,
220,
1058,
17143,
5128,
62,
8841,
25,
5128,
4731,
284,
307,
44267,
198,
220,
220,
220,
1058,
17143,
21136,
62,
2435,
25,
20984,
16092,
8079,
2134,
284,
21136,
262,
3128,
290,
640,
13042,
11,
26235,
284,
783,
13,
198,
220,
220,
220,
1058,
7783,
82,
25,
317,
4731,
351,
262,
3128,
290,
640,
9633,
6928,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
21136,
62,
2435,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
21136,
62,
2435,
796,
4818,
8079,
13,
19608,
8079,
13,
2197,
3419,
198,
220,
220,
220,
1303,
775,
1382,
510,
257,
491,
261,
4732,
2134,
326,
468,
262,
826,
198,
220,
220,
220,
1303,
5050,
284,
21136,
491,
261,
12,
7635,
640,
15582,
198,
220,
220,
220,
1693,
62,
22866,
796,
491,
261,
62,
21812,
62,
22866,
13,
33308,
10987,
21947,
7,
198,
220,
220,
220,
220,
220,
220,
220,
491,
261,
62,
21812,
62,
22866,
13,
21575,
21947,
3419,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
1303,
383,
491,
261,
4732,
2134,
2476,
262,
1057,
62,
2435,
11688,
900,
523,
340,
4206,
198,
220,
220,
220,
1303,
703,
284,
6179,
262,
3128,
13042,
198,
220,
220,
220,
1693,
62,
22866,
13,
21858,
62,
5143,
13,
5143,
62,
2435,
796,
21136,
62,
2435,
198,
220,
220,
220,
1441,
10903,
8479,
1436,
7,
21858,
62,
22866,
737,
18982,
7,
21812,
8,
628,
628,
198,
4871,
833,
261,
33308,
16934,
25,
198,
220,
220,
220,
37227,
6207,
6629,
257,
1693,
287,
833,
261,
11,
17747,
286,
2223,
7,
82,
8,
290,
1693,
12,
5715,
8398,
3815,
526,
15931,
628,
628,
198,
4299,
5794,
62,
83,
1313,
62,
2673,
62,
11600,
7,
2673,
62,
11250,
2599,
198,
220,
220,
220,
37227,
8645,
378,
257,
8633,
286,
491,
261,
5647,
329,
281,
2223,
11,
422,
262,
833,
261,
12502,
16934,
13,
628,
220,
220,
220,
1058,
17143,
1693,
62,
11250,
25,
833,
261,
12502,
16934,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3121,
273,
796,
2223,
62,
11250,
13,
1136,
62,
18558,
38409,
3419,
198,
220,
220,
220,
1255,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
21812,
1298,
2223,
62,
11250,
13,
1136,
62,
28758,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
18558,
38409,
1298,
3121,
273,
11,
198,
220,
220,
220,
220,
220,
220,
220,
366,
47911,
1298,
2223,
62,
11250,
13,
1136,
62,
47911,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
17440,
1298,
2223,
62,
11250,
13,
1136,
62,
17440,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
1186,
1678,
1298,
2223,
62,
11250,
13,
1136,
62,
1186,
1678,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
1186,
1678,
62,
40850,
1298,
2223,
62,
11250,
13,
1136,
62,
1186,
1678,
62,
40850,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
40319,
62,
43282,
1298,
2223,
62,
11250,
13,
1136,
62,
40319,
62,
43282,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
46284,
62,
2902,
5532,
82,
1298,
2223,
62,
11250,
13,
1136,
62,
46284,
62,
2902,
5532,
82,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
2213,
328,
10446,
62,
1525,
1298,
2223,
62,
11250,
13,
1136,
62,
2213,
328,
10446,
62,
1525,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
261,
62,
929,
5532,
62,
260,
5143,
1298,
2223,
62,
11250,
13,
1136,
62,
261,
62,
929,
5532,
62,
260,
5143,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
46284,
62,
48678,
1298,
2223,
62,
11250,
13,
1136,
62,
46284,
62,
48678,
22784,
198,
220,
220,
220,
1782,
198,
220,
220,
220,
611,
3121,
273,
287,
337,
1546,
2640,
62,
6369,
2943,
3843,
1581,
62,
45,
29559,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
14692,
18558,
38409,
8973,
796,
366,
6880,
418,
1,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
14692,
13155,
385,
8973,
796,
2223,
62,
11250,
13,
1136,
62,
13155,
385,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
14692,
11883,
8973,
796,
2223,
62,
11250,
13,
1136,
62,
11883,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
14692,
39531,
8973,
796,
2223,
62,
11250,
13,
1136,
62,
39531,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
14692,
24330,
8973,
796,
2223,
62,
11250,
13,
1136,
62,
24330,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
14692,
26086,
62,
10396,
8139,
8973,
796,
5794,
62,
10396,
8139,
7,
2673,
62,
11250,
13,
1136,
62,
26086,
62,
10396,
8139,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
14692,
45986,
62,
17143,
7307,
8973,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19779,
2539,
1298,
5772,
14692,
2539,
33116,
366,
8367,
1298,
5772,
14692,
8367,
8973,
92,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
5772,
287,
2223,
62,
11250,
13,
18982,
62,
45986,
62,
17143,
7307,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2361,
198,
220,
220,
220,
220,
220,
220,
220,
32315,
62,
23912,
1424,
796,
14631,
42348,
1600,
366,
46616,
1600,
366,
8367,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
14692,
1102,
2536,
6003,
8973,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8633,
7,
13344,
7,
1102,
2536,
2913,
62,
23912,
1424,
11,
32315,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
32315,
287,
2223,
62,
11250,
13,
1136,
62,
9948,
49262,
62,
1102,
2536,
6003,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2361,
628,
220,
220,
220,
220,
220,
220,
220,
1255,
14692,
45986,
62,
9060,
8973,
796,
2223,
62,
11250,
13,
1136,
62,
45986,
62,
6371,
3419,
628,
220,
220,
220,
1303,
5514,
1208,
1729,
12,
14202,
3815,
11,
523,
833,
261,
481,
779,
26235,
329,
1854,
198,
220,
220,
220,
1441,
1391,
2539,
25,
1188,
329,
1994,
11,
1188,
287,
1255,
13,
23814,
3419,
611,
1188,
318,
407,
6045,
92,
628,
198,
4299,
5794,
62,
83,
1313,
62,
21858,
62,
11600,
7,
21858,
62,
11250,
2599,
198,
220,
220,
220,
37227,
8645,
378,
257,
8633,
286,
491,
261,
5647,
329,
257,
1693,
11,
422,
262,
833,
261,
33308,
16934,
13,
628,
220,
220,
220,
1058,
17143,
1693,
62,
11250,
25,
833,
261,
33308,
16934,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2223,
62,
11600,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
2223,
62,
11250,
13,
1136,
62,
2673,
62,
3672,
33529,
5794,
62,
83,
1313,
62,
2673,
62,
11600,
7,
2673,
62,
11250,
8,
198,
220,
220,
220,
220,
220,
220,
220,
329,
2223,
62,
11250,
287,
1693,
62,
11250,
13,
1136,
62,
4658,
3419,
198,
220,
220,
220,
1782,
628,
220,
220,
220,
1255,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
17440,
1298,
1693,
62,
11250,
13,
1136,
62,
17440,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
15952,
5950,
1298,
1693,
62,
11250,
13,
1136,
62,
15952,
5950,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
4658,
1298,
2223,
62,
11600,
11,
198,
220,
220,
220,
220,
220,
220,
220,
366,
41143,
278,
1298,
1693,
62,
11250,
13,
1136,
62,
41143,
278,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
36560,
278,
1298,
1693,
62,
11250,
13,
1136,
62,
36560,
278,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
5143,
62,
32374,
1298,
1693,
62,
11250,
13,
1136,
62,
5143,
62,
32374,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
439,
62,
77,
4147,
1298,
1693,
62,
11250,
13,
1136,
62,
439,
62,
77,
4147,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
25616,
1298,
1693,
62,
11250,
13,
1136,
62,
25616,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
12154,
62,
2502,
37796,
1298,
1693,
62,
11250,
13,
1136,
62,
12154,
62,
2502,
37796,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
9806,
62,
43282,
1298,
1693,
62,
11250,
13,
1136,
62,
9806,
62,
43282,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
2435,
62,
11340,
1298,
1693,
62,
11250,
13,
1136,
62,
2435,
62,
11340,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
366,
40319,
62,
43282,
1298,
1693,
62,
11250,
13,
1136,
62,
40319,
62,
43282,
22784,
198,
220,
220,
220,
1782,
198,
220,
220,
220,
27425,
62,
11250,
796,
1693,
62,
11250,
13,
1136,
62,
27773,
929,
62,
2673,
3419,
198,
220,
220,
220,
611,
27425,
62,
11250,
25,
198,
220,
220,
220,
220,
220,
220,
220,
27425,
62,
2673,
796,
5794,
62,
83,
1313,
62,
2673,
62,
11600,
7,
27773,
929,
62,
11250,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
14692,
27773,
929,
62,
2673,
8973,
796,
27425,
62,
2673,
628,
220,
220,
220,
1303,
5514,
1208,
1729,
12,
14202,
3815,
11,
523,
833,
261,
481,
779,
26235,
329,
1854,
198,
220,
220,
220,
1441,
1391,
2539,
25,
1188,
329,
1994,
11,
1188,
287,
1255,
13,
23814,
3419,
611,
1188,
318,
407,
6045,
92,
628,
198,
198,
31,
2435,
62,
23870,
7,
926,
75,
28,
20,
8,
628,
198,
4299,
3440,
62,
83,
1313,
62,
15271,
62,
11250,
62,
3919,
62,
23870,
7,
198,
220,
220,
220,
2139,
11,
198,
220,
220,
220,
13946,
11,
198,
220,
220,
220,
3440,
62,
2934,
1420,
902,
28,
17821,
11,
198,
220,
220,
220,
523,
64,
62,
15908,
28,
7206,
38865,
62,
15821,
32,
62,
34720,
11,
198,
220,
220,
220,
329,
62,
12102,
341,
28,
25101,
11,
198,
2599,
198,
220,
220,
220,
37227,
8912,
477,
17839,
3946,
329,
257,
2139,
11,
290,
597,
3224,
4566,
3815,
526,
15931,
198,
220,
220,
220,
4566,
796,
1100,
62,
26086,
62,
15271,
62,
17018,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2139,
62,
3672,
28,
15271,
11,
3131,
62,
10951,
28,
69,
1,
83,
1313,
12,
90,
565,
5819,
92,
1600,
523,
64,
62,
15908,
28,
568,
64,
62,
15908,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
3946,
796,
8106,
62,
11498,
17041,
62,
6738,
62,
11250,
7,
11250,
8,
198,
220,
220,
220,
1693,
62,
11250,
82,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
833,
261,
33308,
16934,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
28,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2139,
28,
15271,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13946,
28,
565,
5819,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4566,
62,
11600,
28,
21858,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3440,
62,
2934,
1420,
902,
28,
2220,
62,
2934,
1420,
902,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
523,
64,
62,
15908,
28,
568,
64,
62,
15908,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
62,
12102,
341,
28,
1640,
62,
12102,
341,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1438,
11,
1693,
287,
3946,
13,
23814,
3419,
198,
220,
220,
220,
2361,
198,
220,
220,
220,
1441,
1693,
62,
11250,
82,
628,
198,
198,
4299,
2251,
62,
20751,
62,
11250,
7,
15271,
11,
13946,
11,
523,
64,
62,
15908,
28,
7206,
38865,
62,
15821,
32,
62,
34720,
2599,
198,
220,
220,
220,
37227,
8645,
378,
257,
25745,
8398,
2393,
329,
833,
261,
11,
329,
257,
2139,
526,
15931,
198,
220,
220,
220,
1693,
62,
11250,
82,
796,
3440,
62,
83,
1313,
62,
15271,
62,
11250,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2139,
28,
15271,
11,
13946,
28,
565,
5819,
11,
3440,
62,
2934,
1420,
902,
28,
17821,
11,
523,
64,
62,
15908,
28,
568,
64,
62,
15908,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
662,
1676,
1591,
276,
62,
11250,
796,
23884,
198,
220,
220,
220,
662,
1676,
1591,
276,
62,
11250,
14692,
43863,
8973,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
1693,
62,
11250,
13,
1136,
62,
3672,
33529,
5794,
62,
83,
1313,
62,
21858,
62,
11600,
7,
21858,
62,
11250,
8,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1693,
62,
11250,
287,
1693,
62,
11250,
82,
198,
220,
220,
220,
1782,
198,
220,
220,
220,
1441,
331,
43695,
13,
39455,
7,
3866,
1676,
1591,
276,
62,
11250,
11,
360,
15829,
28,
35,
15829,
11,
4277,
62,
11125,
62,
7635,
28,
25101,
8,
628,
628,
198,
4299,
1351,
62,
83,
1313,
62,
565,
13654,
7,
15271,
25,
965,
11,
523,
64,
62,
15908,
25,
965,
796,
5550,
38865,
62,
15821,
32,
62,
34720,
8,
4613,
7343,
58,
2536,
5974,
198,
220,
220,
220,
37227,
35561,
262,
833,
261,
23163,
257,
2139,
318,
17839,
284,
6061,
284,
526,
15931,
198,
220,
220,
220,
2989,
62,
260,
796,
374,
1,
14,
83,
1313,
12,
26933,
15,
12,
24,
64,
12,
89,
12,
62,
60,
28104,
17405,
88,
43695,
3,
1,
198,
220,
220,
220,
2139,
62,
15908,
796,
28686,
13,
6978,
13,
22179,
7,
568,
64,
62,
15908,
11,
2139,
8,
198,
220,
220,
220,
23163,
796,
17635,
198,
220,
220,
220,
329,
29472,
287,
15095,
13,
4743,
672,
7,
69,
1,
90,
15271,
62,
15908,
92,
15211,
13,
88,
43695,
1,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
13946,
62,
260,
62,
15699,
796,
302,
13,
12947,
7,
12947,
62,
260,
11,
29472,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
13946,
62,
260,
62,
15699,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23163,
13,
33295,
7,
565,
5819,
62,
260,
62,
15699,
13,
8094,
7,
16,
4008,
198,
220,
220,
220,
1441,
23163,
628,
628,
198,
4299,
21136,
62,
15271,
62,
39098,
62,
6738,
62,
18558,
38409,
62,
312,
7,
35943,
62,
312,
25,
965,
8,
4613,
309,
29291,
58,
2536,
11,
965,
5974,
198,
220,
220,
220,
37227,
47,
945,
274,
491,
261,
18842,
418,
4876,
220,
2340,
11,
588,
3897,
6759,
7509,
13,
9535,
2108,
62,
8612,
1352,
13,
30336,
1415,
13,
15344,
7635,
13,
3510,
6814,
5774,
67,
22,
12,
1899,
5892,
12,
19,
276,
19,
12,
65,
24,
2075,
12,
487,
64,
22,
65,
2481,
66,
3324,
5332,
37811,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2139,
11,
1693,
11,
1693,
62,
5143,
11,
2223,
11,
334,
27112,
796,
4876,
62,
312,
13,
35312,
7203,
19570,
198,
220,
220,
220,
2845,
35528,
355,
304,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
13,
43917,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
23722,
77,
470,
21136,
262,
18842,
418,
4876,
4686,
656,
257,
4938,
491,
261,
1693,
25,
1391,
35943,
62,
312,
38362,
1391,
68,
36786,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
2139,
11,
1693,
11,
2223,
796,
366,
34680,
62,
15271,
1600,
366,
34680,
62,
21858,
1600,
366,
34680,
62,
2673,
1,
198,
220,
220,
220,
1441,
2139,
11,
277,
1,
90,
21858,
27422,
90,
2673,
36786,
198
] | 2.649127 | 4,124 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2019 CESNET.
#
# Invenio Records Presentation is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
""" Example Presentation workflow."""
from invenio_workflows import WorkflowEngine
from invenio_records_presentation.api import PresentationOutputFile
from invenio_records_presentation.workflows import presentation_workflow_factory
example = presentation_workflow_factory(task_list=[
print_extra_data,
create_example_file,
print_data,
transform_example_file,
output_example_file,
])
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
34,
8,
13130,
42700,
12884,
13,
198,
2,
198,
2,
554,
574,
952,
13407,
21662,
341,
318,
1479,
3788,
26,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
340,
198,
2,
739,
262,
2846,
286,
262,
17168,
13789,
26,
766,
38559,
24290,
2393,
329,
517,
3307,
13,
198,
198,
37811,
17934,
21662,
341,
30798,
526,
15931,
198,
6738,
287,
574,
952,
62,
1818,
44041,
1330,
5521,
11125,
13798,
198,
198,
6738,
287,
574,
952,
62,
8344,
3669,
62,
25579,
341,
13,
15042,
1330,
21662,
341,
26410,
8979,
198,
6738,
287,
574,
952,
62,
8344,
3669,
62,
25579,
341,
13,
1818,
44041,
1330,
10470,
62,
1818,
11125,
62,
69,
9548,
628,
628,
628,
198,
198,
20688,
796,
10470,
62,
1818,
11125,
62,
69,
9548,
7,
35943,
62,
4868,
41888,
198,
220,
220,
220,
3601,
62,
26086,
62,
7890,
11,
198,
220,
220,
220,
2251,
62,
20688,
62,
7753,
11,
198,
220,
220,
220,
3601,
62,
7890,
11,
198,
220,
220,
220,
6121,
62,
20688,
62,
7753,
11,
198,
220,
220,
220,
5072,
62,
20688,
62,
7753,
11,
198,
12962,
198
] | 3.175879 | 199 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#add the path of the twitter egg
import sys
egg_path = '/home/users/web/........./cgi-bin/PyPkg/twitter-1.14.3-py2.7.egg'
sys.path.append(egg_path)
# Import the CGI, string, sys, and md5crypt modules
import json, urllib2, re, time, datetime, sys, cgi, os
import sqlite3
import MySQLdb as mdb
import string, random
from urlparse import urlparse
from twitter import *
from tempfile import TemporaryFile
from collections import *
from py_site_header import *
def lex_anal(incomingTweetList):
'''
routine to do lexical analysis
'''
#final_tweet_list --- date / sender full name / tweet
#read the tweets and create a list of sender-htag and sender-@
#incoming TweetList has two layer lists
sender_htag = []
sender_at = []
h_tags_all = []
at_items_all = []
ts_all = []
for lex2 in incomingTweetList:
for lex22 in lex2:
td = lex22[0] #this is the tweet date
try:
ts = text_sanitize(lex22[1]) #this is the tweet sender
except:
print 'something wrong with ',lex22[1]
ts = '---'
ts_all.append(ts)
h_tags = re.findall('[#]\w+',lex22[2]) #these are the h-tags
at_items = re.findall('[@]\w+',lex22[2]) #these are the other users
h_tags = [hti.lower() for hti in h_tags]
at_items = [ati.lower() for ati in at_items]
for h2 in h_tags:
sender_htag.append([td,ts.lower()+'-'+h2])
h_tags_all.append(h2)
for at2 in at_items:
sender_at.append([td,ts.lower()+'-'+at2])
at_items_all.append(at2)
#summarize the two new lists
#following lists don't have dates
sender_htag2 = [xx[1] for xx in sender_htag]
sender_at2 = [yy[1] for yy in sender_at]
#make a list of the tweet senders only
ts_all = list(set(ts_all))
#print ts_all
#get the top 10 htags
#py2.6 ht_col = collections.Counter(h_tags_all)
htag_data4heatmap = []
at_data4heatmap = []
#print '<ul>Top 10 Hashtags'
#py2.6 for h_item in ht_col.most_common(10):
for h_item in top_list(h_tags_all,10):
#print '<li>', h_item, '</li>'
#count the number of times each of the hastag was referenced by each tweet sender
try:
for tsitem in ts_all:
try:
itemtocount = str(tsitem+'-'+h_item[1])
htag_data4heatmap.append([tsitem,h_item[1], sender_htag2.count(itemtocount)])
except:
print 'Problem here: ',h_item,tsitem
except:
print 'Problem here',h_item
print '</ul>'
#get the top 10 user references
#py2.6 at_col = collections.Counter(at_items_all)
#print '<ul>Top 10 Users'
#py2.6 for a_item in at_col.most_common(10):
for a_item in top_list(at_items_all,10):
#print '<li>', a_item, '</li>'
#count the number of times each of the hastag was referenced by each tweet sender
try:
for tsitem in ts_all:
itemtocount = str(tsitem+'-'+a_item[1])
at_data4heatmap.append([tsitem,a_item[1], sender_at2.count(itemtocount)])
except:
print 'Problem here 2',a_item
print '</ul>'
#draw the table with the heatmap
tcols = len(ts_all) #number of tweet senders - rows
trows = len(htag_data4heatmap) / tcols #number of hastags - cols
#print trows, tcols
if trows>0:
print '<br><br>'
print '<h3>Most Popular Hashtags</h3>'
heatmap_table(trows,tcols,htag_data4heatmap)
tcols = len(ts_all) #number of tweet senders - rows
trows = len(at_data4heatmap) / tcols #number of hastags - cols
#print trows, tcols
if trows>0:
print '<br><br>'
print '<h3>Most Referenced Users</h3>'
heatmap_table(trows,tcols,at_data4heatmap)
# Define main function.
main()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
2,
2860,
262,
3108,
286,
262,
17044,
5935,
201,
198,
11748,
25064,
201,
198,
33856,
62,
6978,
796,
31051,
11195,
14,
18417,
14,
12384,
14,
34617,
14,
37157,
12,
8800,
14,
20519,
47,
10025,
14,
6956,
12,
16,
13,
1415,
13,
18,
12,
9078,
17,
13,
22,
13,
33856,
6,
201,
198,
17597,
13,
6978,
13,
33295,
7,
33856,
62,
6978,
8,
201,
198,
201,
198,
201,
198,
2,
17267,
262,
36378,
11,
4731,
11,
25064,
11,
290,
45243,
20,
29609,
13103,
201,
198,
11748,
33918,
11,
2956,
297,
571,
17,
11,
302,
11,
640,
11,
4818,
8079,
11,
25064,
11,
269,
12397,
11,
28686,
201,
198,
11748,
44161,
578,
18,
201,
198,
11748,
33476,
9945,
355,
285,
9945,
201,
198,
11748,
4731,
11,
4738,
201,
198,
6738,
19016,
29572,
1330,
19016,
29572,
201,
198,
6738,
17044,
1330,
1635,
201,
198,
6738,
20218,
7753,
1330,
46042,
8979,
201,
198,
6738,
17268,
1330,
1635,
201,
198,
6738,
12972,
62,
15654,
62,
25677,
1330,
1635,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
197,
201,
198,
201,
198,
201,
198,
220,
220,
220,
220,
201,
198,
201,
198,
220,
220,
220,
220,
201,
198,
201,
198,
201,
198,
201,
198,
220,
220,
220,
220,
201,
198,
201,
198,
201,
198,
201,
198,
4299,
31191,
62,
272,
282,
7,
259,
4976,
47845,
8053,
2599,
201,
198,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
8027,
284,
466,
31191,
605,
3781,
201,
198,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
1303,
20311,
62,
83,
7277,
62,
4868,
11420,
3128,
1220,
29788,
1336,
1438,
1220,
6126,
201,
198,
220,
220,
220,
1303,
961,
262,
12665,
290,
2251,
257,
1351,
286,
29788,
12,
4352,
363,
290,
29788,
12,
31,
201,
198,
220,
220,
220,
1303,
259,
4976,
18752,
8053,
468,
734,
7679,
8341,
201,
198,
220,
220,
220,
29788,
62,
4352,
363,
796,
17635,
201,
198,
220,
220,
220,
29788,
62,
265,
796,
17635,
201,
198,
220,
220,
220,
289,
62,
31499,
62,
439,
796,
17635,
201,
198,
220,
220,
220,
379,
62,
23814,
62,
439,
796,
17635,
201,
198,
220,
220,
220,
40379,
62,
439,
796,
17635,
201,
198,
220,
220,
220,
220,
201,
198,
220,
220,
220,
329,
31191,
17,
287,
15619,
47845,
8053,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
329,
31191,
1828,
287,
31191,
17,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41560,
796,
31191,
1828,
58,
15,
60,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
5661,
318,
262,
6126,
3128,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
40379,
796,
2420,
62,
12807,
270,
1096,
7,
2588,
1828,
58,
16,
12962,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
5661,
318,
262,
6126,
29788,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
18927,
2642,
351,
46083,
2588,
1828,
58,
16,
60,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
40379,
796,
705,
6329,
6,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
40379,
62,
439,
13,
33295,
7,
912,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
289,
62,
31499,
796,
302,
13,
19796,
439,
10786,
58,
2,
60,
59,
86,
10,
3256,
2588,
1828,
58,
17,
12962,
220,
220,
220,
220,
220,
220,
220,
1303,
27218,
389,
262,
289,
12,
31499,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
379,
62,
23814,
796,
302,
13,
19796,
439,
10786,
58,
31,
60,
59,
86,
10,
3256,
2588,
1828,
58,
17,
12962,
220,
220,
220,
1303,
27218,
389,
262,
584,
2985,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
289,
62,
31499,
796,
685,
4352,
72,
13,
21037,
3419,
329,
289,
20259,
287,
289,
62,
31499,
60,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
379,
62,
23814,
796,
685,
7246,
13,
21037,
3419,
329,
379,
72,
287,
379,
62,
23814,
60,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
289,
17,
287,
289,
62,
31499,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29788,
62,
4352,
363,
13,
33295,
26933,
8671,
11,
912,
13,
21037,
3419,
10,
6,
19355,
10,
71,
17,
12962,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
289,
62,
31499,
62,
439,
13,
33295,
7,
71,
17,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
379,
17,
287,
379,
62,
23814,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29788,
62,
265,
13,
33295,
26933,
8671,
11,
912,
13,
21037,
3419,
10,
6,
19355,
10,
265,
17,
12962,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
379,
62,
23814,
62,
439,
13,
33295,
7,
265,
17,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
220,
201,
198,
220,
220,
220,
1303,
16345,
3876,
1096,
262,
734,
649,
8341,
201,
198,
220,
220,
220,
220,
201,
198,
220,
220,
220,
1303,
27780,
278,
8341,
836,
470,
423,
9667,
201,
198,
220,
220,
220,
29788,
62,
4352,
363,
17,
796,
685,
5324,
58,
16,
60,
329,
31383,
287,
29788,
62,
4352,
363,
60,
201,
198,
220,
220,
220,
29788,
62,
265,
17,
796,
685,
22556,
58,
16,
60,
329,
331,
88,
287,
29788,
62,
265,
60,
201,
198,
220,
220,
220,
220,
201,
198,
220,
220,
220,
1303,
15883,
257,
1351,
286,
262,
6126,
3758,
364,
691,
201,
198,
220,
220,
220,
40379,
62,
439,
796,
1351,
7,
2617,
7,
912,
62,
439,
4008,
201,
198,
220,
220,
220,
1303,
4798,
40379,
62,
439,
201,
198,
201,
198,
220,
220,
220,
1303,
1136,
262,
1353,
838,
289,
31499,
201,
198,
220,
220,
220,
1303,
9078,
17,
13,
21,
220,
220,
220,
289,
83,
62,
4033,
796,
17268,
13,
31694,
7,
71,
62,
31499,
62,
439,
8,
201,
198,
220,
220,
220,
289,
12985,
62,
7890,
19,
25080,
8899,
796,
17635,
201,
198,
220,
220,
220,
379,
62,
7890,
19,
25080,
8899,
796,
17635,
201,
198,
220,
220,
220,
1303,
4798,
705,
27,
377,
29,
9126,
838,
21059,
31499,
6,
201,
198,
220,
220,
220,
1303,
9078,
17,
13,
21,
220,
220,
220,
329,
289,
62,
9186,
287,
289,
83,
62,
4033,
13,
1712,
62,
11321,
7,
940,
2599,
201,
198,
220,
220,
220,
329,
289,
62,
9186,
287,
1353,
62,
4868,
7,
71,
62,
31499,
62,
439,
11,
940,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
4798,
705,
27,
4528,
29,
3256,
289,
62,
9186,
11,
705,
3556,
4528,
29,
6,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
9127,
262,
1271,
286,
1661,
1123,
286,
262,
19338,
363,
373,
20717,
416,
1123,
6126,
29788,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
40379,
9186,
287,
40379,
62,
439,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2378,
40301,
608,
796,
965,
7,
912,
9186,
10,
6,
19355,
10,
71,
62,
9186,
58,
16,
12962,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
289,
12985,
62,
7890,
19,
25080,
8899,
13,
33295,
26933,
912,
9186,
11,
71,
62,
9186,
58,
16,
4357,
29788,
62,
4352,
363,
17,
13,
9127,
7,
9186,
40301,
608,
8,
12962,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2845,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
40781,
994,
25,
46083,
71,
62,
9186,
11,
912,
9186,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
40781,
994,
3256,
71,
62,
9186,
201,
198,
201,
198,
220,
220,
220,
3601,
705,
3556,
377,
29,
6,
201,
198,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
1303,
1136,
262,
1353,
838,
2836,
10288,
201,
198,
220,
220,
220,
1303,
9078,
17,
13,
21,
220,
220,
379,
62,
4033,
796,
17268,
13,
31694,
7,
265,
62,
23814,
62,
439,
8,
201,
198,
220,
220,
220,
1303,
4798,
705,
27,
377,
29,
9126,
838,
18987,
6,
201,
198,
220,
220,
220,
1303,
9078,
17,
13,
21,
220,
220,
329,
257,
62,
9186,
287,
379,
62,
4033,
13,
1712,
62,
11321,
7,
940,
2599,
201,
198,
220,
220,
220,
329,
257,
62,
9186,
287,
1353,
62,
4868,
7,
265,
62,
23814,
62,
439,
11,
940,
2599,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
4798,
705,
27,
4528,
29,
3256,
257,
62,
9186,
11,
705,
3556,
4528,
29,
6,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
9127,
262,
1271,
286,
1661,
1123,
286,
262,
19338,
363,
373,
20717,
416,
1123,
6126,
29788,
201,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
40379,
9186,
287,
40379,
62,
439,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2378,
40301,
608,
796,
965,
7,
912,
9186,
10,
6,
19355,
10,
64,
62,
9186,
58,
16,
12962,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
379,
62,
7890,
19,
25080,
8899,
13,
33295,
26933,
912,
9186,
11,
64,
62,
9186,
58,
16,
4357,
29788,
62,
265,
17,
13,
9127,
7,
9186,
40301,
608,
8,
12962,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
40781,
994,
362,
3256,
64,
62,
9186,
201,
198,
201,
198,
220,
220,
220,
3601,
705,
3556,
377,
29,
6,
201,
198,
201,
198,
220,
220,
220,
1303,
19334,
262,
3084,
351,
262,
4894,
8899,
201,
198,
220,
220,
220,
256,
4033,
82,
796,
18896,
7,
912,
62,
439,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
17618,
286,
6126,
3758,
364,
532,
15274,
201,
198,
220,
220,
220,
256,
8516,
796,
18896,
7,
4352,
363,
62,
7890,
19,
25080,
8899,
8,
1220,
256,
4033,
82,
220,
220,
220,
220,
1303,
17618,
286,
19338,
3775,
532,
951,
82,
201,
198,
220,
220,
220,
1303,
4798,
256,
8516,
11,
256,
4033,
82,
201,
198,
220,
220,
220,
611,
256,
8516,
29,
15,
25,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
27,
1671,
6927,
1671,
29,
6,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
27,
71,
18,
29,
6943,
22623,
21059,
31499,
3556,
71,
18,
29,
6,
201,
198,
220,
220,
220,
220,
220,
220,
220,
4894,
8899,
62,
11487,
7,
83,
8516,
11,
83,
4033,
82,
11,
4352,
363,
62,
7890,
19,
25080,
8899,
8,
201,
198,
201,
198,
220,
220,
220,
256,
4033,
82,
796,
18896,
7,
912,
62,
439,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
17618,
286,
6126,
3758,
364,
532,
15274,
201,
198,
220,
220,
220,
256,
8516,
796,
18896,
7,
265,
62,
7890,
19,
25080,
8899,
8,
1220,
256,
4033,
82,
220,
220,
220,
220,
1303,
17618,
286,
19338,
3775,
532,
951,
82,
201,
198,
220,
220,
220,
1303,
4798,
256,
8516,
11,
256,
4033,
82,
201,
198,
220,
220,
220,
611,
256,
8516,
29,
15,
25,
220,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
27,
1671,
6927,
1671,
29,
6,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
27,
71,
18,
29,
6943,
6524,
14226,
771,
18987,
3556,
71,
18,
29,
6,
201,
198,
220,
220,
220,
220,
220,
220,
220,
4894,
8899,
62,
11487,
7,
83,
8516,
11,
83,
4033,
82,
11,
265,
62,
7890,
19,
25080,
8899,
8,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198,
220,
220,
220,
201,
198,
201,
198,
201,
198,
201,
198,
220,
220,
220,
220,
201,
198,
201,
198,
201,
198,
220,
220,
220,
220,
201,
198,
2,
2896,
500,
1388,
2163,
13,
201,
198,
201,
198,
201,
198,
201,
198,
12417,
3419,
201,
198
] | 1.915826 | 2,281 |
"""
QAQC Viewer based on Chaco & Traits
"""
#from enthought.chaco.example_support import COLOR_PALETTE
#from enthought.enable.example_support import DemoFrame, demo_main
# Enthought library imports
from enthought.enable.api import Window, Component, ComponentEditor
from enthought.traits.api import HasTraits, Instance
from enthought.traits.ui.api import Item, Group, View
# Chaco imports
from enthought.chaco.api import Plot, ArrayDataSource, ArrayPlotData, \
BarPlot, DataRange1D, LabelAxis, LinearMapper, VPlotContainer, \
PlotAxis, PlotGrid, LinePlot, add_default_grids, PlotLabel
from enthought.chaco.tools.api import PanTool, ZoomTool
from enthought.chaco.scales.api import CalendarScaleSystem
from enthought.chaco.scales_tick_generator import ScalesTickGenerator
from sonde import Sonde
import time
import numpy as np
#==============================================================================
# Attributes to use for the plot view.
#size=(800,600)
#title="Salinity plot example"
if __name__ == "__main__":
viewer = BaseViewer()
viewer.configure_traits()
| [
37811,
198,
48,
32,
48,
34,
3582,
263,
1912,
319,
609,
10602,
1222,
4759,
896,
198,
37811,
198,
198,
2,
6738,
920,
71,
2917,
13,
354,
10602,
13,
20688,
62,
11284,
1330,
20444,
1581,
62,
47,
1847,
2767,
9328,
198,
2,
6738,
920,
71,
2917,
13,
21633,
13,
20688,
62,
11284,
1330,
34588,
19778,
11,
13605,
62,
12417,
198,
198,
2,
2039,
28895,
5888,
17944,
198,
6738,
920,
71,
2917,
13,
21633,
13,
15042,
1330,
26580,
11,
35100,
11,
35100,
17171,
198,
6738,
920,
71,
2917,
13,
9535,
896,
13,
15042,
1330,
7875,
15721,
896,
11,
2262,
590,
198,
6738,
920,
71,
2917,
13,
9535,
896,
13,
9019,
13,
15042,
1330,
9097,
11,
4912,
11,
3582,
198,
198,
2,
609,
10602,
17944,
198,
6738,
920,
71,
2917,
13,
354,
10602,
13,
15042,
1330,
28114,
11,
15690,
6601,
7416,
11,
15690,
43328,
6601,
11,
3467,
198,
220,
220,
220,
220,
2409,
43328,
11,
6060,
17257,
16,
35,
11,
36052,
31554,
271,
11,
44800,
44,
11463,
11,
569,
43328,
29869,
11,
3467,
198,
220,
220,
220,
220,
28114,
31554,
271,
11,
28114,
41339,
11,
6910,
43328,
11,
751,
62,
12286,
62,
2164,
2340,
11,
28114,
33986,
198,
6738,
920,
71,
2917,
13,
354,
10602,
13,
31391,
13,
15042,
1330,
5961,
25391,
11,
40305,
25391,
198,
6738,
920,
71,
2917,
13,
354,
10602,
13,
1416,
2040,
13,
15042,
1330,
26506,
29990,
11964,
198,
6738,
920,
71,
2917,
13,
354,
10602,
13,
1416,
2040,
62,
42298,
62,
8612,
1352,
1330,
1446,
2040,
51,
624,
8645,
1352,
198,
198,
6738,
264,
14378,
1330,
311,
14378,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
628,
198,
2,
23926,
25609,
855,
198,
2,
49213,
284,
779,
329,
262,
7110,
1570,
13,
198,
2,
7857,
16193,
7410,
11,
8054,
8,
198,
2,
7839,
2625,
19221,
6269,
7110,
1672,
1,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
19091,
796,
7308,
7680,
263,
3419,
198,
220,
220,
220,
19091,
13,
11250,
495,
62,
9535,
896,
3419,
198
] | 3.240356 | 337 |
import datetime
from . import relations
| [
198,
11748,
4818,
8079,
198,
198,
6738,
764,
1330,
2316,
628,
628,
628
] | 3.615385 | 13 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from comics.models import Comic, ComicChapter
# class PageFileInline(admin.TabularInline):
# model = ComicChapter
#
#
# class PageAdmin(admin.ModelAdmin):
# inlines = [PageFileInline, ]
# class ChapterInline(admin.TabularInline):
# model = ComicChapterFiles
#
# class ComicAdmin(admin.ModelAdmin):
# inlines = [
# ChapterInline,
# ]
# admin.site.register(ComicChapter, ComicAdmin)
admin.site.register(Comic)
admin.site.register(ComicChapter)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
12770,
13,
27530,
1330,
19949,
11,
19949,
14126,
628,
198,
2,
1398,
7873,
8979,
818,
1370,
7,
28482,
13,
33349,
934,
818,
1370,
2599,
198,
2,
220,
220,
220,
220,
2746,
796,
19949,
14126,
198,
2,
198,
2,
198,
2,
1398,
7873,
46787,
7,
28482,
13,
17633,
46787,
2599,
198,
2,
220,
220,
220,
220,
287,
6615,
796,
685,
9876,
8979,
818,
1370,
11,
2361,
198,
198,
2,
1398,
7006,
818,
1370,
7,
28482,
13,
33349,
934,
818,
1370,
2599,
198,
2,
220,
220,
220,
220,
2746,
796,
19949,
14126,
25876,
198,
2,
198,
2,
1398,
19949,
46787,
7,
28482,
13,
17633,
46787,
2599,
198,
2,
220,
220,
220,
220,
287,
6615,
796,
685,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
7006,
818,
1370,
11,
198,
2,
220,
220,
220,
220,
2361,
198,
198,
2,
13169,
13,
15654,
13,
30238,
7,
5377,
291,
14126,
11,
19949,
46787,
8,
198,
198,
28482,
13,
15654,
13,
30238,
7,
5377,
291,
8,
198,
28482,
13,
15654,
13,
30238,
7,
5377,
291,
14126,
8,
198
] | 2.728571 | 210 |
# This program displays 100 lowercase letters, fifteen per line
import turtle
from random import randint
main()
print()
# Draw a line from (x1, y1) to (x2, y2)
# def drawLine(x1, y1, x2, y2):
# turtle.penup()
# turtle.goto(x1, y1)
# turtle.pendown()
# turtle.goto(x2, y2)
# def writeText(s, x, y):
# turtle.penup() # Pull the pen up
# turtle.goto(x, y)
# turtle.pendown() # Pull the pen down
# turtle.write(s) # Write a string
# # Draw a point at the specified location (x, y)
# def drawPoint(x, y):
# turtle.penup() # Pull the pen up
# turtle.goto(x, y)
# turtle.pendown() # Pull the pen down
# turtle.begin_fill() # Begin to fill color in a shape
# turtle.circle(3)
# turtle.end_fill() # Fill the shape
# # Draw a circle centered at (x, y) with the specified radius
# def drawCircle(x = 0, y = 0, radius = 10):
# turtle.penup() # Pull the pen up
# turtle.goto(x, y - radius)
# turtle.pendown() # Pull the pen down
# turtle.circle(radius)
# # Draw a rectangle at (x, y) with the specified width and height
# def drawRectangle(x = 0, y = 0, width = 10, height = 10):
# turtle.penup() # Pull the pen up
# turtle.goto(x + width / 2, y + height / 2)
# turtle.pendown() # Pull the pen down
# turtle.right(90)
# turtle.forward(height)
# turtle.right(90)
# turtle.forward(width)
# turtle.right(90)
# turtle.forward(height)
# turtle.right(90)
# turtle.forward(width)
# Generate a random uppercase letter
# def getRandomUpperCaseLetter() :
# return getRandomCharacter('A', 'Z')
# # Generate a random digit character
# def getRandomDigitCharacter() :
# return getRandomCharacter('0', '9')
# # Generate a random character
# def getRandomASCIICharacter() :
# return chr(randint(0, 127))
#
# # Generate a random character between ch1 and ch2
# def getRandomCharacter(ch1, ch2) :
# return chr(randint(ord(ch1), ord(ch2)))
#
| [
2,
770,
1430,
11298,
1802,
2793,
7442,
7475,
11,
17280,
583,
1627,
198,
198,
11748,
28699,
198,
6738,
4738,
1330,
43720,
600,
628,
628,
628,
198,
12417,
3419,
198,
198,
4798,
3419,
198,
198,
2,
15315,
257,
1627,
422,
357,
87,
16,
11,
331,
16,
8,
284,
357,
87,
17,
11,
331,
17,
8,
198,
2,
825,
3197,
13949,
7,
87,
16,
11,
331,
16,
11,
2124,
17,
11,
331,
17,
2599,
198,
2,
28699,
13,
3617,
929,
3419,
198,
2,
28699,
13,
70,
2069,
7,
87,
16,
11,
331,
16,
8,
198,
2,
28699,
13,
37038,
593,
3419,
198,
2,
28699,
13,
70,
2069,
7,
87,
17,
11,
331,
17,
8,
628,
198,
2,
825,
3551,
8206,
7,
82,
11,
2124,
11,
331,
2599,
198,
2,
28699,
13,
3617,
929,
3419,
1303,
21429,
262,
3112,
510,
198,
2,
28699,
13,
70,
2069,
7,
87,
11,
331,
8,
198,
2,
28699,
13,
37038,
593,
3419,
1303,
21429,
262,
3112,
866,
198,
2,
28699,
13,
13564,
7,
82,
8,
1303,
19430,
257,
4731,
198,
198,
2,
1303,
15315,
257,
966,
379,
262,
7368,
4067,
357,
87,
11,
331,
8,
198,
2,
825,
3197,
12727,
7,
87,
11,
331,
2599,
198,
2,
28699,
13,
3617,
929,
3419,
1303,
21429,
262,
3112,
510,
198,
2,
28699,
13,
70,
2069,
7,
87,
11,
331,
8,
198,
2,
28699,
13,
37038,
593,
3419,
1303,
21429,
262,
3112,
866,
198,
2,
28699,
13,
27471,
62,
20797,
3419,
1303,
16623,
284,
6070,
3124,
287,
257,
5485,
198,
2,
28699,
13,
45597,
7,
18,
8,
198,
2,
28699,
13,
437,
62,
20797,
3419,
1303,
27845,
262,
5485,
628,
198,
2,
1303,
15315,
257,
9197,
19254,
379,
357,
87,
11,
331,
8,
351,
262,
7368,
16874,
198,
2,
825,
3197,
31560,
293,
7,
87,
796,
657,
11,
331,
796,
657,
11,
16874,
796,
838,
2599,
198,
2,
28699,
13,
3617,
929,
3419,
1303,
21429,
262,
3112,
510,
198,
2,
28699,
13,
70,
2069,
7,
87,
11,
331,
532,
16874,
8,
198,
2,
28699,
13,
37038,
593,
3419,
1303,
21429,
262,
3112,
866,
198,
2,
28699,
13,
45597,
7,
42172,
8,
628,
198,
2,
1303,
15315,
257,
35991,
379,
357,
87,
11,
331,
8,
351,
262,
7368,
9647,
290,
6001,
198,
2,
825,
3197,
45474,
9248,
7,
87,
796,
657,
11,
331,
796,
657,
11,
9647,
796,
838,
11,
6001,
796,
838,
2599,
198,
2,
28699,
13,
3617,
929,
3419,
1303,
21429,
262,
3112,
510,
198,
2,
28699,
13,
70,
2069,
7,
87,
1343,
9647,
1220,
362,
11,
331,
1343,
6001,
1220,
362,
8,
198,
2,
28699,
13,
37038,
593,
3419,
1303,
21429,
262,
3112,
866,
198,
2,
28699,
13,
3506,
7,
3829,
8,
198,
2,
28699,
13,
11813,
7,
17015,
8,
198,
2,
28699,
13,
3506,
7,
3829,
8,
198,
2,
28699,
13,
11813,
7,
10394,
8,
198,
2,
28699,
13,
3506,
7,
3829,
8,
198,
2,
28699,
13,
11813,
7,
17015,
8,
198,
2,
28699,
13,
3506,
7,
3829,
8,
198,
2,
28699,
13,
11813,
7,
10394,
8,
198,
198,
2,
2980,
378,
257,
4738,
334,
39921,
589,
3850,
198,
2,
825,
651,
29531,
52,
2848,
20448,
45708,
3419,
1058,
198,
2,
1441,
651,
29531,
27275,
10786,
32,
3256,
705,
57,
11537,
198,
198,
2,
1303,
2980,
378,
257,
4738,
16839,
2095,
198,
2,
825,
651,
29531,
19511,
270,
27275,
3419,
1058,
198,
2,
1441,
651,
29531,
27275,
10786,
15,
3256,
705,
24,
11537,
198,
198,
2,
1303,
2980,
378,
257,
4738,
2095,
198,
2,
825,
651,
29531,
42643,
3978,
27275,
3419,
1058,
198,
2,
1441,
442,
81,
7,
25192,
600,
7,
15,
11,
18112,
4008,
198,
2,
198,
2,
1303,
2980,
378,
257,
4738,
2095,
1022,
442,
16,
290,
442,
17,
198,
2,
825,
651,
29531,
27275,
7,
354,
16,
11,
442,
17,
8,
1058,
198,
2,
1441,
442,
81,
7,
25192,
600,
7,
585,
7,
354,
16,
828,
2760,
7,
354,
17,
22305,
198,
2,
628,
198
] | 2.814132 | 651 |
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('allrecipes/', views.allrecipes, name='allrecipes'),
path('newrecipe/', views.newrecipe, name='newrecipe'),
path('profile/', views.profile, name='profile'),
path('newuser/', views.newuser, name='newuser'),
path('details/<int:ID>', views.details, name='details'),
path('edituser/<int:ID>', views.edituser, name='edituser'),
path('editrecipe/<int:ID>', views.editrecipe, name='editrecipe'),
] | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
1330,
5009,
628,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
3256,
5009,
13,
9630,
11,
1438,
11639,
9630,
33809,
198,
220,
220,
220,
3108,
10786,
439,
8344,
18636,
14,
3256,
5009,
13,
439,
8344,
18636,
11,
1438,
11639,
439,
8344,
18636,
33809,
198,
220,
220,
220,
3108,
10786,
3605,
29102,
431,
14,
3256,
5009,
13,
3605,
29102,
431,
11,
1438,
11639,
3605,
29102,
431,
33809,
198,
220,
220,
220,
3108,
10786,
13317,
14,
3256,
5009,
13,
13317,
11,
1438,
11639,
13317,
33809,
198,
220,
220,
220,
3108,
10786,
3605,
7220,
14,
3256,
5009,
13,
3605,
7220,
11,
1438,
11639,
3605,
7220,
33809,
198,
220,
220,
220,
3108,
10786,
36604,
14,
27,
600,
25,
2389,
29,
3256,
5009,
13,
36604,
11,
1438,
11639,
36604,
33809,
198,
220,
220,
220,
3108,
10786,
19312,
7220,
14,
27,
600,
25,
2389,
29,
3256,
5009,
13,
19312,
7220,
11,
1438,
11639,
19312,
7220,
33809,
198,
220,
220,
220,
3108,
10786,
19312,
29102,
431,
14,
27,
600,
25,
2389,
29,
3256,
5009,
13,
19312,
29102,
431,
11,
1438,
11639,
19312,
29102,
431,
33809,
198,
60
] | 2.723077 | 195 |
# Importing the hashing library
import hashlib
# Importing the visual libraries
from PyInquirer import Separator, prompt
from termcolor import colored
# Defining the hash function.
| [
2,
17267,
278,
262,
49544,
5888,
198,
11748,
12234,
8019,
198,
198,
2,
17267,
278,
262,
5874,
12782,
198,
6738,
9485,
818,
29782,
81,
1330,
8621,
283,
1352,
11,
6152,
198,
6738,
3381,
8043,
1330,
16396,
198,
198,
2,
2896,
3191,
262,
12234,
2163,
13,
628,
628
] | 3.957447 | 47 |
#-----------------------------------------------------------------------------
#
# Copyright (c) 2007 by Enthought, Inc.
# All rights reserved.
#
#-----------------------------------------------------------------------------
"""
The UI service for the Data plugin.
"""
# Standard library imports.
import logging
# Enthought library imports.
from envisage.api import ApplicationObject, UOL
from pyface.api import confirm, error, FileDialog, information, YES
# Data library imports.
# Local imports.
from services import IDATA_MODEL
# Setup a logger for this module
logger = logging.getLogger(__name__)
class UiService(ApplicationObject):
"""
The UI service for the Data plugin.
"""
##########################################################################
# Attributes
##########################################################################
#### public 'UiService' interface ########################################
# A reference to the Data plugin's model service.
model_service = UOL
##########################################################################
# 'Object' interface
##########################################################################
#### operator methods ####################################################
def __init__(self, **kws):
"""
Constructor.
Extended to ensure our UOL properties are set.
"""
super(UiService, self).__init__(**kws)
# Ensure we have a default model-service if one wasn't specified.
if self.model_service is None:
self.model_service = 'service://%s' % IDATA_MODEL
return
##########################################################################
# 'UIService' interface
##########################################################################
#### public methods ######################################################
#TODO cgalvan: to be implemented
# def delete_data(self, context, data_name, parent_window):
# """
# Delete a Data.
#
# """
#
# # Open confirmation-dialog to confirm deletion
# message = 'Are you sure you want to delete %s?' % data_name
# if confirm(parent_window, message) == YES:
# self.model_service.delete_context_item(context, data_name)
#
# return
def edit_data(self, window, data):
"""
Edit the data parameters of the specified data.
"""
data_parameters = data.data_parameters
edit_ui = data_parameters.edit_traits(
view='data_view',
kind='livemodal',
# handler=handler,
parent=window)
return edit_ui.result
def display_message(self, msg, title=None, is_error=False):
"""
Display the specified message to the user.
"""
# Ensure we record any reasons this method doesn't work. Especially
# since it's critical in displaying errors to users!
try:
# Attempt to identify the current application window.
parent_window = None
workbench = self.application.get_service('envisage.'
'workbench.IWorkbench')
if workbench is not None:
parent_window = workbench.active_window.control
# Display the requested message
if is_error:
error(parent_window, msg, title=title)
else:
information(parent_window, msg, title=title)
except:
logger.exception('Unable to display pop-up message')
return
#### EOF #####################################################################
| [
2,
10097,
32501,
198,
2,
198,
2,
220,
15069,
357,
66,
8,
4343,
416,
2039,
28895,
11,
3457,
13,
198,
2,
220,
1439,
2489,
10395,
13,
198,
2,
198,
2,
10097,
32501,
198,
37811,
198,
464,
12454,
2139,
329,
262,
6060,
13877,
13,
198,
198,
37811,
198,
198,
2,
8997,
5888,
17944,
13,
198,
11748,
18931,
198,
198,
2,
2039,
28895,
5888,
17944,
13,
198,
6738,
45633,
496,
13,
15042,
1330,
15678,
10267,
11,
471,
3535,
198,
6738,
12972,
2550,
13,
15042,
1330,
6216,
11,
4049,
11,
9220,
44204,
11,
1321,
11,
21560,
198,
198,
2,
6060,
5888,
17944,
13,
198,
198,
2,
10714,
17944,
13,
198,
6738,
2594,
1330,
4522,
13563,
62,
33365,
3698,
198,
198,
2,
31122,
257,
49706,
329,
428,
8265,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
198,
4871,
471,
72,
16177,
7,
23416,
10267,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
383,
12454,
2139,
329,
262,
6060,
13877,
13,
628,
220,
220,
220,
37227,
628,
220,
220,
220,
1303,
29113,
29113,
7804,
2,
198,
220,
220,
220,
1303,
49213,
198,
220,
220,
220,
1303,
29113,
29113,
7804,
2,
628,
220,
220,
220,
1303,
21017,
1171,
705,
52,
72,
16177,
6,
7071,
1303,
29113,
4242,
21017,
628,
220,
220,
220,
1303,
317,
4941,
284,
262,
6060,
13877,
338,
2746,
2139,
13,
198,
220,
220,
220,
2746,
62,
15271,
796,
471,
3535,
628,
220,
220,
220,
1303,
29113,
29113,
7804,
2,
198,
220,
220,
220,
1303,
705,
10267,
6,
7071,
198,
220,
220,
220,
1303,
29113,
29113,
7804,
2,
628,
220,
220,
220,
1303,
21017,
10088,
5050,
1303,
29113,
14468,
21017,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
12429,
74,
18504,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
28407,
273,
13,
628,
220,
220,
220,
220,
220,
220,
220,
24204,
284,
4155,
674,
471,
3535,
6608,
389,
900,
13,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
2208,
7,
52,
72,
16177,
11,
2116,
737,
834,
15003,
834,
7,
1174,
74,
18504,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
48987,
356,
423,
257,
4277,
2746,
12,
15271,
611,
530,
2492,
470,
7368,
13,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
19849,
62,
15271,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19849,
62,
15271,
796,
705,
15271,
1378,
4,
82,
6,
4064,
4522,
13563,
62,
33365,
3698,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
628,
220,
220,
220,
1303,
29113,
29113,
7804,
2,
198,
220,
220,
220,
1303,
705,
52,
1797,
712,
501,
6,
7071,
198,
220,
220,
220,
1303,
29113,
29113,
7804,
2,
628,
220,
220,
220,
1303,
21017,
1171,
5050,
1303,
29113,
14468,
4242,
2,
628,
220,
220,
220,
1303,
51,
3727,
46,
269,
13528,
10438,
25,
284,
307,
9177,
198,
220,
220,
220,
1303,
220,
220,
220,
825,
12233,
62,
7890,
7,
944,
11,
4732,
11,
1366,
62,
3672,
11,
2560,
62,
17497,
2599,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
23520,
257,
6060,
13,
198,
220,
220,
220,
1303,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
1303,
4946,
12641,
12,
38969,
519,
284,
6216,
39948,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
3275,
796,
705,
8491,
345,
1654,
345,
765,
284,
12233,
4064,
82,
8348,
4064,
1366,
62,
3672,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
611,
6216,
7,
8000,
62,
17497,
11,
3275,
8,
6624,
21560,
25,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
19849,
62,
15271,
13,
33678,
62,
22866,
62,
9186,
7,
22866,
11,
1366,
62,
3672,
8,
198,
220,
220,
220,
1303,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
220,
1441,
628,
220,
220,
220,
825,
4370,
62,
7890,
7,
944,
11,
4324,
11,
1366,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
5312,
262,
1366,
10007,
286,
262,
7368,
1366,
13,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1366,
62,
17143,
7307,
796,
1366,
13,
7890,
62,
17143,
7307,
628,
220,
220,
220,
220,
220,
220,
220,
4370,
62,
9019,
796,
1366,
62,
17143,
7307,
13,
19312,
62,
9535,
896,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1570,
11639,
7890,
62,
1177,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1611,
11639,
12583,
4666,
282,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
21360,
28,
30281,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2560,
28,
17497,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
4370,
62,
9019,
13,
20274,
628,
220,
220,
220,
825,
3359,
62,
20500,
7,
944,
11,
31456,
11,
3670,
28,
14202,
11,
318,
62,
18224,
28,
25101,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
16531,
262,
7368,
3275,
284,
262,
2836,
13,
628,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
48987,
356,
1700,
597,
3840,
428,
2446,
1595,
470,
670,
13,
220,
18948,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1201,
340,
338,
4688,
287,
19407,
8563,
284,
2985,
0,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
25770,
284,
5911,
262,
1459,
3586,
4324,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2560,
62,
17497,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
670,
26968,
796,
2116,
13,
31438,
13,
1136,
62,
15271,
10786,
268,
4703,
496,
2637,
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,
705,
1818,
26968,
13,
40,
12468,
26968,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
670,
26968,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2560,
62,
17497,
796,
670,
26968,
13,
5275,
62,
17497,
13,
13716,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
16531,
262,
9167,
3275,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
318,
62,
18224,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
7,
8000,
62,
17497,
11,
31456,
11,
3670,
28,
7839,
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,
1321,
7,
8000,
62,
17497,
11,
31456,
11,
3670,
28,
7839,
8,
628,
220,
220,
220,
220,
220,
220,
220,
2845,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
49706,
13,
1069,
4516,
10786,
3118,
540,
284,
3359,
1461,
12,
929,
3275,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
628,
198,
4242,
412,
19238,
1303,
29113,
29113,
4242,
198
] | 2.889734 | 1,315 |
import pytest
from channels.db import database_sync_to_async
from channels.testing import WebsocketCommunicator
from ..api.model_mixins import Request
from ..api.push import push_message_about_instance, report_error
from ..api.serializers import (
EpicSerializer,
ProjectSerializer,
ScratchOrgSerializer,
TaskSerializer,
)
from ..consumers import PushNotificationConsumer
from ..routing import websockets
pytestmark = pytest.mark.asyncio
@database_sync_to_async
@pytest.mark.django_db
@pytest.mark.django_db
@pytest.mark.django_db
@pytest.mark.django_db
@pytest.mark.django_db
@pytest.mark.django_db
@pytest.mark.django_db
@pytest.mark.django_db
# These tests need to go last, after any tests that start up a Communicator:
@pytest.mark.django_db
| [
11748,
12972,
9288,
198,
6738,
9619,
13,
9945,
1330,
6831,
62,
27261,
62,
1462,
62,
292,
13361,
198,
6738,
9619,
13,
33407,
1330,
47736,
5459,
30813,
26407,
198,
198,
6738,
11485,
15042,
13,
19849,
62,
19816,
1040,
1330,
19390,
198,
6738,
11485,
15042,
13,
14689,
1330,
4574,
62,
20500,
62,
10755,
62,
39098,
11,
989,
62,
18224,
198,
6738,
11485,
15042,
13,
46911,
11341,
1330,
357,
198,
220,
220,
220,
16781,
32634,
7509,
11,
198,
220,
220,
220,
4935,
32634,
7509,
11,
198,
220,
220,
220,
1446,
36722,
46808,
32634,
7509,
11,
198,
220,
220,
220,
15941,
32634,
7509,
11,
198,
8,
198,
6738,
11485,
5936,
31260,
1330,
23691,
3673,
2649,
49106,
198,
6738,
11485,
81,
13660,
1330,
2639,
11603,
198,
198,
9078,
9288,
4102,
796,
12972,
9288,
13,
4102,
13,
292,
13361,
952,
628,
198,
31,
48806,
62,
27261,
62,
1462,
62,
292,
13361,
628,
198,
31,
9078,
9288,
13,
4102,
13,
28241,
14208,
62,
9945,
628,
198,
31,
9078,
9288,
13,
4102,
13,
28241,
14208,
62,
9945,
628,
198,
31,
9078,
9288,
13,
4102,
13,
28241,
14208,
62,
9945,
628,
198,
31,
9078,
9288,
13,
4102,
13,
28241,
14208,
62,
9945,
628,
198,
31,
9078,
9288,
13,
4102,
13,
28241,
14208,
62,
9945,
628,
198,
31,
9078,
9288,
13,
4102,
13,
28241,
14208,
62,
9945,
628,
198,
31,
9078,
9288,
13,
4102,
13,
28241,
14208,
62,
9945,
628,
198,
31,
9078,
9288,
13,
4102,
13,
28241,
14208,
62,
9945,
628,
198,
2,
2312,
5254,
761,
284,
467,
938,
11,
706,
597,
5254,
326,
923,
510,
257,
4440,
26407,
25,
198,
31,
9078,
9288,
13,
4102,
13,
28241,
14208,
62,
9945,
198
] | 2.871795 | 273 |
import markdown
from flask import redirect, url_for, flash, render_template, session, request, current_app, abort
from flask_login import current_user, login_user, logout_user, login_required
from cajitos_site import bcrypt
from cajitos_site.users import users
from cajitos_site.users.forms import RegistrationForm, LoginForm, UpdateAccountForm, RequestResetForm, ResetPasswordForm
from cajitos_site.models import User, load_user
from cajitos_site.utils.email import send_service_email
from cajitos_site.utils.utils import (
get_redirect_target, save_picture
)
from cajitos_site.utils.auth_utils import generate_google_auth_request, get_google_user_info
# Disbaled temporarily or forever
# @users.route("/register", methods=['GET', 'POST'])
@users.route("/login", methods=['GET', 'POST'])
@users.route('/google_login')
@users.route('/google_login/callback')
@users.route('/logout')
@users.route('/account/<int:user_id>')
@users.route('/account/<int:user_id>/update', methods=['GET', 'POST'])
@login_required
@users.route("/reset_password", methods=['GET', 'POST'])
@users.route("/reset_password/<token>", methods=['GET', 'POST'])
| [
11748,
1317,
2902,
198,
6738,
42903,
1330,
18941,
11,
19016,
62,
1640,
11,
7644,
11,
8543,
62,
28243,
11,
6246,
11,
2581,
11,
1459,
62,
1324,
11,
15614,
198,
6738,
42903,
62,
38235,
1330,
1459,
62,
7220,
11,
17594,
62,
7220,
11,
2604,
448,
62,
7220,
11,
17594,
62,
35827,
198,
198,
6738,
269,
1228,
270,
418,
62,
15654,
1330,
275,
29609,
198,
6738,
269,
1228,
270,
418,
62,
15654,
13,
18417,
1330,
2985,
198,
6738,
269,
1228,
270,
418,
62,
15654,
13,
18417,
13,
23914,
1330,
24610,
8479,
11,
23093,
8479,
11,
10133,
30116,
8479,
11,
19390,
4965,
316,
8479,
11,
30027,
35215,
8479,
198,
6738,
269,
1228,
270,
418,
62,
15654,
13,
27530,
1330,
11787,
11,
3440,
62,
7220,
198,
6738,
269,
1228,
270,
418,
62,
15654,
13,
26791,
13,
12888,
1330,
3758,
62,
15271,
62,
12888,
198,
6738,
269,
1228,
270,
418,
62,
15654,
13,
26791,
13,
26791,
1330,
357,
198,
220,
220,
220,
651,
62,
445,
1060,
62,
16793,
11,
3613,
62,
34053,
198,
8,
198,
6738,
269,
1228,
270,
418,
62,
15654,
13,
26791,
13,
18439,
62,
26791,
1330,
7716,
62,
13297,
62,
18439,
62,
25927,
11,
651,
62,
13297,
62,
7220,
62,
10951,
628,
198,
2,
3167,
65,
3021,
13413,
393,
8097,
198,
2,
2488,
18417,
13,
38629,
7203,
14,
30238,
1600,
5050,
28,
17816,
18851,
3256,
705,
32782,
6,
12962,
628,
198,
31,
18417,
13,
38629,
7203,
14,
38235,
1600,
5050,
28,
17816,
18851,
3256,
705,
32782,
6,
12962,
628,
198,
31,
18417,
13,
38629,
10786,
14,
13297,
62,
38235,
11537,
628,
198,
31,
18417,
13,
38629,
10786,
14,
13297,
62,
38235,
14,
47423,
11537,
628,
198,
31,
18417,
13,
38629,
10786,
14,
6404,
448,
11537,
628,
198,
31,
18417,
13,
38629,
10786,
14,
23317,
14,
27,
600,
25,
7220,
62,
312,
29,
11537,
628,
198,
31,
18417,
13,
38629,
10786,
14,
23317,
14,
27,
600,
25,
7220,
62,
312,
29,
14,
19119,
3256,
5050,
28,
17816,
18851,
3256,
705,
32782,
6,
12962,
198,
31,
38235,
62,
35827,
628,
198,
31,
18417,
13,
38629,
7203,
14,
42503,
62,
28712,
1600,
5050,
28,
17816,
18851,
3256,
705,
32782,
6,
12962,
628,
198,
31,
18417,
13,
38629,
7203,
14,
42503,
62,
28712,
14,
27,
30001,
29,
1600,
5050,
28,
17816,
18851,
3256,
705,
32782,
6,
12962,
198
] | 3.018325 | 382 |
import json
import os
from typing import Callable, Union
from typing import Optional, List
import torch
from sdc.constants import SCENE_TAG_TYPE_TO_OPTIONS, VALID_TRAJECTORY_TAGS
from ..features import FeatureProducerBase
from ..proto import get_tags_from_request, proto_to_dict
from ..utils import (
get_file_paths,
get_gt_trajectory,
get_latest_track_state_by_id,
get_to_track_frame_transform,
read_feature_map_from_file,
request_is_valid,
scenes_generator,
transform_2d_points,
)
| [
11748,
33918,
198,
11748,
28686,
198,
6738,
19720,
1330,
4889,
540,
11,
4479,
198,
6738,
19720,
1330,
32233,
11,
7343,
198,
198,
11748,
28034,
198,
198,
6738,
264,
17896,
13,
9979,
1187,
1330,
6374,
39267,
62,
42197,
62,
25216,
62,
10468,
62,
3185,
51,
11053,
11,
26173,
2389,
62,
51,
3861,
23680,
15513,
62,
42197,
50,
198,
6738,
11485,
40890,
1330,
27018,
11547,
2189,
14881,
198,
6738,
11485,
1676,
1462,
1330,
651,
62,
31499,
62,
6738,
62,
25927,
11,
44876,
62,
1462,
62,
11600,
198,
6738,
11485,
26791,
1330,
357,
198,
220,
220,
220,
651,
62,
7753,
62,
6978,
82,
11,
198,
220,
220,
220,
651,
62,
13655,
62,
9535,
752,
652,
11,
198,
220,
220,
220,
651,
62,
42861,
62,
11659,
62,
5219,
62,
1525,
62,
312,
11,
198,
220,
220,
220,
651,
62,
1462,
62,
11659,
62,
14535,
62,
35636,
11,
198,
220,
220,
220,
1100,
62,
30053,
62,
8899,
62,
6738,
62,
7753,
11,
198,
220,
220,
220,
2581,
62,
271,
62,
12102,
11,
198,
220,
220,
220,
8188,
62,
8612,
1352,
11,
198,
220,
220,
220,
6121,
62,
17,
67,
62,
13033,
11,
198,
8,
628,
628
] | 2.722513 | 191 |
__all__ = ["file_read", 'image_deal', 'search_order', 'static_data']
| [
834,
439,
834,
796,
14631,
7753,
62,
961,
1600,
705,
9060,
62,
31769,
3256,
705,
12947,
62,
2875,
3256,
705,
12708,
62,
7890,
20520,
201,
198
] | 2.692308 | 26 |
'''
@Author: Pawn
@Date: 2020-08-12
@LastEditTime: 2020-08-12 17:06:08
@Description: example for module timer
@FilePath: example_wdt.py
'''
from machine import WDT
from machine import Timer
timer1 = Timer(Timer.Timer1)
if __name__ == '__main__':
wdt = WDT(20) # 启动看门狗,间隔时长
timer1.start(period=15000, mode=timer1.PERIODIC, callback=feed) # 使用定时器喂狗
# wdt.stop()
| [
7061,
6,
198,
31,
13838,
25,
350,
3832,
198,
31,
10430,
25,
12131,
12,
2919,
12,
1065,
198,
31,
5956,
18378,
7575,
25,
12131,
12,
2919,
12,
1065,
1596,
25,
3312,
25,
2919,
198,
31,
11828,
25,
1672,
329,
8265,
19781,
198,
31,
8979,
15235,
25,
1672,
62,
16993,
83,
13,
9078,
198,
7061,
6,
198,
198,
6738,
4572,
1330,
370,
24544,
198,
6738,
4572,
1330,
5045,
263,
628,
198,
45016,
16,
796,
5045,
263,
7,
48801,
13,
48801,
16,
8,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
266,
28664,
796,
370,
24544,
7,
1238,
8,
220,
1303,
10263,
238,
107,
27950,
101,
40367,
233,
29785,
101,
45379,
245,
171,
120,
234,
29785,
112,
49694,
242,
33768,
114,
165,
243,
123,
198,
220,
220,
220,
19781,
16,
13,
9688,
7,
41007,
28,
1314,
830,
11,
4235,
28,
45016,
16,
13,
18973,
40,
3727,
2149,
11,
23838,
28,
12363,
8,
220,
1303,
220,
45635,
18796,
101,
22522,
248,
33768,
114,
161,
247,
101,
161,
244,
224,
45379,
245,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
266,
28664,
13,
11338,
3419,
198
] | 1.994792 | 192 |
from django.conf.urls import url
from django.urls import reverse , resolve
from rest_framework import status
from rest_framework.test import APITestCase
from users.views import (
followUser , users , UserProfileUpdate ,
ProfilePictureUpdate , usersRecommended ,
user , userMumbles, userArticles, passwordChange,
sendActivationEmail, sendActivationEmail , activate)
# Create your tests here. | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
837,
10568,
198,
6738,
1334,
62,
30604,
1330,
3722,
198,
6738,
1334,
62,
30604,
13,
9288,
1330,
3486,
2043,
395,
20448,
198,
6738,
2985,
13,
33571,
1330,
357,
198,
220,
220,
220,
1061,
12982,
837,
2985,
837,
11787,
37046,
10260,
837,
220,
198,
220,
220,
220,
13118,
28070,
10260,
837,
2985,
36171,
837,
198,
220,
220,
220,
2836,
837,
2836,
44,
25329,
11,
2836,
8001,
2983,
11,
9206,
19400,
11,
198,
220,
220,
220,
3758,
25526,
341,
15333,
11,
3758,
25526,
341,
15333,
837,
15155,
8,
198,
2,
13610,
534,
5254,
994,
13
] | 3.633929 | 112 |
import configparser
import os
from redmine import Redmine
| [
11748,
4566,
48610,
198,
11748,
28686,
198,
6738,
2266,
3810,
1330,
2297,
3810,
198
] | 4.142857 | 14 |
##############################################################################
#
# Copyright (c) 2005 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Utility functions
These functions are designed to be imported and run at
module level to add functionality to the test environment.
"""
import os
import sys
import time
import random
import transaction
import layer
@layer.appcall
def setupCoreSessions(app):
'''Sets up the session_data_manager e.a.'''
from Acquisition import aq_base
commit = 0
if not hasattr(app, 'temp_folder'):
from Products.TemporaryFolder.TemporaryFolder import MountedTemporaryFolder
tf = MountedTemporaryFolder('temp_folder', 'Temporary Folder')
app._setObject('temp_folder', tf)
commit = 1
if not hasattr(aq_base(app.temp_folder), 'session_data'):
from Products.Transience.Transience import TransientObjectContainer
toc = TransientObjectContainer('session_data',
'Session Data Container',
timeout_mins=3,
limit=100)
app.temp_folder._setObject('session_data', toc)
commit = 1
if not hasattr(app, 'browser_id_manager'):
from Products.Sessions.BrowserIdManager import BrowserIdManager
bid = BrowserIdManager('browser_id_manager',
'Browser Id Manager')
app._setObject('browser_id_manager', bid)
commit = 1
if not hasattr(app, 'session_data_manager'):
from Products.Sessions.SessionDataManager import SessionDataManager
sdm = SessionDataManager('session_data_manager',
title='Session Data Manager',
path='/temp_folder/session_data',
requestName='SESSION')
app._setObject('session_data_manager', sdm)
commit = 1
if commit:
transaction.commit()
@layer.appcall
def setupSiteErrorLog(app):
'''Sets up the error_log object required by ZPublisher.'''
if not hasattr(app, 'error_log'):
try:
from Products.SiteErrorLog.SiteErrorLog import SiteErrorLog
except ImportError:
pass
else:
app._setObject('error_log', SiteErrorLog())
transaction.commit()
def importObjectFromFile(container, filename, quiet=0):
'''Imports an object from a (.zexp) file into the given container.'''
from ZopeLite import _print, _patched
quiet = quiet or not _patched
start = time.time()
if not quiet: _print("Importing %s ... " % os.path.basename(filename))
container._importObjectFromFile(filename, verify=0)
transaction.commit()
if not quiet: _print('done (%.3fs)\n' % (time.time() - start))
_Z2HOST = None
_Z2PORT = None
def startZServer(number_of_threads=1, log=None):
'''Starts an HTTP ZServer thread.'''
global _Z2HOST, _Z2PORT
if _Z2HOST is None:
_Z2HOST = '127.0.0.1'
_Z2PORT = random.choice(range(55000, 55500))
from threadutils import setNumberOfThreads
setNumberOfThreads(number_of_threads)
from threadutils import QuietThread, zserverRunner
t = QuietThread(target=zserverRunner, args=(_Z2HOST, _Z2PORT, log))
t.setDaemon(1)
t.start()
time.sleep(0.1) # Sandor Palfy
return _Z2HOST, _Z2PORT
def makerequest(app, stdout=sys.stdout):
'''Wraps the app into a fresh REQUEST.'''
from Testing.makerequest import makerequest as _makerequest
environ = {}
environ['SERVER_NAME'] = _Z2HOST or 'nohost'
environ['SERVER_PORT'] = '%d' % (_Z2PORT or 80)
environ['REQUEST_METHOD'] = 'GET'
return _makerequest(app, stdout=stdout, environ=environ)
def appcall(func, *args, **kw):
'''Calls a function passing 'app' as first argument.'''
from base import app, close
app = app()
args = (app,) + args
try:
return func(*args, **kw)
finally:
transaction.abort()
close(app)
def makelist(arg):
'''Turns arg into a list. Where arg may be
list, tuple, or string.
'''
if type(arg) == type([]):
return arg
if type(arg) == type(()):
return list(arg)
if type(arg) == type(''):
return filter(None, [arg])
raise ValueError('Argument must be list, tuple, or string')
__all__ = [
'setupCoreSessions',
'setupSiteErrorLog',
'startZServer',
'importObjectFromFile',
'appcall',
'makerequest',
'makelist',
]
| [
29113,
29113,
7804,
4242,
2235,
198,
2,
198,
2,
15069,
357,
66,
8,
5075,
1168,
3008,
5693,
290,
25767,
669,
13,
198,
2,
198,
2,
770,
3788,
318,
2426,
284,
262,
8617,
286,
262,
1168,
3008,
5094,
13789,
11,
198,
2,
10628,
362,
13,
16,
357,
57,
6489,
737,
220,
317,
4866,
286,
262,
1168,
6489,
815,
13873,
428,
6082,
13,
198,
2,
12680,
47466,
3180,
36592,
2389,
1961,
366,
1921,
3180,
1,
5357,
15529,
5357,
11096,
7788,
32761,
6375,
8959,
49094,
198,
2,
34764,
11015,
15986,
13954,
48778,
1961,
11,
47783,
2751,
11,
21728,
5626,
40880,
5390,
11,
3336,
8959,
49094,
198,
2,
34764,
11015,
3963,
37977,
2538,
11,
34482,
3398,
1565,
5603,
25382,
11,
36218,
38604,
3268,
10913,
2751,
12529,
11,
5357,
376,
46144,
198,
2,
7473,
317,
16652,
2149,
37232,
33079,
48933,
13,
198,
2,
198,
29113,
29113,
7804,
4242,
2235,
198,
37811,
18274,
879,
5499,
198,
198,
4711,
5499,
389,
3562,
284,
307,
17392,
290,
1057,
379,
198,
21412,
1241,
284,
751,
11244,
284,
262,
1332,
2858,
13,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
4738,
198,
11748,
8611,
198,
11748,
7679,
628,
198,
31,
29289,
13,
1324,
13345,
198,
4299,
9058,
14055,
50,
6202,
7,
1324,
2599,
198,
220,
220,
220,
705,
7061,
50,
1039,
510,
262,
6246,
62,
7890,
62,
37153,
304,
13,
64,
2637,
7061,
198,
220,
220,
220,
422,
44564,
1330,
257,
80,
62,
8692,
198,
220,
220,
220,
4589,
796,
657,
628,
220,
220,
220,
611,
407,
468,
35226,
7,
1324,
11,
705,
29510,
62,
43551,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
422,
18675,
13,
12966,
5551,
41092,
13,
12966,
5551,
41092,
1330,
5628,
276,
12966,
5551,
41092,
198,
220,
220,
220,
220,
220,
220,
220,
48700,
796,
5628,
276,
12966,
5551,
41092,
10786,
29510,
62,
43551,
3256,
705,
12966,
5551,
48107,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
598,
13557,
2617,
10267,
10786,
29510,
62,
43551,
3256,
48700,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4589,
796,
352,
628,
220,
220,
220,
611,
407,
468,
35226,
7,
30188,
62,
8692,
7,
1324,
13,
29510,
62,
43551,
828,
705,
29891,
62,
7890,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
422,
18675,
13,
8291,
1240,
13,
8291,
1240,
1330,
3602,
1153,
10267,
29869,
198,
220,
220,
220,
220,
220,
220,
220,
284,
66,
796,
3602,
1153,
10267,
29869,
10786,
29891,
62,
7890,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
36044,
6060,
43101,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26827,
62,
42951,
28,
18,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4179,
28,
3064,
8,
198,
220,
220,
220,
220,
220,
220,
220,
598,
13,
29510,
62,
43551,
13557,
2617,
10267,
10786,
29891,
62,
7890,
3256,
284,
66,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4589,
796,
352,
628,
220,
220,
220,
611,
407,
468,
35226,
7,
1324,
11,
705,
40259,
62,
312,
62,
37153,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
422,
18675,
13,
50,
6202,
13,
46532,
7390,
13511,
1330,
34270,
7390,
13511,
198,
220,
220,
220,
220,
220,
220,
220,
8406,
796,
34270,
7390,
13511,
10786,
40259,
62,
312,
62,
37153,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
46532,
5121,
9142,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
598,
13557,
2617,
10267,
10786,
40259,
62,
312,
62,
37153,
3256,
8406,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4589,
796,
352,
628,
220,
220,
220,
611,
407,
468,
35226,
7,
1324,
11,
705,
29891,
62,
7890,
62,
37153,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
422,
18675,
13,
50,
6202,
13,
36044,
6601,
13511,
1330,
23575,
6601,
13511,
198,
220,
220,
220,
220,
220,
220,
220,
264,
36020,
796,
23575,
6601,
13511,
10786,
29891,
62,
7890,
62,
37153,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3670,
11639,
36044,
6060,
9142,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3108,
11639,
14,
29510,
62,
43551,
14,
29891,
62,
7890,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2581,
5376,
11639,
50,
47621,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
598,
13557,
2617,
10267,
10786,
29891,
62,
7890,
62,
37153,
3256,
264,
36020,
8,
198,
220,
220,
220,
220,
220,
220,
220,
4589,
796,
352,
628,
220,
220,
220,
611,
4589,
25,
198,
220,
220,
220,
220,
220,
220,
220,
8611,
13,
41509,
3419,
628,
198,
31,
29289,
13,
1324,
13345,
198,
4299,
9058,
29123,
12331,
11187,
7,
1324,
2599,
198,
220,
220,
220,
705,
7061,
50,
1039,
510,
262,
4049,
62,
6404,
2134,
2672,
416,
1168,
46471,
2637,
7061,
198,
220,
220,
220,
611,
407,
468,
35226,
7,
1324,
11,
705,
18224,
62,
6404,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
422,
18675,
13,
29123,
12331,
11187,
13,
29123,
12331,
11187,
1330,
14413,
12331,
11187,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
17267,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
598,
13557,
2617,
10267,
10786,
18224,
62,
6404,
3256,
14413,
12331,
11187,
28955,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8611,
13,
41509,
3419,
628,
198,
4299,
1330,
10267,
4863,
8979,
7,
34924,
11,
29472,
11,
5897,
28,
15,
2599,
198,
220,
220,
220,
705,
7061,
3546,
3742,
281,
2134,
422,
257,
20262,
89,
11201,
8,
2393,
656,
262,
1813,
9290,
2637,
7061,
198,
220,
220,
220,
422,
1168,
3008,
43,
578,
1330,
4808,
4798,
11,
4808,
8071,
1740,
198,
220,
220,
220,
5897,
796,
5897,
393,
407,
4808,
8071,
1740,
198,
220,
220,
220,
923,
796,
640,
13,
2435,
3419,
198,
220,
220,
220,
611,
407,
5897,
25,
4808,
4798,
7203,
20939,
278,
4064,
82,
2644,
366,
4064,
28686,
13,
6978,
13,
12093,
12453,
7,
34345,
4008,
198,
220,
220,
220,
9290,
13557,
11748,
10267,
4863,
8979,
7,
34345,
11,
11767,
28,
15,
8,
198,
220,
220,
220,
8611,
13,
41509,
3419,
198,
220,
220,
220,
611,
407,
5897,
25,
4808,
4798,
10786,
28060,
357,
7225,
18,
9501,
19415,
77,
6,
4064,
357,
2435,
13,
2435,
3419,
532,
923,
4008,
628,
198,
62,
57,
17,
39,
10892,
796,
6045,
198,
62,
57,
17,
15490,
796,
6045,
198,
198,
4299,
923,
57,
10697,
7,
17618,
62,
1659,
62,
16663,
82,
28,
16,
11,
2604,
28,
14202,
2599,
198,
220,
220,
220,
705,
7061,
1273,
5889,
281,
14626,
1168,
10697,
4704,
2637,
7061,
198,
220,
220,
220,
3298,
4808,
57,
17,
39,
10892,
11,
4808,
57,
17,
15490,
198,
220,
220,
220,
611,
4808,
57,
17,
39,
10892,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
57,
17,
39,
10892,
796,
705,
16799,
13,
15,
13,
15,
13,
16,
6,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
57,
17,
15490,
796,
4738,
13,
25541,
7,
9521,
7,
2816,
830,
11,
44717,
405,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
422,
4704,
26791,
1330,
900,
15057,
5189,
16818,
82,
198,
220,
220,
220,
220,
220,
220,
220,
900,
15057,
5189,
16818,
82,
7,
17618,
62,
1659,
62,
16663,
82,
8,
198,
220,
220,
220,
220,
220,
220,
220,
422,
4704,
26791,
1330,
37355,
16818,
11,
1976,
15388,
49493,
198,
220,
220,
220,
220,
220,
220,
220,
256,
796,
37355,
16818,
7,
16793,
28,
89,
15388,
49493,
11,
26498,
16193,
62,
57,
17,
39,
10892,
11,
4808,
57,
17,
15490,
11,
2604,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
256,
13,
2617,
26531,
7966,
7,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
256,
13,
9688,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
640,
13,
42832,
7,
15,
13,
16,
8,
1303,
3837,
273,
350,
1604,
88,
198,
220,
220,
220,
1441,
4808,
57,
17,
39,
10892,
11,
4808,
57,
17,
15490,
628,
198,
4299,
787,
25927,
7,
1324,
11,
14367,
448,
28,
17597,
13,
19282,
448,
2599,
198,
220,
220,
220,
705,
7061,
36918,
862,
262,
598,
656,
257,
4713,
4526,
35780,
2637,
7061,
198,
220,
220,
220,
422,
23983,
13,
15883,
25927,
1330,
787,
25927,
355,
4808,
15883,
25927,
198,
220,
220,
220,
551,
2268,
796,
23884,
198,
220,
220,
220,
551,
2268,
17816,
35009,
5959,
62,
20608,
20520,
796,
4808,
57,
17,
39,
10892,
393,
705,
77,
1219,
455,
6,
198,
220,
220,
220,
551,
2268,
17816,
35009,
5959,
62,
15490,
20520,
796,
705,
4,
67,
6,
4064,
44104,
57,
17,
15490,
393,
4019,
8,
198,
220,
220,
220,
551,
2268,
17816,
2200,
35780,
62,
49273,
20520,
796,
705,
18851,
6,
198,
220,
220,
220,
1441,
4808,
15883,
25927,
7,
1324,
11,
14367,
448,
28,
19282,
448,
11,
551,
2268,
28,
268,
2268,
8,
628,
198,
4299,
598,
13345,
7,
20786,
11,
1635,
22046,
11,
12429,
46265,
2599,
198,
220,
220,
220,
705,
7061,
34,
5691,
257,
2163,
6427,
705,
1324,
6,
355,
717,
4578,
2637,
7061,
198,
220,
220,
220,
422,
2779,
1330,
598,
11,
1969,
198,
220,
220,
220,
598,
796,
598,
3419,
198,
220,
220,
220,
26498,
796,
357,
1324,
35751,
1343,
26498,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
25439,
46491,
22046,
11,
12429,
46265,
8,
198,
220,
220,
220,
3443,
25,
198,
220,
220,
220,
220,
220,
220,
220,
8611,
13,
397,
419,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1969,
7,
1324,
8,
628,
198,
4299,
787,
4868,
7,
853,
2599,
198,
220,
220,
220,
705,
7061,
17278,
82,
1822,
656,
257,
1351,
13,
6350,
1822,
743,
307,
198,
220,
220,
220,
220,
220,
220,
1351,
11,
46545,
11,
393,
4731,
13,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
611,
2099,
7,
853,
8,
6624,
2099,
7,
21737,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
1822,
198,
220,
220,
220,
611,
2099,
7,
853,
8,
6624,
2099,
7,
3419,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
1351,
7,
853,
8,
198,
220,
220,
220,
611,
2099,
7,
853,
8,
6624,
2099,
7,
7061,
2599,
198,
220,
220,
220,
220,
220,
220,
1441,
8106,
7,
14202,
11,
685,
853,
12962,
198,
220,
220,
220,
5298,
11052,
12331,
10786,
28100,
1713,
1276,
307,
1351,
11,
46545,
11,
393,
4731,
11537,
628,
198,
834,
439,
834,
796,
685,
198,
220,
220,
220,
705,
40406,
14055,
50,
6202,
3256,
198,
220,
220,
220,
705,
40406,
29123,
12331,
11187,
3256,
198,
220,
220,
220,
705,
9688,
57,
10697,
3256,
198,
220,
220,
220,
705,
11748,
10267,
4863,
8979,
3256,
198,
220,
220,
220,
705,
1324,
13345,
3256,
198,
220,
220,
220,
705,
15883,
25927,
3256,
198,
220,
220,
220,
705,
15883,
4868,
3256,
198,
60,
628
] | 2.572399 | 1,913 |
emm_fmt = """<?xml version="1.0" encoding="utf-8" ?>
<EIGEN_MM>
<OPTIONS
_splitmaxiters="10"
_nodesperevaluator="1"
_subproblemsperevaluator="1"
_totalsubproblems="1"
_nevaluators="1"
_taskspernode="%d"
_nevals="-1"
_nk="10"
_nb="4"
_p="0"
_nv="10"
_raditers="20"
_splittol="0.9"
_radtol="1e-8"
_L="1.1"
_R="-1"
_terse="0"
_details="0"
_debug="1"
_save_correctness="0"
_save_operators="0"
_save_eigenvalues="0"
_save_eigenbasis="1"
_correctness_filename=""
_operators_filename=""
_eigenvalues_filename=""
_eigenbasis_filename="%s" />
</EIGEN_MM>"""
import sys
if __name__ == "__main__":
taskspernode = int(sys.argv[1])
optionsdir = sys.argv[2]
outputdir = sys.argv[3]
expname = sys.argv[4]
emmpath = optionsdir + "/" + expname + "_options.xml"
f = open(emmpath, 'w')
f_str = emm_fmt % (taskspernode, outputdir + "/" + expname)
f.write(f_str)
f.close()
| [
368,
76,
62,
69,
16762,
796,
37227,
47934,
19875,
2196,
2625,
16,
13,
15,
1,
21004,
2625,
40477,
12,
23,
1,
5633,
29,
198,
27,
36,
3528,
1677,
62,
12038,
29,
198,
220,
220,
220,
1279,
3185,
51,
11053,
220,
198,
197,
197,
62,
35312,
9806,
270,
364,
2625,
940,
1,
220,
198,
197,
197,
62,
77,
4147,
431,
260,
2100,
84,
1352,
2625,
16,
1,
220,
198,
197,
197,
62,
7266,
1676,
22143,
431,
260,
2100,
84,
1352,
2625,
16,
1,
220,
198,
197,
197,
62,
83,
313,
874,
549,
1676,
22143,
2625,
16,
1,
220,
198,
197,
197,
62,
710,
2100,
84,
2024,
2625,
16,
1,
220,
198,
197,
197,
62,
83,
6791,
525,
17440,
2625,
4,
67,
1,
198,
197,
197,
62,
710,
12786,
2625,
12,
16,
1,
198,
197,
197,
62,
77,
74,
2625,
940,
1,
198,
197,
197,
62,
46803,
2625,
19,
1,
198,
197,
197,
62,
79,
2625,
15,
1,
220,
198,
197,
197,
62,
48005,
2625,
940,
1,
220,
198,
197,
197,
62,
6335,
270,
364,
2625,
1238,
1,
220,
198,
197,
197,
62,
22018,
715,
349,
2625,
15,
13,
24,
1,
220,
198,
197,
197,
62,
6335,
83,
349,
2625,
16,
68,
12,
23,
1,
220,
198,
197,
197,
62,
43,
2625,
16,
13,
16,
1,
220,
198,
197,
197,
62,
49,
2625,
12,
16,
1,
220,
198,
197,
197,
62,
353,
325,
2625,
15,
1,
220,
198,
197,
197,
62,
36604,
2625,
15,
1,
220,
198,
197,
197,
62,
24442,
2625,
16,
1,
220,
198,
197,
197,
62,
21928,
62,
30283,
1108,
2625,
15,
1,
198,
197,
197,
62,
21928,
62,
3575,
2024,
2625,
15,
1,
198,
197,
197,
62,
21928,
62,
68,
9324,
27160,
2625,
15,
1,
198,
197,
197,
62,
21928,
62,
68,
9324,
12093,
271,
2625,
16,
1,
198,
197,
197,
62,
30283,
1108,
62,
34345,
33151,
220,
198,
197,
197,
62,
3575,
2024,
62,
34345,
33151,
198,
197,
197,
62,
68,
9324,
27160,
62,
34345,
33151,
220,
198,
197,
197,
62,
68,
9324,
12093,
271,
62,
34345,
2625,
4,
82,
1,
11037,
198,
3556,
36,
3528,
1677,
62,
12038,
29,
37811,
198,
198,
11748,
25064,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
8861,
525,
17440,
796,
493,
7,
17597,
13,
853,
85,
58,
16,
12962,
198,
220,
220,
220,
3689,
15908,
796,
25064,
13,
853,
85,
58,
17,
60,
198,
220,
220,
220,
5072,
15908,
796,
25064,
13,
853,
85,
58,
18,
60,
198,
220,
220,
220,
1033,
3672,
796,
25064,
13,
853,
85,
58,
19,
60,
628,
220,
220,
220,
795,
3149,
776,
796,
3689,
15908,
1343,
12813,
1,
1343,
1033,
3672,
1343,
45434,
25811,
13,
19875,
1,
198,
220,
220,
220,
220,
198,
220,
220,
220,
277,
796,
1280,
7,
368,
3149,
776,
11,
705,
86,
11537,
198,
220,
220,
220,
277,
62,
2536,
796,
795,
76,
62,
69,
16762,
4064,
357,
83,
6791,
525,
17440,
11,
5072,
15908,
1343,
12813,
1,
1343,
1033,
3672,
8,
198,
220,
220,
220,
277,
13,
13564,
7,
69,
62,
2536,
8,
198,
220,
220,
220,
277,
13,
19836,
3419,
198,
220,
220,
220,
220,
198
] | 1.857414 | 526 |
import os
# Workarround for nvidia propietary drivers
import ctypes
import ctypes.util
ctypes.CDLL(ctypes.util.find_library("GL"), mode=ctypes.RTLD_GLOBAL)
# end of Workarround
from qtpy.QtCore import Signal, Slot, QUrl, QTimer
from qtpy.QtQuickWidgets import QQuickWidget
from qtpyvcp.plugins import getPlugin
from qtpyvcp.utilities import logger
from qtpyvcp.utilities.hal_qlib import QComponent
LOG = logger.getLogger(__name__)
STATUS = getPlugin('status')
TOOLTABLE = getPlugin('tooltable')
IN_DESIGNER = os.getenv('DESIGNER', False)
WIDGET_PATH = os.path.dirname(os.path.abspath(__file__))
| [
11748,
28686,
198,
198,
2,
5521,
283,
744,
329,
299,
21744,
2632,
1155,
560,
6643,
198,
198,
11748,
269,
19199,
198,
11748,
269,
19199,
13,
22602,
198,
198,
310,
9497,
13,
8610,
3069,
7,
310,
9497,
13,
22602,
13,
19796,
62,
32016,
7203,
8763,
12340,
4235,
28,
310,
9497,
13,
14181,
11163,
62,
8763,
9864,
1847,
8,
198,
198,
2,
886,
286,
5521,
283,
744,
628,
198,
6738,
10662,
83,
9078,
13,
48,
83,
14055,
1330,
26484,
11,
32026,
11,
1195,
28165,
11,
1195,
48801,
198,
6738,
10662,
83,
9078,
13,
48,
83,
21063,
54,
312,
11407,
1330,
1195,
21063,
38300,
198,
198,
6738,
10662,
83,
9078,
85,
13155,
13,
37390,
1330,
651,
37233,
198,
6738,
10662,
83,
9078,
85,
13155,
13,
315,
2410,
1330,
49706,
198,
6738,
10662,
83,
9078,
85,
13155,
13,
315,
2410,
13,
14201,
62,
80,
8019,
1330,
1195,
21950,
198,
198,
25294,
796,
49706,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
35744,
2937,
796,
651,
37233,
10786,
13376,
11537,
198,
10468,
3535,
38148,
796,
651,
37233,
10786,
25981,
11487,
11537,
198,
1268,
62,
30910,
16284,
1137,
796,
28686,
13,
1136,
24330,
10786,
30910,
16284,
1137,
3256,
10352,
8,
198,
54,
2389,
18851,
62,
34219,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
397,
2777,
776,
7,
834,
7753,
834,
4008,
628
] | 2.70852 | 223 |
# Generated by Django 3.2.9 on 2021-11-08 04:50
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
24,
319,
33448,
12,
1157,
12,
2919,
8702,
25,
1120,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from constants import *
import time
import threading
from chaos import *
| [
6738,
38491,
1330,
1635,
198,
11748,
640,
198,
11748,
4704,
278,
198,
6738,
11918,
1330,
1635,
198
] | 4.294118 | 17 |
import argparse
import logging
import os
from .exporter import add_stdout_logging, establish_and_return_ldap_connection, \
establish_and_return_session, fake_connection, fetch_current_ldap_users, \
fetch_users_to_sync, get_config_or_exit, logger, sync_all
logger = logging.getLogger('ldap_sync')
NAME_LEVEL_MAPPING = {
'debug': logging.DEBUG,
'info': logging.INFO,
'warning': logging.WARNING,
'error': logging.ERROR,
'critical': logging.CRITICAL,
}
parser = argparse.ArgumentParser(description="Pycroft ldap syncer")
parser.add_argument('--fake', dest='fake', action='store_true', default=False,
help="Use a mocked LDAP backend")
parser.add_argument("-l", "--log", dest='loglevel', type=str,
choices=list(NAME_LEVEL_MAPPING.keys()), default='info',
help="Set the loglevel")
parser.add_argument("-d", "--debug", dest='loglevel', action='store_const',
const='debug', help="Short for --log=debug")
if __name__ == '__main__':
exit(main())
| [
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
28686,
198,
198,
6738,
764,
1069,
26634,
1330,
751,
62,
19282,
448,
62,
6404,
2667,
11,
4474,
62,
392,
62,
7783,
62,
335,
499,
62,
38659,
11,
3467,
198,
220,
220,
220,
220,
4474,
62,
392,
62,
7783,
62,
29891,
11,
8390,
62,
38659,
11,
21207,
62,
14421,
62,
335,
499,
62,
18417,
11,
3467,
198,
220,
220,
220,
220,
21207,
62,
18417,
62,
1462,
62,
27261,
11,
651,
62,
11250,
62,
273,
62,
37023,
11,
49706,
11,
17510,
62,
439,
628,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
10786,
335,
499,
62,
27261,
11537,
628,
628,
198,
20608,
62,
2538,
18697,
62,
44,
24805,
2751,
796,
1391,
198,
220,
220,
220,
705,
24442,
10354,
18931,
13,
30531,
11,
198,
220,
220,
220,
705,
10951,
10354,
18931,
13,
10778,
11,
198,
220,
220,
220,
705,
43917,
10354,
18931,
13,
31502,
11,
198,
220,
220,
220,
705,
18224,
10354,
18931,
13,
24908,
11,
198,
220,
220,
220,
705,
34666,
10354,
18931,
13,
9419,
2043,
20151,
11,
198,
92,
628,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
2625,
20519,
36714,
300,
67,
499,
6171,
2189,
4943,
198,
48610,
13,
2860,
62,
49140,
10786,
438,
30706,
3256,
2244,
11639,
30706,
3256,
2223,
11639,
8095,
62,
7942,
3256,
4277,
28,
25101,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
11041,
257,
29180,
27178,
2969,
30203,
4943,
198,
48610,
13,
2860,
62,
49140,
7203,
12,
75,
1600,
366,
438,
6404,
1600,
2244,
11639,
75,
2467,
626,
3256,
2099,
28,
2536,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7747,
28,
4868,
7,
20608,
62,
2538,
18697,
62,
44,
24805,
2751,
13,
13083,
3419,
828,
4277,
11639,
10951,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1037,
2625,
7248,
262,
300,
2467,
626,
4943,
198,
48610,
13,
2860,
62,
49140,
7203,
12,
67,
1600,
366,
438,
24442,
1600,
2244,
11639,
75,
2467,
626,
3256,
2223,
11639,
8095,
62,
9979,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1500,
11639,
24442,
3256,
1037,
2625,
16438,
329,
1377,
6404,
28,
24442,
4943,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
8420,
7,
12417,
28955,
198
] | 2.502358 | 424 |
"""
visdex: Exploratory graphs
The exploratory graphs section defines specialised data visualisations that
can be generated by the user on request
"""
import logging
from dash import html, dcc
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output, State, MATCH
import plotly.graph_objects as go
from . import (
bar_graph,
histogram_graph,
manhattan_graph,
scatter_graph,
violin_graph,
)
from visdex.common import standard_margin_left, vstack, plot_style
LOG = logging.getLogger(__name__)
def generate_generic_group(n_clicks, group_type):
"""
The generic builder for each of the component types.
:param n_clicks:
:param group_type:
:param component_list:
:return:
"""
LOG.info(f"generate_generic_group {group_type}")
children = list()
component_list = all_components[group_type]
for component in component_list:
name = component["id"]
args_to_replicate = dict(component)
del args_to_replicate["component_type"]
del args_to_replicate["id"]
del args_to_replicate["label"]
# Generate each component with the correct id, index, and arguments, inside its
# own Div.
children.append(
html.Div(
[
component["label"] + ":",
component["component_type"](
id={"type": group_type + "-" + name, "index": n_clicks},
**args_to_replicate,
),
],
id={"type": "div-" + group_type + "-" + name, "index": n_clicks},
style=plot_style,
)
)
children.append(
dcc.Graph(
id={"type": "gen-" + group_type + "-graph", "index": n_clicks},
figure=go.Figure(data=go.Scatter()),
)
)
LOG.debug(f"{children}")
return html.Div(
id={"type": "filter-graph-group-" + group_type, "index": n_clicks},
children=children,
)
| [
37811,
198,
4703,
67,
1069,
25,
5905,
273,
2870,
28770,
198,
198,
464,
39180,
2870,
28770,
2665,
15738,
2041,
1417,
1366,
5874,
38189,
326,
198,
5171,
307,
7560,
416,
262,
2836,
319,
2581,
198,
37811,
198,
11748,
18931,
198,
198,
6738,
14470,
1330,
27711,
11,
288,
535,
198,
11748,
14470,
62,
18769,
26418,
62,
5589,
3906,
355,
288,
15630,
198,
6738,
14470,
13,
45841,
3976,
1330,
23412,
11,
25235,
11,
1812,
11,
337,
11417,
198,
11748,
7110,
306,
13,
34960,
62,
48205,
355,
467,
198,
198,
6738,
764,
1330,
357,
198,
220,
220,
220,
2318,
62,
34960,
11,
198,
220,
220,
220,
1554,
21857,
62,
34960,
11,
198,
220,
220,
220,
582,
12904,
62,
34960,
11,
198,
220,
220,
220,
41058,
62,
34960,
11,
198,
220,
220,
220,
38283,
62,
34960,
11,
198,
8,
198,
198,
6738,
1490,
67,
1069,
13,
11321,
1330,
3210,
62,
36153,
62,
9464,
11,
410,
25558,
11,
7110,
62,
7635,
198,
198,
25294,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
198,
4299,
7716,
62,
41357,
62,
8094,
7,
77,
62,
565,
3378,
11,
1448,
62,
4906,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
383,
14276,
27098,
329,
1123,
286,
262,
7515,
3858,
13,
198,
220,
220,
220,
1058,
17143,
299,
62,
565,
3378,
25,
198,
220,
220,
220,
1058,
17143,
1448,
62,
4906,
25,
198,
220,
220,
220,
1058,
17143,
7515,
62,
4868,
25,
198,
220,
220,
220,
1058,
7783,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
41605,
13,
10951,
7,
69,
1,
8612,
378,
62,
41357,
62,
8094,
1391,
8094,
62,
4906,
92,
4943,
198,
220,
220,
220,
1751,
796,
1351,
3419,
628,
220,
220,
220,
7515,
62,
4868,
796,
477,
62,
5589,
3906,
58,
8094,
62,
4906,
60,
198,
220,
220,
220,
329,
7515,
287,
7515,
62,
4868,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
796,
7515,
14692,
312,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
26498,
62,
1462,
62,
35666,
5344,
796,
8633,
7,
42895,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1619,
26498,
62,
1462,
62,
35666,
5344,
14692,
42895,
62,
4906,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
1619,
26498,
62,
1462,
62,
35666,
5344,
14692,
312,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
1619,
26498,
62,
1462,
62,
35666,
5344,
14692,
18242,
8973,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
2980,
378,
1123,
7515,
351,
262,
3376,
4686,
11,
6376,
11,
290,
7159,
11,
2641,
663,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
898,
4777,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1751,
13,
33295,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
27711,
13,
24095,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7515,
14692,
18242,
8973,
1343,
366,
25,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7515,
14692,
42895,
62,
4906,
8973,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
28,
4895,
4906,
1298,
1448,
62,
4906,
1343,
366,
21215,
1343,
1438,
11,
366,
9630,
1298,
299,
62,
565,
3378,
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,
12429,
22046,
62,
1462,
62,
35666,
5344,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10612,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16589,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
28,
4895,
4906,
1298,
366,
7146,
21215,
1343,
1448,
62,
4906,
1343,
366,
21215,
1343,
1438,
11,
366,
9630,
1298,
299,
62,
565,
3378,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3918,
28,
29487,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
628,
220,
220,
220,
1751,
13,
33295,
7,
198,
220,
220,
220,
220,
220,
220,
220,
288,
535,
13,
37065,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
28,
4895,
4906,
1298,
366,
5235,
21215,
1343,
1448,
62,
4906,
1343,
27444,
34960,
1600,
366,
9630,
1298,
299,
62,
565,
3378,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3785,
28,
2188,
13,
11337,
7,
7890,
28,
2188,
13,
3351,
1436,
3419,
828,
198,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
1267,
198,
220,
220,
220,
41605,
13,
24442,
7,
69,
1,
90,
17197,
92,
4943,
628,
220,
220,
220,
1441,
27711,
13,
24095,
7,
198,
220,
220,
220,
220,
220,
220,
220,
4686,
28,
4895,
4906,
1298,
366,
24455,
12,
34960,
12,
8094,
21215,
1343,
1448,
62,
4906,
11,
366,
9630,
1298,
299,
62,
565,
3378,
5512,
198,
220,
220,
220,
220,
220,
220,
220,
1751,
28,
17197,
11,
198,
220,
220,
220,
1267,
198
] | 2.238411 | 906 |
# Copyright 2012-2017, Intel Corporation, All Rights Reserved.
#
# This software is supplied under the terms of a license
# agreement or nondisclosure agreement with Intel Corp.
# and may not be copied or disclosed except in accordance
# with the terms of that agreement.
import os
import re
import micp.kernel as micp_kernel
import micp.info as micp_info
import micp.common as micp_common
import micp.params as micp_params
from micp.common import mp_print, get_ln, CAT_ERROR
confParamNames = [ 'groups', 'nImg', 'inpWidth', 'inpHeight', 'nIfm', \
'nOfm', 'kw', 'kh', 'stride', 'pad', 'iters' ]
optimalParamValues = '1 16 224 224 3 64 7 7 2 3 100'
# expected minimal number of parsed scores in output
CONST_expected_perf_scores = 3
# expected number of "|"-separated sections in output
CONST_expected_sections = 2
# expected measurements per row
CONST_expected_meas_per_row = 4
| [
2,
220,
15069,
2321,
12,
5539,
11,
8180,
10501,
11,
1439,
6923,
33876,
13,
198,
2,
198,
2,
770,
3788,
318,
14275,
739,
262,
2846,
286,
257,
5964,
198,
2,
4381,
393,
30745,
271,
17966,
4381,
351,
8180,
11421,
13,
198,
2,
290,
743,
407,
307,
18984,
393,
16404,
2845,
287,
10213,
198,
2,
351,
262,
2846,
286,
326,
4381,
13,
198,
198,
11748,
28686,
198,
11748,
302,
198,
198,
11748,
12314,
79,
13,
33885,
355,
12314,
79,
62,
33885,
198,
11748,
12314,
79,
13,
10951,
355,
12314,
79,
62,
10951,
198,
11748,
12314,
79,
13,
11321,
355,
12314,
79,
62,
11321,
198,
11748,
12314,
79,
13,
37266,
355,
12314,
79,
62,
37266,
198,
198,
6738,
12314,
79,
13,
11321,
1330,
29034,
62,
4798,
11,
651,
62,
18755,
11,
38348,
62,
24908,
198,
198,
10414,
22973,
36690,
796,
685,
705,
24432,
3256,
705,
77,
3546,
70,
3256,
705,
259,
79,
30916,
3256,
705,
259,
79,
23106,
3256,
705,
77,
1532,
76,
3256,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
77,
5189,
76,
3256,
705,
46265,
3256,
705,
14636,
3256,
705,
2536,
485,
3256,
705,
15636,
3256,
705,
270,
364,
6,
2361,
198,
8738,
4402,
22973,
40161,
796,
705,
16,
1467,
26063,
26063,
513,
5598,
767,
767,
362,
513,
1802,
6,
198,
198,
2,
2938,
10926,
1271,
286,
44267,
8198,
287,
5072,
198,
10943,
2257,
62,
40319,
62,
525,
69,
62,
1416,
2850,
796,
513,
198,
2,
2938,
1271,
286,
366,
91,
26793,
25512,
515,
9004,
287,
5072,
198,
10943,
2257,
62,
40319,
62,
23946,
796,
362,
198,
2,
2938,
13871,
583,
5752,
198,
10943,
2257,
62,
40319,
62,
1326,
292,
62,
525,
62,
808,
796,
604,
198
] | 3.125 | 288 |
import numpy as np
import galsim
def BBSED(T):
"""(unnormalized) Blackbody SED for temperature T in Kelvin.
"""
waves_nm = np.arange(330.0, 1120.0, 10.0)
flambda = planck(T, waves_nm*1e-9)
return galsim.SED(
galsim.LookupTable(waves_nm, flambda),
wave_type='nm',
flux_type='flambda'
)
| [
11748,
299,
32152,
355,
45941,
198,
11748,
308,
874,
320,
628,
198,
4299,
347,
4462,
1961,
7,
51,
2599,
198,
220,
220,
220,
13538,
18109,
403,
11265,
1143,
8,
2619,
2618,
311,
1961,
329,
5951,
309,
287,
46577,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
9813,
62,
21533,
796,
45941,
13,
283,
858,
7,
26073,
13,
15,
11,
352,
10232,
13,
15,
11,
838,
13,
15,
8,
198,
220,
220,
220,
781,
4131,
6814,
796,
1410,
694,
7,
51,
11,
9813,
62,
21533,
9,
16,
68,
12,
24,
8,
198,
220,
220,
220,
1441,
308,
874,
320,
13,
50,
1961,
7,
198,
220,
220,
220,
220,
220,
220,
220,
308,
874,
320,
13,
8567,
929,
10962,
7,
32569,
62,
21533,
11,
781,
4131,
6814,
828,
198,
220,
220,
220,
220,
220,
220,
220,
6769,
62,
4906,
11639,
21533,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
28462,
62,
4906,
11639,
69,
50033,
6,
198,
220,
220,
220,
1267,
198
] | 2.055215 | 163 |
import re
from elasticsearch import Elasticsearch, helpers
from itertools import islice
# initialize Elasticsearch client
es = Elasticsearch()
| [
11748,
302,
198,
6738,
27468,
12947,
1330,
48567,
12947,
11,
49385,
198,
6738,
340,
861,
10141,
1330,
318,
75,
501,
198,
198,
2,
41216,
48567,
12947,
5456,
198,
274,
796,
48567,
12947,
3419,
628,
628
] | 4.2 | 35 |
import argparse
import configparser
import functools
import textwrap
import pytest
import configfetch
fetch_ = configfetch.fetch
fetch = functools.partial(
configfetch.fetch, option_builder=configfetch.FiniOptionBuilder)
# blank string returns ``None``
# Just checking the standard library's behaviors.
class _CustomFunc(configfetch.Func):
"""Used the test below."""
@configfetch.register
| [
198,
11748,
1822,
29572,
198,
11748,
4566,
48610,
198,
11748,
1257,
310,
10141,
198,
11748,
2420,
37150,
198,
198,
11748,
12972,
9288,
198,
198,
11748,
4566,
69,
7569,
198,
198,
69,
7569,
62,
796,
4566,
69,
7569,
13,
69,
7569,
198,
198,
69,
7569,
796,
1257,
310,
10141,
13,
47172,
7,
198,
220,
220,
220,
4566,
69,
7569,
13,
69,
7569,
11,
3038,
62,
38272,
28,
11250,
69,
7569,
13,
37,
5362,
19722,
32875,
8,
628,
628,
628,
220,
220,
220,
1303,
9178,
4731,
5860,
7559,
14202,
15506,
628,
628,
198,
2,
2329,
10627,
262,
3210,
5888,
338,
14301,
13,
628,
198,
198,
4871,
4808,
15022,
37,
19524,
7,
11250,
69,
7569,
13,
37,
19524,
2599,
198,
220,
220,
220,
37227,
38052,
262,
1332,
2174,
526,
15931,
628,
220,
220,
220,
2488,
11250,
69,
7569,
13,
30238,
628,
628,
628,
628,
198
] | 3.035211 | 142 |
import os
from portal_gun.commands.helpers import get_provider_config, get_portal_spec, get_portal_name, \
get_provider_from_portal
from portal_gun.context_managers.no_print import no_print
from .base_command import BaseCommand
from .handlers import create_handler
| [
11748,
28686,
198,
198,
6738,
17898,
62,
7145,
13,
9503,
1746,
13,
16794,
364,
1330,
651,
62,
15234,
1304,
62,
11250,
11,
651,
62,
634,
282,
62,
16684,
11,
651,
62,
634,
282,
62,
3672,
11,
3467,
198,
197,
1136,
62,
15234,
1304,
62,
6738,
62,
634,
282,
198,
6738,
17898,
62,
7145,
13,
22866,
62,
805,
10321,
13,
3919,
62,
4798,
1330,
645,
62,
4798,
198,
6738,
764,
8692,
62,
21812,
1330,
7308,
21575,
198,
6738,
764,
4993,
8116,
1330,
2251,
62,
30281,
628
] | 3.152941 | 85 |
import time
import xcffib.xproto
import xpybutil
import xpybutil.event as event
import xpybutil.ewmh as ewmh
import xpybutil.motif as motif
import xpybutil.icccm as icccm
import xpybutil.rect as rect
import xpybutil.util as util
import xpybutil.window as window
from debug import debug
import config
import state
import tile
clients = {}
ignore = [] # Some clients are never gunna make it...
event.connect('PropertyNotify', xpybutil.root, cb_property_notify)
| [
11748,
640,
198,
198,
11748,
2124,
66,
487,
571,
13,
87,
1676,
1462,
198,
198,
11748,
2124,
9078,
4360,
346,
198,
11748,
2124,
9078,
4360,
346,
13,
15596,
355,
1785,
198,
11748,
2124,
9078,
4360,
346,
13,
413,
76,
71,
355,
304,
26377,
71,
198,
11748,
2124,
9078,
4360,
346,
13,
27926,
361,
355,
32702,
198,
11748,
2124,
9078,
4360,
346,
13,
291,
535,
76,
355,
14158,
535,
76,
198,
11748,
2124,
9078,
4360,
346,
13,
2554,
355,
13621,
198,
11748,
2124,
9078,
4360,
346,
13,
22602,
355,
7736,
198,
11748,
2124,
9078,
4360,
346,
13,
17497,
355,
4324,
198,
198,
6738,
14257,
1330,
14257,
198,
198,
11748,
4566,
198,
11748,
1181,
198,
11748,
17763,
198,
198,
565,
2334,
796,
23884,
198,
46430,
796,
17635,
1303,
2773,
7534,
389,
1239,
2485,
2616,
787,
340,
986,
198,
198,
15596,
13,
8443,
10786,
21746,
3673,
1958,
3256,
2124,
9078,
4360,
346,
13,
15763,
11,
269,
65,
62,
26745,
62,
1662,
1958,
8,
628
] | 2.89441 | 161 |
from django.db import models
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
201,
198,
201,
198
] | 2.909091 | 11 |
#!/usr/bin/env python
# coding=utf-8
# Stan 2018-09-27
from __future__ import (division, absolute_import,
print_function, unicode_literals)
import json
from sqlalchemy.types import UserDefinedType, TypeDecorator, Text
# class JsonType(UserDefinedType):
# def get_col_spec(self, **kw):
# return "JSON"
#
# def bind_processor(self, dialect):
# def process(value):
# return json.dumps(value, ensure_ascii=False).encode('utf8')
#
# return process
#
# def result_processor(self, dialect, coltype):
# def process(value):
# return json.loads(value)
#
# return process
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
28,
40477,
12,
23,
198,
2,
7299,
2864,
12,
2931,
12,
1983,
198,
198,
6738,
11593,
37443,
834,
1330,
357,
21426,
11,
4112,
62,
11748,
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,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
8,
198,
198,
11748,
33918,
198,
198,
6738,
44161,
282,
26599,
13,
19199,
1330,
11787,
7469,
1389,
6030,
11,
5994,
10707,
273,
1352,
11,
8255,
628,
198,
198,
2,
1398,
449,
1559,
6030,
7,
12982,
7469,
1389,
6030,
2599,
198,
2,
220,
220,
220,
220,
825,
651,
62,
4033,
62,
16684,
7,
944,
11,
12429,
46265,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
366,
40386,
1,
198,
2,
198,
2,
220,
220,
220,
220,
825,
11007,
62,
41341,
7,
944,
11,
23637,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
825,
1429,
7,
8367,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
33918,
13,
67,
8142,
7,
8367,
11,
4155,
62,
292,
979,
72,
28,
25101,
737,
268,
8189,
10786,
40477,
23,
11537,
198,
2,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1429,
198,
2,
198,
2,
220,
220,
220,
220,
825,
1255,
62,
41341,
7,
944,
11,
23637,
11,
951,
4906,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
825,
1429,
7,
8367,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
33918,
13,
46030,
7,
8367,
8,
198,
2,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1429,
198
] | 2.268707 | 294 |
# -*- coding: utf-8 -*-
import os.path
from chaoslib.settings import get_loaded_settings, load_settings, save_settings
settings_dir = os.path.join(os.path.dirname(__file__), "fixtures")
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
13,
6978,
198,
6738,
11918,
8019,
13,
33692,
1330,
651,
62,
14578,
62,
33692,
11,
3440,
62,
33692,
11,
3613,
62,
33692,
628,
198,
33692,
62,
15908,
796,
28686,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
366,
69,
25506,
4943,
628,
628,
628,
198
] | 2.811594 | 69 |
import os
SECRET_KEY = os.getenv("SECRET_KEY")
| [
11748,
28686,
628,
198,
23683,
26087,
62,
20373,
796,
28686,
13,
1136,
24330,
7203,
23683,
26087,
62,
20373,
4943,
198
] | 2.45 | 20 |
# Generated by Django 2.2 on 2021-09-06 08:38
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
319,
33448,
12,
2931,
12,
3312,
8487,
25,
2548,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.892857 | 28 |
from source.etl import ETL
x = ETL()
df = x.extract(True)
x.transform(df)
#x.load(df) | [
6738,
2723,
13,
316,
75,
1330,
12152,
43,
198,
198,
87,
796,
12152,
43,
3419,
198,
198,
7568,
796,
2124,
13,
2302,
974,
7,
17821,
8,
198,
198,
87,
13,
35636,
7,
7568,
8,
198,
2,
87,
13,
2220,
7,
7568,
8
] | 2.095238 | 42 |
"""Advent of Code 2021, day 9: Smoke Basin"""
def main(input_matrix: tuple[str]) -> int:
"""
Find all of the low points on your heightmap.
What is the sum of the risk levels of all low points on your heightmap?
"""
# It's a brute force approach that does not scale to part two,
# but it's what I could think of with very little time.
# Transform string input into usable int values.
for line in input_matrix:
int_line: list[int] = []
for num in line:
int_line.append(int(num))
DEPTH_MAP.append(int_line)
# Find local minima.
low_points: list[int] = []
for line_index, line in enumerate(DEPTH_MAP):
for point_index, point in enumerate(line):
neighbours: list[int] = []
if point_index - 1 in range(0, len(line)):
neighbours.append(DEPTH_MAP[line_index][point_index - 1])
if point_index + 1 in range(0, len(line)):
neighbours.append(DEPTH_MAP[line_index][point_index + 1])
if line_index - 1 in range(0, len(DEPTH_MAP)):
neighbours.append(DEPTH_MAP[line_index - 1][point_index])
if line_index + 1 in range(0, len(DEPTH_MAP)):
neighbours.append(DEPTH_MAP[line_index + 1][point_index])
if point < min(neighbours):
low_points.append(point + 1)
return sum(low_points)
def part_two():
"""What do you get if you multiply together the sizes of the three largest basins?
Unlike most other days, this part_two() is dependent on main(),
as it's there that the global DEPTH_MAP is generated.
"""
basins_sizes: list[int] = []
# This loop is to initiate recursive calls, whenever it finds a new basin.
for line_index, line in enumerate(DEPTH_MAP):
for point_index, point in enumerate(line):
if point < 9:
basins_sizes.append(map_basin((line_index, point_index)))
basins_sizes.sort()
return basins_sizes[-3] * basins_sizes[-2] * basins_sizes[-1]
if __name__ == "__main__":
with open("../input", "r") as file:
INPUT_FILE = tuple(file.read().splitlines())
# Global so that it doesn't have to be remade for part two.
DEPTH_MAP: list[list[int]] = []
print(main(INPUT_FILE))
print(part_two())
| [
37811,
2782,
1151,
286,
6127,
33448,
11,
1110,
860,
25,
25416,
32666,
37811,
198,
198,
4299,
1388,
7,
15414,
62,
6759,
8609,
25,
46545,
58,
2536,
12962,
4613,
493,
25,
198,
197,
37811,
198,
197,
16742,
477,
286,
262,
1877,
2173,
319,
534,
6001,
8899,
13,
198,
197,
2061,
318,
262,
2160,
286,
262,
2526,
2974,
286,
477,
1877,
2173,
319,
534,
6001,
8899,
30,
198,
197,
37811,
628,
197,
2,
632,
338,
257,
33908,
2700,
3164,
326,
857,
407,
5046,
284,
636,
734,
11,
198,
197,
2,
475,
340,
338,
644,
314,
714,
892,
286,
351,
845,
1310,
640,
13,
628,
197,
2,
26981,
4731,
5128,
656,
24284,
493,
3815,
13,
198,
197,
1640,
1627,
287,
5128,
62,
6759,
8609,
25,
198,
197,
197,
600,
62,
1370,
25,
1351,
58,
600,
60,
796,
17635,
198,
197,
197,
1640,
997,
287,
1627,
25,
198,
197,
197,
197,
600,
62,
1370,
13,
33295,
7,
600,
7,
22510,
4008,
198,
197,
197,
46162,
4221,
62,
33767,
13,
33295,
7,
600,
62,
1370,
8,
628,
197,
2,
9938,
1957,
949,
8083,
13,
198,
197,
9319,
62,
13033,
25,
1351,
58,
600,
60,
796,
17635,
198,
197,
1640,
1627,
62,
9630,
11,
1627,
287,
27056,
378,
7,
46162,
4221,
62,
33767,
2599,
198,
197,
197,
1640,
966,
62,
9630,
11,
966,
287,
27056,
378,
7,
1370,
2599,
628,
197,
197,
197,
710,
394,
65,
4662,
25,
1351,
58,
600,
60,
796,
17635,
198,
197,
197,
197,
361,
966,
62,
9630,
532,
352,
287,
2837,
7,
15,
11,
18896,
7,
1370,
8,
2599,
198,
197,
197,
197,
197,
710,
394,
65,
4662,
13,
33295,
7,
46162,
4221,
62,
33767,
58,
1370,
62,
9630,
7131,
4122,
62,
9630,
532,
352,
12962,
628,
197,
197,
197,
361,
966,
62,
9630,
1343,
352,
287,
2837,
7,
15,
11,
18896,
7,
1370,
8,
2599,
198,
197,
197,
197,
197,
710,
394,
65,
4662,
13,
33295,
7,
46162,
4221,
62,
33767,
58,
1370,
62,
9630,
7131,
4122,
62,
9630,
1343,
352,
12962,
628,
197,
197,
197,
361,
1627,
62,
9630,
532,
352,
287,
2837,
7,
15,
11,
18896,
7,
46162,
4221,
62,
33767,
8,
2599,
198,
197,
197,
197,
197,
710,
394,
65,
4662,
13,
33295,
7,
46162,
4221,
62,
33767,
58,
1370,
62,
9630,
532,
352,
7131,
4122,
62,
9630,
12962,
628,
197,
197,
197,
361,
1627,
62,
9630,
1343,
352,
287,
2837,
7,
15,
11,
18896,
7,
46162,
4221,
62,
33767,
8,
2599,
198,
197,
197,
197,
197,
710,
394,
65,
4662,
13,
33295,
7,
46162,
4221,
62,
33767,
58,
1370,
62,
9630,
1343,
352,
7131,
4122,
62,
9630,
12962,
628,
197,
197,
197,
361,
966,
1279,
949,
7,
710,
394,
65,
4662,
2599,
198,
197,
197,
197,
197,
9319,
62,
13033,
13,
33295,
7,
4122,
1343,
352,
8,
628,
198,
197,
7783,
2160,
7,
9319,
62,
13033,
8,
628,
198,
4299,
636,
62,
11545,
33529,
198,
197,
37811,
2061,
466,
345,
651,
611,
345,
29162,
1978,
262,
10620,
286,
262,
1115,
4387,
1615,
1040,
30,
628,
197,
18521,
749,
584,
1528,
11,
428,
636,
62,
11545,
3419,
318,
10795,
319,
1388,
22784,
198,
197,
292,
340,
338,
612,
326,
262,
3298,
5550,
47,
4221,
62,
33767,
318,
7560,
13,
198,
197,
37811,
628,
198,
197,
12093,
1040,
62,
82,
4340,
25,
1351,
58,
600,
60,
796,
17635,
628,
197,
2,
770,
9052,
318,
284,
22118,
45115,
3848,
11,
8797,
340,
7228,
257,
649,
34164,
13,
198,
197,
1640,
1627,
62,
9630,
11,
1627,
287,
27056,
378,
7,
46162,
4221,
62,
33767,
2599,
198,
197,
197,
1640,
966,
62,
9630,
11,
966,
287,
27056,
378,
7,
1370,
2599,
198,
197,
197,
197,
361,
966,
1279,
860,
25,
198,
197,
197,
197,
197,
12093,
1040,
62,
82,
4340,
13,
33295,
7,
8899,
62,
12093,
259,
19510,
1370,
62,
9630,
11,
966,
62,
9630,
22305,
628,
197,
12093,
1040,
62,
82,
4340,
13,
30619,
3419,
628,
197,
7783,
1615,
1040,
62,
82,
4340,
58,
12,
18,
60,
1635,
1615,
1040,
62,
82,
4340,
58,
12,
17,
60,
1635,
1615,
1040,
62,
82,
4340,
58,
12,
16,
60,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
197,
4480,
1280,
7203,
40720,
15414,
1600,
366,
81,
4943,
355,
2393,
25,
198,
197,
197,
1268,
30076,
62,
25664,
796,
46545,
7,
7753,
13,
961,
22446,
35312,
6615,
28955,
628,
197,
2,
8060,
523,
326,
340,
1595,
470,
423,
284,
307,
816,
671,
329,
636,
734,
13,
198,
197,
46162,
4221,
62,
33767,
25,
1351,
58,
4868,
58,
600,
11907,
796,
17635,
628,
197,
4798,
7,
12417,
7,
1268,
30076,
62,
25664,
4008,
198,
197,
4798,
7,
3911,
62,
11545,
28955,
198
] | 2.689521 | 773 |
import sys
import random
from trace_gen import *
if __name__ == "__main__":
random.seed(0)
num_cache_p = int(sys.argv[1])
block_size_in_words_p = int(sys.argv[2])
tg = TraceGen(block_size_in_words_p)
tg.clear_tags()
#words = (2**18)/num_cache_p # 1MB
words = (2**18)/num_cache_p # 1MB
max_range = (2**14)# 64KB
for i in range(words):
taddr = random.randint(0, max_range-1) << 2
write_not_read = random.randint(0,1)
if write_not_read:
tg.send_write(taddr)
else:
tg.send_read(taddr)
tg.done()
| [
11748,
25064,
198,
11748,
4738,
198,
6738,
12854,
62,
5235,
1330,
1635,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
4738,
13,
28826,
7,
15,
8,
198,
220,
997,
62,
23870,
62,
79,
796,
493,
7,
17597,
13,
853,
85,
58,
16,
12962,
198,
220,
2512,
62,
7857,
62,
259,
62,
10879,
62,
79,
796,
493,
7,
17597,
13,
853,
85,
58,
17,
12962,
628,
220,
256,
70,
796,
34912,
13746,
7,
9967,
62,
7857,
62,
259,
62,
10879,
62,
79,
8,
198,
220,
256,
70,
13,
20063,
62,
31499,
3419,
628,
220,
1303,
10879,
796,
357,
17,
1174,
1507,
20679,
22510,
62,
23870,
62,
79,
1303,
352,
10744,
198,
220,
2456,
796,
357,
17,
1174,
1507,
20679,
22510,
62,
23870,
62,
79,
1303,
352,
10744,
628,
220,
3509,
62,
9521,
796,
357,
17,
1174,
1415,
8,
2,
5598,
22764,
628,
220,
329,
1312,
287,
2837,
7,
10879,
2599,
198,
220,
220,
220,
256,
29851,
796,
4738,
13,
25192,
600,
7,
15,
11,
3509,
62,
9521,
12,
16,
8,
9959,
362,
198,
220,
220,
220,
3551,
62,
1662,
62,
961,
796,
4738,
13,
25192,
600,
7,
15,
11,
16,
8,
198,
220,
220,
220,
611,
3551,
62,
1662,
62,
961,
25,
198,
220,
220,
220,
220,
220,
256,
70,
13,
21280,
62,
13564,
7,
83,
29851,
8,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
256,
70,
13,
21280,
62,
961,
7,
83,
29851,
8,
628,
220,
256,
70,
13,
28060,
3419,
198
] | 2.15415 | 253 |
# Copyright 2015 Isotoma Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from touchdown.tests.aws import StubberTestCase
from touchdown.tests.fixtures.aws import (
NetworkAclFixture,
RouteTableFixture,
VpcFixture,
)
from touchdown.tests.stubs.aws import SubnetStubber
| [
2,
15069,
1853,
1148,
313,
6086,
15302,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
198,
6738,
10242,
13,
41989,
13,
8356,
1330,
41135,
527,
14402,
20448,
198,
6738,
10242,
13,
41989,
13,
69,
25506,
13,
8356,
1330,
357,
198,
220,
220,
220,
7311,
32,
565,
37,
9602,
11,
198,
220,
220,
220,
18956,
10962,
37,
9602,
11,
198,
220,
220,
220,
569,
14751,
37,
9602,
11,
198,
8,
198,
6738,
10242,
13,
41989,
13,
301,
23161,
13,
8356,
1330,
3834,
3262,
1273,
549,
527,
628,
198
] | 3.577273 | 220 |
from pymbs.processing.loops.loop import Loop
from pymbs.common.functions import sqrt
from pymbs.processing import Frame
from pymbs.processing.loads.constraint import Constraint
from numpy import pi
from pymbs.symbolics import Matrix, eye, cos, sin, atan, atan2, acos, zeros, transpose
AL = 'FB_%s_AL'
BE = 'FB_%s_BE'
GA = 'FB_%s_GA'
DE = 'FB_%s_DE'
L1 = 'FB_%s_L1'
L2 = 'FB_%s_L2'
L3 = 'FB_%s_L3'
L4 = 'FB_%s_L4'
PHI = 'FB_%s_PHI'
PSI = 'FB_%s_PSI'
THETA = 'FB_%s_THETA'
A = 'FB_%s_A'
B = 'FB_%s_B'
C = 'FB_%s_C'
D = 'FB_%s_D'
E = 'FB_%s_E'
F = 'FB_%s_F'
from pymbs.symbolics import Graph
class FourBar(Loop):
'''
Explicit Treatment of a Four Bar Linkage Mechanism
'''
'''
Sketch:
B--3--C
/ \
2 4
/ \
A-----1------D
'''
def __init__(self, name, csCa, csCb, posture):
'''
Constructor
@param setup: Four Bar Linkage has two setups: -1, 1
'''
# Assertions
assert ( isinstance(csCa, Frame) )
assert ( isinstance(csCb, Frame) )
assert ( isinstance(posture, int) )
assert ( (posture == 1) or (posture == -1 ))
# Check parents
if (csCa.parentBody.joint is None):
raise ValueError('Loop "%s": Coordinate System "%s" is directly connected to the world!'%(name,csCa.name))
if (csCb.parentBody.joint is None):
raise ValueError('Loop "%s": Coordinate System "%s" is directly connected to the world!'%(name,csCb.name))
# Build complete FourBarLinkage
jB = csCa.parentBody.joint
jD = csCb.parentBody.joint
if (jB.coordSys.parentBody.joint == None):
jB = csCb.parentBody.joint
jD = csCa.parentBody.joint
jA = jB.coordSys.parentBody.joint
csC3 = csCb
csC4 = csCa
else:
jA = jB.coordSys.parentBody.joint
csC3 = csCa
csC4 = csCb
# Do the Joints have the same axis of Rotation
if (jA.Phi == Matrix([1,0,0])):
self.sign = 1
self.pick = Matrix([[0,1,0],
[0,0,1]])
elif (jA.Phi == Matrix([0,1,0])):
self.sign = -1
self.pick = Matrix([[1,0,0],
[0,0,1]])
elif (jA.Phi == Matrix([0,0,1])):
self.sign = 1
self.pick = Matrix([[1,0,0],
[0,1,0]])
else:
raise ValueError('Loop "%s": Axis of Rotation must be either x,y or z!'%name)
assert( jA.Phi == jB.Phi ), 'jA.Phi(%s): %s, jB.Phi(%s): %s'%(jA.name,jA.Phi,jB.name,jB.Phi)
assert( jA.Phi == jD.Phi ), 'jA.Phi(%s): %s, jD.Phi(%s): %s'%(jA.name,jA.Phi,jD.name,jD.Phi)
assert( jA.Psi.norm() == 0 )
assert( jB.Psi.norm() == 0 )
assert( jD.Psi.norm() == 0 )
# Are All Coordinate Systems aligned like their parentBody?
assert( (jA.coordSys.R - eye(3)) == zeros(3) )
assert( (jB.coordSys.R - eye(3)) == zeros(3) )
assert( (jD.coordSys.R - eye(3)) == zeros(3) )
# Check that bodies between joints are the same
assert( jA.coordSys.parentBody == jD.coordSys.parentBody )
assert( jA.body == jB.coordSys.parentBody )
assert( jB.body == csC3.parentBody )
assert( jD.body == csC4.parentBody )
# Super Constructor
Loop.__init__(self, name)
# Save Parameters
self.jA = jA
self.jB = jB
self.jD = jD
self.csC3 = csC3
self.csC4 = csC4
self.posture = posture
# Independent Coordinates
self.u = [jA.q]
self.ud = [jA.qd]
self.udd = [jA.qdd]
# Dependent Coordinates
self.v = [jB.q, jD.q]
self.vd = [jB.qd, jD.qd]
self.vdd = [jB.qdd, jD.qdd]
def calc(self, graph):
'''
Returns precalculated v(u), Bvu and b_prime, s.t.
q = [u,v]', where
u: independent coordinates
v: dependent coordinates
Starting from the Constraint Equation: Phi(q) = 0,
One Obtains by Differentiation:
(d(Phi)/du)*u_dot + (d(Phi)/dv)*v_dot = 0
Ju*u_dot + Jv+v_dot = 0
Thus, v_dot = -(inv(Jv)*Ju)*u_dot = Bvu*u_dot, with Jv = d(Phi)/dv and Ju = d(Phi)/du
Differentiating once more, yields
Ju*u_ddot + Jv*v_ddot + [Ju_dot, Jv_dot]*[u_dot,v_dot]' = 0
Ju*u_ddot + Jv*v_ddot + J_dot*q_dot = 0
Using this relations, one may obtain an expression for v_ddot
v_ddot = -(inv(Jv)*Ju)*u_ddot - inv(Jv)*J_dot*q_dot
= Bvu*u_ddot + b_prime, with b_prime = -inv(Jv)*J_dot*q_dot
Finally one can transform the Equation of Motion
M*q_ddot + h = f + W'*mu
M*(J*u_ddot + b) + h = f + W'*mu with J = [1, Bvu']' and b = [0,b_prime']'
(J'*M*J)*u_ddot + J'*M*b + J'*h = J'*f, since J'*W' = 0
M_star*u_ddot + h_star = f_star
M_star = (J'*M*J)
h_star = J'*M*b + J'*h
f_star = J'*f
'''
assert isinstance(graph, Graph)
# Abbrevations
s = self.sign
# Generalised Coordinates
q1 = self.jA.q # u[0] # angle between x-axes
q1d = self.jA.qd
q2 = self.jB.q # v[0] # angle between x-axes
q2d = self.jB.qd
q3 = self.jD.q # v[1] # angle between x-axes
q3d = self.jD.qd
# Length of bars and angle between x-axis and bar
l1_vec = self.jD.coordSys.p - self.jA.coordSys.p
l1_vec2 = self.pick*l1_vec
l1 = graph.addEquation(L1%self.name, sqrt((transpose(l1_vec)*l1_vec)))
alpha = graph.addEquation(AL%self.name, s*atan2(l1_vec2[1],l1_vec2[0]))
l2_vec = self.jB.coordSys.p
l2_vec2 = self.pick*l2_vec
l2 = graph.addEquation(L2%self.name, sqrt((transpose(l2_vec)*l2_vec)))
beta = graph.addEquation(BE%self.name, s*atan2(l2_vec2[1],l2_vec2[0]))
l3_vec = self.csC3.p
l3_vec2 = self.pick*l3_vec
l3 = graph.addEquation(L3%self.name, sqrt((transpose(l3_vec)*l3_vec)))
gamma = graph.addEquation(GA%self.name, s*atan2(l3_vec2[1],l3_vec2[0]))
l4_vec = self.csC4.p
l4_vec2 = self.pick*l4_vec
l4 = graph.addEquation(L4%self.name, sqrt((transpose(l4_vec)*l4_vec)))
delta = graph.addEquation(DE%self.name, s*atan2(l4_vec2[1],l4_vec2[0]))
# angle between bars
phi_prime = graph.addEquation(PHI%self.name, q1 + beta - alpha)
# A = P1, B = P2, C = P3
#P1 = graph.addEquation(A%self.name, 2*l4*(l1-l2*cos(phi_prime)))
#P2 = graph.addEquation(B%self.name, -2*l2*l4*sin(phi_prime))
#P3 = graph.addEquation(C%self.name, l1**2+l2**2-l3**2+l4**2-2*l1*l2*cos(phi_prime))
# D = P1, E = P2, F = P3
P4 = graph.addEquation(D%self.name, 2*l3*(l2-l1*cos(-phi_prime)))
P5 = graph.addEquation(E%self.name, -2*l1*l3*sin(-phi_prime))
P6 = graph.addEquation(F%self.name, l2**2+l1**2-l4**2+l3**2-2*l2*l1*cos(-phi_prime))
# Calculate v
theta_prime = graph.addEquation(THETA%self.name, 2*atan((P5-self.posture*sqrt(P4**2+P5**2-P6**2))/(P4-P6)))
psi_prime = graph.addEquation(PSI%self.name, ((l2*sin(phi_prime)+l3*sin(phi_prime+theta_prime))/abs(l2*sin(phi_prime)+l3*sin(phi_prime+theta_prime)))*acos((l2*cos(phi_prime)+l3*cos(phi_prime+theta_prime)-l1)/l4))
v1 = (psi_prime + alpha - delta)
v0 = (theta_prime + beta - gamma)
Bvu = Matrix( [[-l2*sin(phi_prime-psi_prime)/(l3*sin(phi_prime+theta_prime-psi_prime))-1], [(l2*sin(theta_prime))/(l4*sin(phi_prime+theta_prime-psi_prime))]] )
b_prime = Matrix( [-(q1d**2*l2*cos(phi_prime-psi_prime)+l3*cos(phi_prime+theta_prime-psi_prime)*(q1d+q2d)**2-l4*q3d**2)/(l3*sin(phi_prime+theta_prime-psi_prime)) , -(q1d**2*l2*cos(theta_prime)+l3*(q1d+q2d)**2-l4*q3d**2*cos(phi_prime+theta_prime-psi_prime))/(l4*sin(phi_prime+theta_prime-psi_prime)) ] )
return ([v0,v1],Bvu,b_prime)
def applyConstraintLoads(self):
'''
apply Constraint Forces at the end of the cut
'''
# locking all directions perpendicular to axis of rotation
transLock = [0,0,0]
for i in [0,1,2]:
if (self.jA.Phi[i] == 0):
transLock[i] = 1
# apply Constraint
c = Constraint(name='Constraint_%s'%self.name, parent=self.csC3, child=self.csC4, \
transLock=transLock, rotLock=[0,0,0], active=False)
# return load object
return c
| [
6738,
279,
4948,
1443,
13,
36948,
13,
5439,
2840,
13,
26268,
1330,
26304,
198,
6738,
279,
4948,
1443,
13,
11321,
13,
12543,
2733,
1330,
19862,
17034,
198,
6738,
279,
4948,
1443,
13,
36948,
1330,
25184,
198,
198,
6738,
279,
4948,
1443,
13,
36948,
13,
46030,
13,
1102,
2536,
2913,
1330,
1482,
2536,
2913,
198,
198,
6738,
299,
32152,
1330,
31028,
198,
198,
6738,
279,
4948,
1443,
13,
1837,
2022,
19615,
1330,
24936,
11,
4151,
11,
8615,
11,
7813,
11,
379,
272,
11,
379,
272,
17,
11,
936,
418,
11,
1976,
27498,
11,
1007,
3455,
198,
198,
1847,
796,
705,
26001,
62,
4,
82,
62,
1847,
6,
198,
12473,
796,
705,
26001,
62,
4,
82,
62,
12473,
6,
198,
9273,
796,
705,
26001,
62,
4,
82,
62,
9273,
6,
198,
7206,
796,
705,
26001,
62,
4,
82,
62,
7206,
6,
198,
198,
43,
16,
796,
705,
26001,
62,
4,
82,
62,
43,
16,
6,
198,
43,
17,
796,
705,
26001,
62,
4,
82,
62,
43,
17,
6,
198,
43,
18,
796,
705,
26001,
62,
4,
82,
62,
43,
18,
6,
198,
43,
19,
796,
705,
26001,
62,
4,
82,
62,
43,
19,
6,
198,
198,
11909,
40,
796,
705,
26001,
62,
4,
82,
62,
11909,
40,
6,
198,
3705,
40,
796,
705,
26001,
62,
4,
82,
62,
3705,
40,
6,
198,
4221,
20892,
796,
705,
26001,
62,
4,
82,
62,
4221,
20892,
6,
198,
198,
32,
796,
705,
26001,
62,
4,
82,
62,
32,
6,
198,
33,
796,
705,
26001,
62,
4,
82,
62,
33,
6,
198,
34,
796,
705,
26001,
62,
4,
82,
62,
34,
6,
198,
198,
35,
796,
705,
26001,
62,
4,
82,
62,
35,
6,
198,
36,
796,
705,
26001,
62,
4,
82,
62,
36,
6,
198,
37,
796,
705,
26001,
62,
4,
82,
62,
37,
6,
198,
198,
6738,
279,
4948,
1443,
13,
1837,
2022,
19615,
1330,
29681,
198,
198,
4871,
6675,
10374,
7,
39516,
2599,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
11884,
21415,
286,
257,
6675,
2409,
7502,
496,
13438,
1042,
198,
220,
220,
220,
705,
7061,
628,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
17001,
25,
198,
220,
220,
220,
220,
220,
220,
347,
438,
18,
438,
34,
198,
220,
220,
220,
220,
220,
1220,
220,
220,
220,
220,
220,
220,
3467,
198,
220,
220,
220,
220,
362,
220,
220,
220,
220,
220,
220,
220,
604,
198,
220,
220,
220,
1220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3467,
198,
220,
220,
317,
30934,
16,
23031,
35,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
1438,
11,
50115,
24334,
11,
50115,
34,
65,
11,
24521,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
28407,
273,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
17143,
9058,
25,
6675,
2409,
7502,
496,
468,
734,
44266,
25,
532,
16,
11,
352,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
2195,
861,
507,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
357,
318,
39098,
7,
6359,
24334,
11,
25184,
8,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
357,
318,
39098,
7,
6359,
34,
65,
11,
25184,
8,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
357,
318,
39098,
7,
7353,
495,
11,
493,
8,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
357,
357,
7353,
495,
6624,
352,
8,
393,
357,
7353,
495,
6624,
532,
16,
15306,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
6822,
3397,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
6359,
24334,
13,
8000,
25842,
13,
73,
1563,
318,
6045,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
39516,
36521,
82,
1298,
22819,
4559,
4482,
36521,
82,
1,
318,
3264,
5884,
284,
262,
995,
13679,
4,
7,
3672,
11,
6359,
24334,
13,
3672,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
6359,
34,
65,
13,
8000,
25842,
13,
73,
1563,
318,
6045,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
39516,
36521,
82,
1298,
22819,
4559,
4482,
36521,
82,
1,
318,
3264,
5884,
284,
262,
995,
13679,
4,
7,
3672,
11,
6359,
34,
65,
13,
3672,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
10934,
1844,
6675,
10374,
11280,
496,
198,
220,
220,
220,
220,
220,
220,
220,
474,
33,
796,
50115,
24334,
13,
8000,
25842,
13,
73,
1563,
198,
220,
220,
220,
220,
220,
220,
220,
474,
35,
796,
50115,
34,
65,
13,
8000,
25842,
13,
73,
1563,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
73,
33,
13,
37652,
44387,
13,
8000,
25842,
13,
73,
1563,
6624,
6045,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
474,
33,
796,
50115,
34,
65,
13,
8000,
25842,
13,
73,
1563,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
474,
35,
796,
50115,
24334,
13,
8000,
25842,
13,
73,
1563,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
474,
32,
796,
474,
33,
13,
37652,
44387,
13,
8000,
25842,
13,
73,
1563,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
50115,
34,
18,
796,
50115,
34,
65,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
50115,
34,
19,
796,
50115,
24334,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
474,
32,
796,
474,
33,
13,
37652,
44387,
13,
8000,
25842,
13,
73,
1563,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
50115,
34,
18,
796,
50115,
24334,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
50115,
34,
19,
796,
50115,
34,
65,
628,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2141,
262,
16798,
82,
423,
262,
976,
16488,
286,
371,
14221,
198,
220,
220,
220,
220,
220,
220,
220,
611,
357,
73,
32,
13,
2725,
72,
6624,
24936,
26933,
16,
11,
15,
11,
15,
12962,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12683,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
27729,
796,
24936,
26933,
58,
15,
11,
16,
11,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
15,
11,
15,
11,
16,
11907,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
357,
73,
32,
13,
2725,
72,
6624,
24936,
26933,
15,
11,
16,
11,
15,
12962,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12683,
796,
532,
16,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
27729,
796,
24936,
26933,
58,
16,
11,
15,
11,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
15,
11,
15,
11,
16,
11907,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
357,
73,
32,
13,
2725,
72,
6624,
24936,
26933,
15,
11,
15,
11,
16,
12962,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12683,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
27729,
796,
24936,
26933,
58,
16,
11,
15,
11,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
15,
11,
16,
11,
15,
11907,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
39516,
36521,
82,
1298,
38349,
286,
371,
14221,
1276,
307,
2035,
2124,
11,
88,
393,
1976,
13679,
4,
3672,
8,
628,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
474,
32,
13,
2725,
72,
6624,
474,
33,
13,
2725,
72,
10612,
705,
73,
32,
13,
2725,
72,
7,
4,
82,
2599,
4064,
82,
11,
474,
33,
13,
2725,
72,
7,
4,
82,
2599,
4064,
82,
6,
4,
7,
73,
32,
13,
3672,
11,
73,
32,
13,
2725,
72,
11,
73,
33,
13,
3672,
11,
73,
33,
13,
2725,
72,
8,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
474,
32,
13,
2725,
72,
6624,
474,
35,
13,
2725,
72,
10612,
705,
73,
32,
13,
2725,
72,
7,
4,
82,
2599,
4064,
82,
11,
474,
35,
13,
2725,
72,
7,
4,
82,
2599,
4064,
82,
6,
4,
7,
73,
32,
13,
3672,
11,
73,
32,
13,
2725,
72,
11,
73,
35,
13,
3672,
11,
73,
35,
13,
2725,
72,
8,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
474,
32,
13,
12016,
72,
13,
27237,
3419,
6624,
657,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
474,
33,
13,
12016,
72,
13,
27237,
3419,
6624,
657,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
474,
35,
13,
12016,
72,
13,
27237,
3419,
6624,
657,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
4231,
1439,
22819,
4559,
11998,
19874,
588,
511,
2560,
25842,
30,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
357,
73,
32,
13,
37652,
44387,
13,
49,
532,
4151,
7,
18,
4008,
6624,
1976,
27498,
7,
18,
8,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
357,
73,
33,
13,
37652,
44387,
13,
49,
532,
4151,
7,
18,
4008,
6624,
1976,
27498,
7,
18,
8,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
357,
73,
35,
13,
37652,
44387,
13,
49,
532,
4151,
7,
18,
4008,
6624,
1976,
27498,
7,
18,
8,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
6822,
326,
5920,
1022,
24039,
389,
262,
976,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
474,
32,
13,
37652,
44387,
13,
8000,
25842,
6624,
474,
35,
13,
37652,
44387,
13,
8000,
25842,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
474,
32,
13,
2618,
6624,
474,
33,
13,
37652,
44387,
13,
8000,
25842,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
474,
33,
13,
2618,
6624,
50115,
34,
18,
13,
8000,
25842,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
6818,
7,
474,
35,
13,
2618,
6624,
50115,
34,
19,
13,
8000,
25842,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3115,
28407,
273,
198,
220,
220,
220,
220,
220,
220,
220,
26304,
13,
834,
15003,
834,
7,
944,
11,
1438,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
12793,
40117,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
73,
32,
796,
474,
32,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
73,
33,
796,
474,
33,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
73,
35,
796,
474,
35,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6359,
34,
18,
796,
50115,
34,
18,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6359,
34,
19,
796,
50115,
34,
19,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
7353,
495,
796,
24521,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
13362,
22819,
17540,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
84,
796,
685,
73,
32,
13,
80,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
463,
796,
685,
73,
32,
13,
80,
67,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
4185,
796,
685,
73,
32,
13,
80,
1860,
60,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
37947,
298,
22819,
17540,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
85,
796,
685,
73,
33,
13,
80,
11,
474,
35,
13,
80,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
20306,
796,
685,
73,
33,
13,
80,
67,
11,
474,
35,
13,
80,
67,
60,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
85,
1860,
796,
685,
73,
33,
13,
80,
1860,
11,
474,
35,
13,
80,
1860,
60,
628,
220,
220,
220,
825,
42302,
7,
944,
11,
4823,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
16409,
3718,
282,
49262,
410,
7,
84,
828,
347,
40939,
290,
275,
62,
35505,
11,
264,
13,
83,
13,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
796,
685,
84,
11,
85,
60,
3256,
810,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
334,
25,
4795,
22715,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
410,
25,
10795,
22715,
198,
220,
220,
220,
220,
220,
220,
220,
17962,
422,
262,
1482,
2536,
2913,
7889,
341,
25,
47256,
7,
80,
8,
796,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1881,
1835,
12143,
416,
20615,
3920,
25,
198,
220,
220,
220,
220,
220,
220,
220,
357,
67,
7,
2725,
72,
20679,
646,
27493,
84,
62,
26518,
1343,
357,
67,
7,
2725,
72,
20679,
67,
85,
27493,
85,
62,
26518,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
12585,
9,
84,
62,
26518,
1343,
449,
85,
10,
85,
62,
26518,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
6660,
11,
410,
62,
26518,
796,
532,
7,
16340,
7,
41,
85,
27493,
33018,
27493,
84,
62,
26518,
796,
347,
40939,
9,
84,
62,
26518,
11,
351,
449,
85,
796,
288,
7,
2725,
72,
20679,
67,
85,
290,
12585,
796,
288,
7,
2725,
72,
20679,
646,
198,
220,
220,
220,
220,
220,
220,
220,
20615,
26336,
1752,
517,
11,
19299,
198,
220,
220,
220,
220,
220,
220,
220,
12585,
9,
84,
62,
1860,
313,
1343,
449,
85,
9,
85,
62,
1860,
313,
1343,
685,
33018,
62,
26518,
11,
449,
85,
62,
26518,
60,
9,
58,
84,
62,
26518,
11,
85,
62,
26518,
49946,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
12585,
9,
84,
62,
1860,
313,
1343,
449,
85,
9,
85,
62,
1860,
313,
1343,
449,
62,
26518,
9,
80,
62,
26518,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
8554,
428,
2316,
11,
530,
743,
7330,
281,
5408,
329,
410,
62,
1860,
313,
198,
220,
220,
220,
220,
220,
220,
220,
410,
62,
1860,
313,
796,
532,
7,
16340,
7,
41,
85,
27493,
33018,
27493,
84,
62,
1860,
313,
532,
800,
7,
41,
85,
27493,
41,
62,
26518,
9,
80,
62,
26518,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
347,
40939,
9,
84,
62,
1860,
313,
1343,
275,
62,
35505,
11,
351,
275,
62,
35505,
796,
532,
16340,
7,
41,
85,
27493,
41,
62,
26518,
9,
80,
62,
26518,
628,
220,
220,
220,
220,
220,
220,
220,
9461,
530,
460,
6121,
262,
7889,
341,
286,
20843,
198,
220,
220,
220,
220,
220,
220,
220,
337,
9,
80,
62,
1860,
313,
1343,
289,
796,
277,
1343,
370,
6,
9,
30300,
198,
220,
220,
220,
220,
220,
220,
220,
337,
9,
7,
41,
9,
84,
62,
1860,
313,
1343,
275,
8,
1343,
289,
796,
277,
1343,
370,
6,
9,
30300,
220,
220,
220,
351,
449,
796,
685,
16,
11,
347,
40939,
20520,
6,
290,
275,
796,
685,
15,
11,
65,
62,
35505,
20520,
6,
198,
220,
220,
220,
220,
220,
220,
220,
357,
41,
6,
9,
44,
9,
41,
27493,
84,
62,
1860,
313,
1343,
449,
6,
9,
44,
9,
65,
1343,
449,
6,
9,
71,
796,
449,
6,
9,
69,
11,
1201,
449,
6,
9,
54,
6,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
337,
62,
7364,
9,
84,
62,
1860,
313,
1343,
289,
62,
7364,
796,
277,
62,
7364,
198,
220,
220,
220,
220,
220,
220,
220,
337,
62,
7364,
796,
357,
41,
6,
9,
44,
9,
41,
8,
198,
220,
220,
220,
220,
220,
220,
220,
289,
62,
7364,
796,
449,
6,
9,
44,
9,
65,
1343,
449,
6,
9,
71,
198,
220,
220,
220,
220,
220,
220,
220,
277,
62,
7364,
796,
449,
6,
9,
69,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
628,
220,
220,
220,
220,
220,
220,
220,
6818,
318,
39098,
7,
34960,
11,
29681,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
2275,
4679,
85,
602,
198,
220,
220,
220,
220,
220,
220,
220,
264,
796,
2116,
13,
12683,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
3611,
1417,
22819,
17540,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
16,
796,
2116,
13,
73,
32,
13,
80,
220,
220,
220,
220,
1303,
334,
58,
15,
60,
220,
220,
220,
1303,
9848,
1022,
2124,
12,
897,
274,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
16,
67,
796,
2116,
13,
73,
32,
13,
80,
67,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
17,
796,
2116,
13,
73,
33,
13,
80,
220,
220,
220,
220,
1303,
410,
58,
15,
60,
220,
220,
220,
1303,
9848,
1022,
2124,
12,
897,
274,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
17,
67,
796,
2116,
13,
73,
33,
13,
80,
67,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
18,
796,
2116,
13,
73,
35,
13,
80,
220,
220,
220,
220,
1303,
410,
58,
16,
60,
220,
220,
220,
1303,
9848,
1022,
2124,
12,
897,
274,
198,
220,
220,
220,
220,
220,
220,
220,
10662,
18,
67,
796,
2116,
13,
73,
35,
13,
80,
67,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
22313,
286,
9210,
290,
9848,
1022,
2124,
12,
22704,
290,
2318,
198,
220,
220,
220,
220,
220,
220,
220,
300,
16,
62,
35138,
796,
2116,
13,
73,
35,
13,
37652,
44387,
13,
79,
532,
2116,
13,
73,
32,
13,
37652,
44387,
13,
79,
198,
220,
220,
220,
220,
220,
220,
220,
300,
16,
62,
35138,
17,
796,
2116,
13,
27729,
9,
75,
16,
62,
35138,
198,
220,
220,
220,
220,
220,
220,
220,
300,
16,
796,
4823,
13,
2860,
23588,
341,
7,
43,
16,
4,
944,
13,
3672,
11,
19862,
17034,
19510,
7645,
3455,
7,
75,
16,
62,
35138,
27493,
75,
16,
62,
35138,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
17130,
796,
4823,
13,
2860,
23588,
341,
7,
1847,
4,
944,
13,
3672,
11,
264,
9,
39036,
17,
7,
75,
16,
62,
35138,
17,
58,
16,
4357,
75,
16,
62,
35138,
17,
58,
15,
60,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
300,
17,
62,
35138,
796,
2116,
13,
73,
33,
13,
37652,
44387,
13,
79,
198,
220,
220,
220,
220,
220,
220,
220,
300,
17,
62,
35138,
17,
796,
2116,
13,
27729,
9,
75,
17,
62,
35138,
198,
220,
220,
220,
220,
220,
220,
220,
300,
17,
796,
4823,
13,
2860,
23588,
341,
7,
43,
17,
4,
944,
13,
3672,
11,
19862,
17034,
19510,
7645,
3455,
7,
75,
17,
62,
35138,
27493,
75,
17,
62,
35138,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
12159,
796,
4823,
13,
2860,
23588,
341,
7,
12473,
4,
944,
13,
3672,
11,
264,
9,
39036,
17,
7,
75,
17,
62,
35138,
17,
58,
16,
4357,
75,
17,
62,
35138,
17,
58,
15,
60,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
300,
18,
62,
35138,
796,
2116,
13,
6359,
34,
18,
13,
79,
198,
220,
220,
220,
220,
220,
220,
220,
300,
18,
62,
35138,
17,
796,
2116,
13,
27729,
9,
75,
18,
62,
35138,
198,
220,
220,
220,
220,
220,
220,
220,
300,
18,
796,
4823,
13,
2860,
23588,
341,
7,
43,
18,
4,
944,
13,
3672,
11,
19862,
17034,
19510,
7645,
3455,
7,
75,
18,
62,
35138,
27493,
75,
18,
62,
35138,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
34236,
796,
4823,
13,
2860,
23588,
341,
7,
9273,
4,
944,
13,
3672,
11,
264,
9,
39036,
17,
7,
75,
18,
62,
35138,
17,
58,
16,
4357,
75,
18,
62,
35138,
17,
58,
15,
60,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
300,
19,
62,
35138,
796,
2116,
13,
6359,
34,
19,
13,
79,
198,
220,
220,
220,
220,
220,
220,
220,
300,
19,
62,
35138,
17,
796,
2116,
13,
27729,
9,
75,
19,
62,
35138,
198,
220,
220,
220,
220,
220,
220,
220,
300,
19,
796,
4823,
13,
2860,
23588,
341,
7,
43,
19,
4,
944,
13,
3672,
11,
19862,
17034,
19510,
7645,
3455,
7,
75,
19,
62,
35138,
27493,
75,
19,
62,
35138,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
25979,
796,
4823,
13,
2860,
23588,
341,
7,
7206,
4,
944,
13,
3672,
11,
264,
9,
39036,
17,
7,
75,
19,
62,
35138,
17,
58,
16,
4357,
75,
19,
62,
35138,
17,
58,
15,
60,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
9848,
1022,
9210,
198,
220,
220,
220,
220,
220,
220,
220,
872,
72,
62,
35505,
796,
4823,
13,
2860,
23588,
341,
7,
11909,
40,
4,
944,
13,
3672,
11,
10662,
16,
1343,
12159,
532,
17130,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
317,
796,
350,
16,
11,
347,
796,
350,
17,
11,
327,
796,
350,
18,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
47,
16,
796,
4823,
13,
2860,
23588,
341,
7,
32,
4,
944,
13,
3672,
11,
362,
9,
75,
19,
9,
7,
75,
16,
12,
75,
17,
9,
6966,
7,
34846,
62,
35505,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
47,
17,
796,
4823,
13,
2860,
23588,
341,
7,
33,
4,
944,
13,
3672,
11,
532,
17,
9,
75,
17,
9,
75,
19,
9,
31369,
7,
34846,
62,
35505,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
47,
18,
796,
4823,
13,
2860,
23588,
341,
7,
34,
4,
944,
13,
3672,
11,
300,
16,
1174,
17,
10,
75,
17,
1174,
17,
12,
75,
18,
1174,
17,
10,
75,
19,
1174,
17,
12,
17,
9,
75,
16,
9,
75,
17,
9,
6966,
7,
34846,
62,
35505,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
360,
796,
350,
16,
11,
412,
796,
350,
17,
11,
376,
796,
350,
18,
198,
220,
220,
220,
220,
220,
220,
220,
350,
19,
796,
4823,
13,
2860,
23588,
341,
7,
35,
4,
944,
13,
3672,
11,
362,
9,
75,
18,
9,
7,
75,
17,
12,
75,
16,
9,
6966,
32590,
34846,
62,
35505,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
350,
20,
796,
4823,
13,
2860,
23588,
341,
7,
36,
4,
944,
13,
3672,
11,
532,
17,
9,
75,
16,
9,
75,
18,
9,
31369,
32590,
34846,
62,
35505,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
350,
21,
796,
4823,
13,
2860,
23588,
341,
7,
37,
4,
944,
13,
3672,
11,
300,
17,
1174,
17,
10,
75,
16,
1174,
17,
12,
75,
19,
1174,
17,
10,
75,
18,
1174,
17,
12,
17,
9,
75,
17,
9,
75,
16,
9,
6966,
32590,
34846,
62,
35505,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
27131,
378,
410,
198,
220,
220,
220,
220,
220,
220,
220,
262,
8326,
62,
35505,
796,
4823,
13,
2860,
23588,
341,
7,
4221,
20892,
4,
944,
13,
3672,
11,
362,
9,
39036,
19510,
47,
20,
12,
944,
13,
7353,
495,
9,
31166,
17034,
7,
47,
19,
1174,
17,
10,
47,
20,
1174,
17,
12,
47,
21,
1174,
17,
4008,
29006,
47,
19,
12,
47,
21,
22305,
198,
220,
220,
220,
220,
220,
220,
220,
46231,
62,
35505,
796,
4823,
13,
2860,
23588,
341,
7,
3705,
40,
4,
944,
13,
3672,
11,
14808,
75,
17,
9,
31369,
7,
34846,
62,
35505,
47762,
75,
18,
9,
31369,
7,
34846,
62,
35505,
10,
1169,
8326,
62,
35505,
4008,
14,
8937,
7,
75,
17,
9,
31369,
7,
34846,
62,
35505,
47762,
75,
18,
9,
31369,
7,
34846,
62,
35505,
10,
1169,
8326,
62,
35505,
22305,
9,
330,
418,
19510,
75,
17,
9,
6966,
7,
34846,
62,
35505,
47762,
75,
18,
9,
6966,
7,
34846,
62,
35505,
10,
1169,
8326,
62,
35505,
13219,
75,
16,
20679,
75,
19,
4008,
628,
220,
220,
220,
220,
220,
220,
220,
410,
16,
796,
357,
862,
72,
62,
35505,
1343,
17130,
532,
25979,
8,
198,
220,
220,
220,
220,
220,
220,
220,
410,
15,
796,
357,
1169,
8326,
62,
35505,
1343,
12159,
532,
34236,
8,
628,
220,
220,
220,
220,
220,
220,
220,
347,
40939,
796,
24936,
7,
16410,
12,
75,
17,
9,
31369,
7,
34846,
62,
35505,
12,
862,
72,
62,
35505,
20679,
7,
75,
18,
9,
31369,
7,
34846,
62,
35505,
10,
1169,
8326,
62,
35505,
12,
862,
72,
62,
35505,
4008,
12,
16,
4357,
47527,
75,
17,
9,
31369,
7,
1169,
8326,
62,
35505,
4008,
29006,
75,
19,
9,
31369,
7,
34846,
62,
35505,
10,
1169,
8326,
62,
35505,
12,
862,
72,
62,
35505,
4008,
11907,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
275,
62,
35505,
796,
24936,
7,
25915,
7,
80,
16,
67,
1174,
17,
9,
75,
17,
9,
6966,
7,
34846,
62,
35505,
12,
862,
72,
62,
35505,
47762,
75,
18,
9,
6966,
7,
34846,
62,
35505,
10,
1169,
8326,
62,
35505,
12,
862,
72,
62,
35505,
27493,
7,
80,
16,
67,
10,
80,
17,
67,
8,
1174,
17,
12,
75,
19,
9,
80,
18,
67,
1174,
17,
20679,
7,
75,
18,
9,
31369,
7,
34846,
62,
35505,
10,
1169,
8326,
62,
35505,
12,
862,
72,
62,
35505,
4008,
837,
532,
7,
80,
16,
67,
1174,
17,
9,
75,
17,
9,
6966,
7,
1169,
8326,
62,
35505,
47762,
75,
18,
9,
7,
80,
16,
67,
10,
80,
17,
67,
8,
1174,
17,
12,
75,
19,
9,
80,
18,
67,
1174,
17,
9,
6966,
7,
34846,
62,
35505,
10,
1169,
8326,
62,
35505,
12,
862,
72,
62,
35505,
4008,
29006,
75,
19,
9,
31369,
7,
34846,
62,
35505,
10,
1169,
8326,
62,
35505,
12,
862,
72,
62,
35505,
4008,
2361,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
29565,
85,
15,
11,
85,
16,
4357,
33,
40939,
11,
65,
62,
35505,
8,
628,
628,
220,
220,
220,
825,
4174,
3103,
2536,
2913,
8912,
82,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
220,
220,
220,
4174,
1482,
2536,
2913,
12700,
379,
262,
886,
286,
262,
2005,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
22656,
477,
11678,
47190,
284,
16488,
286,
13179,
198,
220,
220,
220,
220,
220,
220,
220,
1007,
25392,
796,
685,
15,
11,
15,
11,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
685,
15,
11,
16,
11,
17,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
357,
944,
13,
73,
32,
13,
2725,
72,
58,
72,
60,
6624,
657,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1007,
25392,
58,
72,
60,
796,
352,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
4174,
1482,
2536,
2913,
198,
220,
220,
220,
220,
220,
220,
220,
269,
796,
1482,
2536,
2913,
7,
3672,
11639,
3103,
2536,
2913,
62,
4,
82,
6,
4,
944,
13,
3672,
11,
2560,
28,
944,
13,
6359,
34,
18,
11,
1200,
28,
944,
13,
6359,
34,
19,
11,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1007,
25392,
28,
7645,
25392,
11,
5724,
25392,
41888,
15,
11,
15,
11,
15,
4357,
4075,
28,
25101,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
1441,
3440,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
269,
628
] | 1.831097 | 4,695 |
#!/usr/bin/env python2.7
#
# Copyright 2017 Google 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.
"""Holds meta-information about the image formats we support."""
import collections
ImageSpec = collections.namedtuple(
"ImageSpec", "content_type file_extension pil_format")
IMAGE_SPECS = {"jpg": ImageSpec("image/jpeg", "jpg", "JPEG"),
"png": ImageSpec("image/png", "png", "PNG")
}
def IsKnownFormat(fmt):
"""Checks if the format is supported.
Args:
fmt: Format of the image.
Returns:
boolean: If the format is supported.
"""
for spec in IMAGE_SPECS.values():
if spec.content_type == fmt:
return True
return False
def GetImageSpec(fmt):
"""Get the Imagespec.
Args:
fmt: Format of the image.
Returns:
image_spec: image spec.
"""
for spec in IMAGE_SPECS.values():
if spec.content_type == fmt:
return spec
return None
def FormatIsPng(fmt):
"""Checks if the format is of type png.
Args:
fmt: Format of the image.
Returns:
boolean: If the format is png or not.
"""
for typ, spec in IMAGE_SPECS.iteritems():
if spec.content_type == fmt:
return typ == "png"
return False
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
13,
22,
198,
2,
198,
2,
15069,
2177,
3012,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
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,
628,
198,
37811,
39,
10119,
13634,
12,
17018,
546,
262,
2939,
17519,
356,
1104,
526,
15931,
198,
198,
11748,
17268,
628,
198,
5159,
22882,
796,
17268,
13,
13190,
83,
29291,
7,
198,
220,
220,
220,
366,
5159,
22882,
1600,
366,
11299,
62,
4906,
2393,
62,
2302,
3004,
5560,
62,
18982,
4943,
198,
198,
3955,
11879,
62,
48451,
50,
796,
19779,
9479,
1298,
7412,
22882,
7203,
9060,
14,
73,
22071,
1600,
366,
9479,
1600,
366,
12889,
7156,
12340,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
11134,
1298,
7412,
22882,
7203,
9060,
14,
11134,
1600,
366,
11134,
1600,
366,
47,
10503,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
628,
198,
4299,
1148,
29870,
26227,
7,
69,
16762,
2599,
198,
220,
37227,
7376,
4657,
611,
262,
5794,
318,
4855,
13,
628,
220,
943,
14542,
25,
198,
220,
220,
220,
46996,
25,
18980,
286,
262,
2939,
13,
198,
220,
16409,
25,
198,
220,
220,
220,
25131,
25,
1002,
262,
5794,
318,
4855,
13,
198,
220,
37227,
198,
220,
329,
1020,
287,
8959,
11879,
62,
48451,
50,
13,
27160,
33529,
198,
220,
220,
220,
611,
1020,
13,
11299,
62,
4906,
6624,
46996,
25,
198,
220,
220,
220,
220,
220,
1441,
6407,
198,
220,
1441,
10352,
628,
198,
4299,
3497,
5159,
22882,
7,
69,
16762,
2599,
198,
220,
37227,
3855,
262,
5382,
43106,
13,
628,
220,
943,
14542,
25,
198,
220,
220,
220,
46996,
25,
18980,
286,
262,
2939,
13,
198,
220,
16409,
25,
198,
220,
220,
220,
2939,
62,
16684,
25,
2939,
1020,
13,
198,
220,
37227,
198,
220,
329,
1020,
287,
8959,
11879,
62,
48451,
50,
13,
27160,
33529,
198,
220,
220,
220,
611,
1020,
13,
11299,
62,
4906,
6624,
46996,
25,
198,
220,
220,
220,
220,
220,
1441,
1020,
628,
220,
1441,
6045,
628,
198,
4299,
18980,
3792,
47,
782,
7,
69,
16762,
2599,
198,
220,
37227,
7376,
4657,
611,
262,
5794,
318,
286,
2099,
279,
782,
13,
628,
220,
943,
14542,
25,
198,
220,
220,
220,
46996,
25,
18980,
286,
262,
2939,
13,
198,
220,
16409,
25,
198,
220,
220,
220,
25131,
25,
1002,
262,
5794,
318,
279,
782,
393,
407,
13,
198,
220,
37227,
198,
220,
329,
2170,
11,
1020,
287,
8959,
11879,
62,
48451,
50,
13,
2676,
23814,
33529,
198,
220,
220,
220,
611,
1020,
13,
11299,
62,
4906,
6624,
46996,
25,
198,
220,
220,
220,
220,
220,
1441,
2170,
6624,
366,
11134,
1,
198,
220,
1441,
10352,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
1388,
3419,
198
] | 2.927852 | 596 |
comma=","
result="SET ANSI_NULLS ON\n"
result+="GO\n"
result+="SET QUOTED_IDENTIFIER ON\n"
result+="GO\n"
result+="CREATE PROCEDURE "+Model.TableName+"_Update\n"
result+=mapcols(pars)
result+="AS\n"
result+="BEGIN\n"
result+="SET NOCOUNT ON;\n"
result+="update [dbo].["+Model.TableName+"]\n"
result+=" set ("
result+=mapusual(sqf)
result+=")\n"
result+="WHERE " +Model.PK.Name+"=@"+Model.PK.Name+"\n"
result+="END\n"
result+="GO\n"
| [
785,
2611,
28,
2430,
198,
20274,
2625,
28480,
3537,
11584,
62,
33991,
50,
6177,
59,
77,
1,
198,
20274,
10,
2625,
11230,
59,
77,
1,
198,
20274,
10,
2625,
28480,
19604,
2394,
1961,
62,
25256,
5064,
38311,
6177,
59,
77,
1,
198,
20274,
10,
2625,
11230,
59,
77,
1,
198,
20274,
10,
2625,
43387,
6158,
41755,
1961,
11335,
43825,
17633,
13,
10962,
5376,
10,
1,
62,
10260,
59,
77,
1,
198,
20274,
47932,
8899,
4033,
82,
7,
79,
945,
8,
198,
20274,
10,
2625,
1921,
59,
77,
1,
198,
20274,
10,
2625,
33,
43312,
59,
77,
1,
198,
20274,
10,
2625,
28480,
399,
4503,
28270,
6177,
26,
59,
77,
1,
198,
20274,
10,
2625,
19119,
685,
67,
2127,
60,
3693,
1,
10,
17633,
13,
10962,
5376,
10,
8973,
59,
77,
1,
198,
20274,
10,
2625,
900,
5855,
198,
20274,
47932,
8899,
37850,
7,
31166,
69,
8,
198,
20274,
10,
2625,
19415,
77,
1,
198,
20274,
10,
2625,
47357,
366,
1343,
17633,
13,
40492,
13,
5376,
10,
1,
28,
31,
1,
10,
17633,
13,
40492,
13,
5376,
10,
1,
59,
77,
1,
198,
20274,
10,
2625,
10619,
59,
77,
1,
198,
20274,
10,
2625,
11230,
59,
77,
1,
198
] | 2.181818 | 198 |
# -*- coding: utf-8 -*-
import unittest
import tests.common
import core
from core.localisation import _
from core import Rpg
import models.player
from models.saved_game import saved_game
import json
import sqlite3
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
555,
715,
395,
198,
198,
11748,
5254,
13,
11321,
198,
11748,
4755,
198,
6738,
4755,
13,
12001,
5612,
1330,
4808,
198,
6738,
4755,
1330,
371,
6024,
198,
11748,
4981,
13,
7829,
198,
6738,
4981,
13,
82,
9586,
62,
6057,
1330,
7448,
62,
6057,
198,
198,
11748,
33918,
198,
11748,
44161,
578,
18,
628
] | 3.191176 | 68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.