content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import os
import random
import pickle
import math
import torch
from torch.utils.data import Dataset
from torchvision.ops import nms
import numpy as np
import h5py
from tqdm import trange
from utils.misc import mrcn_crop_pool_layer, recursive_jitter_roi, repeat_loader, calculate_iou
__all__ = ['RankDataset', 'RankEvalLoader', 'RankEvaluator']
| [
11748,
28686,
198,
11748,
4738,
198,
11748,
2298,
293,
198,
11748,
10688,
198,
198,
11748,
28034,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
316,
198,
6738,
28034,
10178,
13,
2840,
1330,
299,
907,
198,
11748,
299,
32152,
3... | 3.025862 | 116 |
from nmigen import *
from nmigen.build import Platform
# Simple blink script. Call this with:
# ```python
# blink = Blink(12000000) # blink once a second, the icesugar runs at 12mhz
# led = platform.request('led_r')
#
# m = Module()
# m.submodules += blink
# m.d.comb += led.eq(blink.state)
# ```
| [
6738,
28642,
9324,
1330,
1635,
198,
6738,
28642,
9324,
13,
11249,
1330,
19193,
198,
198,
2,
17427,
21019,
4226,
13,
4889,
428,
351,
25,
198,
2,
7559,
63,
29412,
198,
2,
21019,
796,
41732,
7,
1065,
10535,
8,
1303,
21019,
1752,
257,
1... | 2.902913 | 103 |
#-
# Copyright (c) 2018 Alex Richardson
# All rights reserved.
#
# This software was developed by the University of Cambridge Computer
# Laboratory as part of the Rigorous Engineering of Mainstream Systems (REMS)
# project, funded by EPSRC grant EP/K008528/1.
#
# @BERI_LICENSE_HEADER_START@
#
# Licensed to BERI Open Systems C.I.C. (BERI) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. BERI licenses this
# file to you under the BERI Hardware-Software License, Version 1.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.beri-open-systems.org/legal/license-1-0.txt
#
# Unless required by applicable law or agreed to in writing, Work 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.
#
# @BERI_LICENSE_HEADER_END@
#
from beritest_tools import BaseBERITestCase, attr
@attr('capabilities')
| [
2,
12,
198,
2,
15069,
357,
66,
8,
2864,
4422,
21679,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
3788,
373,
4166,
416,
262,
2059,
286,
14457,
13851,
198,
2,
18643,
355,
636,
286,
262,
24666,
9610,
14044,
286,
8774,
5532,
... | 3.570149 | 335 |
import tensorflow as tf
from tensorflow.python.framework import graph_util
sess = tf.InteractiveSession()
op = tf.range([3, 4], [18, 10], [5, 3], name="range")
target=op.eval();
print(target)
constant_graph = graph_util.convert_variables_to_constants(sess, sess.graph_def, ['range'])
with tf.gfile.FastGFile("range.pb", mode='wb') as f:
f.write(constant_graph.SerializeToString());
| [
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
13,
29412,
13,
30604,
1330,
4823,
62,
22602,
198,
198,
82,
408,
796,
48700,
13,
9492,
5275,
36044,
3419,
198,
198,
404,
796,
48700,
13,
9521,
26933,
18,
11,
604,
4357... | 2.666667 | 147 |
#!/usr/bin/python
import configparser
import argparse
import pandas as pd
import datetime
import sql_itis
import logging
import os
import requests
from zipfile import ZipFile, BadZipfile
import re
from io import BytesIO
import xml.etree.ElementTree as ET
#test olnly
if __name__ == '__main__':
global logger
logger = initLog()
logger.debug("Starting ITIS harvester...")
a = datetime.datetime.now()
main()
b = datetime.datetime.now()
diff = b-a
logger.debug('Total execution time:%s' %diff)
logger.debug('----------------------------------------') | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
11748,
4566,
48610,
198,
11748,
1822,
29572,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
4818,
8079,
198,
11748,
44161,
62,
11815,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
7007,
... | 3.010309 | 194 |
from bs4 import BeautifulSoup
from book import BookFetcher
from category import Category
import concurrent.futures
import time
import colorama
class CategoryFetcher:
"""
Create a category object containing book objects.
"""
@staticmethod
| [
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
6738,
1492,
1330,
4897,
37,
316,
2044,
198,
6738,
6536,
1330,
21743,
198,
11748,
24580,
13,
69,
315,
942,
198,
11748,
640,
198,
11748,
3124,
1689,
628,
198,
4871,
21743,
37,
316,
2044,
... | 3.38961 | 77 |
import numpy as np
import pytest
from pandas import DataFrame
pytest.importorskip("jinja2")
from pandas.io.formats.style import Styler
| [
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
9288,
198,
198,
6738,
19798,
292,
1330,
6060,
19778,
198,
198,
9078,
9288,
13,
11748,
669,
74,
541,
7203,
18594,
6592,
17,
4943,
198,
6738,
19798,
292,
13,
952,
13,
687,
1381,
13,
7635... | 3 | 46 |
import discord
import json
import random
from discord.ext import commands
from difflib import get_close_matches
from core.paginator import EmbedPaginatorSession as EPS
| [
11748,
36446,
198,
11748,
33918,
198,
11748,
4738,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
6738,
814,
8019,
1330,
651,
62,
19836,
62,
6759,
2052,
198,
6738,
4755,
13,
79,
363,
20900,
1330,
13302,
276,
47,
363,
20900,
36044,
355,
... | 3.930233 | 43 |
from django.utils import timezone
from django import forms
from django.forms.util import ErrorDict
PAYMENT_FIELDS = {'credit_card__number': 'x_card_num',
'credit_card__cvv': 'x_card_code',
'credit_card__exp_date': 'x_exp_date',
'credit_card__expiration_month': 'x_exp_date',
'billing__first_name': 'x_first_name',
'billing__last_name': 'x_last_name',
'billing__street_address': 'x_address',
'billing__locality': 'x_city',
'billing__region': 'x_state',
'billing__postal_code': 'x_zip',
'billing__country_code_alpha2': 'x_country',
'customer__phone': 'x_phone',
'shipping__first_name': 'x_ship_to_first_name',
'shipping__last_name': 'x_ship_to_last_name',
'shipping__street_address': 'x_ship_to_address',
'shipping__locality': 'x_ship_to_city',
'shipping__region': 'x_ship_to_state',
'shipping__postal_code': 'x_ship_to_zip',
'shipping__country_code_alpha2': 'x_ship_to_country'}
EXPIRATION_MONTH_CHOICES = [(i, "%02d" % i) for i in range(1, 13)]
EXPIRATION_YEAR_CHOICES = range(timezone.now().year, timezone.now().year + 10)
class PaymentForm(forms.Form):
"""
Authorize.net payment form.
"""
return_url = forms.CharField()
cart_id = forms.CharField()
x_invoice_num = forms.CharField()
x_amount = forms.CharField()
x_fp_sequence = forms.CharField()
x_fp_timestamp = forms.CharField()
x_fp_hash = forms.CharField()
x_relay_response = forms.CharField()
x_relay_url = forms.CharField()
x_login = forms.CharField()
x_method = forms.CharField()
x_type = forms.CharField()
x_test_request = forms.CharField()
x_version = forms.CharField()
x_card_num = forms.CharField(max_length=16)
x_card_code = forms.CharField(min_length=3, max_length=4)
x_exp_date = forms.CharField(max_length=7) # MM/YY, MMYY, MM-YY, MM-YYYY
x_first_name = forms.CharField(max_length=255)
x_last_name = forms.CharField(max_length=255)
x_address = forms.CharField(max_length=80)
x_city = forms.CharField(max_length=50)
x_state = forms.CharField(max_length=50)
x_zip = forms.CharField(max_length=30)
x_country = forms.CharField(max_length=2)
x_phone = forms.CharField(max_length=30)
x_ship_to_first_name = forms.CharField(max_length=255)
x_ship_to_last_name = forms.CharField(max_length=255)
x_ship_to_address = forms.CharField(max_length=80)
x_ship_to_city = forms.CharField(max_length=50)
x_ship_to_state = forms.CharField(max_length=50)
x_ship_to_zip = forms.CharField(max_length=30)
x_ship_to_country = forms.CharField(max_length=2)
shipping_street_address2 = forms.CharField(required=False)
billing_street_address2 = forms.CharField(required=False)
def set_result(self, result):
"""
Use the results of the gateway payment confirmation to set
validation errors on the form.
"""
self._errors = ErrorDict()
self.is_bound = True
if not result.success:
# See http://www.authorize.net/support/merchant/Transaction_Response/Response_Reason_Codes_and_Response_Reason_Text.htm
# For testing data http://www.authorize.net/files/ErrorGenerationGuide.pdf
if result.gateway_result == 6:
name = "x_card_num"
elif result.gateway_result == 7:
name = "x_exp_date"
elif result.gateway_result == 8:
name = "x_exp_date"
elif result.gateway_result == 78:
name = "x_card_code"
elif result.gateway_result == 65:
name = "x_card_code"
else:
name = forms.forms.NON_FIELD_ERRORS
self._errors[name] = self.error_class([result.errors])
def hidden_fields(self):
"""
Get hidden fields required for this form.
"""
return [self['return_url'],
self['cart_id'],
self['x_invoice_num'],
self['x_amount'],
self['x_fp_hash'],
self['x_fp_sequence'],
self['x_relay_response'],
self['x_relay_url'],
self['x_login'],
self['x_version'],
self['x_fp_timestamp'],
self['x_method'],
self['x_type'],
self['x_test_request']]
@property
def action(self):
"""
Action to post the form to.
"""
return self._submit_url
| [
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
198,
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
23914,
13,
22602,
1330,
13047,
35,
713,
198,
198,
4537,
56,
10979,
62,
11674,
3698,
5258,
796,
1391,
6,
43082,
62,
9517,
... | 2.037259 | 2,335 |
from typing import Iterable, Union
import psycopg2.extras
import psycopg2.extensions
import logging
from privex.db.base import CursorManager
from privex.db.types import GenericCursor
from privex.db.query.base import BaseQueryBuilder, QueryMode
log = logging.getLogger(__name__)
class PostgresQueryBuilder(BaseQueryBuilder):
"""
A simple SQL query builder / ORM, designed for use with PostgreSQL. May or may not work with other RDBMS's.
Basic Usage:
First, inject your psycopg2 connection into QueryBuilder, so it's available to all instances.
>>> PostgresQueryBuilder.conn = psycopg2.connect(user='bob', dbname='my_db')
Now, just construct the class, passing the table name to query.
>>> q = PostgresQueryBuilder('orders')
You can execute each query building method either on their own line, and/or you can chain them together.
**WARNING:** many methods such as :py:meth:`.select` do not escape your input. Only :py:meth:`.where` and
:py:meth:`.where_or` use prepared statements, with a placeholder for the value you pass.
>>> q.select('full_name', 'address')
>>> q.select('SUM(order_amt) as total_spend').where('country', 'FR') \
... .where('SUM(order_amt)', '100', compare='>=')
>>> q.group_by('full_name', 'address')
Once you've finished building your query, simply call either :py:meth:`.all` (return all results as a list)
or :py:meth:`.fetch` (returns the first result, or ``None`` if there's no match)
>>> results = q.order('full_name', direction='ASC').all()
>>> print(results[0])
Output::
dict{'full_name': 'Aaron Doe', 'address': '123 Fake St.', 'total_spend': 127.88}
You can call :py:meth:`.build_query` to see the query that would be sent to PostgreSQL, showing the
value placeholders (e.g. %s)
>>> print(q.build_query())
Output::
SELECT full_name, address, SUM(order_amt) as total_spend FROM orders WHERE country = %s
AND SUM(order_amt) >= %s GROUP BY full_name, address ORDER BY full_name ASC;
Copyright::
+===================================================+
| © 2019 Privex Inc. |
| https://www.privex.io |
+===================================================+
| |
| Privex Database Library |
| |
| Core Developer(s): |
| |
| (+) Chris (@someguy123) [Privex] |
| |
+===================================================+
"""
Q_PRE_QUERY = "set timezone to 'UTC'; "
Q_DEFAULT_PLACEHOLDER = "%s"
cursor_cls: psycopg2.extensions.cursor
query_mode: QueryMode
@property
def query_mode_cursor(self, query_mode: QueryMode, replace_cursor=True, cursor_mgr=True):
"""
Return a cursor object with the cursor class based on the ``query_mode``, using the
query_mode to cursor class map in :py:attr:`._cursor_map`
:param QueryMode query_mode: The QueryMode to obtain a cursor for
:param bool replace_cursor: (Default: ``True``) If True, replace the shared instance :py:attr:`._cursor` with
this new cursor.
:param bool cursor_mgr: Wrap the cursor object in :class:`.CursorManager`
:return:
"""
_cur = self.get_cursor(cursor_class=self._cursor_map[query_mode])
if cursor_mgr:
_cur = CursorManager(_cur, close_callback=self._close_callback)
if replace_cursor:
try:
self.close_cursor()
except (BaseException, Exception):
pass
self._cursor = _cur
return _cur
def get_cursor(self, cursor_name=None, cursor_class=None, *args, **kwargs) -> psycopg2.extensions.cursor:
"""Create and return a new Postgres cursor object"""
cur_cls = self.cursor_cls if cursor_class is None else cursor_class
if cursor_name is not None:
return self.conn.cursor(cursor_name, cursor_factory=cur_cls)
else:
return self.conn.cursor(cursor_factory=cur_cls)
@property
def all(self, query_mode=QueryMode.DEFAULT) -> Union[Iterable[dict], Iterable[tuple]]:
"""
Executes the current query, and returns an iterable cursor (results are loaded as you iterate the cursor)
Usage:
>>> results = PostgresQueryBuilder('people').all() # Equivalent to ``SELECT * FROM people;``
>>> for r in results:
>>> print(r['first_name'], r['last_name'], r['phone'])
:return Iterable: A cursor which can be iterated using a ``for`` loop, loads rows as you iterate, saving RAM
"""
if self.conn is None:
raise Exception('Please statically set PostgresQueryBuilder.conn to a psycopg2 connection')
# if query_mode == QueryMode.DEFAULT: cursor_cls = self.cursor_cls
# elif query_mode == QueryMode.ROW_DICT: cursor_cls = psycopg2.extras.RealDictCursor
# elif query_mode == QueryMode.ROW_TUPLE: cursor_cls = psycopg2.extras.NamedTupleCursor
if query_mode not in self._cursor_map:
raise AttributeError('query_mode must be one of QueryMode.ROW_DICT or ROW_TUPLE')
with self.query_mode_cursor(query_mode, False) as cur:
cur.execute(self.build_query(), self.where_clauses_values)
return cur.fetchall()
def fetch(self, query_mode=QueryMode.DEFAULT) -> Union[dict, tuple, None]:
"""
Executes the current query, and fetches the first result as a ``dict``.
If there are no results, will return None
:return dict: The query result as a dictionary: {column: value, }
:return None: If no results are found
"""
if self.conn is None:
raise Exception('Please statically set PostgresQueryBuilder.conn to a psycopg2 connection')
if query_mode not in self._cursor_map:
raise AttributeError('query_mode must be one of QueryMode.ROW_DICT or ROW_TUPLE')
with self.query_mode_cursor(query_mode, False) as cur:
cur.execute(self.build_query(), self.where_clauses_values)
return cur.fetchone()
def select_date(self, *args):
"""
Add columns to be returned as an ISO formatted date to the select clause.
Specify as individual args. Do not use 'col AS x'. NOTE: no escaping is used!
example: q.select_date('created_at', 'updated_at')
can also chain: q.select_date('mycol').select_date('othercol')
:param args: date columns to select as individual arguments
:return: QueryBuilder object (for chaining)
"""
self.select_cols += ["""to_char({a}, 'YYYY-MM-DD"T"HH24:MI:SS"Z"') as {a}""".format(a=a) for a in args]
return self
| [
6738,
19720,
1330,
40806,
540,
11,
4479,
198,
11748,
17331,
22163,
70,
17,
13,
2302,
8847,
198,
11748,
17331,
22163,
70,
17,
13,
2302,
5736,
198,
11748,
18931,
198,
198,
6738,
1293,
303,
87,
13,
9945,
13,
8692,
1330,
327,
21471,
13511... | 2.309751 | 3,138 |
import graphene
from graphene import relay
from kaffepause.common.types import CountableConnection
from kaffepause.users.types import UserConnection, UserNode
| [
11748,
42463,
198,
6738,
42463,
1330,
24248,
198,
198,
6738,
479,
2001,
538,
682,
13,
11321,
13,
19199,
1330,
2764,
540,
32048,
198,
6738,
479,
2001,
538,
682,
13,
18417,
13,
19199,
1330,
11787,
32048,
11,
11787,
19667,
628,
628,
198
] | 4 | 41 |
from symbol_table import SymbolTable
from values import *
# def func_N(args):
# return Number(float(args[0]))
stdlib = SymbolTable()
stdlib.set('I', Func(func_I))
stdlib.set('S', Func(func_S))
# stdlib.set('N', Func(func_N))
stdlib.set('P', Func(func_P)) | [
6738,
6194,
62,
11487,
1330,
38357,
10962,
198,
6738,
3815,
1330,
1635,
198,
198,
2,
825,
25439,
62,
45,
7,
22046,
2599,
198,
2,
220,
220,
220,
220,
1441,
7913,
7,
22468,
7,
22046,
58,
15,
60,
4008,
198,
198,
19282,
8019,
796,
383... | 2.429907 | 107 |
import json
import numpy as np
from autodisc.helper.data import JSONNumpyEncoder, json_numpy_object_hook
from autodisc.helper.data import set_dict_default_values
| [
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1960,
375,
2304,
13,
2978,
525,
13,
7890,
1330,
19449,
45,
32152,
27195,
12342,
11,
33918,
62,
77,
32152,
62,
15252,
62,
25480,
198,
6738,
1960,
375,
2304,
13,
2978,
525,
13... | 3.113208 | 53 |
#!/usr/local/bin/python
# Things that are generally useful but require nothing other
# than standard libraries.
import copy, filecmp, glob, itertools, os, pprint, random, re, stat, string, urllib, urllib2
import config # bleagh
import jinja2
#html_done = False
alnum = string.digits + string.ascii_lowercase
if os.getenv('REQUEST_METHOD'): # is this apache? # pragma: no cover
import cgitb; cgitb.enable()
# still a work in progress
def root_ext(fn):
'''Split fn into root and ext. In this case, ext has no dot.
>>> root_ext('abc.def')
('abc', 'def')
>>> root_ext('.abc')
('.abc', '')
>>> root_ext('abc.')
('abc', '')
>>> root_ext('abc')
('abc', '')
>>> root_ext('')
('', '')
'''
root, ext = os.path.splitext(fn)
if ext.startswith('.'):
ext = ext[1:]
return root, ext
id_re = re.compile('[-/\w.]+') # 0-9 A-Z a-z underscore dash slash dot
def reflect(in_iter, columns, pad=None):
'''Reflects an interator carved up into chunks, padding with None.
>>> reflect([0,1,2,3], 3)
[0, 2, 1, 3, None, None]
'''
nents = len(in_iter)
if nents < columns:
return in_iter
colsize = (len(in_iter) - 1) / columns + 1
return itertools.chain(*itertools.izip_longest(*[in_iter[x:x + colsize] for x in range(0,
colsize * columns,
#len(in_iter),
colsize)], fillvalue=pad))
# sobj is a list of word-like things, targ is a string
# File-level globals. Not to be imported by any other file.
_format_web = True
_pending_comments = list()
_header_done_flag = False
_partial_comment = None
| [
2,
48443,
14629,
14,
12001,
14,
8800,
14,
29412,
198,
198,
2,
11597,
326,
389,
4143,
4465,
475,
2421,
2147,
584,
198,
2,
621,
3210,
12782,
13,
198,
198,
11748,
4866,
11,
2393,
48991,
11,
15095,
11,
340,
861,
10141,
11,
28686,
11,
... | 2.455505 | 663 |
import eneel.load_functions as load_functions
import eneel.printer as printer
import logging
logger = logging.getLogger("main_logger")
| [
11748,
551,
68,
417,
13,
2220,
62,
12543,
2733,
355,
3440,
62,
12543,
2733,
198,
11748,
551,
68,
417,
13,
1050,
3849,
355,
20632,
198,
198,
11748,
18931,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7203,
12417,
62,
6404,
... | 3.043478 | 46 |
# -*- coding: utf-8 -*-
"""
@Author: Timothy Berkelbach
Bing Gu
Spin-orbital G0W0
Refs
[1] Lange and Berkelbach, 2018, JCTC
"""
import numpy as np
import scipy.linalg
from scipy.optimize import newton
from pyscf.lib import logger
import pyscf.ao2mo
import pyscf
from functools import reduce
def g0(gw, omega):
'''Return the 0th order GF matrix [G0]_{pq} in the basis of
single-particle orbitals (MF eigenvectors).'''
g0 = np.zeros((gw.nso,gw.nso), dtype=np.complex128)
for p in range(gw.nso):
if p < gw.nocc: sgn = -1
else: sgn = +1
g0[p,p] = 1.0/(omega - gw.e_mf[p] + 1j*sgn*gw.eta)
return g0
def rpa_AB_matrices(gw, method='TDH'):
'''Compute the RPA A and B matrices, using TDH, TDHF, or TDDFT.
'''
assert method in ('TDH','TDHF','TDDFT')
nso = gw.nso
nocc = gw.nocc
nvir = nso - nocc
dim_rpa = nocc*nvir
A = np.zeros((dim_rpa, dim_rpa))
B = np.zeros((dim_rpa, dim_rpa))
ai = 0
for i in range(nocc):
for a in range(nocc,nso):
A[ai,ai] = gw.e_mf[a] - gw.e_mf[i]
bj = 0
for j in range(nocc):
for b in range(nocc,nso):
A[ai,bj] += gw.eri[a,i,j,b]
B[ai,bj] += gw.eri[a,i,b,j]
if method == 'TDHF':
A[ai,bj] -= gw.eri[a,b,j,i]
B[ai,bj] -= gw.eri[a,j,b,i]
bj += 1
ai += 1
assert np.allclose(A, A.transpose())
assert np.allclose(B, B.transpose())
return A, B
def rpa(gw, using_tda=False, using_casida=True, method='TDH'):
'''Get the RPA eigenvalues and eigenvectors.
The RPA computation is required to construct the dielectric function, i.e. screened
Coloumb interaction.
Q^\dagger = \sum_{ia} X_{ia} a^+ i - Y_{ia} i^+ a
Leads to the RPA eigenvalue equations:
[ A B ][X] = omega [ 1 0 ][X]
[ B A ][Y] [ 0 -1 ][Y]
which is equivalent to
[ A B ][X] = omega [ 1 0 ][X]
[-B -A ][Y] = [ 0 1 ][Y]
See, e.g. Stratmann, Scuseria, and Frisch,
J. Chem. Phys., 109, 8218 (1998)
'''
A, B = rpa_AB_matrices(gw, method=method)
if using_tda:
ham_rpa = A
e, x = eig(ham_rpa)
return e, x
else:
if not using_casida:
ham_rpa = np.array(np.bmat([[A,B],[-B,-A]]))
assert is_positive_def(ham_rpa)
e, xy = eig_asymm(ham_rpa)
return e, xy
else:
assert is_positive_def(A-B)
sqrt_A_minus_B = scipy.linalg.sqrtm(A-B)
ham_rpa = np.dot(sqrt_A_minus_B, np.dot((A+B),sqrt_A_minus_B))
esq, t = eig(ham_rpa)
return np.sqrt(esq), t
def get_m_rpa(gw, e_rpa, t_rpa):
'''Get the (intermediate) M_{pq,L} tensor needed to calculate the self-energy.
M_{pq,L} = \sum_{ia} ( (eps_a-eps_i)/erpa_L )^{1/2} T_{ai,L} (ai|pq)
'''
nso = gw.nso
nocc = gw.nocc
nvir = nso - nocc
t_by_e = t_rpa.copy()
for L in range(len(e_rpa)):
t_by_e[:,L] /= np.sqrt(e_rpa[L])
sqrt_eps = np.zeros(nocc*nvir)
eri_product = np.zeros((nocc*nvir, nso, nso))
ai = 0
for i in range(nocc):
for a in range(nocc,nso):
sqrt_eps[ai] = np.sqrt(gw.e_mf[a]-gw.e_mf[i])
eri_product[ai,:,:] = gw.eri[a,i,:,:]
ai += 1
M = np.einsum('a,al,apq->pql', sqrt_eps, t_by_e, eri_product)
return M
def sigma(gw, p, q, omegas, e_rpa, t_rpa, vir_sgn=1):
'''
self energy sigma_{pq} = i [GW]_{pq}
'''
if not isinstance(omegas, (list,tuple,np.ndarray)):
single_point = True
omegas = [omegas]
else:
single_point = False
# This usually takes the longest:
if gw._M is None:
gw._M = get_m_rpa(gw, e_rpa, t_rpa)
nso = gw.nso
nocc = gw.nocc
sigma_c = []
sigma_x = []
for omega in omegas:
sigma_cw = 0.
sigma_xw = 0.
for L in range(len(e_rpa)):
for i in range(nocc):
sigma_cw += gw._M[i,q,L]*gw._M[i,p,L]/(
omega - gw.e_mf[i] + e_rpa[L] - 1j*gw.eta )
for a in range(nocc, nso):
sigma_cw += gw._M[a,q,L]*gw._M[a,p,L]/(
omega - gw.e_mf[a] - e_rpa[L] + vir_sgn*1j*gw.eta )
for i in range(nocc):
sigma_xw += -gw.eri[p,i,i,q]
sigma_c.append(sigma_cw)
sigma_x.append(sigma_xw)
if single_point:
return sigma_c[0], sigma_x[0]
else:
return sigma_c, sigma_x
def kernel(gw, so_energy, so_coeff, verbose=logger.NOTE):
'''Get the GW-corrected spatial orbital energies.
Note: Works in spin-orbitals but returns energies for spatial orbitals.
Args:
gw : instance of :class:`GW`
so_energy : (nso,) ndarray
so_coeff : (nso,nso) ndarray
Returns:
egw : (nso/2,) ndarray
The GW-corrected spatial orbital energies.
'''
print("# --- Performing RPA calculation ...")
e_rpa, t_rpa = rpa(gw, method=gw.screening)
print("RPA eigenvalues = ", e_rpa)
print("done.")
print("# --- Calculating GW QP corrections ...")
egw = np.zeros(int(gw.nso/2))
for p in range(0,gw.nso,2):
try:
egw[int(p/2)] = newton(quasiparticle, gw.e_mf[p], tol=1e-6, maxiter=100)
except RuntimeError:
print("Newton-Raphson unconverged, setting GW eval to MF eval.")
egw[int(p/2)] = gw.e_mf[p]
print(egw[int(p/2)])
print("done.")
return egw
def eig_asymm(h):
'''Diagonalize a real, *asymmetrix* matrix and return sorted results.
Return the eigenvalues and eigenvectors (column matrix)
sorted from lowest to highest eigenvalue.
'''
e, c = np.linalg.eig(h)
if np.allclose(e.imag, 0*e.imag):
e = np.real(e)
else:
print("WARNING: Eigenvalues are complex, will be returned as such.")
idx = e.argsort()
e = e[idx]
c = c[:,idx]
return e, c
if __name__ == '__main__':
from pyscf import scf, gto
mol = gto.Mole()
mol.verbose = 2
#mol.atom = [['Ne' , (0., 0., 0.)]]
#mol.basis = {'Ne': '6-31G'}
# This is from G2/97 i.e. MP2/6-31G*
mol.atom = [['H' , (0., 0., 0.)],
['H', (1.1, 0., 0.)]]
# ['F' , (0.91, 0., 0.)]]
mol.basis = '631g'
mol.build()
mf = scf.RHF(mol)
#print(mf.scf())
mf.kernel()
gw = GW(mf, screening='TDHF')
egw = gw.kernel()
print('HF vs. GW ')
for emf, eqp in zip(mf.mo_energy, egw):
print("%0.6f %0.6f"%(emf, eqp))
nocc = mol.nelectron//2
ehomo = egw[nocc-1]
print("GW -IP = GW HOMO =", ehomo, "au =", ehomo*27.211, "eV") | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
31,
13838,
25,
22283,
4312,
7750,
19496,
198,
220,
220,
220,
220,
220,
220,
220,
220,
21631,
1962,
198,
198,
4561,
259,
12,
27688,
1287,
402,
15,
54,
15,
... | 1.792468 | 3,797 |
# Test script for genome_util package - it should be launched from
# the root of the genome_util module, ideally just with 'make test', as
# it looks for a hardcoded relative path to find the 'test.cfg' file
import unittest
import json
import ConfigParser
from pprint import pprint
from subprocess import call
from biokbase.auth import Token
# Before all the tests, read the config file and get a user token and
# save it to a file used by the main service script
# Define all our other test cases here
# start the tests if run as a script
if __name__ == '__main__':
unittest.main()
| [
2,
6208,
4226,
329,
19270,
62,
22602,
5301,
532,
340,
815,
307,
5611,
422,
198,
2,
262,
6808,
286,
262,
19270,
62,
22602,
8265,
11,
30274,
655,
351,
705,
15883,
1332,
3256,
355,
198,
2,
340,
3073,
329,
257,
1327,
40976,
3585,
3108,
... | 3.621951 | 164 |
from django.conf import settings
from django.conf.urls import url
from django.urls import include
from django.urls import path
from django.contrib import admin
from controlcenter.views import controlcenter
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^admin/dashboard/', controlcenter.urls),
url(r'^sms/', include('sms.urls')),
url(r'^sims/', include('sims.urls')),
url(r'^deterrence/', include('deterrence.urls')),
url(r'^bots/', include('bots.urls')),
]
if settings.DEBUG:
import debug_toolbar
urlpatterns = [
path('__debug__/', include(debug_toolbar.urls)),
# For django versions before 2.0:
# url(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns
| [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
2291,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
42625,
14208... | 2.466667 | 300 |
"""
Note that the equality dict in Simplex data structure can be simplified by elimate the jar whose coefficient
is zero. This will be fixed later.
"""
"""
Implementation of Simplex-based quantifier-free linear arithmetic solver.
Reference:
Bruno Dutertre and Leonardo de Moura. A Fast Linear-Arithmetic Solver for DPLL(T)
"""
from kernel.term import Term, Var, Inst, Int, greater_eq, Real, Eq, less_eq, minus, greater, less, Const, TFun, of_int
from kernel.type import RealType, IntType
from kernel.proofterm import ProofTerm
from kernel.theory import register_macro, Thm, get_theorem
from kernel.macro import Macro
from logic.logic import apply_theorem
from logic import basic, matcher
from data import real, integer
from logic.conv import Conv, ConvException, rewr_conv, top_conv, arg_conv, arg1_conv, bottom_conv
from collections import namedtuple
from collections import deque
import math
import numbers
import string
from fractions import Fraction
import functools
import hashlib
basic.load_theory('real')
SAT, UNSAT = range(2)
geq_atom = namedtuple("geq_atom", ["var_name", "lower"])
leq_atom = namedtuple("leq_atom", ["var_name", "upper"])
class Jar:
"""A pair (coeff, name), represent a coeff * var term."""
class Equation:
"""Each equation contains a dependent variable, and several independent variables."""
class GreaterEq(InEquation):
"""Represent a greater equality term."""
class LessEq(InEquation):
"""Represent a greater equality term."""
class Tableau:
"""A tableau is a list of equalities.
"""
def collect_vars_from_ineq(ineq):
"""Give an inequation, return a set in which are the _vars."""
assert isinstance(ineq, InEquation)
_vars = set()
for jar in ineq.jars:
_vars.add(jar.var)
return _vars
def find_coeff(v, jars):
"""Give a list of jars, return the jar whose variable is v,
otherwise, return None
"""
for i, j in enumerate(jars):
if j.var == v:
return (i, j)
return (None, None)
def reduce_pairs(ps):
"""
Same as the implementation in integral.poly. Reduce a list of pairs bycollecting
into groups according to first components, and adding the second component for each group.
e.g. [("x", 1), ("y", 2), ("x", 3)] => [("x", 4), ("y", 2)]
"""
res = {}
for p in ps:
v, c = p.var, p.coeff
if v in res:
res[v] += c
else:
res[v] = c
pair = tuple(sorted((k, v) for k, v in res.items()))
jars = [Jar(v, k) for k, v in pair]
return jars
def delete_key(d, key):
"""delete a item in dict"""
r = dict(d)
del r[key]
return r
def delete_elem(s, elem):
"""delete a item in set"""
r = set(s)
r.remove(elem)
return r
class Simplex:
""""""
def add_ineq(self, ineq):
"""
Add an inequality to the current solver, and update relevant states.
"""
assert isinstance(ineq, InEquation)
self.original.append(ineq)
if isinstance(ineq, GreaterEq):
if len(ineq.jars) == 1: # a * x >= b
jar = ineq.jars[0]
coeff, var_name, lower_bound = jar.coeff, jar.var, ineq.lower_bound
self.input_vars.add(var_name)
if coeff == 1: # x >= b (atom)
self.lower_atom.append((var_name, lower_bound))
self.atom.append(geq_atom(var_name, lower_bound))
if var_name not in self.mapping:
self.mapping[var_name] = 0
self.non_basic.add(var_name)
if var_name not in self.bound.keys():
self.bound[var_name] = (-math.inf, math.inf)
elif coeff != 0: # a * x >= b
if ineq.jars not in self.matrix:
s = "$" + string.ascii_lowercase[self.index] + "$"
self.index += 1
self.matrix[ineq.jars] = s
self.equality[s] = ineq.jars
else:
s = self.matrix[ineq.jars]
self.lower_atom.append((s, lower_bound))
self.atom.append(geq_atom(s, lower_bound))
self.basic.add(s)
self.non_basic.add(var_name)
if var_name not in self.nbasic_basic:
self.nbasic_basic[var_name] = {s}
else:
self.nbasic_basic[var_name].add(s)
if var_name not in self.mapping:
self.mapping.update({var_name : 0, s : 0})
self.bound[s] = (-math.inf, math.inf)
if var_name not in self.bound:
self.bound[var_name] = (-math.inf, math.inf)
else: # a * x + b * y + ... >= c
_vars = collect_vars_from_ineq(ineq)
# push all variables in lhs into solver
for v in _vars:
if v not in self.mapping.keys():
self.mapping.update({v: 0})
if v not in self.non_basic:
self.non_basic.add(v)
if v not in self.bound.keys():
self.bound[v] = (-math.inf, math.inf)
self.input_vars.add(v)
lower_bound = ineq.lower_bound
if ineq.jars not in self.matrix:
s = "$" + string.ascii_lowercase[self.index] + "$"
self.index += 1
self.equality[s] = ineq.jars
self.matrix[ineq.jars] = s
else:
s = self.matrix[ineq.jars]
self.lower_atom.append((s, lower_bound))
self.atom.append(geq_atom(s, lower_bound))
self.mapping[s] = 0
for jar in ineq.jars:
if jar.var not in self.nbasic_basic:
self.nbasic_basic[jar.var] = {s}
else:
self.nbasic_basic[jar.var].add(s)
self.basic.add(s)
self.bound[s] = (-math.inf, math.inf)
elif isinstance(ineq, LessEq):
if len(ineq.jars) == 1: # a * x <= b
jar = ineq.jars[0]
coeff, var_name, upper_bound = jar.coeff, jar.var, ineq.upper_bound
self.input_vars.add(var_name)
if coeff == 1: # x <= b (atom)
self.upper_atom.append((var_name, upper_bound))
self.atom.append(leq_atom(var_name, upper_bound))
if var_name not in self.mapping:
self.mapping[var_name] = 0
self.non_basic.add(var_name)
if var_name not in self.bound.keys():
self.bound[var_name] = (-math.inf, math.inf)
elif coeff != 0: # a * x <= b
if ineq.jars not in self.matrix:
s = "$" + string.ascii_lowercase[self.index] + "$"
self.index += 1
self.equality[s] = ineq.jars
self.matrix[ineq.jars] = s
else:
s = self.matrix[ineq.jars]
self.upper_atom.append((s, upper_bound))
self.atom.append(leq_atom(s, upper_bound))
self.basic.add(s)
self.non_basic.add(var_name)
if var_name not in self.mapping:
self.mapping.update({var_name : 0, s : 0})
self.bound[s] = (-math.inf, math.inf)
if var_name not in self.nbasic_basic:
self.nbasic_basic[var_name] = {s}
else:
self.nbasic_basic[var_name].add(s)
if var_name not in self.bound.keys():
self.bound[var_name] = (-math.inf, math.inf)
else: # a * x + b * y + ... <= c
_vars = collect_vars_from_ineq(ineq)
# push all variables in lhs into solver
for v in _vars:
if v not in self.mapping.keys():
self.mapping.update({v: 0})
if v not in self.non_basic:
self.non_basic.add(v)
if v not in self.bound.keys():
self.bound[v] = (-math.inf, math.inf)
self.input_vars.add(v)
upper_bound = ineq.upper_bound
if ineq.jars not in self.matrix:
s = "$" + string.ascii_lowercase[self.index] + "$"
self.index += 1
self.equality[s] = ineq.jars
self.matrix[ineq.jars] = s
else:
s = self.matrix[ineq.jars]
self.upper_atom.append((s, upper_bound))
self.atom.append(leq_atom(s, upper_bound))
self.mapping[s] = 0
for jar in ineq.jars:
if jar.var not in self.nbasic_basic:
self.nbasic_basic[jar.var] = {s}
else:
self.nbasic_basic[jar.var].add(s)
self.basic.add(s)
self.bound[s] = (-math.inf, math.inf)
# if self.ilp:
# self.variables_bound()
def preprocess(self):
"""
Simplify the constraints Ax = 0 by Gauss elimination.
Remove any variable xi that does not occur in any elementary atom of inequalities.
Introduce a new variable when elimination is done.
"""
pass
def aij(self, xi, xj):
"""
xi is a basic variable, xj is a non_basic variable.
return the aij in the equation of xi = ... + aij * xj + ...
"""
assert xi in self.basic and xj in self.non_basic
jars = self.equality[xi]
_, res = find_coeff(xj, jars)
return res.coeff if res is not None else 0
def pivot(self, xi, xj):
"""
xi is a basic variable, xj is a non-basic variable.
Delete xi from basic sets, delete xj from non-basic sets
Suppose the original equality is:
xi = ... + aij * xj + ...
then we could the representation of xj:
xj = 1/aij * xi + -...
After get the representation, we find other equalities which use xj,
substitute xj with the above equality's rhs and normalize it.
"""
assert xi in self.basic and xj in self.non_basic
a = self.aij(xi, xj)
# get the equality
jars = self.equality[xi]
xj_repr_jars = [Jar(Fraction(1, a), xi)] + [Jar(-Fraction(1, a) * Fraction(jar.coeff), jar.var) for jar in jars if jar.var != xj]
xj_repr_jars = reduce_pairs(xj_repr_jars)
# update the state
# update equality, delete the previous xi = ...
# add new term xj = ...
# for the other equalities which use xj, try to substitute xj
# by xj_repr_jars
self.equality = delete_key(self.equality, xi)
self.equality[xj] = xj_repr_jars
for x in self.nbasic_basic[xj]:
if x != xi:
rhs = self.equality[x]
_, xj_jar = find_coeff(xj, rhs)
rhs_without_xj = reduce_pairs([j for j in rhs if j != xj_jar] + [Jar(xj_jar.coeff * v.coeff, v.var) for v in xj_repr_jars])
self.equality[x] = rhs_without_xj
# update basic and non_basic variables
self.basic = delete_elem(self.basic, xi)
self.non_basic = delete_elem(self.non_basic, xj)
self.basic.add(xj)
self.non_basic.add(xi)
# update nbasic_basic
self.nbasic_basic = dict()
for key, value in self.equality.items():
for v in value:
if v.var in self.nbasic_basic:
self.nbasic_basic[v.var].add(key)
else:
self.nbasic_basic[v.var] = {key}
def explaination(self, xi):
"""
When a conflict occurs, return the minimal clause.
There are two main reasons for inconsistency:
1) A basic variable xi such that β(xi) < li and for all non-basic variable we have
aij > 0 --> β(xj) ≥ uj and aij < 0 --> β(xj) ≤ lj.
2) A basic variable xj such that β(xj) > uj and for all non-basic variable we have
aij > 0 --> β(xj) ≤ lj and aij < 0 --> β(xj) ≥ uj.
For 1), the clause is
Γ = {xj ≤ uj | j ∈ N+} ∪ {xj ≥ lj | j ∈ N-} ∪ {xi ≥ li}
For 2), the clause is
Γ = {xj ≥ lj | j ∈ N+} ∪ {xj ≤ uj | j ∈ N-} ∪ {xj ≤ ui}
"""
explain = [] # store the atoms
if self.mapping[xi] < self.bound[xi][0]: # reason 1
for jar in self.equality[xi]:
if jar.coeff > 0:
upper = self.bound[jar.var][1]
explain.append(leq_atom(jar.var, upper))
elif jar.coeff < 0:
lower = self.bound[jar.var][0]
explain.append(geq_atom(jar.var, lower))
explain.append(geq_atom(xi, self.bound[xi][0]))
else:
for jar in self.equality[xi]:
if jar.coeff > 0:
lower = self.bound[jar.var][0]
explain.append(geq_atom(jar.var, lower))
elif jar.coeff < 0:
upper = self.bound[jar.var][1]
explain.append(leq_atom(jar.var, upper))
explain.append(leq_atom(xi, self.bound[xi][1]))
return explain
def theta(self):
"""
For Ax ≤ b, Ax ≥ c.
θ(A) = max(|aij|), θ(b) = max(|bi|), θ(c) = max(|ci|)
θ is max(θ(A), θ(b), θ(c))
θ can be used to derive non-basic variables' bound.
"""
t = 0
ineqs = self.original
for ineq in ineqs:
if isinstance(ineq, GreaterEq):
jars, lower_bound = ineq.jars, ineq.lower_bound
for j in jars:
if abs(j.coeff) > t:
t = abs(j.coeff)
if abs(lower_bound) > t:
t = abs(lower_bound)
else:
jars, upper_bound = ineq.jars, ineq.upper_bound
for j in jars:
if abs(j.coeff) > t:
t = abs(j.coeff)
if abs(upper_bound) > t:
t = abs(upper_bound)
return t
def variables_bound(self):
"""
Compute each non-basic variables' bound based on the following theorem(NEMHAUSER, 1998, P125):
If x is an extreme point of conv(S), then:
x <= ((m+n)nθ)^n
Where m is the number of inequations, n is the number of non-basic vars.
"""
m = len(self.original)
n = len(self.basic)
t = self.theta()
bound = ((m + n) * n * t) ** n
# set the bound for each non-basic variable
for var in self.non_basic:
if self.bound[var][0] < -bound:
self.bound[var] = (-bound, self.bound[var][1])
if bound < self.bound[var][1]:
self.bound[var] = (self.bound[var][0], bound)
def all_integer(self):
"""Check if all items in d are integer"""
for var, value in self.mapping.items():
if var in self.input_vars:
v = float(value)
if not v.is_integer():
return False
return True
def find_not_int_var(self):
"""Find the var which value is not integer."""
assert not self.all_integer(), "No integer!"
for v, value in self.mapping.items():
if v in self.input_vars:
val = float(value)
if not val.is_integer():
return v, val
return None
def branch_and_bound(tableau, pts1, pts2):
"""
If current solution is not a good solution(some variables' value are not integer),
add more constraints and perform simplex again, until find a good solution.
pts1 is the list of int = of_int, pts2 is the list of of_int v = x_i
"""
T = IntSimplexTree(tableau, pts1, pts2)
tree = deque([T])
while len(tree) != 0:
try:
node = tree.popleft()
node.simplex.handle_assertion()
if not node.simplex.all_integer():
v, val = node.simplex.find_not_int_var()
node.var = v
s1, s2 = Simplex(), Simplex()
ineq1 = LessEq([Jar(1, v)], math.floor(val))
ineq2 = GreaterEq([Jar(1, v)], math.ceil(val))
s1.add_ineqs(ineq1, *node.simplex.original)
s2.add_ineqs(ineq2, *node.simplex.original)
b1 = IntSimplexTree(s1, pts1, pts2, new_ast=ineq1)
b2 = IntSimplexTree(s2, pts1, pts2, new_ast=ineq2)
node.branches = (b1, b2)
tree.appendleft(b1)
tree.appendleft(b2)
else:
return node.simplex.mapping
except:
continue
print("No integer solution!")
return T
class IntSimplexTree:
"""The tree of branch and bound method."""
def branch_and_bound_pt(self):
"""Get an unsat proof term for self.simplex."""
if not self.branches:
solver = SimplexHOLWrapper()
solver.add_ineqs(self.simplex.original)
pt_real = solver.handle_assertion()
pt_integer = of_int_to_int(old_name(pt_real, self.intro_vars_pts), self.of_int_pts)
if self.new_ast is None:
return pt_integer
pt_integer1 = pt_integer.implies_intr(pt_integer.hyps[0])
bound = pt_integer.hyps[0].arg
bound_value = of_int(RealType)(Int(real.real_eval(bound)))
value_pt = real.real_eval_conv().get_proof_term(bound_value)
pt_integer2 = pt_integer1.on_prop(top_conv(replace_conv(value_pt.symmetric())))
assert isinstance(pt_integer2, ProofTerm)
if pt_integer.hyps[0].is_less_eq():
return pt_integer2.on_prop(arg1_conv(rewr_conv('real_of_int_leq')))
else:
return pt_integer2.on_prop(arg1_conv(rewr_conv('real_of_int_geq')))
else:
pt1, pt2 = [b.branch_and_bound_pt() for b in self.branches]
th = ProofTerm.theorem('int_geq_leq_true')
inst = matcher.first_order_match(th.lhs.arg1, pt1.prop)
pt_concl = th.substitution(inst).on_lhs(bottom_conv(integer.int_eval_conv()))
pt_conj = apply_theorem('conjI', pt1, pt2)
return pt_concl.equal_elim(pt_conj)
def old_name(pt, rename_pt):
"""convert all introduced variables to original variables."""
pt1 = functools.reduce(lambda x, y: x.implies_intr(y), pt.hyps, pt)
pt2 = pt1.on_prop(*[top_conv(replace_conv(cv)) for cv in rename_pt])
implications, _ = pt2.prop.strip_implies()
pt3 = functools.reduce(lambda x, y: x.implies_elim(ProofTerm.assume(y)), implications, pt2)
# for pt in rename_pt:
pt4 = pt3
for eq in rename_pt:
eq = eq.prop
pt4 = pt4.implies_intr(eq).forall_intr(eq.lhs).forall_elim(eq.rhs).implies_elim(ProofTerm.reflexive(eq.rhs))
return pt4
def of_int_to_int(real_simplex_result, d):
"""convert all of_int terms to integer terms"""
pt1 = real_simplex_result # a ⋈ x, ..., c ⋈ z ⊢ false
for hyp in pt1.hyps:
pt1 = pt1.implies_intr(hyp)
dd = [pt.on_lhs(top_conv(real.real_eval_conv()), bottom_conv(rewr_conv('real_mul_lid'))) for pt in d]
# pt1: ⊢ a ⋈ x ⟶ ... ⟶ c ⋈ z ⟶ false
pt2 = pt1.on_prop(*[top_conv(replace_conv(cv)) for cv in dd])
# pt2 is an integer version of pt1
implies_int_ineqs, _ = pt2.prop.strip_implies()
return functools.reduce(lambda x, y: x.implies_elim(ProofTerm.assume(y)), implies_int_ineqs, pt2)
def dest_plus(tm):
"""tm is of form x + y, return (x, y)"""
if not tm.is_plus():
return (tm,)
if not tm.arg1.is_plus():
return (tm.arg1, tm.arg)
else:
return dest_plus(tm.arg1) + (tm.arg,)
def add_atom(d, key, atom):
"""
d is a dict, add an atom to list d[key]
"""
if key not in d:
d[key] = (atom, )
else:
d[key] = tuple(d[key] + (atom, ))
return d
def is_ineq(tm):
"""check if tm is an ineq term."""
return tm.is_greater() or tm.is_greater_eq() or tm.is_less() or tm.is_less_eq()
def ineq_to_term(ineq):
"""Given an inequation, convert it to a hol term."""
assert isinstance(ineq, InEquation)
lhs_atoms = [Int(j.coeff) * Var(j.var, IntType) if j.coeff != 1 else Var(j.var, IntType) for j in ineq.jars]
lhs = sum(lhs_atoms[1:], lhs_atoms[0])
if isinstance(ineq, GreaterEq): # a * x + b * y + ... ≥ c
rhs = Int(ineq.lower_bound)
return greater_eq(RealType)(lhs, rhs)
else: # a * x + b * y + ... ≤ c
rhs = Real(ineq.upper_bound)
return less_eq(RealType)(lhs, rhs)
class SimplexHOLWrapper:
"""
Wrapper for simplex method in higher-order logic.
"""
def add_ineq(self, ineq):
"""
Take an inequation, convert it into higher-order logic terms.
Add the inequation to ineq_pts.
If necessary, introduce new variables to construct elemenatry atoms, and also
add equality proofterm to eq_pts.
"""
assert isinstance(ineq, InEquation)
lhs_atoms = [Real(j.coeff) * Var(j.var, RealType) for j in ineq.jars]
lhs = sum(lhs_atoms[1:], lhs_atoms[0])
if isinstance(ineq, GreaterEq): # a * x + b * y + ... ≥ c
rhs = Real(ineq.lower_bound)
hol_ineq = greater_eq(RealType)(lhs, rhs)
self.ineq_pts[hol_ineq] = ProofTerm.assume(hol_ineq)
else: # a * x + b * y + ... ≤ c
rhs = Real(ineq.upper_bound)
hol_ineq = less_eq(RealType)(lhs, rhs)
self.ineq_pts[hol_ineq] = ProofTerm.assume(hol_ineq)
# Add the inequation to the simplex solver.
self.simplex.add_ineq(ineq)
# Check the necessity to introduce new variables
if not (len(ineq.jars) == 1 and ineq.jars[0].coeff == 1): # need to introduce a new variable
s = Var('$'+string.ascii_lowercase[self.simplex.index - 1]+'$', RealType)
s_eq_pt = ProofTerm.assume(Eq(s, lhs))
self.eq_pts[s] = s_eq_pt
self.intro_eq.add(s_eq_pt)
# construct the inequlity proofterm for x
s_ineq_pt = ProofTerm.assume(hol_ineq).on_prop(top_conv(replace_conv(s_eq_pt.symmetric())))
self.atom_ineq_pts = add_atom(self.atom_ineq_pts, s, s_ineq_pt)
else: # directly add x ⋈ c into atom_ineq_pts
x = lhs.arg
# prove 1 * x = x
pt_x = real.real_norm_conv().get_proof_term(1 * x)
pt_atom = ProofTerm.assume(hol_ineq).on_prop(top_conv(replace_conv(pt_x)))
self.atom_ineq_pts = add_atom(self.atom_ineq_pts, x, pt_atom)
def assert_upper(self, x, upper_bound_pt):
"""
Assert x <= c. If there is already an assertion on x's upper bound,
suppose it is d, if c <= d, then apply the new assertion, otherwise
still take the old assertion.
If there is an assertion on x's lower bound, suppose it is e; If e > c,
then we can derive a direct contradiction: x <= c and x >= e is inconsistency.
"""
upper_bound = real.real_eval(upper_bound_pt.prop.arg)
# assertion = ProofTerm.assume(x <= upper_bound)
if x in self.upper_bound_pts:
old_assertion = self.upper_bound_pts[x]
old_upper_bound = real.real_eval(old_assertion.prop.arg)
if old_upper_bound >= upper_bound:
pt_less = ProofTerm('real_compare', less_eq(RealType)(Real(upper_bound), Real(old_upper_bound)))
self.upper_bound_pts[x] = apply_theorem('real_leq_comp1', upper_bound_pt, old_assertion, pt_less)
new_upper_bound = upper_bound if (old_upper_bound >= upper_bound) else old_upper_bound
else:
self.upper_bound_pts[x] = upper_bound_pt
new_upper_bound = upper_bound
# check consistency with x's lower bound
if x in self.lower_bound_pts:
lower_assertion = self.lower_bound_pts[x]
lower_bound = real.real_eval(lower_assertion.prop.arg)
if lower_bound > new_upper_bound: # incosistency
pt_up_less_low = ProofTerm('real_compare', less(RealType)(Real(new_upper_bound), Real(lower_bound)))
pt_contr = apply_theorem('real_comp_contr1', pt_up_less_low, lower_assertion, self.upper_bound_pts[x])
self.unsat[x] = self.elim_aux_vars(pt_contr)
raise AssertUpperException(str(pt_contr))
self.simplex.assert_upper(x.name, upper_bound)
def assert_lower(self, x, lower_bound_pt):
"""
Assert x >= c. If there is already an assertion on x's lower bound,
suppose it is d, if c >= d, then apply the new assertion, otherwise
still take the old assertion.
If there is an assertion on x's upper bound, suppose it is e: If e < c,
then we can derive a direct contradiction: x >= c and x <= e is inconsistency.
"""
lower_bound = real.real_eval(lower_bound_pt.prop.arg)
if x in self.lower_bound_pts:
old_assertion = self.lower_bound_pts[x]
old_lower_bound = real.real_eval(old_assertion.prop.arg)
if old_lower_bound <= lower_bound:
pt_greater = ProofTerm('real_compare', greater_eq(RealType)(Real(lower_bound), Real(old_lower_bound)))
self.lower_bound_pts[x] = apply_theorem('real_geq_comp2', old_assertion, lower_bound_pt, pt_greater)
new_lower_bound = lower_bound if (old_lower_bound <= lower_bound) else old_lower_bound
else:
self.lower_bound_pts[x] = lower_bound_pt
new_lower_bound = lower_bound
# check consistency with x's lower bound
if x in self.upper_bound_pts:
upper_assertion = self.upper_bound_pts[x]
upper_bound = real.real_eval(upper_assertion.prop.arg)
if upper_bound < new_lower_bound: # incosistency
pt_up_less_low = ProofTerm('real_compare', less(RealType)(Real(upper_bound), Real(new_lower_bound)))
pt_contr = apply_theorem('real_comp_contr1', pt_up_less_low, self.lower_bound_pts[x], upper_assertion)
self.unsat[x] = self.elim_aux_vars(pt_contr)
raise AssertLowerException(str(pt_contr))
self.simplex.assert_lower(x.name, lower_bound)
def pivot(self, xi, xj, basic_var, coeff):
"""
Pivot basic variable xi and non-basic variable xj.
"""
# Find the xj occurrence in other equalities, try to substitute it by xj's rhs.
basic_variable_xj_lhs = delete_elem(basic_var, xi.name)
basic_variable_xj_lhs = [Var(v, RealType) for v in basic_variable_xj_lhs]
a = coeff # aij
# find the equation: xi = ... + aij * xj + ...
# aij ≠ 0
pt_eq = self.eq_pts[xi]
# convert the equation to xj = ...
# use theorem: real_sub_0, real_mul
# xi - (... + aij * xj + ...) = 0
pt_right_shift = pt_eq.on_prop(rewr_conv('real_sub_0', sym=True))
# construct (xi - (... + aij * xj + ...)) * 1/aij = 0
pt_divide_aij = real.real_norm_conv().get_proof_term(Fraction(1, a) * pt_right_shift.lhs)
# normalize lhs
pt_divide_aij_norm = pt_divide_aij.on_lhs(real.real_norm_conv())
pt_eq_mul_coeff = apply_theorem('real_times_0', pt_right_shift, inst=Inst(a = Real(Fraction(1, a))))
pt_divide_aij_norm_0 = pt_divide_aij.symmetric().transitive(pt_eq_mul_coeff)
# convert to ... + (-1) * xj = 0
eq_lhs = pt_divide_aij_norm.lhs
eq_lhs_dest = dest_plus(eq_lhs)
pt_eq_lhs = real.real_norm_conv().get_proof_term(eq_lhs)
adder_except_xj = [t if t.is_times() else 1 * t for t in eq_lhs_dest]
adder_except_xj = [t for t in adder_except_xj if t.arg != xj]
eq_lhs_xj_right = sum(adder_except_xj[1:], adder_except_xj[0]) + (-1) * xj
pt_eq_lhs_xj_right = real.real_norm_conv().get_proof_term(eq_lhs_xj_right)
pt_eq_comm = ProofTerm.transitive(pt_eq_lhs, pt_eq_lhs_xj_right.symmetric())
pt_comm_eq_0 = pt_eq_comm.symmetric().transitive(pt_divide_aij_norm_0)
# xj = ... + (1/aij) * xi + ...
pt_final = pt_comm_eq_0.on_prop(rewr_conv('real_add_uminus')).symmetric()
self.eq_pts[xj] = pt_final
self.eq_pts = delete_key(self.eq_pts, xi)
# euqalities relevant to xj
for _v in basic_variable_xj_lhs:
v_lhs_eq_pt = self.eq_pts[_v]
v_lhs_eq_pt_replace_norm = v_lhs_eq_pt.on_rhs(top_conv(replace_conv(pt_final)), real.real_norm_conv())
self.eq_pts[_v] = v_lhs_eq_pt_replace_norm
def explanation(self):
"""
Explanation is the core procedure which returns an unsatisfiable proof.
"""
assert self.simplex.wrong_var is not None, "No var causes contradiction."
contr_var = Var(self.simplex.wrong_var, RealType)
unsat_clause = self.simplex.explaination(contr_var.name)
# Translate unsat clauses into HOL form.
hol_unsat_upper_bound = dict()
hol_unsat_lower_bound = dict()
for c in unsat_clause[:-1]:
if isinstance(c, geq_atom): # x >= k
var_name, lower_bound = c.var_name, c.lower
var = Var(var_name, RealType)
hol_unsat_lower_bound[var] = self.lower_bound_pts[var]
else:
var_name, upper_bound = c.var_name, c.upper
var = Var(var_name, RealType)
hol_unsat_upper_bound[var] = self.upper_bound_pts[var]
if isinstance(unsat_clause[-1], leq_atom):
# contradiction comes from contr_var's value is larger than it's upper bound.
upper_bound_pt = self.upper_bound_pts[contr_var]
ineq_atom_pts = [] # store a > 0, x >= l ⊢ a * x >= a * l term
# Get contr_var's lower bound
for var, upper_bound in hol_unsat_upper_bound.items():
# the coefficient must < 0, so coeff * upper_bound is coeff * x 's lower bound
coeff = self.simplex.aij(contr_var.name, var.name)
assert coeff < 0
pt_coeff_less_zero = ProofTerm('real_compare', less(RealType)(Real(coeff), Real(0)))
# ⊢ x <= u --> a < 0 --> a * u <= a * x
pt_lower_bound = apply_theorem('real_leq_mul_neg', upper_bound, pt_coeff_less_zero)
# pt_lower_bound_2 = ProofTerm.implies_elim(upper_bound, pt_lower_bound_1)
# pt_lower_bound_3 = ProofTerm.implies_elim(pt_coeff_less_zero, pt_lower_bound_2)
ineq_atom_pts.append(pt_lower_bound)
for var, lower_bound in hol_unsat_lower_bound.items():
# the coefficient must > 0, so coeff * lower_bound is coeff * x 's lower bound
coeff = self.simplex.aij(contr_var.name, var.name)
assert coeff > 0
pt_coeff_greater_zero = ProofTerm('real_compare', greater(RealType)(Real(coeff), Real(0)))
# ⊢ x >= l --> a > 0 --> a * l <= a * x
pt_lower_bound = apply_theorem('real_geq_mul_pos', lower_bound, pt_coeff_greater_zero)
# pt_lower_bound_2 = ProofTerm.implies_elim(lower_bound, pt_lower_bound_1)
# pt_lower_bound_3 = ProofTerm.implies_elim(pt_coeff_greater_zero, pt_lower_bound_2)
ineq_atom_pts.append(pt_lower_bound)
# sum contr var atom lower bound to get the total lower bound
# a < b --> c < d --> a + c < b + d
sum_pt = ineq_atom_pts[0]
for pt in ineq_atom_pts[1:]:
sum_pt = apply_theorem('real_leq_pair_plus', sum_pt, pt)
# combine above pts
pt_norm_contr_var_rhs = self.eq_pts[contr_var].on_rhs(real.real_norm_conv()).symmetric()
pt_norm_sum_rhs = sum_pt.on_prop(arg_conv(real.real_norm_conv()))
pt_comb = pt_norm_sum_rhs.on_prop(top_conv(replace_conv(pt_norm_contr_var_rhs)), arg1_conv(real.real_eval_conv()))
# after we get contr_var's lower bound(lb), we get lb > β(contr_var), but β(contr_var) > contr_var's upper bound,
# so we could deriv a contradiction
lower_bound_value = pt_comb.prop.arg1
upper_bound_pt = self.upper_bound_pts[contr_var]
upper_bound_value = upper_bound_pt.prop.arg
pt_upper_less_lower = ProofTerm('real_compare', upper_bound_value < lower_bound_value)
pt_concl = self.elim_aux_vars(apply_theorem('real_comp_contr2', pt_upper_less_lower, pt_comb, upper_bound_pt))
self.unsat[contr_var] = pt_concl
else:
# contradiction comes from contr_var's value is less than it's lower bound.
lower_bound_pt = self.lower_bound_pts[contr_var]
ineq_atom_pts = [] # store like a < 0, x >= l ⊢ a * x <= a * l term
# Get contr_var's upper bound
for var, upper_bound in hol_unsat_upper_bound.items():
# the coefficient must > 0, so coeff * upper_bound is coeff * x 's upper bound
coeff = self.simplex.aij(contr_var.name, var.name)
assert coeff > 0
pt_coeff_greater_zero = ProofTerm('real_compare', greater(RealType)(Real(coeff), Real(0)))
# ⊢ x <= u --> a > 0 --> a * x <= a * u
pt_upper_bound = apply_theorem('real_leq_mul_pos', upper_bound, pt_coeff_greater_zero)
ineq_atom_pts.append(pt_upper_bound)
for var, lower_bound in hol_unsat_lower_bound.items():
# the coefficient must < 0, so coeff * lower_bound is coeff * x 's upper bound
coeff = self.simplex.aij(contr_var.name, var.name)
assert coeff < 0
pt_coeff_greater_zero = ProofTerm('real_compare', less(RealType)(Real(coeff), Real(0)))
# ⊢ x >= l --> a < 0 --> a * x <= a * l
pt_lower_bound = apply_theorem('real_geq_mul_less', lower_bound, pt_coeff_greater_zero)
ineq_atom_pts.append(pt_lower_bound)
# sum contr var atom upper bound to get the total upper bound
# a < b --> c < d --> a + c < b + d
sum_pt = ineq_atom_pts[0]
for pt in ineq_atom_pts[1:]:
sum_pt = apply_theorem('real_leq_pair_plus', sum_pt, pt)
# combine above pts
pt_norm_contr_var_rhs = self.eq_pts[contr_var].on_rhs(real.real_norm_conv()).symmetric()
pt_norm_sum_rhs = sum_pt.on_prop(arg1_conv(real.real_norm_conv()))
pt_comb = pt_norm_sum_rhs.on_prop(top_conv(replace_conv(pt_norm_contr_var_rhs)), arg_conv(real.real_eval_conv()))
# after we get contr_var's upper bound(ub), we get lb > β(contr_var), but β(contr_var) > contr_var's upper bound,
# so we could deriv a contradiction
upper_bound_value = pt_comb.prop.arg
lower_bound_pt = self.lower_bound_pts[contr_var]
lower_bound_value = lower_bound_pt.prop.arg
pt_upper_less_lower = ProofTerm('real_compare', upper_bound_value < lower_bound_value)
pt_concl = self.elim_aux_vars(apply_theorem('real_comp_contr1', pt_upper_less_lower, lower_bound_pt, pt_comb))
self.unsat[contr_var] = pt_concl
return self.normalize_conflict_pt(pt_concl)
def normalize_conflict_pt(self, pt_concl):
"""
Convert all x to 1 * x in the UNSAT proof term.
"""
# rewrite 1 * x to x in hyps
for hyp in pt_concl.hyps:
pt_concl = pt_concl.implies_intr(hyp)
pt_concl = pt_concl.on_prop(bottom_conv(rewr_conv('real_mul_lid')))
imps, _ = pt_concl.prop.strip_implies()
for ii in imps:
pt_concl = pt_concl.implies_elim(ProofTerm.assume(ii))
return pt_concl
def handle_assertion(self):
"""
Assert each atom assertion, either get a bound or raise a contradiction.
"""
for var, asts in self.atom_ineq_pts.items():
for ast in asts:
try:
if ast.prop.is_less_eq():
self.assert_upper(var, ast)
else:
self.assert_lower(var, ast)
except (AssertLowerException, AssertUpperException):
return self.normalize_conflict_pt(self.unsat[var])
# if var.name in self.simplex.basic:
# check
if self.simplex.check() == UNSAT:
trace = self.simplex.trace
# print("trace: ", trace)
# print("self", self)
# print("self.simplex: ", self.simplex)
# print("wrong_var: ", self.simplex.wrong_var)
for xij, coeff, basic_var in trace:
xi, xj = xij
self.pivot(Var(xi, RealType), Var(xj, RealType), basic_var, coeff)
return self.normalize_conflict_pt(self.explanation())
raise UNSATException("%s" % str(self.unsat[Var(self.simplex.wrong_var, RealType)]))
return self.simplex.mapping
def term_to_ineq(tms):
"""Convert a list inequalities into a tableau."""
vs = dict()
i = 0
tableau = []
new_tms = [] # store the HOL form of standard tableau
for tm in tms:
summands = [(real.real_eval(t.arg1), t.arg) if t.is_times() else (1, t) for t in dest_plus(tm.arg1)]
line = []
for coeff, v in summands:
if v not in vs:
new_var = "x_" + str(i)
i += 1
vs[v] = new_var
line.append(Jar(coeff, new_var))
else:
line.append(Jar(coeff, vs[v]))
bound = real.real_eval(tm.arg)
left_parts = [jar.coeff * Var(jar.var, RealType) if jar.coeff != 1 else Var(jar.var, RealType) for jar in line]
hol_sum = sum(left_parts[1:], left_parts[0])
if tm.is_less_eq():
tableau.append(LessEq(line, bound))
new_tms.append(hol_sum <= bound)
elif tm.is_greater_eq():
tableau.append(GreaterEq(line, bound))
new_tms.append(hol_sum >= bound)
else:
raise NotImplementedError
return tableau, new_tms, {Var(value, RealType): key for key, value in vs.items()}
@register_macro("simplex_macro")
@register_macro("integer_simplex") | [
37811,
198,
6425,
326,
262,
10537,
8633,
287,
3184,
11141,
1366,
4645,
460,
307,
27009,
416,
1288,
1920,
262,
17379,
3025,
35381,
198,
271,
6632,
13,
770,
481,
307,
5969,
1568,
13,
198,
37811,
198,
198,
37811,
198,
3546,
32851,
286,
3... | 1.931749 | 20,410 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.sites.models import Site
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
| [
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,
13,
49315,
13,
27530,
1330,
14413,
198,
6738,
42625,
14208,
13,
... | 3.108108 | 74 |
#%%
import torch
# def se3_norm2(output, label):
#Fill me
| [
2,
16626,
198,
11748,
28034,
628,
220,
220,
220,
220,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
825,
384,
18,
62,
27237,
17,
7,
22915,
11,
6167,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
33762,
502,
628
] | 1.906977 | 43 |
import os
from cms.plugin_pool import plugin_pool
from cms.plugin_base import CMSPluginBase
from django.utils.translation import ugettext_lazy as _
import models
from django.conf import settings
from filer.settings import FILER_ADMIN_ICON_SIZES, FILER_PUBLICMEDIA_PREFIX, FILER_PRIVATEMEDIA_PREFIX, FILER_STATICMEDIA_PREFIX
plugin_pool.register_plugin(FilerImagePlugin)
| [
11748,
28686,
198,
6738,
269,
907,
13,
33803,
62,
7742,
1330,
13877,
62,
7742,
198,
6738,
269,
907,
13,
33803,
62,
8692,
1330,
40773,
37233,
14881,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
3... | 2.92126 | 127 |
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from finance.views import company_article_list, ChartData, dash, dash_ajax
app_name = 'finance'
urlpatterns = [
path('companies/', company_article_list, name='companies'),
path('api/chart/data/', ChartData.as_view(), name='api-chart-data'),
path('dash/', dash),
path('_dash', dash_ajax),
]
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL,
document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL,
document_root=settings.MEDIA_ROOT)
| [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12708,
1330,
9037,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
198,
... | 2.546125 | 271 |
# 抓取二进制数据
import requests
import sys
import io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8') # Change default encoding to utf8
r=requests.get('http://github.com/favicon.ico')
print(r.text)
print(r.content)
with open('favicon.ico','wb') as f:
f.write(r.content)
| [
2,
10545,
232,
241,
20998,
244,
12859,
234,
32573,
249,
26344,
35050,
243,
108,
162,
235,
106,
198,
11748,
7007,
198,
11748,
25064,
198,
11748,
33245,
198,
17597,
13,
19282,
448,
796,
33245,
13,
8206,
40,
3913,
430,
2848,
7,
17597,
13... | 2.308943 | 123 |
from django.urls import path
from django.contrib.auth.views import (
LoginView,
LogoutView,
PasswordResetView,
PasswordResetDoneView,
PasswordResetConfirmView,
PasswordResetCompleteView,
)
from . import views as accounts_view
app_name = "accounts"
urlpatterns = [
path("login/", LoginView.as_view(
template_name="accounts/login.html"),
name="login"),
path("logout/", LogoutView.as_view(
template_name="accounts/logout.html"),
name="logout"),
path("register/", accounts_view.register, name="register"),
path("user_profile/", accounts_view.user_profile, name="user_profile"),
path("user_profile/edit/",
accounts_view.edit_user_profile,
name="edit_user_profile"),
path("change-password/",
accounts_view.change_password,
name="change_password"),
path("reset-password/",
PasswordResetView.as_view(
template_name="accounts/password_reset.html"),
name="password_reset"),
path("reset-password/done/",
PasswordResetDoneView.as_view(),
name="password_reset_done"),
path("reset-password/confirm/<uidb64><token>/",
PasswordResetConfirmView.as_view(),
name="password_reset_confirm"),
path("reset-password/complete/",
PasswordResetCompleteView.as_view(),
name="password_reset_complete"),
]
| [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
33571,
1330,
357,
198,
220,
220,
220,
23093,
7680,
11,
198,
220,
220,
220,
5972,
448,
7680,
11,
198,
220,
220,
220,
30275,
4965,
31... | 2.48474 | 557 |
# @l2g 1855 python3
# [1855] Maximum Distance Between a Pair of Values
# Difficulty: Medium
# https://leetcode.com/problems/maximum-distance-between-a-pair-of-values
#
# You are given two non-increasing 0-indexed integer arrays nums1 and nums2.
# A pair of indices (i,j),where 0 <= i < nums1.length and 0 <= j < nums2.length,
# is valid if both i <= j and nums1[i] <= nums2[j].The distance of the pair is j - i.
# Return the maximum distance of any valid pair (i, j). If there are no valid pairs, return 0.
# An array arr is non-increasing if arr[i-1] >= arr[i] for every 1 <= i < arr.length.
#
# Example 1:
#
# Input: nums1 = [55,30,5,4,2], nums2 = [100,20,10,10,5]
# Output: 2
# Explanation: The valid pairs are (0,0), (2,2), (2,3), (2,4), (3,3), (3,4), and (4,4).
# The maximum distance is 2 with pair (2,4).
#
# Example 2:
#
# Input: nums1 = [2,2,2], nums2 = [10,10,1]
# Output: 1
# Explanation: The valid pairs are (0,0), (0,1), and (1,1).
# The maximum distance is 1 with pair (0,1).
#
# Example 3:
#
# Input: nums1 = [30,29,19,5], nums2 = [25,25,25,25,25]
# Output: 2
# Explanation: The valid pairs are (2,2), (2,3), (2,4), (3,3), and (3,4).
# The maximum distance is 2 with pair (2,4).
#
# Example 4:
#
# Input: nums1 = [5,4], nums2 = [3,2]
# Output: 0
# Explanation: There are no valid pairs, so return 0.
#
#
# Constraints:
#
# 1 <= nums1.length <= 10^5
# 1 <= nums2.length <= 10^5
# 1 <= nums1[i], nums2[j] <= 10^5
# Both nums1 and nums2 are non-increasing.
#
#
from typing import List
if __name__ == "__main__":
import os
import pytest
pytest.main([os.path.join("tests", "test_1855.py")])
| [
2,
2488,
75,
17,
70,
1248,
2816,
21015,
18,
198,
2,
685,
1507,
2816,
60,
22246,
34600,
14307,
257,
39645,
286,
27068,
198,
2,
27419,
25,
13398,
198,
2,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
47033,
12,
30246,
12... | 2.422222 | 675 |
#!/usr/bin/python
# (c) 2017, Giuseppe Pellegrino <mr.giuseppepellegrino@gmail.com>
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: rabbitmq_cluster_name
short_description: Ensure RabbitMQ cluster name is set
description:
- Ensure RabbitMQ cluster name is equal to the name passed
requirements: [ "requests >= 1.0.0" ]
author: '"Giuseppe Pellegrino @joe-pll"'
options:
login_host:
description:
- The RabbitMQ REST API endpoint host
required: false
default: localhost
login_port:
description:
- The RabbitMQ REST API endpoint port
required: false
default: 15672
login_user:
description:
- The user to authenticate with in RabbitMQ
default: guest
required: false
login_password:
description:
- The password of the user that authenticate in RabbitMQ
default: guest
required: false
required: false
name:
description:
- The name of the cluster
required: true
default: null
ssl_enabled:
description:
- Whether or not RabbitMQ is listening on HTTPS
default: false
required: false
ssl_verify:
description:
- Whether or not there must be a SSL certificate verification
'''
EXAMPLES = '''
# Ensure that the cluster name is 'testcluster'
- rabbitmq_cluster_name:
login_host: rabbitmq.example.com
login_user: myuser
login_password: mypassword
name: testcluster
'''
import urllib
from ansible.module_utils.rabbitmq_common import RabbitMQ
def main():
"""Call the RabbitMQQueue module."""
RabbitMQClusterName()
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
2,
357,
66,
8,
2177,
11,
8118,
1904,
27768,
12903,
1455,
81,
2879,
1279,
43395,
13,
12397,
1904,
381,
538,
417,
1455,
81,
2879,
31,
14816,
13,
785,
29,
198,
198,
15037,
34563,
62,
47... | 2.674383 | 648 |
n=int(input())
i = 1
alllist = []
while i < n+1 :
a,b=map(str, input().split())
c = [a ,int(b),i]
alllist.append(c)
i += 1
alllist.sort(key=lambda x:(x[0],-x[1]),reverse=True)
alllist.reverse()
j = 0
while j < n :
print(alllist[j][2])
j += 1 | [
77,
28,
600,
7,
15414,
28955,
198,
72,
796,
352,
198,
282,
297,
396,
796,
17635,
198,
4514,
1312,
1279,
299,
10,
16,
1058,
198,
220,
257,
11,
65,
28,
8899,
7,
2536,
11,
5128,
22446,
35312,
28955,
198,
220,
269,
796,
685,
64,
837... | 2.040323 | 124 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function, division, absolute_import
from belt.models import GisTimeStampedModel
from django.contrib.gis.db import models
from django.utils.encoding import python_2_unicode_compatible
from gis_timezones.managers import TimeZoneManager
@python_2_unicode_compatible
class TimeZone(GisTimeStampedModel):
"""TimeZone GIS model, to obtain the timezone name using
the a pair of coordinates.
"""
name = models.CharField(max_length=250)
shape = models.GeometryField()
objects = TimeZoneManager()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
11,
3601,
62,
8818,
11,
7297,
11,
4112,
62,
11748,
198,
198,
6738,
10999,
13,
27530,
1330,
402,
271,
7575,
... | 3.078534 | 191 |
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 17 12:11:13 2020
@author: Jin Dou
"""
import os
import warnings
from configparser import ConfigParser,BasicInterpolation
import yaml
import re
def isFolderOrFile(path:str):
'''
not exist 0
dir 1
file 2
others -1
'''
out = -1
if checkExists(path):
if os.path.isdir(path):
out = 1
elif os.path.isfile(path):
out = 2
else:
out = 0
return out
# print(dir_1,config.get(conf_name, dir_1))
#%% New Path Config Module
yaml.add_constructor('!cat', cat)
# self.__dict__.update(self.YamlNodes)
# self.__dict__.update(self.YamlNodes)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
7653,
1596,
1105,
25,
1157,
25,
1485,
12131,
198,
198,
31,
9800,
25,
17297,
5728,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
14601,
19... | 1.970588 | 374 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
# coding: utf-8
from poyonga import Groonga
g = Groonga()
_call_with_apachearrow(
g,
"select",
table="Users",
match_columns="name,location_str,description",
query="東京",
output_type="apache-arrow",
output_columns="_key,name",
)
# NOTE: Groonga's Apache Arrow output doesn't support drilldowns yet
_call_with_apachearrow(
g,
"select",
table="Comments",
filter="last_modified<=1268802000",
output_columns="posted_by.name,comment,last_modified",
output_type="apache-arrow",
drilldown="hash_tags,posted_by",
drilldown_output_column="_id",
)
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
6738,
279,
726,
44294,
1330,
10299,
44294,
628,
198,
198,
70,
796,
10299,
44294,
3419,
198,
198,
62,
13345,
62,
4480,
62,
43073,
6018,
7,
198,
220,
220,
220,
308,
11,
198,
220,
220,
220,
366,
... | 2.52521 | 238 |
solver = Solution()
print(solver.reverseWords2("the sky is blue")) | [
198,
82,
14375,
796,
28186,
3419,
198,
4798,
7,
82,
14375,
13,
50188,
37117,
17,
7203,
1169,
6766,
318,
4171,
48774
] | 3.190476 | 21 |
import flax.nn as nn
import jax.numpy as jnp
def weight_standardize(w, axis, eps):
"""Subtracts mean and divides by standard deviation."""
w = w - jnp.mean(w, axis=axis)
w = w / (jnp.std(w, axis=axis) + eps)
return w
class StdConv(nn.Conv):
"""Convolution with weight standardization."""
class ResidualUnit(nn.Module):
"""Bottleneck ResNet block."""
class ResNetStage(nn.Module):
"""A ResNet stage."""
| [
11748,
781,
897,
13,
20471,
355,
299,
77,
198,
11748,
474,
897,
13,
77,
32152,
355,
474,
37659,
628,
198,
4299,
3463,
62,
20307,
1096,
7,
86,
11,
16488,
11,
304,
862,
2599,
198,
220,
37227,
7004,
83,
974,
82,
1612,
290,
36319,
416... | 2.666667 | 159 |
obj=car()
obj .speed=200
obj.display() | [
26801,
28,
7718,
3419,
198,
26801,
764,
12287,
28,
2167,
198,
26801,
13,
13812,
3419
] | 2.533333 | 15 |
from __future__ import print_function
import json
import keras
from keras.datasets import mnist
from keras.layers import Dense, Dropout
from keras.models import Sequential
from keras.optimizers import RMSprop
from abstract_competition import AbstractCompetition
class MnistKerasDnn(AbstractCompetition):
"""
Deep neural network model in Keras.
"""
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
33918,
198,
198,
11748,
41927,
292,
198,
6738,
41927,
292,
13,
19608,
292,
1039,
1330,
285,
77,
396,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
360,
1072,
11,
14258,
448,... | 3.419048 | 105 |
# flake8: noqa: F401
from .IsoFile import IsoFile
from .DVDIndexers import DVDIndexer, D2VWitch, DGIndexNV, DGIndex
from .dataclasses import *
from .utils.spathlib import SPath
from .utils import spathlib, types, utils | [
2,
781,
539,
23,
25,
645,
20402,
25,
376,
21844,
198,
198,
6738,
764,
40,
568,
8979,
1330,
314,
568,
8979,
198,
198,
6738,
764,
39218,
15732,
364,
1330,
12490,
15732,
263,
11,
360,
17,
30133,
2007,
11,
46133,
15732,
27159,
11,
46133... | 2.846154 | 78 |
from aws_cdk import (core )
from .ingestion_stack import IngestionStack
from .data_store_stack import DataStoreStack
| [
6738,
3253,
82,
62,
10210,
74,
1330,
357,
7295,
1267,
198,
198,
6738,
764,
278,
395,
295,
62,
25558,
1330,
554,
3495,
295,
25896,
198,
6738,
764,
7890,
62,
8095,
62,
25558,
1330,
6060,
22658,
25896,
198
] | 3.189189 | 37 |
from tracardi.domain.event import Event
from tracardi.domain.payload.tracker_payload import TrackerPayload
from tracardi.domain.profile import Profile
from tracardi.service.notation.dot_accessor import DotAccessor
from tracardi.service.plugin.domain.console import Console
| [
6738,
491,
330,
22490,
13,
27830,
13,
15596,
1330,
8558,
198,
6738,
491,
330,
22490,
13,
27830,
13,
15577,
2220,
13,
2213,
10735,
62,
15577,
2220,
1330,
26885,
19197,
2220,
198,
6738,
491,
330,
22490,
13,
27830,
13,
13317,
1330,
13118,
... | 3.653333 | 75 |
# Copyright 2018-2019 The Van Valen Lab at the California Institute of
# Technology (Caltech), with support from the Paul Allen Family Foundation,
# Google, & National Institutes of Health (NIH) under Grant U24CA224309-01.
# All rights reserved.
#
# Licensed under a modified 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.github.com/vanvalenlab/Caliban/LICENSE
#
# The Work provided may be used for non-commercial academic purposes only.
# For any other use of the Work, including commercial use, please contact:
# vanvalenlab@gmail.com
#
# Neither the name of Caltech nor the names of its contributors may be used
# to endorse or promote products derived from this software without specific
# prior written permission.
#
# 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.
# ==============================================================================
"""Select different render modes."""
| [
2,
15069,
2864,
12,
23344,
383,
6656,
3254,
268,
3498,
379,
262,
3442,
5136,
286,
198,
2,
8987,
357,
9771,
13670,
828,
351,
1104,
422,
262,
3362,
9659,
7884,
5693,
11,
198,
2,
3012,
11,
1222,
2351,
33656,
286,
3893,
357,
22125,
39,
... | 4.262458 | 301 |
from turtle import Turtle
| [
6738,
28699,
1330,
33137,
628
] | 5.4 | 5 |
import cv2
import glob
import numpy as np
# from utils import salva_imagem_com_predicao
import pandas as pd
import matplotlib.pyplot as plt
from skimage import transform
from PIL import Image
import os
X = []
y = []
arquivos_de_gatos = "train/cat/"
arquivos_nao_gatos = "train/noncat/"
get_dataset(arquivos_de_gatos)
get_dataset(arquivos_nao_gatos, False)
X = np.asarray(X)
Y = np.asarray(y)
print(X.shape)
print(Y.shape)
m, n = X.shape
X = X/255
print(m, n)
X = np.hstack((np.ones((m, 1)), X))
print(X.shape)
initial_theta = np.zeros(n+1)
# Compute and display initial cost and gradient.
cost = cost_function(initial_theta, X, Y)
grad = gradient(initial_theta, X, y)
print("Cost at initial theta (zeros): {}".format(cost))
# print("Expected cost (approx): 0.693")
print("Gradient at initial theta (zeros):")
print(grad)
it = 0
for i in X:
prob = sigmoid(i).dot(initial_theta)
print("Predicted: {}, Truth: {}".format(prob, y[it]))
it += 1
# Calculate accuracy of the algorithm on the training set.
p = predict(X, initial_theta)
print('Train Accuracy: {}'.format(np.mean((p == y)) * 100))
| [
11748,
269,
85,
17,
198,
11748,
15095,
198,
11748,
299,
32152,
355,
45941,
198,
2,
422,
3384,
4487,
1330,
3664,
6862,
62,
48466,
368,
62,
785,
62,
28764,
3970,
78,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
... | 2.471239 | 452 |
from typing import List
from aspen.api.schemas.base import BaseResponse
| [
6738,
19720,
1330,
7343,
198,
198,
6738,
355,
3617,
13,
15042,
13,
1416,
4411,
292,
13,
8692,
1330,
7308,
31077,
628,
628
] | 3.454545 | 22 |
Mein neuer Code
neue Codezeile
| [
5308,
259,
497,
15573,
6127,
198,
198,
710,
518,
6127,
2736,
576,
198
] | 2.461538 | 13 |
# -*- coding: UTF-8 -*-
"""
leetcode:1371.每个元音包含偶数次的最长子字符串
"""
| [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
37811,
198,
293,
316,
8189,
25,
1485,
4869,
13,
162,
107,
237,
10310,
103,
17739,
225,
165,
253,
111,
44293,
227,
28938,
104,
161,
223,
35050,
243,
108,
162,
105,
94,
214... | 1.04918 | 61 |
from __future__ import print_function
import re
import sys
STRING_INPUT_LABEL = "(string)"
class AllocationsConfig( object ):
"""
"""
def __init__( self, default_year=None, strict_parsing=False, validate_dates=True ):
"""
"""
self._default_year = default_year
self._strict_parsing = strict_parsing
self._validate_dates = validate_dates
def defaults():
"""
"""
return AllocationsConfig()
def get( self, key ):
"""
"""
if key == "default_year":
return self._default_year
elif key == "strict_parsing":
return self._strict_parsing
elif key == "validate_dates":
return self._validate_dates
else:
return KeyError( "Unknown key ({:s})".format( key ) )
def from_file( file_name ):
"""
"""
def to_file( self, file_file ):
"""
"""
class Allocations( object ):
"""
"""
FILTER_TYPE_EXCLUDE = "exclude"
FILTER_TYPE_INCLUDE = "include"
# patterns for date-like and allocation-like lines. used to determine
# whether the parser should complain about a line that it didn't parse or
# not.
#
# potential dates roughly match "<weekday> <digit>/<digit>" with deletions
# of each sub-component. potential allocations *roughly* match
# "<category>:.*<unit>" while trying taking into account the myriad of ways
# cut and paste could result in an allocation that should be flagged while
# ignoring commonly used divider/comment/formatting lines.
# XXX: handle just <month>/<date>
potential_date_pattern = re.compile( r"^(" +
r"(\w+\s+)?\d+\s*/\s*\d+" + r"|" + # optional weekday, with month/date (possibly whitespace padded)
r"\w+\s+(\d+/\s*|\s*/\d+)" + # weekday with month or date, but not both (possibly whitespace padded)
r")$" )
# XXX: describe these one per line
potential_allocation_pattern = re.compile( r"^(" +
r"[^:]*:\s+([^:]*((hour|hr)s?)?)?" + r"|" + # category/subcategories with duration (possibly invalid) and units
r".*\d+(\.\d*)? (hour|hr)s?" + # anything with a duration and units at the end
r")$",
flags=re.IGNORECASE )
# accept integral and fractional, positive durations.
#
# NOTE: the order of this expression matters. the longest possible match
# for fractional durations who are integral (e.g. 1.0) need to match
# before the integral values (e.g. 1) so the end of string anchor can
# match. otherwise, this will fail to match valid strings like "10.0"
# as the "10" prefix is matched, but the trailing ".0" fails against
# the anchor.
#
valid_duration_pattern = re.compile( r"^(" +
"[1-9]\d*\.\d*" + r"|" # fractional values that are at least as big as 1.0
"(0?\.0*)?[1-9]\d*" + # fractional values in (0.0, 1.0] (with optional leading zero, and integers
r")$" )
# match the category and all nested sub-categories into groups #1 and #3.
# group #2 represents all of the nested sub-categories along with enclosing
# parentheses.
valid_categories_pattern = re.compile( r"^([^()]+)(\((.*)\))?$" )
def __init__( self, file_like=None, configuration=None ):
# XXX: factor this out into a parse routine so additional fragments can
# be consumed by the object.
"""
strict_parsing - Optional flag specifying whether parsing should fail if an invalid
line is encountered. If True, invalid lines cause parsing to fail
with an ValueError exception. Otherwise, invalid lines cause a warning to
be logged to standard error and the internal error count incremented.
If omitted, defaults to False.
validate_dates - Optional
default_year - Optional
"""
if configuration is None:
configuration = AllocationsConfig.defaults()
self._configuration = configuration
# XXX
self._current_year = configuration.get( "default_year" )
# determines how improperly formatted lines are handled. exceptions are
# raised when strictness is requested, warnings on standard error
# otherwise.
self._strict_parsing = configuration.get( "strict_parsing" )
# reset the allocations.
self.clear()
if file_like is not None:
self.parse( file_like )
# we don't care about the status returned. either we threw an exception
# and didn't fully construct an object, or we've complained and the
# caller can check a non-zero number of errors that have accumulated.
def _raise_parse_error( self, source_string, line_number, error_string, parsed_line ):
"""
Raises or logs a parse error depending on whether strict parsing was requested.
If strict parsing was requested, a ValueError is raised, otherwise the error is
logged to standard error. In either case the error message is of the form:
<allocations source>:<line number> <error message> (<parsed line>)
Takes 5 arguments:
self - Allocations object that encountered an error.
source_string - String specifying the source of the error encountered.
line_number - Line number of source_string where the parse error occurred.
error_string - Error message describing the parse error.
parsed_line - Input line that generated the parse error.
Returns nothing.
"""
formatted_error = "{:s}:{:d} - {:s} (\"{:s}\")".format(
source_string,
line_number,
error_string,
parsed_line )
# raise or print depending on how retentive we've been configured.
if self._strict_parsing is True:
raise ValueError( formatted_error )
else:
print( formatted_error, file=sys.stderr )
def _is_valid_date( date_string, year=None ):
"""
Validates a date string is well formed, optionally verifying that it is a real
date. The supplied date string must be of the form:
<weekday> <month>/<date>
Where <weekday> must be one of "Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", or "Saturday". Note that <weekday> must be capitalized.
If the caller wants to verify the date string is valid, then <date> must
be a valid date for <month> for the supplied year and <weekday> must
be correct for the supplied <month>/<date> combination. Otherwise <date>
must be a valid date for <month> in a leap year and it does not matter if
<weekday> agrees.
Takes 2 arguments:
date_string - String containing a weekday, month, and date to validate for
well formedness.
year - Optional integer specifying the year to use when validating
date_string. If omitted, defaults to None and date_string
is not verified to be consistent with a particular year.
Returns 2 values:
status - Boolean specifying whether date_string is valid or not.
error_message - A message indicating why date_string is invalid when status
is False. Empty otherwise.
"""
weekdays = ["Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"]
# break the date into weekday and numeric month and day so we can
# validate each.
#
# NOTE: this implicitly ignores repeated whitespace between the weekday
# and month/day string.
#
try:
weekday, month_date_string = date_string.split()
except ValueError:
return (False, "Date is not well formed")
# make sure the weekday is known.
if weekday not in weekdays:
return (False, "Invalid weekday in date ({:s})".format( weekday ))
# ensure we have a numeric month and date.
try:
month, date = list( map( int, month_date_string.split( "/" ) ) )
except ValueError:
return (False,
"Date is not well formed".format( date_string ))
# validate the month/date is valid without knowing the year.
# we assume that leap dates are okay here.
if month in [1, 3, 5, 7, 8, 10, 12]:
if not (1 <= date <= 31):
return (False, "Date is invalid ({:d}/{:d})".format( month, date ))
elif month in [4, 6, 9, 11]:
if not (1 <= date <= 30):
return (False, "Date is invalid ({:d}/{:d})".format( month, date ))
elif month == 2:
if not (1 <= date <= 29):
return (False, "Date is invalid ({:d}/{:d})".format( month, date ))
else:
return (False, "Month is invalid ({:d})".format( month ))
# verify the weekday matches the date provided for the given year.
if year is not None:
return (False, "XXX")
return (True, "")
def _looks_like_date( date_string ):
"""
"""
return Allocations.potential_date_pattern.match( date_string )
def _is_valid_allocation( allocation_string ):
"""
Validates an allocation string is well formed. The supplied allocation must be
of the form:
<category>[ (<sub-category>[ (...)])]: <duration> hours
Where <category> is a free-form string that doesn't contain parentheses.
<sub-category>'s are optional and may be nested arbitrarily. <duration>
is a positive integer or floating point value.
Takes 1 argument:
allocation_string - String containing an allocation to validate for
well formedness.
Returns 2 values:
status - Boolean specifying whether allocation_string is valid or not.
error_message - A message indicating why allocation_string is invalid when status
is False. Empty otherwise.
"""
try:
# break the allocation at the colon and verify we have a category
# and a duration. trim leading and trailing whitespace from each
# component so we normalize category names.
#
# NOTE: we filter out empty strings since a non-default separator
# does not automatically do that for us.
#
categories_string, duration_string = list( map( lambda x: x.strip(),
filter( lambda x: len( x ) > 0,
allocation_string.split( ":" ) ) ) )
except ValueError:
return (False, "Allocation is not well formed")
try:
time_string, units_string = duration_string.split()
except ValueError:
return (False, "Allocation is missing units")
# we currently only support time in hours.
if units_string.lower() not in ["hour", "hours"]:
return (False, "Allocation has wrong units - expected \"hours\" but received \"{:s}\"".format(
units_string ))
# verify we got a positive time.
if not Allocations.valid_duration_pattern.match( time_string ):
return (False, "Allocation has invalid duration")
# our regular expression should pull a subset of floating point values
# that we're willing to accept. make sure it hasn't accidentally
# admitted something that isn't a valid floating point.
try:
float( time_string )
except ValueError:
return (False, "Allocation has invalid duration")
# catch an empty category without sub-categories.
if len( categories_string ) == 0:
return (False, "Allocation has an empty category")
# our duration is sensible, now verify that we've only got nested
# sub-categories. verify our parentheses are balanced and follow
# a monotonic increase in opens and then monotonically increase in
# closes (aka decreases in opens).
parentheses_count = 0
maximum_count = 0
for character in categories_string:
if character == "(":
# an open parenthesis after we've closed at least one pair
# means that this isn't a nested sub-category, but rather
# a second sub-category at a particular nesting level.
if maximum_count > parentheses_count:
return (False, "Allocation has multiple sub-categories")
parentheses_count += 1
maximum_count += 1
elif character == ")":
parentheses_count -= 1
if parentheses_count < 0:
if maximum_count == 0:
return (False, "Allocation has a closing parenthesis without an open")
else:
return (False, "Allocation has too many closing parentheses")
# do we have an open parenthesis that was not closed along the way?
if parentheses_count != 0:
return (False, "Allocation has an unmatched open parenthesis")
# do we have well-formed sub-categories and an empty category?
if maximum_count > 0 and categories_string.find( "(" ) == 0:
return (False, "Allocation has an empty category")
# if there were no sub-categories, we're good.
if maximum_count == 0:
return (True, "")
# check that all of the sub-categories are non-empty. iterate through
# the first N - 1 nested sub-categories and examine the distance between
# open parentheses. then look at the last sub-category and examine
# the distance between the open and close. if any of those are adjacent
# to each other (after ignoring whitespace), then we have an empty
# sub-category.
open_index = categories_string.find( "(" )
target_character = "("
for nesting_index in range( maximum_count ):
# our last iteration looks for a closing parenthesis.
if nesting_index == (maximum_count - 1):
target_character = ")"
# compute the number of characters from this open parenthesis to
# its successor. note that we avoid computing the offset as that
# introduces too many "+ 1"s in the indexing below.
close_distance = categories_string[open_index+1:].find( target_character ) + 1
close_index = open_index + close_distance
if( close_distance == 1 or
categories_string[open_index+1:close_index].isspace()):
return (False, "Allocation has an empty sub-category (nesting level {:d})".format( nesting_index + 1 ) )
open_index += close_distance
# all of the sub-categories are non-empty.
return (True, "")
def _looks_like_allocation( allocation_string ):
"""
"""
return Allocations.potential_allocation_pattern.match( allocation_string )
def _record_allocation( self, date_string, allocation_string ):
"""
"""
# XXX: move to a better place?
def _parse_allocation( allocation_string ):
"""
Decomposes an allocation string into a tuple of categories and the allocation's
duration. The allocation string is assumed to be valid and well-formed according
to _is_valid_allocation().
Takes 1 argument:
allocation_string -
Returns 2 values:
categories_list - Tuple of nested categories in the allocation.
Each entry in the categories tuple corresponds
to the nesting level it was found at. That is,
categories[4] corresponds to the
sub-sub-sub-category.
duration - Floating point duration for the allocation.
"""
#
# NOTE: we return a tuple of categories for two reasons. one, it is
# an immutable characteristic of the allocation. two, to make
# conversion to a Pandas DataFrame easier.
#
# decompose our allocation into categories and duration.
#
# NOTE: assume the allocation is of the form:
#
# <category>[ (<subcategory>[ (...)])]: X.Y hours
#
categories_string, duration_string = allocation_string.split( ":" )
duration = float( duration_string.split()[0] )
# walk through the string and extract each nested category one at a
# time. we build a list we'll construct a tuple from
categories_list = []
while categories_string is not None:
matches = Allocations.valid_categories_pattern.match( categories_string ).groups()
current_category, categories_string = matches[0].strip(), matches[2]
categories_list.append( current_category )
return (tuple( categories_list ), duration)
if date_string is None:
# XXX: we don't know where to record this particular allocation.
raise ValueError( "Cannot record allocations without a date" )
categories, duration = _parse_allocation( allocation_string )
self._allocations.append( (date_string, categories, duration) )
def clear( self ):
"""
Clears existing allocations. All known categories and their allocations are
wiped out so that the allocations from the next call to parse() are the only
allocations available.
Takes no arguments.
Returns nothing.
"""
# XXX:
self._allocations = []
self._number_errors = 0
def get_configuration( self ):
"""
"""
return self._configuration
def number_errors( self ):
"""
"""
return self._number_errors
def parse( self, file_like, current_year=None, current_configuration=None ):
# XXX: file_like is the wrong name since it ends up being a string
"""
Parses a block of allocations and merges them into the existing allocations.
XXX: raises ValueError or complains depending upon the configuration.
Takes 3 arguments:
file_like -
current_year - XXX: Parse with a temporary year.
current_configuration - XXX: Parse with a temporary configuration.
Returns 1 value:
status -
"""
if current_configuration is None:
current_configuration = self._configuration
# XXX: handle the current date being optional
if current_year is None:
current_year = self._current_year
# XXX: shouldn't be part of the instance
allocations_source = "(string)"
current_line_number = 0
# note the previous number of errors
previous_error_count = self.number_errors()
# read in all of the lines if we're working with a file-like object. we
# assume this will never be used on truly large data (100's of thousands
# of lines) so we simply buffer the data and move on.
if not isinstance( file_like, str ):
# figure out where these allocations come from.
try:
allocations_source = file_like.name
except:
allocations_source = "(unknown)"
allocations_string = file_like.readlines()
file_like = allocations_string
else:
file_like = file_like.splitlines()
# walk through line-by-line and parse the allocations from cleaned up
# lines.
for current_line in file_like:
current_line_number += 1
# strip out empty comments.
comment_start_index = current_line.find( "#" )
if comment_start_index > -1:
current_line = current_line[:comment_start_index]
# remove leading/trailing whitespace.
current_line = current_line.strip()
# ignore empty lines.
if len( current_line ) == 0:
continue
# are we looking at the start of a new day?
date_status, date_error = Allocations._is_valid_date( current_line,
current_year )
if date_status is True:
weekday, current_date = current_line.split()
continue
allocation_status, allocation_error = Allocations._is_valid_allocation( current_line )
if allocation_status is True:
try:
self._record_allocation( current_date, current_line )
except ValueError as e:
# XXX: failed to record (likely no date)
self._number_errors +=1
self._raise_parse_error( allocations_source,
current_line_number,
str( e ),
current_line )
continue
# neither the date nor the allocation are valid, so we need to
# determine if we silently ignore this line because it isn't
# something we would be expected to parse or if we need to complain
# and increment our error count.
if (date_status is not True) and Allocations._looks_like_date( current_line ):
self._raise_parse_error( allocations_source,
current_line_number,
date_error,
current_line )
elif (allocation_status is not True) and Allocations._looks_like_allocation( current_line ):
self._raise_parse_error( allocations_source,
current_line_number,
allocation_error,
current_line )
# this line didn't look like either a date or an allocation so we
# assume it wasn't something we should parse. move on to the next
# line.
pass
# parsing is successful if we didn't have any errors.
return (self.number_errors() == previous_error_count)
def set_configuration( self, new_configuration ):
"""
"""
self._configuration = new_configuration
def to_df( self, filters=None, filter_type=None, max_depth=-1 ):
"""
Converts allocations to a Pandas DataFrame. A subset of allocations can be filtered
in or out based on regular expression or an explicit list, or allocations can be
flattened so that a maximum depth is not exceeded.
Takes 3 arguments:
filters -
filter_type -
depth_limit -
Returns 1 value:
df -
"""
if filters is not None:
if (filter_type is None or
(filter_type != Allocations.FILTER_TYPE_EXCLUDE and
filter_type != Allocations.FILTER_TYPE_INCLUDE)):
raise ValueError( "Filtering was requested though an invalid filter type was provided" )
import pandas as pd
# XXX: drop the max_depth option
max_category_depth = max( map( lambda x: len( x[1] ), self._allocations ),
default=0 )
date_duration_list = []
index_list = []
index_names_list = list( map( lambda x: "level_{:02d}".format( x ),
range( max_category_depth ) ) )
# build the categories index. XXX
for (date_string, categories, duration) in self._allocations:
date_duration_list.append( (date_string, duration) )
categories_list = [""] * max_category_depth
categories_list[0:len(categories)] = categories
index_list.append( tuple( categories_list ) )
multi_index = pd.MultiIndex.from_tuples( index_list,
names=index_names_list )
df = pd.DataFrame.from_records( date_duration_list,
index=multi_index,
columns=["date", "duration"] )
return df
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
302,
198,
11748,
25064,
198,
198,
18601,
2751,
62,
1268,
30076,
62,
48780,
3698,
796,
30629,
8841,
16725,
198,
198,
4871,
1439,
20968,
16934,
7,
2134,
15179,
198,
220,
220,... | 2.284483 | 11,252 |
import toml, json, os, io, base64
from django.core.management.base import BaseCommand
from django.conf import settings
from biostar.recipes.models import Analysis, Project, Data, image_path, Access
from biostar.accounts.models import User, Profile
from biostar.recipes import util, auth
| [
11748,
284,
4029,
11,
33918,
11,
28686,
11,
33245,
11,
2779,
2414,
198,
6738,
42625,
14208,
13,
7295,
13,
27604,
13,
8692,
1330,
7308,
21575,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
3182,
455,
283,
13,
8344,
18636,
... | 3.430233 | 86 |
from modules.pentgoGUI import play
# Lancer le jeu Pentago en interface graphique
play() | [
6738,
13103,
13,
16923,
2188,
40156,
1330,
711,
198,
198,
2,
406,
8250,
443,
11223,
84,
9696,
3839,
551,
7071,
4823,
2350,
198,
1759,
3419
] | 3.56 | 25 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: carceneaux@thinksis.com
# Website: http://arsano.ninja
#
# Note: Example code For testing purposes only
#
# This code has been released under the terms of the Apache-2.0 license
# http://opensource.org/licenses/Apache-2.0
"""
Python program for attaching a first class disk (fcd) to a virtual machine
"""
import atexit
from tools import cli, tasks, disk
from pyVim import connect
from pyVmomi import vmodl
from pyVmomi import vim
def get_args():
"""
Adds additional args for attaching a fcd to a vm
-d datastore
-v vdisk
-n vm_name
-i uuid
"""
parser = cli.build_arg_parser()
parser.add_argument('-d', '--datastore',
required=True,
action='store',
help='Datastore name where disk is located')
parser.add_argument('-v', '--vdisk',
required=True,
action='store',
help='First Class Disk name to be attached')
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('-n', '--vm_name',
action='store',
help='Virtual Machine name where disk is attached')
group.add_argument('-i', '--uuid',
action='store',
help='Virtual Machine UUID where disk is attached')
my_args = parser.parse_args()
return cli.prompt_for_password(my_args)
def attach_fcd_to_vm(vm, vdisk, datastore):
"""
Attach already existing first class disk to vm
"""
# Finding next available unit number
unit_number = 0
for dev in vm.config.hardware.device:
if hasattr(dev.backing, 'fileName'):
unit_number = int(dev.unitNumber) + 1
# unit_number 7 reserved for scsi controller
if unit_number == 7:
unit_number += 1
if unit_number >= 16:
raise Exception("We don't support this many disks.")
if isinstance(dev, vim.vm.device.VirtualSCSIController):
controller = dev
# Setting backings
spec = vim.vm.ConfigSpec()
disk_spec = vim.vm.device.VirtualDeviceSpec()
disk_spec.operation = vim.vm.device.VirtualDeviceSpec.Operation.add
disk_spec.device = vim.vm.device.VirtualDisk()
disk_spec.device.backing = vim.vm.device.VirtualDisk.FlatVer2BackingInfo()
disk_spec.device.backing.diskMode = 'persistent'
disk_spec.device.backing.fileName = vdisk.config.backing.filePath
disk_spec.device.backing.thinProvisioned = True
disk_spec.device.unitNumber = unit_number
disk_spec.device.controllerKey = controller.key
# Creating change list
dev_changes = []
dev_changes.append(disk_spec)
spec.deviceChange = dev_changes
# Sending the request
task = vm.ReconfigVM_Task(spec=spec)
return task
def main():
"""
Simple command-line program for attaching a first class disk to a vm.
"""
args = get_args()
try:
if args.disable_ssl_verification:
service_instance = connect.SmartConnectNoSSL(host=args.host,
user=args.user,
pwd=args.password,
port=int(args.port))
else:
service_instance = connect.SmartConnect(host=args.host,
user=args.user,
pwd=args.password,
port=int(args.port))
atexit.register(connect.Disconnect, service_instance)
content = service_instance.RetrieveContent()
# Retrieve Datastore Object
datastore = disk.get_obj(content, [vim.Datastore], args.datastore)
# Retrieve FCD Object
vdisk = disk.retrieve_fcd(content, datastore, args.vdisk)
# Retrieve VM
vm = None
if args.uuid:
search_index = content.searchIndex
vm = search_index.FindByUuid(None, args.uuid, True)
elif args.vm_name:
vm = disk.get_obj(content, [vim.VirtualMachine], args.vm_name)
# Attaching FCD to VM
if vm:
task = attach_fcd_to_vm(vm, vdisk, datastore)
tasks.wait_for_tasks(service_instance, [task])
else:
raise RuntimeError("VM not found.")
except vmodl.MethodFault as error:
print("Caught vmodl fault : " + error.msg)
return -1
return 0
# Start program
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
22503,
416,
5180,
10173,
1734,
14644,
198,
2,
21722,
25,
3740,
1378,
12567,
13,
785,
14,
66,
5605,
1734,
... | 2.146715 | 2,222 |
#! /usr/bin/env python3
# Copyright 2017 John Hanley.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# The software is provided "AS IS", without warranty of any kind, express or
# implied, including but not limited to the warranties of merchantability,
# fitness for a particular purpose and noninfringement. In no event shall
# the authors or copyright holders be liable for any claim, damages or
# other liability, whether in an action of contract, tort or otherwise,
# arising from, out of or in connection with the software or the use or
# other dealings in the software.
import os
import pprint
import matplotlib.pyplot as plt
import pandas
import sklearn.cluster
import sklearn.svm
import problem.breadcrumb.peninsula as peninsula
def approx(n, k=400):
'''Returns approximately n, that is, discretized to coarser resolution.'''
return round(n * k) / k
def place_classifier_predict(lng, lat):
'''Returns 0 for locations near home, 1 for locations near work.'''
is_near_home = lng > -121.8
return 0 if is_near_home else 1
def cluster(df, k=2, verbose=False,
left=-122.25, x_size=.476,
bottom=37.166, y_size=.372):
'''Pass in a trip_summary dataframe and desired # of clusters.'''
places = [] # trip sources, or destinations
for i, row in df.iterrows():
places.append((row.end_lng, row.end_lat))
places.sort()
if verbose:
pprint.pprint(places)
est = sklearn.cluster.KMeans(k)
est.fit(places)
fig, ax = plt.subplots()
img = plt.imread('topoquest-peninsula.jpg')
extent = (left, left + x_size, bottom, bottom + y_size)
ax.imshow(img, alpha=0.3, extent=extent)
ax.ticklabel_format(useOffset=False)
colors = 'red purple blue aqua'.split()
X = []
y = []
for place in places:
clust_no, = est.predict([place])
ax.scatter(approx(place[0]), approx(place[1]),
color=colors[clust_no], marker='s', linewidth=5)
X.append(list(place))
y.append(clust_no)
for lng, lat in peninsula.cities():
ax.scatter(lng, lat, color='green')
plt.savefig('trip_clusters_%d.pdf' % k)
plt.savefig('trip_clusters_%d.png' % k)
# plt.show()
colors = 'salmon darkorchid'.split()
for place in places:
clust_no = place_classifier_predict(*place)
ax.scatter(place[0], place[1],
color=colors[clust_no], marker='^')
if verbose:
print(clust_no, place)
print(y)
plt.show()
if __name__ == '__main__':
os.chdir('/tmp')
cluster(pandas.read_csv('trip_summary.csv'))
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
15069,
2177,
1757,
9530,
1636,
13,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
198,
2,
4866,
286,
428,
3788,
... | 2.727509 | 1,156 |
# -*- coding: utf-8 -*-
"""
Root lattice realizations
"""
# ****************************************************************************
# Copyright (C) 2007-2013 Nicolas M. Thiery <nthiery at users.sf.net>
# 2012 Nicolas Borie <nicolas.borie at univ-mlv.fr>
#
# (with contributions of many others)
#
# Distributed under the terms of the GNU General Public License (GPL)
# https://www.gnu.org/licenses/
# ****************************************************************************
from sage.misc.abstract_method import abstract_method, AbstractMethod
from sage.misc.call import attrcall
from sage.misc.cachefunc import cached_method, cached_in_parent_method
from sage.misc.lazy_attribute import lazy_attribute
from sage.misc.lazy_import import LazyImport
from sage.categories.coxeter_groups import CoxeterGroups
from sage.categories.category_types import Category_over_base_ring
from sage.categories.modules_with_basis import ModulesWithBasis
from sage.structure.element import Element
from sage.sets.family import Family
from sage.rings.integer_ring import ZZ
from sage.rings.rational_field import QQ
from sage.matrix.constructor import matrix
from sage.modules.free_module_element import vector
from sage.sets.recursively_enumerated_set import RecursivelyEnumeratedSet
from sage.combinat.root_system.plot import PlotOptions, barycentric_projection_matrix
from itertools import combinations_with_replacement
class RootLatticeRealizations(Category_over_base_ring):
r"""
The category of root lattice realizations over a given base ring
A *root lattice realization* `L` over a base ring `R` is a free
module (or vector space if `R` is a field) endowed with an embedding
of the root lattice of some root system.
Typical root lattice realizations over `\ZZ` include the root
lattice, weight lattice, and ambient lattice. Typical root lattice
realizations over `\QQ` include the root space, weight space, and
ambient space.
To describe the embedding, a root lattice realization must
implement a method
:meth:`~RootLatticeRealizations.ParentMethods.simple_root`
returning for each `i` in the index set the image of the simple root
`\alpha_i` under the embedding.
A root lattice realization must further implement a method on elements
:meth:`~RootLatticeRealizations.ElementMethods.scalar`, computing
the scalar product with elements of the coroot lattice or coroot space.
Using those, this category provides tools for reflections, roots,
the Weyl group and its action, ...
.. SEEALSO::
- :class:`~sage.combinat.root_system.root_system.RootSystem`
- :class:`~sage.combinat.root_system.weight_lattice_realizations.WeightLatticeRealizations`
- :class:`~sage.combinat.root_system.root_space.RootSpace`
- :class:`~sage.combinat.root_system.weight_space.WeightSpace`
- :class:`~sage.combinat.root_system.ambient_space.AmbientSpace`
EXAMPLES:
Here, we consider the root system of type `A_7`, and embed the root
lattice element `x = \alpha_2 + 2 \alpha_6` in several root lattice
realizations::
sage: R = RootSystem(["A",7])
sage: alpha = R.root_lattice().simple_roots()
sage: x = alpha[2] + 2 * alpha[5]
sage: L = R.root_space()
sage: L(x)
alpha[2] + 2*alpha[5]
sage: L = R.weight_lattice()
sage: L(x)
-Lambda[1] + 2*Lambda[2] - Lambda[3] - 2*Lambda[4] + 4*Lambda[5] - 2*Lambda[6]
sage: L = R.ambient_space()
sage: L(x)
(0, 1, -1, 0, 2, -2, 0, 0)
We embed the root space element `x = \alpha_2 + 1/2 \alpha_6` in
several root lattice realizations::
sage: alpha = R.root_space().simple_roots()
sage: x = alpha[2] + 1/2 * alpha[5]
sage: L = R.weight_space()
sage: L(x)
-Lambda[1] + 2*Lambda[2] - Lambda[3] - 1/2*Lambda[4] + Lambda[5] - 1/2*Lambda[6]
sage: L = R.ambient_space()
sage: L(x)
(0, 1, -1, 0, 1/2, -1/2, 0, 0)
Of course, one can't embed the root space in the weight lattice::
sage: L = R.weight_lattice()
sage: L(x)
Traceback (most recent call last):
...
TypeError: do not know how to make x (= alpha[2] + 1/2*alpha[5]) an element of self (=Weight lattice of the Root system of type ['A', 7])
If `K_1` is a subring of `K_2`, then one could in theory have
an embedding from the root space over `K_1` to any root
lattice realization over `K_2`; this is not implemented::
sage: K1 = QQ
sage: K2 = QQ['q']
sage: L = R.weight_space(K2)
sage: alpha = R.root_space(K2).simple_roots()
sage: L(alpha[1])
2*Lambda[1] - Lambda[2]
sage: alpha = R.root_space(K1).simple_roots()
sage: L(alpha[1])
Traceback (most recent call last):
...
TypeError: do not know how to make x (= alpha[1]) an element of self (=Weight space over the Univariate Polynomial Ring in q over Rational Field of the Root system of type ['A', 7])
By a slight abuse, the embedding of the root lattice is not actually
required to be faithful. Typically for an affine root system, the
null root of the root lattice is killed in the non extended weight
lattice::
sage: R = RootSystem(["A", 3, 1])
sage: delta = R.root_lattice().null_root()
sage: L = R.weight_lattice()
sage: L(delta)
0
TESTS::
sage: TestSuite(L).run()
"""
@cached_method
def super_categories(self):
"""
EXAMPLES::
sage: from sage.combinat.root_system.root_lattice_realizations import RootLatticeRealizations
sage: RootLatticeRealizations(QQ).super_categories()
[Category of vector spaces with basis over Rational Field]
"""
return [ModulesWithBasis(self.base_ring())]
Algebras = LazyImport('sage.combinat.root_system.root_lattice_realization_algebras', 'Algebras')
##########################################################################
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
30016,
47240,
501,
1103,
4582,
198,
37811,
198,
2,
41906,
17174,
46068,
198,
2,
220,
220,
220,
220,
220,
220,
15069,
357,
34,
8,
4343,
12,
6390,
29737,
337... | 2.600423 | 2,365 |
#!/usr/bin/env python3.9
"""
This program gets the number of runs that a given player (argv[1]) has set.
"""
import asyncio
import concurrent.futures
from asyncio.events import AbstractEventLoop
from itertools import count
from sys import argv, exit, stderr
from typing import Awaitable, Iterator
import requests
from utils import *
async def runs(UID: int) -> tuple[int, int]:
"""
Get the number of runs by a user with the user id `UID`. This function
works exactly the same as the one in `verified.py`, so read the
docstring for that one if you care about how it works.
>>> loop = asyncio.get_event_loop()
>>> loop.run_until_complete(runs("v81ggnp8"))
(1148, 458)
>>> loop.run_until_complete(runs("8r72e1qj"))
(2, 0)
>>> loop.run_until_complete(runs("68w0rrlj"))
(55, 9)
"""
fullgame: int = 0
il: int = 0
for offstart in count(0, 1000):
with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
loop: AbstractEventLoop = asyncio.get_event_loop()
futures: Iterator[Awaitable] = (
loop.run_in_executor(
executor,
requests.get,
f"{API}/runs?user={UID}&max=200&offset={offset}",
)
for offset in range(offstart, offstart + 1000, 200)
)
for response in await asyncio.gather(*futures):
r: dict = response.json()
if len(r["data"]) == 0:
return (fullgame, il)
for run in r["data"]:
if run["level"] is None:
fullgame += 1
else:
il += 1
if __name__ == "__main__":
RET: int = main()
exit(RET)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
13,
24,
198,
198,
37811,
198,
1212,
1430,
3011,
262,
1271,
286,
4539,
326,
257,
1813,
2137,
357,
853,
85,
58,
16,
12962,
468,
900,
13,
198,
37811,
198,
198,
11748,
30351,
952,
198,
... | 2.527731 | 595 |
from sklearn.model_selection import * | [
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
1635
] | 4.111111 | 9 |
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
import os
import cv2
import numpy as np
from skimage.measure import approximate_polygon, find_contours
from model_loader import ModelLoader | [
2,
15069,
357,
34,
8,
12131,
8180,
10501,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
17168,
198,
198,
11748,
28686,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
9060,
13,
1326,
5015,
... | 3.47541 | 61 |
import torch
from overrides import overrides
from torch.nn.parameter import Parameter
from allennlp.modules.similarity_functions.similarity_function import SimilarityFunction
@SimilarityFunction.register("full_add_composition")
class FullAddSimilarity(SimilarityFunction):
"""
This similarity function computes f(xy) = A * x + B * y
for learned matrices A, B and the given vectors x, y.
----------
Parameters
----------
input_dim : ``int``
The dimension of the vectors. This is ``y.size()[-1]`` - the
length of the vector that will go into the similarity computation. We need this so we can
build weight vectors correctly.
"""
@overrides
| [
11748,
28034,
198,
198,
6738,
23170,
1460,
1330,
23170,
1460,
198,
6738,
28034,
13,
20471,
13,
17143,
2357,
1330,
25139,
2357,
198,
198,
6738,
477,
1697,
34431,
13,
18170,
13,
38610,
414,
62,
12543,
2733,
13,
38610,
414,
62,
8818,
1330,... | 3.105727 | 227 |
# Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import numpy as np
from akg.utils import kernel_exec as utils
from akg.utils import validation_check as vc_util
from akg.ops.nn import conv_backprop_input
from gen_random import random_gaussian
from tensorio import compare_tensor
from akg.utils.kernel_exec import gen_kernel_name
from base import get_rtol_atol
| [
2,
15069,
13130,
43208,
21852,
1766,
1539,
12052,
201,
198,
2,
201,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
201,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,... | 3.414545 | 275 |
import importlib
import os
import socket
import sys
import traceback
from boring import SERVER_SOFTWARE
from boring.exception import HttpException
from boring.http import Response
from boring.middleware import StaticsHandler
def getapp(app):
''' get wsgi callable object'''
try:
module, func = app.split(":")
except (ValueError, TypeError):
module, func = app, "application"
return module, func
| [
11748,
1330,
8019,
198,
11748,
28686,
198,
11748,
17802,
198,
11748,
25064,
198,
11748,
12854,
1891,
198,
198,
6738,
14262,
1330,
18871,
5959,
62,
15821,
37485,
198,
6738,
14262,
13,
1069,
4516,
1330,
367,
29281,
16922,
198,
6738,
14262,
... | 3.092857 | 140 |
import ssl
from celery_connectors.utils import ev
# end of build_ssl_options
| [
11748,
264,
6649,
198,
6738,
18725,
1924,
62,
8443,
669,
13,
26791,
1330,
819,
198,
198,
2,
886,
286,
1382,
62,
45163,
62,
25811,
198
] | 3.12 | 25 |
#!/bin/env python
#
# xls_output.py: functions for writing analysis results to Excel files
# Copyright (C) University of Manchester 2015-2019 Peter Briggs, Leo Zeef
# & Ian Donaldson
#
"""
xls_output.py
Functions for outputting analysis results to XLSX spreadsheet
"""
import datetime
import xlsxwriter
import io
import re
from . import output
from . import utils
# Regular expressions for styling tags
RE_STYLE = re.compile(r"^<style +([^>]*)>(.*)</style>$")
# Notes text
NOTES = dict()
NOTES['preamble'] = """<style font=bold bgcolor=gray>%s</style>
Find nearest peaks to %ss (and vice versa)
Bioinformatics Core Facility, Faculty of Life Sciences, University of Manchester
http://fls-bioinformatics-core.github.com/RnaChipIntegrator/
Run on %s
<style font=bold bgcolor=gray>Settings</style>"""
NOTES['peak_centric'] = """
<style font=bold bgcolor=gray>'Peak-centric': nearest %ss to each peak</style>
Column\tDescription"""
NOTES['feature_centric'] = """
<style font=bold bgcolor=gray>'%s-centric': nearest peaks to each %s</style>
Column\tDescription"""
class XLSX(object):
"""
Class to assemble XLSX output file
Utility class to help build an XLSX file from existing
output TSV files.
Example usage:
>>> xlsx = XLS('results.xlsx')
>>> xlsx.add_result_sheet('results','results.tsv')
>>> xlsx.write()
"""
def __init__(self,xlsx_file,program_version,feature_type=None):
"""
Create a new XLSX instance
Arguments:
xlsx_file (str): name or path of output file
program_version (str): name and version of the program
that is writing the spreadsheet
feature_type (str): if not None then replace 'feature'
with 'feature_type' (e.g. 'gene', 'transcript' etc) in
the output
"""
self._xlsx = xlsxwriter.Workbook(xlsx_file)
self._xlsx_file = xlsx_file
self._sheets = {}
self._rows = {}
self._widths = {}
self._styles = {}
self._feature_type = ('gene' if feature_type is None
else feature_type)
self.add_sheet("Notes")
self.append_to_notes(NOTES['preamble'] % (program_version,
self._feature_type,
datetime.date.today()))
@property
def xlsx_file(self):
"""
Return the supplied output file name/path
"""
return self._xlsx_file
def add_sheet(self,name):
"""
Create a new worksheet in the XLSX file
Arguments:
name (str): title for the new sheet (must be
unique across the XLSX file)
Returns:
WorkSheet: new worksheet.
"""
if name in self._sheets:
raise KeyError("'%s': worksheet already exists")
ws = self._xlsx.add_worksheet(name)
self._sheets[name] = ws
self._rows[name] = 0
self._widths[name] = []
return ws
def get_format(self,*args):
"""
Return a cell format object matching arguments
Returns a Format object matching the supplied
arguments, which should be strings of the form
'KEY=VALUE'
Formats are cached so there will be one Format
per unique set of key/value pairs.
"""
# Create a name for this style
name = list(args)[:]
name.sort()
name = "_".join(name)
# See if it's already defined
if name not in self._styles:
# Create a new style (cell_format)
fmt = self._xlsx.add_format()
for style in args:
if style == "font=bold":
fmt.set_bold(True)
elif style.startswith("bgcolor="):
color = style.split('=')[1]
fmt.set_bg_color(color)
else:
raise NotImplementedError("%s: not implemented" %
style)
self._styles[name] = fmt
# Return the cell format for this style
return self._styles[name]
def add_text(self,name,text):
"""
Add (append) arbitrary text to a worksheet
Arguments:
name (str): name of the worksheet
text (str): text that will be added to the
end of the worksheet
"""
ws = self._sheets[name]
i = self._rows[name]
for line in text.split('\n'):
j = 0
for item in line.split('\t'):
# Check for styles
style_match = RE_STYLE.match(item)
if style_match:
item = style_match.group(2)
style = style_match.group(1).split()
fmt = self.get_format(*style)
else:
fmt = None
# Write the item
ws.write(i,j,item,fmt)
# Update the widths
try:
self._widths[name][j] = max(self._widths[name][j],
len(item))
except IndexError:
self._widths[name].append(len(item))
# Increment column counter
j += 1
# Increment row counter
i += 1
self._rows[name] = i
def append_to_notes(self,text):
"""
Append arbitrary text to the 'notes' page
Arguments:
text (str): text that will be added to the
end of the notes.
"""
self.add_text("Notes",text)
def write_peak_centric(self,fields):
"""
Write details of the 'peak-centric' results to XLSX notes
Arguments:
fields (list): list of fields in the output
"""
self.append_to_notes(NOTES['peak_centric'] %
self._feature_type)
self.append_to_notes(self._field_descriptions(fields,
source="peak",
target=self._feature_type))
def write_feature_centric(self,fields):
"""
Write details of the 'feature-centric' results to XLSX notes
Arguments:
fields (list): list of fields in the output
"""
self.append_to_notes(NOTES['feature_centric'] %
(self._feature_type.title(),
self._feature_type))
self.append_to_notes(self._field_descriptions(fields,
source=self._feature_type,
target="peak"))
def _field_descriptions(self,fields,source=None,target=None):
"""
Generate field (column) descriptions for XLSX notes
Arguments:
fields (list): list of fields to describe
Returns:
string: text with one field name/description pair
(separated by a tab) per line
"""
return '\n'.join(['\t'.join(x) for x in
output.describe_fields(fields,
feature=self._feature_type,
source=source,
target=target)])
def add_result_sheet(self,title,tsv_file):
"""
Add a sheet populated from a file
Creates a new sheet in the spreadsheet with the
supplied title and populates using the contents
of a tab-delimited file.
If there are more lines than can be written to a
single worksheet then creates additional sheets
as required.
Arguments:
title (str): a title for the sheet
tsv_file (str): path to a tab-delimited file
"""
ws = self.add_sheet(title)
# Get header line
with io.open(tsv_file,'rt') as fp:
i = self._rows[title]
for line in fp:
j = 0
for value in line.rstrip('\n').split('\t'):
ws.write(i,j,value)
try:
self._widths[title][j] = max(self._widths[title][j],
len(value))
except IndexError:
self._widths[title].append(len(value))
j += 1
i += 1
self._rows[title] = i
# Freeze the header
ws.freeze_panes(1,0)
def write(self):
"""
Write XLSX to file
"""
# Set the column widths
for name in self._sheets:
ws = self._sheets[name]
for j,w in enumerate(self._widths[name]):
ws.set_column(j,j,w*1.2)
# Close to write to file
self._xlsx.close()
| [
2,
48443,
8800,
14,
24330,
21015,
198,
2,
198,
2,
220,
220,
220,
220,
2124,
7278,
62,
22915,
13,
9078,
25,
5499,
329,
3597,
3781,
2482,
284,
24134,
3696,
198,
2,
220,
220,
220,
220,
15069,
357,
34,
8,
2059,
286,
9502,
1853,
12,
... | 1.966142 | 4,578 |
from subprocess import CalledProcessError
import pytest
from hooks.post_gen_project import (
check_command_exists,
initial_commit,
install_virtualenv,
setup_github,
setup_pre_commit,
)
@pytest.mark.parametrize(
"side_effect",
[
FileNotFoundError(),
CalledProcessError(1, ""),
],
)
| [
6738,
850,
14681,
1330,
34099,
18709,
12331,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
26569,
13,
7353,
62,
5235,
62,
16302,
1330,
357,
198,
220,
220,
220,
2198,
62,
21812,
62,
1069,
1023,
11,
198,
220,
220,
220,
4238,
62,
41509,
... | 2.442029 | 138 |
from setuptools import setup
setup(
name='geocoderpl',
version='1.1',
description='GeocoderPL is an application written in Python, which can be used for geocoding address points in ' +
'Poland along with the possibility to display basic information about a given address point and the ' +
'building assigned to this address. GeocoderPL has a form of search engine with three map layers: ' +
'OpenStreetMap, Google Maps and Stamens Map.',
author='Mateusz Gomulski',
author_email='mateusz.gomulski@gmail.com',
license="MIT License",
keywords="search-engine geocoding numpy pyqt5 geospatial sqlite3 gdal-python superpermutation folium-maps",
url="https://github.com/GML22/GeocoderPL",
packages=['geocoderpl'],
install_requires=['folium', 'numpy', 'pyqt5', 'unidecode', 'pyproj', 'lxml', 'geocoder', 'pandas', 'matplotlib',
'setuptools', 'sqlalchemy', 'python-dotenv'],
)
| [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
469,
420,
12342,
489,
3256,
198,
220,
220,
220,
2196,
11639,
16,
13,
16,
3256,
198,
220,
220,
220,
6764,
11639,
10082,
420,
12342,
6489,
318,
... | 2.638814 | 371 |
from django.contrib.auth.models import User
from django.db import models
from django_extensions.db.models import TimeStampedModel
from cities_light.abstract_models import (AbstractCity, AbstractRegion, AbstractCountry, AbstractSubRegion)
from cities_light.receivers import connect_default_signals
connect_default_signals(City)
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
62,
2302,
5736,
13,
9945,
13,
27530,
1330,
3862,
1273,
13322,
17633,
198,
6738,
4736,
62,
2971... | 3.659341 | 91 |
from setuptools import setup
setup(name='kapre',
version='0.1.2.1',
description='Kapre: Keras Audio Preprocessors. Keras layers for audio pre-processing in deep learning',
author='Keunwoo Choi',
url='http://github.com/keunwoo/kapre/',
download_url='http://github.com/keunwoochoi/kapre/releases',
author_email='keunwoo.choi@qmul.ac.uk',
license='MIT',
packages=['kapre'],
install_requires=[
'keras >= 2.0.0',
'numpy >= 1.8.0',
'librosa >= 0.4',
'pandas',
'future'
],
keywords='audio music deep learning keras',
zip_safe=False)
| [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
3672,
11639,
74,
499,
260,
3256,
198,
220,
220,
220,
220,
220,
2196,
11639,
15,
13,
16,
13,
17,
13,
16,
3256,
198,
220,
220,
220,
220,
220,
6764,
11639,
42,
499,
260,
25,
... | 2.108911 | 303 |
ID_TO_LABEL = \
{'100028': 0,
'100082': 1,
'100167': 2,
'100191': 3,
'100192': 4,
'100207': 5,
'10022': 6,
'100230': 7,
'100280': 8,
'100338': 9,
'100363': 10,
'100372': 11,
'100407': 12,
'100474': 13,
'100484': 14,
'100485': 15,
'100505': 16,
'100523': 17,
'100569': 18,
'100587': 19,
'100614': 20,
'100631': 21,
'100634': 22,
'10071': 23,
'100740': 24,
'100793': 25,
'100820': 26,
'100826': 27,
'100895': 28,
'10090': 29,
'100951': 30,
'100955': 31,
'100966': 32,
'101043': 33,
'101049': 34,
'101056': 35,
'101128': 36,
'101138': 37,
'101166': 38,
'101176': 39,
'101212': 40,
'101236': 41,
'101241': 42,
'101271': 43,
'101301': 44,
'101318': 45,
'101399': 46,
'101400': 47,
'101457': 48,
'101462': 49,
'101507': 50,
'101530': 51,
'101615': 52,
'101633': 53,
'101664': 54,
'101708': 55,
'101718': 56,
'101722': 57,
'101763': 58,
'101881': 59,
'101896': 60,
'101923': 61,
'101940': 62,
'101946': 63,
'10196': 64,
'102002': 65,
'102008': 66,
'102062': 67,
'102089': 68,
'102108': 69,
'102146': 70,
'102154': 71,
'10217': 72,
'102178': 73,
'102206': 74,
'10221': 75,
'102241': 76,
'102320': 77,
'102329': 78,
'102375': 79,
'102416': 80,
'10248': 81,
'102488': 82,
'102511': 83,
'102544': 84,
'102554': 85,
'102566': 86,
'102572': 87,
'10262': 88,
'102621': 89,
'102664': 90,
'102680': 91,
'102703': 92,
'102709': 93,
'102712': 94,
'102850': 95,
'102904': 96,
'102905': 97,
'102917': 98,
'102924': 99,
'102942': 100,
'102943': 101,
'102959': 102,
'102984': 103,
'102988': 104,
'103016': 105,
'103076': 106,
'103082': 107,
'103104': 108,
'103119': 109,
'103134': 110,
'103143': 111,
'103158': 112,
'103168': 113,
'103182': 114,
'103232': 115,
'103235': 116,
'103295': 117,
'10331': 118,
'103311': 119,
'103365': 120,
'103456': 121,
'103530': 122,
'103532': 123,
'103617': 124,
'103669': 125,
'10367': 126,
'103692': 127,
'103709': 128,
'103734': 129,
'103752': 130,
'103774': 131,
'103827': 132,
'103831': 133,
'103844': 134,
'103848': 135,
'103899': 136,
'103923': 137,
'103963': 138,
'104006': 139,
'104030': 140,
'104036': 141,
'104038': 142,
'104039': 143,
'104070': 144,
'10411': 145,
'10412': 146,
'104152': 147,
'104169': 148,
'104175': 149,
'10419': 150,
'104216': 151,
'104219': 152,
'104235': 153,
'104245': 154,
'104246': 155,
'104322': 156,
'104330': 157,
'104341': 158,
'104373': 159,
'104406': 160,
'104431': 161,
'104457': 162,
'10447': 163,
'104497': 164,
'104577': 165,
'104605': 166,
'104691': 167,
'104757': 168,
'104792': 169,
'104825': 170,
'104840': 171,
'104858': 172,
'104882': 173,
'104906': 174,
'104916': 175,
'104938': 176,
'105017': 177,
'105020': 178,
'105024': 179,
'10503': 180,
'105071': 181,
'105120': 182,
'10514': 183,
'105153': 184,
'105162': 185,
'105274': 186,
'105294': 187,
'105333': 188,
'105337': 189,
'105340': 190,
'105354': 191,
'105357': 192,
'10538': 193,
'105384': 194,
'105447': 195,
'105471': 196,
'105472': 197,
'105479': 198,
'105496': 199,
'1055': 200,
'105512': 201,
'105523': 202,
'105526': 203,
'105533': 204,
'105608': 205,
'105623': 206,
'105627': 207,
'105665': 208,
'105676': 209,
'105688': 210,
'105694': 211,
'105719': 212,
'10575': 213,
'105802': 214,
'105806': 215,
'10583': 216,
'105858': 217,
'105870': 218,
'105873': 219,
'105914': 220,
'10592': 221,
'105924': 222,
'105961': 223,
'10598': 224,
'106030': 225,
'106086': 226,
'106126': 227,
'106128': 228,
'106130': 229,
'106151': 230,
'106230': 231,
'106252': 232,
'106258': 233,
'106286': 234,
'10640': 235,
'106401': 236,
'106404': 237,
'106438': 238,
'106445': 239,
'106521': 240,
'106546': 241,
'106602': 242,
'106665': 243,
'106716': 244,
'106761': 245,
'106793': 246,
'106795': 247,
'106805': 248,
'106811': 249,
'106852': 250,
'106924': 251,
'106950': 252,
'106969': 253,
'106989': 254,
'106991': 255,
'107039': 256,
'107135': 257,
'107164': 258,
'107219': 259,
'107233': 260,
'107269': 261,
'107303': 262,
'107323': 263,
'107344': 264,
'107374': 265,
'107386': 266,
'107404': 267,
'10742': 268,
'107463': 269,
'107474': 270,
'107494': 271,
'107495': 272,
'107511': 273,
'107513': 274,
'107545': 275,
'107600': 276,
'107611': 277,
'107627': 278,
'10763': 279,
'107649': 280,
'107668': 281,
'107673': 282,
'107706': 283,
'107718': 284,
'107722': 285,
'107750': 286,
'107754': 287,
'107801': 288,
'107813': 289,
'107874': 290,
'107941': 291,
'107973': 292,
'108023': 293,
'10811': 294,
'108129': 295,
'108146': 296,
'108218': 297,
'108269': 298,
'108283': 299,
'108291': 300,
'108327': 301,
'10839': 302,
'108392': 303,
'108404': 304,
'108472': 305,
'108502': 306,
'108505': 307,
'108517': 308,
'108591': 309,
'108625': 310,
'108757': 311,
'108813': 312,
'108824': 313,
'108862': 314,
'108886': 315,
'108936': 316,
'108972': 317,
'108983': 318,
'108991': 319,
'109013': 320,
'109014': 321,
'109018': 322,
'10903': 323,
'109034': 324,
'109082': 325,
'109153': 326,
'109159': 327,
'109169': 328,
'109170': 329,
'109326': 330,
'109382': 331,
'109392': 332,
'109425': 333,
'10943': 334,
'109434': 335,
'109455': 336,
'109482': 337,
'109522': 338,
'109554': 339,
'109572': 340,
'109578': 341,
'109703': 342,
'109743': 343,
'109750': 344,
'109779': 345,
'109808': 346,
'109814': 347,
'109819': 348,
'109821': 349,
'109880': 350,
'109908': 351,
'109928': 352,
'109963': 353,
'109968': 354,
'110047': 355,
'110081': 356,
'1101': 357,
'110131': 358,
'110153': 359,
'110198': 360,
'110224': 361,
'110239': 362,
'110240': 363,
'110246': 364,
'110276': 365,
'110283': 366,
'110313': 367,
'110320': 368,
'110321': 369,
'110334': 370,
'110363': 371,
'110385': 372,
'110395': 373,
'110398': 374,
'1104': 375,
'11043': 376,
'110444': 377,
'110469': 378,
'110477': 379,
'110496': 380,
'110504': 381,
'110505': 382,
'11053': 383,
'11054': 384,
'110557': 385,
'11059': 386,
'110605': 387,
'11066': 388,
'110691': 389,
'110708': 390,
'110863': 391,
'110873': 392,
'110885': 393,
'110908': 394,
'110929': 395,
'110946': 396,
'110950': 397,
'110960': 398,
'110986': 399,
'111096': 400,
'111100': 401,
'111105': 402,
'111157': 403,
'111222': 404,
'111224': 405,
'111255': 406,
'111289': 407,
'111291': 408,
'111306': 409,
'111311': 410,
'111347': 411,
'111382': 412,
'111455': 413,
'111529': 414,
'11153': 415,
'111608': 416,
'111661': 417,
'111663': 418,
'111675': 419,
'111699': 420,
'111705': 421,
'11171': 422,
'111774': 423,
'111779': 424,
'111823': 425,
'111834': 426,
'111840': 427,
'111859': 428,
'111926': 429,
'111927': 430,
'112009': 431,
'112024': 432,
'112037': 433,
'112063': 434,
'112095': 435,
'112099': 436,
'112115': 437,
'112135': 438,
'112168': 439,
'112189': 440,
'1122': 441,
'112200': 442,
'112203': 443,
'11224': 444,
'11230': 445,
'112308': 446,
'11231': 447,
'112356': 448,
'112461': 449,
'112481': 450,
'112516': 451,
'112536': 452,
'112552': 453,
'112601': 454,
'112612': 455,
'112699': 456,
'1127': 457,
'112785': 458,
'112868': 459,
'11289': 460,
'112954': 461,
'112969': 462,
'113010': 463,
'113107': 464,
'113145': 465,
'113146': 466,
'113162': 467,
'113189': 468,
'113209': 469,
'113238': 470,
'113253': 471,
'113259': 472,
'113312': 473,
'113318': 474,
'113370': 475,
'113396': 476,
'113455': 477,
'113462': 478,
'113539': 479,
'11354': 480,
'11356': 481,
'113590': 482,
'113596': 483,
'113630': 484,
'113636': 485,
'113653': 486,
'1137': 487,
'11373': 488,
'113747': 489,
'113750': 490,
'113769': 491,
'113815': 492,
'113838': 493,
'113846': 494,
'113868': 495,
'113889': 496,
'113926': 497,
'113988': 498,
'11400': 499,
'114044': 500,
'114046': 501,
'114058': 502,
'11408': 503,
'114082': 504,
'114090': 505,
'11410': 506,
'114157': 507,
'114199': 508,
'114208': 509,
'114224': 510,
'114282': 511,
'114289': 512,
'114327': 513,
'114390': 514,
'114408': 515,
'114460': 516,
'114565': 517,
'114581': 518,
'114600': 519,
'114646': 520,
'114663': 521,
'114669': 522,
'114727': 523,
'114745': 524,
'11477': 525,
'114791': 526,
'114844': 527,
'114846': 528,
'114940': 529,
'114946': 530,
'114957': 531,
'114986': 532,
'115000': 533,
'115032': 534,
'115038': 535,
'115091': 536,
'115124': 537,
'115159': 538,
'115164': 539,
'115170': 540,
'115305': 541,
'115418': 542,
'115419': 543,
'11544': 544,
'115482': 545,
'115500': 546,
'115502': 547,
'115529': 548,
'115543': 549,
'115598': 550,
'115643': 551,
'115658': 552,
'115742': 553,
'115820': 554,
'115821': 555,
'115836': 556,
'115884': 557,
'115903': 558,
'115919': 559,
'115927': 560,
'11595': 561,
'115979': 562,
'115983': 563,
'115984': 564,
'115995': 565,
'116027': 566,
'11603': 567,
'116037': 568,
'116097': 569,
'116098': 570,
'116117': 571,
'116118': 572,
'116124': 573,
'11614': 574,
'116186': 575,
'116211': 576,
'116255': 577,
'116265': 578,
'116321': 579,
'116359': 580,
'116462': 581,
'116554': 582,
'116601': 583,
'11663': 584,
'116722': 585,
'116761': 586,
'116772': 587,
'116781': 588,
'117017': 589,
'11703': 590,
'117041': 591,
'117058': 592,
'117063': 593,
'117076': 594,
'117128': 595,
'117206': 596,
'117249': 597,
'117317': 598,
'117336': 599,
'1174': 600,
'117405': 601,
'117425': 602,
'117487': 603,
'117510': 604,
'117514': 605,
'117528': 606,
'117563': 607,
'117623': 608,
'117635': 609,
'117641': 610,
'117688': 611,
'117783': 612,
'117808': 613,
'117816': 614,
'117819': 615,
'117860': 616,
'117861': 617,
'117865': 618,
'117874': 619,
'117885': 620,
'117919': 621,
'11794': 622,
'118008': 623,
'118054': 624,
'118111': 625,
'118171': 626,
'118182': 627,
'118232': 628,
'118279': 629,
'118286': 630,
'118331': 631,
'118333': 632,
'118353': 633,
'118450': 634,
'118514': 635,
'11854': 636,
'118579': 637,
'118621': 638,
'118652': 639,
'118661': 640,
'118671': 641,
'118691': 642,
'118727': 643,
'118749': 644,
'118783': 645,
'118789': 646,
'11879': 647,
'118822': 648,
'11883': 649,
'118856': 650,
'118886': 651,
'11889': 652,
'118895': 653,
'1189': 654,
'118904': 655,
'118906': 656,
'118925': 657,
'118948': 658,
'118985': 659,
'119109': 660,
'119196': 661,
'119199': 662,
'119223': 663,
'119270': 664,
'119288': 665,
'119290': 666,
'119296': 667,
'119302': 668,
'119367': 669,
'119369': 670,
'119371': 671,
'119417': 672,
'119481': 673,
'119570': 674,
'119571': 675,
'119585': 676,
'119595': 677,
'119615': 678,
'119645': 679,
'119668': 680,
'119683': 681,
'119686': 682,
'11971': 683,
'119784': 684,
'119877': 685,
'119915': 686,
'119918': 687,
'119921': 688,
'119931': 689,
'119941': 690,
'120023': 691,
'120035': 692,
'120041': 693,
'120053': 694,
'120105': 695,
'120110': 696,
'120144': 697,
'120180': 698,
'120207': 699,
'120241': 700,
'120246': 701,
'120278': 702,
'12030': 703,
'120321': 704,
'120343': 705,
'120383': 706,
'120428': 707,
'120442': 708,
'120453': 709,
'12046': 710,
'120462': 711,
'12049': 712,
'120518': 713,
'120541': 714,
'120553': 715,
'120556': 716,
'120558': 717,
'120581': 718,
'120585': 719,
'120649': 720,
'120680': 721,
'120687': 722,
'120721': 723,
'120722': 724,
'120734': 725,
'120749': 726,
'120768': 727,
'120793': 728,
'120844': 729,
'120848': 730,
'120856': 731,
'120885': 732,
'120891': 733,
'121049': 734,
'121054': 735,
'121095': 736,
'121132': 737,
'121146': 738,
'121165': 739,
'121217': 740,
'121222': 741,
'121314': 742,
'121316': 743,
'121385': 744,
'121394': 745,
'121417': 746,
'121449': 747,
'121452': 748,
'121462': 749,
'121478': 750,
'121494': 751,
'12151': 752,
'121517': 753,
'121548': 754,
'121570': 755,
'121572': 756,
'121665': 757,
'121703': 758,
'121759': 759,
'121762': 760,
'1218': 761,
'12186': 762,
'121864': 763,
'121873': 764,
'121887': 765,
'121990': 766,
'121991': 767,
'122022': 768,
'122075': 769,
'122129': 770,
'122142': 771,
'122145': 772,
'122149': 773,
'122153': 774,
'122228': 775,
'122234': 776,
'122246': 777,
'122258': 778,
'12226': 779,
'122283': 780,
'122284': 781,
'122367': 782,
'122400': 783,
'122418': 784,
'12244': 785,
'122463': 786,
'122482': 787,
'122516': 788,
'122574': 789,
'122610': 790,
'122614': 791,
'122644': 792,
'122658': 793,
'122737': 794,
'122752': 795,
'122791': 796,
'122808': 797,
'122852': 798,
'12287': 799,
'122875': 800,
'122884': 801,
'12291': 802,
'123079': 803,
'123095': 804,
'123123': 805,
'123147': 806,
'123159': 807,
'123166': 808,
'123225': 809,
'123281': 810,
'123309': 811,
'123315': 812,
'123359': 813,
'123411': 814,
'123449': 815,
'123454': 816,
'123477': 817,
'123481': 818,
'123509': 819,
'123528': 820,
'123558': 821,
'123562': 822,
'1236': 823,
'123611': 824,
'123633': 825,
'123650': 826,
'123697': 827,
'123698': 828,
'123731': 829,
'123735': 830,
'123738': 831,
'12375': 832,
'12386': 833,
'123914': 834,
'123923': 835,
'123951': 836,
'124000': 837,
'124008': 838,
'124101': 839,
'124109': 840,
'124128': 841,
'124149': 842,
'124153': 843,
'124164': 844,
'12418': 845,
'124183': 846,
'124194': 847,
'124218': 848,
'124279': 849,
'124292': 850,
'124298': 851,
'124309': 852,
'124349': 853,
'124406': 854,
'124430': 855,
'124455': 856,
'124460': 857,
'124461': 858,
'124478': 859,
'124494': 860,
'124516': 861,
'124524': 862,
'124527': 863,
'124620': 864,
'124675': 865,
'124680': 866,
'124718': 867,
'124722': 868,
'124745': 869,
'124769': 870,
'12477': 871,
'124814': 872,
'124836': 873,
'124838': 874,
'124913': 875,
'124923': 876,
'124924': 877,
'124928': 878,
'125015': 879,
'125017': 880,
'125020': 881,
'125092': 882,
'125169': 883,
'12517': 884,
'125194': 885,
'125250': 886,
'125425': 887,
'125430': 888,
'125434': 889,
'125459': 890,
'125483': 891,
'125547': 892,
'125568': 893,
'125589': 894,
'125613': 895,
'125631': 896,
'125706': 897,
'125724': 898,
'125734': 899,
'125765': 900,
'125786': 901,
'125802': 902,
'125808': 903,
'125831': 904,
'125845': 905,
'125866': 906,
'125884': 907,
'125897': 908,
'125954': 909,
'125992': 910,
'12600': 911,
'126046': 912,
'126058': 913,
'126061': 914,
'126100': 915,
'126131': 916,
'126133': 917,
'12614': 918,
'126159': 919,
'126194': 920,
'126241': 921,
'126255': 922,
'126267': 923,
'126285': 924,
'126290': 925,
'126382': 926,
'126401': 927,
'126432': 928,
'126465': 929,
'12647': 930,
'126501': 931,
'126547': 932,
'126599': 933,
'126619': 934,
'126637': 935,
'126721': 936,
'126729': 937,
'126746': 938,
'126780': 939,
'12679': 940,
'126811': 941,
'126906': 942,
'127014': 943,
'127020': 944,
'127047': 945,
'127072': 946,
'127084': 947,
'127120': 948,
'127155': 949,
'127255': 950,
'127272': 951,
'127320': 952,
'127324': 953,
'127346': 954,
'127347': 955,
'127358': 956,
'127366': 957,
'127434': 958,
'127442': 959,
'127457': 960,
'127496': 961,
'127514': 962,
'127516': 963,
'127523': 964,
'127535': 965,
'127549': 966,
'127664': 967,
'127667': 968,
'127668': 969,
'127677': 970,
'127739': 971,
'127765': 972,
'127766': 973,
'127894': 974,
'127896': 975,
'127989': 976,
'128069': 977,
'128073': 978,
'128151': 979,
'128234': 980,
'128268': 981,
'128314': 982,
'128320': 983,
'12833': 984,
'128336': 985,
'128357': 986,
'128435': 987,
'12844': 988,
'128599': 989,
'128606': 990,
'128627': 991,
'128628': 992,
'128666': 993,
'128680': 994,
'128697': 995,
'1287': 996,
'12877': 997,
'128771': 998,
'128796': 999,
'128847': 1000,
'128875': 1001,
'128938': 1002,
'128958': 1003,
'129044': 1004,
'129115': 1005,
'129144': 1006,
'129164': 1007,
'129182': 1008,
'129191': 1009,
'129200': 1010,
'129220': 1011,
'12923': 1012,
'129256': 1013,
'12927': 1014,
'129272': 1015,
'129318': 1016,
'129342': 1017,
'129428': 1018,
'129459': 1019,
'129472': 1020,
'129475': 1021,
'129495': 1022,
'129529': 1023,
'129553': 1024,
'12957': 1025,
'129601': 1026,
'129610': 1027,
'129633': 1028,
'129634': 1029,
'129682': 1030,
'129722': 1031,
'129724': 1032,
'129732': 1033,
'129741': 1034,
'129769': 1035,
'129781': 1036,
'129851': 1037,
'129914': 1038,
'129964': 1039,
'129984': 1040,
'130039': 1041,
'130087': 1042,
'130089': 1043,
'130097': 1044,
'130102': 1045,
'130183': 1046,
'1302': 1047,
'130205': 1048,
'130218': 1049,
'130282': 1050,
'130314': 1051,
'130330': 1052,
'130353': 1053,
'130386': 1054,
'130398': 1055,
'130413': 1056,
'13047': 1057,
'130505': 1058,
'130520': 1059,
'130533': 1060,
'130537': 1061,
'130588': 1062,
'130614': 1063,
'130632': 1064,
'130643': 1065,
'130702': 1066,
'130834': 1067,
'130864': 1068,
'130876': 1069,
'130899': 1070,
'130902': 1071,
'130906': 1072,
'130940': 1073,
'130954': 1074,
'130960': 1075,
'131016': 1076,
'131030': 1077,
'131042': 1078,
'131050': 1079,
'131095': 1080,
'131107': 1081,
'131112': 1082,
'13112': 1083,
'131161': 1084,
'131176': 1085,
'131209': 1086,
'131213': 1087,
'131355': 1088,
'131381': 1089,
'131429': 1090,
'131465': 1091,
'131503': 1092,
'131669': 1093,
'131722': 1094,
'131748': 1095,
'131755': 1096,
'131812': 1097,
'131896': 1098,
'131955': 1099,
'132033': 1100,
'132075': 1101,
'132172': 1102,
'132184': 1103,
'132215': 1104,
'132288': 1105,
'132336': 1106,
'132465': 1107,
'132468': 1108,
'132505': 1109,
'132555': 1110,
'132567': 1111,
'132570': 1112,
'132574': 1113,
'132575': 1114,
'132610': 1115,
'132614': 1116,
'132623': 1117,
'132640': 1118,
'132672': 1119,
'132685': 1120,
'132715': 1121,
'132718': 1122,
'132775': 1123,
'132787': 1124,
'132829': 1125,
'132842': 1126,
'132860': 1127,
'132884': 1128,
'132911': 1129,
'132915': 1130,
'132969': 1131,
'132978': 1132,
'133003': 1133,
'133011': 1134,
'133041': 1135,
'133066': 1136,
'133119': 1137,
'133122': 1138,
'133147': 1139,
'133179': 1140,
'133191': 1141,
'133226': 1142,
'133258': 1143,
'133425': 1144,
'133433': 1145,
'133448': 1146,
'133454': 1147,
'133457': 1148,
'133470': 1149,
'133490': 1150,
'133530': 1151,
'133535': 1152,
'133550': 1153,
'133563': 1154,
'133575': 1155,
'133586': 1156,
'133634': 1157,
'133647': 1158,
'133653': 1159,
'133681': 1160,
'133728': 1161,
'133734': 1162,
'133772': 1163,
'133800': 1164,
'133878': 1165,
'133880': 1166,
'133881': 1167,
'134012': 1168,
'134014': 1169,
'134019': 1170,
'13410': 1171,
'134125': 1172,
'13416': 1173,
'134161': 1174,
'134193': 1175,
'134202': 1176,
'134235': 1177,
'134262': 1178,
'134276': 1179,
'134303': 1180,
'134309': 1181,
'134311': 1182,
'134316': 1183,
'134322': 1184,
'134456': 1185,
'134466': 1186,
'1345': 1187,
'1346': 1188,
'134657': 1189,
'134676': 1190,
'13471': 1191,
'134736': 1192,
'134783': 1193,
'134844': 1194,
'134851': 1195,
'134872': 1196,
'134892': 1197,
'134939': 1198,
'13497': 1199,
'135106': 1200,
'135113': 1201,
'135169': 1202,
'135203': 1203,
'13524': 1204,
'135240': 1205,
'135274': 1206,
'135304': 1207,
'135432': 1208,
'135481': 1209,
'135503': 1210,
'135560': 1211,
'135591': 1212,
'135601': 1213,
'135613': 1214,
'135648': 1215,
'135653': 1216,
'135663': 1217,
'135677': 1218,
'135753': 1219,
'135767': 1220,
'135776': 1221,
'135789': 1222,
'135798': 1223,
'135822': 1224,
'135836': 1225,
'135855': 1226,
'135956': 1227,
'135959': 1228,
'135993': 1229,
'136': 1230,
'136000': 1231,
'136017': 1232,
'136050': 1233,
'136080': 1234,
'136090': 1235,
'136093': 1236,
'136140': 1237,
'136150': 1238,
'136166': 1239,
'136212': 1240,
'136221': 1241,
'136253': 1242,
'13628': 1243,
'136300': 1244,
'136302': 1245,
'136359': 1246,
'136409': 1247,
'136462': 1248,
'136468': 1249,
'136483': 1250,
'136511': 1251,
'136569': 1252,
'13665': 1253,
'136675': 1254,
'136684': 1255,
'136698': 1256,
'136712': 1257,
'136735': 1258,
'136755': 1259,
'136776': 1260,
'136801': 1261,
'136821': 1262,
'136827': 1263,
'13684': 1264,
'136842': 1265,
'136847': 1266,
'13685': 1267,
'136886': 1268,
'136899': 1269,
'136906': 1270,
'136940': 1271,
'136944': 1272,
'136964': 1273,
'136991': 1274,
'137005': 1275,
'137043': 1276,
'137113': 1277,
'137117': 1278,
'137149': 1279,
'137152': 1280,
'137165': 1281,
'137167': 1282,
'137184': 1283,
'137203': 1284,
'137295': 1285,
'137361': 1286,
'13738': 1287,
'137391': 1288,
'137412': 1289,
'137447': 1290,
'137508': 1291,
'13755': 1292,
'137558': 1293,
'137560': 1294,
'137574': 1295,
'137624': 1296,
'137656': 1297,
'137728': 1298,
'137738': 1299,
'137746': 1300,
'137783': 1301,
'137845': 1302,
'137910': 1303,
'137981': 1304,
'137999': 1305,
'138033': 1306,
'138055': 1307,
'13807': 1308,
'138082': 1309,
'138084': 1310,
'138132': 1311,
'138176': 1312,
'138178': 1313,
'138208': 1314,
'13821': 1315,
'138233': 1316,
'138247': 1317,
'138270': 1318,
'138293': 1319,
'138383': 1320,
'138395': 1321,
'138420': 1322,
'138471': 1323,
'138473': 1324,
'138483': 1325,
'138518': 1326,
'138526': 1327,
'13853': 1328,
'138598': 1329,
'138599': 1330,
'138602': 1331,
'138627': 1332,
'138635': 1333,
'13866': 1334,
'138662': 1335,
'138691': 1336,
'138736': 1337,
'138775': 1338,
'13878': 1339,
'13879': 1340,
'138853': 1341,
'138886': 1342,
'138906': 1343,
'138974': 1344,
'138982': 1345,
'139018': 1346,
'139038': 1347,
'139073': 1348,
'139114': 1349,
'139149': 1350,
'139157': 1351,
'139159': 1352,
'139186': 1353,
'139201': 1354,
'139210': 1355,
'139245': 1356,
'139256': 1357,
'139297': 1358,
'1393': 1359,
'139316': 1360,
'13935': 1361,
'139351': 1362,
'139352': 1363,
'139370': 1364,
'13943': 1365,
'139457': 1366,
'13954': 1367,
'139557': 1368,
'139565': 1369,
'139581': 1370,
'139589': 1371,
'139597': 1372,
'139624': 1373,
'139667': 1374,
'139671': 1375,
'139696': 1376,
'139706': 1377,
'139707': 1378,
'139721': 1379,
'13975': 1380,
'13978': 1381,
'139785': 1382,
'139808': 1383,
'139875': 1384,
'139894': 1385,
'139911': 1386,
'139916': 1387,
'139945': 1388,
'139956': 1389,
'139977': 1390,
'139980': 1391,
'139982': 1392,
'139996': 1393,
'140067': 1394,
'14009': 1395,
'140192': 1396,
'140248': 1397,
'140282': 1398,
'140311': 1399,
'140326': 1400,
'14042': 1401,
'14051': 1402,
'14052': 1403,
'140536': 1404,
'140548': 1405,
'140556': 1406,
'140564': 1407,
'140579': 1408,
'140590': 1409,
'140608': 1410,
'14065': 1411,
'140671': 1412,
'140734': 1413,
'140801': 1414,
'140818': 1415,
'140841': 1416,
'140845': 1417,
'140927': 1418,
'140964': 1419,
'140973': 1420,
'140998': 1421,
'141101': 1422,
'141113': 1423,
'141158': 1424,
'141241': 1425,
'141253': 1426,
'141266': 1427,
'14127': 1428,
'141327': 1429,
'141333': 1430,
'141336': 1431,
'14135': 1432,
'141365': 1433,
'141366': 1434,
'141388': 1435,
'141430': 1436,
'141458': 1437,
'141460': 1438,
'141487': 1439,
'14150': 1440,
'141521': 1441,
'141592': 1442,
'14160': 1443,
'141611': 1444,
'14162': 1445,
'141705': 1446,
'141715': 1447,
'141843': 1448,
'141860': 1449,
'141874': 1450,
'141893': 1451,
'141926': 1452,
'141927': 1453,
'14197': 1454,
'141991': 1455,
'142026': 1456,
'142147': 1457,
'142154': 1458,
'142201': 1459,
'142211': 1460,
'142236': 1461,
'142288': 1462,
'142296': 1463,
'142341': 1464,
'142343': 1465,
'142354': 1466,
'142366': 1467,
'142387': 1468,
'142413': 1469,
'142465': 1470,
'142469': 1471,
'142470': 1472,
'142505': 1473,
'142558': 1474,
'142644': 1475,
'142674': 1476,
'142704': 1477,
'142809': 1478,
'142855': 1479,
'142889': 1480,
'14291': 1481,
'142910': 1482,
'142920': 1483,
'142951': 1484,
'142971': 1485,
'143001': 1486,
'143024': 1487,
'143050': 1488,
'14307': 1489,
'14308': 1490,
'143131': 1491,
'143146': 1492,
'143157': 1493,
'143174': 1494,
'143203': 1495,
'143221': 1496,
'143267': 1497,
'143288': 1498,
'143361': 1499,
'143362': 1500,
'143373': 1501,
'143461': 1502,
'143508': 1503,
'143513': 1504,
'143521': 1505,
'143533': 1506,
'143574': 1507,
'143583': 1508,
'143595': 1509,
'143600': 1510,
'143640': 1511,
'143651': 1512,
'143667': 1513,
'143710': 1514,
'143711': 1515,
'143729': 1516,
'143857': 1517,
'143863': 1518,
'14387': 1519,
'143872': 1520,
'143881': 1521,
'143919': 1522,
'143954': 1523,
'14401': 1524,
'144036': 1525,
'144069': 1526,
'144099': 1527,
'144144': 1528,
'144164': 1529,
'144191': 1530,
'144201': 1531,
'144215': 1532,
'144231': 1533,
'144292': 1534,
'144355': 1535,
'144376': 1536,
'144430': 1537,
'144460': 1538,
'144501': 1539,
'144580': 1540,
'144588': 1541,
'144593': 1542,
'144633': 1543,
'144654': 1544,
'144674': 1545,
'144685': 1546,
'144734': 1547,
'14478': 1548,
'14490': 1549,
'144922': 1550,
'145': 1551,
'145015': 1552,
'145018': 1553,
'145065': 1554,
'145069': 1555,
'145110': 1556,
'145120': 1557,
'145134': 1558,
'145137': 1559,
'145206': 1560,
'145259': 1561,
'145268': 1562,
'145310': 1563,
'145325': 1564,
'145345': 1565,
'145398': 1566,
'145412': 1567,
'145429': 1568,
'145447': 1569,
'145474': 1570,
'14550': 1571,
'145543': 1572,
'145596': 1573,
'145735': 1574,
'145768': 1575,
'145785': 1576,
'145842': 1577,
'14587': 1578,
'145877': 1579,
'145884': 1580,
'145916': 1581,
'145920': 1582,
'145925': 1583,
'145934': 1584,
'145949': 1585,
'145978': 1586,
'145990': 1587,
'146058': 1588,
'14612': 1589,
'146145': 1590,
'146146': 1591,
'146178': 1592,
'146184': 1593,
'146187': 1594,
'146209': 1595,
'146244': 1596,
'146250': 1597,
'146277': 1598,
'146294': 1599,
'146331': 1600,
'146341': 1601,
'146359': 1602,
'146370': 1603,
'146388': 1604,
'146457': 1605,
'146497': 1606,
'14650': 1607,
'146535': 1608,
'146545': 1609,
'146564': 1610,
'146595': 1611,
'146624': 1612,
'146629': 1613,
'14663': 1614,
'146666': 1615,
'146717': 1616,
'146749': 1617,
'1468': 1618,
'146801': 1619,
'146813': 1620,
'146839': 1621,
'146866': 1622,
'146950': 1623,
'146968': 1624,
'146981': 1625,
'14699': 1626,
'146993': 1627,
'147013': 1628,
'147047': 1629,
'147057': 1630,
'147078': 1631,
'147091': 1632,
'147106': 1633,
'147120': 1634,
'147122': 1635,
'147125': 1636,
'147151': 1637,
'147227': 1638,
'147235': 1639,
'147237': 1640,
'147296': 1641,
'14733': 1642,
'147332': 1643,
'147365': 1644,
'147373': 1645,
'147404': 1646,
'147446': 1647,
'147486': 1648,
'147513': 1649,
'147588': 1650,
'147591': 1651,
'147683': 1652,
'147704': 1653,
'147716': 1654,
'147745': 1655,
'147765': 1656,
'147784': 1657,
'14780': 1658,
'147815': 1659,
'147828': 1660,
'147844': 1661,
'147873': 1662,
'147897': 1663,
'147990': 1664,
'147998': 1665,
'148045': 1666,
'148214': 1667,
'148222': 1668,
'148244': 1669,
'148255': 1670,
'148292': 1671,
'148300': 1672,
'148314': 1673,
'148331': 1674,
'14836': 1675,
'148585': 1676,
'148657': 1677,
'148729': 1678,
'148755': 1679,
'148766': 1680,
'148798': 1681,
'148799': 1682,
'148801': 1683,
'148806': 1684,
'148841': 1685,
'148850': 1686,
'148872': 1687,
'148895': 1688,
'148906': 1689,
'148923': 1690,
'148938': 1691,
'148968': 1692,
'148970': 1693,
'14900': 1694,
'149007': 1695,
'149049': 1696,
'149054': 1697,
'149091': 1698,
'149109': 1699,
'149142': 1700,
'14915': 1701,
'149180': 1702,
'149237': 1703,
'149302': 1704,
'149328': 1705,
'149346': 1706,
'149361': 1707,
'149362': 1708,
'149399': 1709,
'149403': 1710,
'149419': 1711,
'149425': 1712,
'149446': 1713,
'149447': 1714,
'149479': 1715,
'149518': 1716,
'149519': 1717,
'149565': 1718,
'149649': 1719,
'149683': 1720,
'149696': 1721,
'14972': 1722,
'149736': 1723,
'149737': 1724,
'149805': 1725,
'149806': 1726,
'149807': 1727,
'149862': 1728,
'149872': 1729,
'149906': 1730,
'149956': 1731,
'149978': 1732,
'149980': 1733,
'149995': 1734,
'150012': 1735,
'150054': 1736,
'150056': 1737,
'150077': 1738,
'150117': 1739,
'150140': 1740,
'150175': 1741,
'150179': 1742,
'150196': 1743,
'150198': 1744,
'150201': 1745,
'15021': 1746,
'150231': 1747,
'150256': 1748,
'150302': 1749,
'150385': 1750,
'150389': 1751,
'150397': 1752,
'150474': 1753,
'150478': 1754,
'150500': 1755,
'150502': 1756,
'150503': 1757,
'150524': 1758,
'15059': 1759,
'150591': 1760,
'150596': 1761,
'150597': 1762,
'15060': 1763,
'150619': 1764,
'150660': 1765,
'15070': 1766,
'150703': 1767,
'150733': 1768,
'150737': 1769,
'150778': 1770,
'150843': 1771,
'150849': 1772,
'150863': 1773,
'150918': 1774,
'150925': 1775,
'150977': 1776,
'150984': 1777,
'150996': 1778,
'150998': 1779,
'151025': 1780,
'151054': 1781,
'151199': 1782,
'15124': 1783,
'151254': 1784,
'151271': 1785,
'151343': 1786,
'15138': 1787,
'15142': 1788,
'151448': 1789,
'151471': 1790,
'151487': 1791,
'151561': 1792,
'151569': 1793,
'151586': 1794,
'151635': 1795,
'151652': 1796,
'151676': 1797,
'151754': 1798,
'151791': 1799,
'15188': 1800,
'15194': 1801,
'151942': 1802,
'151966': 1803,
'151982': 1804,
'151985': 1805,
'1520': 1806,
'152003': 1807,
'152020': 1808,
'152071': 1809,
'152141': 1810,
'152181': 1811,
'152182': 1812,
'152227': 1813,
'152254': 1814,
'152278': 1815,
'152279': 1816,
'152306': 1817,
'15231': 1818,
'152331': 1819,
'152334': 1820,
'152354': 1821,
'1524': 1822,
'152409': 1823,
'152418': 1824,
'152423': 1825,
'152496': 1826,
'152527': 1827,
'152550': 1828,
'152557': 1829,
'152673': 1830,
'152708': 1831,
'152728': 1832,
'152730': 1833,
'152749': 1834,
'152772': 1835,
'152789': 1836,
'152795': 1837,
'152827': 1838,
'152837': 1839,
'152950': 1840,
'152966': 1841,
'15298': 1842,
'153031': 1843,
'153033': 1844,
'153034': 1845,
'153069': 1846,
'153104': 1847,
'153105': 1848,
'153121': 1849,
'153123': 1850,
'153165': 1851,
'15317': 1852,
'153181': 1853,
'153194': 1854,
'153399': 1855,
'153401': 1856,
'153407': 1857,
'153412': 1858,
'153429': 1859,
'153471': 1860,
'153529': 1861,
'153604': 1862,
'153652': 1863,
'153654': 1864,
'153668': 1865,
'153700': 1866,
'153746': 1867,
'153766': 1868,
'153865': 1869,
'153890': 1870,
'153931': 1871,
'153945': 1872,
'153959': 1873,
'153998': 1874,
'154026': 1875,
'154054': 1876,
'154079': 1877,
'15409': 1878,
'154129': 1879,
'154162': 1880,
'154163': 1881,
'154192': 1882,
'154243': 1883,
'15427': 1884,
'1543': 1885,
'154306': 1886,
'154448': 1887,
'15445': 1888,
'154492': 1889,
'154498': 1890,
'154583': 1891,
'154670': 1892,
'154752': 1893,
'154764': 1894,
'15481': 1895,
'154820': 1896,
'15484': 1897,
'154880': 1898,
'154916': 1899,
'154959': 1900,
'154960': 1901,
'155007': 1902,
'155074': 1903,
'155087': 1904,
'155104': 1905,
'155119': 1906,
'15515': 1907,
'155194': 1908,
'155217': 1909,
'155244': 1910,
'155300': 1911,
'155303': 1912,
'15531': 1913,
'155329': 1914,
'155403': 1915,
'155413': 1916,
'155479': 1917,
'15548': 1918,
'155526': 1919,
'155532': 1920,
'155547': 1921,
'155641': 1922,
'155659': 1923,
'155699': 1924,
'155748': 1925,
'155750': 1926,
'155751': 1927,
'155785': 1928,
'155818': 1929,
'155819': 1930,
'155860': 1931,
'155886': 1932,
'155910': 1933,
'155966': 1934,
'155981': 1935,
'155995': 1936,
'156009': 1937,
'156021': 1938,
'156045': 1939,
'156108': 1940,
'156134': 1941,
'156135': 1942,
'15615': 1943,
'156232': 1944,
'156259': 1945,
'156278': 1946,
'156308': 1947,
'156342': 1948,
'156356': 1949,
'156363': 1950,
'156408': 1951,
'15646': 1952,
'156460': 1953,
'156479': 1954,
'156481': 1955,
'156483': 1956,
'156556': 1957,
'156682': 1958,
'156693': 1959,
'15673': 1960,
'156741': 1961,
'156816': 1962,
'156824': 1963,
'156864': 1964,
'15688': 1965,
'156911': 1966,
'156914': 1967,
'156931': 1968,
'156969': 1969,
'156978': 1970,
'156993': 1971,
'157043': 1972,
'157052': 1973,
'157070': 1974,
'157072': 1975,
'15709': 1976,
'157116': 1977,
'157122': 1978,
'157147': 1979,
'157170': 1980,
'15720': 1981,
'157231': 1982,
'157393': 1983,
'15741': 1984,
'157472': 1985,
'157502': 1986,
'157511': 1987,
'157538': 1988,
'157630': 1989,
'157652': 1990,
'157661': 1991,
'157753': 1992,
'157756': 1993,
'157791': 1994,
'157849': 1995,
'157924': 1996,
'157981': 1997,
'157982': 1998,
'158054': 1999,
'158062': 2000,
'158081': 2001,
'158085': 2002,
'158155': 2003,
'158169': 2004,
'158171': 2005,
'158232': 2006,
'158273': 2007,
'158317': 2008,
'158318': 2009,
'15833': 2010,
'158344': 2011,
'158345': 2012,
'158347': 2013,
'158369': 2014,
'158414': 2015,
'158443': 2016,
'158498': 2017,
'1585': 2018,
'158522': 2019,
'158524': 2020,
'158544': 2021,
'15859': 2022,
'158629': 2023,
'158663': 2024,
'15867': 2025,
'158671': 2026,
'158744': 2027,
'158753': 2028,
'15876': 2029,
'15880': 2030,
'158818': 2031,
'158844': 2032,
'158921': 2033,
'158928': 2034,
'15895': 2035,
'158966': 2036,
'158991': 2037,
'159006': 2038,
'159007': 2039,
'159019': 2040,
'159036': 2041,
'159124': 2042,
'159127': 2043,
'159237': 2044,
'159334': 2045,
'159342': 2046,
'159412': 2047,
'159476': 2048,
'159483': 2049,
'159521': 2050,
'159539': 2051,
'159546': 2052,
'159610': 2053,
'159623': 2054,
'159625': 2055,
'15968': 2056,
'159727': 2057,
'159753': 2058,
'159765': 2059,
'159854': 2060,
'159952': 2061,
'160013': 2062,
'160041': 2063,
'160043': 2064,
'160071': 2065,
'160110': 2066,
'16014': 2067,
'160200': 2068,
'160230': 2069,
'160240': 2070,
'160254': 2071,
'160283': 2072,
'160333': 2073,
'160404': 2074,
'160421': 2075,
'160426': 2076,
'160466': 2077,
'160530': 2078,
'160555': 2079,
'160557': 2080,
'160559': 2081,
'160572': 2082,
'160627': 2083,
'16067': 2084,
'1607': 2085,
'160713': 2086,
'160778': 2087,
'160847': 2088,
'160860': 2089,
'16089': 2090,
'160944': 2091,
'160964': 2092,
'160978': 2093,
'161082': 2094,
'161093': 2095,
'161163': 2096,
'161181': 2097,
'161213': 2098,
'16124': 2099,
'161255': 2100,
'161287': 2101,
'161315': 2102,
'161326': 2103,
'161376': 2104,
'161409': 2105,
'161427': 2106,
'16146': 2107,
'161478': 2108,
'161479': 2109,
'161482': 2110,
'161495': 2111,
'161512': 2112,
'161545': 2113,
'161592': 2114,
'161668': 2115,
'161672': 2116,
'161713': 2117,
'161718': 2118,
'161719': 2119,
'161720': 2120,
'161728': 2121,
'16177': 2122,
'161803': 2123,
'161878': 2124,
'161893': 2125,
'161902': 2126,
'161905': 2127,
'161932': 2128,
'161941': 2129,
'161998': 2130,
'162016': 2131,
'162032': 2132,
'162042': 2133,
'162110': 2134,
'162141': 2135,
'162142': 2136,
'16217': 2137,
'162213': 2138,
'162220': 2139,
'162290': 2140,
'162345': 2141,
'162403': 2142,
'162469': 2143,
'16247': 2144,
'162486': 2145,
'162490': 2146,
'162547': 2147,
'162552': 2148,
'162569': 2149,
'162590': 2150,
'162600': 2151,
'162604': 2152,
'162605': 2153,
'162620': 2154,
'162634': 2155,
'162777': 2156,
'16281': 2157,
'162823': 2158,
'162833': 2159,
'162849': 2160,
'162874': 2161,
'162881': 2162,
'162952': 2163,
'162959': 2164,
'163005': 2165,
'163035': 2166,
'16307': 2167,
'163072': 2168,
'163105': 2169,
'163120': 2170,
'16314': 2171,
'163153': 2172,
'163179': 2173,
'163217': 2174,
'163227': 2175,
'163280': 2176,
'163307': 2177,
'163381': 2178,
'163477': 2179,
'163540': 2180,
'163604': 2181,
'16361': 2182,
'163677': 2183,
'163706': 2184,
'163805': 2185,
'163896': 2186,
'163897': 2187,
'163919': 2188,
'16392': 2189,
'163944': 2190,
'163945': 2191,
'163958': 2192,
'163968': 2193,
'164017': 2194,
'164019': 2195,
'164020': 2196,
'164029': 2197,
'164046': 2198,
'164061': 2199,
'164083': 2200,
'164103': 2201,
'164137': 2202,
'164154': 2203,
'164179': 2204,
'164191': 2205,
'164195': 2206,
'16427': 2207,
'164273': 2208,
'164406': 2209,
'164423': 2210,
'164428': 2211,
'164456': 2212,
'164468': 2213,
'164482': 2214,
'164485': 2215,
'164580': 2216,
'16460': 2217,
'164661': 2218,
'164705': 2219,
'164734': 2220,
'164773': 2221,
'164779': 2222,
'164804': 2223,
'164845': 2224,
'164862': 2225,
'164886': 2226,
'164962': 2227,
'164975': 2228,
'165045': 2229,
'165048': 2230,
'165053': 2231,
'165097': 2232,
'165103': 2233,
'165160': 2234,
'165179': 2235,
'16519': 2236,
'165192': 2237,
'165247': 2238,
'165295': 2239,
'165369': 2240,
'165415': 2241,
'165500': 2242,
'165524': 2243,
'165569': 2244,
'165577': 2245,
'165596': 2246,
'16563': 2247,
'165689': 2248,
'165692': 2249,
'165751': 2250,
'165771': 2251,
'16580': 2252,
'165812': 2253,
'165900': 2254,
'165985': 2255,
'166032': 2256,
'166033': 2257,
'166072': 2258,
'166098': 2259,
'16610': 2260,
'166107': 2261,
'166123': 2262,
'166198': 2263,
'16623': 2264,
'166247': 2265,
'166284': 2266,
'166293': 2267,
'16631': 2268,
'166392': 2269,
'166418': 2270,
'166514': 2271,
'166563': 2272,
'16658': 2273,
'166705': 2274,
'166718': 2275,
'166737': 2276,
'166739': 2277,
'166759': 2278,
'166810': 2279,
'166820': 2280,
'166831': 2281,
'166835': 2282,
'166854': 2283,
'166926': 2284,
'166934': 2285,
'166964': 2286,
'166986': 2287,
'167030': 2288,
'167037': 2289,
'167092': 2290,
'167170': 2291,
'167188': 2292,
'167223': 2293,
'167275': 2294,
'167310': 2295,
'16737': 2296,
'167422': 2297,
'167435': 2298,
'167465': 2299,
'167506': 2300,
'167512': 2301,
'16753': 2302,
'167548': 2303,
'167549': 2304,
'167559': 2305,
'167616': 2306,
'167619': 2307,
'167620': 2308,
'167673': 2309,
'167683': 2310,
'167692': 2311,
'167702': 2312,
'167738': 2313,
'167764': 2314,
'167800': 2315,
'167807': 2316,
'167864': 2317,
'16789': 2318,
'167911': 2319,
'167918': 2320,
'167929': 2321,
'167942': 2322,
'167988': 2323,
'16801': 2324,
'168021': 2325,
'168059': 2326,
'168071': 2327,
'168098': 2328,
'168106': 2329,
'168116': 2330,
'168123': 2331,
'168148': 2332,
'16820': 2333,
'168203': 2334,
'168227': 2335,
'168263': 2336,
'168280': 2337,
'168311': 2338,
'16832': 2339,
'168338': 2340,
'168342': 2341,
'16835': 2342,
'168376': 2343,
'16840': 2344,
'168452': 2345,
'168460': 2346,
'168466': 2347,
'168493': 2348,
'1685': 2349,
'168511': 2350,
'168542': 2351,
'168547': 2352,
'168553': 2353,
'168570': 2354,
'168578': 2355,
'168638': 2356,
'168645': 2357,
'168669': 2358,
'168701': 2359,
'168733': 2360,
'168772': 2361,
'168812': 2362,
'168847': 2363,
'168856': 2364,
'168857': 2365,
'168879': 2366,
'168923': 2367,
'168981': 2368,
'168988': 2369,
'169021': 2370,
'169043': 2371,
'169053': 2372,
'16912': 2373,
'169130': 2374,
'169132': 2375,
'169182': 2376,
'169189': 2377,
'169217': 2378,
'169231': 2379,
'169233': 2380,
'16925': 2381,
'169256': 2382,
'169271': 2383,
'169272': 2384,
'169289': 2385,
'169336': 2386,
'169349': 2387,
'169364': 2388,
'169413': 2389,
'169422': 2390,
'169439': 2391,
'169465': 2392,
'169468': 2393,
'169507': 2394,
'169557': 2395,
'169594': 2396,
'16963': 2397,
'169634': 2398,
'169683': 2399,
'169725': 2400,
'169732': 2401,
'169795': 2402,
'169804': 2403,
'169819': 2404,
'169864': 2405,
'169868': 2406,
'169872': 2407,
'169904': 2408,
'169921': 2409,
'169933': 2410,
'16996': 2411,
'169965': 2412,
'169983': 2413,
'169991': 2414,
'170004': 2415,
'170025': 2416,
'170033': 2417,
'170037': 2418,
'170091': 2419,
'170104': 2420,
'170152': 2421,
'170156': 2422,
'17017': 2423,
'170229': 2424,
'170245': 2425,
'170288': 2426,
'170307': 2427,
'170351': 2428,
'170373': 2429,
'170458': 2430,
'170494': 2431,
'170612': 2432,
'170651': 2433,
'170670': 2434,
'170711': 2435,
'170717': 2436,
'170720': 2437,
'170757': 2438,
'170774': 2439,
'170792': 2440,
'170802': 2441,
'170832': 2442,
'170840': 2443,
'170944': 2444,
'170955': 2445,
'170969': 2446,
'170974': 2447,
'171044': 2448,
'171061': 2449,
'171077': 2450,
'171085': 2451,
'171091': 2452,
'171117': 2453,
'171130': 2454,
'171140': 2455,
'171147': 2456,
'171150': 2457,
'17116': 2458,
'171176': 2459,
'171222': 2460,
'171300': 2461,
'171303': 2462,
'171308': 2463,
'171347': 2464,
'171349': 2465,
'171355': 2466,
'171364': 2467,
'171413': 2468,
'171418': 2469,
'171435': 2470,
'171456': 2471,
'171457': 2472,
'171498': 2473,
'171546': 2474,
'171558': 2475,
'171575': 2476,
'171580': 2477,
'1716': 2478,
'171626': 2479,
'171650': 2480,
'171651': 2481,
'171683': 2482,
'171772': 2483,
'171786': 2484,
'171801': 2485,
'171807': 2486,
'171901': 2487,
'171903': 2488,
'171905': 2489,
'171993': 2490,
'172040': 2491,
'172056': 2492,
'172063': 2493,
'172104': 2494,
'172109': 2495,
'17212': 2496,
'172124': 2497,
'172126': 2498,
'172138': 2499,
'172201': 2500,
'172214': 2501,
'17222': 2502,
'172220': 2503,
'172242': 2504,
'172288': 2505,
'172328': 2506,
'172335': 2507,
'172336': 2508,
'172357': 2509,
'17238': 2510,
'172412': 2511,
'172432': 2512,
'17244': 2513,
'172461': 2514,
'172564': 2515,
'172647': 2516,
'172650': 2517,
'172651': 2518,
'172669': 2519,
'172692': 2520,
'172700': 2521,
'172721': 2522,
'172767': 2523,
'172774': 2524,
'17279': 2525,
'172806': 2526,
'172820': 2527,
'172864': 2528,
'172891': 2529,
'172903': 2530,
'172904': 2531,
'172929': 2532,
'172941': 2533,
'172991': 2534,
'17304': 2535,
'173078': 2536,
'173083': 2537,
'173141': 2538,
'173224': 2539,
'173291': 2540,
'173336': 2541,
'173350': 2542,
'173402': 2543,
'173403': 2544,
'173404': 2545,
'173450': 2546,
'173462': 2547,
'173511': 2548,
'173522': 2549,
'173542': 2550,
'173556': 2551,
'173576': 2552,
'17358': 2553,
'173666': 2554,
'173668': 2555,
'173700': 2556,
'173767': 2557,
'173790': 2558,
'173825': 2559,
'173828': 2560,
'173850': 2561,
'173857': 2562,
'173890': 2563,
'17395': 2564,
'17403': 2565,
'174032': 2566,
'174069': 2567,
'174070': 2568,
'174130': 2569,
'174138': 2570,
'174158': 2571,
'174159': 2572,
'174160': 2573,
'174168': 2574,
'174181': 2575,
'174205': 2576,
'174253': 2577,
'174275': 2578,
'174321': 2579,
'174349': 2580,
'174440': 2581,
'174563': 2582,
'174672': 2583,
'174697': 2584,
'174715': 2585,
'174730': 2586,
'174731': 2587,
'174735': 2588,
'17476': 2589,
'174763': 2590,
'174765': 2591,
'174834': 2592,
'174877': 2593,
'174911': 2594,
'174926': 2595,
'174934': 2596,
'174957': 2597,
'175049': 2598,
'175054': 2599,
'175105': 2600,
'175152': 2601,
'175188': 2602,
'175201': 2603,
'175219': 2604,
'17523': 2605,
'175237': 2606,
'175238': 2607,
'175254': 2608,
'175283': 2609,
'175356': 2610,
'175360': 2611,
'175410': 2612,
'175431': 2613,
'175432': 2614,
'175469': 2615,
'175494': 2616,
'175499': 2617,
'175579': 2618,
'1757': 2619,
'175702': 2620,
'175757': 2621,
'175774': 2622,
'175829': 2623,
'175867': 2624,
'175893': 2625,
'175906': 2626,
'175919': 2627,
'175950': 2628,
'17599': 2629,
'176018': 2630,
'176036': 2631,
'176044': 2632,
'176048': 2633,
'17605': 2634,
'17608': 2635,
'176087': 2636,
'176111': 2637,
'176144': 2638,
'176158': 2639,
'176163': 2640,
'176222': 2641,
'17631': 2642,
'176342': 2643,
'176349': 2644,
'176357': 2645,
'176439': 2646,
'17645': 2647,
'176457': 2648,
'176484': 2649,
'176488': 2650,
'176528': 2651,
'176555': 2652,
'17657': 2653,
'176578': 2654,
'176637': 2655,
'176650': 2656,
'176653': 2657,
'176670': 2658,
'176684': 2659,
'176758': 2660,
'176805': 2661,
'176862': 2662,
'176899': 2663,
'176946': 2664,
'176956': 2665,
'177007': 2666,
'177008': 2667,
'177051': 2668,
'177071': 2669,
'177093': 2670,
'17712': 2671,
'17716': 2672,
'177194': 2673,
'177199': 2674,
'17721': 2675,
'177253': 2676,
'177255': 2677,
'177258': 2678,
'177268': 2679,
'177305': 2680,
'177335': 2681,
'177350': 2682,
'177376': 2683,
'177381': 2684,
'177409': 2685,
'177423': 2686,
'177440': 2687,
'177452': 2688,
'177501': 2689,
'17757': 2690,
'177586': 2691,
'177599': 2692,
'1776': 2693,
'177602': 2694,
'177677': 2695,
'177682': 2696,
'177687': 2697,
'177690': 2698,
'177761': 2699,
'177770': 2700,
'177774': 2701,
'177780': 2702,
'177870': 2703,
'177875': 2704,
'177899': 2705,
'177986': 2706,
'178006': 2707,
'178007': 2708,
'178014': 2709,
'17808': 2710,
'178085': 2711,
'178111': 2712,
'178127': 2713,
'178193': 2714,
'178271': 2715,
'178286': 2716,
'178297': 2717,
'17831': 2718,
'178350': 2719,
'178386': 2720,
'178441': 2721,
'178472': 2722,
'178490': 2723,
'178514': 2724,
'178519': 2725,
'178526': 2726,
'178544': 2727,
'178545': 2728,
'17860': 2729,
'178660': 2730,
'17872': 2731,
'178720': 2732,
'178793': 2733,
'178801': 2734,
'178809': 2735,
'178812': 2736,
'178829': 2737,
'178870': 2738,
'178872': 2739,
'178910': 2740,
'178931': 2741,
'178973': 2742,
'179072': 2743,
'179088': 2744,
'1791': 2745,
'179113': 2746,
'179171': 2747,
'179194': 2748,
'179269': 2749,
'179333': 2750,
'179348': 2751,
'179369': 2752,
'179380': 2753,
'179405': 2754,
'179425': 2755,
'179443': 2756,
'179486': 2757,
'179581': 2758,
'17960': 2759,
'179602': 2760,
'179626': 2761,
'179650': 2762,
'179705': 2763,
'179775': 2764,
'179839': 2765,
'179856': 2766,
'179857': 2767,
'179864': 2768,
'17994': 2769,
'179959': 2770,
'179977': 2771,
'179986': 2772,
'180005': 2773,
'180008': 2774,
'180072': 2775,
'180087': 2776,
'180111': 2777,
'18012': 2778,
'180133': 2779,
'180147': 2780,
'180151': 2781,
'180180': 2782,
'180260': 2783,
'180264': 2784,
'180308': 2785,
'180346': 2786,
'18035': 2787,
'180361': 2788,
'180450': 2789,
'180462': 2790,
'18059': 2791,
'180592': 2792,
'180646': 2793,
'180706': 2794,
'180735': 2795,
'180759': 2796,
'180762': 2797,
'180773': 2798,
'180776': 2799,
'180825': 2800,
'180836': 2801,
'180838': 2802,
'180901': 2803,
'180970': 2804,
'180982': 2805,
'180986': 2806,
'180988': 2807,
'181041': 2808,
'181042': 2809,
'181054': 2810,
'181074': 2811,
'181075': 2812,
'181078': 2813,
'181082': 2814,
'181083': 2815,
'181087': 2816,
'181130': 2817,
'181178': 2818,
'181236': 2819,
'181239': 2820,
'181267': 2821,
'181281': 2822,
'181291': 2823,
'181298': 2824,
'181322': 2825,
'181345': 2826,
'181387': 2827,
'181401': 2828,
'181508': 2829,
'18152': 2830,
'181523': 2831,
'181602': 2832,
'181631': 2833,
'181639': 2834,
'18165': 2835,
'181656': 2836,
'181658': 2837,
'181659': 2838,
'181674': 2839,
'181688': 2840,
'181701': 2841,
'181712': 2842,
'181739': 2843,
'181740': 2844,
'181804': 2845,
'181805': 2846,
'181947': 2847,
'181948': 2848,
'181959': 2849,
'181988': 2850,
'182056': 2851,
'182098': 2852,
'182168': 2853,
'182198': 2854,
'182228': 2855,
'18224': 2856,
'182262': 2857,
'182387': 2858,
'182388': 2859,
'182430': 2860,
'18246': 2861,
'182463': 2862,
'182506': 2863,
'182511': 2864,
'182537': 2865,
'18256': 2866,
'182583': 2867,
'182597': 2868,
'182654': 2869,
'182683': 2870,
'182693': 2871,
'182735': 2872,
'182737': 2873,
'182746': 2874,
'182775': 2875,
'182789': 2876,
'182814': 2877,
'18282': 2878,
'182846': 2879,
'182908': 2880,
'182935': 2881,
'182942': 2882,
'182973': 2883,
'182989': 2884,
'183037': 2885,
'183077': 2886,
'183099': 2887,
'18312': 2888,
'183125': 2889,
'183151': 2890,
'183170': 2891,
'183192': 2892,
'183247': 2893,
'183252': 2894,
'183360': 2895,
'183374': 2896,
'183422': 2897,
'183447': 2898,
'183467': 2899,
'183493': 2900,
'183515': 2901,
'183531': 2902,
'183535': 2903,
'183541': 2904,
'183574': 2905,
'183580': 2906,
'183634': 2907,
'183668': 2908,
'183672': 2909,
'183804': 2910,
'183839': 2911,
'183843': 2912,
'183859': 2913,
'18388': 2914,
'183883': 2915,
'183912': 2916,
'18392': 2917,
'183933': 2918,
'183956': 2919,
'184018': 2920,
'184025': 2921,
'184038': 2922,
'18409': 2923,
'184144': 2924,
'18418': 2925,
'1842': 2926,
'184205': 2927,
'184313': 2928,
'184407': 2929,
'184435': 2930,
'184479': 2931,
'184512': 2932,
'18456': 2933,
'184566': 2934,
'184648': 2935,
'184658': 2936,
'18471': 2937,
'184746': 2938,
'184757': 2939,
'184758': 2940,
'184811': 2941,
'184835': 2942,
'18488': 2943,
'184907': 2944,
'184919': 2945,
'184952': 2946,
'184962': 2947,
'185012': 2948,
'185094': 2949,
'185100': 2950,
'185101': 2951,
'185116': 2952,
'185182': 2953,
'185190': 2954,
'185193': 2955,
'185197': 2956,
'185200': 2957,
'185205': 2958,
'185272': 2959,
'185274': 2960,
'185302': 2961,
'185319': 2962,
'185455': 2963,
'185491': 2964,
'185510': 2965,
'185532': 2966,
'185558': 2967,
'18562': 2968,
'185641': 2969,
'185729': 2970,
'185829': 2971,
'185852': 2972,
'185896': 2973,
'185938': 2974,
'185957': 2975,
'186011': 2976,
'186012': 2977,
'186043': 2978,
'186051': 2979,
'18615': 2980,
'186171': 2981,
'186221': 2982,
'186250': 2983,
'186258': 2984,
'186314': 2985,
'186389': 2986,
'186426': 2987,
'186438': 2988,
'186439': 2989,
'186446': 2990,
'186453': 2991,
'18647': 2992,
'186511': 2993,
'186527': 2994,
'186538': 2995,
'186541': 2996,
'186551': 2997,
'186586': 2998,
'186607': 2999,
'186615': 3000,
'186634': 3001,
'186662': 3002,
'186683': 3003,
'186743': 3004,
'18676': 3005,
'18678': 3006,
'18679': 3007,
'186793': 3008,
'186795': 3009,
'186803': 3010,
'186813': 3011,
'186859': 3012,
'186860': 3013,
'186908': 3014,
'186921': 3015,
'186954': 3016,
'186957': 3017,
'186962': 3018,
'186992': 3019,
'18700': 3020,
'187002': 3021,
'187055': 3022,
'187060': 3023,
'187083': 3024,
'187106': 3025,
'187139': 3026,
'187149': 3027,
'187196': 3028,
'187197': 3029,
'187209': 3030,
'187215': 3031,
'187223': 3032,
'187225': 3033,
'18739': 3034,
'187393': 3035,
'187403': 3036,
'187423': 3037,
'18746': 3038,
'1875': 3039,
'18751': 3040,
'187515': 3041,
'187537': 3042,
'187563': 3043,
'187565': 3044,
'187597': 3045,
'187628': 3046,
'187643': 3047,
'18767': 3048,
'187685': 3049,
'187742': 3050,
'187779': 3051,
'187851': 3052,
'187853': 3053,
'18786': 3054,
'187861': 3055,
'187882': 3056,
'187897': 3057,
'187900': 3058,
'187932': 3059,
'187945': 3060,
'188047': 3061,
'188055': 3062,
'188070': 3063,
'188088': 3064,
'188108': 3065,
'188119': 3066,
'188174': 3067,
'188195': 3068,
'188225': 3069,
'188232': 3070,
'188329': 3071,
'188354': 3072,
'188357': 3073,
'188369': 3074,
'188407': 3075,
'188410': 3076,
'188417': 3077,
'188451': 3078,
'18849': 3079,
'18854': 3080,
'18855': 3081,
'188553': 3082,
'188554': 3083,
'18859': 3084,
'188599': 3085,
'188622': 3086,
'188647': 3087,
'188681': 3088,
'188686': 3089,
'188696': 3090,
'188711': 3091,
'188741': 3092,
'188772': 3093,
'188787': 3094,
'188789': 3095,
'188812': 3096,
'188817': 3097,
'188834': 3098,
'188866': 3099,
'188934': 3100,
'188952': 3101,
'188975': 3102,
'188999': 3103,
'189': 3104,
'189000': 3105,
'189009': 3106,
'189010': 3107,
'189016': 3108,
'189022': 3109,
'189029': 3110,
'189042': 3111,
'189136': 3112,
'189217': 3113,
'189218': 3114,
'189231': 3115,
'18926': 3116,
'18931': 3117,
'18932': 3118,
'189339': 3119,
'189371': 3120,
'189410': 3121,
'18942': 3122,
'189446': 3123,
'189553': 3124,
'189575': 3125,
'189587': 3126,
'189661': 3127,
'189688': 3128,
'189715': 3129,
'189723': 3130,
'189788': 3131,
'189811': 3132,
'18987': 3133,
'189907': 3134,
'189915': 3135,
'189971': 3136,
'189988': 3137,
'190000': 3138,
'190023': 3139,
'190106': 3140,
'190144': 3141,
'190173': 3142,
'190179': 3143,
'190191': 3144,
'190216': 3145,
'190218': 3146,
'190220': 3147,
'190230': 3148,
'190241': 3149,
'190245': 3150,
'190271': 3151,
'190283': 3152,
'190307': 3153,
'190334': 3154,
'190374': 3155,
'190433': 3156,
'190441': 3157,
'190456': 3158,
'190527': 3159,
'190573': 3160,
'190577': 3161,
'190587': 3162,
'190595': 3163,
'190602': 3164,
'190644': 3165,
'190648': 3166,
'190665': 3167,
'190708': 3168,
'190711': 3169,
'190717': 3170,
'190721': 3171,
'190781': 3172,
'190822': 3173,
'190830': 3174,
'190842': 3175,
'190869': 3176,
'190879': 3177,
'190929': 3178,
'190946': 3179,
'190948': 3180,
'19095': 3181,
'190956': 3182,
'190960': 3183,
'190972': 3184,
'191001': 3185,
'191015': 3186,
'191033': 3187,
'191041': 3188,
'191050': 3189,
'191062': 3190,
'191140': 3191,
'191141': 3192,
'191153': 3193,
'191183': 3194,
'191200': 3195,
'191228': 3196,
'191243': 3197,
'191292': 3198,
'191293': 3199,
'19130': 3200,
'191323': 3201,
'191334': 3202,
'191362': 3203,
'191369': 3204,
'191370': 3205,
'191493': 3206,
'191497': 3207,
'191558': 3208,
'191568': 3209,
'191597': 3210,
'191603': 3211,
'191621': 3212,
'191666': 3213,
'191756': 3214,
'191829': 3215,
'191889': 3216,
'191892': 3217,
'19191': 3218,
'191934': 3219,
'191978': 3220,
'192': 3221,
'19201': 3222,
'192024': 3223,
'192035': 3224,
'192047': 3225,
'192065': 3226,
'192101': 3227,
'192186': 3228,
'192191': 3229,
'192233': 3230,
'192235': 3231,
'192317': 3232,
'192334': 3233,
'192349': 3234,
'19238': 3235,
'19239': 3236,
'192398': 3237,
'1924': 3238,
'192423': 3239,
'192468': 3240,
'192479': 3241,
'192488': 3242,
'192505': 3243,
'192583': 3244,
'192605': 3245,
'192619': 3246,
'192625': 3247,
'192637': 3248,
'192662': 3249,
'192683': 3250,
'192701': 3251,
'192761': 3252,
'192794': 3253,
'19282': 3254,
'192831': 3255,
'192870': 3256,
'192903': 3257,
'192925': 3258,
'192931': 3259,
'19297': 3260,
'193102': 3261,
'193106': 3262,
'193129': 3263,
'193164': 3264,
'193225': 3265,
'19323': 3266,
'193258': 3267,
'193296': 3268,
'193358': 3269,
'193374': 3270,
'193402': 3271,
'193419': 3272,
'193482': 3273,
'193486': 3274,
'193505': 3275,
'193550': 3276,
'193560': 3277,
'193580': 3278,
'193603': 3279,
'193631': 3280,
'193635': 3281,
'193701': 3282,
'193730': 3283,
'193738': 3284,
'193781': 3285,
'193833': 3286,
'193938': 3287,
'193962': 3288,
'19402': 3289,
'194027': 3290,
'194037': 3291,
'194043': 3292,
'194047': 3293,
'194092': 3294,
'194094': 3295,
'194101': 3296,
'194130': 3297,
'194135': 3298,
'194198': 3299,
'194286': 3300,
'19430': 3301,
'194337': 3302,
'194340': 3303,
'19439': 3304,
'194406': 3305,
'194407': 3306,
'194449': 3307,
'19449': 3308,
'19451': 3309,
'194521': 3310,
'19455': 3311,
'194571': 3312,
'194692': 3313,
'194721': 3314,
'194740': 3315,
'194818': 3316,
'194827': 3317,
'194838': 3318,
'194886': 3319,
'194889': 3320,
'194896': 3321,
'194914': 3322,
'195008': 3323,
'195083': 3324,
'195139': 3325,
'195145': 3326,
'195263': 3327,
'195265': 3328,
'195296': 3329,
'195301': 3330,
'195361': 3331,
'195363': 3332,
'195366': 3333,
'195382': 3334,
'195396': 3335,
'195412': 3336,
'195432': 3337,
'195465': 3338,
'195477': 3339,
'195510': 3340,
'195513': 3341,
'195542': 3342,
'195546': 3343,
'195555': 3344,
'195562': 3345,
'195584': 3346,
'195607': 3347,
'195619': 3348,
'195660': 3349,
'195802': 3350,
'195811': 3351,
'195814': 3352,
'195823': 3353,
'195862': 3354,
'195900': 3355,
'195909': 3356,
'195930': 3357,
'195974': 3358,
'196001': 3359,
'19601': 3360,
'19605': 3361,
'196059': 3362,
'196103': 3363,
'196216': 3364,
'196241': 3365,
'196358': 3366,
'196366': 3367,
'196387': 3368,
'19643': 3369,
'196454': 3370,
'19647': 3371,
'196482': 3372,
'196598': 3373,
'196634': 3374,
'196640': 3375,
'196682': 3376,
'196692': 3377,
'196699': 3378,
'196722': 3379,
'196735': 3380,
'196834': 3381,
'196873': 3382,
'196877': 3383,
'196886': 3384,
'196902': 3385,
'196961': 3386,
'196962': 3387,
'196990': 3388,
'197014': 3389,
'197068': 3390,
'197069': 3391,
'197115': 3392,
'197232': 3393,
'197244': 3394,
'197321': 3395,
'197341': 3396,
'197372': 3397,
'197408': 3398,
'197413': 3399,
'197428': 3400,
'197429': 3401,
'197510': 3402,
'197519': 3403,
'197579': 3404,
'197585': 3405,
'197631': 3406,
'197645': 3407,
'197699': 3408,
'197884': 3409,
'198011': 3410,
'198047': 3411,
'198052': 3412,
'198059': 3413,
'198093': 3414,
'198120': 3415,
'198124': 3416,
'198152': 3417,
'198184': 3418,
'198208': 3419,
'198229': 3420,
'198237': 3421,
'198351': 3422,
'198379': 3423,
'198396': 3424,
'198451': 3425,
'198519': 3426,
'198560': 3427,
'198570': 3428,
'19859': 3429,
'198594': 3430,
'198626': 3431,
'198643': 3432,
'198655': 3433,
'198657': 3434,
'198674': 3435,
'198711': 3436,
'198713': 3437,
'198792': 3438,
'198821': 3439,
'198831': 3440,
'198838': 3441,
'198848': 3442,
'198849': 3443,
'198880': 3444,
'198912': 3445,
'198916': 3446,
'198945': 3447,
'198963': 3448,
'198970': 3449,
'198988': 3450,
'199044': 3451,
'199181': 3452,
'199188': 3453,
'199209': 3454,
'199222': 3455,
'199265': 3456,
'199285': 3457,
'1993': 3458,
'199333': 3459,
'19943': 3460,
'199450': 3461,
'199455': 3462,
'199506': 3463,
'199507': 3464,
'199527': 3465,
'199597': 3466,
'199613': 3467,
'199735': 3468,
'19977': 3469,
'199787': 3470,
'199815': 3471,
'199826': 3472,
'199936': 3473,
'199986': 3474,
'200000': 3475,
'200080': 3476,
'200097': 3477,
'200101': 3478,
'200144': 3479,
'200154': 3480,
'200245': 3481,
'20026': 3482,
'200263': 3483,
'200267': 3484,
'200305': 3485,
'200395': 3486,
'20044': 3487,
'200475': 3488,
'20048': 3489,
'200512': 3490,
'200552': 3491,
'200564': 3492,
'20064': 3493,
'200641': 3494,
'200688': 3495,
'200696': 3496,
'200708': 3497,
'200761': 3498,
'200785': 3499,
'20079': 3500,
'200793': 3501,
'200799': 3502,
'200806': 3503,
'200827': 3504,
'200842': 3505,
'200852': 3506,
'200858': 3507,
'200887': 3508,
'200931': 3509,
'200954': 3510,
'200976': 3511,
'201011': 3512,
'201015': 3513,
'20102': 3514,
'201041': 3515,
'201051': 3516,
'201061': 3517,
'201130': 3518,
'201195': 3519,
'20120': 3520,
'201267': 3521,
'201304': 3522,
'201306': 3523,
'201311': 3524,
'201346': 3525,
'201438': 3526,
'201462': 3527,
'201526': 3528,
'20153': 3529,
'20155': 3530,
'201554': 3531,
'201589': 3532,
'201676': 3533,
'201698': 3534,
'201709': 3535,
'201778': 3536,
'20180': 3537,
'201840': 3538,
'201898': 3539,
'201932': 3540,
'201944': 3541,
'201945': 3542,
'201953': 3543,
'202028': 3544,
'202055': 3545,
'202080': 3546,
'202085': 3547,
'202106': 3548,
'202182': 3549,
'202277': 3550,
'202289': 3551,
'202342': 3552,
'202388': 3553,
'202399': 3554,
'202433': 3555,
'202440': 3556,
'202441': 3557,
'202446': 3558,
'202463': 3559,
'202464': 3560,
'202508': 3561,
'202543': 3562,
'202548': 3563,
'202567': 3564,
'20265': 3565,
'202723': 3566,
'202749': 3567,
'202773': 3568,
'202779': 3569,
'20279': 3570,
'202814': 3571,
'202852': 3572,
'202857': 3573,
'202866': 3574,
'202879': 3575,
'202886': 3576,
'202892': 3577,
'202915': 3578,
'202979': 3579,
'203007': 3580,
'203026': 3581,
'203071': 3582,
'20389': 3583,
'20402': 3584,
'20406': 3585,
'20408': 3586,
'20409': 3587,
'20469': 3588,
'20512': 3589,
'20516': 3590,
'2052': 3591,
'20522': 3592,
'20532': 3593,
'20579': 3594,
'20651': 3595,
'20652': 3596,
'20679': 3597,
'20740': 3598,
'20752': 3599,
'20755': 3600,
'20786': 3601,
'2079': 3602,
'20819': 3603,
'20863': 3604,
'20864': 3605,
'20885': 3606,
'2093': 3607,
'20981': 3608,
'21013': 3609,
'21016': 3610,
'21084': 3611,
'21088': 3612,
'21103': 3613,
'21279': 3614,
'21294': 3615,
'21315': 3616,
'21327': 3617,
'21353': 3618,
'21410': 3619,
'21419': 3620,
'21422': 3621,
'21425': 3622,
'2147': 3623,
'21476': 3624,
'21493': 3625,
'21497': 3626,
'21546': 3627,
'21576': 3628,
'21603': 3629,
'21613': 3630,
'21635': 3631,
'2167': 3632,
'21680': 3633,
'21692': 3634,
'21703': 3635,
'21738': 3636,
'21794': 3637,
'21838': 3638,
'2184': 3639,
'21843': 3640,
'2185': 3641,
'21867': 3642,
'219': 3643,
'2191': 3644,
'21923': 3645,
'21925': 3646,
'21997': 3647,
'22011': 3648,
'2202': 3649,
'22077': 3650,
'22082': 3651,
'22083': 3652,
'22130': 3653,
'22134': 3654,
'2215': 3655,
'22164': 3656,
'22173': 3657,
'22229': 3658,
'22276': 3659,
'22289': 3660,
'22291': 3661,
'22292': 3662,
'22312': 3663,
'22363': 3664,
'22417': 3665,
'22459': 3666,
'2246': 3667,
'22494': 3668,
'22511': 3669,
'22522': 3670,
'22574': 3671,
'22580': 3672,
'226': 3673,
'22629': 3674,
'22650': 3675,
'22761': 3676,
'22779': 3677,
'22810': 3678,
'22813': 3679,
'22831': 3680,
'22856': 3681,
'22865': 3682,
'22868': 3683,
'22877': 3684,
'22890': 3685,
'22903': 3686,
'230': 3687,
'23036': 3688,
'23060': 3689,
'23087': 3690,
'2310': 3691,
'23100': 3692,
'23129': 3693,
'23166': 3694,
'23173': 3695,
'23207': 3696,
'23282': 3697,
'23333': 3698,
'23383': 3699,
'2343': 3700,
'23458': 3701,
'23481': 3702,
'2349': 3703,
'23491': 3704,
'23538': 3705,
'23565': 3706,
'23582': 3707,
'2361': 3708,
'23698': 3709,
'23716': 3710,
'23721': 3711,
'23777': 3712,
'23785': 3713,
'23896': 3714,
'23974': 3715,
'23984': 3716,
'23996': 3717,
'24024': 3718,
'24155': 3719,
'2417': 3720,
'24176': 3721,
'24191': 3722,
'2421': 3723,
'24224': 3724,
'24254': 3725,
'24278': 3726,
'2430': 3727,
'2434': 3728,
'24346': 3729,
'244': 3730,
'24409': 3731,
'24448': 3732,
'24492': 3733,
'2451': 3734,
'24634': 3735,
'24669': 3736,
'24852': 3737,
'24873': 3738,
'24958': 3739,
'24968': 3740,
'24996': 3741,
'25047': 3742,
'25054': 3743,
'25093': 3744,
'25109': 3745,
'25116': 3746,
'25152': 3747,
'25192': 3748,
'2528': 3749,
'25296': 3750,
'25307': 3751,
'25340': 3752,
'25370': 3753,
'25392': 3754,
'25398': 3755,
'25434': 3756,
'25457': 3757,
'25458': 3758,
'25522': 3759,
'25529': 3760,
'25578': 3761,
'2559': 3762,
'25593': 3763,
'25602': 3764,
'25622': 3765,
'25648': 3766,
'25651': 3767,
'25662': 3768,
'25704': 3769,
'25718': 3770,
'25731': 3771,
'25747': 3772,
'25759': 3773,
'25762': 3774,
'25791': 3775,
'25801': 3776,
'2581': 3777,
'25847': 3778,
'2586': 3779,
'25948': 3780,
'25953': 3781,
'25954': 3782,
'25993': 3783,
'26012': 3784,
'26015': 3785,
'26024': 3786,
'26028': 3787,
'26064': 3788,
'26066': 3789,
'26082': 3790,
'26106': 3791,
'26124': 3792,
'26136': 3793,
'26143': 3794,
'26159': 3795,
'26163': 3796,
'26169': 3797,
'26184': 3798,
'26195': 3799,
'26202': 3800,
'26204': 3801,
'26205': 3802,
'26230': 3803,
'26266': 3804,
'26364': 3805,
'26391': 3806,
'2640': 3807,
'26434': 3808,
'26459': 3809,
'26515': 3810,
'26516': 3811,
'26527': 3812,
'2653': 3813,
'26566': 3814,
'26653': 3815,
'26687': 3816,
'26689': 3817,
'26717': 3818,
'26753': 3819,
'26801': 3820,
'26841': 3821,
'26849': 3822,
'26850': 3823,
'26903': 3824,
'26907': 3825,
'2695': 3826,
'26952': 3827,
'26967': 3828,
'27': 3829,
'27002': 3830,
'27004': 3831,
'27008': 3832,
'27021': 3833,
'27039': 3834,
'27190': 3835,
'27192': 3836,
'27197': 3837,
'27201': 3838,
'27213': 3839,
'2724': 3840,
'27250': 3841,
'27251': 3842,
'27272': 3843,
'27273': 3844,
'27278': 3845,
'27318': 3846,
'2733': 3847,
'27332': 3848,
'27347': 3849,
'27364': 3850,
'27418': 3851,
'27428': 3852,
'27493': 3853,
'27497': 3854,
'27512': 3855,
'27526': 3856,
'27532': 3857,
'27579': 3858,
'27584': 3859,
'27607': 3860,
'27659': 3861,
'27733': 3862,
'27744': 3863,
'27782': 3864,
'27807': 3865,
'27869': 3866,
'27881': 3867,
'27888': 3868,
'27915': 3869,
'27941': 3870,
'27947': 3871,
'28040': 3872,
'28068': 3873,
'28116': 3874,
'28119': 3875,
'28136': 3876,
'28139': 3877,
'28154': 3878,
'28230': 3879,
'28278': 3880,
'283': 3881,
'28300': 3882,
'28321': 3883,
'28366': 3884,
'2838': 3885,
'28410': 3886,
'28429': 3887,
'28444': 3888,
'28503': 3889,
'28540': 3890,
'2857': 3891,
'28619': 3892,
'2864': 3893,
'28641': 3894,
'28652': 3895,
'28661': 3896,
'2872': 3897,
'28768': 3898,
'28801': 3899,
'28833': 3900,
'28865': 3901,
'28867': 3902,
'2887': 3903,
'28919': 3904,
'28949': 3905,
'28955': 3906,
'28986': 3907,
'28989': 3908,
'29060': 3909,
'29102': 3910,
'29135': 3911,
'29140': 3912,
'29215': 3913,
'29225': 3914,
'29226': 3915,
'29240': 3916,
'29263': 3917,
'29300': 3918,
'29333': 3919,
'2936': 3920,
'29367': 3921,
'29379': 3922,
'29382': 3923,
'29429': 3924,
'29446': 3925,
'29469': 3926,
'29496': 3927,
'29503': 3928,
'29537': 3929,
'29560': 3930,
'2957': 3931,
'29579': 3932,
'29583': 3933,
'29603': 3934,
'2963': 3935,
'29731': 3936,
'29750': 3937,
'29753': 3938,
'29754': 3939,
'29760': 3940,
'29767': 3941,
'29776': 3942,
'29794': 3943,
'29840': 3944,
'29912': 3945,
'29918': 3946,
'29935': 3947,
'29970': 3948,
'30019': 3949,
'30048': 3950,
'30112': 3951,
'30119': 3952,
'30172': 3953,
'30196': 3954,
'30203': 3955,
'30212': 3956,
'30268': 3957,
'30337': 3958,
'30358': 3959,
'30365': 3960,
'30374': 3961,
'30384': 3962,
'30385': 3963,
'30443': 3964,
'3046': 3965,
'30479': 3966,
'30489': 3967,
'30513': 3968,
'30533': 3969,
'3057': 3970,
'30575': 3971,
'30640': 3972,
'30646': 3973,
'30779': 3974,
'30829': 3975,
'3087': 3976,
'30885': 3977,
'309': 3978,
'3092': 3979,
'3103': 3980,
'31037': 3981,
'31075': 3982,
'31094': 3983,
'31099': 3984,
'31136': 3985,
'31269': 3986,
'3127': 3987,
'31273': 3988,
'31294': 3989,
'31298': 3990,
'31306': 3991,
'3131': 3992,
'31328': 3993,
'31361': 3994,
'31371': 3995,
'31413': 3996,
'31437': 3997,
'31458': 3998,
'31470': 3999,
'31479': 4000,
'31480': 4001,
'31484': 4002,
'31508': 4003,
'31531': 4004,
'31542': 4005,
'31545': 4006,
'31546': 4007,
'31595': 4008,
'31617': 4009,
'31639': 4010,
'31660': 4011,
'31685': 4012,
'31730': 4013,
'31739': 4014,
'31761': 4015,
'31793': 4016,
'31800': 4017,
'31820': 4018,
'31833': 4019,
'31837': 4020,
'3185': 4021,
'31853': 4022,
'31880': 4023,
'31889': 4024,
'31898': 4025,
'31910': 4026,
'32004': 4027,
'32061': 4028,
'32075': 4029,
'32080': 4030,
'32083': 4031,
'32104': 4032,
'32108': 4033,
'32201': 4034,
'32231': 4035,
'3228': 4036,
'32305': 4037,
'32308': 4038,
'32324': 4039,
'32338': 4040,
'32375': 4041,
'324': 4042,
'32432': 4043,
'32459': 4044,
'32480': 4045,
'32486': 4046,
'32493': 4047,
'32560': 4048,
'32579': 4049,
'32634': 4050,
'32637': 4051,
'32638': 4052,
'32657': 4053,
'32685': 4054,
'32687': 4055,
'32696': 4056,
'32701': 4057,
'32776': 4058,
'32821': 4059,
'32864': 4060,
'3299': 4061,
'33021': 4062,
'33034': 4063,
'33051': 4064,
'33078': 4065,
'33096': 4066,
'33152': 4067,
'33167': 4068,
'33178': 4069,
'33206': 4070,
'33208': 4071,
'33210': 4072,
'33308': 4073,
'3331': 4074,
'33350': 4075,
'33370': 4076,
'33378': 4077,
'33485': 4078,
'33515': 4079,
'3355': 4080,
'33554': 4081,
'33555': 4082,
'33573': 4083,
'33577': 4084,
'33603': 4085,
'33636': 4086,
'33658': 4087,
'33673': 4088,
'33694': 4089,
'33719': 4090,
'33730': 4091,
'33785': 4092,
'3380': 4093,
'33803': 4094,
'3387': 4095,
'33907': 4096,
'33925': 4097,
'33961': 4098,
'33966': 4099,
'33992': 4100,
'34028': 4101,
'34047': 4102,
'34048': 4103,
'341': 4104,
'3410': 4105,
'34120': 4106,
'34190': 4107,
'34309': 4108,
'34347': 4109,
'34452': 4110,
'34487': 4111,
'34539': 4112,
'34547': 4113,
'34603': 4114,
'34631': 4115,
'34632': 4116,
'34659': 4117,
'3466': 4118,
'34663': 4119,
'34675': 4120,
'34698': 4121,
'34701': 4122,
'34812': 4123,
'34840': 4124,
'34896': 4125,
'34930': 4126,
'34964': 4127,
'35005': 4128,
'35042': 4129,
'35044': 4130,
'35068': 4131,
'35091': 4132,
'35097': 4133,
'35098': 4134,
'35138': 4135,
'35142': 4136,
'35143': 4137,
'35178': 4138,
'35234': 4139,
'35288': 4140,
'35291': 4141,
'3531': 4142,
'35348': 4143,
'35533': 4144,
'35535': 4145,
'35558': 4146,
'35580': 4147,
'35628': 4148,
'35635': 4149,
'35677': 4150,
'35691': 4151,
'35756': 4152,
'3578': 4153,
'35782': 4154,
'35793': 4155,
'3583': 4156,
'35843': 4157,
'35855': 4158,
'35864': 4159,
'35883': 4160,
'35910': 4161,
'35918': 4162,
'36011': 4163,
'36012': 4164,
'36015': 4165,
'36049': 4166,
'36080': 4167,
'36088': 4168,
'36125': 4169,
'36134': 4170,
'36148': 4171,
'36158': 4172,
'36160': 4173,
'36161': 4174,
'36275': 4175,
'36279': 4176,
'36320': 4177,
'36353': 4178,
'36359': 4179,
'36377': 4180,
'3638': 4181,
'36407': 4182,
'36414': 4183,
'36419': 4184,
'36450': 4185,
'36494': 4186,
'36511': 4187,
'3657': 4188,
'3662': 4189,
'36664': 4190,
'36691': 4191,
'36748': 4192,
'36838': 4193,
'36882': 4194,
'36893': 4195,
'3690': 4196,
'36909': 4197,
'3691': 4198,
'36928': 4199,
'36964': 4200,
'36977': 4201,
'36981': 4202,
'37028': 4203,
'37046': 4204,
'37048': 4205,
'3705': 4206,
'37077': 4207,
'37113': 4208,
'37133': 4209,
'37154': 4210,
'37171': 4211,
'37172': 4212,
'37245': 4213,
'37271': 4214,
'3732': 4215,
'37342': 4216,
'37381': 4217,
'37382': 4218,
'37386': 4219,
'37394': 4220,
'37396': 4221,
'37462': 4222,
'3747': 4223,
'37518': 4224,
'37556': 4225,
'37644': 4226,
'37674': 4227,
'37728': 4228,
'37732': 4229,
'37768': 4230,
'37789': 4231,
'3779': 4232,
'37835': 4233,
'37837': 4234,
'37892': 4235,
'37907': 4236,
'37930': 4237,
'37972': 4238,
'38000': 4239,
'3803': 4240,
'38069': 4241,
'3809': 4242,
'38090': 4243,
'38109': 4244,
'38156': 4245,
'38168': 4246,
'38236': 4247,
'3825': 4248,
'38275': 4249,
'38277': 4250,
'3834': 4251,
'3835': 4252,
'38354': 4253,
'38357': 4254,
'38482': 4255,
'38494': 4256,
'38508': 4257,
'38610': 4258,
'38671': 4259,
'38691': 4260,
'38733': 4261,
'3874': 4262,
'38788': 4263,
'3887': 4264,
'38879': 4265,
'389': 4266,
'38921': 4267,
'38936': 4268,
'38984': 4269,
'39012': 4270,
'39014': 4271,
'39029': 4272,
'39067': 4273,
'39070': 4274,
'39090': 4275,
'39187': 4276,
'39203': 4277,
'39209': 4278,
'39211': 4279,
'39215': 4280,
'3927': 4281,
'39293': 4282,
'39334': 4283,
'39368': 4284,
'39384': 4285,
'39391': 4286,
'39439': 4287,
'39452': 4288,
'39457': 4289,
'39502': 4290,
'39511': 4291,
'39521': 4292,
'39526': 4293,
'39534': 4294,
'39544': 4295,
'39547': 4296,
'39650': 4297,
'39772': 4298,
'39799': 4299,
'39848': 4300,
'39850': 4301,
'39855': 4302,
'39865': 4303,
'39869': 4304,
'39892': 4305,
'39922': 4306,
'39938': 4307,
'39942': 4308,
'39970': 4309,
'39981': 4310,
'40002': 4311,
'40052': 4312,
'40072': 4313,
'40088': 4314,
'40108': 4315,
'40111': 4316,
'40112': 4317,
'40152': 4318,
'40204': 4319,
'40276': 4320,
'40373': 4321,
'40379': 4322,
'40407': 4323,
'40409': 4324,
'40459': 4325,
'40530': 4326,
'40565': 4327,
'40582': 4328,
'40605': 4329,
'40611': 4330,
'40625': 4331,
'40644': 4332,
'40652': 4333,
'40704': 4334,
'40712': 4335,
'40717': 4336,
'40733': 4337,
'40770': 4338,
'40823': 4339,
'40847': 4340,
'40856': 4341,
'40864': 4342,
'40888': 4343,
'40953': 4344,
'40979': 4345,
'40980': 4346,
'40981': 4347,
'4103': 4348,
'41037': 4349,
'4107': 4350,
'41072': 4351,
'41113': 4352,
'41120': 4353,
'41159': 4354,
'41170': 4355,
'41202': 4356,
'41217': 4357,
'41239': 4358,
'41250': 4359,
'41314': 4360,
'4137': 4361,
'41392': 4362,
'4143': 4363,
'41433': 4364,
'41447': 4365,
'41478': 4366,
'4149': 4367,
'41534': 4368,
'41546': 4369,
'41571': 4370,
'41647': 4371,
'41648': 4372,
'41654': 4373,
'41684': 4374,
'4169': 4375,
'41691': 4376,
'41720': 4377,
'41759': 4378,
'41769': 4379,
'4177': 4380,
'41783': 4381,
'41808': 4382,
'41828': 4383,
'41840': 4384,
'41870': 4385,
'41873': 4386,
'41874': 4387,
'41985': 4388,
'41991': 4389,
'42001': 4390,
'42016': 4391,
'42054': 4392,
'4206': 4393,
'4212': 4394,
'42123': 4395,
'42142': 4396,
'42157': 4397,
'42211': 4398,
'42217': 4399,
'4226': 4400,
'42321': 4401,
'42363': 4402,
'4239': 4403,
'42415': 4404,
'42417': 4405,
'42462': 4406,
'42488': 4407,
'42489': 4408,
'4253': 4409,
'42539': 4410,
'42547': 4411,
'42600': 4412,
'42614': 4413,
'42616': 4414,
'42654': 4415,
'42665': 4416,
'42945': 4417,
'42974': 4418,
'43003': 4419,
'43017': 4420,
'43031': 4421,
'43112': 4422,
'43141': 4423,
'43155': 4424,
'43192': 4425,
'43210': 4426,
'43212': 4427,
'43222': 4428,
'43235': 4429,
'43283': 4430,
'43314': 4431,
'4335': 4432,
'43370': 4433,
'43403': 4434,
'43409': 4435,
'43517': 4436,
'43568': 4437,
'43695': 4438,
'43699': 4439,
'43728': 4440,
'43799': 4441,
'43845': 4442,
'43880': 4443,
'43884': 4444,
'4390': 4445,
'43912': 4446,
'43959': 4447,
'43970': 4448,
'43985': 4449,
'44006': 4450,
'44052': 4451,
'4406': 4452,
'44067': 4453,
'4407': 4454,
'44119': 4455,
'44135': 4456,
'44293': 4457,
'44318': 4458,
'44368': 4459,
'44470': 4460,
'44483': 4461,
'44486': 4462,
'4455': 4463,
'44570': 4464,
'4461': 4465,
'44615': 4466,
'4465': 4467,
'44660': 4468,
'44700': 4469,
'44712': 4470,
'44717': 4471,
'44737': 4472,
'44743': 4473,
'4478': 4474,
'44795': 4475,
'44796': 4476,
'44836': 4477,
'44916': 4478,
'44935': 4479,
'44939': 4480,
'44958': 4481,
'44991': 4482,
'45000': 4483,
'45017': 4484,
'45037': 4485,
'45064': 4486,
'45173': 4487,
'45192': 4488,
'45221': 4489,
'45325': 4490,
'45332': 4491,
'45341': 4492,
'45347': 4493,
'454': 4494,
'45428': 4495,
'45562': 4496,
'45600': 4497,
'45649': 4498,
'45659': 4499,
'45689': 4500,
'4572': 4501,
'45752': 4502,
'458': 4503,
'45870': 4504,
'45871': 4505,
'45887': 4506,
'45919': 4507,
'4592': 4508,
'45939': 4509,
'45952': 4510,
'45982': 4511,
'45993': 4512,
'46001': 4513,
'46047': 4514,
'46053': 4515,
'46057': 4516,
'46188': 4517,
'46191': 4518,
'46250': 4519,
'46259': 4520,
'46268': 4521,
'46277': 4522,
'46278': 4523,
'46281': 4524,
'46296': 4525,
'46338': 4526,
'46340': 4527,
'46400': 4528,
'4641': 4529,
'4644': 4530,
'46452': 4531,
'46487': 4532,
'46500': 4533,
'46503': 4534,
'46522': 4535,
'46525': 4536,
'46608': 4537,
'46609': 4538,
'46690': 4539,
'46705': 4540,
'46717': 4541,
'46734': 4542,
'46736': 4543,
'4675': 4544,
'46774': 4545,
'46946': 4546,
'47035': 4547,
'4706': 4548,
'4707': 4549,
'47070': 4550,
'47078': 4551,
'47133': 4552,
'47147': 4553,
'47157': 4554,
'47173': 4555,
'47176': 4556,
'47207': 4557,
'47226': 4558,
'47239': 4559,
'4728': 4560,
'47304': 4561,
'47333': 4562,
'47340': 4563,
'47378': 4564,
'47380': 4565,
'47401': 4566,
'47406': 4567,
'47461': 4568,
'47463': 4569,
'47478': 4570,
'47516': 4571,
'47537': 4572,
'47542': 4573,
'47552': 4574,
'47580': 4575,
'47605': 4576,
'47643': 4577,
'47645': 4578,
'47663': 4579,
'47669': 4580,
'47685': 4581,
'47735': 4582,
'47755': 4583,
'47768': 4584,
'47798': 4585,
'47842': 4586,
'47880': 4587,
'47892': 4588,
'47900': 4589,
'47910': 4590,
'47920': 4591,
'47967': 4592,
'48004': 4593,
'48114': 4594,
'48135': 4595,
'48137': 4596,
'48177': 4597,
'48184': 4598,
'48186': 4599,
'48241': 4600,
'48251': 4601,
'48291': 4602,
'48319': 4603,
'48328': 4604,
'48339': 4605,
'48385': 4606,
'48409': 4607,
'48423': 4608,
'48443': 4609,
'48478': 4610,
'48522': 4611,
'48524': 4612,
'48538': 4613,
'48570': 4614,
'48571': 4615,
'48580': 4616,
'48605': 4617,
'48632': 4618,
'48634': 4619,
'4865': 4620,
'48684': 4621,
'48701': 4622,
'48704': 4623,
'48721': 4624,
'48735': 4625,
'48753': 4626,
'48795': 4627,
'48812': 4628,
'48813': 4629,
'48891': 4630,
'48901': 4631,
'48962': 4632,
'48983': 4633,
'49079': 4634,
'49093': 4635,
'49240': 4636,
'49243': 4637,
'49248': 4638,
'49251': 4639,
'49257': 4640,
'49286': 4641,
'49323': 4642,
'49324': 4643,
'49333': 4644,
'49343': 4645,
'49394': 4646,
'49423': 4647,
'49426': 4648,
'49450': 4649,
'49459': 4650,
'49471': 4651,
'49628': 4652,
'49644': 4653,
'49687': 4654,
'49712': 4655,
'49766': 4656,
'49773': 4657,
'49793': 4658,
'49795': 4659,
'49804': 4660,
'4982': 4661,
'49839': 4662,
'49872': 4663,
'49917': 4664,
'49944': 4665,
'49952': 4666,
'49960': 4667,
'5004': 4668,
'50056': 4669,
'50077': 4670,
'50117': 4671,
'50133': 4672,
'5014': 4673,
'50149': 4674,
'50183': 4675,
'5023': 4676,
'50233': 4677,
'50238': 4678,
'50396': 4679,
'504': 4680,
'50407': 4681,
'50436': 4682,
'50455': 4683,
'50484': 4684,
'50501': 4685,
'50522': 4686,
'50624': 4687,
'50636': 4688,
'50643': 4689,
'50655': 4690,
'50663': 4691,
'50683': 4692,
'5074': 4693,
'50746': 4694,
'50798': 4695,
'50800': 4696,
'50826': 4697,
'5083': 4698,
'50833': 4699,
'50838': 4700,
'50851': 4701,
'50878': 4702,
'5088': 4703,
'50915': 4704,
'50920': 4705,
'50958': 4706,
'50981': 4707,
'51015': 4708,
'51016': 4709,
'5108': 4710,
'5110': 4711,
'51130': 4712,
'51151': 4713,
'51156': 4714,
'51169': 4715,
'51190': 4716,
'51192': 4717,
'51198': 4718,
'51221': 4719,
'51242': 4720,
'51246': 4721,
'51255': 4722,
'51258': 4723,
'51265': 4724,
'51266': 4725,
'5127': 4726,
'51272': 4727,
'51329': 4728,
'51352': 4729,
'51377': 4730,
'51388': 4731,
'51392': 4732,
'51464': 4733,
'51466': 4734,
'51508': 4735,
'51515': 4736,
'5156': 4737,
'51639': 4738,
'51655': 4739,
'51692': 4740,
'51699': 4741,
'5170': 4742,
'51744': 4743,
'51759': 4744,
'51784': 4745,
'51856': 4746,
'51860': 4747,
'51862': 4748,
'5188': 4749,
'5192': 4750,
'52006': 4751,
'52037': 4752,
'52047': 4753,
'52057': 4754,
'52082': 4755,
'52090': 4756,
'52097': 4757,
'52150': 4758,
'52173': 4759,
'52176': 4760,
'52299': 4761,
'52354': 4762,
'52381': 4763,
'52415': 4764,
'52422': 4765,
'5246': 4766,
'52494': 4767,
'52547': 4768,
'52568': 4769,
'52588': 4770,
'52615': 4771,
'52640': 4772,
'52678': 4773,
'5268': 4774,
'52686': 4775,
'52773': 4776,
'52799': 4777,
'52853': 4778,
'52857': 4779,
'52897': 4780,
'5292': 4781,
'5293': 4782,
'52938': 4783,
'52948': 4784,
'52954': 4785,
'52986': 4786,
'53015': 4787,
'53057': 4788,
'53058': 4789,
'53067': 4790,
'53088': 4791,
'53092': 4792,
'53093': 4793,
'5310': 4794,
'53113': 4795,
'53119': 4796,
'53151': 4797,
'53170': 4798,
'53173': 4799,
'53185': 4800,
'53286': 4801,
'53312': 4802,
'53327': 4803,
'53377': 4804,
'5341': 4805,
'53424': 4806,
'53504': 4807,
'53519': 4808,
'53529': 4809,
'53566': 4810,
'53617': 4811,
'53624': 4812,
'53632': 4813,
'53692': 4814,
'53764': 4815,
'53786': 4816,
'53806': 4817,
'53820': 4818,
'53858': 4819,
'5386': 4820,
'53884': 4821,
'53904': 4822,
'53909': 4823,
'53929': 4824,
'53941': 4825,
'53995': 4826,
'5401': 4827,
'54060': 4828,
'54081': 4829,
'54093': 4830,
'54145': 4831,
'54157': 4832,
'54180': 4833,
'54214': 4834,
'54272': 4835,
'54279': 4836,
'54291': 4837,
'54346': 4838,
'54387': 4839,
'5442': 4840,
'54424': 4841,
'54439': 4842,
'54444': 4843,
'54449': 4844,
'54464': 4845,
'54526': 4846,
'5453': 4847,
'54555': 4848,
'54569': 4849,
'54579': 4850,
'54597': 4851,
'54612': 4852,
'54624': 4853,
'54633': 4854,
'5468': 4855,
'5477': 4856,
'5483': 4857,
'54833': 4858,
'54951': 4859,
'54982': 4860,
'55007': 4861,
'5501': 4862,
'55023': 4863,
'55111': 4864,
'55120': 4865,
'55138': 4866,
'55177': 4867,
'55196': 4868,
'55207': 4869,
'55219': 4870,
'5522': 4871,
'55238': 4872,
'55276': 4873,
'55290': 4874,
'5533': 4875,
'55350': 4876,
'55412': 4877,
'55459': 4878,
'55466': 4879,
'55519': 4880,
'55577': 4881,
'5561': 4882,
'55623': 4883,
'55631': 4884,
'55649': 4885,
'55713': 4886,
'55766': 4887,
'55780': 4888,
'55810': 4889,
'55866': 4890,
'55976': 4891,
'5605': 4892,
'56090': 4893,
'56460': 4894,
'56536': 4895,
'56552': 4896,
'56553': 4897,
'56622': 4898,
'56723': 4899,
'56733': 4900,
'56767': 4901,
'56772': 4902,
'56808': 4903,
'56827': 4904,
'56858': 4905,
'56859': 4906,
'5687': 4907,
'56877': 4908,
'56881': 4909,
'56887': 4910,
'56904': 4911,
'56917': 4912,
'56935': 4913,
'56939': 4914,
'56983': 4915,
'56986': 4916,
'57015': 4917,
'57033': 4918,
'57043': 4919,
'57107': 4920,
'57116': 4921,
'57175': 4922,
'57185': 4923,
'57191': 4924,
'57192': 4925,
'57195': 4926,
'57198': 4927,
'5723': 4928,
'5728': 4929,
'57290': 4930,
'57316': 4931,
'57330': 4932,
'57343': 4933,
'57352': 4934,
'57378': 4935,
'57416': 4936,
'57459': 4937,
'57499': 4938,
'57505': 4939,
'57540': 4940,
'57600': 4941,
'57601': 4942,
'57616': 4943,
'57722': 4944,
'57771': 4945,
'578': 4946,
'57821': 4947,
'57825': 4948,
'5785': 4949,
'57872': 4950,
'57897': 4951,
'5791': 4952,
'57910': 4953,
'57915': 4954,
'57939': 4955,
'57943': 4956,
'57970': 4957,
'57997': 4958,
'58018': 4959,
'58030': 4960,
'581': 4961,
'58112': 4962,
'5822': 4963,
'58319': 4964,
'58387': 4965,
'58389': 4966,
'58421': 4967,
'5843': 4968,
'58445': 4969,
'58454': 4970,
'58491': 4971,
'58495': 4972,
'58497': 4973,
'58513': 4974,
'58541': 4975,
'58585': 4976,
'58608': 4977,
'58610': 4978,
'58646': 4979,
'58653': 4980,
'58697': 4981,
'58725': 4982,
'58832': 4983,
'58845': 4984,
'58857': 4985,
'58893': 4986,
'58894': 4987,
'59068': 4988,
'59101': 4989,
'59142': 4990,
'59149': 4991,
'5917': 4992,
'59232': 4993,
'59257': 4994,
'59265': 4995,
'59272': 4996,
'5937': 4997,
'59392': 4998,
'59404': 4999,
'5947': 5000,
'59470': 5001,
'59586': 5002,
'59612': 5003,
'59634': 5004,
'59639': 5005,
'59703': 5006,
'59742': 5007,
'59756': 5008,
'5976': 5009,
'59770': 5010,
'59793': 5011,
'59831': 5012,
'59833': 5013,
'59848': 5014,
'59853': 5015,
'59864': 5016,
'5989': 5017,
'59912': 5018,
'59965': 5019,
'5997': 5020,
'60039': 5021,
'60059': 5022,
'60129': 5023,
'60144': 5024,
'60281': 5025,
'60307': 5026,
'60332': 5027,
'60349': 5028,
'60352': 5029,
'60366': 5030,
'60430': 5031,
'60435': 5032,
'60491': 5033,
'6050': 5034,
'60532': 5035,
'60563': 5036,
'60597': 5037,
'60603': 5038,
'60661': 5039,
'60664': 5040,
'60708': 5041,
'60725': 5042,
'60730': 5043,
'60873': 5044,
'60889': 5045,
'60894': 5046,
'60896': 5047,
'6090': 5048,
'60900': 5049,
'60912': 5050,
'60944': 5051,
'60948': 5052,
'610': 5053,
'61009': 5054,
'61029': 5055,
'61054': 5056,
'61067': 5057,
'61089': 5058,
'61169': 5059,
'61181': 5060,
'61251': 5061,
'61268': 5062,
'61271': 5063,
'61303': 5064,
'61367': 5065,
'6138': 5066,
'61406': 5067,
'6142': 5068,
'61420': 5069,
'61450': 5070,
'61464': 5071,
'615': 5072,
'61505': 5073,
'61553': 5074,
'61559': 5075,
'61583': 5076,
'61604': 5077,
'61627': 5078,
'61727': 5079,
'6173': 5080,
'61780': 5081,
'61782': 5082,
'61789': 5083,
'61840': 5084,
'61864': 5085,
'61888': 5086,
'6190': 5087,
'61925': 5088,
'61961': 5089,
'62054': 5090,
'62065': 5091,
'62079': 5092,
'6208': 5093,
'62093': 5094,
'62154': 5095,
'62165': 5096,
'62193': 5097,
'62302': 5098,
'62306': 5099,
'62313': 5100,
'62338': 5101,
'62344': 5102,
'62379': 5103,
'624': 5104,
'62445': 5105,
'62575': 5106,
'62580': 5107,
'62584': 5108,
'62598': 5109,
'62604': 5110,
'62622': 5111,
'62647': 5112,
'62702': 5113,
'6276': 5114,
'62785': 5115,
'62792': 5116,
'62798': 5117,
'62809': 5118,
'62843': 5119,
'62847': 5120,
'62850': 5121,
'6286': 5122,
'62864': 5123,
'62894': 5124,
'62914': 5125,
'62996': 5126,
'6300': 5127,
'63122': 5128,
'63141': 5129,
'63228': 5130,
'63316': 5131,
'63334': 5132,
'63344': 5133,
'63443': 5134,
'63473': 5135,
'63483': 5136,
'63529': 5137,
'63584': 5138,
'63593': 5139,
'63597': 5140,
'63599': 5141,
'63630': 5142,
'63757': 5143,
'63817': 5144,
'63840': 5145,
'63847': 5146,
'64029': 5147,
'64042': 5148,
'64087': 5149,
'64118': 5150,
'64122': 5151,
'64146': 5152,
'64179': 5153,
'64183': 5154,
'64203': 5155,
'64233': 5156,
'64267': 5157,
'64309': 5158,
'6432': 5159,
'64325': 5160,
'64349': 5161,
'64378': 5162,
'64379': 5163,
'64382': 5164,
'64395': 5165,
'64422': 5166,
'64424': 5167,
'64513': 5168,
'64520': 5169,
'64531': 5170,
'64625': 5171,
'64669': 5172,
'64792': 5173,
'64813': 5174,
'64837': 5175,
'64877': 5176,
'64896': 5177,
'64915': 5178,
'6493': 5179,
'65033': 5180,
'65068': 5181,
'65082': 5182,
'65092': 5183,
'65109': 5184,
'65111': 5185,
'65141': 5186,
'65146': 5187,
'65177': 5188,
'65178': 5189,
'65199': 5190,
'65218': 5191,
'65268': 5192,
'6529': 5193,
'65297': 5194,
'65298': 5195,
'65317': 5196,
'65321': 5197,
'65338': 5198,
'65371': 5199,
'65395': 5200,
'65408': 5201,
'65410': 5202,
'65433': 5203,
'6545': 5204,
'65461': 5205,
'65494': 5206,
'65502': 5207,
'6551': 5208,
'65526': 5209,
'65528': 5210,
'65555': 5211,
'65586': 5212,
'65592': 5213,
'65658': 5214,
'65675': 5215,
'65699': 5216,
'65708': 5217,
'65731': 5218,
'65754': 5219,
'65758': 5220,
'65766': 5221,
'65805': 5222,
'65818': 5223,
'65852': 5224,
'65906': 5225,
'65969': 5226,
'65971': 5227,
'65986': 5228,
'65987': 5229,
'66024': 5230,
'66119': 5231,
'66138': 5232,
'66176': 5233,
'66181': 5234,
'66264': 5235,
'66271': 5236,
'66275': 5237,
'66292': 5238,
'66339': 5239,
'66355': 5240,
'66445': 5241,
'66478': 5242,
'6650': 5243,
'66549': 5244,
'66557': 5245,
'66594': 5246,
'66614': 5247,
'66767': 5248,
'66774': 5249,
'6679': 5250,
'66807': 5251,
'66809': 5252,
'66853': 5253,
'66929': 5254,
'66935': 5255,
'66941': 5256,
'66971': 5257,
'67017': 5258,
'67027': 5259,
'67043': 5260,
'67085': 5261,
'67109': 5262,
'6712': 5263,
'67125': 5264,
'67219': 5265,
'67274': 5266,
'67302': 5267,
'67307': 5268,
'67352': 5269,
'67353': 5270,
'6737': 5271,
'67401': 5272,
'67404': 5273,
'67406': 5274,
'67409': 5275,
'67416': 5276,
'67480': 5277,
'67484': 5278,
'6749': 5279,
'67490': 5280,
'67496': 5281,
'67497': 5282,
'67538': 5283,
'67557': 5284,
'67580': 5285,
'67599': 5286,
'67610': 5287,
'67619': 5288,
'67671': 5289,
'67685': 5290,
'67691': 5291,
'67697': 5292,
'6774': 5293,
'67740': 5294,
'67767': 5295,
'67769': 5296,
'67771': 5297,
'67786': 5298,
'67842': 5299,
'67853': 5300,
'67925': 5301,
'67929': 5302,
'67933': 5303,
'68033': 5304,
'68087': 5305,
'68096': 5306,
'68106': 5307,
'6812': 5308,
'68122': 5309,
'68168': 5310,
'68177': 5311,
'6818': 5312,
'68192': 5313,
'68226': 5314,
'68256': 5315,
'68264': 5316,
'68322': 5317,
'68339': 5318,
'6846': 5319,
'68495': 5320,
'68501': 5321,
'68549': 5322,
'68563': 5323,
'68581': 5324,
'68632': 5325,
'6871': 5326,
'68740': 5327,
'6884': 5328,
'689': 5329,
'68900': 5330,
'68913': 5331,
'68924': 5332,
'69027': 5333,
'69029': 5334,
'69038': 5335,
'69089': 5336,
'691': 5337,
'69105': 5338,
'69138': 5339,
'69193': 5340,
'6930': 5341,
'6932': 5342,
'69361': 5343,
'69366': 5344,
'6939': 5345,
'6940': 5346,
'69408': 5347,
'69444': 5348,
'6946': 5349,
'69483': 5350,
'69499': 5351,
'69560': 5352,
'69576': 5353,
'69611': 5354,
'69627': 5355,
'69650': 5356,
'69672': 5357,
'69696': 5358,
'69743': 5359,
'69758': 5360,
'69766': 5361,
'69835': 5362,
'69837': 5363,
'69890': 5364,
'69915': 5365,
'69960': 5366,
'69973': 5367,
'69990': 5368,
'70024': 5369,
'70050': 5370,
'70088': 5371,
'70111': 5372,
'70112': 5373,
'70125': 5374,
'70173': 5375,
'70255': 5376,
'70276': 5377,
'70299': 5378,
'7033': 5379,
'70333': 5380,
'70336': 5381,
'7035': 5382,
'70414': 5383,
'7042': 5384,
'70443': 5385,
'70455': 5386,
'7053': 5387,
'70534': 5388,
'70633': 5389,
'70644': 5390,
'7065': 5391,
'70669': 5392,
'70686': 5393,
'70716': 5394,
'70727': 5395,
'70730': 5396,
'70801': 5397,
'70816': 5398,
'70909': 5399,
'71003': 5400,
'71024': 5401,
'71037': 5402,
'71090': 5403,
'71092': 5404,
'71093': 5405,
'71094': 5406,
'7112': 5407,
'71192': 5408,
'71197': 5409,
'71286': 5410,
'7133': 5411,
'71336': 5412,
'71358': 5413,
'71405': 5414,
'7145': 5415,
'71474': 5416,
'7150': 5417,
'71557': 5418,
'7159': 5419,
'71615': 5420,
'71692': 5421,
'71702': 5422,
'71728': 5423,
'71731': 5424,
'71756': 5425,
'71977': 5426,
'72024': 5427,
'72029': 5428,
'72074': 5429,
'72106': 5430,
'72146': 5431,
'72150': 5432,
'72162': 5433,
'7223': 5434,
'72240': 5435,
'72263': 5436,
'7227': 5437,
'72287': 5438,
'72290': 5439,
'72298': 5440,
'72301': 5441,
'72303': 5442,
'72335': 5443,
'72365': 5444,
'72442': 5445,
'72446': 5446,
'72475': 5447,
'72541': 5448,
'72591': 5449,
'72615': 5450,
'72624': 5451,
'72685': 5452,
'72686': 5453,
'72690': 5454,
'72694': 5455,
'72759': 5456,
'72809': 5457,
'7282': 5458,
'72823': 5459,
'72859': 5460,
'72869': 5461,
'72946': 5462,
'72949': 5463,
'72978': 5464,
'73018': 5465,
'73064': 5466,
'73092': 5467,
'73094': 5468,
'73102': 5469,
'7314': 5470,
'73205': 5471,
'73211': 5472,
'73213': 5473,
'73220': 5474,
'73231': 5475,
'73254': 5476,
'73266': 5477,
'73300': 5478,
'73304': 5479,
'73318': 5480,
'73320': 5481,
'73323': 5482,
'73327': 5483,
'73328': 5484,
'73363': 5485,
'73406': 5486,
'73455': 5487,
'7346': 5488,
'73469': 5489,
'73489': 5490,
'73534': 5491,
'73542': 5492,
'73582': 5493,
'73596': 5494,
'73604': 5495,
'73647': 5496,
'73652': 5497,
'73664': 5498,
'73727': 5499,
'73750': 5500,
'73836': 5501,
'73954': 5502,
'73967': 5503,
'73987': 5504,
'74050': 5505,
'74052': 5506,
'74053': 5507,
'74063': 5508,
'74071': 5509,
'74087': 5510,
'7409': 5511,
'74186': 5512,
'74228': 5513,
'74244': 5514,
'74258': 5515,
'74274': 5516,
'74339': 5517,
'74373': 5518,
'74400': 5519,
'74423': 5520,
'74513': 5521,
'74518': 5522,
'74540': 5523,
'74556': 5524,
'74559': 5525,
'74662': 5526,
'7468': 5527,
'74704': 5528,
'74707': 5529,
'74749': 5530,
'74821': 5531,
'74823': 5532,
'74826': 5533,
'74874': 5534,
'7488': 5535,
'74910': 5536,
'74955': 5537,
'74978': 5538,
'75005': 5539,
'75009': 5540,
'75016': 5541,
'75036': 5542,
'75081': 5543,
'75112': 5544,
'75213': 5545,
'75222': 5546,
'75252': 5547,
'75263': 5548,
'75285': 5549,
'75286': 5550,
'75296': 5551,
'75319': 5552,
'75322': 5553,
'75324': 5554,
'75389': 5555,
'75478': 5556,
'75505': 5557,
'75545': 5558,
'75565': 5559,
'75616': 5560,
'75655': 5561,
'75666': 5562,
'75684': 5563,
'75735': 5564,
'7580': 5565,
'75805': 5566,
'75848': 5567,
'75859': 5568,
'75930': 5569,
'75999': 5570,
'76110': 5571,
'76147': 5572,
'76148': 5573,
'76175': 5574,
'76200': 5575,
'76245': 5576,
'76253': 5577,
'76259': 5578,
'76280': 5579,
'76303': 5580,
'76343': 5581,
'76344': 5582,
'76392': 5583,
'76393': 5584,
'76405': 5585,
'76441': 5586,
'76647': 5587,
'76656': 5588,
'7666': 5589,
'76706': 5590,
'76819': 5591,
'76871': 5592,
'76923': 5593,
'76947': 5594,
'77002': 5595,
'77024': 5596,
'77112': 5597,
'77134': 5598,
'77172': 5599,
'77174': 5600,
'77190': 5601,
'77203': 5602,
'77230': 5603,
'77289': 5604,
'77342': 5605,
'77344': 5606,
'77367': 5607,
'7738': 5608,
'77386': 5609,
'77395': 5610,
'77403': 5611,
'77417': 5612,
'77487': 5613,
'7753': 5614,
'77563': 5615,
'77568': 5616,
'77571': 5617,
'77601': 5618,
'77666': 5619,
'77677': 5620,
'77727': 5621,
'77774': 5622,
'77775': 5623,
'77793': 5624,
'77855': 5625,
'77856': 5626,
'77900': 5627,
'77906': 5628,
'77943': 5629,
'78020': 5630,
'78156': 5631,
'78171': 5632,
'78197': 5633,
'78217': 5634,
'78248': 5635,
'78267': 5636,
'78284': 5637,
'78291': 5638,
'78301': 5639,
'78304': 5640,
'78405': 5641,
'78426': 5642,
'78430': 5643,
'78435': 5644,
'78471': 5645,
'78525': 5646,
'78544': 5647,
'78558': 5648,
'78691': 5649,
'78791': 5650,
'78880': 5651,
'78901': 5652,
'78907': 5653,
'7901': 5654,
'79011': 5655,
'79111': 5656,
'79125': 5657,
'79140': 5658,
'79155': 5659,
'79162': 5660,
'79184': 5661,
'79243': 5662,
'79287': 5663,
'79298': 5664,
'7930': 5665,
'79324': 5666,
'79352': 5667,
'79389': 5668,
'79518': 5669,
'79534': 5670,
'79585': 5671,
'79650': 5672,
'79667': 5673,
'79718': 5674,
'79744': 5675,
'79747': 5676,
'79754': 5677,
'79764': 5678,
'79774': 5679,
'79777': 5680,
'79787': 5681,
'79836': 5682,
'79838': 5683,
'79844': 5684,
'79867': 5685,
'79886': 5686,
'79887': 5687,
'79905': 5688,
'79922': 5689,
'79973': 5690,
'8006': 5691,
'80133': 5692,
'80138': 5693,
'80146': 5694,
'80147': 5695,
'80148': 5696,
'8016': 5697,
'80177': 5698,
'80213': 5699,
'80224': 5700,
'80235': 5701,
'80249': 5702,
'80272': 5703,
'80299': 5704,
'80342': 5705,
'80402': 5706,
'80470': 5707,
'80488': 5708,
'80600': 5709,
'80714': 5710,
'8078': 5711,
'80801': 5712,
'80811': 5713,
'8089': 5714,
'80950': 5715,
'8098': 5716,
'81015': 5717,
'81020': 5718,
'81022': 5719,
'81049': 5720,
'81117': 5721,
'81133': 5722,
'81175': 5723,
'81187': 5724,
'81209': 5725,
'81281': 5726,
'813': 5727,
'8131': 5728,
'81380': 5729,
'81405': 5730,
'81410': 5731,
'81419': 5732,
'81428': 5733,
'81471': 5734,
'8149': 5735,
'81539': 5736,
'81550': 5737,
'81564': 5738,
'81572': 5739,
'81581': 5740,
'8161': 5741,
'8170': 5742,
'81702': 5743,
'81716': 5744,
'81728': 5745,
'81731': 5746,
'81788': 5747,
'81789': 5748,
'81827': 5749,
'81856': 5750,
'81888': 5751,
'81891': 5752,
'81941': 5753,
'81945': 5754,
'81964': 5755,
'8198': 5756,
'82008': 5757,
'82057': 5758,
'82117': 5759,
'8213': 5760,
'82137': 5761,
'82155': 5762,
'82233': 5763,
'82253': 5764,
'82260': 5765,
'82320': 5766,
'82335': 5767,
'82386': 5768,
'82412': 5769,
'82428': 5770,
'8245': 5771,
'8247': 5772,
'82471': 5773,
'82546': 5774,
'82563': 5775,
'82573': 5776,
'82579': 5777,
'82635': 5778,
'82637': 5779,
'82666': 5780,
'82668': 5781,
'82683': 5782,
'82718': 5783,
'82729': 5784,
'82734': 5785,
'82763': 5786,
'82804': 5787,
'82862': 5788,
'82889': 5789,
'8291': 5790,
'82936': 5791,
'83061': 5792,
'83131': 5793,
'83139': 5794,
'83144': 5795,
'83160': 5796,
'83189': 5797,
'83211': 5798,
'83235': 5799,
'83245': 5800,
'83247': 5801,
'83282': 5802,
'83298': 5803,
'8330': 5804,
'83390': 5805,
'83392': 5806,
'83409': 5807,
'83416': 5808,
'83423': 5809,
'83467': 5810,
'83504': 5811,
'8351': 5812,
'83547': 5813,
'83552': 5814,
'83597': 5815,
'83631': 5816,
'83653': 5817,
'83663': 5818,
'83692': 5819,
'83697': 5820,
'83700': 5821,
'8379': 5822,
'83857': 5823,
'83859': 5824,
'83885': 5825,
'83890': 5826,
'83920': 5827,
'83928': 5828,
'83972': 5829,
'84042': 5830,
'84065': 5831,
'84147': 5832,
'84154': 5833,
'84194': 5834,
'84247': 5835,
'84269': 5836,
'84281': 5837,
'84301': 5838,
'84326': 5839,
'84329': 5840,
'84415': 5841,
'84461': 5842,
'84483': 5843,
'84487': 5844,
'84491': 5845,
'84509': 5846,
'84537': 5847,
'84553': 5848,
'84575': 5849,
'84689': 5850,
'84714': 5851,
'84795': 5852,
'84796': 5853,
'84808': 5854,
'84810': 5855,
'84844': 5856,
'84853': 5857,
'84867': 5858,
'84871': 5859,
'84905': 5860,
'84939': 5861,
'84966': 5862,
'85001': 5863,
'85018': 5864,
'85040': 5865,
'85081': 5866,
'85114': 5867,
'85143': 5868,
'85213': 5869,
'85220': 5870,
'85232': 5871,
'85238': 5872,
'85374': 5873,
'854': 5874,
'85423': 5875,
'85433': 5876,
'85447': 5877,
'85449': 5878,
'85469': 5879,
'85476': 5880,
'85495': 5881,
'85512': 5882,
'85545': 5883,
'85604': 5884,
'85633': 5885,
'85646': 5886,
'85658': 5887,
'85663': 5888,
'85758': 5889,
'85791': 5890,
'85806': 5891,
'85807': 5892,
'85910': 5893,
'85928': 5894,
'86026': 5895,
'86083': 5896,
'86108': 5897,
'86125': 5898,
'86146': 5899,
'86165': 5900,
'86175': 5901,
'86213': 5902,
'8622': 5903,
'86227': 5904,
'86230': 5905,
'86267': 5906,
'8627': 5907,
'86276': 5908,
'86283': 5909,
'86301': 5910,
'86304': 5911,
'86441': 5912,
'86453': 5913,
'86473': 5914,
'86492': 5915,
'86504': 5916,
'86536': 5917,
'86584': 5918,
'86609': 5919,
'86615': 5920,
'86655': 5921,
'86732': 5922,
'86738': 5923,
'86751': 5924,
'86757': 5925,
'86828': 5926,
'86869': 5927,
'86917': 5928,
'86918': 5929,
'86927': 5930,
'8694': 5931,
'86940': 5932,
'86947': 5933,
'86980': 5934,
'86982': 5935,
'86992': 5936,
'870': 5937,
'87002': 5938,
'87005': 5939,
'87049': 5940,
'87080': 5941,
'87083': 5942,
'87157': 5943,
'87226': 5944,
'87250': 5945,
'873': 5946,
'87367': 5947,
'87389': 5948,
'87404': 5949,
'87421': 5950,
'8745': 5951,
'87461': 5952,
'8749': 5953,
'87514': 5954,
'87532': 5955,
'87544': 5956,
'87612': 5957,
'87644': 5958,
'87674': 5959,
'87717': 5960,
'87785': 5961,
'87787': 5962,
'87887': 5963,
'87915': 5964,
'87919': 5965,
'87935': 5966,
'87982': 5967,
'87987': 5968,
'8799': 5969,
'88006': 5970,
'88022': 5971,
'88040': 5972,
'88124': 5973,
'88194': 5974,
'88202': 5975,
'8822': 5976,
'88228': 5977,
'88231': 5978,
'88286': 5979,
'88331': 5980,
'88339': 5981,
'8834': 5982,
'88351': 5983,
'88408': 5984,
'88432': 5985,
'88438': 5986,
'88451': 5987,
'88472': 5988,
'88483': 5989,
'88534': 5990,
'88546': 5991,
'88612': 5992,
'88660': 5993,
'88729': 5994,
'88761': 5995,
'88764': 5996,
'88782': 5997,
'88802': 5998,
'88803': 5999,
'88840': 6000,
'88853': 6001,
'88900': 6002,
'89105': 6003,
'89122': 6004,
'89129': 6005,
'8918': 6006,
'89207': 6007,
'89220': 6008,
'89244': 6009,
'89259': 6010,
'89260': 6011,
'89317': 6012,
'89435': 6013,
'8944': 6014,
'89440': 6015,
'89443': 6016,
'89458': 6017,
'89480': 6018,
'89481': 6019,
'89520': 6020,
'89530': 6021,
'89587': 6022,
'89622': 6023,
'89649': 6024,
'89668': 6025,
'89694': 6026,
'89718': 6027,
'89781': 6028,
'89788': 6029,
'89794': 6030,
'89839': 6031,
'89859': 6032,
'89931': 6033,
'89948': 6034,
'89974': 6035,
'89975': 6036,
'8998': 6037,
'90009': 6038,
'90011': 6039,
'90021': 6040,
'90025': 6041,
'90054': 6042,
'90071': 6043,
'901': 6044,
'90119': 6045,
'90134': 6046,
'90169': 6047,
'90175': 6048,
'90331': 6049,
'90358': 6050,
'90396': 6051,
'90424': 6052,
'9052': 6053,
'90597': 6054,
'90632': 6055,
'90633': 6056,
'90647': 6057,
'90665': 6058,
'9067': 6059,
'90672': 6060,
'9070': 6061,
'9073': 6062,
'90823': 6063,
'90902': 6064,
'90966': 6065,
'90979': 6066,
'90991': 6067,
'90997': 6068,
'91059': 6069,
'91061': 6070,
'91079': 6071,
'91132': 6072,
'91146': 6073,
'9115': 6074,
'91156': 6075,
'91180': 6076,
'91274': 6077,
'91284': 6078,
'91285': 6079,
'91414': 6080,
'91505': 6081,
'91557': 6082,
'91563': 6083,
'91659': 6084,
'91684': 6085,
'91707': 6086,
'91772': 6087,
'91798': 6088,
'91799': 6089,
'91839': 6090,
'91879': 6091,
'91882': 6092,
'91895': 6093,
'91980': 6094,
'92099': 6095,
'92208': 6096,
'92224': 6097,
'92226': 6098,
'92275': 6099,
'92349': 6100,
'92363': 6101,
'92369': 6102,
'92371': 6103,
'92377': 6104,
'92432': 6105,
'925': 6106,
'92508': 6107,
'92525': 6108,
'92585': 6109,
'92607': 6110,
'92746': 6111,
'92881': 6112,
'92893': 6113,
'92901': 6114,
'92911': 6115,
'93025': 6116,
'93102': 6117,
'93106': 6118,
'93154': 6119,
'93198': 6120,
'93221': 6121,
'93241': 6122,
'93312': 6123,
'93346': 6124,
'93356': 6125,
'93376': 6126,
'93392': 6127,
'93420': 6128,
'93435': 6129,
'93521': 6130,
'93598': 6131,
'93683': 6132,
'93699': 6133,
'93701': 6134,
'93768': 6135,
'93770': 6136,
'93869': 6137,
'93904': 6138,
'93957': 6139,
'93961': 6140,
'93975': 6141,
'93986': 6142,
'93992': 6143,
'93993': 6144,
'94002': 6145,
'94003': 6146,
'94037': 6147,
'94054': 6148,
'94077': 6149,
'94109': 6150,
'94130': 6151,
'94168': 6152,
'94224': 6153,
'94269': 6154,
'94310': 6155,
'94320': 6156,
'94332': 6157,
'9438': 6158,
'94381': 6159,
'94449': 6160,
'94575': 6161,
'94608': 6162,
'9463': 6163,
'94677': 6164,
'94741': 6165,
'94764': 6166,
'94786': 6167,
'94824': 6168,
'94881': 6169,
'94932': 6170,
'94946': 6171,
'95008': 6172,
'95014': 6173,
'95067': 6174,
'95086': 6175,
'95094': 6176,
'951': 6177,
'95101': 6178,
'95187': 6179,
'95194': 6180,
'952': 6181,
'95245': 6182,
'95326': 6183,
'9534': 6184,
'9540': 6185,
'95439': 6186,
'95455': 6187,
'95507': 6188,
'95516': 6189,
'95585': 6190,
'95609': 6191,
'95628': 6192,
'95637': 6193,
'95664': 6194,
'95672': 6195,
'95756': 6196,
'95885': 6197,
'95901': 6198,
'95905': 6199,
'95963': 6200,
'9597': 6201,
'95999': 6202,
'96110': 6203,
'96152': 6204,
'96197': 6205,
'96209': 6206,
'96224': 6207,
'96236': 6208,
'96270': 6209,
'96325': 6210,
'96331': 6211,
'96397': 6212,
'9640': 6213,
'96412': 6214,
'96420': 6215,
'96431': 6216,
'96455': 6217,
'96471': 6218,
'96506': 6219,
'96520': 6220,
'96524': 6221,
'96567': 6222,
'96653': 6223,
'96663': 6224,
'96680': 6225,
'96711': 6226,
'96720': 6227,
'9673': 6228,
'9681': 6229,
'96817': 6230,
'96842': 6231,
'96898': 6232,
'969': 6233,
'96922': 6234,
'96931': 6235,
'96945': 6236,
'96982': 6237,
'97015': 6238,
'9706': 6239,
'97125': 6240,
'97134': 6241,
'97142': 6242,
'97176': 6243,
'97210': 6244,
'97228': 6245,
'97283': 6246,
'97292': 6247,
'97306': 6248,
'97324': 6249,
'97342': 6250,
'97345': 6251,
'97389': 6252,
'97420': 6253,
'9745': 6254,
'97465': 6255,
'97531': 6256,
'97548': 6257,
'9756': 6258,
'97643': 6259,
'97654': 6260,
'97668': 6261,
'9772': 6262,
'97734': 6263,
'97765': 6264,
'97783': 6265,
'97791': 6266,
'97834': 6267,
'97840': 6268,
'97853': 6269,
'97854': 6270,
'97895': 6271,
'97901': 6272,
'97989': 6273,
'98003': 6274,
'98038': 6275,
'98062': 6276,
'98075': 6277,
'98136': 6278,
'98143': 6279,
'98179': 6280,
'9819': 6281,
'98197': 6282,
'9823': 6283,
'98230': 6284,
'98280': 6285,
'98323': 6286,
'98335': 6287,
'98355': 6288,
'98385': 6289,
'9846': 6290,
'98460': 6291,
'9847': 6292,
'98472': 6293,
'9848': 6294,
'98496': 6295,
'98523': 6296,
'98657': 6297,
'98699': 6298,
'98728': 6299,
'98773': 6300,
'98852': 6301,
'98857': 6302,
'98884': 6303,
'98885': 6304,
'98894': 6305,
'98900': 6306,
'98903': 6307,
'98917': 6308,
'98974': 6309,
'98993': 6310,
'99003': 6311,
'99133': 6312,
'99266': 6313,
'99323': 6314,
'99330': 6315,
'99392': 6316,
'99486': 6317,
'99515': 6318,
'99524': 6319,
'99543': 6320,
'99692': 6321,
'99759': 6322,
'99800': 6323,
'99806': 6324,
'99844': 6325,
'99851': 6326,
'99879': 6327,
'99931': 6328,
'99943': 6329,
'99974': 6330,
'99994': 6331}
| [
2389,
62,
10468,
62,
48780,
3698,
796,
3467,
198,
220,
220,
220,
1391,
6,
12825,
2078,
10354,
657,
11,
198,
220,
220,
220,
220,
705,
12825,
6469,
10354,
352,
11,
198,
220,
220,
220,
220,
705,
3064,
21940,
10354,
362,
11,
198,
220,
... | 1.654187 | 77,646 |
# -*- coding:utf-8 -*-
import os
import argparse
import paddle
import paddlehub as hub
from paddlehub.module.module import serving, moduleinfo, runnable
from paddlenlp import Taskflow
@moduleinfo(
name="nptag",
version="1.0.0",
summary="",
author="Baidu",
author_email="",
type="nlp/text_to_knowledge",
meta=hub.NLPPredictionModule)
| [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
198,
11748,
39517,
198,
11748,
39517,
40140,
355,
12575,
198,
6738,
39517,
40140,
13,
21412,
13,
21412,
1330,
7351,
11,
8265,
10951,... | 2.637681 | 138 |
from typing import Generator
if __name__ == "__main__":
for i in fib(50):
print(i)
| [
6738,
19720,
1330,
35986,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
329,
1312,
287,
12900,
7,
1120,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
72,
8,
198
] | 2.390244 | 41 |
# author: tthomas@metamorphsoftware.com
# date: 2017-06-05
# description: automations script for converting '.m' files to python wrappers
import re
import glob
if __name__ == '__main__':
component_name = ""
params_orig = list()
params_new = list()
unknowns_orig = list()
unknowns_new = list()
arrays = list()
for file in glob.glob('*.m'):
with open(file, 'r') as fin:
text = fin.readlines()
# Pass 1
for line in text:
m = re.match(r'function \[([\w,]+)\] = (\w+)\(([\w,]+)\)', line)
if m is not None:
unknowns_orig = list(m.group(1).split(','))
component_name = m.group(2)
params_orig = list(m.group(3).split(','))
else:
for unknown in unknowns_orig:
if unknown in line:
captures = re.findall('({}\\.\\w+)'.format(unknown), line)
if len(captures) > 0:
if unknown not in arrays:
arrays.append(unknown)
for c in captures:
if c not in unknowns_new:
unknowns_new.append(c.replace('.', '_'))
for param in params_orig:
if param in line:
captures = re.findall('({}\\.\\w+)'.format(param), line)
if len(captures) > 0:
if param not in arrays:
arrays.append(param)
for c in captures:
if c not in params_new:
params_new.append(c.replace('.', '_'))
for name in arrays:
if name in params_orig:
params_orig.remove(name)
if name in unknowns_orig:
unknowns_orig.remove(name)
# print component_name
# print params_orig
# print unknowns_orig
# print params_new + params_orig
# print unknowns_new + unknowns_orig
params = params_new + params_orig
unknowns = unknowns_new + unknowns_orig
header = """
from __future__ import print_function
from openmdao.api import IndepVarComp, Component, Problem, Group, FileRef
import numpy as np
class {name}(Component):
def __init__(self):
super({name}, self).__init__()
""".format(name=component_name)
solve_nonlinear = """
def solve_nonlinear(self, params, unknowns, resids):
"""
with open('{}.py'.format(component_name), 'w') as fout:
in_body = False
# Pass 2
for line in text:
m = re.match(r'function \[([\w,]+)\] = (\w+)\(([\w,]+)\)', line)
if m is not None:
fout.write(header)
for param in params:
fout.write(" self.add_param('{}', val=1.0)\n".format(param))
fout.write("\n")
for unknown in unknowns:
fout.write(" self.add_output('{}', val=1.0)\n".format(unknown))
fout.write(solve_nonlinear)
in_body = True
else:
line = re.sub(r'^([ \t]*)%', r'\1#', line)
line = re.sub(r'; %', r' #', line)
line = re.sub(r';', r'', line)
line = re.sub(r'^\w*end\w*$', r'', line)
line = line.replace('^', '**')
line = line.replace(' pi ', ' math.pi ')
line = line.replace('sqrt(', 'math.sqrt(')
line = line.replace('^', '**')
line = line.replace('...', '\\')
line = line.replace('./', '/')
line = line.replace('.*', '*')
if in_body:
for unknown in unknowns:
line = line.replace(unknown, "unknowns['{}']".format(unknown))
for param in params:
line = line.replace(param, "params['{}']".format(param))
fout.write(" "+line)
else:
fout.write(line) | [
2,
1772,
25,
256,
400,
16911,
31,
4164,
37670,
43776,
13,
785,
198,
2,
3128,
25,
220,
220,
2177,
12,
3312,
12,
2713,
198,
2,
6764,
25,
3557,
602,
4226,
329,
23202,
45302,
76,
6,
3696,
284,
21015,
7917,
11799,
198,
198,
11748,
302,... | 1.643126 | 2,917 |
import sys, os
from PySide2.QtUiTools import QUiLoader #allows us to import .ui files
from PySide2.QtWidgets import QApplication, QLineEdit, QPushButton, QFileDialog, QAction, QSlider, QMouseEventTransition, QLabel
from PySide2.QtCore import QFile, QObject, QUrl
from PySide2.QtMultimedia import QMediaPlayer
from PySide2.QtGui import QPixmap
#class constructor
if __name__ == '__main__':
app = QApplication(sys.argv)
main_window = MainWindow('MainWindow.ui')
sys.exit(app.exec_())
| [
11748,
25064,
11,
28686,
198,
6738,
9485,
24819,
17,
13,
48,
83,
52,
72,
33637,
1330,
19604,
72,
17401,
1303,
47205,
514,
284,
1330,
764,
9019,
3696,
198,
6738,
9485,
24819,
17,
13,
48,
83,
54,
312,
11407,
1330,
1195,
23416,
11,
119... | 2.589109 | 202 |
from RL.utils.util_fns import update_mean_std
import logging
import sys
from typing import List
import numpy as np
import RL
ids = 0
logger = logging.getLogger(__name__)
ldebug = logger.isEnabledFor(logging.DEBUG)
class ExperienceBuffer:
'''A circular buffer to hold experiences'''
@property
@property
# def random_rollouts_unzipped(self, count, rollout_size, dones_as_ints=True, return_costs=False):
# starting_indices = np.random.randint(
# 0, self.count - rollout_size, size=count)
# states, actions, rewards, dones, infos, next_states = [], [], [], [], [], []
# if return_costs:
# costs = []
# for i in starting_indices:
# rollout = self.buffer[i:i + rollout_size]
# states.append([exp.state for exp in rollout])
# actions.append([exp.action for exp in rollout])
# rewards.append([exp.reward for exp in rollout])
# dones.append(
# [int(exp.done) if dones_as_ints else exp.done for exp in rollout])
# infos.append([exp.info for exp in rollout])
# next_states.append([exp.next_state for exp in rollout])
# if return_costs:
# costs.append([exp.cost for exp in rollout])
# states, actions, rewards, dones, infos, next_states = np.asarray(states), np.asarray(
# actions), np.asarray(rewards), np.asarray(dones), np.asarray(infos), np.asarray(next_states)
# if return_costs:
# costs = np.asarray(costs)
# if return_costs:
# return_items = (states, actions, rewards, costs,
# dones, infos, next_states)
# else:
# return_items = (states, actions, rewards,
# dones, infos, next_states)
# for item in return_items:
# assert list(item.shape[0:2]) == [count, rollout_size], "item: {0}, shape: {1}, expected: {2}".format(
# item, list(item.shape), [count, rollout_size])
# return return_items
| [
6738,
45715,
13,
26791,
13,
22602,
62,
69,
5907,
1330,
4296,
62,
32604,
62,
19282,
198,
11748,
18931,
198,
11748,
25064,
198,
6738,
19720,
1330,
7343,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
45715,
198,
198,
2340,
796,... | 2.230108 | 930 |
# -*- coding: utf-8 -*-
"""
Do statistics on the transcriptomic type and plot low-dimensional
embeddings.
"""
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import os
from scipy.stats import ranksums
plt.rcParams["svg.fonttype"] = "none"
sns.set(
context="paper",
style="ticks",
palette="colorblind",
font="Arial",
font_scale=2,
color_codes=True,
)
# Load count and alignment data and merge them into one annotated dataframe
dirname = os.path.dirname(__file__)
ephys_path = os.path.join(dirname, "data", "ephys_full_df.csv")
ephys_df = pd.read_csv(ephys_path, index_col=0)
ephys_df = ephys_df[ephys_df.sequencing]
interneurons = ephys_df["PC vs IN Cluster"] == "IN"
coloc_bool = ephys_df["SST & Slc17a8 Positive"].astype(bool)
ephys_df["SST & Slc17a8 Positive"] = coloc_bool
fig = plt.figure()
gs = fig.add_gridspec(1, 2)
ax1 = fig.add_subplot(gs[0, 0:1])
ax2 = fig.add_subplot(gs[0, 1])
sns.scatterplot(
x="SST Log2 CPM",
y="Slc17a8 Log2 CPM",
hue="SST & Slc17a8 Positive",
data=ephys_df[interneurons],
ax=ax1,
s=150,
linewidth=0,
alpha=0.95,
)
ax1.set_aspect(
(ax1.get_xlim()[1] - ax1.get_xlim()[0]) /
(ax1.get_ylim()[1] - ax1.get_ylim()[0])
)
ax1.set_ylabel("Sst log2 CPM")
ax1.set_xlabel("Slc17a8 log2 CPM")
sns.scatterplot(
x="TSNE 1",
y="TSNE 2",
hue="SST & Slc17a8 Positive",
data=ephys_df[interneurons],
alpha=0.95,
s=150,
ax=ax2,
linewidth=0,
)
ax2.set_aspect(
(ax2.get_xlim()[1] - ax2.get_xlim()[0]) /
(ax2.get_ylim()[1] - ax2.get_ylim()[0])
)
"""TRANSGENIC AND TRANSCRIPTOMIC TYPE EPHYS"""
ephys_df["Coloc Genic Omic"] = False
coloc = ephys_df["SST & Slc17a8 Positive"]
ephys_df.loc[coloc, "Coloc Genic Omic"] = True
coloc_transgenic = (ephys_df["SST Positive"] &
(ephys_df["label"] == "VGlut3-EYFP"))
ephys_df.loc[coloc_transgenic, "Coloc Genic Omic"] = True
fig = plt.figure()
gs = fig.add_gridspec(1, 2)
ax1 = fig.add_subplot(gs[0, 0:1])
ax2 = fig.add_subplot(gs[0, 1])
sns.scatterplot(
x="SST Log2 CPM",
y="Slc17a8 Log2 CPM",
hue="Coloc Genic Omic",
data=ephys_df[interneurons],
ax=ax1,
s=150,
linewidth=0,
alpha=0.95,
)
ax1.set_aspect(
(ax1.get_xlim()[1] - ax1.get_xlim()[0]) /
(ax1.get_ylim()[1] - ax1.get_ylim()[0])
)
ax1.set_ylabel("Sst log2 CPM")
ax1.set_xlabel("Slc17a8 log2 CPM")
sns.scatterplot(
x="TSNE 1",
y="TSNE 2",
hue="Coloc Genic Omic",
data=ephys_df,
alpha=0.95,
s=150,
ax=ax2,
linewidth=0,
)
ax2.set_aspect(
(ax2.get_xlim()[1] - ax2.get_xlim()[0]) /
(ax2.get_ylim()[1] - ax2.get_ylim()[0])
)
# Analyze contingency between seq marker and fluorescent marker
seq_fluo_table = pd.crosstab(ephys_df["Transcriptomic Type"],
ephys_df["label"])
"""Ranksum test on electrophysiology for colocalizing cells"""
result_omic_dict = {}
features = [
"Max. Freq. (Hz)",
"Slow AHP (mV)",
"Rheobase (pA)",
"I at Max. Freq. (pA)",
"Adaptation ratio",
"Avg Spike Time (s)",
"Input R (MOhm)",
"Capacitance (pF)",
"Sag Amplitude (mV)",
"Resting (mV)",
"RS AHP Amp. (mV)",
"RS Max. Slope (mV/ms)",
"RS Min. Slope (mV/ms)",
"RS Peak (mV)",
"RS Half Width (ms)",
"RS Threshold (mV)",
"LS AHP Amp. (mV)",
"LS Max. Slope (mV/ms)",
"LS Min. Slope (mV/ms)",
"LS Peak (mV)",
"LS Half Width (ms)",
"LS Threshold (mV)",
]
coloc = ephys_df[ephys_df["SST & Slc17a8 Positive"]]
noncoloc = ephys_df[~ephys_df["SST & Slc17a8 Positive"]]
for f in features:
x = coloc[f]
y = noncoloc[f]
result = ranksums(x, y)
result_omic_dict[f] = [result.statistic, result.pvalue]
result_genicomic_dict = {}
coloc = ephys_df[ephys_df["Coloc Genic Omic"]]
noncoloc = ephys_df[~ephys_df["Coloc Genic Omic"]]
for f in features:
x = coloc[f]
y = noncoloc[f]
result = ranksums(x, y)
result_genicomic_dict[f] = [result.statistic, result.pvalue]
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
5211,
7869,
319,
262,
14687,
10179,
2099,
290,
7110,
1877,
12,
19577,
198,
20521,
67,
654,
13,
198,
37811,
628,
198,
11748,
19798,
292,
355,
279,
67,
198,
... | 2.026263 | 1,980 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mapex` python will execute
``__main__.py`` as a script. That means there won't be any
``apex.__main__`` in ``sys.modules``.
- When you import __main__ it will get executed again (as a module) because
there's no ``apex.__main__`` in ``sys.modules``.
Also see (1) from http://click.pocoo.org/5/setuptools/#setuptools-integration
"""
# These imports are for python3 compatibility inside python2
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import signal
import sys
import threading
import time
import click
import six
import apex.aprs
import apex.buffers
from apex.kiss import constants as kissConstants
from apex.plugin_loader import get_plugins
from apex.plugin_loader import load_plugin
from .buffers import NonrepeatingBuffer
from .util import echo_colorized_error
from .util import echo_colorized_warning
configparser = None
if six.PY2:
import ConfigParser # noqa: F401
if configparser is None:
configparser = ConfigParser
elif six.PY3:
import configparser
__author__ = 'Jeffrey Phillips Freeman (WI2ARD)'
__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)'
__email__ = 'jeffrey.freeman@syncleus.com'
__license__ = 'Apache License, Version 2.0'
__copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors'
__credits__ = []
config = None
aprsis = None
port_map = {}
running = True
plugin_modules = []
plugin_threads = []
@click.command(context_settings=dict(auto_envvar_prefix='APEX'))
@click.option('-c',
'--configfile',
type=click.Path(exists=True, file_okay=True, dir_okay=False, readable=True, resolve_path=True),
help='Configuration file for APEX.')
@click.option('-v', '--verbose', is_flag=True, help='Enables verbose mode.')
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
26796,
326,
4909,
262,
3141,
1627,
598,
13,
198,
198,
5195,
857,
428,
2393,
2152,
11,
290,
1521,
407... | 3.005682 | 704 |
# jsb/plugs/core/topic.py
#
#
""" manage topics. """
## jsb imports
from jsb.lib.commands import cmnds
from jsb.lib.examples import examples
## basic imports
import time
## checktopicmode function
def checktopicmode(bot, ievent):
""" callback for change in channel topic mode """
chan = ievent.channel
mode = ievent.chan.data.mode
if mode and 't' in mode:
if chan not in bot.state['opchan']:
ievent.reply("i'm not op on %s" % chan)
return 0
return 1
## topic command
def handle_gettopic(bot, ievent):
""" arguments: [<channel>] - get topic """
try: channel = ievent.args[0]
except IndexError: channel = ievent.channel
result = bot.gettopic(channel)
try:
(what, who, when) = result
ievent.reply('topic on %s is %s made by %s on %s' % (channel, what, who, time.ctime(when)))
except (ValueError, TypeError): ievent.reply("can't get topic data of channel %s" % channel)
cmnds.add('topic', handle_gettopic, 'USER', threaded=True)
examples.add('topic', 'get topic', '1) topic 2) topic #dunkbots')
## topic-set command
def handle_topicset(bot, ievent):
""" arguments: <topic> - set the topic """
if not bot.jabber and not checktopicmode(bot, ievent): return
if not ievent.rest: ievent.missing('<topic>') ; return
bot.settopic(ievent.channel, ievent.rest)
ievent.done()
cmnds.add('topic-set', handle_topicset, 'USER', allowqueue=False)
examples.add('topic-set', 'set channel topic', 'topic-set Yooo')
## topic-add
def handle_topicadd(bot, ievent):
""" arguments: <txt> - add topic item """
if not bot.jabber and not checktopicmode(bot, ievent): return
if not ievent.rest: ievent.missing("<txt>") ; return
result = bot.gettopic(ievent.channel)
if not result: ievent.reply("can't get topic data") ; return
what = result[0]
what += " | %s" % ievent.rest
bot.settopic(ievent.channel, what)
ievent.done()
cmnds.add('topic-add', handle_topicadd, 'USER', threaded=True)
examples.add('topic-add', 'add a topic item to the current topic.', 'topic-add mekker')
## topic-del command
def handle_topicdel(bot, ievent):
""" arguments: <topicnr> - delete topic item """
if not bot.jabber and not checktopicmode(bot, ievent): return
try: topicnr = int(ievent.args[0])
except (IndexError, ValueError): ievent.reply('i need a integer as argument') ; return
if topicnr < 1: ievent.reply('topic items start at 1') ; return
result = bot.gettopic(ievent.channel)
if not result: ievent.reply("can't get topic data") ; return
what = result[0].split(' | ')
if topicnr > len(what): ievent.reply('there are only %s topic items' % len(what)) ; return
del what[topicnr-1]
newtopic = ' | '.join(what)
bot.settopic(ievent.channel, newtopic)
ievent.done()
cmnds.add('topic-del', handle_topicdel, 'USER', threaded=True)
examples.add('topic-del', 'topic-del <topicnr> .. delete topic item', 'topic-del 1')
## topic-move
def handle_topicmove(bot, ievent):
""" arguments: <nrfrom> <nrto> - move topic item """
if not bot.jabber and not checktopicmode(bot, ievent): return
try: (topicfrom, topicto) = ievent.args
except ValueError: ievent.missing('<from> <to>') ; return
try: topicfrom = int(topicfrom) ; topicto = int(topicto)
except ValueError: ievent.reply('i need two integers as arguments') ; return
if topicfrom < 1 or topicto < 1: ievent.reply('topic items start at 1') ; return
topicdata = bot.gettopic(ievent.channel)
if not topicdata: ievent.reply("can't get topic data") ; return
splitted = topicdata[0].split(' | ')
if topicfrom > len(splitted) or topicto > len(splitted): ievent.reply('max item is %s' % len(splitted)) ; return
tmp = splitted[topicfrom-1]
del splitted[topicfrom-1]
splitted.insert(topicto-1, tmp)
newtopic = ' | '.join(splitted)
bot.settopic(ievent.channel, newtopic)
ievent.done()
cmnds.add('topic-move', handle_topicmove, 'USER', threaded=True)
examples.add('topic-move', 'move topic items', 'topic-move 3 1')
## topic-listadd command
def handle_topiclistadd(bot, ievent):
""" arguments: <topicnr> <person> - add a person to a topic list """
if not bot.jabber and not checktopicmode(bot, ievent): return
try: (topicnr, person) = ievent.args
except ValueError: ievent.missing('<topicnr> <person>') ; return
try: topicnr = int(topicnr)
except ValueError: ievent.reply('i need an integer as topicnr') ; return
if topicnr < 1: ievent.reply('topic items start at 1') ; return
topicdata = bot.gettopic(ievent.channel)
if not topicdata: ievent.reply("can't get topic data") ; return
splitted = topicdata[0].split(' | ')
if topicnr > len(splitted): ievent.reply('max item is %s' % len(splitted)) ; return
try: topic = splitted[topicnr-1]
except IndexError: ievent.reply('no %s topic found' % str(topicnr)) ; return
if topic.strip().endswith(':'): topic += " %s" % person
else: topic += ",%s" % person
splitted[topicnr-1] = topic
newtopic = ' | '.join(splitted)
bot.settopic(ievent.channel, newtopic)
ievent.done()
cmnds.add('topic-listadd', handle_topiclistadd, 'USER', threaded=True)
examples.add('topic-listadd', 'topic-listadd <toicnr> <person> .. add user to topiclist', 'topic-listadd 1 bart')
## topic-listdel command
def handle_topiclistdel(bot, ievent):
""" arguments: <topicnr> <person> - remove person from topic list """
if not bot.jabber and not checktopicmode(bot, ievent): return
try: (topicnr, person) = ievent.args
except ValueError: ievent.missing('<topicnr> <person>') ; return
try: topicnr = int(topicnr)
except ValueError: ievent.reply('i need an integer as topicnr') ; return
if topicnr < 1: ievent.reply('topic items start at 1') ; return
topicdata = bot.gettopic(ievent.channel)
if not topicdata: ievent.reply("can't get topic data") ; return
splitted = topicdata[0].split(' | ')
if topicnr > len(splitted): ievent.reply('max item is %s' % len(splitted)) ; return
try: topic = splitted[topicnr-1]
except IndexError: ievent.reply('no %s topic found' % str(topicnr)) ; return
if not person in topic: ievent.reply('%s is not on the list' % person) ; return
l = topic.rsplit(':', 1)
try:
persons = l[-1].split(',')
persons = [i.strip() for i in persons]
persons.remove(person)
except ValueError: ievent.reply('no %s in list' % person) ; return
except IndexError: ievent.reply('i need a : in the topic to work properly') ; return
splitted[topicnr-1] = "%s: %s" % (l[0], ','.join(persons))
newtopic = ' | '.join(splitted)
bot.settopic(ievent.channel, newtopic)
ievent.done()
cmnds.add('topic-listdel', handle_topiclistdel, 'USER', threaded=True)
examples.add('topic-listdel', 'delete user from topic list', 'topic-listdel 1 bart')
#### BHJTW 6-03-2012 | [
2,
474,
36299,
14,
489,
10339,
14,
7295,
14,
26652,
13,
9078,
198,
2,
198,
2,
198,
198,
37811,
6687,
10233,
13,
37227,
198,
198,
2235,
474,
36299,
17944,
198,
198,
6738,
474,
36299,
13,
8019,
13,
9503,
1746,
1330,
12067,
358,
82,
... | 2.707536 | 2,561 |
import json
from collections import namedtuple
from typing import Dict, NamedTuple
def dict_to_object(data_dict: Dict) -> NamedTuple:
"""Converts dict to an object"""
try:
Data = namedtuple("Data", " ".join(data_dict.keys()))
except AttributeError:
raise TypeError("Must be a dict.")
data = Data(**data_dict)
return data
# Functions to be flashed to the Microbit
def dict_to_string(data):
"""Takes a dictionary and converts it to a string to send
over serial connection with Micro:Bit
Args:
data: Dict
Returns:
str: JSON string of the data.
"""
return (str(data).replace("'", '"')
.replace(": False", ": false")
.replace(": True", ": true")) | [
11748,
33918,
198,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
198,
6738,
19720,
1330,
360,
713,
11,
34441,
51,
29291,
628,
628,
198,
4299,
8633,
62,
1462,
62,
15252,
7,
7890,
62,
11600,
25,
360,
713,
8,
4613,
34441,
51,
29291,
25... | 2.491909 | 309 |
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import unittest
from prepare_vads import split_vad
if __name__ == '__main__':
unittest.main()
| [
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262,
6808,
8619,
286,
428,
2723,
5509,
13,
198,
198,
... | 3.349398 | 83 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from .. import core as erfa
def test_erfa_wrapper():
"""
Runs a set of tests that mostly make sure vectorization is
working as expected
"""
jd = np.linspace(2456855.5, 2456855.5+1.0/24.0/60.0, 60*2+1)
ra = np.linspace(0.0, np.pi*2.0, 5)
dec = np.linspace(-np.pi/2.0, np.pi/2.0, 4)
aob, zob, hob, dob, rob, eo = erfa.atco13(0.0,0.0,0.0,0.0,0.0,0.0,jd,0.0,0.0,0.0,np.pi/4.0,0.0,0.0,0.0,1014.0,0.0,0.0,0.5)
assert aob.shape == (121,)
aob, zob, hob, dob, rob, eo = erfa.atco13(0.0,0.0,0.0,0.0,0.0,0.0,jd[0],0.0,0.0,0.0,np.pi/4.0,0.0,0.0,0.0,1014.0,0.0,0.0,0.5)
assert aob.shape == ()
aob, zob, hob, dob, rob, eo = erfa.atco13(ra[:,None,None],dec[None,:,None],0.0,0.0,0.0,0.0,jd[None,None,:],0.0,0.0,0.0,np.pi/4.0,0.0,0.0,0.0,1014.0,0.0,0.0,0.5)
(aob.shape) == (5, 4, 121)
iy, im, id, ihmsf = erfa.d2dtf("UTC", 3, jd, 0.0)
assert iy.shape == (121,)
assert ihmsf.shape == (121, 4)
assert ihmsf.dtype == np.dtype('i4')
iy, im, id, ihmsf = erfa.d2dtf("UTC", 3, jd[0], 0.0)
assert iy.shape == ()
assert ihmsf.shape == (4,)
assert ihmsf.dtype == np.dtype('i4')
def test_errwarn_reporting(recwarn):
"""
Test that the ERFA error reporting mechanism works as it should
"""
# no warning
erfa.dat(1990, 1, 1, 0.5)
# check warning is raised for a scalar
erfa.dat(100, 1, 1, 0.5)
w = recwarn.pop(erfa.ErfaWarning)
assert '1 of "dubious year (Note 1)"' in str(w.message)
# and that the count is right for a vector.
erfa.dat([100, 200, 1990], 1, 1, 0.5)
w = recwarn.pop(erfa.ErfaWarning)
assert '2 of "dubious year (Note 1)"' in str(w.message)
try:
erfa.dat(1990, [1, 34, 2], [1, 1, 43], 0.5)
except erfa.ErfaError as e:
if '1 of "bad day (Note 3)", 1 of "bad month"' not in e.args[0]:
assert False, 'Raised the correct type of error, but wrong message: ' + e.args[0]
try:
erfa.dat(200, [1, 34, 2], [1, 1, 43], 0.5)
except erfa.ErfaError as e:
if 'warning' in e.args[0]:
assert False, 'Raised the correct type of error, but there were warnings mixed in: ' + e.args[0]
def test_vector_inouts():
"""
Tests that ERFA functions working with vectors are correctly consumed and spit out
"""
#values are from test_erfa.c t_ab function
pnat = [-0.76321968546737951,
-0.60869453983060384,
-0.21676408580639883]
v = [ 2.1044018893653786e-5,
-8.9108923304429319e-5,
-3.8633714797716569e-5]
s = 0.99980921395708788
bm1 = 0.99999999506209258
expected = [-0.7631631094219556269,
-0.6087553082505590832,
-0.2167926269368471279]
res = erfa.ab(pnat, v, s, bm1)
assert res.shape == (3,)
np.testing.assert_allclose(res, expected)
res2 = erfa.ab([pnat]*4, v, s, bm1)
assert res2.shape == (4, 3)
np.testing.assert_allclose(res2, [expected]*4)
# here we stride an array and also do it Fortran-order to make sure
# it all still works correctly with non-contig arrays
pnata = np.array(pnat)
arrin = np.array([pnata, pnata/2, pnata/3, pnata/4, pnata/5]*4, order='F')
res3 = erfa.ab(arrin[::5], v, s, bm1)
assert res3.shape == (4, 3)
np.testing.assert_allclose(res3, [expected]*4)
def test_structs():
"""
Checks producing and consuming of ERFA c structs
"""
am, eo = erfa.apci13(2456165.5, [0.401182685, 1])
assert am.shape == (2, )
assert am.dtype == erfa.dt_eraASTROM
assert eo.shape == (2, )
# a few spotchecks from test_erfa.c
np.testing.assert_allclose(am[0]['pmt'], 12.65133794027378508)
np.testing.assert_allclose(am[0]['v'], [0.4289638897157027528e-4,
0.8115034002544663526e-4,
0.3517555122593144633e-4])
ri, di = erfa.atciqz(2.71, 0.174, am[0])
np.testing.assert_allclose(ri, 2.709994899247599271)
np.testing.assert_allclose(di, 0.1728740720983623469)
| [
2,
49962,
739,
257,
513,
12,
565,
682,
347,
10305,
3918,
5964,
532,
766,
38559,
24290,
13,
81,
301,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
11485,
1330,
4755,
355,
1931,
13331,
628,
198,
4299,
1332,
62,
263,
13331,
62,
4... | 1.948682 | 2,124 |
import RPi.GPIO as GPIO
import time
import re
import socket
import sys
import traceback
import paho.mqtt.client as mqtt
from threading import Thread
| [
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
201,
198,
11748,
640,
201,
198,
11748,
302,
201,
198,
11748,
17802,
201,
198,
11748,
25064,
201,
198,
11748,
12854,
1891,
201,
198,
201,
198,
11748,
279,
17108,
13,
76,
80,
926,
13,
16366... | 2.890909 | 55 |
# coding: utf-8
#
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for one off statistics jobs."""
import os
from core.domain import event_services
from core.domain import exp_domain
from core.domain import exp_services
from core.domain import stats_domain
from core.domain import stats_jobs_one_off
from core.domain import stats_services
from core.platform import models
from core.platform.taskqueue import gae_taskqueue_services as taskqueue_services
from core.tests import test_utils
import feconf
import utils
(stats_models, exp_models) = models.Registry.import_models(
[models.NAMES.statistics, models.NAMES.exploration])
class GenerateV1StatisticsJobTest(test_utils.GenericTestBase):
"""Tests for the one-off migration job for stats events."""
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
198,
2,
15069,
1946,
383,
9385,
544,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743... | 3.601626 | 369 |
from tflyrics.text_provider import TextProvider
import pytest
class MockProvider(TextProvider):
"""A mock TextProvider."""
def __init__(self, mock_arg: object):
"""Create a MockProvider object."""
super(MockProvider, self).__init__()
self.mock_arg = mock_arg
def test_abstractness():
"""A TextProvider object cannot be instantiated."""
with pytest.raises(TypeError):
abstract_prov = TextProvider()
def test_concreteness():
"""A concrete sub-class of TextProvider can be instantiated."""
mock_arg = 'a'
concrete_prov = MockProvider(mock_arg)
| [
6738,
256,
12254,
10466,
13,
5239,
62,
15234,
1304,
1330,
8255,
29495,
198,
11748,
12972,
9288,
628,
198,
198,
4871,
44123,
29495,
7,
8206,
29495,
2599,
198,
220,
220,
220,
37227,
32,
15290,
8255,
29495,
526,
15931,
628,
220,
220,
220,
... | 2.799087 | 219 |
from setuptools import setup
setup(name='ledger',
version='1.6',
description='Ledger Payments App',
url='https://github.com/dbca-wa/ledger',
author='Department of Parks and Wildlife',
author_email='asi@dbca.wa.gov.au',
license='BSD',
packages=['ledger','ledger.accounts','ledger.accounts.management','ledger.accounts.management.commands','ledger.accounts.migrations','ledger.accounts.templates',
'ledger.address','ledger.address.fixtures','ledger.address.migrations',
'ledger.basket','ledger.basket.migrations',
'ledger.catalogue','ledger.catalogue.migrations',
'ledger.checkout',
'ledger.dashboard','ledger.dashboard.catalogue',
'ledger.emails',
'ledger.licence','ledger.licence.migrations',
'ledger.order','ledger.order.migrations',
'ledger.partner',
'ledger.payment','ledger.payment.migrations',
'ledger.payments','ledger.payments.bpay','ledger.payments.bpoint','ledger.payments.cash','ledger.payments.invoice','ledger.payments.management','ledger.payments.migrations','ledger.payments.static.payments','ledger.payments.templates.dpaw_payments','ledger.payments.templatetags',
'ledger.payments.bpay.dashboard','ledger.payments.bpay.management','ledger.payments.bpay.management.commands','ledger.payments.bpay.migrations',
'ledger.payments.bpoint.BPOINT','ledger.payments.bpoint.dashboard','ledger.payments.bpoint.management','ledger.payments.bpoint.management.commands','ledger.payments.bpoint.migrations',
'ledger.payments.cash.fixtures','ledger.payments.cash.migrations',
'ledger.payments.invoice.dashboard','ledger.payments.invoice.migrations',
'ledger.payments.static.payments.img','ledger.payments.static.payments.js',
'ledger.static.ledger','ledger.static.ledger.css','ledger.static.ledger.fonts','ledger.static.ledger.images',
'ledger.taxonomy',
'ledger.templates','ledger.templates.basket.partials','ledger.templates.checkout','ledger.templates.email','ledger.templates.partials',
],
install_requires=[],
include_package_data=True,
zip_safe=False)
| [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
3672,
11639,
992,
1362,
3256,
198,
220,
220,
220,
220,
220,
2196,
11639,
16,
13,
21,
3256,
198,
220,
220,
220,
220,
220,
6764,
11639,
42416,
1362,
41318,
2034,
3256,
198,
220,
... | 2.239234 | 1,045 |
import unittest
import six
import requests
from tests.bandwidth.helpers import get_account_client as get_client
from tests.bandwidth.helpers import create_response, AUTH, headers
if six.PY3:
from unittest.mock import patch
else:
from mock import patch
from bandwidth_old.voice import Client
| [
11748,
555,
715,
395,
198,
11748,
2237,
198,
11748,
7007,
198,
6738,
5254,
13,
3903,
10394,
13,
16794,
364,
1330,
651,
62,
23317,
62,
16366,
355,
651,
62,
16366,
198,
6738,
5254,
13,
3903,
10394,
13,
16794,
364,
1330,
2251,
62,
26209,... | 3.382022 | 89 |
import sys, argparse, string
import csv
import warnings
from sklearn.metrics import f1_score
# Read a Tab-separated ImageID - Caption pair file
# Print 1-level key-value dictionary, sorted (with numeric key)
# Main
if __name__ == '__main__':
main(sys.argv[1:])
| [
11748,
25064,
11,
1822,
29572,
11,
4731,
198,
11748,
269,
21370,
198,
11748,
14601,
198,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
277,
16,
62,
26675,
628,
198,
2,
4149,
257,
16904,
12,
25512,
515,
7412,
2389,
532,
11260,
5166,
2... | 3.011111 | 90 |
'''
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find the total sum of all root-to-leaf numbers.
For example,
1
/ \
2 3
The root-to-leaf path 1->2 represents the number 12.
The root-to-leaf path 1->3 represents the number 13.
Return the sum = 12 + 13 = 25.
DFS: note that dfs generally require a helper method for recording the cummulated result
'''
from tree_utils import genTree
# Definition for a binary tree node.
if __name__ == "__main__":
solution = Solution()
| [
7061,
6,
198,
15056,
257,
13934,
5509,
7268,
19561,
422,
657,
12,
24,
691,
11,
1123,
6808,
12,
1462,
12,
33201,
3108,
714,
2380,
257,
1271,
13,
198,
198,
2025,
1672,
318,
262,
6808,
12,
1462,
12,
33201,
3108,
352,
3784,
17,
3784,
... | 3.216495 | 194 |
""" Common utilities for logging, command line processing and more. """
from .logger import Logger
| [
37811,
8070,
20081,
329,
18931,
11,
3141,
1627,
7587,
290,
517,
13,
37227,
198,
198,
6738,
764,
6404,
1362,
1330,
5972,
1362,
198
] | 4.347826 | 23 |
"""Base Entity definition for SmartWeather Integration."""
from homeassistant.helpers.entity import Entity
import homeassistant.helpers.device_registry as dr
from typing import Dict, List
from homeassistant.const import (
ATTR_ATTRIBUTION,
ATTR_FRIENDLY_NAME,
)
from .const import (
DOMAIN,
ATTR_BRAND,
ATTR_SMARTWEATHER_STATION_ID,
ATTR_UPDATED,
CONF_STATION_ID,
DEFAULT_BRAND,
DEFAULT_ATTRIBUTION,
DEVICE_TYPE_WEATHER,
)
class SmartWeatherEntity(Entity):
"""Base class for SmartWeather Entities."""
def __init__(self, coordinator, entries, entity, server, fcst_coordinator):
"""Initialize the SmartWeather Entity."""
super().__init__()
self.coordinator = coordinator
self.fcst_coordinator = fcst_coordinator
self.entries = entries
self.server = server
self._entity = entity
self._platform_serial = self.server["serial_number"]
self._platform_id = self.server["station_type"]
self._device_key = f"{self.entries[CONF_STATION_ID]}"
if self._entity == DEVICE_TYPE_WEATHER:
self._unique_id = self._device_key
else:
self._unique_id = f"{self._device_key}_{self._entity}"
@property
def unique_id(self):
"""Return a unique ID."""
return self._unique_id
@property
def _current(self):
"""Return Current Data."""
return self.coordinator.data[0]
@property
def _forecast(self):
"""Return Forecast Data Array."""
if self.fcst_coordinator is None:
return None
else:
return self.fcst_coordinator.data[0]
@property
@property
def available(self):
"""Return if entity is available."""
return self.coordinator.last_update_success
@property
def device_state_attributes(self) -> Dict:
"""Return SmartWeather specific attributes."""
return {
ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION,
ATTR_SMARTWEATHER_STATION_ID: self._device_key,
}
async def async_added_to_hass(self):
"""When entity is added to hass."""
self.async_on_remove(
self.coordinator.async_add_listener(self.async_write_ha_state)
)
self.async_on_remove(
self.fcst_coordinator.async_add_listener(self.async_write_ha_state)
)
| [
37811,
14881,
20885,
6770,
329,
10880,
41865,
38410,
526,
15931,
198,
6738,
1363,
562,
10167,
13,
16794,
364,
13,
26858,
1330,
20885,
198,
11748,
1363,
562,
10167,
13,
16794,
364,
13,
25202,
62,
2301,
4592,
355,
1553,
198,
6738,
19720,
... | 2.330418 | 1,029 |
import time
import numpy as np
import tensorflow as tf
import collections
from deepchem.utils.save import log
from deepchem.metrics import to_one_hot
from deepchem.metrics import from_one_hot
from deepchem.models import KerasModel, layers
from deepchem.models.losses import L2Loss, SparseSoftmaxCrossEntropy
from deepchem.models.keras_model import _StandardLoss
from tensorflow.keras.layers import Input, Dense, Dropout, ReLU, Concatenate, Add, Multiply, Softmax
class ProgressiveMultitaskRegressor(KerasModel):
"""Implements a progressive multitask neural network for regression.
Progressive Networks: https://arxiv.org/pdf/1606.04671v3.pdf
Progressive networks allow for multitask learning where each task
gets a new column of weights. As a result, there is no exponential
forgetting where previous tasks are ignored.
"""
def __init__(self,
n_tasks,
n_features,
alpha_init_stddevs=0.02,
layer_sizes=[1000],
weight_init_stddevs=0.02,
bias_init_consts=1.0,
weight_decay_penalty=0.0,
weight_decay_penalty_type="l2",
dropouts=0.5,
activation_fns=tf.nn.relu,
n_outputs=1,
**kwargs):
"""Creates a progressive network.
Only listing parameters specific to progressive networks here.
Parameters
----------
n_tasks: int
Number of tasks
n_features: int
Number of input features
alpha_init_stddevs: list
List of standard-deviations for alpha in adapter layers.
layer_sizes: list
the size of each dense layer in the network. The length of this list determines the number of layers.
weight_init_stddevs: list or float
the standard deviation of the distribution to use for weight initialization of each layer. The length
of this list should equal len(layer_sizes)+1. The final element corresponds to the output layer.
Alternatively this may be a single value instead of a list, in which case the same value is used for every layer.
bias_init_consts: list or float
the value to initialize the biases in each layer to. The length of this list should equal len(layer_sizes)+1.
The final element corresponds to the output layer. Alternatively this may be a single value instead of a list,
in which case the same value is used for every layer.
weight_decay_penalty: float
the magnitude of the weight decay penalty to use
weight_decay_penalty_type: str
the type of penalty to use for weight decay, either 'l1' or 'l2'
dropouts: list or float
the dropout probablity to use for each layer. The length of this list should equal len(layer_sizes).
Alternatively this may be a single value instead of a list, in which case the same value is used for every layer.
activation_fns: list or object
the Tensorflow activation function to apply to each layer. The length of this list should equal
len(layer_sizes). Alternatively this may be a single value instead of a list, in which case the
same value is used for every layer.
"""
if weight_decay_penalty != 0.0:
raise ValueError('Weight decay is not currently supported')
self.n_tasks = n_tasks
self.n_features = n_features
self.layer_sizes = layer_sizes
self.alpha_init_stddevs = alpha_init_stddevs
self.weight_init_stddevs = weight_init_stddevs
self.bias_init_consts = bias_init_consts
self.dropouts = dropouts
self.activation_fns = activation_fns
self.n_outputs = n_outputs
n_layers = len(layer_sizes)
if not isinstance(weight_init_stddevs, collections.Sequence):
self.weight_init_stddevs = [weight_init_stddevs] * n_layers
if not isinstance(alpha_init_stddevs, collections.Sequence):
self.alpha_init_stddevs = [alpha_init_stddevs] * n_layers
if not isinstance(bias_init_consts, collections.Sequence):
self.bias_init_consts = [bias_init_consts] * n_layers
if not isinstance(dropouts, collections.Sequence):
self.dropouts = [dropouts] * n_layers
if not isinstance(activation_fns, collections.Sequence):
self.activation_fns = [activation_fns] * n_layers
# Add the input features.
mol_features = Input(shape=(n_features,))
all_layers = {}
outputs = []
self._task_layers = []
for task in range(self.n_tasks):
task_layers = []
for i in range(n_layers):
if i == 0:
prev_layer = mol_features
else:
prev_layer = all_layers[(i - 1, task)]
if task > 0:
lateral_contrib, trainables = self.add_adapter(all_layers, task, i)
task_layers.extend(trainables)
dense = Dense(
layer_sizes[i],
kernel_initializer=tf.keras.initializers.TruncatedNormal(
stddev=self.weight_init_stddevs[i]),
bias_initializer=tf.constant_initializer(
value=self.bias_init_consts[i]))
layer = dense(prev_layer)
task_layers.append(dense)
if i > 0 and task > 0:
layer = Add()([layer, lateral_contrib])
assert self.activation_fns[i] is tf.nn.relu, "Only ReLU is supported"
layer = ReLU()(layer)
if self.dropouts[i] > 0.0:
layer = Dropout(self.dropouts[i])(layer)
all_layers[(i, task)] = layer
prev_layer = all_layers[(n_layers - 1, task)]
dense = Dense(
n_outputs,
kernel_initializer=tf.keras.initializers.TruncatedNormal(
stddev=self.weight_init_stddevs[-1]),
bias_initializer=tf.constant_initializer(
value=self.bias_init_consts[-1]))
layer = dense(prev_layer)
task_layers.append(dense)
if task > 0:
lateral_contrib, trainables = self.add_adapter(all_layers, task,
n_layers)
task_layers.extend(trainables)
layer = Add()([layer, lateral_contrib])
output_layer = self.create_output(layer)
outputs.append(output_layer)
self._task_layers.append(task_layers)
outputs = layers.Stack(axis=1)(outputs)
model = tf.keras.Model(inputs=mol_features, outputs=outputs)
super(ProgressiveMultitaskRegressor,
self).__init__(model, self.create_loss(), **kwargs)
def add_adapter(self, all_layers, task, layer_num):
"""Add an adapter connection for given task/layer combo"""
i = layer_num
prev_layers = []
trainable_layers = []
# Handle output layer
if i < len(self.layer_sizes):
layer_sizes = self.layer_sizes
alpha_init_stddev = self.alpha_init_stddevs[i]
weight_init_stddev = self.weight_init_stddevs[i]
bias_init_const = self.bias_init_consts[i]
elif i == len(self.layer_sizes):
layer_sizes = self.layer_sizes + [self.n_outputs]
alpha_init_stddev = self.alpha_init_stddevs[-1]
weight_init_stddev = self.weight_init_stddevs[-1]
bias_init_const = self.bias_init_consts[-1]
else:
raise ValueError("layer_num too large for add_adapter.")
# Iterate over all previous tasks.
for prev_task in range(task):
prev_layers.append(all_layers[(i - 1, prev_task)])
# prev_layers is a list with elements of size
# (batch_size, layer_sizes[i-1])
if len(prev_layers) == 1:
prev_layer = prev_layers[0]
else:
prev_layer = Concatenate(axis=1)(prev_layers)
alpha = layers.Variable(
tf.random.truncated_normal((1,), stddev=alpha_init_stddev))
trainable_layers.append(alpha)
prev_layer = Multiply()([prev_layer, alpha([prev_layer])])
dense1 = Dense(
layer_sizes[i - 1],
kernel_initializer=tf.keras.initializers.TruncatedNormal(
stddev=weight_init_stddev),
bias_initializer=tf.constant_initializer(value=bias_init_const))
prev_layer = dense1(prev_layer)
trainable_layers.append(dense1)
dense2 = Dense(
layer_sizes[i],
kernel_initializer=tf.keras.initializers.TruncatedNormal(
stddev=weight_init_stddev),
use_bias=False)
prev_layer = dense2(prev_layer)
trainable_layers.append(dense2)
return prev_layer, trainable_layers
def fit_task(self,
dataset,
task,
nb_epoch=10,
max_checkpoints_to_keep=5,
checkpoint_interval=1000,
deterministic=False,
restore=False,
**kwargs):
"""Fit one task."""
shape = dataset.get_shape()
batch = [[np.zeros((self.batch_size,) + s[1:])] for s in shape]
self._create_training_ops(batch)
generator = self.default_generator(
dataset, epochs=nb_epoch, deterministic=deterministic)
variables = []
for layer in self._task_layers[task]:
variables += layer.trainable_variables
loss = TaskLoss(self.model, self.create_loss(), task)
self.fit_generator(
generator,
max_checkpoints_to_keep,
checkpoint_interval,
restore,
variables=variables,
loss=loss)
class ProgressiveMultitaskClassifier(ProgressiveMultitaskRegressor):
"""Implements a progressive multitask neural network for classification.
Progressive Networks: https://arxiv.org/pdf/1606.04671v3.pdf
Progressive networks allow for multitask learning where each task
gets a new column of weights. As a result, there is no exponential
forgetting where previous tasks are ignored.
"""
| [
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
17268,
198,
198,
6738,
2769,
15245,
13,
26791,
13,
21928,
1330,
2604,
198,
6738,
2769,
15245,
13,
4164,
10466,
1330,
284,
62,
505,
62... | 2.411943 | 3,952 |
import os
import sys
from subprocess import call
from cv2 import VideoCapture, cvtColor, COLOR_BGR2RGB
from PyQt5 import QtCore, QtWidgets
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtGui import QImage, QPixmap, QIcon
from PyQt5.QtWidgets import QMainWindow, QFileDialog, QSystemTrayIcon, \
QAction, QMenu, QMessageBox
import mainWindow
if __name__ == "__main__":
app = QApplication(sys.argv)
win = userUI()
win.show()
sys.exit(app.exec_())
| [
11748,
28686,
201,
198,
11748,
25064,
201,
198,
6738,
850,
14681,
1330,
869,
201,
198,
6738,
269,
85,
17,
1330,
7623,
49630,
11,
269,
36540,
10258,
11,
20444,
1581,
62,
33,
10761,
17,
36982,
201,
198,
6738,
9485,
48,
83,
20,
1330,
3... | 2.387387 | 222 |
from django.contrib import admin
from django.utils.translation import gettext_lazy as _
from parler.admin import TranslatableAdmin
from bluebottle.impact.models import ImpactType, ImpactGoal
admin.site.register(ImpactType, ImpactTypeAdmin)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
651,
5239,
62,
75,
12582,
355,
4808,
198,
198,
6738,
1582,
1754,
13,
28482,
1330,
3602,
49009,
46787,
198,
198,
6738,
4171,
10985,
293,... | 3.565217 | 69 |
from __future__ import print_function
import numpy as np
from sklearn.preprocessing import normalize
import preprocessing
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
13,
3866,
36948,
1330,
3487,
1096,
198,
198,
11748,
662,
36948,
628
] | 4.133333 | 30 |
import os
import sys
import subprocess
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))
| [
11748,
28686,
198,
11748,
25064,
198,
11748,
850,
14681,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
25064,
13,
37023,
7,
12417,
7,
17597,
13,
853,
85,
58,
16,
47715,
4008,
198
] | 2.487805 | 41 |
# Generated by Django 3.1.3 on 2021-01-08 09:54
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
18,
319,
33448,
12,
486,
12,
2919,
7769,
25,
4051,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
# Generated by Django 2.1.15 on 2020-04-22 07:01
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
1314,
319,
12131,
12,
3023,
12,
1828,
8753,
25,
486,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.875 | 32 |
from ex13_1 import *
from ex13_2 import *
from collections import Counter
# I have downloaded _Pride and Prejudice_ from Gutenberg website and modified header with '#'
def count_number_frequency(l):
'''Print the 20 most frequently used words in the book'''
c = Counter(l)
print(c.most_common(20))
if __name__ == '__main__':
#print(list(read_file('PrideandPrejudice.txt'))) #check
l = list(read_file('PrideandPrejudice.txt'))
count_number_frequency(l)
print("Total number of unique different words is: ", len(set(l))) #8141
print("Total number of words is:", len(l)) #124493 | [
6738,
409,
1485,
62,
16,
1330,
1635,
198,
6738,
409,
1485,
62,
17,
1330,
1635,
198,
198,
6738,
17268,
1330,
15034,
198,
2,
314,
423,
15680,
4808,
6836,
485,
290,
3771,
10456,
501,
62,
422,
20336,
3052,
290,
9518,
13639,
351,
705,
2,... | 2.954545 | 198 |
import argparse
# Data Loading
import pickle
from tensorflow.keras.backend import squeeze
from global_utils import *
import models
random.seed(42)
if __name__ == "__main__":
print("TensorFlow version: {}".format(tf.__version__))
print("Eager execution: {}".format(tf.executing_eagerly()))
parser = argparse.ArgumentParser()
parser.add_argument(
'--indir',
help='Aboslute path to data directory containing .wav files',
required=True
)
parser.add_argument(
'--serialize',
help='Loading from serialize object',
required=False,
default=False
)
parser.add_argument(
'--checkpoint_path',
help='Checkpoint path of a previous weight model',
required=False,
default=None
)
parser.add_argument(
'--model',
help='Model path of a previous trained model',
required=False,
default=None
)
parser.add_argument(
'--model-type',
help='Model to use possible value : {cnn, lstm, attention_lstm}',
required=False,
default=None
)
args = parser.parse_args()
if args.serialize:
trainset = pickle.load(open(os.path.join(args.indir, 'trainset.p'), 'rb'))
valset = pickle.load(open(os.path.join(args.indir, 'valset.p'), 'rb'))
testset = pickle.load(open(os.path.join(args.indir, 'testset.p'), 'rb'))
else:
print("Loading wave file")
trainset, valset, testset = load_data(args.indir)
pickle.dump(trainset, open("data/trainset.p", "wb"))
pickle.dump(valset, open("data/valset.p", "wb"))
pickle.dump(testset, open("data/testset.p", "wb"))
feature_shape = np.expand_dims( trainset[0][2], -1).shape
print(
"The dataset is divide with: \n - {} training samples \n - {} validation samples \n - {} testing samples \n \
Sample shape {} with {} labels".format(
len(trainset), len(valset),
len(testset), feature_shape, len(LABELS)))
print("Creating Tensorflow dataset")
dataset_train = tf.data.Dataset.from_tensor_slices(format_dataset(trainset)).shuffle(buffer_size=100).batch(
BATCH_SIZE)
dataset_validation = tf.data.Dataset.from_tensor_slices(format_dataset(valset)).shuffle(buffer_size=100).batch(
BATCH_SIZE)
callbacks = [
tf.keras.callbacks.EarlyStopping(
# Stop training when `val_loss` is no longer improving
monitor='val_loss',
# "no longer improving" being defined as "no better than 1e-2 less"
min_delta=1e-4,
# "no longer improving" being further defined as "for at least 2 epochs"
patience=15,
verbose=1), tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1),
tf.keras.callbacks.ModelCheckpoint(filepath=checkpoint_path, save_weights_only=True)
]
if args.model:
model = tf.keras.models.load_model(args.model, custom_objects={
'squeeze': squeeze}
)
else:
if args.model_type :
model = models.get_model(args.model_type, output_dim=len(LABELS), features_dim=feature_shape )
else :
model = models.conv_net_lstm_attention(output_dim=len(LABELS), features_dim=feature_shape)
model.summary()
if args.checkpoint_path:
model.load_weights(args.checkpoint_path)
lr_schedule = tf.keras.optimizers.schedules.ExponentialDecay(
LR_INIT,
decay_steps=100000,
decay_rate=0.96,
staircase=True)
optimizer_adam = tf.keras.optimizers.Adagrad(learning_rate=LR_INIT)
# Define our metrics
train_loss = tf.keras.metrics.Mean('train_loss', dtype=tf.float32)
train_accuracy = tf.keras.metrics.SparseCategoricalAccuracy('train_accuracy')
validation_loss = tf.keras.metrics.Mean('validation_loss', dtype=tf.float32)
validation_accuracy = tf.keras.metrics.SparseCategoricalAccuracy('validation_accuracy')
model.compile(optimizer=optimizer_adam,
loss='sparse_categorical_crossentropy',
metrics=['sparse_categorical_accuracy'])
model.fit(dataset_train,
epochs=EPOCHS,
validation_data=dataset_validation,
callbacks=callbacks)
print("Finished training the model... \n")
print("Saving the model....")
model.save('logs/final_model.h5')
print("Running test metrics")
dataset_test = tf.data.Dataset.from_tensor_slices(format_dataset(testset)).batch(1)
test_loss, test_acc = model.evaluate(dataset_test)
print('Test Loss: {}'.format(test_loss))
print('Test Accuracy: {}'.format(test_acc))
| [
11748,
1822,
29572,
198,
198,
2,
6060,
12320,
198,
11748,
2298,
293,
198,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
1891,
437,
1330,
21229,
198,
6738,
3298,
62,
26791,
1330,
1635,
198,
11748,
4981,
198,
198,
25120,
13,
28826,
7... | 2.270903 | 2,093 |
# зодиак + Выигрышные номера тиража + предыдущий тираж к примеру 2000
| [
2,
12466,
115,
25443,
112,
18849,
16142,
31583,
1343,
12466,
240,
45035,
18849,
140,
111,
21169,
45035,
141,
230,
22177,
45035,
16843,
12466,
121,
25443,
120,
16843,
21169,
16142,
220,
20375,
18849,
21169,
16142,
140,
114,
16142,
1343,
1246... | 1.014286 | 70 |
#!/usr/bin/env python3
# coding: utf-8
'''
Programme : heure.py version 1.0
Date : 19-12-2017
Auteur : Jullien Arnaud
Matériel utilisé : Fonctionnement programme :
'''
from raspiomix import Raspiomix
from datetime import datetime
from threading import Thread
import time
from CAcqPuissance import CAcqPuissance
if __name__ == "__main__":
eole = CGestionEolienne()
eole.start()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
7061,
6,
198,
15167,
1326,
1058,
339,
495,
13,
9078,
220,
220,
220,
220,
220,
220,
2196,
352,
13,
15,
198,
10430,
1058,
678,
12,
1065,
12... | 2.26455 | 189 |
import torch
from torch.utils.data import Dataset
import json
import numpy as np
import os
from PIL import Image
from torchvision import transforms as T
from .ray_utils import *
import torchvision.transforms as T
from torch.utils import data
import torch
from tqdm import tqdm
import numpy as np
import random
import PIL
from PIL import Image
import collections
import math
import copy
from .ibr_dynamic import IBRDynamicDataset
| [
11748,
28034,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
316,
198,
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
6738,
350,
4146,
1330,
7412,
198,
6738,
28034,
10178,
1330,
31408,
355,
309,
198,
... | 3.375 | 136 |
# This is the bokeh_magic loader and installer, if you want to see the
# bokeh_magic source code check the following url:
# https://github.com/bokeh/bokeh/blob/master/extensions/bokeh_magic.py
from __future__ import print_function
from IPython import get_ipython
def install_bokeh_magic():
"An alternative way to install the bokeh_magic extension."
url = "https://raw.github.com/bokeh/bokeh/master/extensions/bokeh_magic.py"
ip.extension_manager.install_extension(url)
print("Bokeh_magic has been installed.")
# An alternative way to load the bokeh_magic extension.
ip = get_ipython()
try:
ip.extension_manager.load_extension("bokeh_magic")
except ImportError:
print("You need to install the extension first. \n"
"Don't worry, we will do it for you.")
install_bokeh_magic()
ip.extension_manager.load_extension("bokeh_magic") | [
2,
770,
318,
262,
1489,
365,
71,
62,
32707,
40213,
290,
29124,
11,
611,
345,
765,
284,
766,
262,
220,
198,
2,
1489,
365,
71,
62,
32707,
2723,
2438,
2198,
262,
1708,
19016,
25,
198,
2,
3740,
1378,
12567,
13,
785,
14,
65,
2088,
71... | 2.812903 | 310 |
from ast import literal_eval
from typing import Dict, List
import click
from pygitguardian.models import Detail
from ggshield.text_utils import STYLE, display_error, format_text, pluralize
| [
6738,
6468,
1330,
18875,
62,
18206,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
198,
198,
11748,
3904,
198,
6738,
12972,
18300,
14864,
666,
13,
27530,
1330,
42585,
198,
198,
6738,
308,
70,
26662,
13,
5239,
62,
26791,
1330,
3563,
56,
2... | 3.555556 | 54 |
from app import db
| [
6738,
598,
1330,
20613,
198
] | 3.8 | 5 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |