content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'duplicate_names',
'type': 'shared_library',
'dependencies': [
'one/sub.gyp:one',
'two/sub.gyp:two',
],
},
],
}
| {'targets': [{'target_name': 'duplicate_names', 'type': 'shared_library', 'dependencies': ['one/sub.gyp:one', 'two/sub.gyp:two']}]} |
class FinnHubAPI:
TOKEN="yourTokenHere"
# Get a FinHubb API from
# https://finnhub.io/ | class Finnhubapi:
token = 'yourTokenHere' |
B = BLOCK_SIZE = 30
SURFACE_WIDTH = 300
SURFACE_HEIGHT = 600
S = [['.....',
'.....',
'..00.',
'.00..',
'.....'],
['.....',
'..0..',
'..00.',
'...0.',
'.....' ]]
Z = [['.....',
'.....',
'.00..',
'..00.',
'.....'],
['.....',
'..,0.',
'..00.',
'..0..',
'.....' ]]
I = [['.....',
'..0..',
'..0..',
'..0..',
'.....'],
['.....',
'.....',
'.000.',
'.....',
'.....' ]]
O = [['.....',
'.....',
'.00..',
'.00..',
'.....']]
J = [['.....',
'.....',
'.0...',
'.000.',
'.....'],
['.....',
'..00.',
'..0..',
'..0..',
'.....' ],
['.....',
'.000.',
'...0.',
'.....',
'.....' ],
['.....',
'..0..',
'..0..',
'.00..',
'.....' ],]
L = [['.....',
'...0.',
'.000.',
'.....',
'.....'],
['.....',
'..0..',
'..0..',
'..00.',
'.....'],
['.....',
'.....',
'.000.',
'.0...',
'.....'],
['.....',
'.00..',
'..0..',
'..0..',
'.....']]
T = [['.....',
'..0..',
'.000.',
'.....',
'.....'],
['.....',
'..0..',
'..00.',
'..0..',
'.....'],
['.....',
'.....',
'.000.',
'..0..',
'.....'],
['.....',
'..0..',
'.00..',
'..0..',
'.....']]
SHAPES = [S, Z, I, O, L, T]
# red green blue pink gray orange
SHAPES_FILL = ['#f44336', '#4CAF50', '#2196F3', '#F50057', '#607D8B', '#FF9800']
| b = block_size = 30
surface_width = 300
surface_height = 600
s = [['.....', '.....', '..00.', '.00..', '.....'], ['.....', '..0..', '..00.', '...0.', '.....']]
z = [['.....', '.....', '.00..', '..00.', '.....'], ['.....', '..,0.', '..00.', '..0..', '.....']]
i = [['.....', '..0..', '..0..', '..0..', '.....'], ['.....', '.....', '.000.', '.....', '.....']]
o = [['.....', '.....', '.00..', '.00..', '.....']]
j = [['.....', '.....', '.0...', '.000.', '.....'], ['.....', '..00.', '..0..', '..0..', '.....'], ['.....', '.000.', '...0.', '.....', '.....'], ['.....', '..0..', '..0..', '.00..', '.....']]
l = [['.....', '...0.', '.000.', '.....', '.....'], ['.....', '..0..', '..0..', '..00.', '.....'], ['.....', '.....', '.000.', '.0...', '.....'], ['.....', '.00..', '..0..', '..0..', '.....']]
t = [['.....', '..0..', '.000.', '.....', '.....'], ['.....', '..0..', '..00.', '..0..', '.....'], ['.....', '.....', '.000.', '..0..', '.....'], ['.....', '..0..', '.00..', '..0..', '.....']]
shapes = [S, Z, I, O, L, T]
shapes_fill = ['#f44336', '#4CAF50', '#2196F3', '#F50057', '#607D8B', '#FF9800'] |
lista = ('Lapis', 1.5, 'caneta', 2.5, 'caderno', 16.90, 'mochila', 67.99, 'livro', 37.89)
print('-'*40)
print(f'{"LISTA ESCOLAR":^40}')
print('-'*40)
for c in range(0, len(lista)):
if c % 2 == 0:
print(f'{lista[c]:.<30}', end=' ')
else:
print(f'R$ {lista[c]:.2f}')
print('-'*40)
| lista = ('Lapis', 1.5, 'caneta', 2.5, 'caderno', 16.9, 'mochila', 67.99, 'livro', 37.89)
print('-' * 40)
print(f"{'LISTA ESCOLAR':^40}")
print('-' * 40)
for c in range(0, len(lista)):
if c % 2 == 0:
print(f'{lista[c]:.<30}', end=' ')
else:
print(f'R$ {lista[c]:.2f}')
print('-' * 40) |
class WindowDatas():
def __init__(self):
self.previousWindow = None
self.nextWindow = None
self.finalWindow = None
self.accountDATA = None
self.actions= None
self.show= True
self.database = None | class Windowdatas:
def __init__(self):
self.previousWindow = None
self.nextWindow = None
self.finalWindow = None
self.accountDATA = None
self.actions = None
self.show = True
self.database = None |
# Flask Config Variables to be Auto-Loaded
config = {
'flask': {
'SECRET_KEY': b'!T3DxK;L1jJGYf$', # Please change. See Flask for requirements.
'TESTING': True,
'TEMPLATES_AUTO_RELOAD': True,
'SERVER_NAME': 'flask.mvc'
},
'templating': {
'template_folder': 'application/views',
'static_folder': 'public/assets'
}
}
| config = {'flask': {'SECRET_KEY': b'!T3DxK;L1jJGYf$', 'TESTING': True, 'TEMPLATES_AUTO_RELOAD': True, 'SERVER_NAME': 'flask.mvc'}, 'templating': {'template_folder': 'application/views', 'static_folder': 'public/assets'}} |
class FVTADD :
def __init__(self):
self.default = ''
def runTest(self,self) :
return TemplateTest.runTest(self)
def tearDown(self,self) :
return TemplateTest.tearDown(self)
def setUp(self,self) :
return TemplateTest.setUp(self)
def chkSetUpCondition(self,self,fv,sv_ret,ctl_ret,sw_ret) :
return TemplateTest.chkSetUpCondition(self,fv,sv_ret,ctl_ret,sw_ret)
| class Fvtadd:
def __init__(self):
self.default = ''
def run_test(self, self):
return TemplateTest.runTest(self)
def tear_down(self, self):
return TemplateTest.tearDown(self)
def set_up(self, self):
return TemplateTest.setUp(self)
def chk_set_up_condition(self, self, fv, sv_ret, ctl_ret, sw_ret):
return TemplateTest.chkSetUpCondition(self, fv, sv_ret, ctl_ret, sw_ret) |
#Your task is to complete this function
# function should strictly return a string else answer wont be printed
def multiplyStrings(str1, str2):
return str(int(str1) * int(str2))
| def multiply_strings(str1, str2):
return str(int(str1) * int(str2)) |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# Prefixes
CONSOLE_LOG_PREFIX = "LanguageWorkerConsoleLog"
# Capabilities
RAW_HTTP_BODY_BYTES = "RawHttpBodyBytes"
TYPED_DATA_COLLECTION = "TypedDataCollection"
RPC_HTTP_BODY_ONLY = "RpcHttpBodyOnly"
RPC_HTTP_TRIGGER_METADATA_REMOVED = "RpcHttpTriggerMetadataRemoved"
# Debug Flags
PYAZURE_WEBHOST_DEBUG = "PYAZURE_WEBHOST_DEBUG"
# Feature Flags (app settings)
PYTHON_ROLLBACK_CWD_PATH = "PYTHON_ROLLBACK_CWD_PATH"
# External Site URLs
MODULE_NOT_FOUND_TS_URL = "https://aka.ms/functions-modulenotfound"
| console_log_prefix = 'LanguageWorkerConsoleLog'
raw_http_body_bytes = 'RawHttpBodyBytes'
typed_data_collection = 'TypedDataCollection'
rpc_http_body_only = 'RpcHttpBodyOnly'
rpc_http_trigger_metadata_removed = 'RpcHttpTriggerMetadataRemoved'
pyazure_webhost_debug = 'PYAZURE_WEBHOST_DEBUG'
python_rollback_cwd_path = 'PYTHON_ROLLBACK_CWD_PATH'
module_not_found_ts_url = 'https://aka.ms/functions-modulenotfound' |
n = int(input())
res = 0
for i in range(n):
res += int((input().strip())[:25])
print(str(res)[:10])
| n = int(input())
res = 0
for i in range(n):
res += int(input().strip()[:25])
print(str(res)[:10]) |
class Solution:
def numDecodings(self, s: str) -> int:
if not s or s[0] == '0': return 0
dp = [1, 1]
for i in range(2, len(s) + 1):
if '10' < s[i - 2: i] <= '26' and s[i - 1] != '0':
dp.append(dp[i - 1] + dp[i - 2])
elif s[i - 2: i] == '10' or s[i - 2: i] == '20':
dp.append(dp[i - 2])
elif s[i - 1] != '0':
dp.append(dp[i - 1])
else:
return 0
return dp[len(s)]
| class Solution:
def num_decodings(self, s: str) -> int:
if not s or s[0] == '0':
return 0
dp = [1, 1]
for i in range(2, len(s) + 1):
if '10' < s[i - 2:i] <= '26' and s[i - 1] != '0':
dp.append(dp[i - 1] + dp[i - 2])
elif s[i - 2:i] == '10' or s[i - 2:i] == '20':
dp.append(dp[i - 2])
elif s[i - 1] != '0':
dp.append(dp[i - 1])
else:
return 0
return dp[len(s)] |
print("Welcome to the birthday dictionary. We know the birthdays of:")
birthdays = {"Albert Einstein": "03/14/1879", "Benjamin Franklin": "01/17/1706", "Ada Lovelace": "12/10/1815"}
for person in birthdays:
print(person)
name = input("Who's birthday do you want to look up? ")
if(name in birthdays):
print(name + "'s birthday is " + birthdays[name] + ".")
else:
print("Sorry, couldn't find that name") | print('Welcome to the birthday dictionary. We know the birthdays of:')
birthdays = {'Albert Einstein': '03/14/1879', 'Benjamin Franklin': '01/17/1706', 'Ada Lovelace': '12/10/1815'}
for person in birthdays:
print(person)
name = input("Who's birthday do you want to look up? ")
if name in birthdays:
print(name + "'s birthday is " + birthdays[name] + '.')
else:
print("Sorry, couldn't find that name") |
JAVA_LANGUAGE_LEVEL = "1.8"
KOTLIN_LANGUAGE_LEVEL = "1.3"
KOTLINC_VERSION = "1.3.41"
KOTLINC_ROOT = "https://github.com/JetBrains/kotlin/releases/download"
KOTLINC_SHA = "c44ab6866895606e408b60934ebe45d4befcbc33ea0e4ea73c4b3b89ad770132"
KOTLIN_RULES_VERSION = "legacy-modded-0_26_1-02"
KOTLIN_RULES_SHA = "245d0bc1511048aaf82afd0fa8a83e8c3b5afdff0ae4fbcae25e03bb2c6f1a1a"
MAVEN_REPOSITORY_RULES_VERSION = "master"
MAVEN_REPOSITORY_RULES_CHECKSUM = None
KOTLINC_RELEASE = {
"urls": [
"{root}/v{v}/kotlin-compiler-{v}.zip".format(root = KOTLINC_ROOT, v = KOTLINC_VERSION),
],
"sha256": KOTLINC_SHA,
}
| java_language_level = '1.8'
kotlin_language_level = '1.3'
kotlinc_version = '1.3.41'
kotlinc_root = 'https://github.com/JetBrains/kotlin/releases/download'
kotlinc_sha = 'c44ab6866895606e408b60934ebe45d4befcbc33ea0e4ea73c4b3b89ad770132'
kotlin_rules_version = 'legacy-modded-0_26_1-02'
kotlin_rules_sha = '245d0bc1511048aaf82afd0fa8a83e8c3b5afdff0ae4fbcae25e03bb2c6f1a1a'
maven_repository_rules_version = 'master'
maven_repository_rules_checksum = None
kotlinc_release = {'urls': ['{root}/v{v}/kotlin-compiler-{v}.zip'.format(root=KOTLINC_ROOT, v=KOTLINC_VERSION)], 'sha256': KOTLINC_SHA} |
"Listing of all e2e tests, used to set up their repositories in /WORKSPACE"
ALL_E2E = [
"bazel_managed_deps",
"fine_grained_symlinks",
"jasmine",
"karma",
"karma_stack_trace",
"karma_typescript",
"less",
"node_loader_no_preserve_symlinks",
"node_loader_preserve_symlinks",
"packages",
"stylus",
"symlinked_node_modules_npm",
"symlinked_node_modules_yarn",
"terser",
"ts_auto_deps",
"ts_devserver",
"typescript",
"webpack",
]
| """Listing of all e2e tests, used to set up their repositories in /WORKSPACE"""
all_e2_e = ['bazel_managed_deps', 'fine_grained_symlinks', 'jasmine', 'karma', 'karma_stack_trace', 'karma_typescript', 'less', 'node_loader_no_preserve_symlinks', 'node_loader_preserve_symlinks', 'packages', 'stylus', 'symlinked_node_modules_npm', 'symlinked_node_modules_yarn', 'terser', 'ts_auto_deps', 'ts_devserver', 'typescript', 'webpack'] |
base_api = "https://myanimelist.net/"
#Anime
anime = base_api + "api/animelist/"
search_anime = base_api + "api/anime/search.xml"
add_anime = anime + "add/{}.xml"
update_anime = anime + "update/{}.xml"
delete_anime = anime + "delete/{}.xml"
#Manga
manga = base_api + "api/mangalist/"
search_manga = base_api + "api/manga/search.xml"
add_manga = manga + "add/{}.xml"
update_manga = manga + "update/{}.xml"
delete_manga = manga + "delete/{}.xml"
#User Account
verify_user = base_api + "api/account/verify_credentials.xml"
user_list = base_api + "malappinfo.php" | base_api = 'https://myanimelist.net/'
anime = base_api + 'api/animelist/'
search_anime = base_api + 'api/anime/search.xml'
add_anime = anime + 'add/{}.xml'
update_anime = anime + 'update/{}.xml'
delete_anime = anime + 'delete/{}.xml'
manga = base_api + 'api/mangalist/'
search_manga = base_api + 'api/manga/search.xml'
add_manga = manga + 'add/{}.xml'
update_manga = manga + 'update/{}.xml'
delete_manga = manga + 'delete/{}.xml'
verify_user = base_api + 'api/account/verify_credentials.xml'
user_list = base_api + 'malappinfo.php' |
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Untitled16.ipynb",
"provenance": [],
"collapsed_sections": [],
"authorship_tag": "ABX9TyOm2YDBa+1KtqbwxKRFb+3Y",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/singhsani/opencv/blob/master/birthdaya.py\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"metadata": {
"id": "9vJ4YHkwbo3n",
"outputId": "328a9b9e-941c-49f6-b207-e00fdc845145",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 238
}
},
"source": [
"bday={}\n",
"while True:\n",
" print('Enter the name (blank to quit)')\n",
" name=input()\n",
" if name=='':\n",
" break\n",
" if name in bday:\n",
" print(bday[name])\n",
" print(' ---------------Happy birthday----------------- ')\n",
" print(' ',name,' ')\n",
" else:\n",
" print('enter the birthdate')\n",
" date=input()\n",
" bday[name]=date;\n",
" print('Birthdate is update')\n",
"print('Congrate , You are out of Program !!!!!!!!!!!!')\n"
],
"execution_count": 5,
"outputs": [
{
"output_type": "stream",
"text": [
"Enter the name (blank to quit)\n",
"rajni\n",
"enter the name with birthdate\n",
"10-may-2000\n",
"Birthdate is update\n",
"Enter the name (blank to quit)\n",
"rajni\n",
"10-may-2000\n",
" ---------------Happy birthday----------------- \n",
" rajni \n",
"Enter the name (blank to quit)\n",
"\n",
"Congrate , You are out of Program !!!!!!!!!!!!\n"
],
"name": "stdout"
}
]
}
]
} | {'nbformat': 4, 'nbformat_minor': 0, 'metadata': {'colab': {'name': 'Untitled16.ipynb', 'provenance': [], 'collapsed_sections': [], 'authorship_tag': 'ABX9TyOm2YDBa+1KtqbwxKRFb+3Y', 'include_colab_link': true}, 'kernelspec': {'name': 'python3', 'display_name': 'Python 3'}}, 'cells': [{'cell_type': 'markdown', 'metadata': {'id': 'view-in-github', 'colab_type': 'text'}, 'source': ['<a href="https://colab.research.google.com/github/singhsani/opencv/blob/master/birthdaya.py" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>']}, {'cell_type': 'code', 'metadata': {'id': '9vJ4YHkwbo3n', 'outputId': '328a9b9e-941c-49f6-b207-e00fdc845145', 'colab': {'base_uri': 'https://localhost:8080/', 'height': 238}}, 'source': ['bday={}\n', 'while True:\n', " print('Enter the name (blank to quit)')\n", ' name=input()\n', " if name=='':\n", ' break\n', ' if name in bday:\n', ' print(bday[name])\n', " print(' ---------------Happy birthday----------------- ')\n", " print(' ',name,' ')\n", ' else:\n', " print('enter the birthdate')\n", ' date=input()\n', ' bday[name]=date;\n', " print('Birthdate is update')\n", "print('Congrate , You are out of Program !!!!!!!!!!!!')\n"], 'execution_count': 5, 'outputs': [{'output_type': 'stream', 'text': ['Enter the name (blank to quit)\n', 'rajni\n', 'enter the name with birthdate\n', '10-may-2000\n', 'Birthdate is update\n', 'Enter the name (blank to quit)\n', 'rajni\n', '10-may-2000\n', ' ---------------Happy birthday----------------- \n', ' rajni \n', 'Enter the name (blank to quit)\n', '\n', 'Congrate , You are out of Program !!!!!!!!!!!!\n'], 'name': 'stdout'}]}]} |
#WAP to accept the following data in a dictionary:
#Item_Name, CP, SP
#Displaying
#Item_Name, Profit or Loss
#The program should continue as long as the user wishes to.
itemInt = int(input("Enter number of items to be stored: "))
x = "y"
shopping = dict()
while x == "y" or x == "Y":
Item_name = input("Enter the Item Name: ")
cp = int(input("Enter the Cost Price: "))
sp = int(input("Enter the Selling price: "))
shopping[Item_name] = [cp, sp, sp-cp]
print("\n\nITEM_NAME\tCOST_PRICE\tSELLING_PRICE\tPROFIT_or_LOSS")
for k in shopping:
print(k,'\t\t', shopping[k])
UserChoice = str(input("Would you like to continue?: Y or N"))
if UserChoice == "y" or UserChoice == "Y":
continue
else:
break
| item_int = int(input('Enter number of items to be stored: '))
x = 'y'
shopping = dict()
while x == 'y' or x == 'Y':
item_name = input('Enter the Item Name: ')
cp = int(input('Enter the Cost Price: '))
sp = int(input('Enter the Selling price: '))
shopping[Item_name] = [cp, sp, sp - cp]
print('\n\nITEM_NAME\tCOST_PRICE\tSELLING_PRICE\tPROFIT_or_LOSS')
for k in shopping:
print(k, '\t\t', shopping[k])
user_choice = str(input('Would you like to continue?: Y or N'))
if UserChoice == 'y' or UserChoice == 'Y':
continue
else:
break |
#carriers [ x ]
# substrates [ x ]
guanine_mods = {'G_to_m7G' : {'name' : '7-methylguanosine', 'input' : 'G', 'output' : 'm7G',
'machines' : {'RlmL_dim' : {'proteins' : {'b0948' : 'RlmKL'},
'RNA_position_substrates' :{'rRNA' : {2069 : {'LSU/23S/prokaryotic':1}}},
'carriers' : None
},
'enzyme_new_RmtB' : {'proteins' : {'bnum' : 'RmtB'}, #warning: important not found
'RNA_position_substrates' : {'rRNA' :{1405 : {'SSU/16S/prokaryotic' : 1}}},
'carriers' : None
},
'RsmG_mono' : {'proteins' : {'b3740' : 'RsmG'},
'RNA_position_substrates' :{'rRNA' : {527 : {'SSU/16S/prokaryotic' : 1}}},
'carriers' : None
},
'YggH_mono' : {'proteins' : {'b2960' : 'TrmB'},
'RNA_position_substrates' : {'tRNA' :{46 : {'b3853' : 1, #trna alaT (UGC)
'b3276' : 1,#trna alaU (UGC)
'b0203' : 1 , #trna alaV (UGC)
'b2397' : 1, #trna alaW (GGC)
'b2396' : 1, #trna alaX (GGC)
'b2692' : 1 , # trna ArgZ (ACG)
'b2691' : 1 ,#trna ArgQ (ACG)
'b2694' : 1 ,#trna ArgV (ACG)
'b2693' : 1 ,#trna ArgY (ACG)
'b3796' : 1 ,#trna ArgX (CCG)
'b1984' : 1 , #trna asnW (GUU)
'b1989' : 1 , #trna asnV (GUU)
'b1986' : 1 , #trna asnU (GUU)
'b1977' : 1 , #trna asnT (GUU)
'b0216': 1, #trna aspV (GUC)
'b0206': 1, #trna aspU (GUC)
'b3760': 1, #trna aspT (GUC)
'b4165' : 1 , #trna glyY (GCC)
'b4164' : 1 , #trna glyX (GCC)
'b1911' : 1 , #trna glyW (GCC)
'b4163' : 1 , #trna glyV (GCC)
'b3797' : 1, #trna HisR (GUG)
'b2652' : 1, #trna ileY (CAU)
'b3069' : 1, #trna ileX (CAU)
'b0202' : 1, #trna ileV (GAU)
'b3277' : 1, #trna ileU (GAU)
'b3852' : 1, #trna ileT (GAU)
'b0749' : 1, #trna lysQ (UUU) #mnm5s2U
'b0743' : 1, #trna lysT (UUU) #mnm5s2U
'b2404' : 1, #trna lysV (UUU) #mnm5s2U
'b0747' : 1, #trna lysY (UUU) #mnm5s2U
'b0745' : 1, #trna lysW (UUU) #mnm5s2U
'b0748' : 1, #trna lysZ (UUU) #mnm5s2U
'b0666' : 1, #trna metU (CAU)
'b0673' : 1, #trna metT (CAU)
'b2967' : 1, #trna pheV (GAA)
'b4134' : 1, #trna pheU (GAA)
'b3273' : 1, #trna thrV (GGU)
'b3979' : 1, #trna thrT (GGU)
'b3761' : 1, #trna trpT (CCA)
'b1665' : 1, #trna valV (GAC)
'b1666' : 1, #trna valW (GAC)
'b0744' : 1, #trna valT (UAC)
'b2401' : 1, #trna valU (UAC)
'b2402' : 1, #trna valX (UAC)
'b2403' : 1, #trna valY (UAC)
'b0746' : 1 #rna valZ (UAC)
}}
},
'carriers' : None
}
},
'metabolites' : {'amet_c' : -1,
'ahcys_c' : 1} #may be missing 'h_c' : 1
},
'G_to_m2G' : {'name' : 'N2-methylguanosine', 'input' : 'G', 'output' : 'm2G',
'machines' : {'RlmG_mono' : {'proteins' : {'b3084' : 'RmlG'},
'RNA_position_substrates' : {'rRNA' :{1835 : {'LSU/23S/prokaryotic' : 1}}},
'carriers' : None
},
'RlmL_dim' : {'proteins' : {'b0948' : 'RlmL'},
'RNA_position_substrates' :{'rRNA' : {2445 : {'LSU/23S/prokaryotic' : 1} }},
'carriers' : None
},
'RsmC_mono' : {'proteins' : {'b4371' : 'RsmC'},
'RNA_position_substrates' : {'rRNA' :{1207 : {'SSU/16S/prokaryotic' : 1}}},
'carriers' : None
},
'RsmD_mono' : {'proteins' : {'b3465' : 'RsmD'},
'RNA_position_substrates' : {'rRNA' :{966 : {'SSU/16S/prokaryotic' : 1}}},
'carriers' : None
},
'RsmJ_MONOMER' : {'proteins' : {'b3497' : 'RsmJ '},#important: not im model
'RNA_position_substrates' : {'rRNA' :{1516 : {'SSU/16S/prokaryotic' : 1}}},
'carriers' : None
}
},
'metabolites' : {'amet_c' : -1,
'ahcys_c' : 1,
'h_c' : 1}
},
'G_to_Gm' : {'name' : '2-O-methylguanosine', 'input' : 'G', 'output' : 'Gm',
'machines' : {'RlmB_dim' : {'proteins' : {'b4180' : 'RlmB'},
'RNA_position_substrates' : {'rRNA' :{2251 : {'LSU/23S/prokaryotic': 1}}},
'carriers' : None
},
'TrmH_dim' : {'proteins' : {'b3651' : 'TrmH'},
'RNA_position_substrates' : {'tRNA' :{18 : {'b0668' : 1 , #trna glnW (UUG)
'b0670' : 1 , #trna glnU (UUG)
'b0664' : 1 , #trna glnX (CUG)
'b0665' : 1 , #trna glnV (CUG)
'b2652' : 1, #trna ileY (CAU)
'b3069' : 1, #trna ileX (CAU)
'b1909' : 1 , #trna leuZ (UAA)
'b4369' : 1 , #trna leuP (CAG)
'b4370' : 1 , #trna leuQ (CAG)
'b3798' : 1 , #trna leuT (CAG)
'b4368' : 1 , #trna leu (CAG)
'b3174' : 1 , #trna leuU (GAG)
'b0666' : 1, #trna metU (CAU)
'b0673' : 1, #trna metT (CAU)
'b0971' : 1 , #trna serT (UGA)
'b1975' : 1 , #trna serU (CGA)
'b0883' : 1 , #trna serW (GGA)
'b1032' : 1 , #trna serX (GGA)
'b1230' : 1 , #trna tyrV (GUA)
'b3977' : 1 , #trna tyrU (GUA)
'b1231' : 1} #trna tyrT (GUA)
}},
'carriers' : None
}
},
'metabolites' : {'amet_c' : -1,
'ahcys_c' : 1,
'h_c' : 1}
},
'G_to_m1G' : {'name' : '1-methylguanosine', 'input' : 'G', 'output' : 'm1G',
'machines' : {'RrmA_dim_mod_2:zn2' : {'proteins' : {'b1822' : 'RlmA1'},
'RNA_position_substrates' :{'rRNA':{745 :{'LSU/23S/prokaryotic':1}}},
'carriers' : None
},
'TrmD_dim' : {'proteins' : {'b2607' : 'TrmD'},
'RNA_position_substrates' : {'tRNA' :{37 : { 'b4369' : 1 , #trna leuP (CAG)
'b4370' : 1 , #trna leuQ (CAG)
'b3798' : 1 , #trna leuT (CAG)
'b4368' : 1 , #trna leuV (CAG)
'b3174' : 1 , #trna leuU (GAG)
'b0672' : 1 , #trna leuW (UAG)
'b3799' : 1 , #trna proM (UGG)
'b2189' : 1 , #trna proL (GGG)
'b3545' : 1 , #trna proK (CGG)
'b3796' : 1 }
}},#trna ArgX (CCG)
'carriers' : None
}
},
'metabolites' : {'amet_c' : -1,
'ahcys_c' : 1,
'h_c' : 1}
},
'G_to_preq1tRNA' : {'name' : '7-aminomethyl-7-deazaguanosine',
'input' : 'G',
'output' : 'preq1tRNA',
'machines' : {'Tgt_hexa_mod_6:zn2' : {'proteins' : {'b0406' : 'Tgt'},
'RNA_position_substrates' : {'tRNA' :{34 : {'all' : 1}}},
'carriers' : None
}
},
'metabolites' : {'preq1_c' : -1,
'gua_c' : 1}
},
###################################end##############################################
####################################################################################
'preq1tRNA_to_oQtRNA' : {'name' : 'epoxyqueuosine',
'input' : 'preq1tRNA',
'output' : 'oQtRNA',
'machines' : {'QueA_mono' : {'proteins' : {'b0405' : 'QueA'},
'RNA_position_substrates' : {'tRNA' :{34 : {'all' : 1}}},
'carriers' : None
}
},
'metabolites' : {'amet_c' : -1,
'ade_c' : 1,
'met__L_c' : 1,
'h_c' : 1}
},
###################################end##############################################
####################################################################################
'oQtRNA_to_QtRNA' : {'name' : 'queuosine',
'input' : 'oQtRNA',
'output' : 'QtRNA',
'machines' : {'QueG_mono_mod_adocbl' : {'proteins' : {'b4166' : 'QueG'},
'RNA_position_substrates' : {'tRNA' :{34 : {'all' : 1}}},
'carriers' : None
}
},
'metabolites' : {'h2o_c' : 1}
#oxidized e acceptor : 1
#reduced e acceptor : -1}
},
###################################end##############################################
####################################################################################
'QtRNA_to_gluQtRNA' : {'name' : 'glutamyl-queuosine',
'input' : 'QtRNA',
'output' : 'gluQtRNA',
'machines' : {'YadB_mono' : {'proteins' : {'b0144' : 'GluQRS'},
#important: not in model
'RNA_position_substrates' : {'tRNA' :{34 : { 'b0216': 1, #trna aspV (GUC)
'b0206': 1, #trna aspU (GUC)
'b3760': 1}}}, #trna aspT (GUC)
'carriers' : None
}
},
'metabolites' : {'atp_c' : 1,
'glu__L_c' : -1,
'amp_c' : 1,
'ppi_c' : 1,
'h_c' : 2}
}
}
| guanine_mods = {'G_to_m7G': {'name': '7-methylguanosine', 'input': 'G', 'output': 'm7G', 'machines': {'RlmL_dim': {'proteins': {'b0948': 'RlmKL'}, 'RNA_position_substrates': {'rRNA': {2069: {'LSU/23S/prokaryotic': 1}}}, 'carriers': None}, 'enzyme_new_RmtB': {'proteins': {'bnum': 'RmtB'}, 'RNA_position_substrates': {'rRNA': {1405: {'SSU/16S/prokaryotic': 1}}}, 'carriers': None}, 'RsmG_mono': {'proteins': {'b3740': 'RsmG'}, 'RNA_position_substrates': {'rRNA': {527: {'SSU/16S/prokaryotic': 1}}}, 'carriers': None}, 'YggH_mono': {'proteins': {'b2960': 'TrmB'}, 'RNA_position_substrates': {'tRNA': {46: {'b3853': 1, 'b3276': 1, 'b0203': 1, 'b2397': 1, 'b2396': 1, 'b2692': 1, 'b2691': 1, 'b2694': 1, 'b2693': 1, 'b3796': 1, 'b1984': 1, 'b1989': 1, 'b1986': 1, 'b1977': 1, 'b0216': 1, 'b0206': 1, 'b3760': 1, 'b4165': 1, 'b4164': 1, 'b1911': 1, 'b4163': 1, 'b3797': 1, 'b2652': 1, 'b3069': 1, 'b0202': 1, 'b3277': 1, 'b3852': 1, 'b0749': 1, 'b0743': 1, 'b2404': 1, 'b0747': 1, 'b0745': 1, 'b0748': 1, 'b0666': 1, 'b0673': 1, 'b2967': 1, 'b4134': 1, 'b3273': 1, 'b3979': 1, 'b3761': 1, 'b1665': 1, 'b1666': 1, 'b0744': 1, 'b2401': 1, 'b2402': 1, 'b2403': 1, 'b0746': 1}}}, 'carriers': None}}, 'metabolites': {'amet_c': -1, 'ahcys_c': 1}}, 'G_to_m2G': {'name': 'N2-methylguanosine', 'input': 'G', 'output': 'm2G', 'machines': {'RlmG_mono': {'proteins': {'b3084': 'RmlG'}, 'RNA_position_substrates': {'rRNA': {1835: {'LSU/23S/prokaryotic': 1}}}, 'carriers': None}, 'RlmL_dim': {'proteins': {'b0948': 'RlmL'}, 'RNA_position_substrates': {'rRNA': {2445: {'LSU/23S/prokaryotic': 1}}}, 'carriers': None}, 'RsmC_mono': {'proteins': {'b4371': 'RsmC'}, 'RNA_position_substrates': {'rRNA': {1207: {'SSU/16S/prokaryotic': 1}}}, 'carriers': None}, 'RsmD_mono': {'proteins': {'b3465': 'RsmD'}, 'RNA_position_substrates': {'rRNA': {966: {'SSU/16S/prokaryotic': 1}}}, 'carriers': None}, 'RsmJ_MONOMER': {'proteins': {'b3497': 'RsmJ '}, 'RNA_position_substrates': {'rRNA': {1516: {'SSU/16S/prokaryotic': 1}}}, 'carriers': None}}, 'metabolites': {'amet_c': -1, 'ahcys_c': 1, 'h_c': 1}}, 'G_to_Gm': {'name': '2-O-methylguanosine', 'input': 'G', 'output': 'Gm', 'machines': {'RlmB_dim': {'proteins': {'b4180': 'RlmB'}, 'RNA_position_substrates': {'rRNA': {2251: {'LSU/23S/prokaryotic': 1}}}, 'carriers': None}, 'TrmH_dim': {'proteins': {'b3651': 'TrmH'}, 'RNA_position_substrates': {'tRNA': {18: {'b0668': 1, 'b0670': 1, 'b0664': 1, 'b0665': 1, 'b2652': 1, 'b3069': 1, 'b1909': 1, 'b4369': 1, 'b4370': 1, 'b3798': 1, 'b4368': 1, 'b3174': 1, 'b0666': 1, 'b0673': 1, 'b0971': 1, 'b1975': 1, 'b0883': 1, 'b1032': 1, 'b1230': 1, 'b3977': 1, 'b1231': 1}}}, 'carriers': None}}, 'metabolites': {'amet_c': -1, 'ahcys_c': 1, 'h_c': 1}}, 'G_to_m1G': {'name': '1-methylguanosine', 'input': 'G', 'output': 'm1G', 'machines': {'RrmA_dim_mod_2:zn2': {'proteins': {'b1822': 'RlmA1'}, 'RNA_position_substrates': {'rRNA': {745: {'LSU/23S/prokaryotic': 1}}}, 'carriers': None}, 'TrmD_dim': {'proteins': {'b2607': 'TrmD'}, 'RNA_position_substrates': {'tRNA': {37: {'b4369': 1, 'b4370': 1, 'b3798': 1, 'b4368': 1, 'b3174': 1, 'b0672': 1, 'b3799': 1, 'b2189': 1, 'b3545': 1, 'b3796': 1}}}, 'carriers': None}}, 'metabolites': {'amet_c': -1, 'ahcys_c': 1, 'h_c': 1}}, 'G_to_preq1tRNA': {'name': '7-aminomethyl-7-deazaguanosine', 'input': 'G', 'output': 'preq1tRNA', 'machines': {'Tgt_hexa_mod_6:zn2': {'proteins': {'b0406': 'Tgt'}, 'RNA_position_substrates': {'tRNA': {34: {'all': 1}}}, 'carriers': None}}, 'metabolites': {'preq1_c': -1, 'gua_c': 1}}, 'preq1tRNA_to_oQtRNA': {'name': 'epoxyqueuosine', 'input': 'preq1tRNA', 'output': 'oQtRNA', 'machines': {'QueA_mono': {'proteins': {'b0405': 'QueA'}, 'RNA_position_substrates': {'tRNA': {34: {'all': 1}}}, 'carriers': None}}, 'metabolites': {'amet_c': -1, 'ade_c': 1, 'met__L_c': 1, 'h_c': 1}}, 'oQtRNA_to_QtRNA': {'name': 'queuosine', 'input': 'oQtRNA', 'output': 'QtRNA', 'machines': {'QueG_mono_mod_adocbl': {'proteins': {'b4166': 'QueG'}, 'RNA_position_substrates': {'tRNA': {34: {'all': 1}}}, 'carriers': None}}, 'metabolites': {'h2o_c': 1}}, 'QtRNA_to_gluQtRNA': {'name': 'glutamyl-queuosine', 'input': 'QtRNA', 'output': 'gluQtRNA', 'machines': {'YadB_mono': {'proteins': {'b0144': 'GluQRS'}, 'RNA_position_substrates': {'tRNA': {34: {'b0216': 1, 'b0206': 1, 'b3760': 1}}}, 'carriers': None}}, 'metabolites': {'atp_c': 1, 'glu__L_c': -1, 'amp_c': 1, 'ppi_c': 1, 'h_c': 2}}} |
list1=[]
limit=int(input('Enter the size of list'))
for i in range(1,limit+1,1):
items=input('Enter the items of list:')
list1.append(items)
for i in list1:
print(i)
del list1[0]
print(list1)
| list1 = []
limit = int(input('Enter the size of list'))
for i in range(1, limit + 1, 1):
items = input('Enter the items of list:')
list1.append(items)
for i in list1:
print(i)
del list1[0]
print(list1) |
def get_me():
print('hi')
if __name__ == '__main__':
# This is executed you run via terminal
print('Running other_module.py...')
| def get_me():
print('hi')
if __name__ == '__main__':
print('Running other_module.py...') |
options = {0 : "zero",
1 : "sqr",
4 : "sqr",
9 : "sqr",
2 : "even",
3 : "prime",
5 : "prime",
7 : "prime",
}
def zero():
print ("You typed zero.\n")
def sqr():
print ("n is a perfect square\n")
def even():
print ("n is an even number\n")
def prime():
print ("n is a prime number\n")
num = int(input ("Enter a number contained in the dictionary: "))
try:
options[num]()
except:
print ("Error!") | options = {0: 'zero', 1: 'sqr', 4: 'sqr', 9: 'sqr', 2: 'even', 3: 'prime', 5: 'prime', 7: 'prime'}
def zero():
print('You typed zero.\n')
def sqr():
print('n is a perfect square\n')
def even():
print('n is an even number\n')
def prime():
print('n is a prime number\n')
num = int(input('Enter a number contained in the dictionary: '))
try:
options[num]()
except:
print('Error!') |
model_imp = DecisionTreeClassifier(random_state=22)
model_imp.fit(X_Smote_train,Y_Smote_train)
importance = model_imp.feature_importances_
for i,v in enumerate(importance):
print('Feature: %0d, Score: %.5f' % (i,v))
plt.bar([x for x in range(len(importance))], importance)
plt.show()
np.where(importance>0.015)
X_Smote_train_rid = X_Smote_train.iloc[:, [0, 2, 3, 4, 5, 6, 8, 9, 27, 28, 32, 33, 41,
42, 44, 45, 53, 64, 78, 79, 81, 84, 85, 86, 87, 90,
91, 95, 97, 100]]
X_test_rid = X_compl_test.iloc[:, [0, 2, 3, 4, 5, 6, 8, 9, 27, 28, 32, 33, 41,
42, 44, 45, 53, 64, 78, 79, 81, 84, 85, 86, 87, 90,
91, 95, 97, 100]]
class_tree=DecisionTreeClassifier(random_state=22)
param = {'max_depth':range(1, 6), 'min_samples_split':range(2,30), 'min_samples_leaf':range(2,25)}
grid = GridSearchCV(class_tree, param, cv=5)
grid.fit(X_Smote_train_rid, Y_Smote_train)
print(grid.best_params_)
mod_tree=DecisionTreeClassifier(max_depth=5,min_samples_split=8,min_samples_leaf=2,random_state=22)
mod_tree.fit(X_Smote_train_rid, Y_Smote_train)
text_representation = tree.export_text(mod_tree)
print(text_representation)
fig1 = plt.figure(figsize=(25,20))
_ = tree.plot_tree(mod_tree,feature_names=list(X_Smote_train_rid.columns),filled=True)
y_train_pred = mod_tree.predict(X_Smote_train_rid)
print(classification_report(Y_Smote_train, y_train_pred))
y_test_pred = mod_tree.predict(X_test_rid)
print(classification_report(Y_unica_test, y_test_pred))
| model_imp = decision_tree_classifier(random_state=22)
model_imp.fit(X_Smote_train, Y_Smote_train)
importance = model_imp.feature_importances_
for (i, v) in enumerate(importance):
print('Feature: %0d, Score: %.5f' % (i, v))
plt.bar([x for x in range(len(importance))], importance)
plt.show()
np.where(importance > 0.015)
x__smote_train_rid = X_Smote_train.iloc[:, [0, 2, 3, 4, 5, 6, 8, 9, 27, 28, 32, 33, 41, 42, 44, 45, 53, 64, 78, 79, 81, 84, 85, 86, 87, 90, 91, 95, 97, 100]]
x_test_rid = X_compl_test.iloc[:, [0, 2, 3, 4, 5, 6, 8, 9, 27, 28, 32, 33, 41, 42, 44, 45, 53, 64, 78, 79, 81, 84, 85, 86, 87, 90, 91, 95, 97, 100]]
class_tree = decision_tree_classifier(random_state=22)
param = {'max_depth': range(1, 6), 'min_samples_split': range(2, 30), 'min_samples_leaf': range(2, 25)}
grid = grid_search_cv(class_tree, param, cv=5)
grid.fit(X_Smote_train_rid, Y_Smote_train)
print(grid.best_params_)
mod_tree = decision_tree_classifier(max_depth=5, min_samples_split=8, min_samples_leaf=2, random_state=22)
mod_tree.fit(X_Smote_train_rid, Y_Smote_train)
text_representation = tree.export_text(mod_tree)
print(text_representation)
fig1 = plt.figure(figsize=(25, 20))
_ = tree.plot_tree(mod_tree, feature_names=list(X_Smote_train_rid.columns), filled=True)
y_train_pred = mod_tree.predict(X_Smote_train_rid)
print(classification_report(Y_Smote_train, y_train_pred))
y_test_pred = mod_tree.predict(X_test_rid)
print(classification_report(Y_unica_test, y_test_pred)) |
n1 = int
n2 = int
n3 = int
n4 = int
n5 = int
n6 = int
n7 = int
n8 = int
n9 = int
n = int(input("Digite un Numero: "))
n1 = n*1
n2 = n*2
n3 = n*3
n4 = n*4
n5 = n*5
n6 = n*6
n7 = n*7
n8 = n*8
n9 = n*9
n10 = n*10
print ("El calculo Uno es: ", n1)
print ("El calculo dos es: ", n2)
print ("El calculo tres es: ", n3)
print ("El calculo cuatro es: ", n4)
print ("El calculo cinco es: ", n5)
print ("El calculo seis es: ", n6)
print ("El calculo siete es: ", n7)
print ("El calculo ocho es: ", n8)
print ("El calculo nueve es: ", n9)
print ("El calculo diez es: ", n10)
| n1 = int
n2 = int
n3 = int
n4 = int
n5 = int
n6 = int
n7 = int
n8 = int
n9 = int
n = int(input('Digite un Numero: '))
n1 = n * 1
n2 = n * 2
n3 = n * 3
n4 = n * 4
n5 = n * 5
n6 = n * 6
n7 = n * 7
n8 = n * 8
n9 = n * 9
n10 = n * 10
print('El calculo Uno es: ', n1)
print('El calculo dos es: ', n2)
print('El calculo tres es: ', n3)
print('El calculo cuatro es: ', n4)
print('El calculo cinco es: ', n5)
print('El calculo seis es: ', n6)
print('El calculo siete es: ', n7)
print('El calculo ocho es: ', n8)
print('El calculo nueve es: ', n9)
print('El calculo diez es: ', n10) |
# QUICK SORT
# BEST: O(nlogn) time, O(logn) space
# AVERAGE: O(nlogn) time, O(logn) space
# WORST: O(n^2) time, O(logn) space
def quickSort(array):
# Write your code here.
partition(array, 0, len(array) - 1)
return array
def partition(array, low, high):
if low < high:
print("Inside partition")
pivot = quickSortHelper(array, low, high)
print("low",low,"high",high,"pivot",pivot)
partition(array, low, pivot - 1)
partition(array, pivot + 1, high)
def quickSortHelper(array, low, high):
print("Quicksorthelper")
pivot = array[low]
left = low + 1
right = high
while right >= left:
if array[left] > pivot and array[right] < pivot:
swap(array, left, right)
left += 1
right -= 1
elif array[left] <= pivot:
left += 1
elif array[right] >= pivot:
right -= 1
swap(array, low, right)
return right
def swap(array, one, two):
array[one], array[two] = array[two], array[one]
# BEST: O(nlogn) time, O(logn) space
# AVERAGE: O(nlogn) time, O(logn) space
# WORST: O(n^2) time, O(logn) space
def quickSort(array):
# Write your code here.
quickSortHelper(array, 0, len(array) - 1)
return array
def quickSortHelper(array, low, high):
print("Quicksorthelper")
if low >= high:
return
pivot = array[low]
left = low + 1
right = high
while right >= left:
if array[left] > pivot and array[right] < pivot:
swap(array, left, right)
if array[left] <= pivot:
left += 1
if array[right] >= pivot:
right -= 1
swap(array, low, right)
leftSubArrayIsSmaller = right - 1 - low < high - (right + 1)
if leftSubArrayIsSmaller:
quickSortHelper(array, low, right - 1)
quickSortHelper(array, right + 1, high)
else:
quickSortHelper(array, right + 1, high)
quickSortHelper(array, low, right - 1)
def swap(array, one, two):
array[one], array[two] = array[two], array[one]
| def quick_sort(array):
partition(array, 0, len(array) - 1)
return array
def partition(array, low, high):
if low < high:
print('Inside partition')
pivot = quick_sort_helper(array, low, high)
print('low', low, 'high', high, 'pivot', pivot)
partition(array, low, pivot - 1)
partition(array, pivot + 1, high)
def quick_sort_helper(array, low, high):
print('Quicksorthelper')
pivot = array[low]
left = low + 1
right = high
while right >= left:
if array[left] > pivot and array[right] < pivot:
swap(array, left, right)
left += 1
right -= 1
elif array[left] <= pivot:
left += 1
elif array[right] >= pivot:
right -= 1
swap(array, low, right)
return right
def swap(array, one, two):
(array[one], array[two]) = (array[two], array[one])
def quick_sort(array):
quick_sort_helper(array, 0, len(array) - 1)
return array
def quick_sort_helper(array, low, high):
print('Quicksorthelper')
if low >= high:
return
pivot = array[low]
left = low + 1
right = high
while right >= left:
if array[left] > pivot and array[right] < pivot:
swap(array, left, right)
if array[left] <= pivot:
left += 1
if array[right] >= pivot:
right -= 1
swap(array, low, right)
left_sub_array_is_smaller = right - 1 - low < high - (right + 1)
if leftSubArrayIsSmaller:
quick_sort_helper(array, low, right - 1)
quick_sort_helper(array, right + 1, high)
else:
quick_sort_helper(array, right + 1, high)
quick_sort_helper(array, low, right - 1)
def swap(array, one, two):
(array[one], array[two]) = (array[two], array[one]) |
#!/usr/bin/python3
def list_division(my_list_1, my_list_2, list_length):
"divides element by element 2 lists"
i = result = 0
list = []
for i in range(list_length):
try:
result = (my_list_1[i] / my_list_2[i])
except TypeError:
result = 0
print("wrong type")
except ZeroDivisionError:
result = 0
print("division by 0")
except IndexError:
result = 0
print("out of range")
finally:
list.append(result)
return list
| def list_division(my_list_1, my_list_2, list_length):
"""divides element by element 2 lists"""
i = result = 0
list = []
for i in range(list_length):
try:
result = my_list_1[i] / my_list_2[i]
except TypeError:
result = 0
print('wrong type')
except ZeroDivisionError:
result = 0
print('division by 0')
except IndexError:
result = 0
print('out of range')
finally:
list.append(result)
return list |
print('How old are you?') #ask the age
my_Age = input() # input age
if int(my_Age) < 18: # age comparision
print('You are not on age')
elif int(my_Age) >= 18:
print('You are on age')
if int(my_Age) >= 100:
print('You are a vampire or maybe inmortal')
if int(my_Age) >= 500:
print('You are inmortal')
while int(my_Age) < 18: # annoying part
print('HAHA You cant buy beer!!!')
my_Age = int(my_Age) + 1
else:
print('You are not human then!')
# I left reading the book in chapter 2 | 'Break Stataments' | print('How old are you?')
my__age = input()
if int(my_Age) < 18:
print('You are not on age')
elif int(my_Age) >= 18:
print('You are on age')
if int(my_Age) >= 100:
print('You are a vampire or maybe inmortal')
if int(my_Age) >= 500:
print('You are inmortal')
while int(my_Age) < 18:
print('HAHA You cant buy beer!!!')
my__age = int(my_Age) + 1
else:
print('You are not human then!') |
# https://github.com/tensorflow/tensorflow/issues/2169
# MAX Unpooling in tensorflow
# Solution from fabianbormann:
# Limitations:
# 1. //, argmax run ONLY on GPUs.
def unravel_argmax(argmax, shape):
output_list = []
output_list.append(argmax // (shape[2] * shape[3]))
output_list.append(argmax % (shape[2] * shape[3]) // shape[3])
return tf.stack(output_list)
def unpool_layer2x2(x, raveled_argmax, out_shape):
argmax = unravel_argmax(raveled_argmax, tf.to_int64(out_shape))
output = tf.zeros([out_shape[1], out_shape[2], out_shape[3]])
height = tf.shape(output)[0]
width = tf.shape(output)[1]
channels = tf.shape(output)[2]
t1 = tf.to_int64(tf.range(channels))
t1 = tf.tile(t1, [((width + 1) // 2) * ((height + 1) // 2)])
t1 = tf.reshape(t1, [-1, channels])
t1 = tf.transpose(t1, perm=[1, 0])
t1 = tf.reshape(t1, [channels, (height + 1) // 2, (width + 1) // 2, 1])
t2 = tf.squeeze(argmax)
t2 = tf.stack((t2[0], t2[1]), axis=0)
t2 = tf.transpose(t2, perm=[3, 1, 2, 0])
t = tf.concat([t2, t1], 3)
indices = tf.reshape(t, [((height + 1) // 2) * ((width + 1) // 2) * channels, 3])
x1 = tf.squeeze(x)
x1 = tf.reshape(x1, [-1, channels])
x1 = tf.transpose(x1, perm=[1, 0])
values = tf.reshape(x1, [-1])
delta = tf.SparseTensor(indices, values, tf.to_int64(tf.shape(output)))
return tf.expand_dims(tf.sparse_tensor_to_dense(tf.sparse_reorder(delta)), 0)
# test max unpooling solution from fabianbormann
x = tf.placeholder(tf.float32, shape=(1, None, None, None))
pool_1, argmax_1 = tf.nn.max_pool_with_argmax(x, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name='pool1')
pool_2, argmax_2 = tf.nn.max_pool_with_argmax(pool_1, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name='pool1')
pool_3, argmax_3 = tf.nn.max_pool_with_argmax(pool_2, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name='pool1')
pool_4, argmax_4 = tf.nn.max_pool_with_argmax(pool_3, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name='pool1')
pool_5, argmax_5 = tf.nn.max_pool_with_argmax(pool_4, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name='pool1')
unpool_5 = unpool_layer2x2(pool_5, argmax_5, tf.shape(pool_4))
unpool_4 = unpool_layer2x2(unpool_5, argmax_4, tf.shape(pool_3))
unpool_3 = unpool_layer2x2(unpool_4, argmax_3, tf.shape(pool_2))
unpool_2 = unpool_layer2x2(unpool_3, argmax_2, tf.shape(pool_1))
unpool_1 = unpool_layer2x2(unpool_2, argmax_1, tf.shape(x))
session = tf.InteractiveSession()
session.run(tf.global_variables_initializer())
image = np.float32(cv2.imread('../data/dressthuy.JPG'))
tests = [
pool_1.eval(feed_dict={x: [image]}),
pool_2.eval(feed_dict={x: [image]}),
pool_3.eval(feed_dict={x: [image]}),
pool_4.eval(feed_dict={x: [image]}),
pool_5.eval(feed_dict={x: [image]}),
unpool_5.eval(feed_dict={x: [image]}),
unpool_4.eval(feed_dict={x: [image]}),
unpool_3.eval(feed_dict={x: [image]}),
unpool_2.eval(feed_dict={x: [image]}),
unpool_1.eval(feed_dict={x: [image]})
]
session.close()
for test in tests:
print(test.shape)
for test in tests:
plt.figure()
plt.imshow(np.uint8(test[0]), interpolation='none')
plt.show()
| def unravel_argmax(argmax, shape):
output_list = []
output_list.append(argmax // (shape[2] * shape[3]))
output_list.append(argmax % (shape[2] * shape[3]) // shape[3])
return tf.stack(output_list)
def unpool_layer2x2(x, raveled_argmax, out_shape):
argmax = unravel_argmax(raveled_argmax, tf.to_int64(out_shape))
output = tf.zeros([out_shape[1], out_shape[2], out_shape[3]])
height = tf.shape(output)[0]
width = tf.shape(output)[1]
channels = tf.shape(output)[2]
t1 = tf.to_int64(tf.range(channels))
t1 = tf.tile(t1, [(width + 1) // 2 * ((height + 1) // 2)])
t1 = tf.reshape(t1, [-1, channels])
t1 = tf.transpose(t1, perm=[1, 0])
t1 = tf.reshape(t1, [channels, (height + 1) // 2, (width + 1) // 2, 1])
t2 = tf.squeeze(argmax)
t2 = tf.stack((t2[0], t2[1]), axis=0)
t2 = tf.transpose(t2, perm=[3, 1, 2, 0])
t = tf.concat([t2, t1], 3)
indices = tf.reshape(t, [(height + 1) // 2 * ((width + 1) // 2) * channels, 3])
x1 = tf.squeeze(x)
x1 = tf.reshape(x1, [-1, channels])
x1 = tf.transpose(x1, perm=[1, 0])
values = tf.reshape(x1, [-1])
delta = tf.SparseTensor(indices, values, tf.to_int64(tf.shape(output)))
return tf.expand_dims(tf.sparse_tensor_to_dense(tf.sparse_reorder(delta)), 0)
x = tf.placeholder(tf.float32, shape=(1, None, None, None))
(pool_1, argmax_1) = tf.nn.max_pool_with_argmax(x, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name='pool1')
(pool_2, argmax_2) = tf.nn.max_pool_with_argmax(pool_1, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name='pool1')
(pool_3, argmax_3) = tf.nn.max_pool_with_argmax(pool_2, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name='pool1')
(pool_4, argmax_4) = tf.nn.max_pool_with_argmax(pool_3, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name='pool1')
(pool_5, argmax_5) = tf.nn.max_pool_with_argmax(pool_4, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name='pool1')
unpool_5 = unpool_layer2x2(pool_5, argmax_5, tf.shape(pool_4))
unpool_4 = unpool_layer2x2(unpool_5, argmax_4, tf.shape(pool_3))
unpool_3 = unpool_layer2x2(unpool_4, argmax_3, tf.shape(pool_2))
unpool_2 = unpool_layer2x2(unpool_3, argmax_2, tf.shape(pool_1))
unpool_1 = unpool_layer2x2(unpool_2, argmax_1, tf.shape(x))
session = tf.InteractiveSession()
session.run(tf.global_variables_initializer())
image = np.float32(cv2.imread('../data/dressthuy.JPG'))
tests = [pool_1.eval(feed_dict={x: [image]}), pool_2.eval(feed_dict={x: [image]}), pool_3.eval(feed_dict={x: [image]}), pool_4.eval(feed_dict={x: [image]}), pool_5.eval(feed_dict={x: [image]}), unpool_5.eval(feed_dict={x: [image]}), unpool_4.eval(feed_dict={x: [image]}), unpool_3.eval(feed_dict={x: [image]}), unpool_2.eval(feed_dict={x: [image]}), unpool_1.eval(feed_dict={x: [image]})]
session.close()
for test in tests:
print(test.shape)
for test in tests:
plt.figure()
plt.imshow(np.uint8(test[0]), interpolation='none')
plt.show() |
#Task No. 02
print('3rd graph')
graph_3 = {7:[11,8],2:[],3:[8,10],11:[2,9,10],5:[11],9:[],8:[9]}
keys_3 = list(graph_3.keys())
##
##for i in range(len(keys_3)):
## temp = graph_3.get(keys_3[i])
## print(str(keys_3[i]) + ' is connected with ' + str(temp) + ' and has degree of ' + str(len(temp)))
for i in graph_3:
In = 0;
for j in graph_3:
if (i in graph_3[j]):
In = In + 1
print(i, ' is connected with ', str(graph_3[i]),' and has out-degree ',str(len(graph_3[i])),' and in-degree ',str(In))
graph_4 = {'A':['B'],'B':['C','D','E'],'C':['E'],'D':['E'],'E':['F'],'F':[],'G':['D']}
keys_4 = list(graph_4.keys())
##for i in range(len(keys_4)):
## temp = graph_4.get(keys_4[i])
## print(str(keys_4[i]) + ' is connected with ' + str(temp) + ' and has degree of ' + str(len(temp)))
print('4th graph')
for i in graph_4:
In = 0;
for j in graph_4:
if (i in graph_4[j]):
In = In + 1
print(i, ' is connected with ', str(graph_4[i]),' and has out-degree ',str(len(graph_4[i])),' and in-degree ',str(In))
| print('3rd graph')
graph_3 = {7: [11, 8], 2: [], 3: [8, 10], 11: [2, 9, 10], 5: [11], 9: [], 8: [9]}
keys_3 = list(graph_3.keys())
for i in graph_3:
in = 0
for j in graph_3:
if i in graph_3[j]:
in = In + 1
print(i, ' is connected with ', str(graph_3[i]), ' and has out-degree ', str(len(graph_3[i])), ' and in-degree ', str(In))
graph_4 = {'A': ['B'], 'B': ['C', 'D', 'E'], 'C': ['E'], 'D': ['E'], 'E': ['F'], 'F': [], 'G': ['D']}
keys_4 = list(graph_4.keys())
print('4th graph')
for i in graph_4:
in = 0
for j in graph_4:
if i in graph_4[j]:
in = In + 1
print(i, ' is connected with ', str(graph_4[i]), ' and has out-degree ', str(len(graph_4[i])), ' and in-degree ', str(In)) |
print('Hello World')
name = input('Please enter your name: ')
print('Welcome', name)
input1 = int(input('Please enter a number: '))
input2 = int(input('Please enter another number: '))
value = input1 + input2
print(f'The result of {input1} + {input2} is', value)
print('The type of the value is', type(value))
input_string1 = input('Please enter a string: ')
input_string2 = input('Please enter another string: ')
value = input_string1 + input_string2
print('The new value is', value)
print('The type of the value is now', type(value))
title = 'Data Processing App Version' + str(1.0)
print(f'The title of this app is {title}')
user = None
print('user:', user)
print('user is None:', user is None)
print('user is not None:', user is not None)
print('The type of the user', type(user))
| print('Hello World')
name = input('Please enter your name: ')
print('Welcome', name)
input1 = int(input('Please enter a number: '))
input2 = int(input('Please enter another number: '))
value = input1 + input2
print(f'The result of {input1} + {input2} is', value)
print('The type of the value is', type(value))
input_string1 = input('Please enter a string: ')
input_string2 = input('Please enter another string: ')
value = input_string1 + input_string2
print('The new value is', value)
print('The type of the value is now', type(value))
title = 'Data Processing App Version' + str(1.0)
print(f'The title of this app is {title}')
user = None
print('user:', user)
print('user is None:', user is None)
print('user is not None:', user is not None)
print('The type of the user', type(user)) |
class Solution:
def maxProfit(self, prices, fee):
N = len(prices)
if N < 2:
return 0
ans = 0
minimum = prices[0]
for i in range(1, N):
if prices[i] < minimum:
minimum = prices[i]
elif prices[i] > minimum + fee:
ans += prices[i] - fee - minimum
minimum = prices[i] - fee
return ans
| class Solution:
def max_profit(self, prices, fee):
n = len(prices)
if N < 2:
return 0
ans = 0
minimum = prices[0]
for i in range(1, N):
if prices[i] < minimum:
minimum = prices[i]
elif prices[i] > minimum + fee:
ans += prices[i] - fee - minimum
minimum = prices[i] - fee
return ans |
ARGUMENT_PROCESS_NAME = 'process_name'
ARGUMENT_FLOW_NAME = 'flow_name'
ARGUMENT_STEP_NAME = 'step_name'
ARGUMENT_TIMEPERIOD = 'timeperiod'
ARGUMENT_START_TIMEPERIOD = 'start_timeperiod'
ARGUMENT_END_TIMEPERIOD = 'end_timeperiod'
ARGUMENT_UNIT_OF_WORK_TYPE = 'unit_of_work_type' # whether the unit_of_work is TYPE_MANAGED or TYPE_FREERUN
# Argument is present in uow.arguments dictionary
ARGUMENT_RUN_MODE = 'run_mode'
RUN_MODE_RUN_ONE = 'run_mode_run_one'
RUN_MODE_RUN_FROM = 'run_mode_run_from'
STEP_NAME_START = 'start'
STEP_NAME_FINISH = 'finish'
COLLECTION_STEP = 'step'
COLLECTION_FLOW = 'flow'
SECONDS_IN_CENTURY = 6108600000
| argument_process_name = 'process_name'
argument_flow_name = 'flow_name'
argument_step_name = 'step_name'
argument_timeperiod = 'timeperiod'
argument_start_timeperiod = 'start_timeperiod'
argument_end_timeperiod = 'end_timeperiod'
argument_unit_of_work_type = 'unit_of_work_type'
argument_run_mode = 'run_mode'
run_mode_run_one = 'run_mode_run_one'
run_mode_run_from = 'run_mode_run_from'
step_name_start = 'start'
step_name_finish = 'finish'
collection_step = 'step'
collection_flow = 'flow'
seconds_in_century = 6108600000 |
class Plot(object):
def __init__(self):
pass
def __call__(self):
pass
| class Plot(object):
def __init__(self):
pass
def __call__(self):
pass |
#
# PySNMP MIB module EQLEXT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EQLEXT-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:05:18 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
eqlExt, = mibBuilder.importSymbols("APENT-MIB", "eqlExt")
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Gauge32, ObjectIdentity, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, MibIdentifier, NotificationType, ModuleIdentity, Unsigned32, Counter64, Bits, iso, Counter32, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "ObjectIdentity", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "MibIdentifier", "NotificationType", "ModuleIdentity", "Unsigned32", "Counter64", "Bits", "iso", "Counter32", "TimeTicks")
DisplayString, TextualConvention, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "RowStatus")
apEqlExtMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 2467, 1, 42, 1))
if mibBuilder.loadTexts: apEqlExtMib.setLastUpdated('9710092000Z')
if mibBuilder.loadTexts: apEqlExtMib.setOrganization('ArrowPoint Communications Inc.')
if mibBuilder.loadTexts: apEqlExtMib.setContactInfo(' Postal: ArrowPoint Communications Inc. 50 Nagog Park Acton, Massachusetts 01720 Tel: +1 978-206-3000 option 1 E-Mail: support@arrowpoint.com')
if mibBuilder.loadTexts: apEqlExtMib.setDescription('The MIB module used to describe the ArrowPoint Communications (E)xtension (Q)ualification (L)ists')
apEqlTable = MibTable((1, 3, 6, 1, 4, 1, 2467, 1, 42, 2), )
if mibBuilder.loadTexts: apEqlTable.setStatus('current')
if mibBuilder.loadTexts: apEqlTable.setDescription('A list of extension qualifier lists')
apEqlEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2467, 1, 42, 2, 1), ).setIndexNames((0, "EQLEXT-MIB", "apEqlName"))
if mibBuilder.loadTexts: apEqlEntry.setStatus('current')
if mibBuilder.loadTexts: apEqlEntry.setDescription('A group of information uniquely identifying an EQL. One entry exists for each EQL')
apEqlName = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 42, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apEqlName.setStatus('current')
if mibBuilder.loadTexts: apEqlName.setDescription('The name of the EQL')
apEqlDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 42, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apEqlDescription.setStatus('current')
if mibBuilder.loadTexts: apEqlDescription.setDescription('An EQL description')
apEqlStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 42, 2, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apEqlStatus.setStatus('current')
if mibBuilder.loadTexts: apEqlStatus.setDescription('Status entry for this row ')
apEqlExtTable = MibTable((1, 3, 6, 1, 4, 1, 2467, 1, 42, 3), )
if mibBuilder.loadTexts: apEqlExtTable.setStatus('current')
if mibBuilder.loadTexts: apEqlExtTable.setDescription('A list of extensions associated with an EQL')
apEqlExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2467, 1, 42, 3, 1), ).setIndexNames((0, "EQLEXT-MIB", "apEqlName"), (0, "EQLEXT-MIB", "apEqlExtName"))
if mibBuilder.loadTexts: apEqlExtEntry.setStatus('current')
if mibBuilder.loadTexts: apEqlExtEntry.setDescription('Information uniquely identifying an extension within an EQL')
apEqlExtName = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 42, 3, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 7))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apEqlExtName.setStatus('current')
if mibBuilder.loadTexts: apEqlExtName.setDescription('The extension')
apEqlExtDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 42, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apEqlExtDescription.setStatus('current')
if mibBuilder.loadTexts: apEqlExtDescription.setDescription('A description of this extension')
apEqlExtStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 42, 3, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: apEqlExtStatus.setStatus('current')
if mibBuilder.loadTexts: apEqlExtStatus.setDescription('Status entry for this row ')
mibBuilder.exportSymbols("EQLEXT-MIB", apEqlExtStatus=apEqlExtStatus, apEqlExtDescription=apEqlExtDescription, apEqlExtMib=apEqlExtMib, apEqlName=apEqlName, apEqlExtTable=apEqlExtTable, apEqlDescription=apEqlDescription, apEqlExtName=apEqlExtName, apEqlEntry=apEqlEntry, apEqlTable=apEqlTable, PYSNMP_MODULE_ID=apEqlExtMib, apEqlStatus=apEqlStatus, apEqlExtEntry=apEqlExtEntry)
| (eql_ext,) = mibBuilder.importSymbols('APENT-MIB', 'eqlExt')
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, constraints_union, value_size_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(gauge32, object_identity, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, mib_identifier, notification_type, module_identity, unsigned32, counter64, bits, iso, counter32, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'ObjectIdentity', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'MibIdentifier', 'NotificationType', 'ModuleIdentity', 'Unsigned32', 'Counter64', 'Bits', 'iso', 'Counter32', 'TimeTicks')
(display_string, textual_convention, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'RowStatus')
ap_eql_ext_mib = module_identity((1, 3, 6, 1, 4, 1, 2467, 1, 42, 1))
if mibBuilder.loadTexts:
apEqlExtMib.setLastUpdated('9710092000Z')
if mibBuilder.loadTexts:
apEqlExtMib.setOrganization('ArrowPoint Communications Inc.')
if mibBuilder.loadTexts:
apEqlExtMib.setContactInfo(' Postal: ArrowPoint Communications Inc. 50 Nagog Park Acton, Massachusetts 01720 Tel: +1 978-206-3000 option 1 E-Mail: support@arrowpoint.com')
if mibBuilder.loadTexts:
apEqlExtMib.setDescription('The MIB module used to describe the ArrowPoint Communications (E)xtension (Q)ualification (L)ists')
ap_eql_table = mib_table((1, 3, 6, 1, 4, 1, 2467, 1, 42, 2))
if mibBuilder.loadTexts:
apEqlTable.setStatus('current')
if mibBuilder.loadTexts:
apEqlTable.setDescription('A list of extension qualifier lists')
ap_eql_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2467, 1, 42, 2, 1)).setIndexNames((0, 'EQLEXT-MIB', 'apEqlName'))
if mibBuilder.loadTexts:
apEqlEntry.setStatus('current')
if mibBuilder.loadTexts:
apEqlEntry.setDescription('A group of information uniquely identifying an EQL. One entry exists for each EQL')
ap_eql_name = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 42, 2, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 31))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apEqlName.setStatus('current')
if mibBuilder.loadTexts:
apEqlName.setDescription('The name of the EQL')
ap_eql_description = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 42, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apEqlDescription.setStatus('current')
if mibBuilder.loadTexts:
apEqlDescription.setDescription('An EQL description')
ap_eql_status = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 42, 2, 1, 3), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apEqlStatus.setStatus('current')
if mibBuilder.loadTexts:
apEqlStatus.setDescription('Status entry for this row ')
ap_eql_ext_table = mib_table((1, 3, 6, 1, 4, 1, 2467, 1, 42, 3))
if mibBuilder.loadTexts:
apEqlExtTable.setStatus('current')
if mibBuilder.loadTexts:
apEqlExtTable.setDescription('A list of extensions associated with an EQL')
ap_eql_ext_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2467, 1, 42, 3, 1)).setIndexNames((0, 'EQLEXT-MIB', 'apEqlName'), (0, 'EQLEXT-MIB', 'apEqlExtName'))
if mibBuilder.loadTexts:
apEqlExtEntry.setStatus('current')
if mibBuilder.loadTexts:
apEqlExtEntry.setDescription('Information uniquely identifying an extension within an EQL')
ap_eql_ext_name = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 42, 3, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 7))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apEqlExtName.setStatus('current')
if mibBuilder.loadTexts:
apEqlExtName.setDescription('The extension')
ap_eql_ext_description = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 42, 3, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 64))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apEqlExtDescription.setStatus('current')
if mibBuilder.loadTexts:
apEqlExtDescription.setDescription('A description of this extension')
ap_eql_ext_status = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 42, 3, 1, 3), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
apEqlExtStatus.setStatus('current')
if mibBuilder.loadTexts:
apEqlExtStatus.setDescription('Status entry for this row ')
mibBuilder.exportSymbols('EQLEXT-MIB', apEqlExtStatus=apEqlExtStatus, apEqlExtDescription=apEqlExtDescription, apEqlExtMib=apEqlExtMib, apEqlName=apEqlName, apEqlExtTable=apEqlExtTable, apEqlDescription=apEqlDescription, apEqlExtName=apEqlExtName, apEqlEntry=apEqlEntry, apEqlTable=apEqlTable, PYSNMP_MODULE_ID=apEqlExtMib, apEqlStatus=apEqlStatus, apEqlExtEntry=apEqlExtEntry) |
#Open file
file = open('inputs\input4.txt')
data = file.read().split('\n\n')
file.close()
#Clean input
dataClean = []
for x in data:
dataClean.append(x.split()) #Split with no argument splits on whitespace
#Solution 1
reqFields = ['byr','iyr','eyr','hgt','hcl','ecl','pid']
valid = 0
for passport in dataClean:
reqsMet = 0
for field in passport:
field = field.split(':')
if field[0] in reqFields:
reqsMet += 1
if reqsMet == 7:
valid += 1
print(valid)
#Solution 2
reqFields = ['byr','iyr','eyr','hgt','hcl','ecl','pid']
validEcl = ['amb','blu','brn','gry','grn','hzl','oth']
validHcl = '0123456789abcdef'
valid = 0
for passport in dataClean:
reqsMet = 0
for field in passport:
field = field.split(':')
if field[0] == reqFields[0]: #byr field
if int(field[1]) <= 2002 and int(field[1]) >= 1920:
reqsMet += 1
elif field[0] == reqFields[1]: #iyr field
if int(field[1]) <= 2020 and int(field[1]) >= 2010:
reqsMet += 1
elif field[0] == reqFields[2]: #eyr field
if int(field[1]) <= 2030 and int(field[1]) >= 2020:
reqsMet += 1
elif field[0] == reqFields[3]: #hgt field (sketchyy)
if 'cm' in field[1]:
field[1] = field[1].split('c')
elif 'in' in field[1]:
field[1] = field[1].split('i')
if field[1][1] == 'n':
if int(field[1][0]) <= 76 and (int(field[1][0]) >= 59):
reqsMet += 1
elif field[1][1] == 'm':
if int(field[1][0]) <= 193 and (int(field[1][0]) >= 150):
reqsMet += 1
elif field[0] == reqFields[4]: #hcl field
validHclChars = 0
for c in field[1][1:]:
if c in validHcl:
validHclChars += 1
if field[1][0] == '#' and (validHclChars == 6):
reqsMet += 1
elif field[0] == reqFields[5]: #ecl field
if field[1] in validEcl:
reqsMet += 1
elif field[0] == reqFields[6]: #pid field
if field[1].isnumeric() and (len(field[1]) == 9):
reqsMet += 1
if reqsMet == 7:
valid += 1
print(valid)
| file = open('inputs\\input4.txt')
data = file.read().split('\n\n')
file.close()
data_clean = []
for x in data:
dataClean.append(x.split())
req_fields = ['byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid']
valid = 0
for passport in dataClean:
reqs_met = 0
for field in passport:
field = field.split(':')
if field[0] in reqFields:
reqs_met += 1
if reqsMet == 7:
valid += 1
print(valid)
req_fields = ['byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid']
valid_ecl = ['amb', 'blu', 'brn', 'gry', 'grn', 'hzl', 'oth']
valid_hcl = '0123456789abcdef'
valid = 0
for passport in dataClean:
reqs_met = 0
for field in passport:
field = field.split(':')
if field[0] == reqFields[0]:
if int(field[1]) <= 2002 and int(field[1]) >= 1920:
reqs_met += 1
elif field[0] == reqFields[1]:
if int(field[1]) <= 2020 and int(field[1]) >= 2010:
reqs_met += 1
elif field[0] == reqFields[2]:
if int(field[1]) <= 2030 and int(field[1]) >= 2020:
reqs_met += 1
elif field[0] == reqFields[3]:
if 'cm' in field[1]:
field[1] = field[1].split('c')
elif 'in' in field[1]:
field[1] = field[1].split('i')
if field[1][1] == 'n':
if int(field[1][0]) <= 76 and int(field[1][0]) >= 59:
reqs_met += 1
elif field[1][1] == 'm':
if int(field[1][0]) <= 193 and int(field[1][0]) >= 150:
reqs_met += 1
elif field[0] == reqFields[4]:
valid_hcl_chars = 0
for c in field[1][1:]:
if c in validHcl:
valid_hcl_chars += 1
if field[1][0] == '#' and validHclChars == 6:
reqs_met += 1
elif field[0] == reqFields[5]:
if field[1] in validEcl:
reqs_met += 1
elif field[0] == reqFields[6]:
if field[1].isnumeric() and len(field[1]) == 9:
reqs_met += 1
if reqsMet == 7:
valid += 1
print(valid) |
def get_input(file):
with open(file, 'rt', encoding='utf8') as f:
lines = [line.strip() for line in f]
p1_cars = get_player_cards(lines, 1)
p2_cars = get_player_cards(lines, 2)
return p1_cars, p2_cars
def get_player_cards(lines, player):
start = lines.index(f'Player {player}:') + 1
end = lines.index('')
if end < start:
end = len(lines)
cards = lines[start:end]
cards = list(map(lambda x: int(x), cards))
return cards
def play_round(p1_cards, p2_cards, round_):
print(f'-- Round {round_} --')
print(f"Player 1's deck: {p1_cards}") # The first position in the deck is the top card
print(f"Player 2's deck: {p2_cards}")
p1_card = p1_cards.pop(0)
print(f"Player 1 plays: {p1_card}")
p2_card = p2_cards.pop(0)
print(f"Player 2 plays: {p2_card}")
if p1_card > p2_card:
print("Player 1 wins the round!\n")
p1_cards.append(p1_card)
p1_cards.append(p2_card)
else:
print("Player 2 wins the round!\n")
p2_cards.append(p2_card)
p2_cards.append(p1_card)
def calculate_score(cards):
score = 0
for i, v in enumerate(cards):
score += v * (len(cards) - i)
return score
def main():
p1_cards, p2_cards = get_input('input.txt')
round_ = 1
while p1_cards and p2_cards:
play_round(p1_cards, p2_cards, round_)
round_ += 1
print("== Post-game results ==")
print(f"Player 1's deck: {p1_cards}")
print(f"Player 2's deck: {p2_cards}")
cards = p1_cards if p1_cards else p2_cards
score = calculate_score(cards)
print(f"\nThe final score is: {score}")
main() # The final score is: 33772 (correct)
| def get_input(file):
with open(file, 'rt', encoding='utf8') as f:
lines = [line.strip() for line in f]
p1_cars = get_player_cards(lines, 1)
p2_cars = get_player_cards(lines, 2)
return (p1_cars, p2_cars)
def get_player_cards(lines, player):
start = lines.index(f'Player {player}:') + 1
end = lines.index('')
if end < start:
end = len(lines)
cards = lines[start:end]
cards = list(map(lambda x: int(x), cards))
return cards
def play_round(p1_cards, p2_cards, round_):
print(f'-- Round {round_} --')
print(f"Player 1's deck: {p1_cards}")
print(f"Player 2's deck: {p2_cards}")
p1_card = p1_cards.pop(0)
print(f'Player 1 plays: {p1_card}')
p2_card = p2_cards.pop(0)
print(f'Player 2 plays: {p2_card}')
if p1_card > p2_card:
print('Player 1 wins the round!\n')
p1_cards.append(p1_card)
p1_cards.append(p2_card)
else:
print('Player 2 wins the round!\n')
p2_cards.append(p2_card)
p2_cards.append(p1_card)
def calculate_score(cards):
score = 0
for (i, v) in enumerate(cards):
score += v * (len(cards) - i)
return score
def main():
(p1_cards, p2_cards) = get_input('input.txt')
round_ = 1
while p1_cards and p2_cards:
play_round(p1_cards, p2_cards, round_)
round_ += 1
print('== Post-game results ==')
print(f"Player 1's deck: {p1_cards}")
print(f"Player 2's deck: {p2_cards}")
cards = p1_cards if p1_cards else p2_cards
score = calculate_score(cards)
print(f'\nThe final score is: {score}')
main() |
__all__ = [
"int_to_bytes",
"bytes_to_int",
"bytes_to_hex",
"hex_to_bytes"
]
def bytes_to_hex(src: bytes, with0x: bool = True, max_length: int = None) -> str:
if max_length is not None:
assert len(src) <= max_length, f"input bytes length is too long ({len(src)} > {max_length})"
res = src.hex()
if max_length is not None:
res = res.zfill(max_length)
if with0x:
res = "0x" + res
return res
def hex_to_bytes(src: str, length: int = None) -> bytes:
if src.startswith("0x"):
src = src[2:]
if length is not None:
src = src.lstrip("0")
assert len(src) <= length, f"input length is too long ({len(src)} > {length})"
if len(src) < length:
src = src.zfill(length)
return bytes.fromhex(src)
def int_to_bytes(x: int) -> bytes:
length = (x.bit_length() + 7) // 8
return x.to_bytes(length, "big")
def bytes_to_int(bs: bytes) -> int:
return int.from_bytes(bs, "big")
| __all__ = ['int_to_bytes', 'bytes_to_int', 'bytes_to_hex', 'hex_to_bytes']
def bytes_to_hex(src: bytes, with0x: bool=True, max_length: int=None) -> str:
if max_length is not None:
assert len(src) <= max_length, f'input bytes length is too long ({len(src)} > {max_length})'
res = src.hex()
if max_length is not None:
res = res.zfill(max_length)
if with0x:
res = '0x' + res
return res
def hex_to_bytes(src: str, length: int=None) -> bytes:
if src.startswith('0x'):
src = src[2:]
if length is not None:
src = src.lstrip('0')
assert len(src) <= length, f'input length is too long ({len(src)} > {length})'
if len(src) < length:
src = src.zfill(length)
return bytes.fromhex(src)
def int_to_bytes(x: int) -> bytes:
length = (x.bit_length() + 7) // 8
return x.to_bytes(length, 'big')
def bytes_to_int(bs: bytes) -> int:
return int.from_bytes(bs, 'big') |
class Solution:
def longestPalindrome(self, s: str) -> str:
lst = []
for ch in s:
lst.append('#')
lst.append(ch)
lst.append('#')
S = ''.join(lst)
def helper(S):
mx = 0
n = len(S)
P = [0] * n
c = 0
r = 0
ans = ""
for i, ch in enumerate(S):
mirror = 2 * c - i
if i < r:
P[i] = min(P[mirror], r - i)
lo = i - (P[i] + 1)
hi = i + (P[i] + 1)
while lo >= 0 and hi < n and S[lo] == S[hi]:
lo -= 1
hi += 1
P[i] += 1
if i + P[i] > r:
r = i + P[i]
c = i
if P[i] > mx:
mx = P[i]
ans = S[i - P[i]:i + P[i] + 1]
return ans
return ''.join(ch for ch in helper(S) if ch != '#')
| class Solution:
def longest_palindrome(self, s: str) -> str:
lst = []
for ch in s:
lst.append('#')
lst.append(ch)
lst.append('#')
s = ''.join(lst)
def helper(S):
mx = 0
n = len(S)
p = [0] * n
c = 0
r = 0
ans = ''
for (i, ch) in enumerate(S):
mirror = 2 * c - i
if i < r:
P[i] = min(P[mirror], r - i)
lo = i - (P[i] + 1)
hi = i + (P[i] + 1)
while lo >= 0 and hi < n and (S[lo] == S[hi]):
lo -= 1
hi += 1
P[i] += 1
if i + P[i] > r:
r = i + P[i]
c = i
if P[i] > mx:
mx = P[i]
ans = S[i - P[i]:i + P[i] + 1]
return ans
return ''.join((ch for ch in helper(S) if ch != '#')) |
LOG_DIR = "/tmp/mylogdir"
def write_message(filename, message):
try:
path = os.path.join(LOG_DIR, filename)
with open(path, 'a') as writer:
writer.write(message)
except OSError as error:
print('Unable to write log message to {}: {}'.format(path, error))
| log_dir = '/tmp/mylogdir'
def write_message(filename, message):
try:
path = os.path.join(LOG_DIR, filename)
with open(path, 'a') as writer:
writer.write(message)
except OSError as error:
print('Unable to write log message to {}: {}'.format(path, error)) |
#!/usr/bin/env python3
n1 = int(input("Enter 1st subject degree: "))
n2 = int(input("Enter 2nd subject degree: "))
n3 = int(input("Enter 3rd subject degree: "))
if n1 >= 50 and n2 >= 50 and n3 >= 50:
print("Pass")
else:
print("Fail")
| n1 = int(input('Enter 1st subject degree: '))
n2 = int(input('Enter 2nd subject degree: '))
n3 = int(input('Enter 3rd subject degree: '))
if n1 >= 50 and n2 >= 50 and (n3 >= 50):
print('Pass')
else:
print('Fail') |
# Python3
def bishopAndPawn(bishop, pawn):
getPos = lambda s: ('abcdefgh'.index(s[0]), '12345678'.index(s[1]))
bishopPos = getPos(bishop)
pawnPos = getPos(pawn)
return abs(bishopPos[0] - pawnPos[0]) == abs(bishopPos[1] - pawnPos[1])
| def bishop_and_pawn(bishop, pawn):
get_pos = lambda s: ('abcdefgh'.index(s[0]), '12345678'.index(s[1]))
bishop_pos = get_pos(bishop)
pawn_pos = get_pos(pawn)
return abs(bishopPos[0] - pawnPos[0]) == abs(bishopPos[1] - pawnPos[1]) |
class Solution:
# @param A : integer
# @param B : integer
# @return an integer
def gcd(self,A, B):
if(B==0):
return A
return self.gcd(B,A%B)
| class Solution:
def gcd(self, A, B):
if B == 0:
return A
return self.gcd(B, A % B) |
class Solution:
# @param A : list of strings
# @return a strings
def longestCommonPrefix(self, A):
A.sort()
minLen = min(len(A[0]), len(A[len(A) - 1]))
prefix = ''
for i in range(minLen):
if A[0][i] == A[len(A) - 1][i]:
prefix += A[0][i]
else:
break
return str(prefix)
print(Solution().longestCommonPrefix(A=["abcdefgh", "aefghijk", "abcefgh"]))
| class Solution:
def longest_common_prefix(self, A):
A.sort()
min_len = min(len(A[0]), len(A[len(A) - 1]))
prefix = ''
for i in range(minLen):
if A[0][i] == A[len(A) - 1][i]:
prefix += A[0][i]
else:
break
return str(prefix)
print(solution().longestCommonPrefix(A=['abcdefgh', 'aefghijk', 'abcefgh'])) |
k = int(input())
q = input()
cut = [0]
topset = set([q[0]])
for i in range(1, len(q)):
if len(cut) == k:
break
if q[i] not in topset:
cut.append(i)
topset.add(q[i])
if len(cut) < k:
print('NO')
else:
print('YES')
for i in range(k-1):
print(q[cut[i]:cut[i+1]])
print(q[cut[-1]:])
| k = int(input())
q = input()
cut = [0]
topset = set([q[0]])
for i in range(1, len(q)):
if len(cut) == k:
break
if q[i] not in topset:
cut.append(i)
topset.add(q[i])
if len(cut) < k:
print('NO')
else:
print('YES')
for i in range(k - 1):
print(q[cut[i]:cut[i + 1]])
print(q[cut[-1]:]) |
def new():
return {}
def to_map(raw_metadata):
return {tuple(md['breadcrumb']): md['metadata'] for md in raw_metadata}
def to_list(compiled_metadata):
return [{'breadcrumb': k, 'metadata': v} for k, v in compiled_metadata.items()]
def delete(compiled_metadata, breadcrumb, k):
del compiled_metadata[breadcrumb][k]
def write(compiled_metadata, breadcrumb, k, val):
if val is None:
raise Exception()
if breadcrumb in compiled_metadata:
compiled_metadata.get(breadcrumb).update({k: val})
else:
compiled_metadata[breadcrumb] = {k: val}
return compiled_metadata
def get(compiled_metadata, breadcrumb, k):
return compiled_metadata.get(breadcrumb, {}).get(k)
| def new():
return {}
def to_map(raw_metadata):
return {tuple(md['breadcrumb']): md['metadata'] for md in raw_metadata}
def to_list(compiled_metadata):
return [{'breadcrumb': k, 'metadata': v} for (k, v) in compiled_metadata.items()]
def delete(compiled_metadata, breadcrumb, k):
del compiled_metadata[breadcrumb][k]
def write(compiled_metadata, breadcrumb, k, val):
if val is None:
raise exception()
if breadcrumb in compiled_metadata:
compiled_metadata.get(breadcrumb).update({k: val})
else:
compiled_metadata[breadcrumb] = {k: val}
return compiled_metadata
def get(compiled_metadata, breadcrumb, k):
return compiled_metadata.get(breadcrumb, {}).get(k) |
batch_sizes = [4, 16, 128]
def get_iterations(starting_size, batch_size, compute_budget):
compute_budget_without_starting_size = compute_budget - starting_size
iterations_without_start = compute_budget_without_starting_size // batch_size
if (iterations_without_start) == 0:
raise Exception(f"Compute budget is not compatible with batch_size {batch_size} and starting_size {starting_size}")
return iterations_without_start
number_of_reruns = 5
generators = ['monte-carlo', 'sobol']
def make_prefix_main(*, batch_size,
starting_size,
rerun,
generator):
return '{generator}_{batch_size}_{starting_size}_{rerun}'.format(
batch_size=batch_size, starting_size=starting_size,
rerun=rerun,
generator=generator)
def make_prefix_competitor(*, batch_size,
starting_size,
rerun,
iteration,
generator):
return 'competitor_{generator}_{batch_size}_{starting_size}_{rerun}_{iteration}'.format(
batch_size=batch_size, starting_size=starting_size,
rerun=rerun,
iteration=iteration,
generator=generator)
def get_objective_filename(*, batch_size,
starting_size,
rerun,
iteration,
generator):
return "{}objective_{}.txt".format(make_prefix_main(batch_size=batch_size,
generator=generator,
starting_size=starting_size,
rerun=rerun),
iteration)
def get_competitor_objective_filename(*, batch_size,
starting_size,
rerun,
iteration,
pass_number,
generator):
return "{}objective_{}.txt".format(make_prefix_competitor(batch_size=batch_size,
starting_size=starting_size,
rerun=rerun,
generator=generator,
iteration=iteration),
pass_number)
def make_starting_sizes(batch_size, compute_budget):
starting_sizes = [batch_size]
while 2 * batch_size < compute_budget:
starting_sizes.append(2 * batch_size)
batch_size = 2 * batch_size
return starting_sizes
| batch_sizes = [4, 16, 128]
def get_iterations(starting_size, batch_size, compute_budget):
compute_budget_without_starting_size = compute_budget - starting_size
iterations_without_start = compute_budget_without_starting_size // batch_size
if iterations_without_start == 0:
raise exception(f'Compute budget is not compatible with batch_size {batch_size} and starting_size {starting_size}')
return iterations_without_start
number_of_reruns = 5
generators = ['monte-carlo', 'sobol']
def make_prefix_main(*, batch_size, starting_size, rerun, generator):
return '{generator}_{batch_size}_{starting_size}_{rerun}'.format(batch_size=batch_size, starting_size=starting_size, rerun=rerun, generator=generator)
def make_prefix_competitor(*, batch_size, starting_size, rerun, iteration, generator):
return 'competitor_{generator}_{batch_size}_{starting_size}_{rerun}_{iteration}'.format(batch_size=batch_size, starting_size=starting_size, rerun=rerun, iteration=iteration, generator=generator)
def get_objective_filename(*, batch_size, starting_size, rerun, iteration, generator):
return '{}objective_{}.txt'.format(make_prefix_main(batch_size=batch_size, generator=generator, starting_size=starting_size, rerun=rerun), iteration)
def get_competitor_objective_filename(*, batch_size, starting_size, rerun, iteration, pass_number, generator):
return '{}objective_{}.txt'.format(make_prefix_competitor(batch_size=batch_size, starting_size=starting_size, rerun=rerun, generator=generator, iteration=iteration), pass_number)
def make_starting_sizes(batch_size, compute_budget):
starting_sizes = [batch_size]
while 2 * batch_size < compute_budget:
starting_sizes.append(2 * batch_size)
batch_size = 2 * batch_size
return starting_sizes |
text = input("Text: ")
letters = 0
for letter in text:
if letter.isalpha():
letters += 1
# Assign words to 1 if user actually typed a word at the start but not a space
words = 1 if (len(text) > 0 and text[0] != ' ') else 0
print(words)
print(letters)
| text = input('Text: ')
letters = 0
for letter in text:
if letter.isalpha():
letters += 1
words = 1 if len(text) > 0 and text[0] != ' ' else 0
print(words)
print(letters) |
class MonteCarlo(object):
def __init__(self, board, **kwargs):
# Takes an instance of a Board and optionally some keyword
# arguments. Initializes the list of game states and the
# statistics tables.
milliseconds = kwargs.get('calculation_ms', 10)
self.calculation_time_ms = datatime.timedelta(milliseconds = milliseconds)
# check that this amount of moves
self.max_moves = kwargs.get('max_moves', 10)
self.board = board
self.states = []
def update(self, state):
# Takes a game state, and appends it to the history.
self.states.append(state)
def get_play(self):
# Causes the AI to calculate the best move from the
# current game state and return it.
begin = datetime.datetime.utcnow()
while datetime.datetime.utcnow() - begin < self.calculation_time_ms:
self.run_simulation()
def run_simulation(self):
# Plays out a "random" game from the current position,
# then updates the statistics tables with the result.
states_copy = self.states[:]
# get last state
current_state = states_copy[-1]
for _ in range(self.max_moves):
legal_plays = self.board.legal_plays(states_copy)
play = choice(legal_plays)
new_state = self.board.next_state(state, play)
states_copy.append(new_state)
current_state = new_state
winner = self.board.winner(states_copy)
if winner:
break | class Montecarlo(object):
def __init__(self, board, **kwargs):
milliseconds = kwargs.get('calculation_ms', 10)
self.calculation_time_ms = datatime.timedelta(milliseconds=milliseconds)
self.max_moves = kwargs.get('max_moves', 10)
self.board = board
self.states = []
def update(self, state):
self.states.append(state)
def get_play(self):
begin = datetime.datetime.utcnow()
while datetime.datetime.utcnow() - begin < self.calculation_time_ms:
self.run_simulation()
def run_simulation(self):
states_copy = self.states[:]
current_state = states_copy[-1]
for _ in range(self.max_moves):
legal_plays = self.board.legal_plays(states_copy)
play = choice(legal_plays)
new_state = self.board.next_state(state, play)
states_copy.append(new_state)
current_state = new_state
winner = self.board.winner(states_copy)
if winner:
break |
print("Welcome to Python")
print("Welcome to Python")
print("Welcome to Python")
print("Welcome to Python")
print("Welcome to Python")
| print('Welcome to Python')
print('Welcome to Python')
print('Welcome to Python')
print('Welcome to Python')
print('Welcome to Python') |
def test_win10(helpers):
caps = {}
caps['browserName'] = 'internet explorer'
caps['platform'] = 'Windows 10'
caps['version'] = '11'
driver = helpers.start_driver(caps)
helpers.validate_google(driver)
def test_late_win7(helpers):
caps = {}
caps['browserName'] = 'internet explorer'
caps['platform'] = 'Windows 7'
caps['version'] = '11'
driver = helpers.start_driver(caps)
helpers.validate_google(driver)
def test_early_win7(helpers):
caps = {}
caps['browserName'] = 'internet explorer'
caps['platform'] = 'Windows 7'
caps['version'] = '9'
driver = helpers.start_driver(caps)
helpers.validate_google(driver)
| def test_win10(helpers):
caps = {}
caps['browserName'] = 'internet explorer'
caps['platform'] = 'Windows 10'
caps['version'] = '11'
driver = helpers.start_driver(caps)
helpers.validate_google(driver)
def test_late_win7(helpers):
caps = {}
caps['browserName'] = 'internet explorer'
caps['platform'] = 'Windows 7'
caps['version'] = '11'
driver = helpers.start_driver(caps)
helpers.validate_google(driver)
def test_early_win7(helpers):
caps = {}
caps['browserName'] = 'internet explorer'
caps['platform'] = 'Windows 7'
caps['version'] = '9'
driver = helpers.start_driver(caps)
helpers.validate_google(driver) |
#The provided code stub reads two integers from STDIN, a and b. Add code to print three lines where:
#1.The first line contains the sum of the two numbers.
#2.The second line contains the difference of the two numbers (first - second).
#3.The third line contains the product of the two numbers.
#code
a=int(raw_input())
b=int(raw_input())
print(a+b)
print(a-b)
print(a*b)
| a = int(raw_input())
b = int(raw_input())
print(a + b)
print(a - b)
print(a * b) |
def main():
f = [line.rstrip("\n") for line in open("Data.txt")]
map_ = [list(line) for line in f]
info = []
for i in range(len(map_)):
for j in range(len(map_[0])):
if map_[i][j] == "v":
info.append([i, j, "down", "left"])
map_[i][j] = "|"
elif map_[i][j] == ">":
info.append([i, j, "right", "left"])
map_[i][j] = "-"
elif map_[i][j] == "^":
info.append([i, j, "up", "left"])
map_[i][j] = "|"
elif map_[i][j] == "<":
info.append([i, j, "left", "left"])
map_[i][j] = "-"
done = False
while not done:
info.sort()
for i in info:
y, x = i[0], i[1]
if i[2] == "down":
if map_[y + 1][x] == "/":
i[2] = "left"
elif map_[y + 1][x] == "\\":
i[2] = "right"
elif map_[y + 1][x] == "+":
if i[3] == "left":
i[2] = "right"
i[3] = "straight"
elif i[3] == "straight":
i[2] = "down"
i[3] = "right"
elif i[3] == "right":
i[2] = "left"
i[3] = "left"
positions = [info_[0:2] for info_ in info]
i[0] += 1
if [y + 1, x] in positions:
print(x, y + 1)
done = True
break
elif i[2] == "right":
if map_[y][x + 1] == "/":
i[2] = "up"
elif map_[y][x + 1] == "\\":
i[2] = "down"
elif map_[y][x + 1] == "+":
if i[3] == "left":
i[2] = "up"
i[3] = "straight"
elif i[3] == "straight":
i[2] = "right"
i[3] = "right"
elif i[3] == "right":
i[2] = "down"
i[3] = "left"
positions = [info_[0:2] for info_ in info]
i[1] += 1
if [y, x + 1] in positions:
print(x + 1, y)
done = True
break
elif i[2] == "up":
if map_[y - 1][x] == "/":
i[2] = "right"
elif map_[y - 1][x] == "\\":
i[2] = "left"
elif map_[y - 1][x] == "+":
if i[3] == "left":
i[2] = "left"
i[3] = "straight"
elif i[3] == "straight":
i[2] = "up"
i[3] = "right"
elif i[3] == "right":
i[2] = "right"
i[3] = "left"
positions = [info_[0:2] for info_ in info]
i[0] -= 1
if [y - 1, x] in positions:
print(x, y - 1)
done = True
break
elif i[2] == "left":
if map_[y][x - 1] == "/":
i[2] = "down"
elif map_[y][x - 1] == "\\":
i[2] = "up"
elif map_[y][x - 1] == "+":
if i[3] == "left":
i[2] = "down"
i[3] = "straight"
elif i[3] == "straight":
i[2] = "left"
i[3] = "right"
elif i[3] == "right":
i[2] = "up"
i[3] = "left"
positions = [info_[0:2] for info_ in info]
i[1] -= 1
if [y, x - 1] in positions:
print(x - 1, y)
done = True
break
if __name__ == "__main__":
main()
| def main():
f = [line.rstrip('\n') for line in open('Data.txt')]
map_ = [list(line) for line in f]
info = []
for i in range(len(map_)):
for j in range(len(map_[0])):
if map_[i][j] == 'v':
info.append([i, j, 'down', 'left'])
map_[i][j] = '|'
elif map_[i][j] == '>':
info.append([i, j, 'right', 'left'])
map_[i][j] = '-'
elif map_[i][j] == '^':
info.append([i, j, 'up', 'left'])
map_[i][j] = '|'
elif map_[i][j] == '<':
info.append([i, j, 'left', 'left'])
map_[i][j] = '-'
done = False
while not done:
info.sort()
for i in info:
(y, x) = (i[0], i[1])
if i[2] == 'down':
if map_[y + 1][x] == '/':
i[2] = 'left'
elif map_[y + 1][x] == '\\':
i[2] = 'right'
elif map_[y + 1][x] == '+':
if i[3] == 'left':
i[2] = 'right'
i[3] = 'straight'
elif i[3] == 'straight':
i[2] = 'down'
i[3] = 'right'
elif i[3] == 'right':
i[2] = 'left'
i[3] = 'left'
positions = [info_[0:2] for info_ in info]
i[0] += 1
if [y + 1, x] in positions:
print(x, y + 1)
done = True
break
elif i[2] == 'right':
if map_[y][x + 1] == '/':
i[2] = 'up'
elif map_[y][x + 1] == '\\':
i[2] = 'down'
elif map_[y][x + 1] == '+':
if i[3] == 'left':
i[2] = 'up'
i[3] = 'straight'
elif i[3] == 'straight':
i[2] = 'right'
i[3] = 'right'
elif i[3] == 'right':
i[2] = 'down'
i[3] = 'left'
positions = [info_[0:2] for info_ in info]
i[1] += 1
if [y, x + 1] in positions:
print(x + 1, y)
done = True
break
elif i[2] == 'up':
if map_[y - 1][x] == '/':
i[2] = 'right'
elif map_[y - 1][x] == '\\':
i[2] = 'left'
elif map_[y - 1][x] == '+':
if i[3] == 'left':
i[2] = 'left'
i[3] = 'straight'
elif i[3] == 'straight':
i[2] = 'up'
i[3] = 'right'
elif i[3] == 'right':
i[2] = 'right'
i[3] = 'left'
positions = [info_[0:2] for info_ in info]
i[0] -= 1
if [y - 1, x] in positions:
print(x, y - 1)
done = True
break
elif i[2] == 'left':
if map_[y][x - 1] == '/':
i[2] = 'down'
elif map_[y][x - 1] == '\\':
i[2] = 'up'
elif map_[y][x - 1] == '+':
if i[3] == 'left':
i[2] = 'down'
i[3] = 'straight'
elif i[3] == 'straight':
i[2] = 'left'
i[3] = 'right'
elif i[3] == 'right':
i[2] = 'up'
i[3] = 'left'
positions = [info_[0:2] for info_ in info]
i[1] -= 1
if [y, x - 1] in positions:
print(x - 1, y)
done = True
break
if __name__ == '__main__':
main() |
def escape_librtmp(value):
if isinstance(value, bool):
value = "1" if value else "0"
if isinstance(value, int):
value = str(value)
# librtmp expects some characters to be escaped
value = value.replace("\\", "\\5c")
value = value.replace(" ", "\\20")
value = value.replace('"', "\\22")
return value
def stream_to_url(stream):
stream_type = type(stream).shortname()
if stream_type in ("hls", "http"):
url = stream.url
elif stream_type == "rtmp":
params = [stream.params.pop("rtmp", "")]
stream_params = dict(stream.params)
if "swfVfy" in stream.params:
stream_params["swfUrl"] = stream.params["swfVfy"]
stream_params["swfVfy"] = True
if "swfhash" in stream.params:
stream_params["swfVfy"] = True
stream_params.pop("swfhash", None)
stream_params.pop("swfsize", None)
for key, value in stream_params.items():
if isinstance(value, list):
for svalue in value:
params.append("{0}={1}".format(key, escape_librtmp(svalue)))
else:
params.append("{0}={1}".format(key, escape_librtmp(value)))
url = " ".join(params)
else:
url = None
return url
| def escape_librtmp(value):
if isinstance(value, bool):
value = '1' if value else '0'
if isinstance(value, int):
value = str(value)
value = value.replace('\\', '\\5c')
value = value.replace(' ', '\\20')
value = value.replace('"', '\\22')
return value
def stream_to_url(stream):
stream_type = type(stream).shortname()
if stream_type in ('hls', 'http'):
url = stream.url
elif stream_type == 'rtmp':
params = [stream.params.pop('rtmp', '')]
stream_params = dict(stream.params)
if 'swfVfy' in stream.params:
stream_params['swfUrl'] = stream.params['swfVfy']
stream_params['swfVfy'] = True
if 'swfhash' in stream.params:
stream_params['swfVfy'] = True
stream_params.pop('swfhash', None)
stream_params.pop('swfsize', None)
for (key, value) in stream_params.items():
if isinstance(value, list):
for svalue in value:
params.append('{0}={1}'.format(key, escape_librtmp(svalue)))
else:
params.append('{0}={1}'.format(key, escape_librtmp(value)))
url = ' '.join(params)
else:
url = None
return url |
coordinates_E0E1E1 = ((125, 114),
(126, 93), (126, 114), (126, 130), (126, 132), (127, 92), (127, 93), (127, 104), (127, 114), (127, 115), (127, 130), (128, 91), (128, 92), (128, 102), (128, 104), (128, 114), (128, 117), (128, 119), (128, 131), (128, 132), (129, 91), (129, 101), (129, 114), (129, 119), (129, 131), (129, 132), (130, 86), (130, 87), (130, 88), (130, 91), (130, 114), (130, 116), (130, 118), (130, 131), (130, 133), (131, 82), (131, 84), (131, 85), (131, 90), (131, 115), (131, 118), (131, 131), (132, 87), (132, 90), (132, 116), (132, 118), (132, 132), (133, 89), (133, 91), (133, 117), (133, 119), (133, 130), (133, 131), (134, 90), (134, 91), (134, 118), (134, 119), (134, 130), (135, 90), (135, 91), (135, 101), (135, 106), (135, 108), (135, 119), (135, 121), (135, 122), (135, 125), (135, 129), (135, 130), (135, 138), (136, 91), (136, 92), (136, 102),
(136, 104), (136, 105), (136, 109), (136, 119), (136, 126), (136, 129), (136, 138), (137, 91), (137, 92), (137, 104), (137, 107), (137, 108), (137, 120), (137, 122), (137, 123), (137, 124), (137, 125), (137, 128), (137, 136), (137, 137), (138, 90), (138, 92), (138, 106), (138, 108), (138, 109), (138, 112), (138, 120), (138, 122), (138, 123), (138, 124), (138, 125), (138, 127), (138, 135), (138, 136), (139, 90), (139, 93), (139, 107), (139, 109), (139, 110), (139, 113), (139, 120), (139, 122), (139, 123), (139, 124), (139, 125), (139, 127), (139, 134), (139, 135), (140, 89), (140, 91), (140, 93), (140, 107), (140, 114), (140, 115), (140, 118), (140, 119), (140, 120), (140, 121), (140, 122), (140, 123), (140, 124), (140, 125), (140, 127), (140, 133), (140, 135), (141, 88), (141, 94), (141, 108), (141, 110), (141, 111), (141, 112), (141, 116),
(141, 117), (141, 120), (141, 121), (141, 122), (141, 123), (141, 124), (141, 125), (141, 126), (141, 128), (141, 132), (141, 135), (142, 86), (142, 87), (142, 88), (142, 89), (142, 90), (142, 91), (142, 92), (142, 93), (142, 95), (142, 108), (142, 114), (142, 118), (142, 119), (142, 120), (142, 121), (142, 122), (142, 123), (142, 124), (142, 125), (142, 126), (142, 127), (142, 130), (142, 131), (142, 133), (142, 135), (143, 85), (143, 94), (143, 96), (143, 115), (143, 117), (143, 118), (143, 119), (143, 120), (143, 121), (143, 122), (143, 123), (143, 124), (143, 125), (143, 126), (143, 127), (143, 128), (143, 132), (143, 133), (143, 134), (143, 136), (144, 97), (144, 99), (144, 101), (144, 115), (144, 117), (144, 118), (144, 119), (144, 120), (144, 121), (144, 122), (144, 123), (144, 124), (144, 125), (144, 126), (144, 127), (144, 128),
(144, 129), (144, 130), (144, 131), (144, 132), (144, 133), (144, 134), (144, 135), (144, 138), (145, 98), (145, 100), (145, 102), (145, 114), (145, 115), (145, 116), (145, 117), (145, 118), (145, 119), (145, 120), (145, 121), (145, 122), (145, 123), (145, 124), (145, 125), (145, 126), (145, 127), (145, 128), (145, 129), (145, 130), (145, 131), (145, 132), (145, 133), (145, 134), (145, 136), (146, 114), (146, 116), (146, 117), (146, 118), (146, 119), (146, 120), (146, 121), (146, 122), (146, 123), (146, 124), (146, 125), (146, 126), (146, 127), (146, 128), (146, 129), (146, 130), (146, 131), (146, 132), (146, 133), (146, 135), (147, 114), (147, 116), (147, 117), (147, 118), (147, 119), (147, 120), (147, 121), (147, 122), (147, 123), (147, 124), (147, 125), (147, 126), (147, 127), (147, 128), (147, 129), (147, 130), (147, 131), (147, 132), (147, 134),
(148, 114), (148, 116), (148, 117), (148, 118), (148, 119), (148, 120), (148, 121), (148, 122), (148, 123), (148, 124), (148, 125), (148, 126), (148, 127), (148, 128), (148, 129), (148, 130), (148, 131), (148, 132), (148, 134), (149, 115), (149, 117), (149, 118), (149, 119), (149, 120), (149, 121), (149, 122), (149, 123), (149, 124), (149, 125), (149, 126), (149, 127), (149, 128), (149, 129), (149, 130), (149, 131), (149, 132), (149, 134), (150, 116), (150, 118), (150, 119), (150, 120), (150, 121), (150, 122), (150, 123), (150, 124), (150, 125), (150, 126), (150, 127), (150, 128), (150, 129), (150, 130), (150, 131), (150, 132), (150, 134), (151, 95), (151, 116), (151, 117), (151, 118), (151, 119), (151, 120), (151, 121), (151, 122), (151, 123), (151, 124), (151, 125), (151, 126), (151, 127), (151, 128), (151, 129), (151, 130), (151, 131), (151, 132),
(151, 133), (151, 134), (151, 135), (151, 136), (151, 137), (151, 138), (151, 140), (152, 95), (152, 96), (152, 117), (152, 119), (152, 120), (152, 121), (152, 122), (152, 123), (152, 124), (152, 125), (152, 126), (152, 127), (152, 128), (152, 129), (152, 130), (152, 131), (152, 132), (152, 133), (152, 134), (152, 135), (152, 138), (152, 140), (153, 96), (153, 99), (153, 117), (153, 119), (153, 120), (153, 121), (153, 122), (153, 123), (153, 124), (153, 125), (153, 126), (153, 127), (153, 128), (153, 129), (153, 130), (153, 131), (153, 132), (153, 134), (154, 97), (154, 100), (154, 101), (154, 105), (154, 108), (154, 116), (154, 118), (154, 119), (154, 120), (154, 121), (154, 122), (154, 123), (154, 124), (154, 125), (154, 126), (154, 127), (154, 128), (154, 129), (154, 130), (154, 131), (154, 132), (154, 134), (155, 99), (155, 104), (155, 109),
(155, 114), (155, 117), (155, 118), (155, 119), (155, 120), (155, 121), (155, 122), (155, 123), (155, 124), (155, 125), (155, 126), (155, 127), (155, 128), (155, 129), (155, 130), (155, 131), (155, 132), (155, 134), (156, 98), (156, 105), (156, 107), (156, 108), (156, 111), (156, 112), (156, 113), (156, 122), (156, 123), (156, 124), (156, 125), (156, 126), (156, 127), (156, 128), (156, 129), (156, 130), (156, 131), (156, 134), (157, 105), (157, 107), (157, 108), (157, 109), (157, 115), (157, 116), (157, 117), (157, 118), (157, 119), (157, 120), (157, 123), (157, 124), (157, 125), (157, 126), (157, 127), (157, 128), (157, 129), (157, 132), (157, 133), (157, 135), (158, 105), (158, 106), (158, 107), (158, 108), (158, 109), (158, 110), (158, 113), (158, 122), (158, 123), (158, 124), (158, 125), (158, 126), (158, 127), (158, 128), (158, 130), (158, 131),
(158, 136), (159, 106), (159, 108), (159, 109), (159, 111), (159, 123), (159, 125), (159, 126), (159, 127), (159, 129), (160, 106), (160, 108), (160, 110), (160, 123), (160, 125), (160, 126), (160, 128), (161, 106), (161, 109), (161, 123), (161, 125), (161, 127), (162, 107), (162, 109), (162, 123), (162, 125), (162, 127), (163, 107), (163, 109), (163, 122), (163, 124), (163, 126), (163, 137), (164, 107), (164, 122), (164, 124), (164, 126), (164, 137), (165, 108), (165, 122), (165, 125), (166, 122), (166, 125), (167, 122), (167, 124), (168, 122), (168, 123), )
coordinates_E1E1E1 = ((77, 124),
(77, 125), (78, 123), (78, 126), (79, 110), (79, 126), (80, 104), (80, 106), (80, 111), (80, 124), (80, 127), (80, 139), (81, 104), (81, 107), (81, 110), (81, 112), (81, 125), (81, 127), (81, 139), (82, 104), (82, 106), (82, 109), (82, 110), (82, 111), (82, 113), (82, 125), (82, 127), (82, 139), (83, 103), (83, 105), (83, 106), (83, 107), (83, 108), (83, 109), (83, 110), (83, 111), (83, 112), (83, 114), (83, 127), (83, 139), (84, 103), (84, 105), (84, 106), (84, 107), (84, 108), (84, 109), (84, 110), (84, 111), (84, 112), (84, 113), (84, 126), (84, 127), (84, 139), (85, 103), (85, 105), (85, 106), (85, 107), (85, 108), (85, 109), (85, 110), (85, 111), (85, 112), (85, 113), (85, 115), (85, 126), (85, 127), (85, 139), (85, 140), (86, 103), (86, 105), (86, 110), (86, 111), (86, 112),
(86, 113), (86, 114), (86, 116), (86, 126), (86, 127), (86, 139), (86, 141), (87, 103), (87, 107), (87, 108), (87, 109), (87, 110), (87, 111), (87, 112), (87, 113), (87, 114), (87, 115), (87, 117), (87, 125), (87, 128), (87, 139), (87, 141), (88, 102), (88, 105), (88, 110), (88, 112), (88, 113), (88, 114), (88, 115), (88, 116), (88, 118), (88, 124), (88, 126), (88, 128), (88, 139), (88, 140), (89, 102), (89, 104), (89, 110), (89, 113), (89, 114), (89, 115), (89, 116), (89, 117), (89, 120), (89, 121), (89, 122), (89, 125), (89, 126), (89, 127), (89, 129), (89, 139), (90, 102), (90, 111), (90, 114), (90, 115), (90, 116), (90, 124), (90, 125), (90, 126), (90, 127), (90, 128), (90, 130), (90, 138), (90, 139), (91, 101), (91, 113), (91, 117), (91, 118), (91, 120), (91, 121), (91, 122),
(91, 123), (91, 124), (91, 125), (91, 126), (91, 127), (91, 128), (91, 129), (91, 131), (91, 132), (91, 136), (91, 138), (92, 100), (92, 114), (92, 119), (92, 121), (92, 122), (92, 123), (92, 124), (92, 125), (92, 126), (92, 127), (92, 128), (92, 129), (92, 130), (92, 133), (92, 134), (92, 135), (92, 138), (93, 99), (93, 120), (93, 122), (93, 123), (93, 124), (93, 125), (93, 126), (93, 127), (93, 128), (93, 129), (93, 130), (93, 131), (93, 132), (93, 133), (93, 135), (93, 139), (94, 98), (94, 121), (94, 123), (94, 124), (94, 125), (94, 126), (94, 127), (94, 128), (94, 129), (94, 130), (94, 131), (94, 132), (94, 133), (94, 134), (94, 137), (94, 141), (95, 94), (95, 97), (95, 121), (95, 123), (95, 124), (95, 125), (95, 126), (95, 127), (95, 128), (95, 129), (95, 130), (95, 131),
(95, 132), (95, 133), (95, 135), (95, 139), (95, 141), (96, 89), (96, 121), (96, 123), (96, 124), (96, 125), (96, 126), (96, 127), (96, 128), (96, 129), (96, 130), (96, 131), (96, 132), (96, 134), (97, 107), (97, 109), (97, 110), (97, 111), (97, 113), (97, 121), (97, 123), (97, 124), (97, 125), (97, 126), (97, 127), (97, 128), (97, 129), (97, 130), (97, 131), (97, 133), (98, 106), (98, 114), (98, 120), (98, 122), (98, 123), (98, 124), (98, 125), (98, 126), (98, 127), (98, 128), (98, 129), (98, 130), (98, 131), (98, 133), (99, 105), (99, 110), (99, 111), (99, 112), (99, 113), (99, 116), (99, 120), (99, 122), (99, 123), (99, 124), (99, 125), (99, 126), (99, 127), (99, 128), (99, 129), (99, 130), (99, 131), (99, 133), (100, 104), (100, 107), (100, 108), (100, 109), (100, 112), (100, 113),
(100, 114), (100, 117), (100, 118), (100, 120), (100, 121), (100, 122), (100, 123), (100, 124), (100, 125), (100, 126), (100, 127), (100, 128), (100, 129), (100, 130), (100, 132), (101, 103), (101, 106), (101, 110), (101, 113), (101, 114), (101, 115), (101, 116), (101, 120), (101, 121), (101, 122), (101, 123), (101, 124), (101, 125), (101, 126), (101, 127), (101, 128), (101, 129), (101, 130), (101, 132), (102, 101), (102, 105), (102, 112), (102, 114), (102, 115), (102, 116), (102, 117), (102, 118), (102, 119), (102, 120), (102, 121), (102, 122), (102, 123), (102, 124), (102, 125), (102, 126), (102, 127), (102, 128), (102, 129), (102, 130), (102, 132), (103, 94), (103, 96), (103, 97), (103, 98), (103, 99), (103, 100), (103, 101), (103, 102), (103, 103), (103, 113), (103, 115), (103, 116), (103, 117), (103, 118), (103, 119), (103, 120), (103, 121),
(103, 122), (103, 123), (103, 124), (103, 125), (103, 126), (103, 127), (103, 128), (103, 132), (104, 83), (104, 94), (104, 100), (104, 113), (104, 115), (104, 116), (104, 117), (104, 118), (104, 119), (104, 120), (104, 124), (104, 125), (104, 126), (104, 127), (104, 130), (104, 132), (105, 83), (105, 94), (105, 96), (105, 98), (105, 113), (105, 115), (105, 116), (105, 117), (105, 118), (105, 119), (105, 121), (105, 122), (105, 125), (105, 126), (105, 128), (105, 132), (106, 82), (106, 84), (106, 94), (106, 97), (106, 113), (106, 116), (106, 117), (106, 120), (106, 124), (106, 127), (106, 132), (107, 82), (107, 84), (107, 94), (107, 96), (107, 114), (107, 116), (107, 119), (107, 125), (107, 127), (108, 82), (108, 84), (108, 95), (108, 116), (108, 118), (108, 125), (108, 126), (108, 133), (109, 81), (109, 85), (109, 93), (109, 94),
(109, 116), (109, 117), (109, 125), (109, 126), (109, 133), (110, 81), (110, 83), (110, 84), (110, 86), (110, 93), (110, 94), (110, 115), (110, 116), (110, 126), (110, 133), (111, 85), (111, 93), (111, 94), (111, 114), (111, 115), (111, 124), (111, 126), (112, 87), (112, 88), (112, 93), (112, 94), (112, 100), (112, 113), (112, 114), (112, 123), (112, 126), (112, 134), (113, 88), (113, 90), (113, 91), (113, 93), (113, 94), (113, 99), (113, 112), (113, 113), (113, 123), (113, 127), (113, 134), (114, 89), (114, 96), (114, 98), (114, 111), (114, 112), (114, 122), (114, 124), (114, 125), (114, 127), (114, 134), (115, 90), (115, 92), (115, 93), (115, 94), (115, 95), (115, 96), (115, 98), (115, 110), (115, 112), (115, 127), (116, 91), (116, 98), (116, 110), (116, 112), (116, 127), (117, 98), (117, 109), (117, 112), (118, 98),
(118, 109), (118, 112), (119, 108), (119, 109), )
coordinates_771286 = ((142, 125),
(143, 125), )
coordinates_781286 = ((102, 125),
(103, 126), (104, 125), )
coordinates_DCF8A4 = ((104, 152),
(105, 152), (105, 162), (108, 161), (109, 161), (110, 161), (111, 161), (112, 160), (113, 160), (114, 159), (115, 159), (116, 159), (117, 158), (118, 157), )
coordinates_DBF8A4 = ((132, 157),
(133, 157), (134, 158), (135, 158), (135, 159), (136, 159), (137, 160), (138, 160), (139, 160), (140, 160), (145, 152), (150, 162), (151, 162), )
coordinates_60CC60 = ((81, 159),
(81, 162), (82, 156), (82, 163), (83, 154), (83, 155), (83, 159), (83, 160), (83, 161), (83, 163), (84, 153), (84, 156), (84, 157), (84, 158), (84, 159), (84, 160), (84, 161), (84, 162), (84, 164), (85, 153), (85, 155), (85, 156), (85, 157), (85, 158), (85, 159), (85, 160), (85, 161), (85, 162), (85, 163), (85, 165), (86, 153), (86, 155), (86, 156), (86, 157), (86, 158), (86, 159), (86, 160), (86, 161), (86, 162), (86, 163), (86, 164), (86, 166), (87, 152), (87, 153), (87, 154), (87, 155), (87, 156), (87, 157), (87, 158), (87, 159), (87, 160), (87, 161), (87, 162), (87, 163), (87, 164), (87, 165), (87, 167), (88, 150), (88, 153), (88, 154), (88, 155), (88, 156), (88, 157), (88, 158), (88, 159), (88, 160), (88, 161), (88, 162), (88, 163), (88, 164), (88, 165), (88, 166), (88, 169),
(89, 150), (89, 152), (89, 153), (89, 154), (89, 155), (89, 156), (89, 157), (89, 158), (89, 159), (89, 160), (89, 161), (89, 162), (89, 163), (89, 164), (89, 165), (89, 166), (89, 167), (89, 170), (90, 150), (90, 152), (90, 153), (90, 154), (90, 155), (90, 156), (90, 157), (90, 158), (90, 159), (90, 160), (90, 161), (90, 162), (90, 163), (90, 164), (90, 165), (90, 166), (90, 167), (90, 168), (90, 170), (91, 150), (91, 152), (91, 153), (91, 154), (91, 155), (91, 156), (91, 157), (91, 158), (91, 159), (91, 160), (91, 161), (91, 162), (91, 163), (91, 164), (91, 165), (91, 166), (91, 167), (91, 168), (91, 170), (92, 149), (92, 151), (92, 152), (92, 153), (92, 154), (92, 155), (92, 156), (92, 157), (92, 158), (92, 159), (92, 160), (92, 161), (92, 162), (92, 163), (92, 164), (92, 165),
(92, 166), (92, 167), (92, 168), (92, 170), (93, 149), (93, 151), (93, 152), (93, 153), (93, 154), (93, 155), (93, 156), (93, 157), (93, 158), (93, 159), (93, 160), (93, 161), (93, 162), (93, 163), (93, 164), (93, 165), (93, 166), (93, 167), (93, 168), (93, 169), (93, 171), (94, 148), (94, 150), (94, 151), (94, 152), (94, 153), (94, 154), (94, 155), (94, 156), (94, 157), (94, 158), (94, 159), (94, 160), (94, 161), (94, 162), (94, 163), (94, 164), (94, 165), (94, 166), (94, 167), (94, 168), (94, 169), (94, 171), (95, 148), (95, 150), (95, 151), (95, 152), (95, 153), (95, 154), (95, 155), (95, 156), (95, 157), (95, 158), (95, 159), (95, 160), (95, 161), (95, 162), (95, 163), (95, 164), (95, 165), (95, 166), (95, 167), (95, 168), (95, 169), (95, 170), (95, 172), (96, 148), (96, 150),
(96, 151), (96, 152), (96, 153), (96, 154), (96, 155), (96, 156), (96, 157), (96, 158), (96, 159), (96, 160), (96, 161), (96, 162), (96, 163), (96, 164), (96, 165), (96, 166), (96, 167), (96, 168), (96, 169), (96, 170), (96, 172), (97, 148), (97, 150), (97, 151), (97, 152), (97, 153), (97, 154), (97, 155), (97, 156), (97, 157), (97, 158), (97, 159), (97, 160), (97, 161), (97, 162), (97, 164), (97, 165), (97, 166), (97, 167), (97, 168), (97, 169), (97, 170), (97, 171), (97, 173), (98, 147), (98, 149), (98, 150), (98, 151), (98, 152), (98, 153), (98, 154), (98, 155), (98, 156), (98, 157), (98, 158), (98, 159), (98, 160), (98, 161), (98, 162), (98, 164), (98, 165), (98, 166), (98, 167), (98, 168), (98, 169), (98, 170), (98, 171), (98, 173), (99, 147), (99, 149), (99, 150), (99, 151),
(99, 152), (99, 153), (99, 154), (99, 155), (99, 156), (99, 157), (99, 158), (99, 159), (99, 160), (99, 161), (99, 164), (99, 166), (99, 167), (99, 168), (99, 169), (99, 170), (99, 171), (99, 173), (100, 147), (100, 149), (100, 150), (100, 151), (100, 154), (100, 155), (100, 156), (100, 157), (100, 158), (100, 159), (100, 161), (100, 164), (100, 166), (100, 167), (100, 168), (100, 169), (100, 170), (100, 171), (100, 172), (100, 174), (101, 146), (101, 148), (101, 149), (101, 150), (101, 151), (101, 153), (101, 154), (101, 155), (101, 156), (101, 157), (101, 158), (101, 159), (101, 161), (101, 164), (101, 166), (101, 167), (101, 168), (101, 169), (101, 170), (101, 171), (101, 172), (101, 174), (102, 146), (102, 148), (102, 149), (102, 151), (102, 154), (102, 156), (102, 157), (102, 158), (102, 159), (102, 161), (102, 164), (102, 166),
(102, 167), (102, 168), (102, 169), (102, 170), (102, 171), (102, 172), (102, 174), (103, 146), (103, 148), (103, 149), (103, 150), (103, 154), (103, 156), (103, 157), (103, 158), (103, 159), (103, 161), (103, 164), (103, 166), (103, 167), (103, 168), (103, 169), (103, 170), (103, 171), (103, 172), (103, 174), (104, 145), (104, 147), (104, 149), (104, 150), (104, 154), (104, 156), (104, 157), (104, 158), (104, 160), (104, 164), (104, 166), (104, 167), (104, 168), (104, 169), (104, 170), (104, 171), (104, 172), (104, 174), (105, 145), (105, 147), (105, 149), (105, 154), (105, 156), (105, 157), (105, 158), (105, 160), (105, 164), (105, 166), (105, 167), (105, 168), (105, 169), (105, 170), (105, 171), (105, 172), (105, 174), (106, 145), (106, 147), (106, 149), (106, 154), (106, 156), (106, 157), (106, 158), (106, 160), (106, 164), (106, 166), (106, 167),
(106, 168), (106, 169), (106, 170), (106, 171), (106, 172), (106, 174), (107, 145), (107, 147), (107, 149), (107, 153), (107, 155), (107, 156), (107, 157), (107, 158), (107, 160), (107, 163), (107, 165), (107, 166), (107, 167), (107, 168), (107, 169), (107, 170), (107, 171), (107, 172), (107, 174), (108, 144), (108, 146), (108, 147), (108, 149), (108, 153), (108, 155), (108, 156), (108, 157), (108, 159), (108, 163), (108, 165), (108, 166), (108, 167), (108, 168), (108, 169), (108, 170), (108, 171), (108, 172), (108, 174), (109, 144), (109, 146), (109, 147), (109, 148), (109, 149), (109, 153), (109, 154), (109, 155), (109, 156), (109, 157), (109, 159), (109, 163), (109, 165), (109, 166), (109, 167), (109, 168), (109, 169), (109, 170), (109, 171), (109, 173), (110, 144), (110, 146), (110, 147), (110, 148), (110, 149), (110, 150), (110, 153), (110, 154),
(110, 155), (110, 156), (110, 157), (110, 159), (110, 163), (110, 165), (110, 166), (110, 167), (110, 168), (110, 169), (110, 170), (110, 171), (110, 173), (111, 143), (111, 145), (111, 146), (111, 147), (111, 148), (111, 149), (111, 150), (111, 152), (111, 153), (111, 154), (111, 155), (111, 156), (111, 158), (111, 163), (111, 165), (111, 166), (111, 167), (111, 168), (111, 169), (111, 170), (111, 171), (111, 173), (112, 142), (112, 144), (112, 145), (112, 146), (112, 147), (112, 148), (112, 149), (112, 150), (112, 151), (112, 152), (112, 153), (112, 154), (112, 155), (112, 156), (112, 158), (112, 163), (112, 165), (112, 166), (112, 167), (112, 168), (112, 169), (112, 170), (112, 171), (112, 173), (113, 140), (113, 143), (113, 144), (113, 145), (113, 146), (113, 147), (113, 148), (113, 149), (113, 150), (113, 151), (113, 152), (113, 153), (113, 154),
(113, 155), (113, 156), (113, 158), (113, 162), (113, 164), (113, 165), (113, 166), (113, 167), (113, 168), (113, 169), (113, 170), (113, 171), (113, 173), (114, 140), (114, 142), (114, 143), (114, 144), (114, 145), (114, 146), (114, 147), (114, 148), (114, 149), (114, 150), (114, 151), (114, 152), (114, 153), (114, 154), (114, 155), (114, 157), (114, 162), (114, 164), (114, 165), (114, 166), (114, 167), (114, 168), (114, 169), (114, 170), (114, 171), (114, 173), (115, 140), (115, 142), (115, 143), (115, 144), (115, 145), (115, 146), (115, 147), (115, 148), (115, 149), (115, 150), (115, 151), (115, 152), (115, 153), (115, 154), (115, 155), (115, 157), (115, 161), (115, 163), (115, 164), (115, 165), (115, 166), (115, 167), (115, 168), (115, 169), (115, 170), (115, 171), (115, 173), (116, 140), (116, 142), (116, 143), (116, 144), (116, 145), (116, 146),
(116, 147), (116, 148), (116, 149), (116, 150), (116, 151), (116, 152), (116, 153), (116, 154), (116, 156), (116, 161), (116, 163), (116, 164), (116, 165), (116, 166), (116, 167), (116, 168), (116, 169), (116, 170), (116, 172), (117, 140), (117, 147), (117, 148), (117, 149), (117, 150), (117, 151), (117, 152), (117, 153), (117, 155), (117, 160), (117, 161), (117, 162), (117, 163), (117, 164), (117, 165), (117, 166), (117, 167), (117, 168), (117, 169), (117, 170), (117, 172), (118, 140), (118, 142), (118, 143), (118, 144), (118, 145), (118, 146), (118, 148), (118, 149), (118, 150), (118, 151), (118, 152), (118, 154), (118, 160), (118, 162), (118, 163), (118, 164), (118, 165), (118, 166), (118, 167), (118, 168), (118, 169), (118, 171), (119, 152), (119, 154), (119, 159), (119, 161), (119, 162), (119, 163), (119, 164), (119, 165), (119, 166), (119, 167),
(119, 168), (119, 169), (119, 171), (120, 148), (120, 150), (120, 152), (120, 153), (120, 154), (120, 155), (120, 158), (120, 160), (120, 161), (120, 162), (120, 163), (120, 164), (120, 165), (120, 166), (120, 167), (120, 168), (120, 170), (121, 152), (121, 154), (121, 159), (121, 160), (121, 161), (121, 162), (121, 163), (121, 164), (121, 165), (121, 166), (121, 167), (121, 168), (121, 170), (122, 152), (122, 169), (123, 153), (123, 155), (123, 156), (123, 157), (123, 158), (123, 159), (123, 160), (123, 161), (123, 162), (123, 163), (123, 164), (123, 165), (123, 166), (123, 168), )
coordinates_5FCC60 = ((125, 166),
(126, 155), (126, 157), (126, 158), (126, 159), (126, 160), (126, 161), (126, 162), (126, 163), (126, 164), (126, 166), (127, 154), (128, 149), (128, 151), (128, 152), (128, 155), (128, 156), (128, 157), (128, 158), (128, 159), (128, 160), (128, 161), (128, 162), (128, 163), (128, 164), (128, 165), (128, 166), (128, 170), (129, 148), (129, 153), (129, 154), (129, 155), (129, 156), (129, 157), (129, 158), (129, 159), (129, 160), (129, 161), (129, 162), (129, 163), (129, 164), (129, 165), (129, 166), (129, 167), (129, 168), (129, 170), (130, 145), (130, 146), (130, 149), (130, 150), (130, 151), (130, 152), (130, 153), (130, 154), (130, 155), (130, 156), (130, 157), (130, 158), (130, 159), (130, 160), (130, 161), (130, 162), (130, 163), (130, 164), (130, 165), (130, 166), (130, 167), (130, 168), (130, 169), (130, 171), (131, 141), (131, 142), (131, 143),
(131, 144), (131, 148), (131, 149), (131, 150), (131, 151), (131, 152), (131, 153), (131, 154), (131, 155), (131, 156), (131, 157), (131, 158), (131, 159), (131, 160), (131, 161), (131, 162), (131, 163), (131, 164), (131, 165), (131, 166), (131, 167), (131, 168), (131, 169), (131, 171), (132, 142), (132, 145), (132, 146), (132, 147), (132, 148), (132, 149), (132, 150), (132, 151), (132, 152), (132, 153), (132, 154), (132, 155), (132, 156), (132, 157), (132, 158), (132, 159), (132, 160), (132, 161), (132, 162), (132, 163), (132, 164), (132, 165), (132, 166), (132, 167), (132, 168), (132, 169), (132, 171), (133, 142), (133, 144), (133, 145), (133, 146), (133, 147), (133, 148), (133, 149), (133, 150), (133, 151), (133, 152), (133, 153), (133, 154), (133, 155), (133, 156), (133, 157), (133, 158), (133, 159), (133, 160), (133, 161), (133, 162), (133, 163),
(133, 164), (133, 165), (133, 166), (133, 167), (133, 168), (133, 169), (133, 170), (133, 172), (134, 142), (134, 144), (134, 145), (134, 146), (134, 147), (134, 148), (134, 149), (134, 150), (134, 151), (134, 152), (134, 153), (134, 154), (134, 155), (134, 156), (134, 157), (134, 158), (134, 159), (134, 160), (134, 161), (134, 162), (134, 163), (134, 164), (134, 165), (134, 166), (134, 167), (134, 168), (134, 169), (134, 170), (134, 172), (135, 142), (135, 144), (135, 145), (135, 146), (135, 147), (135, 148), (135, 149), (135, 150), (135, 151), (135, 152), (135, 153), (135, 154), (135, 155), (135, 156), (135, 157), (135, 158), (135, 159), (135, 160), (135, 161), (135, 162), (135, 163), (135, 164), (135, 165), (135, 166), (135, 167), (135, 168), (135, 169), (135, 170), (135, 172), (136, 142), (136, 144), (136, 145), (136, 146), (136, 147), (136, 148),
(136, 149), (136, 150), (136, 151), (136, 152), (136, 153), (136, 154), (136, 155), (136, 156), (136, 157), (136, 158), (136, 159), (136, 160), (136, 161), (136, 162), (136, 163), (136, 164), (136, 165), (136, 166), (136, 167), (136, 168), (136, 169), (136, 170), (136, 172), (137, 142), (137, 144), (137, 145), (137, 146), (137, 147), (137, 148), (137, 149), (137, 150), (137, 151), (137, 152), (137, 153), (137, 154), (137, 155), (137, 156), (137, 157), (137, 158), (137, 159), (137, 160), (137, 161), (137, 162), (137, 163), (137, 164), (137, 165), (137, 166), (137, 167), (137, 168), (137, 169), (137, 170), (137, 171), (137, 173), (138, 143), (138, 145), (138, 146), (138, 147), (138, 148), (138, 149), (138, 150), (138, 151), (138, 152), (138, 153), (138, 154), (138, 155), (138, 156), (138, 157), (138, 158), (138, 159), (138, 160), (138, 161), (138, 162),
(138, 163), (138, 164), (138, 165), (138, 166), (138, 167), (138, 168), (138, 169), (138, 170), (138, 171), (138, 173), (139, 143), (139, 145), (139, 146), (139, 147), (139, 148), (139, 149), (139, 150), (139, 151), (139, 152), (139, 153), (139, 154), (139, 155), (139, 156), (139, 157), (139, 158), (139, 159), (139, 160), (139, 161), (139, 162), (139, 163), (139, 164), (139, 165), (139, 166), (139, 167), (139, 168), (139, 169), (139, 170), (139, 171), (139, 173), (140, 143), (140, 145), (140, 146), (140, 147), (140, 148), (140, 149), (140, 150), (140, 151), (140, 152), (140, 153), (140, 154), (140, 155), (140, 156), (140, 157), (140, 158), (140, 159), (140, 160), (140, 161), (140, 162), (140, 163), (140, 164), (140, 165), (140, 166), (140, 167), (140, 168), (140, 169), (140, 170), (140, 171), (140, 173), (141, 143), (141, 145), (141, 146), (141, 147),
(141, 148), (141, 149), (141, 150), (141, 151), (141, 152), (141, 153), (141, 154), (141, 155), (141, 156), (141, 157), (141, 158), (141, 159), (141, 160), (141, 161), (141, 162), (141, 163), (141, 164), (141, 165), (141, 166), (141, 167), (141, 168), (141, 169), (141, 170), (141, 171), (141, 172), (141, 174), (142, 144), (142, 146), (142, 147), (142, 148), (142, 149), (142, 150), (142, 151), (142, 152), (142, 153), (142, 154), (142, 155), (142, 156), (142, 157), (142, 158), (142, 159), (142, 160), (142, 161), (142, 162), (142, 163), (142, 164), (142, 165), (142, 166), (142, 167), (142, 168), (142, 169), (142, 170), (142, 171), (142, 172), (142, 174), (143, 144), (143, 146), (143, 147), (143, 148), (143, 149), (143, 150), (143, 151), (143, 152), (143, 153), (143, 154), (143, 155), (143, 156), (143, 157), (143, 158), (143, 159), (143, 160), (143, 161),
(143, 162), (143, 163), (143, 164), (143, 165), (143, 166), (143, 167), (143, 168), (143, 169), (143, 170), (143, 171), (143, 172), (143, 174), (144, 144), (144, 146), (144, 147), (144, 148), (144, 149), (144, 150), (144, 151), (144, 152), (144, 153), (144, 154), (144, 155), (144, 156), (144, 157), (144, 158), (144, 159), (144, 160), (144, 161), (144, 162), (144, 163), (144, 164), (144, 165), (144, 166), (144, 167), (144, 168), (144, 169), (144, 170), (144, 171), (144, 172), (144, 174), (145, 144), (145, 146), (145, 147), (145, 148), (145, 149), (145, 150), (145, 151), (145, 152), (145, 153), (145, 154), (145, 155), (145, 156), (145, 157), (145, 158), (145, 159), (145, 160), (145, 161), (145, 162), (145, 163), (145, 164), (145, 165), (145, 166), (145, 167), (145, 168), (145, 169), (145, 170), (145, 171), (145, 172), (145, 174), (146, 144), (146, 146),
(146, 147), (146, 148), (146, 149), (146, 150), (146, 151), (146, 152), (146, 153), (146, 154), (146, 155), (146, 156), (146, 157), (146, 158), (146, 159), (146, 160), (146, 161), (146, 162), (146, 163), (146, 164), (146, 165), (146, 166), (146, 167), (146, 168), (146, 169), (146, 170), (146, 171), (146, 173), (147, 145), (147, 147), (147, 148), (147, 149), (147, 150), (147, 151), (147, 152), (147, 153), (147, 154), (147, 155), (147, 156), (147, 157), (147, 158), (147, 159), (147, 160), (147, 161), (147, 162), (147, 163), (147, 164), (147, 165), (147, 166), (147, 167), (147, 168), (147, 169), (147, 170), (147, 171), (147, 173), (148, 146), (148, 148), (148, 149), (148, 150), (148, 151), (148, 152), (148, 153), (148, 154), (148, 155), (148, 156), (148, 157), (148, 158), (148, 159), (148, 160), (148, 161), (148, 162), (148, 163), (148, 164), (148, 165),
(148, 166), (148, 167), (148, 168), (148, 169), (148, 170), (148, 171), (148, 173), (149, 145), (149, 147), (149, 148), (149, 149), (149, 150), (149, 151), (149, 152), (149, 153), (149, 154), (149, 155), (149, 156), (149, 157), (149, 158), (149, 159), (149, 160), (149, 161), (149, 162), (149, 163), (149, 164), (149, 165), (149, 166), (149, 167), (149, 168), (149, 169), (149, 170), (149, 171), (149, 173), (150, 145), (150, 147), (150, 148), (150, 149), (150, 150), (150, 151), (150, 152), (150, 153), (150, 154), (150, 155), (150, 156), (150, 157), (150, 158), (150, 159), (150, 160), (150, 161), (150, 162), (150, 163), (150, 164), (150, 165), (150, 166), (150, 167), (150, 168), (150, 169), (150, 170), (150, 171), (150, 173), (151, 146), (151, 148), (151, 149), (151, 150), (151, 151), (151, 152), (151, 153), (151, 154), (151, 155), (151, 156), (151, 157),
(151, 158), (151, 159), (151, 160), (151, 161), (151, 162), (151, 163), (151, 164), (151, 165), (151, 166), (151, 167), (151, 168), (151, 169), (151, 170), (151, 172), (152, 147), (152, 149), (152, 150), (152, 151), (152, 152), (152, 153), (152, 154), (152, 155), (152, 156), (152, 157), (152, 158), (152, 159), (152, 160), (152, 161), (152, 162), (152, 163), (152, 164), (152, 165), (152, 166), (152, 167), (152, 168), (152, 169), (152, 170), (152, 172), (153, 147), (153, 149), (153, 150), (153, 151), (153, 152), (153, 153), (153, 154), (153, 155), (153, 156), (153, 157), (153, 158), (153, 159), (153, 160), (153, 161), (153, 162), (153, 163), (153, 164), (153, 165), (153, 166), (153, 167), (153, 168), (153, 169), (153, 171), (154, 147), (154, 149), (154, 150), (154, 151), (154, 152), (154, 153), (154, 154), (154, 155), (154, 156), (154, 157), (154, 158),
(154, 159), (154, 160), (154, 161), (154, 162), (154, 163), (154, 164), (154, 165), (154, 166), (154, 167), (154, 168), (154, 169), (154, 171), (155, 147), (155, 149), (155, 150), (155, 151), (155, 152), (155, 153), (155, 154), (155, 155), (155, 156), (155, 157), (155, 158), (155, 159), (155, 160), (155, 161), (155, 162), (155, 163), (155, 164), (155, 165), (155, 166), (155, 167), (155, 168), (155, 170), (156, 147), (156, 149), (156, 150), (156, 151), (156, 152), (156, 153), (156, 154), (156, 155), (156, 156), (156, 157), (156, 158), (156, 159), (156, 160), (156, 161), (156, 162), (156, 163), (156, 164), (156, 165), (156, 166), (156, 167), (156, 169), (157, 148), (157, 150), (157, 151), (157, 152), (157, 153), (157, 154), (157, 155), (157, 156), (157, 157), (157, 158), (157, 159), (157, 160), (157, 161), (157, 162), (157, 163), (157, 164), (157, 165),
(157, 166), (157, 167), (157, 169), (158, 149), (158, 151), (158, 152), (158, 153), (158, 154), (158, 155), (158, 156), (158, 157), (158, 158), (158, 159), (158, 160), (158, 161), (158, 162), (158, 163), (158, 164), (158, 165), (158, 166), (158, 168), (159, 150), (159, 152), (159, 153), (159, 154), (159, 155), (159, 156), (159, 157), (159, 158), (159, 159), (159, 160), (159, 161), (159, 162), (159, 163), (159, 164), (159, 165), (159, 166), (159, 168), (160, 150), (160, 152), (160, 153), (160, 154), (160, 155), (160, 156), (160, 157), (160, 158), (160, 159), (160, 160), (160, 161), (160, 162), (160, 163), (160, 164), (160, 165), (160, 167), (161, 151), (161, 153), (161, 154), (161, 155), (161, 156), (161, 157), (161, 158), (161, 159), (161, 160), (161, 161), (161, 162), (161, 163), (161, 164), (161, 166), (162, 151), (162, 153), (162, 154), (162, 155),
(162, 156), (162, 157), (162, 160), (162, 161), (162, 162), (162, 163), (162, 166), (163, 152), (163, 153), (163, 154), (163, 155), (163, 156), (163, 158), (163, 159), (163, 165), (164, 152), (164, 154), (164, 155), (164, 156), (164, 160), (164, 161), (164, 163), (165, 152), (165, 154), (165, 156), (166, 153), (166, 155), (167, 154), (167, 155), )
coordinates_F4DEB3 = ((130, 78),
(130, 79), (131, 78), (131, 80), (132, 77), (132, 80), (133, 77), (133, 79), (133, 80), (133, 82), (133, 83), (133, 84), (133, 85), (134, 77), (134, 79), (134, 80), (134, 87), (134, 97), (135, 77), (135, 79), (135, 80), (135, 81), (135, 82), (135, 83), (135, 84), (135, 85), (135, 88), (135, 94), (135, 96), (136, 77), (136, 79), (136, 80), (136, 81), (136, 82), (136, 83), (136, 84), (136, 85), (136, 86), (136, 87), (136, 94), (136, 96), (137, 77), (137, 79), (137, 80), (137, 81), (137, 82), (137, 83), (137, 84), (137, 85), (137, 86), (137, 87), (137, 89), (137, 94), (137, 96), (138, 77), (138, 82), (138, 83), (138, 84), (138, 85), (138, 86), (138, 88), (138, 96), (139, 79), (139, 80), (139, 81), (139, 82), (139, 83), (139, 84), (139, 85), (139, 87), (139, 95), (139, 97), (140, 83),
(140, 86), (140, 96), (140, 97), (141, 83), (141, 85), (141, 97), (142, 82), (142, 84), (143, 81), (143, 83), (144, 80), (144, 82), (144, 83), (144, 87), (144, 89), (144, 90), (144, 91), (144, 92), (145, 80), (145, 83), (145, 86), (145, 89), (145, 93), (145, 95), (146, 80), (146, 82), (146, 84), (146, 87), (146, 96), (147, 83), (147, 85), )
coordinates_26408B = ((123, 88),
(123, 90), (123, 91), (123, 92), (123, 93), (123, 94), (123, 95), (124, 86), (124, 93), (124, 96), (124, 97), (124, 98), (124, 99), (124, 100), (124, 101), (124, 102), (124, 103), (124, 104), (124, 105), (124, 106), (124, 108), (125, 85), (125, 88), (125, 89), (125, 91), (125, 94), (125, 95), (125, 108), (126, 84), (126, 86), (126, 87), (126, 88), (126, 90), (126, 95), (126, 97), (126, 98), (126, 99), (126, 100), (126, 101), (126, 102), (126, 103), (126, 104), (126, 105), (126, 106), (126, 108), (127, 81), (127, 89), (127, 95), (127, 97), (127, 98), (127, 99), (127, 100), (127, 101), (127, 102), (127, 103), (127, 104), (127, 105), (127, 106), (127, 108), (128, 80), (128, 84), (128, 85), (128, 86), (128, 87), (128, 94), (128, 96), (128, 97), (128, 98), (128, 99), (128, 100), (128, 101), (128, 102), (128, 103),
(128, 104), (128, 105), (128, 108), (129, 81), (129, 83), (129, 94), (129, 97), (129, 98), (129, 99), (129, 100), (129, 101), (129, 102), (129, 103), (129, 107), (130, 93), (130, 96), (130, 105), (131, 94), (131, 97), (131, 99), (131, 100), (131, 101), (131, 103), (133, 93), )
coordinates_F5DEB3 = ((94, 106),
(95, 105), (95, 106), (96, 104), (97, 103), (97, 105), (98, 103), (99, 81), (99, 83), (99, 101), (99, 102), (100, 80), (100, 85), (100, 97), (100, 98), (100, 99), (100, 101), (101, 80), (101, 82), (101, 86), (101, 93), (101, 94), (101, 95), (101, 96), (101, 97), (101, 98), (101, 100), (102, 79), (102, 81), (102, 83), (102, 86), (102, 91), (102, 92), (103, 79), (103, 81), (103, 82), (103, 85), (103, 86), (103, 90), (103, 92), (104, 79), (104, 81), (104, 85), (104, 86), (104, 90), (104, 92), (105, 78), (105, 81), (105, 86), (105, 90), (106, 78), (106, 80), (106, 86), (106, 90), (106, 91), (107, 78), (107, 80), (107, 86), (107, 90), (107, 91), (108, 77), (108, 79), (108, 87), (108, 91), (109, 77), (109, 79), (109, 87), (109, 91), (110, 77), (110, 79), (110, 88), (110, 91), (111, 77),
(111, 79), (111, 89), (111, 91), (112, 77), (112, 79), (113, 77), (113, 79), (114, 77), (114, 79), (115, 77), (115, 78), )
coordinates_016400 = ((123, 130),
(123, 132), (123, 133), (124, 132), (124, 134), (124, 135), (124, 136), (124, 138), (125, 134), (126, 134), (126, 136), (126, 137), (126, 139), (127, 134), (127, 136), (127, 137), (127, 139), (128, 134), (128, 136), (128, 137), (128, 139), (129, 135), (129, 137), (129, 139), (130, 135), (130, 137), (130, 139), (131, 135), (131, 137), (131, 139), (132, 134), (132, 136), (132, 140), (133, 133), (133, 135), (133, 138), (133, 140), (134, 133), (134, 136), (134, 140), (135, 132), (135, 135), (135, 140), (136, 131), (136, 134), (136, 140), (137, 130), (137, 133), (137, 140), (138, 129), (138, 133), (138, 139), (138, 140), (139, 129), (139, 132), (139, 138), (139, 141), (140, 130), (140, 137), (140, 139), (140, 141), (141, 137), (141, 139), (141, 141), (142, 138), (142, 141), (143, 139), (143, 141), (144, 140), (144, 142), (145, 142), (146, 137), (146, 140),
(146, 142), (147, 137), (147, 139), (148, 136), )
coordinates_CC5B45 = ((147, 89),
(147, 91), (147, 92), (147, 93), (147, 94), (148, 87), (148, 97), (149, 86), (149, 89), (149, 90), (149, 91), (149, 92), (149, 93), (149, 94), (149, 95), (149, 97), (150, 86), (150, 88), (150, 89), (150, 90), (150, 91), (150, 92), (150, 93), (150, 96), (150, 97), (151, 86), (151, 88), (151, 89), (151, 90), (151, 91), (151, 93), (152, 86), (152, 88), (152, 89), (152, 90), (152, 91), (152, 93), (153, 86), (153, 88), (153, 89), (153, 90), (153, 91), (153, 92), (153, 94), (154, 87), (154, 89), (154, 90), (154, 91), (154, 92), (154, 94), (155, 87), (155, 89), (155, 90), (155, 91), (155, 92), (155, 93), (155, 95), (156, 88), (156, 90), (156, 91), (156, 92), (156, 94), (156, 96), (157, 88), (157, 90), (157, 91), (157, 96), (158, 89), (158, 94), (158, 96), (159, 90), (159, 91), )
coordinates_27408B = ((104, 105),
(105, 102), (105, 105), (106, 100), (106, 105), (107, 98), (107, 99), (107, 102), (107, 103), (107, 105), (108, 97), (108, 100), (108, 101), (108, 102), (108, 103), (108, 105), (109, 97), (109, 102), (109, 103), (109, 104), (109, 106), (110, 96), (110, 100), (110, 101), (110, 102), (110, 103), (110, 104), (110, 106), (111, 96), (111, 98), (111, 102), (111, 104), (111, 106), (112, 82), (112, 96), (112, 97), (112, 102), (112, 104), (112, 106), (113, 81), (113, 85), (113, 102), (113, 105), (114, 81), (114, 83), (114, 86), (114, 101), (114, 103), (114, 105), (115, 80), (115, 82), (115, 83), (115, 84), (115, 85), (115, 87), (115, 100), (115, 102), (115, 104), (116, 81), (116, 82), (116, 83), (116, 84), (116, 85), (116, 86), (116, 88), (116, 100), (116, 102), (116, 104), (117, 78), (117, 81), (117, 82), (117, 83), (117, 84),
(117, 85), (117, 86), (117, 87), (117, 90), (117, 93), (117, 96), (117, 100), (117, 103), (118, 78), (118, 82), (118, 83), (118, 84), (118, 85), (118, 86), (118, 87), (118, 88), (118, 91), (118, 96), (118, 100), (118, 103), (119, 81), (119, 83), (119, 84), (119, 85), (119, 86), (119, 87), (119, 88), (119, 89), (119, 92), (119, 93), (119, 95), (119, 97), (119, 100), (119, 103), (120, 82), (120, 86), (120, 90), (120, 95), (120, 102), (121, 83), (121, 85), (121, 88), (121, 89), (121, 95), (121, 97), (121, 98), (121, 99), (121, 100), (121, 102), (122, 102), )
coordinates_006400 = ((105, 134),
(105, 136), (105, 137), (105, 138), (105, 139), (105, 140), (105, 141), (105, 143), (106, 130), (106, 134), (107, 129), (107, 131), (107, 135), (107, 137), (107, 138), (107, 139), (107, 140), (107, 142), (108, 128), (108, 131), (108, 135), (108, 137), (108, 138), (108, 139), (108, 140), (108, 142), (109, 128), (109, 131), (109, 135), (109, 137), (109, 138), (109, 139), (109, 140), (109, 142), (110, 128), (110, 131), (110, 135), (110, 137), (110, 141), (111, 128), (111, 131), (111, 136), (111, 138), (111, 140), (112, 129), (112, 131), (112, 136), (113, 129), (113, 131), (113, 136), (113, 137), (114, 129), (114, 132), (114, 136), (115, 129), (115, 132), (115, 136), (115, 138), (116, 122), (116, 125), (116, 129), (116, 131), (116, 133), (116, 136), (116, 138), (117, 122), (117, 126), (117, 129), (117, 131), (117, 132), (117, 135), (117, 136), (117, 138),
(118, 121), (118, 123), (118, 124), (118, 125), (118, 127), (118, 128), (118, 130), (118, 133), (118, 136), (118, 138), (119, 121), (119, 124), (119, 126), (119, 130), (119, 134), (120, 120), (120, 121), (120, 124), (120, 130), (121, 119), (121, 122), (121, 125), (121, 126), (121, 127), (121, 128), (121, 130), (122, 119), (122, 121), (122, 122), (122, 123), )
coordinates_CD5B45 = ((75, 103),
(75, 105), (75, 106), (75, 108), (76, 102), (76, 108), (77, 101), (77, 103), (77, 108), (78, 101), (78, 104), (78, 105), (78, 106), (78, 108), (79, 101), (79, 103), (80, 101), (80, 102), (81, 95), (81, 96), (81, 100), (81, 102), (82, 93), (82, 94), (82, 100), (82, 101), (83, 92), (83, 95), (83, 96), (83, 98), (83, 101), (84, 91), (84, 93), (84, 94), (84, 95), (84, 96), (84, 97), (84, 99), (84, 101), (85, 89), (85, 92), (85, 93), (85, 94), (85, 95), (85, 96), (85, 97), (85, 98), (85, 99), (85, 101), (86, 88), (86, 91), (86, 92), (86, 93), (86, 94), (86, 95), (86, 96), (86, 97), (86, 98), (86, 100), (87, 88), (87, 90), (87, 91), (87, 92), (87, 93), (87, 94), (87, 95), (87, 96), (87, 97), (87, 98), (87, 100), (88, 87), (88, 89), (88, 90),
(88, 91), (88, 92), (88, 93), (88, 94), (88, 95), (88, 96), (88, 97), (88, 98), (88, 100), (89, 87), (89, 89), (89, 90), (89, 91), (89, 92), (89, 93), (89, 94), (89, 95), (89, 96), (89, 97), (89, 98), (89, 100), (89, 108), (90, 87), (90, 89), (90, 90), (90, 91), (90, 92), (90, 93), (90, 94), (90, 95), (90, 96), (90, 97), (90, 99), (90, 105), (90, 108), (91, 87), (91, 89), (91, 90), (91, 91), (91, 92), (91, 93), (91, 94), (91, 95), (91, 96), (91, 99), (91, 104), (91, 107), (92, 86), (92, 88), (92, 89), (92, 90), (92, 91), (92, 92), (92, 93), (92, 98), (92, 103), (92, 107), (93, 84), (93, 87), (93, 88), (93, 89), (93, 90), (93, 91), (93, 92), (93, 95), (93, 102), (93, 105), (94, 83), (94, 86), (94, 87), (94, 88), (94, 89),
(94, 90), (94, 91), (94, 93), (94, 101), (94, 104), (95, 83), (95, 85), (95, 86), (95, 87), (95, 88), (95, 89), (95, 90), (95, 92), (95, 100), (95, 103), (96, 84), (96, 86), (96, 87), (96, 88), (96, 89), (96, 90), (96, 91), (96, 92), (96, 99), (96, 102), (97, 84), (97, 87), (97, 88), (97, 89), (97, 90), (97, 91), (97, 92), (97, 93), (97, 94), (97, 95), (97, 96), (97, 97), (97, 101), (98, 85), (98, 89), (98, 90), (98, 91), (98, 97), (98, 99), (99, 87), (99, 92), (99, 93), (99, 94), (99, 95), (100, 89), (100, 91), )
coordinates_6395ED = ((124, 124),
(124, 126), (124, 128), (125, 123), (125, 128), (126, 122), (126, 124), (126, 125), (126, 126), (126, 128), (127, 122), (127, 124), (127, 125), (127, 126), (127, 128), (128, 121), (128, 123), (128, 124), (128, 125), (128, 126), (128, 128), (129, 121), (129, 123), (129, 124), (129, 125), (129, 126), (129, 127), (129, 129), (130, 121), (130, 123), (130, 124), (130, 125), (130, 126), (130, 127), (130, 129), (131, 121), (131, 125), (131, 126), (131, 127), (131, 129), (132, 123), (132, 124), (132, 126), (132, 128), (133, 121), (133, 122), (133, 125), (133, 128), (134, 126), (134, 127), )
coordinates_00FFFE = ((148, 142),
(149, 138), (149, 139), (149, 140), (149, 143), (150, 142), (150, 143), (151, 142), (151, 144), (152, 142), (152, 144), (153, 142), (153, 143), (153, 145), (154, 136), (154, 138), (154, 139), (154, 140), (154, 142), (154, 143), (154, 145), (155, 138), (155, 141), (155, 142), (155, 143), (155, 145), (156, 140), (156, 142), (156, 143), (156, 145), (157, 141), (157, 144), (158, 142), (158, 144), (159, 143), (159, 144), )
coordinates_B4E7FA = ((120, 140),
(120, 142), (120, 143), (120, 144), (120, 146), (121, 141), (122, 143), (122, 144), (122, 146), (122, 147), (123, 145), (123, 147), (124, 146), (124, 147), (125, 146), (125, 147), (126, 145), (126, 147), (127, 143), (127, 147), (128, 141), (128, 144), (128, 146), (129, 141), (129, 143), )
coordinates_F98072 = ((124, 110),
(125, 110), (125, 112), (125, 116), (125, 118), (125, 121), (126, 110), (126, 112), (126, 117), (126, 119), (127, 110), (128, 110), (129, 109), (129, 111), (130, 108), (130, 110), (130, 112), (131, 107), (131, 109), (131, 110), (131, 112), (132, 105), (132, 110), (132, 111), (133, 102), (133, 106), (133, 107), (133, 108), (133, 111), (133, 112), (134, 102), (134, 104), (134, 110), (134, 112), (134, 113), (134, 115), (135, 111), (135, 113), (135, 114), (135, 116), (136, 112), (136, 115), (136, 117), (137, 113), (137, 118), (138, 114), (138, 116), (138, 118), )
coordinates_97FB98 = ((156, 137),
(157, 137), (157, 138), (158, 138), (158, 139), (159, 138), (159, 140), (160, 121), (160, 130), (160, 131), (160, 133), (160, 134), (160, 135), (160, 136), (160, 137), (160, 138), (160, 139), (160, 141), (161, 121), (161, 130), (161, 138), (161, 139), (161, 140), (161, 144), (162, 129), (162, 131), (162, 132), (162, 133), (162, 134), (162, 135), (162, 136), (162, 137), (162, 138), (162, 139), (162, 140), (162, 141), (163, 120), (163, 129), (163, 131), (163, 132), (163, 133), (163, 134), (163, 135), (163, 136), (163, 137), (163, 138), (163, 139), (163, 140), (163, 143), (164, 119), (164, 120), (164, 128), (164, 130), (164, 131), (164, 132), (164, 133), (164, 134), (164, 135), (164, 136), (164, 137), (164, 138), (164, 139), (164, 141), (165, 120), (165, 128), (165, 129), (165, 130), (165, 131), (165, 132), (165, 133), (165, 134), (165, 135), (165, 136),
(165, 137), (165, 138), (165, 139), (165, 141), (166, 118), (166, 120), (166, 127), (166, 129), (166, 130), (166, 133), (166, 134), (166, 135), (166, 136), (166, 137), (166, 138), (166, 140), (167, 117), (167, 120), (167, 126), (167, 128), (167, 129), (167, 132), (167, 135), (167, 136), (167, 137), (167, 138), (167, 140), (168, 116), (168, 118), (168, 120), (168, 126), (168, 128), (168, 130), (168, 133), (168, 134), (168, 140), (169, 116), (169, 118), (169, 120), (169, 125), (169, 127), (169, 130), (169, 135), (169, 136), (169, 137), (169, 138), (169, 140), (170, 116), (170, 118), (170, 119), (170, 120), (170, 122), (170, 123), (170, 126), (170, 129), (171, 116), (171, 127), (171, 128), (172, 118), (172, 120), (172, 121), (172, 122), (172, 123), (172, 124), (172, 125), )
coordinates_323287 = ((148, 108),
(149, 105), (149, 109), (150, 103), (150, 108), (150, 110), (151, 99), (151, 101), (151, 106), (151, 107), (151, 111), (152, 101), (152, 104), (152, 105), (152, 108), (152, 112), (153, 102), (153, 103), (153, 110), (153, 114), (154, 111), (154, 112), (156, 101), (156, 102), (157, 100), (157, 103), (158, 98), (158, 101), (158, 103), (159, 98), (159, 100), (159, 101), (159, 103), (160, 99), (160, 100), (160, 101), (160, 102), (160, 104), (160, 113), (160, 115), (160, 116), (160, 117), (160, 119), (161, 98), (161, 100), (161, 101), (161, 102), (161, 104), (161, 112), (161, 119), (162, 98), (162, 102), (162, 104), (162, 111), (162, 113), (162, 114), (162, 115), (162, 116), (162, 118), (163, 99), (163, 103), (163, 105), (163, 111), (163, 113), (163, 114), (163, 115), (163, 116), (163, 118), (164, 102), (164, 105), (164, 111), (164, 113), (164, 114),
(164, 115), (164, 117), (165, 103), (165, 105), (165, 111), (165, 113), (165, 114), (165, 116), (166, 104), (166, 106), (166, 110), (166, 111), (166, 112), (166, 113), (166, 115), (167, 104), (167, 110), (167, 111), (167, 112), (167, 113), (167, 115), (168, 105), (168, 109), (168, 110), (168, 111), (168, 112), (168, 114), (169, 105), (169, 114), (170, 106), (170, 108), (170, 109), (170, 110), (170, 111), (170, 112), )
coordinates_6495ED = ((107, 121),
(108, 120), (108, 123), (109, 119), (109, 121), (109, 123), (110, 118), (110, 120), (110, 122), (111, 117), (111, 120), (111, 122), (112, 116), (112, 118), (112, 119), (112, 121), (113, 115), (113, 118), (113, 120), (114, 114), (114, 117), (114, 118), (114, 120), (115, 114), (115, 116), (115, 117), (115, 119), (116, 114), (116, 116), (116, 117), (116, 119), (117, 114), (117, 116), (117, 118), (118, 114), (118, 116), (118, 118), (119, 117), (120, 115), (120, 117), (121, 116), (121, 117), (122, 117), )
coordinates_01FFFF = ((90, 141),
(90, 143), (90, 144), (90, 145), (90, 146), (90, 147), (91, 140), (92, 140), (92, 143), (92, 144), (92, 146), (93, 142), (93, 144), (93, 146), (94, 143), (94, 146), (95, 143), (95, 146), (96, 137), (96, 142), (96, 144), (96, 146), (97, 136), (97, 138), (97, 139), (97, 140), (97, 141), (97, 143), (97, 145), (98, 135), (98, 137), (98, 142), (98, 143), (98, 145), (99, 135), (99, 137), (99, 138), (99, 139), (99, 140), (99, 141), (99, 142), (99, 143), (99, 145), (100, 135), (100, 137), (100, 138), (100, 139), (100, 140), (100, 141), (100, 142), (100, 143), (100, 144), (100, 145), (101, 134), (101, 136), (101, 137), (101, 138), (101, 139), (101, 140), (101, 141), (101, 142), (101, 144), (102, 134), (102, 144), (103, 134), (103, 136), (103, 137), (103, 138), (103, 139), (103, 140), (103, 141), (103, 143), )
coordinates_FA8072 = ((102, 108),
(103, 107), (103, 110), (104, 107), (104, 111), (105, 107), (105, 109), (105, 111), (106, 107), (106, 109), (106, 111), (107, 108), (107, 111), (108, 108), (108, 110), (108, 111), (108, 112), (109, 108), (109, 110), (109, 111), (110, 108), (110, 110), (110, 113), (111, 108), (111, 112), (112, 108), (112, 111), (113, 108), (113, 110), (114, 107), (114, 109), (115, 107), (115, 108), (116, 106), (117, 106), (117, 107), (118, 105), (118, 107), (119, 105), (119, 106), (120, 106), (120, 111), (120, 113), (121, 104), (121, 109), (121, 114), (122, 104), (122, 106), (122, 107), (122, 108), (122, 109), (122, 110), (122, 111), (122, 112), (122, 113), (122, 115), )
coordinates_98FB98 = ((75, 132),
(75, 134), (75, 135), (76, 136), (76, 137), (76, 138), (77, 133), (77, 135), (77, 140), (77, 141), (77, 142), (77, 144), (78, 133), (78, 135), (78, 136), (78, 137), (78, 139), (78, 145), (79, 133), (79, 135), (79, 136), (79, 137), (79, 141), (79, 142), (79, 143), (79, 146), (80, 134), (80, 137), (80, 141), (80, 143), (80, 144), (80, 146), (81, 134), (81, 137), (81, 141), (81, 143), (81, 144), (81, 146), (82, 133), (82, 136), (82, 141), (82, 143), (82, 144), (82, 145), (82, 147), (83, 133), (83, 136), (83, 141), (83, 143), (83, 144), (83, 145), (83, 147), (84, 132), (84, 134), (84, 136), (84, 141), (84, 143), (84, 144), (84, 145), (84, 147), (85, 132), (85, 134), (85, 135), (85, 137), (85, 142), (85, 144), (85, 145), (85, 147), (86, 133), (86, 135), (86, 137), (86, 143), (86, 145),
(86, 147), (87, 134), (87, 137), (87, 143), (87, 147), (88, 134), (88, 137), (88, 142), (88, 144), (88, 146), (89, 135), (89, 136), )
coordinates_FEC0CB = ((133, 99),
(133, 100), (134, 99), (135, 99), (136, 99), (137, 98), (137, 100), (138, 98), (138, 102), (139, 100), (139, 104), (140, 100), (140, 102), (140, 105), (141, 99), (141, 103), (141, 104), (141, 105), (142, 98), (142, 99), (142, 100), (142, 101), (142, 104), (142, 106), (143, 103), (143, 106), (143, 110), (143, 112), (144, 104), (144, 106), (144, 108), (144, 109), (144, 113), (145, 104), (145, 110), (145, 112), (146, 104), (146, 106), (146, 107), (146, 108), (146, 110), (146, 112), (147, 99), (147, 101), (147, 104), (147, 105), (147, 109), (147, 112), (148, 100), (148, 103), (148, 110), (148, 112), (149, 101), (149, 111), (149, 113), (150, 112), (150, 114), (151, 114), )
coordinates_333287 = ((72, 118),
(72, 120), (72, 121), (73, 117), (73, 122), (73, 123), (73, 124), (73, 125), (73, 127), (74, 110), (74, 112), (74, 116), (74, 118), (74, 119), (74, 120), (74, 128), (75, 110), (75, 113), (75, 114), (75, 117), (75, 118), (75, 122), (75, 124), (75, 125), (75, 129), (76, 110), (76, 112), (76, 116), (76, 118), (76, 122), (76, 127), (76, 130), (77, 110), (77, 113), (77, 114), (77, 115), (77, 116), (77, 117), (77, 119), (77, 128), (78, 112), (78, 114), (78, 115), (78, 116), (78, 117), (78, 118), (78, 120), (78, 128), (78, 131), (79, 113), (79, 115), (79, 116), (79, 117), (79, 118), (79, 119), (79, 121), (79, 129), (79, 131), (80, 114), (80, 116), (80, 117), (80, 118), (80, 119), (80, 120), (80, 122), (80, 129), (80, 131), (81, 115), (81, 117), (81, 118), (81, 119), (81, 120), (81, 122),
(81, 129), (81, 131), (82, 117), (82, 118), (82, 119), (82, 120), (82, 121), (82, 123), (82, 129), (82, 131), (83, 116), (83, 118), (83, 119), (83, 120), (83, 121), (83, 123), (83, 129), (83, 130), (84, 117), (84, 119), (84, 120), (84, 121), (84, 122), (84, 123), (84, 124), (84, 130), (85, 118), (85, 120), (85, 121), (85, 122), (85, 124), (85, 130), (86, 119), (86, 123), (86, 130), (87, 120), (87, 122), (87, 130), (87, 131), (88, 130), (88, 132), (89, 131), (89, 133), (91, 109), (91, 110), (92, 111), (93, 113), (94, 116), (94, 118), (95, 118), (95, 119), )
coordinates_FFC0CB = ((94, 108),
(94, 110), (94, 111), (95, 108), (95, 110), (95, 111), (95, 112), (95, 114), (96, 115), (96, 116), (97, 116), (97, 118), (98, 118), )
| coordinates_e0_e1_e1 = ((125, 114), (126, 93), (126, 114), (126, 130), (126, 132), (127, 92), (127, 93), (127, 104), (127, 114), (127, 115), (127, 130), (128, 91), (128, 92), (128, 102), (128, 104), (128, 114), (128, 117), (128, 119), (128, 131), (128, 132), (129, 91), (129, 101), (129, 114), (129, 119), (129, 131), (129, 132), (130, 86), (130, 87), (130, 88), (130, 91), (130, 114), (130, 116), (130, 118), (130, 131), (130, 133), (131, 82), (131, 84), (131, 85), (131, 90), (131, 115), (131, 118), (131, 131), (132, 87), (132, 90), (132, 116), (132, 118), (132, 132), (133, 89), (133, 91), (133, 117), (133, 119), (133, 130), (133, 131), (134, 90), (134, 91), (134, 118), (134, 119), (134, 130), (135, 90), (135, 91), (135, 101), (135, 106), (135, 108), (135, 119), (135, 121), (135, 122), (135, 125), (135, 129), (135, 130), (135, 138), (136, 91), (136, 92), (136, 102), (136, 104), (136, 105), (136, 109), (136, 119), (136, 126), (136, 129), (136, 138), (137, 91), (137, 92), (137, 104), (137, 107), (137, 108), (137, 120), (137, 122), (137, 123), (137, 124), (137, 125), (137, 128), (137, 136), (137, 137), (138, 90), (138, 92), (138, 106), (138, 108), (138, 109), (138, 112), (138, 120), (138, 122), (138, 123), (138, 124), (138, 125), (138, 127), (138, 135), (138, 136), (139, 90), (139, 93), (139, 107), (139, 109), (139, 110), (139, 113), (139, 120), (139, 122), (139, 123), (139, 124), (139, 125), (139, 127), (139, 134), (139, 135), (140, 89), (140, 91), (140, 93), (140, 107), (140, 114), (140, 115), (140, 118), (140, 119), (140, 120), (140, 121), (140, 122), (140, 123), (140, 124), (140, 125), (140, 127), (140, 133), (140, 135), (141, 88), (141, 94), (141, 108), (141, 110), (141, 111), (141, 112), (141, 116), (141, 117), (141, 120), (141, 121), (141, 122), (141, 123), (141, 124), (141, 125), (141, 126), (141, 128), (141, 132), (141, 135), (142, 86), (142, 87), (142, 88), (142, 89), (142, 90), (142, 91), (142, 92), (142, 93), (142, 95), (142, 108), (142, 114), (142, 118), (142, 119), (142, 120), (142, 121), (142, 122), (142, 123), (142, 124), (142, 125), (142, 126), (142, 127), (142, 130), (142, 131), (142, 133), (142, 135), (143, 85), (143, 94), (143, 96), (143, 115), (143, 117), (143, 118), (143, 119), (143, 120), (143, 121), (143, 122), (143, 123), (143, 124), (143, 125), (143, 126), (143, 127), (143, 128), (143, 132), (143, 133), (143, 134), (143, 136), (144, 97), (144, 99), (144, 101), (144, 115), (144, 117), (144, 118), (144, 119), (144, 120), (144, 121), (144, 122), (144, 123), (144, 124), (144, 125), (144, 126), (144, 127), (144, 128), (144, 129), (144, 130), (144, 131), (144, 132), (144, 133), (144, 134), (144, 135), (144, 138), (145, 98), (145, 100), (145, 102), (145, 114), (145, 115), (145, 116), (145, 117), (145, 118), (145, 119), (145, 120), (145, 121), (145, 122), (145, 123), (145, 124), (145, 125), (145, 126), (145, 127), (145, 128), (145, 129), (145, 130), (145, 131), (145, 132), (145, 133), (145, 134), (145, 136), (146, 114), (146, 116), (146, 117), (146, 118), (146, 119), (146, 120), (146, 121), (146, 122), (146, 123), (146, 124), (146, 125), (146, 126), (146, 127), (146, 128), (146, 129), (146, 130), (146, 131), (146, 132), (146, 133), (146, 135), (147, 114), (147, 116), (147, 117), (147, 118), (147, 119), (147, 120), (147, 121), (147, 122), (147, 123), (147, 124), (147, 125), (147, 126), (147, 127), (147, 128), (147, 129), (147, 130), (147, 131), (147, 132), (147, 134), (148, 114), (148, 116), (148, 117), (148, 118), (148, 119), (148, 120), (148, 121), (148, 122), (148, 123), (148, 124), (148, 125), (148, 126), (148, 127), (148, 128), (148, 129), (148, 130), (148, 131), (148, 132), (148, 134), (149, 115), (149, 117), (149, 118), (149, 119), (149, 120), (149, 121), (149, 122), (149, 123), (149, 124), (149, 125), (149, 126), (149, 127), (149, 128), (149, 129), (149, 130), (149, 131), (149, 132), (149, 134), (150, 116), (150, 118), (150, 119), (150, 120), (150, 121), (150, 122), (150, 123), (150, 124), (150, 125), (150, 126), (150, 127), (150, 128), (150, 129), (150, 130), (150, 131), (150, 132), (150, 134), (151, 95), (151, 116), (151, 117), (151, 118), (151, 119), (151, 120), (151, 121), (151, 122), (151, 123), (151, 124), (151, 125), (151, 126), (151, 127), (151, 128), (151, 129), (151, 130), (151, 131), (151, 132), (151, 133), (151, 134), (151, 135), (151, 136), (151, 137), (151, 138), (151, 140), (152, 95), (152, 96), (152, 117), (152, 119), (152, 120), (152, 121), (152, 122), (152, 123), (152, 124), (152, 125), (152, 126), (152, 127), (152, 128), (152, 129), (152, 130), (152, 131), (152, 132), (152, 133), (152, 134), (152, 135), (152, 138), (152, 140), (153, 96), (153, 99), (153, 117), (153, 119), (153, 120), (153, 121), (153, 122), (153, 123), (153, 124), (153, 125), (153, 126), (153, 127), (153, 128), (153, 129), (153, 130), (153, 131), (153, 132), (153, 134), (154, 97), (154, 100), (154, 101), (154, 105), (154, 108), (154, 116), (154, 118), (154, 119), (154, 120), (154, 121), (154, 122), (154, 123), (154, 124), (154, 125), (154, 126), (154, 127), (154, 128), (154, 129), (154, 130), (154, 131), (154, 132), (154, 134), (155, 99), (155, 104), (155, 109), (155, 114), (155, 117), (155, 118), (155, 119), (155, 120), (155, 121), (155, 122), (155, 123), (155, 124), (155, 125), (155, 126), (155, 127), (155, 128), (155, 129), (155, 130), (155, 131), (155, 132), (155, 134), (156, 98), (156, 105), (156, 107), (156, 108), (156, 111), (156, 112), (156, 113), (156, 122), (156, 123), (156, 124), (156, 125), (156, 126), (156, 127), (156, 128), (156, 129), (156, 130), (156, 131), (156, 134), (157, 105), (157, 107), (157, 108), (157, 109), (157, 115), (157, 116), (157, 117), (157, 118), (157, 119), (157, 120), (157, 123), (157, 124), (157, 125), (157, 126), (157, 127), (157, 128), (157, 129), (157, 132), (157, 133), (157, 135), (158, 105), (158, 106), (158, 107), (158, 108), (158, 109), (158, 110), (158, 113), (158, 122), (158, 123), (158, 124), (158, 125), (158, 126), (158, 127), (158, 128), (158, 130), (158, 131), (158, 136), (159, 106), (159, 108), (159, 109), (159, 111), (159, 123), (159, 125), (159, 126), (159, 127), (159, 129), (160, 106), (160, 108), (160, 110), (160, 123), (160, 125), (160, 126), (160, 128), (161, 106), (161, 109), (161, 123), (161, 125), (161, 127), (162, 107), (162, 109), (162, 123), (162, 125), (162, 127), (163, 107), (163, 109), (163, 122), (163, 124), (163, 126), (163, 137), (164, 107), (164, 122), (164, 124), (164, 126), (164, 137), (165, 108), (165, 122), (165, 125), (166, 122), (166, 125), (167, 122), (167, 124), (168, 122), (168, 123))
coordinates_e1_e1_e1 = ((77, 124), (77, 125), (78, 123), (78, 126), (79, 110), (79, 126), (80, 104), (80, 106), (80, 111), (80, 124), (80, 127), (80, 139), (81, 104), (81, 107), (81, 110), (81, 112), (81, 125), (81, 127), (81, 139), (82, 104), (82, 106), (82, 109), (82, 110), (82, 111), (82, 113), (82, 125), (82, 127), (82, 139), (83, 103), (83, 105), (83, 106), (83, 107), (83, 108), (83, 109), (83, 110), (83, 111), (83, 112), (83, 114), (83, 127), (83, 139), (84, 103), (84, 105), (84, 106), (84, 107), (84, 108), (84, 109), (84, 110), (84, 111), (84, 112), (84, 113), (84, 126), (84, 127), (84, 139), (85, 103), (85, 105), (85, 106), (85, 107), (85, 108), (85, 109), (85, 110), (85, 111), (85, 112), (85, 113), (85, 115), (85, 126), (85, 127), (85, 139), (85, 140), (86, 103), (86, 105), (86, 110), (86, 111), (86, 112), (86, 113), (86, 114), (86, 116), (86, 126), (86, 127), (86, 139), (86, 141), (87, 103), (87, 107), (87, 108), (87, 109), (87, 110), (87, 111), (87, 112), (87, 113), (87, 114), (87, 115), (87, 117), (87, 125), (87, 128), (87, 139), (87, 141), (88, 102), (88, 105), (88, 110), (88, 112), (88, 113), (88, 114), (88, 115), (88, 116), (88, 118), (88, 124), (88, 126), (88, 128), (88, 139), (88, 140), (89, 102), (89, 104), (89, 110), (89, 113), (89, 114), (89, 115), (89, 116), (89, 117), (89, 120), (89, 121), (89, 122), (89, 125), (89, 126), (89, 127), (89, 129), (89, 139), (90, 102), (90, 111), (90, 114), (90, 115), (90, 116), (90, 124), (90, 125), (90, 126), (90, 127), (90, 128), (90, 130), (90, 138), (90, 139), (91, 101), (91, 113), (91, 117), (91, 118), (91, 120), (91, 121), (91, 122), (91, 123), (91, 124), (91, 125), (91, 126), (91, 127), (91, 128), (91, 129), (91, 131), (91, 132), (91, 136), (91, 138), (92, 100), (92, 114), (92, 119), (92, 121), (92, 122), (92, 123), (92, 124), (92, 125), (92, 126), (92, 127), (92, 128), (92, 129), (92, 130), (92, 133), (92, 134), (92, 135), (92, 138), (93, 99), (93, 120), (93, 122), (93, 123), (93, 124), (93, 125), (93, 126), (93, 127), (93, 128), (93, 129), (93, 130), (93, 131), (93, 132), (93, 133), (93, 135), (93, 139), (94, 98), (94, 121), (94, 123), (94, 124), (94, 125), (94, 126), (94, 127), (94, 128), (94, 129), (94, 130), (94, 131), (94, 132), (94, 133), (94, 134), (94, 137), (94, 141), (95, 94), (95, 97), (95, 121), (95, 123), (95, 124), (95, 125), (95, 126), (95, 127), (95, 128), (95, 129), (95, 130), (95, 131), (95, 132), (95, 133), (95, 135), (95, 139), (95, 141), (96, 89), (96, 121), (96, 123), (96, 124), (96, 125), (96, 126), (96, 127), (96, 128), (96, 129), (96, 130), (96, 131), (96, 132), (96, 134), (97, 107), (97, 109), (97, 110), (97, 111), (97, 113), (97, 121), (97, 123), (97, 124), (97, 125), (97, 126), (97, 127), (97, 128), (97, 129), (97, 130), (97, 131), (97, 133), (98, 106), (98, 114), (98, 120), (98, 122), (98, 123), (98, 124), (98, 125), (98, 126), (98, 127), (98, 128), (98, 129), (98, 130), (98, 131), (98, 133), (99, 105), (99, 110), (99, 111), (99, 112), (99, 113), (99, 116), (99, 120), (99, 122), (99, 123), (99, 124), (99, 125), (99, 126), (99, 127), (99, 128), (99, 129), (99, 130), (99, 131), (99, 133), (100, 104), (100, 107), (100, 108), (100, 109), (100, 112), (100, 113), (100, 114), (100, 117), (100, 118), (100, 120), (100, 121), (100, 122), (100, 123), (100, 124), (100, 125), (100, 126), (100, 127), (100, 128), (100, 129), (100, 130), (100, 132), (101, 103), (101, 106), (101, 110), (101, 113), (101, 114), (101, 115), (101, 116), (101, 120), (101, 121), (101, 122), (101, 123), (101, 124), (101, 125), (101, 126), (101, 127), (101, 128), (101, 129), (101, 130), (101, 132), (102, 101), (102, 105), (102, 112), (102, 114), (102, 115), (102, 116), (102, 117), (102, 118), (102, 119), (102, 120), (102, 121), (102, 122), (102, 123), (102, 124), (102, 125), (102, 126), (102, 127), (102, 128), (102, 129), (102, 130), (102, 132), (103, 94), (103, 96), (103, 97), (103, 98), (103, 99), (103, 100), (103, 101), (103, 102), (103, 103), (103, 113), (103, 115), (103, 116), (103, 117), (103, 118), (103, 119), (103, 120), (103, 121), (103, 122), (103, 123), (103, 124), (103, 125), (103, 126), (103, 127), (103, 128), (103, 132), (104, 83), (104, 94), (104, 100), (104, 113), (104, 115), (104, 116), (104, 117), (104, 118), (104, 119), (104, 120), (104, 124), (104, 125), (104, 126), (104, 127), (104, 130), (104, 132), (105, 83), (105, 94), (105, 96), (105, 98), (105, 113), (105, 115), (105, 116), (105, 117), (105, 118), (105, 119), (105, 121), (105, 122), (105, 125), (105, 126), (105, 128), (105, 132), (106, 82), (106, 84), (106, 94), (106, 97), (106, 113), (106, 116), (106, 117), (106, 120), (106, 124), (106, 127), (106, 132), (107, 82), (107, 84), (107, 94), (107, 96), (107, 114), (107, 116), (107, 119), (107, 125), (107, 127), (108, 82), (108, 84), (108, 95), (108, 116), (108, 118), (108, 125), (108, 126), (108, 133), (109, 81), (109, 85), (109, 93), (109, 94), (109, 116), (109, 117), (109, 125), (109, 126), (109, 133), (110, 81), (110, 83), (110, 84), (110, 86), (110, 93), (110, 94), (110, 115), (110, 116), (110, 126), (110, 133), (111, 85), (111, 93), (111, 94), (111, 114), (111, 115), (111, 124), (111, 126), (112, 87), (112, 88), (112, 93), (112, 94), (112, 100), (112, 113), (112, 114), (112, 123), (112, 126), (112, 134), (113, 88), (113, 90), (113, 91), (113, 93), (113, 94), (113, 99), (113, 112), (113, 113), (113, 123), (113, 127), (113, 134), (114, 89), (114, 96), (114, 98), (114, 111), (114, 112), (114, 122), (114, 124), (114, 125), (114, 127), (114, 134), (115, 90), (115, 92), (115, 93), (115, 94), (115, 95), (115, 96), (115, 98), (115, 110), (115, 112), (115, 127), (116, 91), (116, 98), (116, 110), (116, 112), (116, 127), (117, 98), (117, 109), (117, 112), (118, 98), (118, 109), (118, 112), (119, 108), (119, 109))
coordinates_771286 = ((142, 125), (143, 125))
coordinates_781286 = ((102, 125), (103, 126), (104, 125))
coordinates_dcf8_a4 = ((104, 152), (105, 152), (105, 162), (108, 161), (109, 161), (110, 161), (111, 161), (112, 160), (113, 160), (114, 159), (115, 159), (116, 159), (117, 158), (118, 157))
coordinates_dbf8_a4 = ((132, 157), (133, 157), (134, 158), (135, 158), (135, 159), (136, 159), (137, 160), (138, 160), (139, 160), (140, 160), (145, 152), (150, 162), (151, 162))
coordinates_60_cc60 = ((81, 159), (81, 162), (82, 156), (82, 163), (83, 154), (83, 155), (83, 159), (83, 160), (83, 161), (83, 163), (84, 153), (84, 156), (84, 157), (84, 158), (84, 159), (84, 160), (84, 161), (84, 162), (84, 164), (85, 153), (85, 155), (85, 156), (85, 157), (85, 158), (85, 159), (85, 160), (85, 161), (85, 162), (85, 163), (85, 165), (86, 153), (86, 155), (86, 156), (86, 157), (86, 158), (86, 159), (86, 160), (86, 161), (86, 162), (86, 163), (86, 164), (86, 166), (87, 152), (87, 153), (87, 154), (87, 155), (87, 156), (87, 157), (87, 158), (87, 159), (87, 160), (87, 161), (87, 162), (87, 163), (87, 164), (87, 165), (87, 167), (88, 150), (88, 153), (88, 154), (88, 155), (88, 156), (88, 157), (88, 158), (88, 159), (88, 160), (88, 161), (88, 162), (88, 163), (88, 164), (88, 165), (88, 166), (88, 169), (89, 150), (89, 152), (89, 153), (89, 154), (89, 155), (89, 156), (89, 157), (89, 158), (89, 159), (89, 160), (89, 161), (89, 162), (89, 163), (89, 164), (89, 165), (89, 166), (89, 167), (89, 170), (90, 150), (90, 152), (90, 153), (90, 154), (90, 155), (90, 156), (90, 157), (90, 158), (90, 159), (90, 160), (90, 161), (90, 162), (90, 163), (90, 164), (90, 165), (90, 166), (90, 167), (90, 168), (90, 170), (91, 150), (91, 152), (91, 153), (91, 154), (91, 155), (91, 156), (91, 157), (91, 158), (91, 159), (91, 160), (91, 161), (91, 162), (91, 163), (91, 164), (91, 165), (91, 166), (91, 167), (91, 168), (91, 170), (92, 149), (92, 151), (92, 152), (92, 153), (92, 154), (92, 155), (92, 156), (92, 157), (92, 158), (92, 159), (92, 160), (92, 161), (92, 162), (92, 163), (92, 164), (92, 165), (92, 166), (92, 167), (92, 168), (92, 170), (93, 149), (93, 151), (93, 152), (93, 153), (93, 154), (93, 155), (93, 156), (93, 157), (93, 158), (93, 159), (93, 160), (93, 161), (93, 162), (93, 163), (93, 164), (93, 165), (93, 166), (93, 167), (93, 168), (93, 169), (93, 171), (94, 148), (94, 150), (94, 151), (94, 152), (94, 153), (94, 154), (94, 155), (94, 156), (94, 157), (94, 158), (94, 159), (94, 160), (94, 161), (94, 162), (94, 163), (94, 164), (94, 165), (94, 166), (94, 167), (94, 168), (94, 169), (94, 171), (95, 148), (95, 150), (95, 151), (95, 152), (95, 153), (95, 154), (95, 155), (95, 156), (95, 157), (95, 158), (95, 159), (95, 160), (95, 161), (95, 162), (95, 163), (95, 164), (95, 165), (95, 166), (95, 167), (95, 168), (95, 169), (95, 170), (95, 172), (96, 148), (96, 150), (96, 151), (96, 152), (96, 153), (96, 154), (96, 155), (96, 156), (96, 157), (96, 158), (96, 159), (96, 160), (96, 161), (96, 162), (96, 163), (96, 164), (96, 165), (96, 166), (96, 167), (96, 168), (96, 169), (96, 170), (96, 172), (97, 148), (97, 150), (97, 151), (97, 152), (97, 153), (97, 154), (97, 155), (97, 156), (97, 157), (97, 158), (97, 159), (97, 160), (97, 161), (97, 162), (97, 164), (97, 165), (97, 166), (97, 167), (97, 168), (97, 169), (97, 170), (97, 171), (97, 173), (98, 147), (98, 149), (98, 150), (98, 151), (98, 152), (98, 153), (98, 154), (98, 155), (98, 156), (98, 157), (98, 158), (98, 159), (98, 160), (98, 161), (98, 162), (98, 164), (98, 165), (98, 166), (98, 167), (98, 168), (98, 169), (98, 170), (98, 171), (98, 173), (99, 147), (99, 149), (99, 150), (99, 151), (99, 152), (99, 153), (99, 154), (99, 155), (99, 156), (99, 157), (99, 158), (99, 159), (99, 160), (99, 161), (99, 164), (99, 166), (99, 167), (99, 168), (99, 169), (99, 170), (99, 171), (99, 173), (100, 147), (100, 149), (100, 150), (100, 151), (100, 154), (100, 155), (100, 156), (100, 157), (100, 158), (100, 159), (100, 161), (100, 164), (100, 166), (100, 167), (100, 168), (100, 169), (100, 170), (100, 171), (100, 172), (100, 174), (101, 146), (101, 148), (101, 149), (101, 150), (101, 151), (101, 153), (101, 154), (101, 155), (101, 156), (101, 157), (101, 158), (101, 159), (101, 161), (101, 164), (101, 166), (101, 167), (101, 168), (101, 169), (101, 170), (101, 171), (101, 172), (101, 174), (102, 146), (102, 148), (102, 149), (102, 151), (102, 154), (102, 156), (102, 157), (102, 158), (102, 159), (102, 161), (102, 164), (102, 166), (102, 167), (102, 168), (102, 169), (102, 170), (102, 171), (102, 172), (102, 174), (103, 146), (103, 148), (103, 149), (103, 150), (103, 154), (103, 156), (103, 157), (103, 158), (103, 159), (103, 161), (103, 164), (103, 166), (103, 167), (103, 168), (103, 169), (103, 170), (103, 171), (103, 172), (103, 174), (104, 145), (104, 147), (104, 149), (104, 150), (104, 154), (104, 156), (104, 157), (104, 158), (104, 160), (104, 164), (104, 166), (104, 167), (104, 168), (104, 169), (104, 170), (104, 171), (104, 172), (104, 174), (105, 145), (105, 147), (105, 149), (105, 154), (105, 156), (105, 157), (105, 158), (105, 160), (105, 164), (105, 166), (105, 167), (105, 168), (105, 169), (105, 170), (105, 171), (105, 172), (105, 174), (106, 145), (106, 147), (106, 149), (106, 154), (106, 156), (106, 157), (106, 158), (106, 160), (106, 164), (106, 166), (106, 167), (106, 168), (106, 169), (106, 170), (106, 171), (106, 172), (106, 174), (107, 145), (107, 147), (107, 149), (107, 153), (107, 155), (107, 156), (107, 157), (107, 158), (107, 160), (107, 163), (107, 165), (107, 166), (107, 167), (107, 168), (107, 169), (107, 170), (107, 171), (107, 172), (107, 174), (108, 144), (108, 146), (108, 147), (108, 149), (108, 153), (108, 155), (108, 156), (108, 157), (108, 159), (108, 163), (108, 165), (108, 166), (108, 167), (108, 168), (108, 169), (108, 170), (108, 171), (108, 172), (108, 174), (109, 144), (109, 146), (109, 147), (109, 148), (109, 149), (109, 153), (109, 154), (109, 155), (109, 156), (109, 157), (109, 159), (109, 163), (109, 165), (109, 166), (109, 167), (109, 168), (109, 169), (109, 170), (109, 171), (109, 173), (110, 144), (110, 146), (110, 147), (110, 148), (110, 149), (110, 150), (110, 153), (110, 154), (110, 155), (110, 156), (110, 157), (110, 159), (110, 163), (110, 165), (110, 166), (110, 167), (110, 168), (110, 169), (110, 170), (110, 171), (110, 173), (111, 143), (111, 145), (111, 146), (111, 147), (111, 148), (111, 149), (111, 150), (111, 152), (111, 153), (111, 154), (111, 155), (111, 156), (111, 158), (111, 163), (111, 165), (111, 166), (111, 167), (111, 168), (111, 169), (111, 170), (111, 171), (111, 173), (112, 142), (112, 144), (112, 145), (112, 146), (112, 147), (112, 148), (112, 149), (112, 150), (112, 151), (112, 152), (112, 153), (112, 154), (112, 155), (112, 156), (112, 158), (112, 163), (112, 165), (112, 166), (112, 167), (112, 168), (112, 169), (112, 170), (112, 171), (112, 173), (113, 140), (113, 143), (113, 144), (113, 145), (113, 146), (113, 147), (113, 148), (113, 149), (113, 150), (113, 151), (113, 152), (113, 153), (113, 154), (113, 155), (113, 156), (113, 158), (113, 162), (113, 164), (113, 165), (113, 166), (113, 167), (113, 168), (113, 169), (113, 170), (113, 171), (113, 173), (114, 140), (114, 142), (114, 143), (114, 144), (114, 145), (114, 146), (114, 147), (114, 148), (114, 149), (114, 150), (114, 151), (114, 152), (114, 153), (114, 154), (114, 155), (114, 157), (114, 162), (114, 164), (114, 165), (114, 166), (114, 167), (114, 168), (114, 169), (114, 170), (114, 171), (114, 173), (115, 140), (115, 142), (115, 143), (115, 144), (115, 145), (115, 146), (115, 147), (115, 148), (115, 149), (115, 150), (115, 151), (115, 152), (115, 153), (115, 154), (115, 155), (115, 157), (115, 161), (115, 163), (115, 164), (115, 165), (115, 166), (115, 167), (115, 168), (115, 169), (115, 170), (115, 171), (115, 173), (116, 140), (116, 142), (116, 143), (116, 144), (116, 145), (116, 146), (116, 147), (116, 148), (116, 149), (116, 150), (116, 151), (116, 152), (116, 153), (116, 154), (116, 156), (116, 161), (116, 163), (116, 164), (116, 165), (116, 166), (116, 167), (116, 168), (116, 169), (116, 170), (116, 172), (117, 140), (117, 147), (117, 148), (117, 149), (117, 150), (117, 151), (117, 152), (117, 153), (117, 155), (117, 160), (117, 161), (117, 162), (117, 163), (117, 164), (117, 165), (117, 166), (117, 167), (117, 168), (117, 169), (117, 170), (117, 172), (118, 140), (118, 142), (118, 143), (118, 144), (118, 145), (118, 146), (118, 148), (118, 149), (118, 150), (118, 151), (118, 152), (118, 154), (118, 160), (118, 162), (118, 163), (118, 164), (118, 165), (118, 166), (118, 167), (118, 168), (118, 169), (118, 171), (119, 152), (119, 154), (119, 159), (119, 161), (119, 162), (119, 163), (119, 164), (119, 165), (119, 166), (119, 167), (119, 168), (119, 169), (119, 171), (120, 148), (120, 150), (120, 152), (120, 153), (120, 154), (120, 155), (120, 158), (120, 160), (120, 161), (120, 162), (120, 163), (120, 164), (120, 165), (120, 166), (120, 167), (120, 168), (120, 170), (121, 152), (121, 154), (121, 159), (121, 160), (121, 161), (121, 162), (121, 163), (121, 164), (121, 165), (121, 166), (121, 167), (121, 168), (121, 170), (122, 152), (122, 169), (123, 153), (123, 155), (123, 156), (123, 157), (123, 158), (123, 159), (123, 160), (123, 161), (123, 162), (123, 163), (123, 164), (123, 165), (123, 166), (123, 168))
coordinates_5_fcc60 = ((125, 166), (126, 155), (126, 157), (126, 158), (126, 159), (126, 160), (126, 161), (126, 162), (126, 163), (126, 164), (126, 166), (127, 154), (128, 149), (128, 151), (128, 152), (128, 155), (128, 156), (128, 157), (128, 158), (128, 159), (128, 160), (128, 161), (128, 162), (128, 163), (128, 164), (128, 165), (128, 166), (128, 170), (129, 148), (129, 153), (129, 154), (129, 155), (129, 156), (129, 157), (129, 158), (129, 159), (129, 160), (129, 161), (129, 162), (129, 163), (129, 164), (129, 165), (129, 166), (129, 167), (129, 168), (129, 170), (130, 145), (130, 146), (130, 149), (130, 150), (130, 151), (130, 152), (130, 153), (130, 154), (130, 155), (130, 156), (130, 157), (130, 158), (130, 159), (130, 160), (130, 161), (130, 162), (130, 163), (130, 164), (130, 165), (130, 166), (130, 167), (130, 168), (130, 169), (130, 171), (131, 141), (131, 142), (131, 143), (131, 144), (131, 148), (131, 149), (131, 150), (131, 151), (131, 152), (131, 153), (131, 154), (131, 155), (131, 156), (131, 157), (131, 158), (131, 159), (131, 160), (131, 161), (131, 162), (131, 163), (131, 164), (131, 165), (131, 166), (131, 167), (131, 168), (131, 169), (131, 171), (132, 142), (132, 145), (132, 146), (132, 147), (132, 148), (132, 149), (132, 150), (132, 151), (132, 152), (132, 153), (132, 154), (132, 155), (132, 156), (132, 157), (132, 158), (132, 159), (132, 160), (132, 161), (132, 162), (132, 163), (132, 164), (132, 165), (132, 166), (132, 167), (132, 168), (132, 169), (132, 171), (133, 142), (133, 144), (133, 145), (133, 146), (133, 147), (133, 148), (133, 149), (133, 150), (133, 151), (133, 152), (133, 153), (133, 154), (133, 155), (133, 156), (133, 157), (133, 158), (133, 159), (133, 160), (133, 161), (133, 162), (133, 163), (133, 164), (133, 165), (133, 166), (133, 167), (133, 168), (133, 169), (133, 170), (133, 172), (134, 142), (134, 144), (134, 145), (134, 146), (134, 147), (134, 148), (134, 149), (134, 150), (134, 151), (134, 152), (134, 153), (134, 154), (134, 155), (134, 156), (134, 157), (134, 158), (134, 159), (134, 160), (134, 161), (134, 162), (134, 163), (134, 164), (134, 165), (134, 166), (134, 167), (134, 168), (134, 169), (134, 170), (134, 172), (135, 142), (135, 144), (135, 145), (135, 146), (135, 147), (135, 148), (135, 149), (135, 150), (135, 151), (135, 152), (135, 153), (135, 154), (135, 155), (135, 156), (135, 157), (135, 158), (135, 159), (135, 160), (135, 161), (135, 162), (135, 163), (135, 164), (135, 165), (135, 166), (135, 167), (135, 168), (135, 169), (135, 170), (135, 172), (136, 142), (136, 144), (136, 145), (136, 146), (136, 147), (136, 148), (136, 149), (136, 150), (136, 151), (136, 152), (136, 153), (136, 154), (136, 155), (136, 156), (136, 157), (136, 158), (136, 159), (136, 160), (136, 161), (136, 162), (136, 163), (136, 164), (136, 165), (136, 166), (136, 167), (136, 168), (136, 169), (136, 170), (136, 172), (137, 142), (137, 144), (137, 145), (137, 146), (137, 147), (137, 148), (137, 149), (137, 150), (137, 151), (137, 152), (137, 153), (137, 154), (137, 155), (137, 156), (137, 157), (137, 158), (137, 159), (137, 160), (137, 161), (137, 162), (137, 163), (137, 164), (137, 165), (137, 166), (137, 167), (137, 168), (137, 169), (137, 170), (137, 171), (137, 173), (138, 143), (138, 145), (138, 146), (138, 147), (138, 148), (138, 149), (138, 150), (138, 151), (138, 152), (138, 153), (138, 154), (138, 155), (138, 156), (138, 157), (138, 158), (138, 159), (138, 160), (138, 161), (138, 162), (138, 163), (138, 164), (138, 165), (138, 166), (138, 167), (138, 168), (138, 169), (138, 170), (138, 171), (138, 173), (139, 143), (139, 145), (139, 146), (139, 147), (139, 148), (139, 149), (139, 150), (139, 151), (139, 152), (139, 153), (139, 154), (139, 155), (139, 156), (139, 157), (139, 158), (139, 159), (139, 160), (139, 161), (139, 162), (139, 163), (139, 164), (139, 165), (139, 166), (139, 167), (139, 168), (139, 169), (139, 170), (139, 171), (139, 173), (140, 143), (140, 145), (140, 146), (140, 147), (140, 148), (140, 149), (140, 150), (140, 151), (140, 152), (140, 153), (140, 154), (140, 155), (140, 156), (140, 157), (140, 158), (140, 159), (140, 160), (140, 161), (140, 162), (140, 163), (140, 164), (140, 165), (140, 166), (140, 167), (140, 168), (140, 169), (140, 170), (140, 171), (140, 173), (141, 143), (141, 145), (141, 146), (141, 147), (141, 148), (141, 149), (141, 150), (141, 151), (141, 152), (141, 153), (141, 154), (141, 155), (141, 156), (141, 157), (141, 158), (141, 159), (141, 160), (141, 161), (141, 162), (141, 163), (141, 164), (141, 165), (141, 166), (141, 167), (141, 168), (141, 169), (141, 170), (141, 171), (141, 172), (141, 174), (142, 144), (142, 146), (142, 147), (142, 148), (142, 149), (142, 150), (142, 151), (142, 152), (142, 153), (142, 154), (142, 155), (142, 156), (142, 157), (142, 158), (142, 159), (142, 160), (142, 161), (142, 162), (142, 163), (142, 164), (142, 165), (142, 166), (142, 167), (142, 168), (142, 169), (142, 170), (142, 171), (142, 172), (142, 174), (143, 144), (143, 146), (143, 147), (143, 148), (143, 149), (143, 150), (143, 151), (143, 152), (143, 153), (143, 154), (143, 155), (143, 156), (143, 157), (143, 158), (143, 159), (143, 160), (143, 161), (143, 162), (143, 163), (143, 164), (143, 165), (143, 166), (143, 167), (143, 168), (143, 169), (143, 170), (143, 171), (143, 172), (143, 174), (144, 144), (144, 146), (144, 147), (144, 148), (144, 149), (144, 150), (144, 151), (144, 152), (144, 153), (144, 154), (144, 155), (144, 156), (144, 157), (144, 158), (144, 159), (144, 160), (144, 161), (144, 162), (144, 163), (144, 164), (144, 165), (144, 166), (144, 167), (144, 168), (144, 169), (144, 170), (144, 171), (144, 172), (144, 174), (145, 144), (145, 146), (145, 147), (145, 148), (145, 149), (145, 150), (145, 151), (145, 152), (145, 153), (145, 154), (145, 155), (145, 156), (145, 157), (145, 158), (145, 159), (145, 160), (145, 161), (145, 162), (145, 163), (145, 164), (145, 165), (145, 166), (145, 167), (145, 168), (145, 169), (145, 170), (145, 171), (145, 172), (145, 174), (146, 144), (146, 146), (146, 147), (146, 148), (146, 149), (146, 150), (146, 151), (146, 152), (146, 153), (146, 154), (146, 155), (146, 156), (146, 157), (146, 158), (146, 159), (146, 160), (146, 161), (146, 162), (146, 163), (146, 164), (146, 165), (146, 166), (146, 167), (146, 168), (146, 169), (146, 170), (146, 171), (146, 173), (147, 145), (147, 147), (147, 148), (147, 149), (147, 150), (147, 151), (147, 152), (147, 153), (147, 154), (147, 155), (147, 156), (147, 157), (147, 158), (147, 159), (147, 160), (147, 161), (147, 162), (147, 163), (147, 164), (147, 165), (147, 166), (147, 167), (147, 168), (147, 169), (147, 170), (147, 171), (147, 173), (148, 146), (148, 148), (148, 149), (148, 150), (148, 151), (148, 152), (148, 153), (148, 154), (148, 155), (148, 156), (148, 157), (148, 158), (148, 159), (148, 160), (148, 161), (148, 162), (148, 163), (148, 164), (148, 165), (148, 166), (148, 167), (148, 168), (148, 169), (148, 170), (148, 171), (148, 173), (149, 145), (149, 147), (149, 148), (149, 149), (149, 150), (149, 151), (149, 152), (149, 153), (149, 154), (149, 155), (149, 156), (149, 157), (149, 158), (149, 159), (149, 160), (149, 161), (149, 162), (149, 163), (149, 164), (149, 165), (149, 166), (149, 167), (149, 168), (149, 169), (149, 170), (149, 171), (149, 173), (150, 145), (150, 147), (150, 148), (150, 149), (150, 150), (150, 151), (150, 152), (150, 153), (150, 154), (150, 155), (150, 156), (150, 157), (150, 158), (150, 159), (150, 160), (150, 161), (150, 162), (150, 163), (150, 164), (150, 165), (150, 166), (150, 167), (150, 168), (150, 169), (150, 170), (150, 171), (150, 173), (151, 146), (151, 148), (151, 149), (151, 150), (151, 151), (151, 152), (151, 153), (151, 154), (151, 155), (151, 156), (151, 157), (151, 158), (151, 159), (151, 160), (151, 161), (151, 162), (151, 163), (151, 164), (151, 165), (151, 166), (151, 167), (151, 168), (151, 169), (151, 170), (151, 172), (152, 147), (152, 149), (152, 150), (152, 151), (152, 152), (152, 153), (152, 154), (152, 155), (152, 156), (152, 157), (152, 158), (152, 159), (152, 160), (152, 161), (152, 162), (152, 163), (152, 164), (152, 165), (152, 166), (152, 167), (152, 168), (152, 169), (152, 170), (152, 172), (153, 147), (153, 149), (153, 150), (153, 151), (153, 152), (153, 153), (153, 154), (153, 155), (153, 156), (153, 157), (153, 158), (153, 159), (153, 160), (153, 161), (153, 162), (153, 163), (153, 164), (153, 165), (153, 166), (153, 167), (153, 168), (153, 169), (153, 171), (154, 147), (154, 149), (154, 150), (154, 151), (154, 152), (154, 153), (154, 154), (154, 155), (154, 156), (154, 157), (154, 158), (154, 159), (154, 160), (154, 161), (154, 162), (154, 163), (154, 164), (154, 165), (154, 166), (154, 167), (154, 168), (154, 169), (154, 171), (155, 147), (155, 149), (155, 150), (155, 151), (155, 152), (155, 153), (155, 154), (155, 155), (155, 156), (155, 157), (155, 158), (155, 159), (155, 160), (155, 161), (155, 162), (155, 163), (155, 164), (155, 165), (155, 166), (155, 167), (155, 168), (155, 170), (156, 147), (156, 149), (156, 150), (156, 151), (156, 152), (156, 153), (156, 154), (156, 155), (156, 156), (156, 157), (156, 158), (156, 159), (156, 160), (156, 161), (156, 162), (156, 163), (156, 164), (156, 165), (156, 166), (156, 167), (156, 169), (157, 148), (157, 150), (157, 151), (157, 152), (157, 153), (157, 154), (157, 155), (157, 156), (157, 157), (157, 158), (157, 159), (157, 160), (157, 161), (157, 162), (157, 163), (157, 164), (157, 165), (157, 166), (157, 167), (157, 169), (158, 149), (158, 151), (158, 152), (158, 153), (158, 154), (158, 155), (158, 156), (158, 157), (158, 158), (158, 159), (158, 160), (158, 161), (158, 162), (158, 163), (158, 164), (158, 165), (158, 166), (158, 168), (159, 150), (159, 152), (159, 153), (159, 154), (159, 155), (159, 156), (159, 157), (159, 158), (159, 159), (159, 160), (159, 161), (159, 162), (159, 163), (159, 164), (159, 165), (159, 166), (159, 168), (160, 150), (160, 152), (160, 153), (160, 154), (160, 155), (160, 156), (160, 157), (160, 158), (160, 159), (160, 160), (160, 161), (160, 162), (160, 163), (160, 164), (160, 165), (160, 167), (161, 151), (161, 153), (161, 154), (161, 155), (161, 156), (161, 157), (161, 158), (161, 159), (161, 160), (161, 161), (161, 162), (161, 163), (161, 164), (161, 166), (162, 151), (162, 153), (162, 154), (162, 155), (162, 156), (162, 157), (162, 160), (162, 161), (162, 162), (162, 163), (162, 166), (163, 152), (163, 153), (163, 154), (163, 155), (163, 156), (163, 158), (163, 159), (163, 165), (164, 152), (164, 154), (164, 155), (164, 156), (164, 160), (164, 161), (164, 163), (165, 152), (165, 154), (165, 156), (166, 153), (166, 155), (167, 154), (167, 155))
coordinates_f4_deb3 = ((130, 78), (130, 79), (131, 78), (131, 80), (132, 77), (132, 80), (133, 77), (133, 79), (133, 80), (133, 82), (133, 83), (133, 84), (133, 85), (134, 77), (134, 79), (134, 80), (134, 87), (134, 97), (135, 77), (135, 79), (135, 80), (135, 81), (135, 82), (135, 83), (135, 84), (135, 85), (135, 88), (135, 94), (135, 96), (136, 77), (136, 79), (136, 80), (136, 81), (136, 82), (136, 83), (136, 84), (136, 85), (136, 86), (136, 87), (136, 94), (136, 96), (137, 77), (137, 79), (137, 80), (137, 81), (137, 82), (137, 83), (137, 84), (137, 85), (137, 86), (137, 87), (137, 89), (137, 94), (137, 96), (138, 77), (138, 82), (138, 83), (138, 84), (138, 85), (138, 86), (138, 88), (138, 96), (139, 79), (139, 80), (139, 81), (139, 82), (139, 83), (139, 84), (139, 85), (139, 87), (139, 95), (139, 97), (140, 83), (140, 86), (140, 96), (140, 97), (141, 83), (141, 85), (141, 97), (142, 82), (142, 84), (143, 81), (143, 83), (144, 80), (144, 82), (144, 83), (144, 87), (144, 89), (144, 90), (144, 91), (144, 92), (145, 80), (145, 83), (145, 86), (145, 89), (145, 93), (145, 95), (146, 80), (146, 82), (146, 84), (146, 87), (146, 96), (147, 83), (147, 85))
coordinates_26408_b = ((123, 88), (123, 90), (123, 91), (123, 92), (123, 93), (123, 94), (123, 95), (124, 86), (124, 93), (124, 96), (124, 97), (124, 98), (124, 99), (124, 100), (124, 101), (124, 102), (124, 103), (124, 104), (124, 105), (124, 106), (124, 108), (125, 85), (125, 88), (125, 89), (125, 91), (125, 94), (125, 95), (125, 108), (126, 84), (126, 86), (126, 87), (126, 88), (126, 90), (126, 95), (126, 97), (126, 98), (126, 99), (126, 100), (126, 101), (126, 102), (126, 103), (126, 104), (126, 105), (126, 106), (126, 108), (127, 81), (127, 89), (127, 95), (127, 97), (127, 98), (127, 99), (127, 100), (127, 101), (127, 102), (127, 103), (127, 104), (127, 105), (127, 106), (127, 108), (128, 80), (128, 84), (128, 85), (128, 86), (128, 87), (128, 94), (128, 96), (128, 97), (128, 98), (128, 99), (128, 100), (128, 101), (128, 102), (128, 103), (128, 104), (128, 105), (128, 108), (129, 81), (129, 83), (129, 94), (129, 97), (129, 98), (129, 99), (129, 100), (129, 101), (129, 102), (129, 103), (129, 107), (130, 93), (130, 96), (130, 105), (131, 94), (131, 97), (131, 99), (131, 100), (131, 101), (131, 103), (133, 93))
coordinates_f5_deb3 = ((94, 106), (95, 105), (95, 106), (96, 104), (97, 103), (97, 105), (98, 103), (99, 81), (99, 83), (99, 101), (99, 102), (100, 80), (100, 85), (100, 97), (100, 98), (100, 99), (100, 101), (101, 80), (101, 82), (101, 86), (101, 93), (101, 94), (101, 95), (101, 96), (101, 97), (101, 98), (101, 100), (102, 79), (102, 81), (102, 83), (102, 86), (102, 91), (102, 92), (103, 79), (103, 81), (103, 82), (103, 85), (103, 86), (103, 90), (103, 92), (104, 79), (104, 81), (104, 85), (104, 86), (104, 90), (104, 92), (105, 78), (105, 81), (105, 86), (105, 90), (106, 78), (106, 80), (106, 86), (106, 90), (106, 91), (107, 78), (107, 80), (107, 86), (107, 90), (107, 91), (108, 77), (108, 79), (108, 87), (108, 91), (109, 77), (109, 79), (109, 87), (109, 91), (110, 77), (110, 79), (110, 88), (110, 91), (111, 77), (111, 79), (111, 89), (111, 91), (112, 77), (112, 79), (113, 77), (113, 79), (114, 77), (114, 79), (115, 77), (115, 78))
coordinates_016400 = ((123, 130), (123, 132), (123, 133), (124, 132), (124, 134), (124, 135), (124, 136), (124, 138), (125, 134), (126, 134), (126, 136), (126, 137), (126, 139), (127, 134), (127, 136), (127, 137), (127, 139), (128, 134), (128, 136), (128, 137), (128, 139), (129, 135), (129, 137), (129, 139), (130, 135), (130, 137), (130, 139), (131, 135), (131, 137), (131, 139), (132, 134), (132, 136), (132, 140), (133, 133), (133, 135), (133, 138), (133, 140), (134, 133), (134, 136), (134, 140), (135, 132), (135, 135), (135, 140), (136, 131), (136, 134), (136, 140), (137, 130), (137, 133), (137, 140), (138, 129), (138, 133), (138, 139), (138, 140), (139, 129), (139, 132), (139, 138), (139, 141), (140, 130), (140, 137), (140, 139), (140, 141), (141, 137), (141, 139), (141, 141), (142, 138), (142, 141), (143, 139), (143, 141), (144, 140), (144, 142), (145, 142), (146, 137), (146, 140), (146, 142), (147, 137), (147, 139), (148, 136))
coordinates_cc5_b45 = ((147, 89), (147, 91), (147, 92), (147, 93), (147, 94), (148, 87), (148, 97), (149, 86), (149, 89), (149, 90), (149, 91), (149, 92), (149, 93), (149, 94), (149, 95), (149, 97), (150, 86), (150, 88), (150, 89), (150, 90), (150, 91), (150, 92), (150, 93), (150, 96), (150, 97), (151, 86), (151, 88), (151, 89), (151, 90), (151, 91), (151, 93), (152, 86), (152, 88), (152, 89), (152, 90), (152, 91), (152, 93), (153, 86), (153, 88), (153, 89), (153, 90), (153, 91), (153, 92), (153, 94), (154, 87), (154, 89), (154, 90), (154, 91), (154, 92), (154, 94), (155, 87), (155, 89), (155, 90), (155, 91), (155, 92), (155, 93), (155, 95), (156, 88), (156, 90), (156, 91), (156, 92), (156, 94), (156, 96), (157, 88), (157, 90), (157, 91), (157, 96), (158, 89), (158, 94), (158, 96), (159, 90), (159, 91))
coordinates_27408_b = ((104, 105), (105, 102), (105, 105), (106, 100), (106, 105), (107, 98), (107, 99), (107, 102), (107, 103), (107, 105), (108, 97), (108, 100), (108, 101), (108, 102), (108, 103), (108, 105), (109, 97), (109, 102), (109, 103), (109, 104), (109, 106), (110, 96), (110, 100), (110, 101), (110, 102), (110, 103), (110, 104), (110, 106), (111, 96), (111, 98), (111, 102), (111, 104), (111, 106), (112, 82), (112, 96), (112, 97), (112, 102), (112, 104), (112, 106), (113, 81), (113, 85), (113, 102), (113, 105), (114, 81), (114, 83), (114, 86), (114, 101), (114, 103), (114, 105), (115, 80), (115, 82), (115, 83), (115, 84), (115, 85), (115, 87), (115, 100), (115, 102), (115, 104), (116, 81), (116, 82), (116, 83), (116, 84), (116, 85), (116, 86), (116, 88), (116, 100), (116, 102), (116, 104), (117, 78), (117, 81), (117, 82), (117, 83), (117, 84), (117, 85), (117, 86), (117, 87), (117, 90), (117, 93), (117, 96), (117, 100), (117, 103), (118, 78), (118, 82), (118, 83), (118, 84), (118, 85), (118, 86), (118, 87), (118, 88), (118, 91), (118, 96), (118, 100), (118, 103), (119, 81), (119, 83), (119, 84), (119, 85), (119, 86), (119, 87), (119, 88), (119, 89), (119, 92), (119, 93), (119, 95), (119, 97), (119, 100), (119, 103), (120, 82), (120, 86), (120, 90), (120, 95), (120, 102), (121, 83), (121, 85), (121, 88), (121, 89), (121, 95), (121, 97), (121, 98), (121, 99), (121, 100), (121, 102), (122, 102))
coordinates_006400 = ((105, 134), (105, 136), (105, 137), (105, 138), (105, 139), (105, 140), (105, 141), (105, 143), (106, 130), (106, 134), (107, 129), (107, 131), (107, 135), (107, 137), (107, 138), (107, 139), (107, 140), (107, 142), (108, 128), (108, 131), (108, 135), (108, 137), (108, 138), (108, 139), (108, 140), (108, 142), (109, 128), (109, 131), (109, 135), (109, 137), (109, 138), (109, 139), (109, 140), (109, 142), (110, 128), (110, 131), (110, 135), (110, 137), (110, 141), (111, 128), (111, 131), (111, 136), (111, 138), (111, 140), (112, 129), (112, 131), (112, 136), (113, 129), (113, 131), (113, 136), (113, 137), (114, 129), (114, 132), (114, 136), (115, 129), (115, 132), (115, 136), (115, 138), (116, 122), (116, 125), (116, 129), (116, 131), (116, 133), (116, 136), (116, 138), (117, 122), (117, 126), (117, 129), (117, 131), (117, 132), (117, 135), (117, 136), (117, 138), (118, 121), (118, 123), (118, 124), (118, 125), (118, 127), (118, 128), (118, 130), (118, 133), (118, 136), (118, 138), (119, 121), (119, 124), (119, 126), (119, 130), (119, 134), (120, 120), (120, 121), (120, 124), (120, 130), (121, 119), (121, 122), (121, 125), (121, 126), (121, 127), (121, 128), (121, 130), (122, 119), (122, 121), (122, 122), (122, 123))
coordinates_cd5_b45 = ((75, 103), (75, 105), (75, 106), (75, 108), (76, 102), (76, 108), (77, 101), (77, 103), (77, 108), (78, 101), (78, 104), (78, 105), (78, 106), (78, 108), (79, 101), (79, 103), (80, 101), (80, 102), (81, 95), (81, 96), (81, 100), (81, 102), (82, 93), (82, 94), (82, 100), (82, 101), (83, 92), (83, 95), (83, 96), (83, 98), (83, 101), (84, 91), (84, 93), (84, 94), (84, 95), (84, 96), (84, 97), (84, 99), (84, 101), (85, 89), (85, 92), (85, 93), (85, 94), (85, 95), (85, 96), (85, 97), (85, 98), (85, 99), (85, 101), (86, 88), (86, 91), (86, 92), (86, 93), (86, 94), (86, 95), (86, 96), (86, 97), (86, 98), (86, 100), (87, 88), (87, 90), (87, 91), (87, 92), (87, 93), (87, 94), (87, 95), (87, 96), (87, 97), (87, 98), (87, 100), (88, 87), (88, 89), (88, 90), (88, 91), (88, 92), (88, 93), (88, 94), (88, 95), (88, 96), (88, 97), (88, 98), (88, 100), (89, 87), (89, 89), (89, 90), (89, 91), (89, 92), (89, 93), (89, 94), (89, 95), (89, 96), (89, 97), (89, 98), (89, 100), (89, 108), (90, 87), (90, 89), (90, 90), (90, 91), (90, 92), (90, 93), (90, 94), (90, 95), (90, 96), (90, 97), (90, 99), (90, 105), (90, 108), (91, 87), (91, 89), (91, 90), (91, 91), (91, 92), (91, 93), (91, 94), (91, 95), (91, 96), (91, 99), (91, 104), (91, 107), (92, 86), (92, 88), (92, 89), (92, 90), (92, 91), (92, 92), (92, 93), (92, 98), (92, 103), (92, 107), (93, 84), (93, 87), (93, 88), (93, 89), (93, 90), (93, 91), (93, 92), (93, 95), (93, 102), (93, 105), (94, 83), (94, 86), (94, 87), (94, 88), (94, 89), (94, 90), (94, 91), (94, 93), (94, 101), (94, 104), (95, 83), (95, 85), (95, 86), (95, 87), (95, 88), (95, 89), (95, 90), (95, 92), (95, 100), (95, 103), (96, 84), (96, 86), (96, 87), (96, 88), (96, 89), (96, 90), (96, 91), (96, 92), (96, 99), (96, 102), (97, 84), (97, 87), (97, 88), (97, 89), (97, 90), (97, 91), (97, 92), (97, 93), (97, 94), (97, 95), (97, 96), (97, 97), (97, 101), (98, 85), (98, 89), (98, 90), (98, 91), (98, 97), (98, 99), (99, 87), (99, 92), (99, 93), (99, 94), (99, 95), (100, 89), (100, 91))
coordinates_6395_ed = ((124, 124), (124, 126), (124, 128), (125, 123), (125, 128), (126, 122), (126, 124), (126, 125), (126, 126), (126, 128), (127, 122), (127, 124), (127, 125), (127, 126), (127, 128), (128, 121), (128, 123), (128, 124), (128, 125), (128, 126), (128, 128), (129, 121), (129, 123), (129, 124), (129, 125), (129, 126), (129, 127), (129, 129), (130, 121), (130, 123), (130, 124), (130, 125), (130, 126), (130, 127), (130, 129), (131, 121), (131, 125), (131, 126), (131, 127), (131, 129), (132, 123), (132, 124), (132, 126), (132, 128), (133, 121), (133, 122), (133, 125), (133, 128), (134, 126), (134, 127))
coordinates_00_fffe = ((148, 142), (149, 138), (149, 139), (149, 140), (149, 143), (150, 142), (150, 143), (151, 142), (151, 144), (152, 142), (152, 144), (153, 142), (153, 143), (153, 145), (154, 136), (154, 138), (154, 139), (154, 140), (154, 142), (154, 143), (154, 145), (155, 138), (155, 141), (155, 142), (155, 143), (155, 145), (156, 140), (156, 142), (156, 143), (156, 145), (157, 141), (157, 144), (158, 142), (158, 144), (159, 143), (159, 144))
coordinates_b4_e7_fa = ((120, 140), (120, 142), (120, 143), (120, 144), (120, 146), (121, 141), (122, 143), (122, 144), (122, 146), (122, 147), (123, 145), (123, 147), (124, 146), (124, 147), (125, 146), (125, 147), (126, 145), (126, 147), (127, 143), (127, 147), (128, 141), (128, 144), (128, 146), (129, 141), (129, 143))
coordinates_f98072 = ((124, 110), (125, 110), (125, 112), (125, 116), (125, 118), (125, 121), (126, 110), (126, 112), (126, 117), (126, 119), (127, 110), (128, 110), (129, 109), (129, 111), (130, 108), (130, 110), (130, 112), (131, 107), (131, 109), (131, 110), (131, 112), (132, 105), (132, 110), (132, 111), (133, 102), (133, 106), (133, 107), (133, 108), (133, 111), (133, 112), (134, 102), (134, 104), (134, 110), (134, 112), (134, 113), (134, 115), (135, 111), (135, 113), (135, 114), (135, 116), (136, 112), (136, 115), (136, 117), (137, 113), (137, 118), (138, 114), (138, 116), (138, 118))
coordinates_97_fb98 = ((156, 137), (157, 137), (157, 138), (158, 138), (158, 139), (159, 138), (159, 140), (160, 121), (160, 130), (160, 131), (160, 133), (160, 134), (160, 135), (160, 136), (160, 137), (160, 138), (160, 139), (160, 141), (161, 121), (161, 130), (161, 138), (161, 139), (161, 140), (161, 144), (162, 129), (162, 131), (162, 132), (162, 133), (162, 134), (162, 135), (162, 136), (162, 137), (162, 138), (162, 139), (162, 140), (162, 141), (163, 120), (163, 129), (163, 131), (163, 132), (163, 133), (163, 134), (163, 135), (163, 136), (163, 137), (163, 138), (163, 139), (163, 140), (163, 143), (164, 119), (164, 120), (164, 128), (164, 130), (164, 131), (164, 132), (164, 133), (164, 134), (164, 135), (164, 136), (164, 137), (164, 138), (164, 139), (164, 141), (165, 120), (165, 128), (165, 129), (165, 130), (165, 131), (165, 132), (165, 133), (165, 134), (165, 135), (165, 136), (165, 137), (165, 138), (165, 139), (165, 141), (166, 118), (166, 120), (166, 127), (166, 129), (166, 130), (166, 133), (166, 134), (166, 135), (166, 136), (166, 137), (166, 138), (166, 140), (167, 117), (167, 120), (167, 126), (167, 128), (167, 129), (167, 132), (167, 135), (167, 136), (167, 137), (167, 138), (167, 140), (168, 116), (168, 118), (168, 120), (168, 126), (168, 128), (168, 130), (168, 133), (168, 134), (168, 140), (169, 116), (169, 118), (169, 120), (169, 125), (169, 127), (169, 130), (169, 135), (169, 136), (169, 137), (169, 138), (169, 140), (170, 116), (170, 118), (170, 119), (170, 120), (170, 122), (170, 123), (170, 126), (170, 129), (171, 116), (171, 127), (171, 128), (172, 118), (172, 120), (172, 121), (172, 122), (172, 123), (172, 124), (172, 125))
coordinates_323287 = ((148, 108), (149, 105), (149, 109), (150, 103), (150, 108), (150, 110), (151, 99), (151, 101), (151, 106), (151, 107), (151, 111), (152, 101), (152, 104), (152, 105), (152, 108), (152, 112), (153, 102), (153, 103), (153, 110), (153, 114), (154, 111), (154, 112), (156, 101), (156, 102), (157, 100), (157, 103), (158, 98), (158, 101), (158, 103), (159, 98), (159, 100), (159, 101), (159, 103), (160, 99), (160, 100), (160, 101), (160, 102), (160, 104), (160, 113), (160, 115), (160, 116), (160, 117), (160, 119), (161, 98), (161, 100), (161, 101), (161, 102), (161, 104), (161, 112), (161, 119), (162, 98), (162, 102), (162, 104), (162, 111), (162, 113), (162, 114), (162, 115), (162, 116), (162, 118), (163, 99), (163, 103), (163, 105), (163, 111), (163, 113), (163, 114), (163, 115), (163, 116), (163, 118), (164, 102), (164, 105), (164, 111), (164, 113), (164, 114), (164, 115), (164, 117), (165, 103), (165, 105), (165, 111), (165, 113), (165, 114), (165, 116), (166, 104), (166, 106), (166, 110), (166, 111), (166, 112), (166, 113), (166, 115), (167, 104), (167, 110), (167, 111), (167, 112), (167, 113), (167, 115), (168, 105), (168, 109), (168, 110), (168, 111), (168, 112), (168, 114), (169, 105), (169, 114), (170, 106), (170, 108), (170, 109), (170, 110), (170, 111), (170, 112))
coordinates_6495_ed = ((107, 121), (108, 120), (108, 123), (109, 119), (109, 121), (109, 123), (110, 118), (110, 120), (110, 122), (111, 117), (111, 120), (111, 122), (112, 116), (112, 118), (112, 119), (112, 121), (113, 115), (113, 118), (113, 120), (114, 114), (114, 117), (114, 118), (114, 120), (115, 114), (115, 116), (115, 117), (115, 119), (116, 114), (116, 116), (116, 117), (116, 119), (117, 114), (117, 116), (117, 118), (118, 114), (118, 116), (118, 118), (119, 117), (120, 115), (120, 117), (121, 116), (121, 117), (122, 117))
coordinates_01_ffff = ((90, 141), (90, 143), (90, 144), (90, 145), (90, 146), (90, 147), (91, 140), (92, 140), (92, 143), (92, 144), (92, 146), (93, 142), (93, 144), (93, 146), (94, 143), (94, 146), (95, 143), (95, 146), (96, 137), (96, 142), (96, 144), (96, 146), (97, 136), (97, 138), (97, 139), (97, 140), (97, 141), (97, 143), (97, 145), (98, 135), (98, 137), (98, 142), (98, 143), (98, 145), (99, 135), (99, 137), (99, 138), (99, 139), (99, 140), (99, 141), (99, 142), (99, 143), (99, 145), (100, 135), (100, 137), (100, 138), (100, 139), (100, 140), (100, 141), (100, 142), (100, 143), (100, 144), (100, 145), (101, 134), (101, 136), (101, 137), (101, 138), (101, 139), (101, 140), (101, 141), (101, 142), (101, 144), (102, 134), (102, 144), (103, 134), (103, 136), (103, 137), (103, 138), (103, 139), (103, 140), (103, 141), (103, 143))
coordinates_fa8072 = ((102, 108), (103, 107), (103, 110), (104, 107), (104, 111), (105, 107), (105, 109), (105, 111), (106, 107), (106, 109), (106, 111), (107, 108), (107, 111), (108, 108), (108, 110), (108, 111), (108, 112), (109, 108), (109, 110), (109, 111), (110, 108), (110, 110), (110, 113), (111, 108), (111, 112), (112, 108), (112, 111), (113, 108), (113, 110), (114, 107), (114, 109), (115, 107), (115, 108), (116, 106), (117, 106), (117, 107), (118, 105), (118, 107), (119, 105), (119, 106), (120, 106), (120, 111), (120, 113), (121, 104), (121, 109), (121, 114), (122, 104), (122, 106), (122, 107), (122, 108), (122, 109), (122, 110), (122, 111), (122, 112), (122, 113), (122, 115))
coordinates_98_fb98 = ((75, 132), (75, 134), (75, 135), (76, 136), (76, 137), (76, 138), (77, 133), (77, 135), (77, 140), (77, 141), (77, 142), (77, 144), (78, 133), (78, 135), (78, 136), (78, 137), (78, 139), (78, 145), (79, 133), (79, 135), (79, 136), (79, 137), (79, 141), (79, 142), (79, 143), (79, 146), (80, 134), (80, 137), (80, 141), (80, 143), (80, 144), (80, 146), (81, 134), (81, 137), (81, 141), (81, 143), (81, 144), (81, 146), (82, 133), (82, 136), (82, 141), (82, 143), (82, 144), (82, 145), (82, 147), (83, 133), (83, 136), (83, 141), (83, 143), (83, 144), (83, 145), (83, 147), (84, 132), (84, 134), (84, 136), (84, 141), (84, 143), (84, 144), (84, 145), (84, 147), (85, 132), (85, 134), (85, 135), (85, 137), (85, 142), (85, 144), (85, 145), (85, 147), (86, 133), (86, 135), (86, 137), (86, 143), (86, 145), (86, 147), (87, 134), (87, 137), (87, 143), (87, 147), (88, 134), (88, 137), (88, 142), (88, 144), (88, 146), (89, 135), (89, 136))
coordinates_fec0_cb = ((133, 99), (133, 100), (134, 99), (135, 99), (136, 99), (137, 98), (137, 100), (138, 98), (138, 102), (139, 100), (139, 104), (140, 100), (140, 102), (140, 105), (141, 99), (141, 103), (141, 104), (141, 105), (142, 98), (142, 99), (142, 100), (142, 101), (142, 104), (142, 106), (143, 103), (143, 106), (143, 110), (143, 112), (144, 104), (144, 106), (144, 108), (144, 109), (144, 113), (145, 104), (145, 110), (145, 112), (146, 104), (146, 106), (146, 107), (146, 108), (146, 110), (146, 112), (147, 99), (147, 101), (147, 104), (147, 105), (147, 109), (147, 112), (148, 100), (148, 103), (148, 110), (148, 112), (149, 101), (149, 111), (149, 113), (150, 112), (150, 114), (151, 114))
coordinates_333287 = ((72, 118), (72, 120), (72, 121), (73, 117), (73, 122), (73, 123), (73, 124), (73, 125), (73, 127), (74, 110), (74, 112), (74, 116), (74, 118), (74, 119), (74, 120), (74, 128), (75, 110), (75, 113), (75, 114), (75, 117), (75, 118), (75, 122), (75, 124), (75, 125), (75, 129), (76, 110), (76, 112), (76, 116), (76, 118), (76, 122), (76, 127), (76, 130), (77, 110), (77, 113), (77, 114), (77, 115), (77, 116), (77, 117), (77, 119), (77, 128), (78, 112), (78, 114), (78, 115), (78, 116), (78, 117), (78, 118), (78, 120), (78, 128), (78, 131), (79, 113), (79, 115), (79, 116), (79, 117), (79, 118), (79, 119), (79, 121), (79, 129), (79, 131), (80, 114), (80, 116), (80, 117), (80, 118), (80, 119), (80, 120), (80, 122), (80, 129), (80, 131), (81, 115), (81, 117), (81, 118), (81, 119), (81, 120), (81, 122), (81, 129), (81, 131), (82, 117), (82, 118), (82, 119), (82, 120), (82, 121), (82, 123), (82, 129), (82, 131), (83, 116), (83, 118), (83, 119), (83, 120), (83, 121), (83, 123), (83, 129), (83, 130), (84, 117), (84, 119), (84, 120), (84, 121), (84, 122), (84, 123), (84, 124), (84, 130), (85, 118), (85, 120), (85, 121), (85, 122), (85, 124), (85, 130), (86, 119), (86, 123), (86, 130), (87, 120), (87, 122), (87, 130), (87, 131), (88, 130), (88, 132), (89, 131), (89, 133), (91, 109), (91, 110), (92, 111), (93, 113), (94, 116), (94, 118), (95, 118), (95, 119))
coordinates_ffc0_cb = ((94, 108), (94, 110), (94, 111), (95, 108), (95, 110), (95, 111), (95, 112), (95, 114), (96, 115), (96, 116), (97, 116), (97, 118), (98, 118)) |
# Be sure to update these values if you decide to run this bot!
APP_NAME = "Boston Snowbot"
REPO_URL = "https://github.com/molly/snowbot"
# Precipitation probability above which we will add snowfall to prediction
PROBABILITY_THRESHOLD = 0
# Get these values from hitting this URL with your latitude and longitude:
# https://www.weather.gov/documentation/services-web-api#/default/get_points__point_
OFFICE = "BOX" # resp["properties"]["officeId"]
GRID_X = 70 # resp["properties"]["gridX"]
GRID_Y = 76 # resp["properties"]["gridY"]
TIMEZONE = "US/Eastern"
# If your bot isn't reporting Boston weather, set this to False or this will make no
# sense
ENABLE_FRENCH_TOAST = True
# Delay between tweeting toast level gif if the above is set to True
TOAST_GIF_DELAY = 24 * 60 * 60 # 24 hours
# GIF to tweet if the french toast level is "severe"
SEVERE_TOAST_GIF = "https://t.co/Bs8UzBRswG"
| app_name = 'Boston Snowbot'
repo_url = 'https://github.com/molly/snowbot'
probability_threshold = 0
office = 'BOX'
grid_x = 70
grid_y = 76
timezone = 'US/Eastern'
enable_french_toast = True
toast_gif_delay = 24 * 60 * 60
severe_toast_gif = 'https://t.co/Bs8UzBRswG' |
# Given two lists of equal sizes, sum all the corresponding index elements and return a new list.
# Lis1 = [1,2,3,4,5] List2=[6,7,8,9,0]
# new list output = [7, 9, 11,13,5]
def sum_index_elements(alist, blist):
new_list = []
for a in range(len(alist)):
new_list.append(alist[a]+blist[a])
return new_list
test_code = sum_index_elements([2,3,1,4,2], [1,4,2,4,2])
print(test_code)
| def sum_index_elements(alist, blist):
new_list = []
for a in range(len(alist)):
new_list.append(alist[a] + blist[a])
return new_list
test_code = sum_index_elements([2, 3, 1, 4, 2], [1, 4, 2, 4, 2])
print(test_code) |
class LinearCongruentialGenerator:
mul = 1103515245 # a, 0 < a < m
inc = 12345 # c, 0 <= c < m
mod = 2 ** 31 # m, 0 < m
def __init__(self, seed):
self.seed_ = seed % self.mod # X[0], 0 <= X[0] < m
def rand(self):
# X[n + 1] = (a * X[n] + c) mod m
self.seed_ = (self.seed_ * self.mul + self.inc) % self.mod
return self.seed_
| class Linearcongruentialgenerator:
mul = 1103515245
inc = 12345
mod = 2 ** 31
def __init__(self, seed):
self.seed_ = seed % self.mod
def rand(self):
self.seed_ = (self.seed_ * self.mul + self.inc) % self.mod
return self.seed_ |
#Search in a 2D Matrix
class Solution(object):
def searchMatrix(self, matrix, target):
if not len(matrix) or not len(matrix[0]):
return False
m, n = len(matrix) , len(matrix[0])
#Start adaptive search from left bottom corner
x,y = m-1 , 0
while True:
if x < 0 or y >= n:
break
current = matrix[x][y]
if target < current:
#target is smaller ---> go up
x -= 1
elif target > current:
#target is greater ----> go to right
y += 1
else: return True #hit the target
return False
| class Solution(object):
def search_matrix(self, matrix, target):
if not len(matrix) or not len(matrix[0]):
return False
(m, n) = (len(matrix), len(matrix[0]))
(x, y) = (m - 1, 0)
while True:
if x < 0 or y >= n:
break
current = matrix[x][y]
if target < current:
x -= 1
elif target > current:
y += 1
else:
return True
return False |
alphabet = [
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z",
]
direction = input("Type 'encode' to encrypt, type 'decode' to decrypt:\n")
text = input("Type your message:\n").lower()
shift = int(input("Type the shift number:\n"))
# TODO-1: Create a function called 'encrypt' that takes the 'text' and 'shift' as inputs.
def encrypt(text, shift):
encrypted_text = ""
for letter in text:
if not letter in alphabet:
encrypted_text += letter
continue
letter_index = alphabet.index(letter)
encrypted_letter_index = (letter_index + shift) % (len(alphabet) - 1)
encrypted_letter = alphabet[encrypted_letter_index]
encrypted_text += encrypted_letter
return encrypted_text
def decrypt(text, shift):
return encrypt(text, -shift)
if direction == "encrypt":
print(encrypt(text, shift))
elif direction == "decrypt":
print(decrypt(text, shift))
| alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
direction = input("Type 'encode' to encrypt, type 'decode' to decrypt:\n")
text = input('Type your message:\n').lower()
shift = int(input('Type the shift number:\n'))
def encrypt(text, shift):
encrypted_text = ''
for letter in text:
if not letter in alphabet:
encrypted_text += letter
continue
letter_index = alphabet.index(letter)
encrypted_letter_index = (letter_index + shift) % (len(alphabet) - 1)
encrypted_letter = alphabet[encrypted_letter_index]
encrypted_text += encrypted_letter
return encrypted_text
def decrypt(text, shift):
return encrypt(text, -shift)
if direction == 'encrypt':
print(encrypt(text, shift))
elif direction == 'decrypt':
print(decrypt(text, shift)) |
class Solution:
def checkInclusion(self, s1: str, s2: str) -> bool:
w_size = len(s1)
n = len(s2)
if n<w_size:
return False
rem_counts = collections.defaultdict(int)
for i in range(w_size):
if rem_counts[s1[i]] == -1:
rem_counts.pop(s1[i])
else:
rem_counts[s1[i]] += 1
if rem_counts[s2[i]] == 1:
rem_counts.pop(s2[i])
else:
rem_counts[s2[i]] -= 1
if not rem_counts:
return True
window_start = 0
for window_end in range(w_size, n):
if rem_counts[s2[window_end]] == 1:
rem_counts.pop(s2[window_end])
else:
rem_counts[s2[window_end]] -= 1
if rem_counts[s2[window_start]] == -1:
rem_counts.pop(s2[window_start])
else:
rem_counts[s2[window_start]] += 1
if not rem_counts:
return True
window_start += 1
return False
| class Solution:
def check_inclusion(self, s1: str, s2: str) -> bool:
w_size = len(s1)
n = len(s2)
if n < w_size:
return False
rem_counts = collections.defaultdict(int)
for i in range(w_size):
if rem_counts[s1[i]] == -1:
rem_counts.pop(s1[i])
else:
rem_counts[s1[i]] += 1
if rem_counts[s2[i]] == 1:
rem_counts.pop(s2[i])
else:
rem_counts[s2[i]] -= 1
if not rem_counts:
return True
window_start = 0
for window_end in range(w_size, n):
if rem_counts[s2[window_end]] == 1:
rem_counts.pop(s2[window_end])
else:
rem_counts[s2[window_end]] -= 1
if rem_counts[s2[window_start]] == -1:
rem_counts.pop(s2[window_start])
else:
rem_counts[s2[window_start]] += 1
if not rem_counts:
return True
window_start += 1
return False |
class Product(object):
def __init__(self, name, base_price):
self.name = name
self.base_price = base_price
def get_price(self, item_quantities):
return item_quantities[self.name] * self.base_price
class DiscountedProduct(Product):
def __init__(self, name, base_price, offers = ()):
super(DiscountedProduct, self).__init__(name, base_price)
self.offers = offers
def get_price(self, item_quantities):
n = item_quantities.get(self.name, 0)
nx = []
px = []
for offer in self.offers[::-1]:
ni = n // offer[0]
nx.append(ni)
px.append(offer[1])
n -= ni * offer[0]
nx.append(n)
px.append(self.base_price)
return sum([nx * px for nx, px in zip(nx, px)])
class BProduct(Product):
def get_price(self, item_quantities):
nb = item_quantities.get('B', 0)
ne = item_quantities.get('E', 0)
nb = max(0, nb - ne // 2)
nb2 = nb // 2
nb1 = nb % 2
return nb2 * 45 + nb1 * self.base_price
class MProduct(Product):
def get_price(self, item_quantities):
nm = item_quantities.get('M', 0)
nn = item_quantities.get('N', 0)
nm = max(0, nm - nn // 3)
return nm * self.base_price
class QProduct(Product):
def get_price(self, item_quantities):
nq = item_quantities.get('Q', 0)
nr = item_quantities.get('R', 0)
nq = max(0, nq - nr // 3)
nq3 = nq // 3
nq1 = nq % 3
print(nq)
return nq3 * 80 + nq1 * self.base_price
A = DiscountedProduct('A', 50, ((3, 130), (5, 200)))
B = BProduct('B', 30)
C = Product('C', 20)
D = Product('D', 15)
E = Product('E', 40)
F = DiscountedProduct('F', 10, offers = ((3, 20),))
G = Product('G', 20)
H = DiscountedProduct('H', 10, offers=((5, 45), (10, 80)))
I = Product('I', 35)
J = Product('J', 60)
K = DiscountedProduct('K', 70, offers=((2, 120),))
L = Product('L', 90)
M = MProduct('M', 15)
N = Product('N', 40)
O = Product('O', 10)
P = DiscountedProduct('P', 50, ((5, 200),))
Q = QProduct('Q', 30)
R = Product('R', 50)
S = Product('S', 20)
T = Product('T', 20)
U = DiscountedProduct('U', 40, ((4, 120),))
V = DiscountedProduct('V', 50, ((2, 90), (3, 130)))
W = Product('W', 20)
X = Product('X', 17)
Y = Product('Y', 20)
Z = Product('Z', 21)
products = {
'A': A,
'B': B,
'C': C,
'D': D,
'E': E,
'F': F,
'G': G,
'H': H,
'I': I,
'J': J,
'K': K,
'L': L,
'M': M,
'N': N,
'O': O,
'P': P,
'Q': Q,
'R': R,
'S': S,
'T': T,
'U': U,
'V': V,
'W': W,
'X': X,
'Y': Y,
'Z': Z,
}
| class Product(object):
def __init__(self, name, base_price):
self.name = name
self.base_price = base_price
def get_price(self, item_quantities):
return item_quantities[self.name] * self.base_price
class Discountedproduct(Product):
def __init__(self, name, base_price, offers=()):
super(DiscountedProduct, self).__init__(name, base_price)
self.offers = offers
def get_price(self, item_quantities):
n = item_quantities.get(self.name, 0)
nx = []
px = []
for offer in self.offers[::-1]:
ni = n // offer[0]
nx.append(ni)
px.append(offer[1])
n -= ni * offer[0]
nx.append(n)
px.append(self.base_price)
return sum([nx * px for (nx, px) in zip(nx, px)])
class Bproduct(Product):
def get_price(self, item_quantities):
nb = item_quantities.get('B', 0)
ne = item_quantities.get('E', 0)
nb = max(0, nb - ne // 2)
nb2 = nb // 2
nb1 = nb % 2
return nb2 * 45 + nb1 * self.base_price
class Mproduct(Product):
def get_price(self, item_quantities):
nm = item_quantities.get('M', 0)
nn = item_quantities.get('N', 0)
nm = max(0, nm - nn // 3)
return nm * self.base_price
class Qproduct(Product):
def get_price(self, item_quantities):
nq = item_quantities.get('Q', 0)
nr = item_quantities.get('R', 0)
nq = max(0, nq - nr // 3)
nq3 = nq // 3
nq1 = nq % 3
print(nq)
return nq3 * 80 + nq1 * self.base_price
a = discounted_product('A', 50, ((3, 130), (5, 200)))
b = b_product('B', 30)
c = product('C', 20)
d = product('D', 15)
e = product('E', 40)
f = discounted_product('F', 10, offers=((3, 20),))
g = product('G', 20)
h = discounted_product('H', 10, offers=((5, 45), (10, 80)))
i = product('I', 35)
j = product('J', 60)
k = discounted_product('K', 70, offers=((2, 120),))
l = product('L', 90)
m = m_product('M', 15)
n = product('N', 40)
o = product('O', 10)
p = discounted_product('P', 50, ((5, 200),))
q = q_product('Q', 30)
r = product('R', 50)
s = product('S', 20)
t = product('T', 20)
u = discounted_product('U', 40, ((4, 120),))
v = discounted_product('V', 50, ((2, 90), (3, 130)))
w = product('W', 20)
x = product('X', 17)
y = product('Y', 20)
z = product('Z', 21)
products = {'A': A, 'B': B, 'C': C, 'D': D, 'E': E, 'F': F, 'G': G, 'H': H, 'I': I, 'J': J, 'K': K, 'L': L, 'M': M, 'N': N, 'O': O, 'P': P, 'Q': Q, 'R': R, 'S': S, 'T': T, 'U': U, 'V': V, 'W': W, 'X': X, 'Y': Y, 'Z': Z} |
def lengthN(n, cache):
count = 1
while n > 1:
if len(cache) >= n:
count = count + cache[n-1]
break
if n % 2:
n = 3*n + 1
else:
n /= 2
count += 1
cache[int(n)-1] = count
return count, cache
if __name__ == '__main__':
n = int(input())
lengths = []
cache = [1]
for i in range(1, n+1):
count, cache = lengthN(i, cache)
lengths.append(count)
print(lengths) | def length_n(n, cache):
count = 1
while n > 1:
if len(cache) >= n:
count = count + cache[n - 1]
break
if n % 2:
n = 3 * n + 1
else:
n /= 2
count += 1
cache[int(n) - 1] = count
return (count, cache)
if __name__ == '__main__':
n = int(input())
lengths = []
cache = [1]
for i in range(1, n + 1):
(count, cache) = length_n(i, cache)
lengths.append(count)
print(lengths) |
class Solution:
def permuteUnique(self, nums: List[int]) -> List[List[int]]:
results = []
def Combination(permutation, counter):
if len(permutation) == len(nums):
results.append(list(permutation))
return
for num in counter:
if counter[num] > 0:
permutation.append(num)
counter[num] -= 1
Combination(permutation, counter)
permutation.pop()
counter[num] += 1
Combination([], Counter(nums))
return results | class Solution:
def permute_unique(self, nums: List[int]) -> List[List[int]]:
results = []
def combination(permutation, counter):
if len(permutation) == len(nums):
results.append(list(permutation))
return
for num in counter:
if counter[num] > 0:
permutation.append(num)
counter[num] -= 1
combination(permutation, counter)
permutation.pop()
counter[num] += 1
combination([], counter(nums))
return results |
#using this for test values for config
class TestConfig:
host = "irc.rizon.net"
port = 6667
nickname = "testNickName8462"
username = "testUserName8462"
hostname = "testHostName8462"
servername = "testServerName8462"
realname = "testRealName8462"
| class Testconfig:
host = 'irc.rizon.net'
port = 6667
nickname = 'testNickName8462'
username = 'testUserName8462'
hostname = 'testHostName8462'
servername = 'testServerName8462'
realname = 'testRealName8462' |
load("@rules_python//python:defs.bzl", "py_test")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
# End to end "Shell" test that a breakpoint can resolve a location
# Consider just allow running a breakpoint without crashing
# It does the following
# 1. Take the (compiled) application and boot up a sim matching the SDK and
# Xcode version
# 2. Set a breakpoint given the `set_cmd`
# 3. When it stops on the breakpoint, it validates the `variable` matches the
# `expected_value`
def ios_lldb_breakpoint_po_test(name, application, set_cmd, variable, sdk, device, expected_value = None, lldbinit = None, **kwargs):
test_spec = struct(
variable_name = variable,
substrs = (["variable_result: " + variable + " = " + expected_value] if expected_value else []),
)
_check_cmd(set_cmd)
initcmds = [
set_cmd,
# Ensure that the platform dir is set correctly here - "platform shell pwd"
"command script import --allow-reload $(location @build_bazel_rules_ios//rules/test/lldb:breakpoint.py)",
"breakpoint command add --python-function breakpoint.breakpoint_info_fn 1",
"continue",
]
_ios_breakpoint_test_wrapper(name, application, initcmds, test_spec, sdk, device, lldbinit = lldbinit, **kwargs)
def _lldbinit_impl(ctx):
# Resolve the file expanding variables
cmd_tuple = ctx.resolve_command(command = ctx.attr.content, expand_locations = True)
if len(cmd_tuple) < 1:
fail("Unexpected resolution", cmd_tuple)
content = cmd_tuple[1][2]
ctx.actions.write(
output = ctx.outputs.out,
content = content,
)
files = depset(direct = [ctx.outputs.out])
runfiles = ctx.runfiles(files = [ctx.outputs.out])
is_executable = False
if is_executable:
return [DefaultInfo(files = files, runfiles = runfiles, executable = ctx.outputs.out)]
else:
return [DefaultInfo(files = files, runfiles = runfiles)]
_lldbinit = rule(
implementation = _lldbinit_impl,
attrs = {
"content": attr.string(mandatory = True),
"out": attr.output(mandatory = True),
"deps": attr.label_list(mandatory = False, allow_files = True),
},
doc = "Setup an lldbinit file",
)
def _check_cmd(set_cmd):
# This is not super robust but atleast it fails fast
if (set_cmd.startswith("br ") or set_cmd.startswith("breakpoint ")) == False:
fail(
"set_cmd needs some breakpoint set to do anything - got:",
set_cmd,
)
# Similar as above but just verify if cmds return successfully. `cmds` is an
# array of LLDB commands that run when `set_cmd` is hit
def ios_lldb_breakpoint_command_test(name, application, set_cmd, cmds, sdk, device, match_substrs = [], lldbinit = None, **kwargs):
test_spec = struct(
br_hit_commands = cmds,
substrs = match_substrs,
)
_check_cmd(set_cmd)
initcmds = [
set_cmd,
# Ensure that the platform dir is set correctly here - "platform shell pwd"
"command script import --allow-reload $(location @build_bazel_rules_ios//rules/test/lldb:breakpoint.py)",
"breakpoint command add --python-function breakpoint.breakpoint_cmd_fn 1",
"continue",
]
_ios_breakpoint_test_wrapper(name, application, initcmds, test_spec, sdk, device, lldbinit = lldbinit, **kwargs)
def _ios_breakpoint_test_wrapper(name, application, cmds, test_spec, sdk, device, lldbinit, **kwargs):
write_file(
name = name + "_test_spec",
out = name + ".test_spec.json",
content = [test_spec.to_json()],
)
lldbinit_deps = ["@build_bazel_rules_ios//rules/test/lldb:breakpoint.py"]
if lldbinit:
cmds = ["command source $(execpath " + lldbinit + ")"] + cmds
lldbinit_deps.append(lldbinit)
_lldbinit(
name = name + "_lldbinit",
out = name + ".lldbinit",
content = "\n".join(cmds),
deps = lldbinit_deps,
visibility = ["//visibility:public"],
)
py_test(
name = name,
main = "@build_bazel_rules_ios//rules/test/lldb:lldb_breakpoint_test_main.py",
srcs = [
"@build_bazel_rules_ios//rules/test/lldb:lldb_breakpoint_test_main.py",
],
args = [
"--app",
"$(execpath " + application + ").app",
# Consider finding a way to better express this for github CI -
# it's tied into the xcode_version right now. We could move this to
# an idiom of a "test_runner" or the likes
"--sdk",
sdk,
"--device",
"'" + device + "'",
"--spec",
"$(execpath " + name + "_test_spec" + ")",
"--lldbinit",
"$(execpath " + name + "_lldbinit" + ")",
],
deps = ["@build_bazel_rules_ios//rules/test/lldb:lldb_test"],
data = [
application,
name + "_test_spec",
name + "_lldbinit",
] + ([lldbinit] if lldbinit else []),
**kwargs
)
| load('@rules_python//python:defs.bzl', 'py_test')
load('@bazel_skylib//rules:write_file.bzl', 'write_file')
def ios_lldb_breakpoint_po_test(name, application, set_cmd, variable, sdk, device, expected_value=None, lldbinit=None, **kwargs):
test_spec = struct(variable_name=variable, substrs=['variable_result: ' + variable + ' = ' + expected_value] if expected_value else [])
_check_cmd(set_cmd)
initcmds = [set_cmd, 'command script import --allow-reload $(location @build_bazel_rules_ios//rules/test/lldb:breakpoint.py)', 'breakpoint command add --python-function breakpoint.breakpoint_info_fn 1', 'continue']
_ios_breakpoint_test_wrapper(name, application, initcmds, test_spec, sdk, device, lldbinit=lldbinit, **kwargs)
def _lldbinit_impl(ctx):
cmd_tuple = ctx.resolve_command(command=ctx.attr.content, expand_locations=True)
if len(cmd_tuple) < 1:
fail('Unexpected resolution', cmd_tuple)
content = cmd_tuple[1][2]
ctx.actions.write(output=ctx.outputs.out, content=content)
files = depset(direct=[ctx.outputs.out])
runfiles = ctx.runfiles(files=[ctx.outputs.out])
is_executable = False
if is_executable:
return [default_info(files=files, runfiles=runfiles, executable=ctx.outputs.out)]
else:
return [default_info(files=files, runfiles=runfiles)]
_lldbinit = rule(implementation=_lldbinit_impl, attrs={'content': attr.string(mandatory=True), 'out': attr.output(mandatory=True), 'deps': attr.label_list(mandatory=False, allow_files=True)}, doc='Setup an lldbinit file')
def _check_cmd(set_cmd):
if (set_cmd.startswith('br ') or set_cmd.startswith('breakpoint ')) == False:
fail('set_cmd needs some breakpoint set to do anything - got:', set_cmd)
def ios_lldb_breakpoint_command_test(name, application, set_cmd, cmds, sdk, device, match_substrs=[], lldbinit=None, **kwargs):
test_spec = struct(br_hit_commands=cmds, substrs=match_substrs)
_check_cmd(set_cmd)
initcmds = [set_cmd, 'command script import --allow-reload $(location @build_bazel_rules_ios//rules/test/lldb:breakpoint.py)', 'breakpoint command add --python-function breakpoint.breakpoint_cmd_fn 1', 'continue']
_ios_breakpoint_test_wrapper(name, application, initcmds, test_spec, sdk, device, lldbinit=lldbinit, **kwargs)
def _ios_breakpoint_test_wrapper(name, application, cmds, test_spec, sdk, device, lldbinit, **kwargs):
write_file(name=name + '_test_spec', out=name + '.test_spec.json', content=[test_spec.to_json()])
lldbinit_deps = ['@build_bazel_rules_ios//rules/test/lldb:breakpoint.py']
if lldbinit:
cmds = ['command source $(execpath ' + lldbinit + ')'] + cmds
lldbinit_deps.append(lldbinit)
_lldbinit(name=name + '_lldbinit', out=name + '.lldbinit', content='\n'.join(cmds), deps=lldbinit_deps, visibility=['//visibility:public'])
py_test(name=name, main='@build_bazel_rules_ios//rules/test/lldb:lldb_breakpoint_test_main.py', srcs=['@build_bazel_rules_ios//rules/test/lldb:lldb_breakpoint_test_main.py'], args=['--app', '$(execpath ' + application + ').app', '--sdk', sdk, '--device', "'" + device + "'", '--spec', '$(execpath ' + name + '_test_spec' + ')', '--lldbinit', '$(execpath ' + name + '_lldbinit' + ')'], deps=['@build_bazel_rules_ios//rules/test/lldb:lldb_test'], data=[application, name + '_test_spec', name + '_lldbinit'] + ([lldbinit] if lldbinit else []), **kwargs) |
phonebook = {
"John" : 938477566,
"Jack" : 938377264,
"Jill" : 947662781
}
# Add "Jake" to the phonebook with the phone number 938273443, and remove Jill from the phonebook
phonebook["Jake"] = 938273443
del phonebook["Jill"]
# testing code
if "Jake" in phonebook:
print("Jake is listed in the phonebook.")
if "Jill" not in phonebook:
print("Jill is not listed in the phonebook.")
# Iterating over dictionaries
for name, number in phonebook.items():
print("Phone number of %s is %d" % (name, number))
# Converting a list to a dictionary
sample_list = ['a', 'b', 'c', 'd', 'e']
print(dict(zip(sample_list[::2], sample_list[1::2]))) | phonebook = {'John': 938477566, 'Jack': 938377264, 'Jill': 947662781}
phonebook['Jake'] = 938273443
del phonebook['Jill']
if 'Jake' in phonebook:
print('Jake is listed in the phonebook.')
if 'Jill' not in phonebook:
print('Jill is not listed in the phonebook.')
for (name, number) in phonebook.items():
print('Phone number of %s is %d' % (name, number))
sample_list = ['a', 'b', 'c', 'd', 'e']
print(dict(zip(sample_list[::2], sample_list[1::2]))) |
#! /usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : 2019/3/9 2:37 PM
# @Author : xiaoliji
# @Email : yutian9527@gmail.com
class ListNode:
def __init__(self, x: int):
self.val = x
self.next = None
def construct_linklist(nodes: 'iterable')-> 'LinkedList':
vals = list(nodes)
head = ListNode(0)
h = head
for val in vals:
h.next = ListNode(val)
h = h.next
return head.next
def pretty_linklist(head: 'LinkedList') -> str:
ans = []
h = head
while h:
ans.append(str(h.val))
h = h.next
return '->'.join(ans)
class TreeNode:
def __init__(self, x: int):
self.val = x
self.left = None
self.right = None
def preorder_traversal(root: TreeNode) -> list:
def dfs(node):
if node:
yield node.val
yield from dfs(node.left)
yield from dfs(node.right)
return list(dfs(root))
def inorder_traversal(root: TreeNode) -> list:
def dfs(node):
if node:
yield from dfs(node.left)
yield node.val
yield from dfs(node.right)
return list(dfs(root))
def deserialize_tree(data):
nodes = data.split(',')[::-1]
return deserialize_tree_util(nodes)
def deserialize_tree_util(nodes):
val = nodes.pop()
if val == '$':
return None
root = TreeNode(int(val))
root.left = deserialize_tree_util(nodes)
root.right = deserialize_tree_util(nodes)
return root
def is_same_tree(p: 'TreeNode', q: 'TreeNode') -> 'bool':
if p and q:
return (p.val==q.val and is_same_tree(p.left, q.left) and
is_same_tree(p.right, q.right))
else:
return p is q | class Listnode:
def __init__(self, x: int):
self.val = x
self.next = None
def construct_linklist(nodes: 'iterable') -> 'LinkedList':
vals = list(nodes)
head = list_node(0)
h = head
for val in vals:
h.next = list_node(val)
h = h.next
return head.next
def pretty_linklist(head: 'LinkedList') -> str:
ans = []
h = head
while h:
ans.append(str(h.val))
h = h.next
return '->'.join(ans)
class Treenode:
def __init__(self, x: int):
self.val = x
self.left = None
self.right = None
def preorder_traversal(root: TreeNode) -> list:
def dfs(node):
if node:
yield node.val
yield from dfs(node.left)
yield from dfs(node.right)
return list(dfs(root))
def inorder_traversal(root: TreeNode) -> list:
def dfs(node):
if node:
yield from dfs(node.left)
yield node.val
yield from dfs(node.right)
return list(dfs(root))
def deserialize_tree(data):
nodes = data.split(',')[::-1]
return deserialize_tree_util(nodes)
def deserialize_tree_util(nodes):
val = nodes.pop()
if val == '$':
return None
root = tree_node(int(val))
root.left = deserialize_tree_util(nodes)
root.right = deserialize_tree_util(nodes)
return root
def is_same_tree(p: 'TreeNode', q: 'TreeNode') -> 'bool':
if p and q:
return p.val == q.val and is_same_tree(p.left, q.left) and is_same_tree(p.right, q.right)
else:
return p is q |
class Shape:
@staticmethod #define a static method before initiating an instance
def add_ally(x,y):
x.append(y)
return x
def __init__(self, shape_type):
self.shape_type=shape_type
self.__allies=[] #initiate a private empty list in an instance
@property
def allies_public(self): #make it accessible for the subclasses
return self.__allies
def __create_allies(self): #create a private method that calls the static method defined above
return self.add_ally(self.allies_public, self.object)
@property #make it accessible by the subclasses
def ally_list_p(self):
return self.__create_allies()
class Circle(Shape):
def __init__(self, shape_type):
super().__init__(shape_type)
self.object='square' #define the second argument for the add_ally method
self.ally_list_p #call the add_ally method
self.object='other' #repeat as many times as you want
self.ally_list_p
def __str__(self):
return "results: "+ str(self.allies_public)
def main():
circle_test=Circle('circle')
print(circle_test)
if __name__ == '__main__':
main() | class Shape:
@staticmethod
def add_ally(x, y):
x.append(y)
return x
def __init__(self, shape_type):
self.shape_type = shape_type
self.__allies = []
@property
def allies_public(self):
return self.__allies
def __create_allies(self):
return self.add_ally(self.allies_public, self.object)
@property
def ally_list_p(self):
return self.__create_allies()
class Circle(Shape):
def __init__(self, shape_type):
super().__init__(shape_type)
self.object = 'square'
self.ally_list_p
self.object = 'other'
self.ally_list_p
def __str__(self):
return 'results: ' + str(self.allies_public)
def main():
circle_test = circle('circle')
print(circle_test)
if __name__ == '__main__':
main() |
def vogal(letra):
if(letra=='a') or (letra=='A'):
return True
if (letra=='e') or (letra=='E'):
return True
if (letra=='i') or (letra=='I'):
return True
if (letra=='o') or (letra=='O'):
return True
if (letra=='u') or (letra=='U'):
return True
else:
return False | def vogal(letra):
if letra == 'a' or letra == 'A':
return True
if letra == 'e' or letra == 'E':
return True
if letra == 'i' or letra == 'I':
return True
if letra == 'o' or letra == 'O':
return True
if letra == 'u' or letra == 'U':
return True
else:
return False |
# 24. Swap Nodes in Pairs
'''
Given a linked list, swap every two adjacent nodes and return its head.
You may not modify the values in the list's nodes, only nodes itself may be changed.
Input: 1->2->3->4,
Output: 2->1->4->3.
'''
class Solution:
def swapPairs(self, head: ListNode) -> ListNode:
current = head
while current:
if current.next == None:
return head
if current.next:
current.val, current.next.val = current.next.val, current.val
current = current.next.next
return head | """
Given a linked list, swap every two adjacent nodes and return its head.
You may not modify the values in the list's nodes, only nodes itself may be changed.
Input: 1->2->3->4,
Output: 2->1->4->3.
"""
class Solution:
def swap_pairs(self, head: ListNode) -> ListNode:
current = head
while current:
if current.next == None:
return head
if current.next:
(current.val, current.next.val) = (current.next.val, current.val)
current = current.next.next
return head |
def encrypt_letter(msg, key):
enc_id = (ord(msg) + ord(key)) % 1114112
return chr(enc_id)
def decrypt_letter(msg, key):
dec_id = (1114112 + ord(msg) - ord(key)) % 1114112
return chr(dec_id)
def process_message(message, key, encrypt):
returned_message = ""
for i, letter in enumerate(message):
if encrypt:
returned_message += encrypt_letter(letter, key[i%len(key)])
else:
returned_message += decrypt_letter(letter, key[i%len(key)])
return returned_message
| def encrypt_letter(msg, key):
enc_id = (ord(msg) + ord(key)) % 1114112
return chr(enc_id)
def decrypt_letter(msg, key):
dec_id = (1114112 + ord(msg) - ord(key)) % 1114112
return chr(dec_id)
def process_message(message, key, encrypt):
returned_message = ''
for (i, letter) in enumerate(message):
if encrypt:
returned_message += encrypt_letter(letter, key[i % len(key)])
else:
returned_message += decrypt_letter(letter, key[i % len(key)])
return returned_message |
def pre_save_operation(instance):
# If this is a new record, then someone has started it in the Admin using EITHER a legacy COVE ID
# OR a PBSMM UUID. Depending on which, the retrieval endpoint is slightly different, so this sets
# the appropriate URL to access.
if instance.pk is None:
if instance.object_id and instance.object_id.strip():
url = __get_api_url('pbsmm', instance.object_id)
else:
if instance.legacy_tp_media_id:
url = __get_api_url('cove', str(instance.legacy_tp_media_id))
else:
return # do nothing - can't get an ID to look up!
# Otherwise, it's an existing record and the UUID should be used
else: # Editing an existing record - do nothing if ingest_on_save is NOT checked!
if not instance.ingest_on_save:
return
url = __get_api_url('pbsmm', instance.object_id)
# OK - get the record from the API
(status, json) = get_PBSMM_record(url)
instance.last_api_status = status
# Update this record's time stamp (the API has its own)
instance.date_last_api_update = datetime.datetime.now()
if status != 200:
return
# Process the record (code is in ingest.py)
instance = process_asset_record(json, instance)
# continue saving, but turn off the ingest_on_save flag
instance.ingest_on_save = False # otherwise we could end up in an infinite loop!
# We're done here - continue with the save() operation
return
| def pre_save_operation(instance):
if instance.pk is None:
if instance.object_id and instance.object_id.strip():
url = __get_api_url('pbsmm', instance.object_id)
elif instance.legacy_tp_media_id:
url = __get_api_url('cove', str(instance.legacy_tp_media_id))
else:
return
else:
if not instance.ingest_on_save:
return
url = __get_api_url('pbsmm', instance.object_id)
(status, json) = get_pbsmm_record(url)
instance.last_api_status = status
instance.date_last_api_update = datetime.datetime.now()
if status != 200:
return
instance = process_asset_record(json, instance)
instance.ingest_on_save = False
return |
t = int(input().strip())
result = 0
current_time, current_value = 1, 3
def get_next_interval_cycle(time, value):
next_time = time + value
next_value = value * 2
return next_time, next_value
while True:
new_time, new_value = get_next_interval_cycle(
current_time,
current_value
)
if new_time > t:
result = current_value - (t - current_time)
break
elif new_time == t:
result = new_value
current_time, current_value = new_time, new_value
print(result)
| t = int(input().strip())
result = 0
(current_time, current_value) = (1, 3)
def get_next_interval_cycle(time, value):
next_time = time + value
next_value = value * 2
return (next_time, next_value)
while True:
(new_time, new_value) = get_next_interval_cycle(current_time, current_value)
if new_time > t:
result = current_value - (t - current_time)
break
elif new_time == t:
result = new_value
(current_time, current_value) = (new_time, new_value)
print(result) |
def acmTeam(topic):
maxtopic, maxteam = 0, 1
for i in range(n):
for j in range(i+1, n):
know = 0
for x in range(m):
if topic[i][x] == '1' or topic[j][x] == '1':
know += 1
if know > maxtopic:
maxtopic = know
maxteam = 1
elif know > 0 and know == maxtopic:
maxteam += 1
return maxtopic, maxteam | def acm_team(topic):
(maxtopic, maxteam) = (0, 1)
for i in range(n):
for j in range(i + 1, n):
know = 0
for x in range(m):
if topic[i][x] == '1' or topic[j][x] == '1':
know += 1
if know > maxtopic:
maxtopic = know
maxteam = 1
elif know > 0 and know == maxtopic:
maxteam += 1
return (maxtopic, maxteam) |
def make_readable(seconds):
if seconds >= 0 and seconds <= 359999:
hrs = seconds // 3600
seconds %= 3600
mins = seconds // 60
seconds %= 60
secs = seconds
hour = str('{:02d}'.format(hrs))
minute = str('{:02d}'.format(mins))
second = str('{:02d}'.format(secs))
time = f"{hour}:{minute}:{second}"
return time | def make_readable(seconds):
if seconds >= 0 and seconds <= 359999:
hrs = seconds // 3600
seconds %= 3600
mins = seconds // 60
seconds %= 60
secs = seconds
hour = str('{:02d}'.format(hrs))
minute = str('{:02d}'.format(mins))
second = str('{:02d}'.format(secs))
time = f'{hour}:{minute}:{second}'
return time |
epsilon_d_ = {
"epsilon": ["float", "0.03", "0.01 ... 0.3"],
}
distribution_d_ = {
"distribution": ["string", "normal", "normal, laplace, logistic, gumbel"],
}
n_neighbours_d_ = {
"n_neighbours": ["int", "3", "1 ... 10"],
}
p_accept_d_ = {
"p_accept": ["float", "0.1", "0.01 ... 0.3"],
}
repulsion_factor_d = {
"repulsion_factor": ["float", "5", "2 ... 10"],
}
annealing_rate_d = {
"annealing_rate": ["float", "0.97", "0.9 ... 0.99"],
}
start_temp_d = {
"start_temp": ["float", "1", "0.5 ... 1.5"],
}
alpha_d = {
"alpha": ["float", "1", "0.5 ... 2"],
}
gamma_d = {
"gamma": ["float", "2", "0.5 ... 5"],
}
beta_d = {
"beta": ["float", "0.5", "0.25 ... 3"],
}
sigma_d = {
"sigma": ["float", "0.5", "0.25 ... 3"],
}
step_size_d = {
"step_size": ["int", "1", "1 ... 1000"],
}
n_iter_restart_d = {
"n_iter_restart": ["int", "10", "5 ... 20"],
}
iters_p_dim_d = {
"iters_p_dim": ["int", "10", "5 ... 15"],
}
n_positions_d = {
"n_positions": ["int", "4", "2 ... 8"],
}
pattern_size_d = {
"pattern_size": ["float", "0.25", "0.1 ... 0.5"],
}
reduction_d = {
"reduction": ["float", "0.9", "0.75 ... 0.99"],
}
population_parallel_temp_d = {
"population": ["int", "5", "3 ... 15"],
}
n_iter_swap_parallel_temp_d = {
"n_iter_swap": ["int", "10", "5 ... 15"],
}
population_pso_d = {
"population": ["int", "10", "4 ... 15"],
}
inertia_d = {
"inertia": ["float", "0.5", "0.25 ... 0.75"],
}
cognitive_weight_d = {
"cognitive_weight": ["float", "0.5", "0.25 ... 0.75"],
}
social_weight_d = {
"social_weight": ["float", "0.5", "0.25 ... 0.75"],
}
temp_weight_d = {
"temp_weight": ["float", "0.2", "0.05 ... 0.3"],
}
population_evo_strat_d = {
"population": ["int", "10", "4 ... 15"],
}
mutation_rate_d = {
"mutation_rate": ["float", "0.7", "0.1 ... 0.9"],
}
crossover_rate_d = {
"crossover_rate": ["float", "0.3", "0.1 ... 0.9"],
}
gpr_bayes_opt_d = {
"gpr": ["class", "0.3", "-"],
}
xi_bayes_opt_d = {
"xi": ["float", "0.3", "0.1 ... 0.9"],
}
warm_start_smbo_d = {
"warm_start_smbo": ["pandas dataframe", "None", "-"],
}
max_sample_size_d = {
"max_sample_size": ["int", "10000000", "-"],
}
sampling_d = {
"sampling": ["dict", "{'random': 1000000}", "-"],
}
gamma_tpe_d = {
"gamma_tpe": ["float", "0.2", "0.05 ... 0.75"],
}
tree_regressor_d = {
"tree_regressor": [
"string",
"extra_tree",
"extra_tree, random_forest, gradient_boost",
],
}
tree_para_d = {
"tree_para": ["dict", "{'n_estimators': 100}", "-"],
}
xi_forest_opt_d = {
"xi": ["float", "0.03", "0.001 ... 0.1"],
}
| epsilon_d_ = {'epsilon': ['float', '0.03', '0.01 ... 0.3']}
distribution_d_ = {'distribution': ['string', 'normal', 'normal, laplace, logistic, gumbel']}
n_neighbours_d_ = {'n_neighbours': ['int', '3', '1 ... 10']}
p_accept_d_ = {'p_accept': ['float', '0.1', '0.01 ... 0.3']}
repulsion_factor_d = {'repulsion_factor': ['float', '5', '2 ... 10']}
annealing_rate_d = {'annealing_rate': ['float', '0.97', '0.9 ... 0.99']}
start_temp_d = {'start_temp': ['float', '1', '0.5 ... 1.5']}
alpha_d = {'alpha': ['float', '1', '0.5 ... 2']}
gamma_d = {'gamma': ['float', '2', '0.5 ... 5']}
beta_d = {'beta': ['float', '0.5', '0.25 ... 3']}
sigma_d = {'sigma': ['float', '0.5', '0.25 ... 3']}
step_size_d = {'step_size': ['int', '1', '1 ... 1000']}
n_iter_restart_d = {'n_iter_restart': ['int', '10', '5 ... 20']}
iters_p_dim_d = {'iters_p_dim': ['int', '10', '5 ... 15']}
n_positions_d = {'n_positions': ['int', '4', '2 ... 8']}
pattern_size_d = {'pattern_size': ['float', '0.25', '0.1 ... 0.5']}
reduction_d = {'reduction': ['float', '0.9', '0.75 ... 0.99']}
population_parallel_temp_d = {'population': ['int', '5', '3 ... 15']}
n_iter_swap_parallel_temp_d = {'n_iter_swap': ['int', '10', '5 ... 15']}
population_pso_d = {'population': ['int', '10', '4 ... 15']}
inertia_d = {'inertia': ['float', '0.5', '0.25 ... 0.75']}
cognitive_weight_d = {'cognitive_weight': ['float', '0.5', '0.25 ... 0.75']}
social_weight_d = {'social_weight': ['float', '0.5', '0.25 ... 0.75']}
temp_weight_d = {'temp_weight': ['float', '0.2', '0.05 ... 0.3']}
population_evo_strat_d = {'population': ['int', '10', '4 ... 15']}
mutation_rate_d = {'mutation_rate': ['float', '0.7', '0.1 ... 0.9']}
crossover_rate_d = {'crossover_rate': ['float', '0.3', '0.1 ... 0.9']}
gpr_bayes_opt_d = {'gpr': ['class', '0.3', '-']}
xi_bayes_opt_d = {'xi': ['float', '0.3', '0.1 ... 0.9']}
warm_start_smbo_d = {'warm_start_smbo': ['pandas dataframe', 'None', '-']}
max_sample_size_d = {'max_sample_size': ['int', '10000000', '-']}
sampling_d = {'sampling': ['dict', "{'random': 1000000}", '-']}
gamma_tpe_d = {'gamma_tpe': ['float', '0.2', '0.05 ... 0.75']}
tree_regressor_d = {'tree_regressor': ['string', 'extra_tree', 'extra_tree, random_forest, gradient_boost']}
tree_para_d = {'tree_para': ['dict', "{'n_estimators': 100}", '-']}
xi_forest_opt_d = {'xi': ['float', '0.03', '0.001 ... 0.1']} |
def fatorial(n):
if n == 0:
return 1
else:
return n * fatorial(n - 1)
while True:
try:
entrada = input()
entrada = entrada.split()
fat1 = fatorial(int(entrada[0]))
fat2 = fatorial(int(entrada[1]))
print(fat1 + fat2)
except EOFError:
break | def fatorial(n):
if n == 0:
return 1
else:
return n * fatorial(n - 1)
while True:
try:
entrada = input()
entrada = entrada.split()
fat1 = fatorial(int(entrada[0]))
fat2 = fatorial(int(entrada[1]))
print(fat1 + fat2)
except EOFError:
break |
class TrieNode:
def __init__(self):
self.children = [None] * 26
self.end = False
self.size = 0
class Trie:
def __init__(self):
self.root = self.getNode()
def getNode(self):
return TrieNode()
def _charToIndex(self, ch):
return ord(ch) - ord('a')
def add(self, key):
crawl = self.root
for c in key:
index = self._charToIndex(c)
if not crawl.children[index]:
crawl.children[index] = self.getNode()
crawl = crawl.children[index]
crawl.size += 1
crawl.end = True
def find(self, key):
crawl = self.root
for c in key:
index = self._charToIndex(c)
if not crawl.children[index]:
return 0
crawl = crawl.children[index]
return crawl.size
def contacts(queries):
trie = Trie()
results = []
for q in queries:
c, v = q[0], q[1]
if c == "add":
trie.add(v)
elif c == "find":
results.append(trie.find(v))
return results
trie = Trie()
trie.add("hack")
trie.add("hackerrank")
print(trie.find("hac"))
print(trie.find("hak")) | class Trienode:
def __init__(self):
self.children = [None] * 26
self.end = False
self.size = 0
class Trie:
def __init__(self):
self.root = self.getNode()
def get_node(self):
return trie_node()
def _char_to_index(self, ch):
return ord(ch) - ord('a')
def add(self, key):
crawl = self.root
for c in key:
index = self._charToIndex(c)
if not crawl.children[index]:
crawl.children[index] = self.getNode()
crawl = crawl.children[index]
crawl.size += 1
crawl.end = True
def find(self, key):
crawl = self.root
for c in key:
index = self._charToIndex(c)
if not crawl.children[index]:
return 0
crawl = crawl.children[index]
return crawl.size
def contacts(queries):
trie = trie()
results = []
for q in queries:
(c, v) = (q[0], q[1])
if c == 'add':
trie.add(v)
elif c == 'find':
results.append(trie.find(v))
return results
trie = trie()
trie.add('hack')
trie.add('hackerrank')
print(trie.find('hac'))
print(trie.find('hak')) |
class Database:
def __init__(self, row_counts):
self.row_counts = row_counts
self.max_row_count = max(row_counts)
n_tables = len(row_counts)
self.parents = list(range(n_tables))
def merge(self, src, dst):
src_parent = self.get_parent(src)
dst_parent = self.get_parent(dst)
if src_parent == dst_parent:
return False
# use union by rank heuristic:
# Rank array isn't necessary: we don't have any choice on how the union should be done
self.parents[src_parent] = dst_parent
self.row_counts[dst_parent] += self.row_counts[src_parent]
self.row_counts[src_parent] = 0
if self.max_row_count < self.row_counts[dst_parent]:
self.max_row_count = self.row_counts[dst_parent]
return True
# Time Complexity: O(log n)
# Space Complexity: O(1)
def get_parent(self, table):
# find parent
rootTable = table
while rootTable != self.parents[rootTable]:
rootTable = self.parents[rootTable]
#Compress Path
while table != rootTable:
parent = self.parents[table]
self.parents[table] = rootTable
table = parent
return rootTable
def main():
n_tables, n_queries = map(int, input().split())
counts = list(map(int, input().split()))
assert len(counts) == n_tables
db = Database(counts)
for i in range(n_queries):
dst, src = map(int, input().split())
db.merge(src - 1, dst - 1)
print(db.max_row_count)
if __name__ == "__main__":
main()
| class Database:
def __init__(self, row_counts):
self.row_counts = row_counts
self.max_row_count = max(row_counts)
n_tables = len(row_counts)
self.parents = list(range(n_tables))
def merge(self, src, dst):
src_parent = self.get_parent(src)
dst_parent = self.get_parent(dst)
if src_parent == dst_parent:
return False
self.parents[src_parent] = dst_parent
self.row_counts[dst_parent] += self.row_counts[src_parent]
self.row_counts[src_parent] = 0
if self.max_row_count < self.row_counts[dst_parent]:
self.max_row_count = self.row_counts[dst_parent]
return True
def get_parent(self, table):
root_table = table
while rootTable != self.parents[rootTable]:
root_table = self.parents[rootTable]
while table != rootTable:
parent = self.parents[table]
self.parents[table] = rootTable
table = parent
return rootTable
def main():
(n_tables, n_queries) = map(int, input().split())
counts = list(map(int, input().split()))
assert len(counts) == n_tables
db = database(counts)
for i in range(n_queries):
(dst, src) = map(int, input().split())
db.merge(src - 1, dst - 1)
print(db.max_row_count)
if __name__ == '__main__':
main() |
# Find the Most Competitive Subsequence: https://leetcode.com/problems/find-the-most-competitive-subsequence/
# Given an integer array nums and a positive integer k, return the most competitive subsequence of nums of size k.
# An array's subsequence is a resulting sequence obtained by erasing some (possibly zero) elements from the array.
# We define that a subsequence a is more competitive than a subsequence b (of the same length) if in the first position where a and b differ, subsequence a has a number less than the corresponding number in b. For example, [1,3,4] is more competitive than [1,3,5] because the first position they differ is at the final number, and 4 is less than 5.
# If so we simply keep increasing the result so long as we have >= k possible letters to be added
# by using a stack we can check if the number we are checking is smaller and can pop off the bigger so long as the above condition is true
class Solution:
def mostCompetitive(self, nums, k: int):
stack = []
addition = len(nums) - k
for num in nums:
while addition > 0 and len(stack) > 0 and stack[-1] > num:
stack.pop()
addition -= 1
stack.append(num)
while len(stack) != k:
stack.pop()
return stack
# The above works the trick is we need to figure out how many values we are allowed to remove while parsing so that we can always have
# the right amount of values in the subset. Then we can pop off any values if they are larger numbers on our parsing stack than our
# cur num
# This will run in O(N) for time and space and I believe it is optimal.
# Score Card
# Did I need hints? N
# Did you finish within 30 min? 15
# Was the solution optimal? Yea
# Were there any bugs? I forgot that I need to pop off all numbers
# 5 5 5 4 = 4.75
| class Solution:
def most_competitive(self, nums, k: int):
stack = []
addition = len(nums) - k
for num in nums:
while addition > 0 and len(stack) > 0 and (stack[-1] > num):
stack.pop()
addition -= 1
stack.append(num)
while len(stack) != k:
stack.pop()
return stack |
# Template 1. preorder DFS
# O(N) / O(H)
class Solution:
def preorderTraversal(self, root: TreeNode) -> List[int]:
arr = []
def preorder(node):
if not node:
return
arr.append(node.val)
preorder(node.left)
preorder(node.right)
preorder(root)
return arr
# Template 2. inorder DFS
# O(N) / O(H)
class Solution:
def inorderTraversal(self, root: TreeNode) -> List[int]:
arr = []
def inorder(node):
if not node:
return
inorder(node.left)
arr.append(node.val)
inorder(node.right)
inorder(root)
return arr
# Template 3. postorder DFS
# O(N) / O(H)
class Solution:
def postorderTraversal(self, root: TreeNode) -> List[int]:
arr = []
def postorder(node):
if not node:
return
postorder(node.left)
postorder(node.right)
arr.append(node.val)
postorder(root)
return arr | class Solution:
def preorder_traversal(self, root: TreeNode) -> List[int]:
arr = []
def preorder(node):
if not node:
return
arr.append(node.val)
preorder(node.left)
preorder(node.right)
preorder(root)
return arr
class Solution:
def inorder_traversal(self, root: TreeNode) -> List[int]:
arr = []
def inorder(node):
if not node:
return
inorder(node.left)
arr.append(node.val)
inorder(node.right)
inorder(root)
return arr
class Solution:
def postorder_traversal(self, root: TreeNode) -> List[int]:
arr = []
def postorder(node):
if not node:
return
postorder(node.left)
postorder(node.right)
arr.append(node.val)
postorder(root)
return arr |
with open('artistsfollowed.txt') as af:
with open('/app/tosearch.txt', 'w') as ts:
for line in af:
if 'name' in line:
line = line.strip()
line = line.replace('name: ', '')
line = line.replace('\'', '')
line = line.replace(',', '')
ts.write(line + '\n')
| with open('artistsfollowed.txt') as af:
with open('/app/tosearch.txt', 'w') as ts:
for line in af:
if 'name' in line:
line = line.strip()
line = line.replace('name: ', '')
line = line.replace("'", '')
line = line.replace(',', '')
ts.write(line + '\n') |
'''a Python program to print out a set containing all the colors from color_list_1
which are not present in color_list_2'''
def main():
color_list_1 = set(["White", "Black", "Red"])
color_list_2 = set(["Red", "Green"])
print("Original set elements:")
print(color_list_1)
print(color_list_2)
print("\nDifferenct of color_list_1 and color_list_2:")
print(color_list_1.difference(color_list_2))
print("\nDifferenct of color_list_2 and color_list_1:")
print(color_list_2.difference(color_list_1))
main () | """a Python program to print out a set containing all the colors from color_list_1
which are not present in color_list_2"""
def main():
color_list_1 = set(['White', 'Black', 'Red'])
color_list_2 = set(['Red', 'Green'])
print('Original set elements:')
print(color_list_1)
print(color_list_2)
print('\nDifferenct of color_list_1 and color_list_2:')
print(color_list_1.difference(color_list_2))
print('\nDifferenct of color_list_2 and color_list_1:')
print(color_list_2.difference(color_list_1))
main() |
input = [
('Mamma Mia', ['ABBA']),
('Ghost Rule', ['DECO*27', 'Hatsune Miku']),
('Animals', ['Martin Garrix']),
('Remember The Name', ['Ed Sheeran', 'Eminem', '50 Cent']),
('404 Not Found', [])
]
def songTitle(song):
artists = ''
if len(song[1]) > 1:
for artist in range(len(song[1])):
artists += (song[1][artist] + ', ')
artists += ('and ' + song[1][-1] + ' - ')
elif len(song[1]) == 1:
artists = song[1][0] + ' - '
else:
artists = ''
return artists + song[0]
for song in input:
print(songTitle(song))
| input = [('Mamma Mia', ['ABBA']), ('Ghost Rule', ['DECO*27', 'Hatsune Miku']), ('Animals', ['Martin Garrix']), ('Remember The Name', ['Ed Sheeran', 'Eminem', '50 Cent']), ('404 Not Found', [])]
def song_title(song):
artists = ''
if len(song[1]) > 1:
for artist in range(len(song[1])):
artists += song[1][artist] + ', '
artists += 'and ' + song[1][-1] + ' - '
elif len(song[1]) == 1:
artists = song[1][0] + ' - '
else:
artists = ''
return artists + song[0]
for song in input:
print(song_title(song)) |
class FluidAudioDriver():
''' Represents the FluidSynth audio driver object as defined in audio.h.
This class is inspired by the FluidAudioDriver object from pyfluidsynth by MostAwesomeDude.
Member:
audio_driver -- The FluidSynth audio driver object (fluid_audio_driver_t).
handle -- The handle to the FluidSynth library. Should be FluidHandle but a raw handle will
probably work, too (FluidHandle).
'''
def __init__( self, handle, synth, settings ):
''' Create a new FluidSynth audio driver instance using given handle, synth and settings
objects. '''
self.handle = handle
self.audio_driver = handle.new_fluid_audio_driver( settings.settings, synth.synth )
def __del__(self):
''' Delete the audio driver. '''
self.handle.delete_fluid_audio_driver( self.audio_driver ) | class Fluidaudiodriver:
""" Represents the FluidSynth audio driver object as defined in audio.h.
This class is inspired by the FluidAudioDriver object from pyfluidsynth by MostAwesomeDude.
Member:
audio_driver -- The FluidSynth audio driver object (fluid_audio_driver_t).
handle -- The handle to the FluidSynth library. Should be FluidHandle but a raw handle will
probably work, too (FluidHandle).
"""
def __init__(self, handle, synth, settings):
""" Create a new FluidSynth audio driver instance using given handle, synth and settings
objects. """
self.handle = handle
self.audio_driver = handle.new_fluid_audio_driver(settings.settings, synth.synth)
def __del__(self):
""" Delete the audio driver. """
self.handle.delete_fluid_audio_driver(self.audio_driver) |
class Writer:
def __init__(self, outfile):
self.outfile = outfile
def writeHeader(self):
pass
def write(self, record):
pass
def writeFooter(self):
pass
| class Writer:
def __init__(self, outfile):
self.outfile = outfile
def write_header(self):
pass
def write(self, record):
pass
def write_footer(self):
pass |
a='cdef'
b='ab'
print('a'/'b')
a=8
b='ab'
print('a'/'b')
| a = 'cdef'
b = 'ab'
print('a' / 'b')
a = 8
b = 'ab'
print('a' / 'b') |
## GroupID-8 (14114002_14114068) - Abhishek Jaisingh & Tarun Kumar
## Date: April 15, 2016
## bitwise_manipulations.py - Bitwise Manipulation Functions for Travelling Salesman Problem
def size(int_type):
length = 0
count = 0
while (int_type):
count += (int_type & 1)
length += 1
int_type >>= 1
return count
def length(int_type):
length = 0
count = 0
while (int_type):
count += (int_type & 1)
length += 1
int_type >>= 1
return length | def size(int_type):
length = 0
count = 0
while int_type:
count += int_type & 1
length += 1
int_type >>= 1
return count
def length(int_type):
length = 0
count = 0
while int_type:
count += int_type & 1
length += 1
int_type >>= 1
return length |
print("To change the data type of data")
int_data=int(input("Enter the integer data:"))
dec_data=float(input("Enter the decimal data:"))
int_str=str(int_data)
print(int_str)
dec_int=int(dec_data)
print(dec_int)
dec_str=str(dec_data) | print('To change the data type of data')
int_data = int(input('Enter the integer data:'))
dec_data = float(input('Enter the decimal data:'))
int_str = str(int_data)
print(int_str)
dec_int = int(dec_data)
print(dec_int)
dec_str = str(dec_data) |
@dataclass
class Point:
x: int
y: int
z: int
position = property()
@position.setter
def position(self, new_value):
if type(new_value) not in (list, tuple, set):
raise TypeError
elif len(new_value) != 3:
raise ValueError
else:
self.x, self.y, self.z = new_value
| @dataclass
class Point:
x: int
y: int
z: int
position = property()
@position.setter
def position(self, new_value):
if type(new_value) not in (list, tuple, set):
raise TypeError
elif len(new_value) != 3:
raise ValueError
else:
(self.x, self.y, self.z) = new_value |
def get_sql_lite_conn_str(db_file: str):
db_file_stripped = db_file.strip()
if not db_file or not db_file_stripped:
# db_file = '../db/meet_app.db'
raise Exception("SQL lite DB file is not specified.")
return 'sqlite:///' + db_file_stripped | def get_sql_lite_conn_str(db_file: str):
db_file_stripped = db_file.strip()
if not db_file or not db_file_stripped:
raise exception('SQL lite DB file is not specified.')
return 'sqlite:///' + db_file_stripped |
# definitions used
# constants
DE = 'DE'
# variables
qhLen = None # number of rows of the quarter of an hour output vector (4 each hour)
header = None
zones = None
dataImport = None
dataExport = None
sumImport = None
sumExport = None
data = None
# output file names
output_file_name = 'GenerationAndLoad.csv'
# countries in the CWE area
countries_dict = {
'AT': ['DE'],
'BE': ['FR', 'NL'],
'FR': ['BE', 'DE'],
'DE': ['AT', 'FR', 'NL'],
'NL': ['BE', 'DE']
}
PSRTYPE_MAPPINGS = {
'A03': 'Mixed',
'A04': 'Generation',
'A05': 'Load',
'B01': 'Biomass',
'B02': 'Fossil Brown coal/Lignite',
'B03': 'Fossil Coal-derived gas',
'B04': 'Fossil Gas',
'B05': 'Fossil Hard coal',
'B06': 'Fossil Oil',
'B07': 'Fossil Oil shale',
'B08': 'Fossil Peat',
'B09': 'Geothermal',
'B10': 'Hydro Pumped Storage',
'B11': 'Hydro Run-of-river and poundage',
'B12': 'Hydro Water Reservoir',
'B13': 'Marine',
'B14': 'Nuclear',
'B15': 'Other renewable',
'B16': 'Solar',
'B17': 'Waste',
'B18': 'Wind Offshore',
'B19': 'Wind Onshore',
'B20': 'Other',
'B21': 'AC Link',
'B22': 'DC Link',
'B23': 'Substation',
'B24': 'Transformer'
}
# countries_dict = {
# #'AL': ['GR', 'ME', 'RS'],
# 'AT': ['CZ', 'DE', 'HU', 'IT', 'SI', 'CH'],
# #'BY': ['LT', 'UA'],
# 'BE': ['FR', 'LU', 'NL'],
# #'BA': ['HR', 'ME', 'RS'],
# 'BG': ['GR', 'MK', 'RO', 'RS', 'TR'],
# #'HR': ['BA', 'HU', 'RS', 'SI'],
# 'CZ': ['AT', 'DE', 'PL', 'SK'],
# 'DK': ['DE', 'NO', 'SE'],
# 'EE': ['FI', 'LV', 'RU'],
# #'MK': ['BG', 'GR', 'RS'],
# 'FI': ['EE', 'NO', 'RU', 'SE'],
# 'FR': ['BE', 'DE', 'IT', 'ES', 'CH'],
# 'DE': ['AT', 'CH', 'CZ', 'DK', 'FR', 'NL', 'PL', 'SE'],
# 'GR': ['AL', 'BG', 'IT', 'MK', 'TR'],
# 'HU': ['AT', 'HR', 'RO', 'RS', 'SK', 'UA'],
# 'IT': ['AT', 'FR', 'GR', 'MT', 'SI', 'CH'],
# 'LV': ['EE', 'LT', 'RU'],
# 'LT': ['BY', 'LV', 'PL', 'RU', 'SE'],
# #'MT': ['IT'],
# #'MD': ['UA'],
# 'ME': ['AL', 'BA', 'RS'],
# 'NL': ['BE', 'DE', 'NO'],
# 'NO': ['DK', 'FI', 'NL', 'SE'],
# 'PL': ['CZ', 'DE', 'LT', 'SK', 'SE', 'UA'],
# 'PT': ['ES'],
# 'RO': ['BG', 'HU', 'RS', 'UA'],
# #'RU': ['EE', 'FI', 'LV', 'LT', 'UA'],
# #'RS': ['AL', 'BA', 'BG', 'HR', 'HU', 'MK', 'ME', 'RO'],
# 'SK': ['CZ', 'HU', 'PL', 'UA'],
# 'SI': ['AT', 'HR', 'IT'],
# 'ES': ['FR', 'PT'],
# 'SE': ['DK', 'FI', 'DE', 'LT', 'NO', 'PL'],
# 'CH': ['AT', 'FR', 'DE', 'IT']
# #'TR': ['BG', 'GR'],
# #'UA': ['BY', 'HU', 'MD', 'PL', 'RO', 'RU', 'SK']
# }
| de = 'DE'
qh_len = None
header = None
zones = None
data_import = None
data_export = None
sum_import = None
sum_export = None
data = None
output_file_name = 'GenerationAndLoad.csv'
countries_dict = {'AT': ['DE'], 'BE': ['FR', 'NL'], 'FR': ['BE', 'DE'], 'DE': ['AT', 'FR', 'NL'], 'NL': ['BE', 'DE']}
psrtype_mappings = {'A03': 'Mixed', 'A04': 'Generation', 'A05': 'Load', 'B01': 'Biomass', 'B02': 'Fossil Brown coal/Lignite', 'B03': 'Fossil Coal-derived gas', 'B04': 'Fossil Gas', 'B05': 'Fossil Hard coal', 'B06': 'Fossil Oil', 'B07': 'Fossil Oil shale', 'B08': 'Fossil Peat', 'B09': 'Geothermal', 'B10': 'Hydro Pumped Storage', 'B11': 'Hydro Run-of-river and poundage', 'B12': 'Hydro Water Reservoir', 'B13': 'Marine', 'B14': 'Nuclear', 'B15': 'Other renewable', 'B16': 'Solar', 'B17': 'Waste', 'B18': 'Wind Offshore', 'B19': 'Wind Onshore', 'B20': 'Other', 'B21': 'AC Link', 'B22': 'DC Link', 'B23': 'Substation', 'B24': 'Transformer'} |
class StructureObject:
def __init__(self, name="", dir=""):
self.name = name
self.dir = dir
def getName(self): return self.name
def getDir(self): return self.dir
def getType(self): return type(self) | class Structureobject:
def __init__(self, name='', dir=''):
self.name = name
self.dir = dir
def get_name(self):
return self.name
def get_dir(self):
return self.dir
def get_type(self):
return type(self) |
def dbl_linear(n):
u = [1]
def func(nums):
global fin
new_nums = []
for i in nums:
new_nums.append(2 * i + 1)
new_nums.append(3 * i + 1)
u.extend(new_nums)
if len(u) > n*12:
fin = list(sorted(set(u)))
else:
func(new_nums)
return fin[n]
return func(u)
if __name__ == "__main__":
print(dbl_linear(10))
print(dbl_linear(500))
print(dbl_linear(60000))
| def dbl_linear(n):
u = [1]
def func(nums):
global fin
new_nums = []
for i in nums:
new_nums.append(2 * i + 1)
new_nums.append(3 * i + 1)
u.extend(new_nums)
if len(u) > n * 12:
fin = list(sorted(set(u)))
else:
func(new_nums)
return fin[n]
return func(u)
if __name__ == '__main__':
print(dbl_linear(10))
print(dbl_linear(500))
print(dbl_linear(60000)) |
def write(filename, content):
with open(filename, 'w') as file_object:
file_object.write(content)
def appendWrite(filename, content):
with open(filename, 'a') as file_object:
file_object.write(content)
| def write(filename, content):
with open(filename, 'w') as file_object:
file_object.write(content)
def append_write(filename, content):
with open(filename, 'a') as file_object:
file_object.write(content) |
# Copyright (c) 2021 Qianyun, Inc. All rights reserved.
# smartx
SMARTX_INSTANCE_STATE_STOPPED = 'stopped'
| smartx_instance_state_stopped = 'stopped' |
for i in range (6):
for j in range (7):
if (i==0 and j %3!=0) or (i==1 and j % 3==0) or (i-j==2) or (i+j==8):
print("*",end=" ")
else:
print(end=" ")
print()
| for i in range(6):
for j in range(7):
if i == 0 and j % 3 != 0 or (i == 1 and j % 3 == 0) or i - j == 2 or (i + j == 8):
print('*', end=' ')
else:
print(end=' ')
print() |
A, B, K = map(int, input().split())
if A >= K:
A -= K
print(A, B)
else:
A, B = 0, max(0, B - (K - A))
print(A, B)
| (a, b, k) = map(int, input().split())
if A >= K:
a -= K
print(A, B)
else:
(a, b) = (0, max(0, B - (K - A)))
print(A, B) |
class Solution:
def plusOne(self, digits: List[int]) -> List[int]:
carry = 0
for i in range(len(digits) - 1, -1, -1):
if i == len(digits) - 1:
digits[i] += 1
else:
digits[i] = digits[i] + carry
if digits[i] == 10:
digits[i] = 0
carry = 1
else:
carry = 0
return digits if not carry else [1] + digits | class Solution:
def plus_one(self, digits: List[int]) -> List[int]:
carry = 0
for i in range(len(digits) - 1, -1, -1):
if i == len(digits) - 1:
digits[i] += 1
else:
digits[i] = digits[i] + carry
if digits[i] == 10:
digits[i] = 0
carry = 1
else:
carry = 0
return digits if not carry else [1] + digits |
#!/usr/bin/env python3
charlimit = 450
def isChan(chan, checkprefix):
if not chan:
return False
elif chan.startswith("#"):
return True
elif checkprefix and len(chan) >= 2 and not chan[0].isalnum() and chan[1] == "#":
return True
else:
return False
| charlimit = 450
def is_chan(chan, checkprefix):
if not chan:
return False
elif chan.startswith('#'):
return True
elif checkprefix and len(chan) >= 2 and (not chan[0].isalnum()) and (chan[1] == '#'):
return True
else:
return False |
__title__ = 'MongoFlask'
__description__ = 'A Python Flask library for connecting a MongoDB instance to a Flask application'
__url__ = 'https://github.com/juanmanuel96/mongo-flask'
__version_info__ = ('0', '1', '3')
__version__ = '.'.join(__version_info__)
__author__ = 'Juan Vazquez'
__py_version__ = 3
| __title__ = 'MongoFlask'
__description__ = 'A Python Flask library for connecting a MongoDB instance to a Flask application'
__url__ = 'https://github.com/juanmanuel96/mongo-flask'
__version_info__ = ('0', '1', '3')
__version__ = '.'.join(__version_info__)
__author__ = 'Juan Vazquez'
__py_version__ = 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.