content
stringlengths 7
1.05M
|
|---|
#take a user input
i = input()
print (i)
#int
i = 23
#float
j = 23.5
#bool
k = True
# char
l = 'w'
#string
m = "word"
#input typecasting
print("Try to enter an alphabet")
value1 = input()
value2 = int(value1)
print (value2+1)
print("Please input integers only")
a = int(input())
b = int(input())
#Operator 1
print (a+b);
print (a-b);
print (a*b);
#division later
# Operator 2
print (a>b)
print(a<b)
print(a==b)
print(a>=b)
print(a<=b)
print(a!=b)
#Operator 3
a = True
b = False
print(a or b)
print(a and b)
print(not a)
#Do these operators work outside int
#Yes, but don't really use anything execpt +
a = "hello"
b = "world"
print (a+b);
# - & // don't work
#alphabetical
print (a>b)
print(a<b)
print(a==b)
print(a>=b)
print(a<=b)
print(a!=b)
#complicated, useless, do you really want to know
print(a or b)
print(a and b)
print(not a)
#cool
h = 6
print(a*6)
# division
a = 5
b = 2
c = -5
# // is integer division. It uses the floor value
print(a//b)
print (c//b)
d = 5.0
e = 2.0
f = -5.0
# / is float division
print(d/e)
print(f/e)
# Guess
val1 = 6.0
val2 = 2.0
val3 = 6
val4 = 2
print(val1/val2)
print(val1//val2)
print(val3/val4)
print(val3//val4)
print(val1/val4)
print(val1//val4)
print(val3/val2)
print(val3//val2)
# Guess again
val1 = 5.0
val2 = 2.0
val3 = 5
val4 = 2
print(val1/val2)
print(val1//val2)
print(val3/val4)
print(val3//val4)
print(val1/val4)
print(val1//val4)
print(val3/val2)
print(val3//val2)
# You don't need to remember it. It's just for fun
# But if you want to - // will awlays give the floor, no matter the argument. And if any one argument is float, the answer will be written as float
|
class Sensor:
"""Sensor, measures an amount """
last_measure = -1
def __init__(self, range_min=0, range_max=4095, average_converging_speed=1 / 2):
""" constructor.
:param range_min: min value of sensor
:param range_max: max value of sensor
:param average_converging_speed: speed the average goes towards the last measure (range 0-1) """
self.range_min = range_min
self.range_max = range_max
self.average_converging_speed = average_converging_speed
self.average = (range_min + range_max) / 2
def __str__(self):
"""Prints the object."""
return "Sensor: average: {}, last measure {}, percentage: {}".format(self.get_average(),
self.get_last_measure(),
self.get_percentage())
def raw_measure(self):
"""returns only one raw measure"""
raise Exception("raw measure should be implemented")
def measure(self):
"""measures 3 times, makes average of them, updates global average, returns local average."""
sum_raw_measures = 0
for _ in range(3):
sum_raw_measures += self.raw_measure()
self.last_measure = sum_raw_measures / 3
self.average = self.last_measure * self.average_converging_speed + self.average * (
1 - self.average_converging_speed)
return self.last_measure
def get_average(self):
"""average (weighted exponentially) based on recent measures, more constant than last measure."""
return self.average
def get_last_measure(self):
"""last measure, raw data, average() instead returns a weighted average with the previous_sent_perc ones."""
return self.last_measure
def get_percentage(self):
"""actual percentage of the average between range passed."""
return (self.average - self.range_min) / (self.range_max - self.range_min)
|
"""
*Line-Direction*
Controls the direction of text.
"""
__all__ = ["LineDirection"]
css_syntax = "text-direction"
class LineDirection:
Name = "Direction" # [TODO} ident?
LeftToRight = "ltr"
RightToLeft = "rtl"
|
def add_native_methods(clazz):
def mapAlternativeName__java_io_File__(a0):
raise NotImplementedError()
clazz.mapAlternativeName__java_io_File__ = staticmethod(mapAlternativeName__java_io_File__)
|
card_number = "4532 1512 1994 8973"
print("*" * 12, card_number[-4:len(card_number)])
hidden_card_number = "*" * 12 + card_number[-4:]
print(hidden_card_number)
card_number = "4532151219948973"
print(card_number)
print(card_number[0:4]) #первые 4 символа
print(card_number[12:16]) #последние 4 символа
print(card_number[12:len(card_number)]) #последние 4 символа c подсчетом длины строки
print(card_number[-4:len(card_number)]) #последние 4 символа , обратная нумерация
print(card_number[-4:]) #последние 4 символа обратная нумерация индексов
print(card_number[:4]) #первые 4 символа
print(card_number[4:(4+4)]) #вторая 4-ка
print(card_number[8:(8+4)]) #третья 4-ка
print(card_number[12:]) #последняя 4-ка
print(card_number[:-12]) #первая 4-ка, обратная нумерация
print(card_number[-12:(-12+4)]) #вторая 4-ка, обратная нумерация
print(card_number[-8:(-8+4)]) #третья 4-ка, обратная нумерация
print(card_number[-4:]) #последняя 4-ка, обратная нумерация
hidden_card_number = "*" * 12 + card_number[-4:]
print(hidden_card_number)
|
class Timings(object):
def __init__(self, j):
self.raw = j
if "blocked" in self.raw:
self.blocked = self.raw["blocked"]
else:
self.blocked = -1
if "dns" in self.raw:
self.dns = self.raw["dns"]
else:
self.dns = -1
if "connect" in self.raw:
self.connect = self.raw["connect"]
else:
self.connect = -1
self.send = self.raw["send"]
self.wait = self.raw["wait"]
self.receive = self.raw["receive"]
if "ssl" in self.raw:
self.ssl = self.raw["ssl"]
else:
self.ssl = -1
if "comment" in self.raw:
self.comment = self.raw["comment"]
else:
self.comment = ''
|
# -*- coding: utf-8 -*-
__author__ = "Paul Schifferer <dm@sweetrpg.com>"
"""Constants.
"""
# argument values
DEFAULT_PAGE_SIZE = 50
MAX_PAGE_SIZE = 200
# url parameters
PAGE_PARAM = "page[number]"
LIMIT_PARAM = "page[size]"
SORT_PARAM = 'sort'
INCLUDE_PARAM = "include"
# type info keys
ENDPOINT_PATH = "endpoint_path"
API_SCHEMA_CLASS = "api_schema_class"
OBJECT_CLASS = "object_class"
|
def splitscore(file_dir):
score = []
Prefix_str = []
f = open(file_dir)
for line in f:
s =line.split()
score.append(float(s[-1]))
s = s[0] + ' ' + s[1] + ' ' + s[2] + ' '
Prefix_str.append(s)
return score,Prefix_str
file_dir1='submission/2019-01-28_15:45:05_fishnet150_52_submission.txt'
score1,Prefix_str = splitscore(file_dir1)
file_dir2 = 'submission/2019-02-13_15:22:05_FeatherNet54-se_69_submission.txt'
score2,Prefix_str = splitscore(file_dir2)
# print(Prefix_str[1])
file_dir3 = 'submission/2019-03-01_22:25:43_fishnet150_27_submission.txt'
score3,Prefix_str = splitscore(file_dir3)
#
file_dir4 = 'submission/2019-02-13_13:30:12_FeatherNet54_41_submission.txt'
score4,Prefix_str = splitscore(file_dir4)
#
file_dir5 = 'submission/2019-02-13_14:13:43_fishnet150_16_submission.txt'
score5,Prefix_str = splitscore(file_dir5)
file_dir6 = 'submission/2019-02-16_19:31:04_moilenetv2_5_submission.txt'
score6,Prefix_str = splitscore(file_dir6)
file_dir7 = 'submission/2019-02-16_19:30:02_moilenetv2_7_submission.txt'
score7,Prefix_str = splitscore(file_dir7)
file_dir8 = 'submission/2019-02-16_19:28:47_moilenetv2_6_submission.txt'
score8,Prefix_str = splitscore(file_dir8)
file_dir9 = 'submission/2019-03-01_17:10:11_mobilelitenetB_48_submission.txt'
score9,Prefix_str = splitscore(file_dir9)
file_dir10 = 'submission/2019-03-01_17:38:27_mobilelitenetA_51_submission.txt'
score10,Prefix_str = splitscore(file_dir10)
# scores =[score1,score2,score3,score4,score5,score6,score7,score8,score9]
scores = [score1,score2,score3,score4,score5,score6,score7,score8,score9,score10]
def Average(lst):
return sum(lst) / len(lst)
def fecth_ensembled_score(scores, threshold):
ensembled_score = []
for i in range(len(score1)):
line_socres = [scores[j][i] for j in range(len(scores))]
mean_socre = Average(line_socres)
if mean_socre > threshold:
ensembled_score.append(max(line_socres))
else:
ensembled_score.append(min(line_socres))
return ensembled_score
def num_err(ensembled_score,threshold,real_scores):
count = 0
for i in range(len(real_scores)):
if real_scores[i] == (ensembled_score[i]>0.5):
pass
else:
count = count + 1
if count < 50:
print('threshold: {:.3f} num_errors is {}'.format(threshold,count))
return count
# submission_ensembled_file_dir='data/val_label.txt'
submission_ensembled_file_dir='data/test_private_list.txt'
real_scores,Prefix_str = splitscore(submission_ensembled_file_dir)
print('img num in test: ',len(real_scores))
def get_best_threshold():
min_count = 10000000
best_threshold = 0.0
for i in range(100):
threshold = i / 100
ensembled_score = fecth_ensembled_score(scores, threshold)
count = num_err(ensembled_score,threshold,real_scores)
if count < min_count:
min_count = count
best_threshold = threshold
return best_threshold
best_threshold = get_best_threshold()
print('best threshold is :',best_threshold)
submission_ensembled_file_dir='submission/final_submission.txt'
ensembled_file = open(submission_ensembled_file_dir,'a')
ensembled_score = fecth_ensembled_score(scores, best_threshold)
for i in range(len(ensembled_score)):
ensembled_file.write(Prefix_str[i]+str(ensembled_score[i])+'\n')
ensembled_file.close()
|
"""Faça um programa que leia uma frase pelo teclado
e mostre quantas vezes aparece a letra “A”, em que posição ela aparece a primeira vez
e em que posição ela aparece a última vez."""
p = str(input('Digite uma frase qualquer: ')).strip().lower()
print(f'Na frase {p} a letra A aparece {p.count("a")} vezes.')
print('A primeira letra A aparece na posição', p.find('a') + 1)
print('A última letra A aparece na posição', p.rfind('a') + 1)
|
layer_info = \
{1: {'B': 1, 'K': 96, 'C': 3, 'OY': 165, 'OX': 165, 'FY': 3, 'FX': 3, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
2: {'B': 1, 'K': 42, 'C': 96, 'OY': 165, 'OX': 165, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
3: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 5, 'FX': 5, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 42},
4: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
5: {'B': 1, 'K': 96, 'C': 96, 'OY': 83, 'OX': 83, 'FY': 7, 'FX': 7, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 96},
6: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
7: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 42},
8: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
9: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 7, 'FX': 7, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 42},
10: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
11: {'B': 1, 'K': 96, 'C': 96, 'OY': 83, 'OX': 83, 'FY': 7, 'FX': 7, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 96},
12: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
13: {'B': 1, 'K': 96, 'C': 96, 'OY': 83, 'OX': 83, 'FY': 5, 'FX': 5, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 96},
14: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
15: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 42},
16: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
17: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 7, 'FX': 7, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 42},
18: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
19: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 42},
20: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
21: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 42},
22: {'B': 1, 'K': 42, 'C': 42, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
23: {'B': 1, 'K': 42, 'C': 96, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
24: {'B': 1, 'K': 42, 'C': 96, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
25: {'B': 1, 'K': 84, 'C': 168, 'OY': 83, 'OX': 83, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
26: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 84},
27: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
28: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 7, 'FX': 7, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 84},
29: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
30: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 84},
31: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
32: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 7, 'FX': 7, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 84},
33: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
34: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 7, 'FX': 7, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 84},
35: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
36: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 84},
37: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
38: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 84},
39: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
40: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 7, 'FX': 7, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 84},
41: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
42: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 84},
43: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
44: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 84},
45: {'B': 1, 'K': 84, 'C': 84, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
46: {'B': 1, 'K': 84, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
47: {'B': 1, 'K': 84, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
48: {'B': 1, 'K': 168, 'C': 336, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
49: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
50: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
51: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
52: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
53: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
54: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
55: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
56: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
57: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
58: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
59: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
60: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
61: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
62: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
63: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
64: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
65: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
66: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
67: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
68: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
69: {'B': 1, 'K': 168, 'C': 336, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
70: {'B': 1, 'K': 168, 'C': 1008, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
71: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
72: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
73: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
74: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
75: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
76: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
77: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
78: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
79: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
80: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
81: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
82: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
83: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
84: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
85: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
86: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
87: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
88: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
89: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
90: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
91: {'B': 1, 'K': 168, 'C': 1008, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
92: {'B': 1, 'K': 168, 'C': 1008, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
93: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
94: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
95: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
96: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
97: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
98: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
99: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
100: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
101: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
102: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
103: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
104: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
105: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
106: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
107: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
108: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
109: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
110: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
111: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
112: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
113: {'B': 1, 'K': 168, 'C': 1008, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
114: {'B': 1, 'K': 168, 'C': 1008, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
115: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
116: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
117: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
118: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
119: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
120: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
121: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
122: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
123: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
124: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
125: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
126: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
127: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
128: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
129: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
130: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
131: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
132: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
133: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
134: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
135: {'B': 1, 'K': 168, 'C': 1008, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
136: {'B': 1, 'K': 168, 'C': 1008, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
137: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
138: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
139: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
140: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
141: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
142: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
143: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
144: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
145: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
146: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
147: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
148: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
149: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
150: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
151: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
152: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
153: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
154: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
155: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
156: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
157: {'B': 1, 'K': 168, 'C': 1008, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
158: {'B': 1, 'K': 168, 'C': 1008, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
159: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
160: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
161: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
162: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
163: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
164: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
165: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
166: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
167: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
168: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
169: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
170: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
171: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
172: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
173: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
174: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
175: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
176: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
177: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 168},
178: {'B': 1, 'K': 168, 'C': 168, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
179: {'B': 1, 'K': 336, 'C': 1008, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
180: {'B': 1, 'K': 336, 'C': 1008, 'OY': 42, 'OX': 42, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
181: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
182: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
183: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 7, 'FX': 7, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
184: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
185: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
186: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
187: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 7, 'FX': 7, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
188: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
189: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 7, 'FX': 7, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
190: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
191: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
192: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
193: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
194: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
195: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 7, 'FX': 7, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
196: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
197: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
198: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
199: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
200: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
201: {'B': 1, 'K': 168, 'C': 1008, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
202: {'B': 1, 'K': 168, 'C': 1008, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
203: {'B': 1, 'K': 336, 'C': 1344, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
204: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
205: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
206: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
207: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
208: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
209: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
210: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
211: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
212: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
213: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
214: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
215: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
216: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
217: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
218: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
219: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
220: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
221: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
222: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
223: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
224: {'B': 1, 'K': 336, 'C': 1344, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
225: {'B': 1, 'K': 336, 'C': 2016, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
226: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
227: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
228: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
229: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
230: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
231: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
232: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
233: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
234: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
235: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
236: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
237: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
238: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
239: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
240: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
241: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
242: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
243: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
244: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
245: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
246: {'B': 1, 'K': 336, 'C': 2016, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
247: {'B': 1, 'K': 336, 'C': 2016, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
248: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
249: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
250: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
251: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
252: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
253: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
254: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
255: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
256: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
257: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
258: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
259: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
260: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
261: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
262: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
263: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
264: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
265: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
266: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
267: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
268: {'B': 1, 'K': 336, 'C': 2016, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
269: {'B': 1, 'K': 336, 'C': 2016, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
270: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
271: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
272: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
273: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
274: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
275: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
276: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
277: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
278: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
279: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
280: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
281: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
282: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
283: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
284: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
285: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
286: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
287: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
288: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
289: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
290: {'B': 1, 'K': 336, 'C': 2016, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
291: {'B': 1, 'K': 336, 'C': 2016, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
292: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
293: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
294: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
295: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
296: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
297: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
298: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
299: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
300: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
301: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
302: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
303: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
304: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
305: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
306: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
307: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
308: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
309: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
310: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
311: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
312: {'B': 1, 'K': 336, 'C': 2016, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
313: {'B': 1, 'K': 336, 'C': 2016, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
314: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
315: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
316: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
317: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
318: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
319: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
320: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
321: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
322: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
323: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
324: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
325: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
326: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
327: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
328: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
329: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
330: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
331: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
332: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 336},
333: {'B': 1, 'K': 336, 'C': 336, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
334: {'B': 1, 'K': 672, 'C': 2016, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
335: {'B': 1, 'K': 672, 'C': 2016, 'OY': 21, 'OX': 21, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
336: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
337: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
338: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 7, 'FX': 7, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
339: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
340: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
341: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
342: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 7, 'FX': 7, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
343: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
344: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 7, 'FX': 7, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
345: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
346: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 2, 'SX': 2, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
347: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
348: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
349: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
350: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 7, 'FX': 7, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
351: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
352: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
353: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
354: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
355: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
356: {'B': 1, 'K': 336, 'C': 2016, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
357: {'B': 1, 'K': 336, 'C': 2016, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
358: {'B': 1, 'K': 672, 'C': 2688, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
359: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
360: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
361: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
362: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
363: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
364: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
365: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
366: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
367: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
368: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
369: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
370: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
371: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
372: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
373: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
374: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
375: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
376: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
377: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
378: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
379: {'B': 1, 'K': 672, 'C': 2688, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
380: {'B': 1, 'K': 672, 'C': 4032, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
381: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
382: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
383: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
384: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
385: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
386: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
387: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
388: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
389: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
390: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
391: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
392: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
393: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
394: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
395: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
396: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
397: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
398: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
399: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
400: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
401: {'B': 1, 'K': 672, 'C': 4032, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
402: {'B': 1, 'K': 672, 'C': 4032, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
403: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
404: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
405: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
406: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
407: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
408: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
409: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
410: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
411: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
412: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
413: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
414: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
415: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
416: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
417: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
418: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
419: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
420: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
421: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
422: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
423: {'B': 1, 'K': 672, 'C': 4032, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
424: {'B': 1, 'K': 672, 'C': 4032, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
425: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
426: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
427: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
428: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
429: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
430: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
431: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
432: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
433: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
434: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
435: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
436: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
437: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
438: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
439: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
440: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
441: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
442: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
443: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
444: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
445: {'B': 1, 'K': 672, 'C': 4032, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
446: {'B': 1, 'K': 672, 'C': 4032, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
447: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
448: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
449: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
450: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
451: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
452: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
453: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
454: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
455: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
456: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
457: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
458: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
459: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
460: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
461: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
462: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
463: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
464: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
465: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
466: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
467: {'B': 1, 'K': 672, 'C': 4032, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
468: {'B': 1, 'K': 672, 'C': 4032, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
469: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
470: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
471: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
472: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
473: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
474: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
475: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
476: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
477: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
478: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
479: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
480: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
481: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
482: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
483: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 5, 'FX': 5, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
484: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
485: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
486: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
487: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 3, 'FX': 3, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 672},
488: {'B': 1, 'K': 672, 'C': 672, 'OY': 11, 'OX': 11, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1},
489: {'B': 1, 'K': 1000, 'C': 4032, 'OY': 1, 'OX': 1, 'FY': 1, 'FX': 1, 'SY': 1, 'SX': 1, 'SFY': 1, 'SFX': 1, 'PY': 0, 'PX': 0, 'G': 1}}
|
shelters = ['MNTG1', 'MNTG']
twitter_api_key = 'k5O4owMpAPDcI7LG7y4fue9Fc'
twitter_api_secret = 'XXXXX' #Edited out
twitter_access_token = '2150117929-qnttvTJW3uvP0QbZr2ZKxaBlrkRPa9FdUUWSxqx'
twitter_access_token_secret = 'XXXXX'
|
class LatticeModifier:
object = None
strength = None
vertex_group = None
|
"""
Django LDAP user authentication backend for Python 3.
"""
__version__ = (0, 11, 2)
|
class ModbusException(Exception):
def __init__(self, code):
codes = {
'1': 'Illegal Function',
'2': 'Illegal Data Address',
'3': 'Illegal Data Value',
'4': 'Slave Device Failure',
'5': 'Acknowledge',
'6': 'Slave Device Busy',
'7': 'Negative Acknowledge',
'8': 'Memory Parity Error',
'10': 'Gateway Path Unavailable',
'11': 'Gateway Target Device Failed to Respond',
}
super().__init__(codes.get(str(code), 'Unknown error code {}'.format(code)))
class BadCRCResponse(Exception):
pass
class BadCRCRequest(Exception):
pass
|
'''2. Write a Python program to convert all units of time into seconds.'''
def time_conv(ty, tmo, twk, tdy, thr, tmin):
yr = 365 * 24 * 60 * 60 * ty
mont = 30 * 24 * 60 * 60 *tmo
week = 7 * 24 * 60 * 60 * twk
days = 24 * 60 * 60 * tdy
hrs= 60*60 * thr
mins =60* tmin
return f"{ty} year ={yr} seconds\n{tmo} month = {mont} seconds\n{twk} week = {week} seconds\n{tdy}day = {days} seconds\n{thr} hour = {hrs} seconds\n{tmin} minute = {mins} seconds"
print(time_conv(1, 1, 1, 1, 1, 1))
|
"""
# Definition for a Node.
class Node(object):
def __init__(self, val, children):
self.val = val
self.children = children
"""
class Solution(object):
def postorder(self, root):
"""
:type root: Node
:rtype: List[int]
"""
stack = root and [root]
vals = []
while stack:
node = stack.pop()
vals.append(node.val)
stack.extend(node.children)
return vals[::-1]
|
## Single ended filter chain element
#
class FilterElement(object):
## Constructor
def __init__(self):
self.nextelement = None ##! points at next in chain
self.name = "noname" ##! nicename for printing
## Call to input data into the filter
def input(self, data, meta=None):
return self.down.rxup(data, meta)
def output(self, data, meta=None):
return self.nextelement.input(data, meta)
## Call this regularly on blocks which impliment it
def tick(self):
pass
## String classes together with this
def set_next(self, n):
self.nextelement = n
|
def sequentialSearch(alist, item):
pos = 0
found = False
while pos < len(alist) and not found:
if alist[pos] == item:
found = True
else:
pos += 1
return found
if __name__ == '__main__':
test_list = [1, 2, 32, 8, 17, 19, 42, 13, 0]
print(sequentialSearch(test_list, 3))
print(sequentialSearch(test_list, 13))
"""
False
True
"""
|
class driven_range:
def main(self, inputData):
inputData.sort()
self.inputData = inputData.copy()
return self.generateResult()
def convertDigitalToAnalog(self, digitalValueRange, ADC_Sensor_Type):
# Formula used to convert Digital to Analog:
#
# Analog_Value = ((Scale * Digital_Value) / Max._Digital_Value_permissible) - Offset
#
# For 12 Bit:
# Scale = 10 [10A - 0A = 10]
# Max._Digital_Value_permissible = 4094
# Offset = 0 [As no Negative reading is applicable]
#
# For 10 Bit:
# Scale = 30 [15A - (-15A) = 30]
# Max._Digital_Value_permissible = 1023
# Offset = 15 [As negative values upto -15 are applivale]
#
analogValueRange=[]
maxDigitalValue, scale, offset = self.sensorParameters(ADC_Sensor_Type)
for digitalValue in digitalValueRange:
if (0<=digitalValue and digitalValue<=maxDigitalValue):
analogValue = abs(round((scale*digitalValue/maxDigitalValue)-offset))
analogValueRange.append(analogValue)
return analogValueRange
def sensorParameters(self, ADC_Sensor_Type):
if (ADC_Sensor_Type == '12Bits'):
maxDigitalValue = 4094
scale = 10
offset = 0
else:
maxDigitalValue = 1023
scale = 30
offset = 15
return maxDigitalValue, scale, offset
def getRangeListInfo(self):
cumulativeFrequency = 0
rangeInfoList = []
listCurrentPosition = 0
while (cumulativeFrequency != len(self.inputData)):
rangeOpenerElement = self.inputData[listCurrentPosition]
rangeCloserPosition = self.getRangeCloserPosition(listCurrentPosition)
frequency = rangeCloserPosition - listCurrentPosition + 1
rangeCloserElement = self.inputData[rangeCloserPosition]
rangeInfoList.append((rangeOpenerElement, rangeCloserElement, frequency))
listCurrentPosition = rangeCloserPosition + 1
cumulativeFrequency+=frequency
return rangeInfoList
def getRangeCloserPosition(self, listBeginPosition):
rangeCloserPosition = listBeginPosition
for i in range(listBeginPosition+1, len(self.inputData)):
differenceInValues = (self.inputData[i]-self.inputData[rangeCloserPosition])
if(differenceInValues==0 or differenceInValues==1):
rangeCloserPosition = i
return rangeCloserPosition
def generateResult(self):
self.printOnConsole('Range, Result')
rangeInfoList = self.getRangeListInfo()
rangeResult = {}
for rangeInfo in rangeInfoList:
rangeData = f'{rangeInfo[0]}-{rangeInfo[1]}'
freqData = f'{rangeInfo[2]}'
rangeResult.update({rangeData: freqData})
self.printOnConsole(f'{rangeData}, {freqData}')
self.printOnConsole('\n')
return rangeResult
def printOnConsole(self, rangeResult):
print(rangeResult)
|
# Given 2 arrays, create a function that let's a user know (true/false) whether these two arrays contain any
# common items
# For Example:
# const array1 = ['a', 'b', 'c', 'x'];//const array2 = ['z', 'y', 'i'];
# should return false.
# -----------
# const array1 = ['a', 'b', 'c', 'x'];//const array2 = ['z', 'y', 'x'];
# should return true.
# 2 parameters - arrays - no size limit
# return true or false
# Function Definition
def find_common(list_1, list_2):
for i in list1: # O(m)
for j in list2: # O(n)
if i == j:
print('Common element is :', i)
return True
return False
# Declarations
list1 = ['a', 'b', 'c', 'x']
list2 = ['z', 'y', 'x']
find_common(list1, list2)
# BigO(m*n)
|
# version_info should conform to PEP 386
# (major, minor, micro, alpha/beta/rc/final, #)
# (1, 1, 2, 'alpha', 0) => "1.1.2.dev"
# (1, 2, 0, 'beta', 2) => "1.2b2"
__version_info__ = (0, 1, 0, 'alpha', 0)
def _get_version(): # pragma: no cover
" Returns a PEP 386-compliant version number from version_info. "
assert len(__version_info__) == 5
assert __version_info__[3] in ('alpha', 'beta', 'rc', 'final')
parts = 2 if __version_info__[2] == 0 else 3
main = '.'.join(map(str, __version_info__[:parts]))
sub = ''
if __version_info__[3] == 'alpha' and __version_info__[4] == 0:
# TODO: maybe append some sort of git info here??
sub = '.dev'
elif __version_info__[3] != 'final':
mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
sub = mapping[__version_info__[3]] + str(__version_info__[4])
return str(main + sub)
__version__ = _get_version()
|
class Options(object):
def __init__(self, dry_run=False, unoptimized=False, verbose=False, debug=False):
self.dry_run = dry_run
self.unoptimized = unoptimized
self.verbose = verbose
self.debug = debug
|
# Bubble Sort implementation.
def bubbleSort(array):
for i in range(len(array) - 1, -1, -1):
for j in range(i):
if array[j] > array[j+1]:
array = exchange(array, j, j+1)
print(array)
return array
# Exchange function implementation.
def exchange(array, i, j):
temp = array[i]
array[i] = array[j]
array[j] = temp
return array
# Improved bubble sort implementation.
def improvedBubbleSort(array):
flag = True
for i in range(len(array) - 1, -1, -1):
for j in range(i):
if array[j] > array[j+1]:
array = exchange(array, j, j+1)
flag = False
print(array)
if flag:
break
return array
a = input().split()
nums = []
for i in a:
nums.append(int(i))
answer = bubbleSort(nums)
print(answer)
|
# -*- coding: utf-8 -*-
"""
Created on Thu May 2 19:23:43 2019
@author: Lee
"""
|
words = [word.upper() for word in open('gettysburg.txt').read().split()]
theDictionary = {}
for word in words:
theDictionary[word] = theDictionary.get(word,0) + 1
print(theDictionary)
|
#!/usr/bin/env python3
# Small library for generating URLs of visualizations
class Constructor(object):
""" Constructs Google Static Maps API URLs
Constructs requests for the Google Static Maps API by storing substrings of
the overall URL which are created by the add_coords function. The
generate_url function returns the full, assembled URL.
Attributes:
parameters: A an array of strings, each of which is an additional
parameter that will be appended to the base Static Maps API request
URL.
"""
def __init__(self):
self.parameters = []
def generate_url(self, size = "400x400"):
""" Combine stored shapes into a single URL
Joins the base url with shapes specified by the user with an ampersand
in between.
Args:
size: The size of the image to be generated.
Returns:
A string of the API request's URL
"""
return "&".join(["https://maps.googleapis.com/maps/api/staticmap?size=%s" % size] + self.parameters)
def add_coords(self, new_coords, _type = "markers", color = "0x00ff0066"):
""" Add coordinates to the current static map
Adds a string to the parameters table containing a list of coordinates
and variables describing how they should be drawn.
Args:
new_coords: A multidimensional array containing (longitude,
latitude) pairs of coordinates.
_type: A string describing what kind of visual will be drawn.
Possible options include: markers, path, polygon.
color: A string containing a 24-bit or 32-bit hex value that
corresponds to the desired color.
"""
if (_type == "markers"):
new_parameters = "markers=color:%s|size:tiny" % color
elif (_type == "path"):
new_parameters = "path=color:%s|weight:5" % color
elif (_type == "polygon"):
new_parameters = "path=color:0x00000000|fillcolor:%s|weight:5" % color
for coord in new_coords:
new_parameters += "|%f,%f" % (coord[1], coord[0])
self.parameters.append(new_parameters)
def reset(self):
""" Clears all stored paramters """
self.parameters = []
|
class Mobile:
def __init__(self, brand, price):
print("Inside Constructor")
self.brand = brand
self.price = price
def purchase(self):
print("Purchasing a mobile")
print("The mobile has brand", self.brand, "and price", self.price)
print("Mobile-1")
mob1 = Mobile("Apple", 20000)
mob1.purchase()
print("Mobile-2")
mob2 = Mobile("Samsung", 8000)
mob2.purchase()
# we can invoke one method from another using self:
class Mobile2:
def display(self):
print("Displaying Details")
def purchase(self):
self.display()
print("Calcuating the price")
Mobile2().purchase()
|
def byte(n):
return bytes([n])
def rlp_encode_bytes(x):
if len(x) == 1 and x < b'\x80':
# For a single byte whose value is in the [0x00, 0x7f] range,
# that byte is its own RLP encoding.
return x
elif len(x) < 56:
# Otherwise, if a string is 0-55 bytes long, the RLP encoding
# consists of a single byte with value 0x80 plus the length of
# the string followed by the string. The range of the first
# byte is thus [0x80, 0xb7].
return byte(len(x) + 0x80) + x
else:
length = to_binary(len(x))
# If a string is more than 55 bytes long, the RLP encoding
# consists of a single byte with value 0xb7 plus the length in
# bytes of the length of the string in binary form, followed by
# the length of the string, followed by the string. For example,
# a length-1024 string would be encoded as \xb9\x04\x00 followed
# by the string. The range of the first byte is thus [0xb8, 0xbf].
return byte(len(length) + 0xb7) + length + x
def rlp_encode_list(xs):
sx = b''.join(rlp_encode(x) for x in xs)
if len(sx) < 56:
# If the total payload of a list (i.e. the combined length of all
# its items being RLP encoded) is 0-55 bytes long, the RLP encoding
# consists of a single byte with value 0xc0 plus the length of the
# list followed by the concatenation of the RLP encodings of the
# items. The range of the first byte is thus [0xc0, 0xf7].
return byte(len(sx) + 0xc0) + sx
else:
length = to_binary(len(sx))
# If the total payload of a list is more than 55 bytes long, the
# RLP encoding consists of a single byte with value 0xf7 plus the
# length in bytes of the length of the payload in binary form,
# followed by the length of the payload, followed by the concatenation
# of the RLP encodings of the items. The range of the first byte is
# thus [0xf8, 0xff].
return byte(len(length) + 0xf7) + length + sx
def rlp_encode(x):
if isinstance(x,bytes):
return rlp_encode_bytes(x)
elif isinstance(x,list):
return rlp_encode_list(x)
else:
return "unknown type "
# encodes an integer as bytes, big-endian
def to_binary(n):
return n.to_bytes((n.bit_length() + 7) // 8, 'big')
assert(rlp_encode(b'dog').hex() == '83646f67')
assert(rlp_encode([[], [[]], [[], [[]]]]).hex() == 'c7c0c1c0c3c0c1c0')
|
# coding=utf-8
"""
if rotate_mode == "size":
channel = logging.handlers.RotatingFileHandler(
filename=options.log_file_prefix,
maxBytes=options.log_file_max_size,
backupCount=options.log_file_num_backups,
encoding="utf-8",
) # type: logging.Handler
elif rotate_mode == "time":
channel = logging.handlers.TimedRotatingFileHandler(
filename=options.log_file_prefix,
when=options.log_rotate_when,
interval=options.log_rotate_interval,
backupCount=options.log_file_num_backups,
encoding="utf-8",
)
"""
logconfig = {
'version': 1,
'loggers': {
'root': {
'level': 'DEBUG',
'handlers': ['console']
},
'tornado': {
'level': 'DEBUG',
'handlers': ['console', 'log'],
'propagate': 'no'
},
'tornado.access': {
'level': 'DEBUG',
'handlers': ['access'],
'propagate': 'no'
},
'log': {
'level': 'INFO',
'handlers': ['log'],
'propagate': 'no'
}
},
'formatters': {
'simple': {
'format': '%(levelname)s %(name)s %(funcName)s %(asctime)s %(pathname)s %(lineno)s:%(message)s'
},
'timedRotating': {
'format': '%(asctime)s %(name)-12s %(levelname)-8s - %(message)s'
}
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'level': 'DEBUG',
'formatter': 'simple',
},
'access': {
'class': 'logging.handlers.TimedRotatingFileHandler', # time
'level': 'DEBUG',
'formatter': 'simple',
'filename': './weblog/access.log',
'when': 'midnight',
'interval': 1,
'backupCount': 5, # u"备份数"
'encoding': 'utf8'
},
'log': {
'class': 'logging.handlers.RotatingFileHandler', # size
'level': 'INFO',
'formatter': 'timedRotating',
'filename': './weblog/log.log',
# 'when': 'midnight',
# 'interval': 1,
'backupCount': 5, # 日志文件的保留个数
'maxBytes': 1 * 1024 * 1024, # 文件最大50M
'encoding': 'gbk'
}
}
}
|
pm = sm.getChr().getPotentialMan()
pm.addPotential(pm.generateRandomPotential(1))
sm.completeQuestNoRewards(12394)
sm.dispose()
|
class UpdateIpExclusionObject:
def __init__(self, filterIp, ipFilterId):
self.filterIp = filterIp
self.ipFilterId = ipFilterId
self.memo = None
|
class PsKeyCode:
def __init__(self):
pass
def keycode_in_alpha_upper(self, code):
return 65 <= code <= 90
def keycode_in_alpha_lower(self, code):
return 97 <= code <= 122
def keycode_in_alpha(self, code):
return self.keycode_in_alpha_lower(
code
) or self.keycode_in_alpha_upper(code)
def keycode_in_num_neg(self, code):
return self.keycode_in_pure_num(code) or self.keycode_in_hyphen(code)
def keycode_in_num_float(self, code):
return self.keycode_in_pure_num(code) or self.keycode_in_dot(code)
def keycode_in_pure_num(self, code):
return 48 <= code <= 57
def keycode_in_num(self, code):
return (
self.keycode_in_pure_num(code)
or self.keycode_in_hyphen(code)
or self.keycode_in_dot(code)
)
def keycode_in_dot(self, code):
return code == 46
def keycode_in_alpha_num(self, code):
return self.keycode_in_num(code) or self.keycode_in_alpha(code)
def keycode_in_space(self, code):
return code == 32
def keycode_in_hyphen(self, code):
return code == 45
def keycode_in_return(self, code):
return code == 0xD
|
def get_grandma(clause_atom, api):
"""Return a wayyiqtol/yiqtol/imperative from a clause tree.
Recursively climbs up a clause's ancestorial tree.
Stops upon identifying either wayyiqtol
or a yiqtol|impv grand(mother).
Returns:
a string of the ancestor's tense, or None.
"""
F, E, L = api.F, api.E, api.L
this_verb = next((F.vt.v(w) for w in L.d(clause_atom) if F.pdp.v(w)=='verb'), '')
mother = next((m for m in E.mother.f(clause_atom)), 0)
mom_verb = next((F.vt.v(w) for w in L.d(mother) if F.pdp.v(w)=='verb'), '')
if mom_verb in {'wayq', 'impf', 'impv'}:
return mom_verb
elif not mother:
return this_verb
else:
return get_grandma(mother, api)
def convert_tense(word, api):
"""Convert weqatal tenses where present.
If not weqatal, return the tense.
"""
F, L = api.F, api.L
tense_map = {
'impf': 'yqtl',
'perf': 'qtl',
'wayq': 'wyqtl',
}
tense = F.vt.v(word)
# check for weqatal
if tense == 'perf' and F.lex.v(word-1) == 'W':
# get tense of the ancestor of the verb's clause
clause = L.u(word, 'clause_atom')[0]
qatal_ancestor = get_grandma(clause, api)
# check for whether ancestor triggers weqatal analysis
if qatal_ancestor in {'impf', 'impv'}:
return 'wqtl' # change tense to weqt
else:
return tense_map.get(tense, tense)
# return tense as-is
else:
return tense_map.get(tense, tense)
|
class AnalysisElement:
def __init__(self, validationResult, validationMessage):
self.validation_result = validationResult
self.validation_message = validationMessage
class AnalysisResult:
def __init__(self):
self.elements = []
def add_element(self, element: AnalysisElement):
self.elements.append(element)
class DataSetEntry:
def __init__(self, index, classification):
self.index = index
self.classification = classification
class DataSetEntries:
def __init__(self):
self.entries = []
def add_element(self, entry: DataSetEntry):
self.entries.append(entry)
|
lim = 10000000
num = [True for _ in range(lim)]
for i in range(4, lim, 2):
num[i] = False
for i in range(3, lim, 2):
if num[i]:
for j in range(i * i, lim, i):
num[j] = False
oa = 0
ob = 0
mnp = 0
size = 1000
for a in range(-size + 1, size):
for b in range(1, size, 2):
np = 0
for n in range(0, lim):
if num[n * n + a * n + b]:
np += 1
else:
break
if np > mnp:
mnp = np
oa = a
ob = b
print(oa * ob)
|
# -*- coding: utf-8 -*-
"""Tests package for Script Venv."""
__author__ = """Struan Lyall Judd"""
__email__ = 'sv@scifi.geek.nz'
|
# coding=utf-8
"""
Package init file
"""
__all__ = ["catch_event_type", "end_event_type", "event_type", "intermediate_catch_event_type",
"intermediate_throw_event_type", "start_event_type", "throw_event_type"]
|
STATS = [
{
"num_node_expansions": 0,
"search_time": 0.0260686,
"total_time": 0.161712,
"plan_length": 64,
"plan_cost": 64,
"objects_used": 261,
"objects_total": 379,
"neural_net_time": 0.10646533966064453,
"num_replanning_steps": 3,
"wall_time": 2.435692071914673
},
{
"num_node_expansions": 0,
"search_time": 0.0279492,
"total_time": 0.17491,
"plan_length": 52,
"plan_cost": 52,
"objects_used": 276,
"objects_total": 379,
"neural_net_time": 0.058258056640625,
"num_replanning_steps": 4,
"wall_time": 3.361152410507202
},
{
"num_node_expansions": 0,
"search_time": 0.0313502,
"total_time": 0.245342,
"plan_length": 61,
"plan_cost": 61,
"objects_used": 273,
"objects_total": 379,
"neural_net_time": 0.06083822250366211,
"num_replanning_steps": 4,
"wall_time": 4.374004602432251
},
{
"num_node_expansions": 0,
"search_time": 0.0462309,
"total_time": 0.237932,
"plan_length": 59,
"plan_cost": 59,
"objects_used": 243,
"objects_total": 379,
"neural_net_time": 0.05759286880493164,
"num_replanning_steps": 3,
"wall_time": 2.5270650386810303
},
{
"num_node_expansions": 0,
"search_time": 0.0368982,
"total_time": 0.233488,
"plan_length": 54,
"plan_cost": 54,
"objects_used": 272,
"objects_total": 379,
"neural_net_time": 0.05734562873840332,
"num_replanning_steps": 4,
"wall_time": 3.6436092853546143
},
{
"num_node_expansions": 0,
"search_time": 0.0155738,
"total_time": 0.0682826,
"plan_length": 73,
"plan_cost": 73,
"objects_used": 117,
"objects_total": 217,
"neural_net_time": 0.029698610305786133,
"num_replanning_steps": 1,
"wall_time": 0.906505823135376
},
{
"num_node_expansions": 0,
"search_time": 0.0171021,
"total_time": 0.0927101,
"plan_length": 63,
"plan_cost": 63,
"objects_used": 122,
"objects_total": 217,
"neural_net_time": 0.05449986457824707,
"num_replanning_steps": 1,
"wall_time": 1.0803697109222412
},
{
"num_node_expansions": 0,
"search_time": 0.020779,
"total_time": 0.09933,
"plan_length": 55,
"plan_cost": 55,
"objects_used": 124,
"objects_total": 217,
"neural_net_time": 0.03200268745422363,
"num_replanning_steps": 1,
"wall_time": 1.2762155532836914
},
{
"num_node_expansions": 0,
"search_time": 0.116974,
"total_time": 0.160087,
"plan_length": 118,
"plan_cost": 118,
"objects_used": 113,
"objects_total": 217,
"neural_net_time": 0.032900094985961914,
"num_replanning_steps": 1,
"wall_time": 0.9846065044403076
},
{
"num_node_expansions": 0,
"search_time": 0.00864599,
"total_time": 0.0618746,
"plan_length": 51,
"plan_cost": 51,
"objects_used": 121,
"objects_total": 217,
"neural_net_time": 0.03256845474243164,
"num_replanning_steps": 1,
"wall_time": 0.9345319271087646
},
{
"num_node_expansions": 0,
"search_time": 0.0150995,
"total_time": 0.139498,
"plan_length": 55,
"plan_cost": 55,
"objects_used": 184,
"objects_total": 320,
"neural_net_time": 0.04656338691711426,
"num_replanning_steps": 1,
"wall_time": 1.576615810394287
},
{
"num_node_expansions": 0,
"search_time": 0.0195704,
"total_time": 0.0776481,
"plan_length": 76,
"plan_cost": 76,
"objects_used": 157,
"objects_total": 320,
"neural_net_time": 0.044793128967285156,
"num_replanning_steps": 1,
"wall_time": 0.9117276668548584
},
{
"num_node_expansions": 0,
"search_time": 0.0218047,
"total_time": 0.0813003,
"plan_length": 91,
"plan_cost": 91,
"objects_used": 169,
"objects_total": 320,
"neural_net_time": 0.0447840690612793,
"num_replanning_steps": 1,
"wall_time": 1.0234675407409668
},
{
"num_node_expansions": 0,
"search_time": 0.0318204,
"total_time": 0.112719,
"plan_length": 82,
"plan_cost": 82,
"objects_used": 168,
"objects_total": 320,
"neural_net_time": 0.048575401306152344,
"num_replanning_steps": 1,
"wall_time": 1.182650089263916
},
{
"num_node_expansions": 0,
"search_time": 0.0214701,
"total_time": 0.12052,
"plan_length": 68,
"plan_cost": 68,
"objects_used": 193,
"objects_total": 305,
"neural_net_time": 0.046851396560668945,
"num_replanning_steps": 1,
"wall_time": 1.3422448635101318
},
{
"num_node_expansions": 0,
"search_time": 0.0238054,
"total_time": 0.0993613,
"plan_length": 53,
"plan_cost": 53,
"objects_used": 214,
"objects_total": 305,
"neural_net_time": 0.04596352577209473,
"num_replanning_steps": 1,
"wall_time": 1.352567434310913
},
{
"num_node_expansions": 0,
"search_time": 0.0134198,
"total_time": 0.0667924,
"plan_length": 86,
"plan_cost": 86,
"objects_used": 169,
"objects_total": 305,
"neural_net_time": 0.043943166732788086,
"num_replanning_steps": 1,
"wall_time": 0.9647877216339111
},
{
"num_node_expansions": 0,
"search_time": 0.231443,
"total_time": 0.312803,
"plan_length": 84,
"plan_cost": 84,
"objects_used": 194,
"objects_total": 305,
"neural_net_time": 0.04476618766784668,
"num_replanning_steps": 1,
"wall_time": 1.5609796047210693
},
{
"num_node_expansions": 0,
"search_time": 0.0272906,
"total_time": 0.101185,
"plan_length": 63,
"plan_cost": 63,
"objects_used": 211,
"objects_total": 305,
"neural_net_time": 0.04451155662536621,
"num_replanning_steps": 1,
"wall_time": 1.2499635219573975
},
{
"num_node_expansions": 0,
"search_time": 0.0767934,
"total_time": 0.113212,
"plan_length": 156,
"plan_cost": 156,
"objects_used": 114,
"objects_total": 212,
"neural_net_time": 0.03154778480529785,
"num_replanning_steps": 1,
"wall_time": 0.8447625637054443
},
{
"num_node_expansions": 0,
"search_time": 0.665671,
"total_time": 0.694063,
"plan_length": 92,
"plan_cost": 92,
"objects_used": 109,
"objects_total": 212,
"neural_net_time": 0.029831647872924805,
"num_replanning_steps": 0,
"wall_time": 1.1394996643066406
},
{
"num_node_expansions": 0,
"search_time": 0.0104928,
"total_time": 0.0622191,
"plan_length": 68,
"plan_cost": 68,
"objects_used": 159,
"objects_total": 365,
"neural_net_time": 0.05487489700317383,
"num_replanning_steps": 1,
"wall_time": 0.8508009910583496
},
{
"num_node_expansions": 0,
"search_time": 0.0328946,
"total_time": 0.126837,
"plan_length": 89,
"plan_cost": 89,
"objects_used": 203,
"objects_total": 365,
"neural_net_time": 0.053848981857299805,
"num_replanning_steps": 2,
"wall_time": 1.7260208129882812
},
{
"num_node_expansions": 0,
"search_time": 0.0234049,
"total_time": 0.0851975,
"plan_length": 75,
"plan_cost": 75,
"objects_used": 168,
"objects_total": 365,
"neural_net_time": 0.053121328353881836,
"num_replanning_steps": 1,
"wall_time": 1.030031681060791
},
{
"num_node_expansions": 0,
"search_time": 0.013401,
"total_time": 0.0713078,
"plan_length": 59,
"plan_cost": 59,
"objects_used": 169,
"objects_total": 365,
"neural_net_time": 0.05536675453186035,
"num_replanning_steps": 1,
"wall_time": 1.1071906089782715
},
{
"num_node_expansions": 0,
"search_time": 0.104847,
"total_time": 0.195061,
"plan_length": 52,
"plan_cost": 52,
"objects_used": 167,
"objects_total": 302,
"neural_net_time": 0.04499459266662598,
"num_replanning_steps": 1,
"wall_time": 1.4144911766052246
},
{
"num_node_expansions": 0,
"search_time": 0.0765767,
"total_time": 0.131634,
"plan_length": 66,
"plan_cost": 66,
"objects_used": 159,
"objects_total": 302,
"neural_net_time": 0.0444490909576416,
"num_replanning_steps": 1,
"wall_time": 1.1225917339324951
},
{
"num_node_expansions": 0,
"search_time": 0.0633749,
"total_time": 0.159814,
"plan_length": 70,
"plan_cost": 70,
"objects_used": 163,
"objects_total": 302,
"neural_net_time": 0.044997453689575195,
"num_replanning_steps": 1,
"wall_time": 1.3655714988708496
},
{
"num_node_expansions": 0,
"search_time": 0.134185,
"total_time": 0.447814,
"plan_length": 68,
"plan_cost": 68,
"objects_used": 230,
"objects_total": 365,
"neural_net_time": 0.05536222457885742,
"num_replanning_steps": 3,
"wall_time": 4.771425485610962
},
{
"num_node_expansions": 0,
"search_time": 0.0165639,
"total_time": 0.0940178,
"plan_length": 62,
"plan_cost": 62,
"objects_used": 183,
"objects_total": 365,
"neural_net_time": 0.05884861946105957,
"num_replanning_steps": 1,
"wall_time": 1.2651619911193848
},
{
"num_node_expansions": 0,
"search_time": 0.124357,
"total_time": 0.248529,
"plan_length": 81,
"plan_cost": 81,
"objects_used": 214,
"objects_total": 365,
"neural_net_time": 0.05655694007873535,
"num_replanning_steps": 3,
"wall_time": 2.9309194087982178
},
{
"num_node_expansions": 0,
"search_time": 0.0150311,
"total_time": 0.101787,
"plan_length": 63,
"plan_cost": 63,
"objects_used": 192,
"objects_total": 365,
"neural_net_time": 0.0555422306060791,
"num_replanning_steps": 2,
"wall_time": 1.666846752166748
},
{
"num_node_expansions": 0,
"search_time": 0.0150945,
"total_time": 0.0514842,
"plan_length": 90,
"plan_cost": 90,
"objects_used": 175,
"objects_total": 365,
"neural_net_time": 0.05377364158630371,
"num_replanning_steps": 1,
"wall_time": 0.8902196884155273
},
{
"num_node_expansions": 0,
"search_time": 0.0176192,
"total_time": 0.0796522,
"plan_length": 92,
"plan_cost": 92,
"objects_used": 178,
"objects_total": 362,
"neural_net_time": 0.05463862419128418,
"num_replanning_steps": 1,
"wall_time": 1.0109508037567139
},
{
"num_node_expansions": 0,
"search_time": 0.0104213,
"total_time": 0.0470441,
"plan_length": 77,
"plan_cost": 77,
"objects_used": 160,
"objects_total": 362,
"neural_net_time": 0.054520368576049805,
"num_replanning_steps": 1,
"wall_time": 0.7542357444763184
},
{
"num_node_expansions": 0,
"search_time": 0.00448661,
"total_time": 0.0177422,
"plan_length": 84,
"plan_cost": 84,
"objects_used": 136,
"objects_total": 362,
"neural_net_time": 0.05472111701965332,
"num_replanning_steps": 0,
"wall_time": 0.4157280921936035
},
{
"num_node_expansions": 0,
"search_time": 0.045955,
"total_time": 0.190108,
"plan_length": 74,
"plan_cost": 74,
"objects_used": 221,
"objects_total": 322,
"neural_net_time": 0.047133445739746094,
"num_replanning_steps": 1,
"wall_time": 1.6114940643310547
},
{
"num_node_expansions": 0,
"search_time": 0.0459863,
"total_time": 0.178842,
"plan_length": 103,
"plan_cost": 103,
"objects_used": 215,
"objects_total": 441,
"neural_net_time": 0.06811332702636719,
"num_replanning_steps": 1,
"wall_time": 1.7026808261871338
},
{
"num_node_expansions": 0,
"search_time": 0.0375162,
"total_time": 0.17094,
"plan_length": 71,
"plan_cost": 71,
"objects_used": 216,
"objects_total": 441,
"neural_net_time": 0.06928086280822754,
"num_replanning_steps": 1,
"wall_time": 3.0769970417022705
},
{
"num_node_expansions": 0,
"search_time": 0.15904,
"total_time": 0.361705,
"plan_length": 123,
"plan_cost": 123,
"objects_used": 224,
"objects_total": 441,
"neural_net_time": 0.06914591789245605,
"num_replanning_steps": 2,
"wall_time": 2.922773838043213
},
{
"num_node_expansions": 0,
"search_time": 0.127007,
"total_time": 0.591304,
"plan_length": 97,
"plan_cost": 97,
"objects_used": 249,
"objects_total": 441,
"neural_net_time": 0.06865596771240234,
"num_replanning_steps": 2,
"wall_time": 5.019821643829346
},
{
"num_node_expansions": 0,
"search_time": 0.0700383,
"total_time": 0.268587,
"plan_length": 95,
"plan_cost": 95,
"objects_used": 227,
"objects_total": 441,
"neural_net_time": 0.06840014457702637,
"num_replanning_steps": 1,
"wall_time": 2.3747305870056152
},
{
"num_node_expansions": 0,
"search_time": 0.0111234,
"total_time": 0.0605018,
"plan_length": 76,
"plan_cost": 76,
"objects_used": 171,
"objects_total": 417,
"neural_net_time": 0.06322216987609863,
"num_replanning_steps": 1,
"wall_time": 1.0112266540527344
},
{
"num_node_expansions": 0,
"search_time": 0.0183385,
"total_time": 0.106249,
"plan_length": 87,
"plan_cost": 87,
"objects_used": 194,
"objects_total": 417,
"neural_net_time": 0.0725412368774414,
"num_replanning_steps": 1,
"wall_time": 1.364563226699829
},
{
"num_node_expansions": 0,
"search_time": 0.0190809,
"total_time": 0.111638,
"plan_length": 58,
"plan_cost": 58,
"objects_used": 216,
"objects_total": 417,
"neural_net_time": 0.06367969512939453,
"num_replanning_steps": 3,
"wall_time": 2.054568290710449
},
{
"num_node_expansions": 0,
"search_time": 0.210535,
"total_time": 0.334857,
"plan_length": 123,
"plan_cost": 123,
"objects_used": 203,
"objects_total": 417,
"neural_net_time": 0.06560730934143066,
"num_replanning_steps": 2,
"wall_time": 2.3334832191467285
},
{
"num_node_expansions": 0,
"search_time": 0.0219698,
"total_time": 0.130103,
"plan_length": 62,
"plan_cost": 62,
"objects_used": 197,
"objects_total": 417,
"neural_net_time": 0.06369471549987793,
"num_replanning_steps": 1,
"wall_time": 1.6010661125183105
},
{
"num_node_expansions": 0,
"search_time": 0.0101631,
"total_time": 0.0415831,
"plan_length": 76,
"plan_cost": 76,
"objects_used": 112,
"objects_total": 232,
"neural_net_time": 0.03584003448486328,
"num_replanning_steps": 1,
"wall_time": 0.7372550964355469
},
{
"num_node_expansions": 0,
"search_time": 0.0111653,
"total_time": 0.0418656,
"plan_length": 53,
"plan_cost": 53,
"objects_used": 110,
"objects_total": 232,
"neural_net_time": 0.032355308532714844,
"num_replanning_steps": 0,
"wall_time": 0.5313618183135986
},
{
"num_node_expansions": 0,
"search_time": 0.00524832,
"total_time": 0.0220788,
"plan_length": 56,
"plan_cost": 56,
"objects_used": 106,
"objects_total": 232,
"neural_net_time": 0.03553891181945801,
"num_replanning_steps": 1,
"wall_time": 0.7103500366210938
},
{
"num_node_expansions": 0,
"search_time": 0.0136476,
"total_time": 0.0672117,
"plan_length": 78,
"plan_cost": 78,
"objects_used": 130,
"objects_total": 212,
"neural_net_time": 0.02926468849182129,
"num_replanning_steps": 1,
"wall_time": 0.8608791828155518
},
{
"num_node_expansions": 0,
"search_time": 0.016218,
"total_time": 0.0887494,
"plan_length": 75,
"plan_cost": 75,
"objects_used": 133,
"objects_total": 212,
"neural_net_time": 0.029755353927612305,
"num_replanning_steps": 1,
"wall_time": 1.1875898838043213
},
{
"num_node_expansions": 0,
"search_time": 0.0276188,
"total_time": 0.0960435,
"plan_length": 87,
"plan_cost": 87,
"objects_used": 132,
"objects_total": 212,
"neural_net_time": 0.04944968223571777,
"num_replanning_steps": 2,
"wall_time": 1.4252169132232666
},
{
"num_node_expansions": 0,
"search_time": 0.00914205,
"total_time": 0.0572312,
"plan_length": 60,
"plan_cost": 60,
"objects_used": 125,
"objects_total": 212,
"neural_net_time": 0.05208992958068848,
"num_replanning_steps": 1,
"wall_time": 0.8581404685974121
}
]
|
# Numbers are not stored in the written representation, so they can't be
# treated like strings.
a = 123
print(a[1])
|
def get_reversed_string(word):
return word[::-1]
while True:
string = input()
if string == 'end':
break
rev_str = get_reversed_string(string)
print(f'{string} = {rev_str}')
|
def ficha(jogador='<DESCONHECIDO>', gol=0):
print(f'O jogardor {jogador} fez {gol} gol(s)')
nome = str(input('Digite o nome do jogador: '))
gols = str(input(f'Digite o número de gols feito por {nome}: '))
if gols.isnumeric():
gols = int(gols)
else:
gols = 0
if nome.strip() == '':
ficha(gol=gols)
else:
ficha(nome, gols)
|
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 24 10:04:30 2020
@author: luisc
"""
#x = 'Estou aqui'
try:
print(p)
except NameError:
print('Ops, deu um erro de variável não inicializada')
except:
print('Outro tipo de erro')
finally:
print('Estou sempre aqui')
# Raise - lança uma exceção para o usuário
"""
valor = -10
if valor < 0:
raise Exception('O valor é negativo')
"""
|
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def levelOrderBottom(self, root: 'TreeNode') -> 'List[List[int]]':
if not root:
return
stack = [(root,0)]
rst = []
while stack:
n, level = stack.pop(0)
if len(rst) < level + 1:
rst.insert(0,[])
rst[-(level+1)].append(n.val)
if n.left:
stack.append((n.left,level+1))
if n.right:
stack.append((n.right, level+1))
return rst
|
# def function_name_print(a,b,c,d):
#
# print(a,b,c,d)
def funargs(normal,*args, **kwargs):
print(normal)
for item in args:
print(item)
print("\nNow I would like to introduce some of our heroes")
for key,value in kwargs.items():
print(f"{key} is a {value}")
# As a tuple
# function_name_print("Jiggu","g","f","dd")
list = ["Jiggu","g","f","dd"]
normal = "Yhis is normal"
kw = {"Rohan":"Monitor", "Jiggu":"Sports coach","Him":"Programmer"}
funargs(normal,*list,**kw)
|
"""
This is template on how to configurate your setup for the weedlings model.
You may create a copy of this script and name it "_conf.py" so it will be not be tracked by the ".gitignore"
and is stored only locally.
The "_conf.py" than can be used in other scripts.
"""
PATH = "/home/yourname/projects/weedlings/" # overall path
DATA_PATH = "/home/yourname/projects/weedlings/data/" # write your path to the dataset here
RAW_DATA_PATH = DATA_PATH + "raw_data/" # path where raw data is stored
SPLIT_DATA_PATH = DATA_PATH + "split_data/" # path where the data, that we will use for the model is stored
MODEL_PATH = DATA_PATH + "models/" # path where the saved models will be stored
|
class MonoDevelopSvnPackage (Package):
def __init__ (self):
Package.__init__ (self, 'monodevelop', 'trunk')
def svn_co_or_up (self):
self.cd ('..')
if os.path.isdir ('svn'):
self.cd ('svn')
self.sh ('svn up')
else:
self.sh ('svn co http://anonsvn.mono-project.com/source/trunk/monodevelop svn')
self.cd ('svn')
self.cd ('..')
def prep (self):
self.svn_co_or_up ()
self.sh ('cp -r svn _build')
self.cd ('_build/svn')
def build (self):
self.sh (
'echo "main --disable-update-mimedb --disable-update-desktopdb --disable-gnomeplatform --enable-macplatform --disable-tests" > profiles/mac',
'./configure --prefix="%{prefix}" --profile=mac',
'make'
)
def install (self):
self.sh ('%{makeinstall}')
MonoDevelopSvnPackage ()
|
META = {
'70B3D57050001AB9': {
'name': 'Pikkukosken uimaranta',
'lat': 60.227704,
'lon': 24.983821,
'servicemap_url': 'https://palvelukartta.hel.fi/unit/41960',
'site_url': '',
},
'70B3D57050001BBE': {
'name': 'Rastilan uimaranta',
'lat': 60.207977,
'lon': 25.114849,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/40157',
'site_url': '',
},
'70B3D57050004D86': {
'name': 'Pihlajasaari',
'lat': 60.140588,
'lon': 24.9157002,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/41977',
'site_url': '',
},
'70B3D57050004FB9': {
'name': 'Hietaniemi (Ourit)',
'lat': 60.1715,
'lon': 24.8983,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/40142',
'site_url': 'http://www.tuk.fi',
},
'70B3D57050004DF8': {
'name': 'Vasikkasaari (Helsinki)',
'lat': 60.15232,
'lon': 25.01586,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/50903',
'site_url': 'https://www.vasikkasaari.org',
},
'70B3D57050004FE1': {
'name': 'Herttoniemi (Tuorinniemen uimalaituri)',
'lat': 60.18554,
'lon': 25.04012,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/41791',
'site_url': '',
},
'70B3D57050004FE6': {
'name': 'Vartiosaari (Reposalmen laituri)',
'lat': 60.18010,
'lon': 25.06860,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/57156',
'site_url': 'https://www.vartiosaari.fi',
},
'70B3D57050004E0E': {
'name': 'Marjaniemen uimaranta',
'lat': 60.198449,
'lon': 25.076416,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/40386',
'site_url': '',
},
'70B3D5705000504F': {
'name': 'Hanikan uimaranta (Espoo)',
'lat': 60.127797,
'lon': 24.691871,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/39583',
'site_url': '',
},
'70B3D57050001BA6': {
'name': 'Vetokannas (Vantaa)',
'lat': 60.27026,
'lon': 24.88056,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/42505',
'site_url': '',
'fieldmap': {
'temp_water': 'temp_out1',
'air_rh': 'temprh_rh',
'air_temp': 'temprh_temp',
},
},
'70B3D57050001ADA': {
'name': 'Kuusijärvi (Vantaa)',
'lat': 60.313343,
'lon': 25.113967,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/42611',
'site_url': 'https://www.vantaa.fi/vapaa-aika/luonto_ja_ulkoilu/retkeily/kuusijarven_ulkoilualue',
'fieldmap': {
'temp_water': 'temp_out1',
'air_rh': 'temprh_rh',
'air_temp': 'temprh_temp',
},
},
'70B3D5705000516A': {
'name': 'Kattilajärvi (Espoo)',
'lat': 60.29904,
'lon': 24.61975,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/39368',
'site_url': '',
},
'70B3D57050001AF1': {
'name': 'Lauttasaari (Vaskiniemi)',
'lat': 60.16050,
'lon': 24.85241,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/42212',
'site_url': 'https://www.sauna.fi/',
'fieldmap': {
'temp_water': 'temp_out2',
'air_temp': 'temp_out1',
},
},
'70B3D57050004FC2': {
'name': 'Lauttasaaren ulkoilupuisto',
'lat': 60.14682,
'lon': 24.89070,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/40701',
'site_url': '',
},
# '70B3D5705000E703': {
# 'name': 'Munkkiniemi',
# 'lat': 60.2004257,
# 'lon': 24.8554928,
# 'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/41601',
# 'site_url': '',
# },
'70B3D5705000E6E6': {
'name': 'Suomenlinna',
'lat': 60.141163,
'lon': 24.983775,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/58015',
'site_url': '',
},
'70B3D57050004740': {
'name': 'Lapinlahti',
'lat': 60.167735,
'lon': 24.908833,
'servicemap_url': '',
'site_url': '',
},
'70B3D5705000E70E': {
'name': 'Aurinkolahden uimaranta',
'lat': 60.200447,
'lon': 25.156321,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/40258',
'site_url': '',
},
'70B3D5705000E6D1': {
'name': 'Porvarinlahti',
'lat': 60.228068,
'lon': 25.185788,
'servicemap_url': '',
'site_url': '',
},
'70B3D5705000E6F9': {
'name': 'Arabianranta',
'lat': 60.202336,
'lon': 24.982580,
'servicemap_url': '',
'site_url': '',
},
'70B3D5705000E6F2': {
'name': 'Lauttasaaren uimaranta',
'lat': 60.15271,
'lon': 24.862529,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/40098',
'site_url': '',
},
'70B3D5705000E696': {
'name': 'Töölönlahti',
'lat': 60.18021,
'lon': 24.9341,
'servicemap_url': '',
'site_url': '',
},
'70B3D5705000E653': {
'name': 'Pikku-Huopalahti',
'lat': 60.197827,
'lon': 24.890244,
'servicemap_url': '',
'site_url': '',
},
# '70B3D57050004DF2': {
# 'name': 'Eiranranta',
# 'lat': 60.15241,
# 'lon': 24.93135,
# 'servicemap_url': '',
# 'site_url': '',
# },
'70B3D57050001A97': {
'name': 'Kalasatama',
'lat': 60.180724,
'lon': 24.979968,
'servicemap_url': '',
'site_url': '',
},
'003C62A8': {
'name': 'Uunisaari',
'lat': 60.15294,
'lon': 24.94991,
'servicemap_url': 'https://palvelukartta.hel.fi/fi/unit/40356',
'site_url': 'https://www.uunisaari.fi/',
'fieldmap': {
'temp_water': 'temp_out2',
},
},
}
|
class MBTA_Exception(Exception):
"""Superclass for all Exceptions raised in mbta package. """
pass
class MBTA_NotFound(MBTA_Exception):
""" Raised when search returns 404 (Not Found). """
def __init__(self, response, query_val):
parameter = response['errors'][0]['source']['parameter']
reason = response['errors'][0]['title']
message = f'{parameter}: {query_val} {reason}'
super().__init__(message)
class MBTA_Forbidden(MBTA_Exception):
""" Raised when request returns a 403 HTTP error code. """
def __init__(self, url):
super().__init__(f'GET {url} returned 403 (Forbidden)')
class MBTA_BadRequest(MBTA_Exception):
""" Raised if MBTA interpreted given request was invalid in syntax or in parameters. """
pass
class MBTA_QuotaExceeded(MBTA_Exception):
""" Raised when user has made too many requests. """
pass
|
#
# PySNMP MIB module CISCOSB-UDP (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOSB-UDP
# Produced by pysmi-0.3.4 at Wed May 1 12:24:02 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)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion")
switch001, = mibBuilder.importSymbols("CISCOSB-MIB", "switch001")
InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType")
ipCidrRouteTos, ipCidrRouteDest, ipCidrRouteMask, ipCidrRouteNextHop, ipCidrRouteEntry = mibBuilder.importSymbols("IP-FORWARD-MIB", "ipCidrRouteTos", "ipCidrRouteDest", "ipCidrRouteMask", "ipCidrRouteNextHop", "ipCidrRouteEntry")
ipAddrEntry, = mibBuilder.importSymbols("IP-MIB", "ipAddrEntry")
rip2IfConfEntry, = mibBuilder.importSymbols("RFC1389-MIB", "rip2IfConfEntry")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Counter32, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, NotificationType, Unsigned32, Bits, IpAddress, Counter64, Integer32, Gauge32, MibIdentifier, ModuleIdentity, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "NotificationType", "Unsigned32", "Bits", "IpAddress", "Counter64", "Integer32", "Gauge32", "MibIdentifier", "ModuleIdentity", "TimeTicks")
DisplayString, RowStatus, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TruthValue", "TextualConvention")
rsUDP = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42))
rsUDP.setRevisions(('2004-06-01 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: rsUDP.setRevisionsDescriptions(('Initial version of this MIB.',))
if mibBuilder.loadTexts: rsUDP.setLastUpdated('200406010000Z')
if mibBuilder.loadTexts: rsUDP.setOrganization('Cisco Small Business')
if mibBuilder.loadTexts: rsUDP.setContactInfo('Postal: 170 West Tasman Drive San Jose , CA 95134-1706 USA Website: Cisco Small Business Home http://www.cisco.com/smb>;, Cisco Small Business Support Community <http://www.cisco.com/go/smallbizsupport>')
if mibBuilder.loadTexts: rsUDP.setDescription('The private MIB module definition for switch001 UDP MIB.')
rsUdpRelayTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 1), )
if mibBuilder.loadTexts: rsUdpRelayTable.setStatus('current')
if mibBuilder.loadTexts: rsUdpRelayTable.setDescription('This table contains the udp relay configuration per port.')
rsUdpRelayEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 1, 1), ).setIndexNames((0, "CISCOSB-UDP", "rsUdpRelayDstPort"), (0, "CISCOSB-UDP", "rsUdpRelaySrcIpInf"), (0, "CISCOSB-UDP", "rsUdpRelayDstIpAddr"))
if mibBuilder.loadTexts: rsUdpRelayEntry.setStatus('current')
if mibBuilder.loadTexts: rsUdpRelayEntry.setDescription(' The row definition for this table.')
rsUdpRelayDstPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUdpRelayDstPort.setStatus('current')
if mibBuilder.loadTexts: rsUdpRelayDstPort.setDescription('The UDP port number in the UDP message header.')
rsUdpRelaySrcIpInf = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 1, 1, 2), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUdpRelaySrcIpInf.setStatus('current')
if mibBuilder.loadTexts: rsUdpRelaySrcIpInf.setDescription('The source interface IP that receives UDP message. 255.255.255.255 from all IP interface. 0.0.0.0 - 0.255.255.255 and 127.0.0.0 - 127.255.255.255 not relevant addresses.')
rsUdpRelayDstIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 1, 1, 3), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUdpRelayDstIpAddr.setStatus('current')
if mibBuilder.loadTexts: rsUdpRelayDstIpAddr.setDescription('The destination IP address the UDP message will be forward. 0.0.0.0 does not forward, 255.255.255.255 broadcasts to all addresses.')
rsUdpRelayStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 1, 1, 4), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rsUdpRelayStatus.setStatus('current')
if mibBuilder.loadTexts: rsUdpRelayStatus.setDescription('The status of a table entry. It is used to delete an entry from this table.')
rsUdpRelayUserInfo = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 1, 1, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rsUdpRelayUserInfo.setStatus('current')
if mibBuilder.loadTexts: rsUdpRelayUserInfo.setDescription('The information used for implementation purposes')
rsUdpRelayMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rsUdpRelayMibVersion.setStatus('current')
if mibBuilder.loadTexts: rsUdpRelayMibVersion.setDescription('Mib version. The current version is 1.')
rlUdpSessionTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 3), )
if mibBuilder.loadTexts: rlUdpSessionTable.setStatus('current')
if mibBuilder.loadTexts: rlUdpSessionTable.setDescription('This table contains the udp sessions information')
rlUdpSessionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 3, 1), ).setIndexNames((0, "CISCOSB-UDP", "rlUdpSessionLocalAddrType"), (0, "CISCOSB-UDP", "rlUdpSessionLocalAddr"), (0, "CISCOSB-UDP", "rlUdpSessionLocalPort"), (0, "CISCOSB-UDP", "rlUdpSessionAppInst"))
if mibBuilder.loadTexts: rlUdpSessionEntry.setStatus('current')
if mibBuilder.loadTexts: rlUdpSessionEntry.setDescription(' The row definition for this table.')
rlUdpSessionLocalAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 3, 1, 1), InetAddressType())
if mibBuilder.loadTexts: rlUdpSessionLocalAddrType.setStatus('current')
if mibBuilder.loadTexts: rlUdpSessionLocalAddrType.setDescription('The type of the rlUdpSessionLocalAddress address')
rlUdpSessionLocalAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 3, 1, 2), InetAddress())
if mibBuilder.loadTexts: rlUdpSessionLocalAddr.setStatus('current')
if mibBuilder.loadTexts: rlUdpSessionLocalAddr.setDescription('The UDP port session number.')
rlUdpSessionLocalPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 3, 1, 3), Integer32())
if mibBuilder.loadTexts: rlUdpSessionLocalPort.setStatus('current')
if mibBuilder.loadTexts: rlUdpSessionLocalPort.setDescription('The UDP port local IP address.')
rlUdpSessionAppInst = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: rlUdpSessionAppInst.setStatus('current')
if mibBuilder.loadTexts: rlUdpSessionAppInst.setDescription('The instance ID for the application on the port (for future use).')
rlUdpSessionAppName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 42, 3, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 12))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlUdpSessionAppName.setStatus('current')
if mibBuilder.loadTexts: rlUdpSessionAppName.setDescription('The name of the application that created the session.')
mibBuilder.exportSymbols("CISCOSB-UDP", rsUdpRelayStatus=rsUdpRelayStatus, rlUdpSessionAppInst=rlUdpSessionAppInst, rsUdpRelayTable=rsUdpRelayTable, rlUdpSessionLocalPort=rlUdpSessionLocalPort, rsUdpRelayDstIpAddr=rsUdpRelayDstIpAddr, rlUdpSessionTable=rlUdpSessionTable, rlUdpSessionAppName=rlUdpSessionAppName, rlUdpSessionLocalAddrType=rlUdpSessionLocalAddrType, rsUdpRelayDstPort=rsUdpRelayDstPort, rsUDP=rsUDP, rsUdpRelayMibVersion=rsUdpRelayMibVersion, rsUdpRelaySrcIpInf=rsUdpRelaySrcIpInf, rsUdpRelayEntry=rsUdpRelayEntry, PYSNMP_MODULE_ID=rsUDP, rlUdpSessionLocalAddr=rlUdpSessionLocalAddr, rsUdpRelayUserInfo=rsUdpRelayUserInfo, rlUdpSessionEntry=rlUdpSessionEntry)
|
def entry_id(entry):
for field in ['id', 'link']:
ret = getattr(entry, field, None)
if ret:
return ret
raise Exception('no id field found in entry: {}'.format(entry))
|
print("~" * 60)
print("Tower of Hanoi")
def hanoi(n, src, dst, tmp):
if n > 0:
hanoi(n - 1, src, tmp, dst)
print(f"Move disk {n} from {src} to {dst}")
hanoi(n - 1, tmp, dst, src)
hanoi(4, "A", "B", "C")
print("~" * 60)
print("8 Queens Problem")
queen = [0 for _ in range(8)]
rfree = [True for _ in range(8)]
du = [True for _ in range(15)]
dd = [True for _ in range(15)]
def solve(c):
global solutions
if c == 8:
solutions += 1
print(solutions, end=": ")
for r in range(8):
print(queen[r] + 1, end=" " if r < 7 else "\n")
else:
for r in range(8):
if rfree[r] and dd[c + r] and du[c + 7 - r]:
queen[c] = r
rfree[r] = dd[c + r] = du[c + 7 - r] = False
solve(c + 1)
rfree[r] = dd[c + r] = du[c + 7 - r] = True
solutions = 0
solve(0)
print(f"\nThere are {solutions} solutions")
|
class Function:
def __init__(self, name, param_types, return_type, line=0):
self.name = name
self.param_types = param_types
self.return_type = return_type
self.line = line
def __str__(self):
return Function.__qualname__
def getattr(self, name):
raise AttributeError("Invalid attribute or method access")
|
class Solution:
def minStartValue(self, nums: List[int]) -> int:
total = minSum = 0
for num in nums:
total += num
minSum = min(minSum, total)
return 1 - minSum
|
def conduit_login(driver):
driver.find_element_by_xpath('//a[@href="#/login"]').click()
driver.find_element_by_xpath('//input[@placeholder="Email"]').send_keys("testmail61@test.hu")
driver.find_element_by_xpath('//input[@placeholder="Password"]').send_keys("Testpass1")
driver.find_element_by_xpath('//*[@id="app"]//form/button').click()
def conduit_logout(driver):
driver.find_element_by_xpath('//*[@id="app"]/nav/div/ul/li[5]/a').click()
|
class Node():
def __init__(self, val):
self.val = val
self.adjacent_nodes = []
self.visited = False
# O(E^d) where d is depth
def word_transform(w1, w2, dictionary):
# make dictionary into linked list
start_node = Node(w1)
end_node = Node(w2)
nodes = [start_node, end_node]
nodes_dict = {start_node.val: start_node, end_node.val: end_node}
while nodes:
node = nodes.pop()
word = node.val
for w in dictionary:
if w == word:
continue
diff = 0
for i in range(len(word)):
if w[i] != word[i]:
diff += 1
diff += abs(len(word) - len(w))
if diff == 1:
if w not in nodes_dict:
nodes_dict[w] = Node(w)
nodes.append(nodes_dict[w])
node.adjacent_nodes.append(nodes_dict[w])
nodes = [start_node]
path = []
while nodes:
node = nodes.pop()
if node == end_node:
path.append(node.val)
return ''.join(path)
path.append(node.val + ' -> ')
node.visited = True
for c in node.adjacent_nodes:
if not c.visited:
nodes.append(c)
return None
|
# leetcode
class Solution:
def mincostTickets(self, days: List[int], costs: List[int]) -> int:
num = 366
one, seven, thirty = costs
dp = [0] * num
idx = 0
for i in range(1, num):
dp[i] = dp[i-1]
if i == days[idx]:
dp[i] = min(
one+dp[i-1 if i-1>0 else 0],
seven+dp[i-7 if i-7>0 else 0],
thirty+dp[i-30 if i-30>0 else 0]
)
if idx != len(days)-1:
idx += 1
else:
break
return dp[days[idx]]
|
'''
The Python repository "AA" contains the scripts, data,
figures, and text for nudged Arctic Amplification (AA) and
Upper-troposphere Tropical Warming (UTW). The model is SC-WACCM4.
We are interested in the large-scale atmospheric response to
Arctic sea ice loss in AA simulations compared to sea-ice forcing.
See Peings, Cattiaux, and Magnusdottir, GRL (2019) for model set-up.
Author: Zachary Labe (zlabe@uci.edu)
'''
|
# employees = {'marge': 3, 'mag': 2}
# employees['phil'] = '5'
# print(employees.values())
# new_list = list(iter(employees))
# for key, value in employees.iteritems():
# print(key,value)
# print(new_list)
# t = ('a', 'b', 'c', 'd')
# print(t.index('c'))
# print(1 > 2)
# myfile = open('test_file.txt')
# read = myfile.read()
# print(read)
# with open('test_file.txt') as myfile:
# read = myfile.read()
# print(read)
f = open('second_file.txt')
lines = f.read()
print(lines)
|
sample_pos_100_circle = {
(0, 12, 14, 28, 61, 76) : (0.6606687940575429, 0.12955294286970329, 0.1392231402857147),
(0, 14, 26, 28, 61, 76) : (0.6775622847685568, 0.0898623709846611, 0.14956067316950022),
(0, 11, 12, 14, 23, 28, 42, 44, 76, 79, 89) : (0.6065886283561139, 0.20320288122581232, 0.14005207871339437),
(0, 11, 12, 14, 23, 42, 44, 76, 79, 89, 98) : (0.5656826490913177, 0.22945537874500058, 0.14709530367632542),
(0, 12, 14, 23, 42, 44, 89, 90, 98) : (0.49723213477453154, 0.23278842941402605, 0.14874812754801625),
(0, 12, 14, 42, 43, 44, 89, 90, 98) : (0.4531982657491745, 0.21474447325341245, 0.14781957286366254),
(0, 12, 14, 42, 44, 60, 89, 90, 98) : (0.4269561884232388, 0.19727225941604984, 0.1493885409990972),
(1, 8, 15, 22, 27, 28, 51, 53, 62, 74, 76) : (0.846301261746641, 0.18166537169350574, 0.14397835552200322),
(1, 8, 13, 15, 27, 28, 39, 51, 53, 62, 74, 76) : (0.8485490407639608, 0.26577545830529575, 0.14237104291986868),
(1, 8, 13, 15, 27, 39, 51, 53, 55, 62, 74) : (0.8598700336382776, 0.2936319361757566, 0.14316008940627623),
(8, 13, 15, 27, 39, 51, 53, 55, 62, 74, 76) : (0.848475421386148, 0.2979123559117623, 0.1495723404911163),
(8, 15, 22, 27, 28, 51, 53, 61, 74, 76) : (0.8313716731911684, 0.15951059780677493, 0.14984734652985005),
(1, 15, 22, 26, 27, 28, 51, 53, 61, 74) : (0.8707649166253553, 0.12603886971740247, 0.14915740644860379),
(15, 22, 26, 27, 28, 51, 53, 61, 74, 76) : (0.8365094688174124, 0.15377823301715582, 0.1482384443600522),
(1, 8, 15, 27, 39, 51, 53, 55, 57, 62, 74) : (0.8744674026914928, 0.32488477158328966, 0.14993334330995228),
(8, 13, 27, 39, 51, 53, 55, 57, 62, 74, 76) : (0.8394379542077309, 0.3149880381645896, 0.14976819860224347),
(2, 7, 46, 54, 57, 77) : (0.8345091660588192, 0.583756096334454, 0.12229815996364714),
(2, 39, 46, 55, 57, 77) : (0.9084352576938933, 0.5098903011547264, 0.14572090388150585),
(2, 7, 46, 54, 67, 77, 78) : (0.812411509094655, 0.6641080591492242, 0.14888487099965556),
(2, 7, 35, 46, 54, 67, 77, 82, 95) : (0.8518389325402812, 0.6847232482307565, 0.14327587769420472),
(2, 7, 35, 54, 67, 77, 82, 93, 95) : (0.9204975034212663, 0.7431093346713038, 0.14939837995538113),
(3, 29, 30, 34, 45, 65, 86, 94, 97) : (0.1004320333187312, 0.25448500386219897, 0.13457985828835478),
(3, 30, 34, 45, 52, 65, 70, 86, 94, 97) : (0.13232166150446328, 0.1787966932430779, 0.14148065167771823),
(3, 30, 33, 45, 52, 65, 70, 86, 94, 97) : (0.10213454221898952, 0.158512554500736, 0.14562465660768442),
(3, 30, 34, 45, 52, 60, 65, 86, 94, 97) : (0.16328756540749167, 0.2126428426271769, 0.14578456301618062),
(3, 34, 45, 52, 60, 65, 70, 86, 94, 97) : (0.17797832456706061, 0.19683196747732873, 0.14011636481529072),
(3, 30, 34, 45, 50, 60, 65, 86, 94, 97) : (0.1553910862561932, 0.23765246912401705, 0.14827548821813938),
(29, 30, 34, 45, 50, 60, 65, 86, 94, 97) : (0.15000102162768236, 0.30018732583286084, 0.14984415048071437),
(4, 9, 10, 20, 38, 75, 81) : (0.4003130616293591, 0.8285844456813044, 0.1480307501034011),
(4, 9, 10, 38, 48, 75, 81) : (0.38580428031766406, 0.8561990999547606, 0.14870245579695562),
(4, 9, 17, 20, 21, 38, 48, 75, 81, 85) : (0.3287611424267173, 0.7727174414557608, 0.14875929774485536),
(4, 9, 21, 38, 48, 68, 75, 81) : (0.35085609036236404, 0.829788163067764, 0.14875398876294763),
(4, 10, 18, 48, 68, 75, 81) : (0.37649547612262557, 0.8951760847630872, 0.14919996648688127),
(4, 9, 19, 20, 21, 38, 49, 75, 85) : (0.41640100306849537, 0.705093150372995, 0.14015996098823705),
(4, 9, 17, 20, 21, 38, 64, 75, 81, 85) : (0.33085298603236063, 0.7418399215994397, 0.14487972439785962),
(4, 17, 20, 21, 38, 48, 64, 75, 81, 85) : (0.3193974850937622, 0.7680632820869213, 0.1474266580607778),
(4, 9, 17, 20, 21, 38, 49, 64, 75, 85) : (0.34114170574087294, 0.6969174305624999, 0.14405921509093017),
(9, 19, 20, 38, 49, 75, 87) : (0.5006885871277305, 0.7412338818491877, 0.1451388894436533),
(4, 9, 10, 75, 80, 81) : (0.4019264767473983, 0.8734149403352809, 0.14482927195072062),
(4, 10, 18, 48, 75, 80, 81) : (0.3830407940310534, 0.8944881167840582, 0.14681390420878215),
(4, 18, 32, 48, 56, 68, 69, 75, 81) : (0.3229807880040072, 0.8650666484497739, 0.14809708296773283),
(4, 10, 18, 48, 56, 68, 80, 81) : (0.37683713029076393, 0.911312260609274, 0.14832443190916603),
(4, 17, 21, 32, 38, 48, 64, 66, 68, 69, 75, 81, 85) : (0.28091256649751173, 0.7845716212169753, 0.141585496443792),
(4, 18, 21, 32, 38, 48, 64, 66, 68, 69, 75, 81) : (0.28070798853230206, 0.8090664742306333, 0.14931465362464058),
(4, 17, 20, 21, 38, 64, 66, 75, 81, 85) : (0.29785238436809, 0.7234263474491083, 0.1490540650472151),
(4, 18, 21, 32, 48, 56, 66, 68, 69, 81, 96) : (0.26699140597300897, 0.8495296776189856, 0.14875348880939057),
(4, 18, 21, 32, 38, 48, 64, 66, 68, 69, 81, 96) : (0.25527949109936104, 0.8106316384539816, 0.1445317451825426),
(4, 17, 21, 32, 38, 48, 64, 66, 68, 69, 81, 85, 96) : (0.23217561230891856, 0.7805372979198325, 0.14511838625757928),
(4, 9, 10, 19, 20, 38, 71, 75, 87) : (0.4775129839401001, 0.7927769793318314, 0.14462380860637297),
(4, 9, 10, 20, 71, 75, 80, 87) : (0.4747088359878572, 0.8297948931425277, 0.14678768577566298),
(9, 10, 19, 20, 71, 75, 80, 87) : (0.502030117116463, 0.8236087646816392, 0.14943676014695212),
(4, 18, 32, 48, 56, 58, 66, 68, 69, 72, 81, 96) : (0.21696064154531802, 0.874101533075222, 0.13041150648755526),
(4, 18, 21, 32, 48, 58, 64, 66, 68, 69, 72, 81, 96) : (0.20114669372366326, 0.8301128240778305, 0.1493335313715823),
(4, 17, 21, 38, 64, 66, 69, 81, 85, 99) : (0.21769657381971141, 0.7313388234347639, 0.14701057273298804),
(4, 17, 21, 32, 48, 64, 66, 69, 81, 85, 96, 99) : (0.2015477050911515, 0.7529044317010726, 0.1494589238432731),
(20, 25, 31, 49, 59, 84) : (0.4258087319921411, 0.5401043228214542, 0.14745116571790448),
(5, 24, 25, 31, 41, 43, 49, 59, 84, 90) : (0.37662482838264727, 0.4751123959489456, 0.1496946360540124),
(5, 17, 20, 24, 25, 31, 38, 41, 49, 85) : (0.3622865226400378, 0.5612057389900295, 0.14877040889503995),
(5, 17, 21, 24, 25, 31, 38, 41, 49, 85) : (0.3397797027650458, 0.5662701001128034, 0.14899731011520068),
(17, 20, 21, 24, 25, 31, 38, 41, 49, 85) : (0.3529122532222511, 0.5772058553558765, 0.145641194646832),
(5, 24, 25, 31, 41, 43, 50, 84, 90) : (0.36744835703496576, 0.44513805791935623, 0.149017727518376),
(5, 17, 24, 25, 41, 50) : (0.25238459020708376, 0.49714842367609063, 0.14920289957040228),
(5, 24, 25, 31, 43, 50, 59, 83, 84, 90) : (0.3742525826195432, 0.4225237020811445, 0.14492114513872695),
(5, 11, 23, 31, 43, 44, 59, 63, 84, 89, 90) : (0.46586820074056295, 0.38692285503826956, 0.14938930201395317),
(5, 25, 31, 43, 50, 59, 60, 83, 84, 90) : (0.37465236999713214, 0.3967343268979738, 0.14793274615561394),
(5, 24, 25, 31, 43, 50, 60, 83, 84, 90) : (0.3666595366409718, 0.4029451066437212, 0.14935861884170346),
(5, 24, 25, 31, 41, 43, 50, 60, 83, 90) : (0.3374953446014549, 0.40768326591677895, 0.14271109555895584),
(5, 11, 23, 31, 43, 44, 59, 84, 89, 90, 98) : (0.46179357379075087, 0.37130700578519776, 0.14959106548201262),
(5, 31, 43, 44, 50, 59, 60, 83, 84, 89, 90, 98) : (0.3992944529514407, 0.34835251138844014, 0.14481894164813303),
(5, 24, 25, 34, 41, 43, 50, 60, 83, 86, 90) : (0.2643514690001076, 0.38046461029115597, 0.13200682283744283),
(5, 42, 43, 44, 59, 60, 83, 84, 89, 90, 98) : (0.4251496043395029, 0.314317932764338, 0.14818426431967247),
(5, 42, 43, 44, 50, 60, 83, 89, 90, 98) : (0.3896204611486524, 0.2884476340796184, 0.14766772614257698),
(5, 34, 43, 50, 60, 65, 83, 89, 90, 98) : (0.35484204032889544, 0.28298632126058126, 0.14896339447527998),
(5, 24, 34, 41, 43, 50, 60, 65, 83, 86, 90) : (0.24186208866496334, 0.35381703763650374, 0.147248332994493),
(42, 43, 50, 60, 65, 83, 89, 90, 98) : (0.3648226358119667, 0.2529208238960593, 0.14563258715152547),
(5, 17, 21, 24, 25, 41, 64, 85) : (0.26509967721642796, 0.5547482058021883, 0.1467474135798299),
(17, 20, 21, 24, 25, 38, 41, 49, 64, 85) : (0.3204205925258258, 0.6110698164118312, 0.1433963240190826),
(5, 24, 34, 41, 50, 60, 65, 83, 86, 94) : (0.1963459614878132, 0.354221443943041, 0.1499119871156634),
(5, 34, 43, 50, 60, 65, 83, 86, 90, 97, 98) : (0.2786672893971936, 0.2764212575028138, 0.148038361569061),
(6, 8, 13, 36, 39, 46, 57, 79, 91) : (0.7812938642651628, 0.40869196155963294, 0.1483179196387932),
(6, 11, 13, 36, 39, 46, 57, 63, 79, 91) : (0.7400403080009023, 0.4149028417553895, 0.14959527944822024),
(6, 11, 13, 23, 36, 40, 46, 57, 63, 79, 91) : (0.6955733914381548, 0.4466149890794219, 0.14332938261511524),
(6, 11, 23, 36, 40, 46, 59, 63, 91) : (0.661799803852757, 0.47465268914249026, 0.14990023270177139),
(6, 11, 13, 23, 36, 40, 57, 59, 63, 79, 91) : (0.6674444223364877, 0.44592897980175666, 0.1493799596176158),
(6, 8, 11, 13, 23, 36, 39, 57, 63, 76, 79, 91) : (0.7479505156724652, 0.3543364256041871, 0.14504949210030488),
(6, 36, 40, 46, 57, 78) : (0.6989923716784051, 0.5550188424375802, 0.14881436260536204),
(6, 11, 13, 23, 36, 40, 44, 59, 63, 79, 84, 91) : (0.6121508102053388, 0.4160214927121739, 0.13919367839740476),
(6, 11, 23, 31, 36, 40, 44, 59, 63, 79, 84, 91) : (0.5840006753840745, 0.425262952856729, 0.13453194363310325),
(6, 7, 40, 46, 54, 57, 78) : (0.7359758275738826, 0.5714274758487573, 0.1459224915245561),
(6, 19, 40, 46, 54, 78) : (0.6804138212873839, 0.6024152093385852, 0.14958356907798287),
(7, 19, 40, 46, 54, 78) : (0.7001663606329307, 0.6736530749126453, 0.145581886573751),
(6, 11, 12, 23, 31, 36, 44, 59, 63, 79, 84, 89, 91) : (0.5546692350232861, 0.3748947382581936, 0.1404608810549469),
(6, 11, 12, 13, 23, 36, 44, 59, 63, 76, 79, 84, 89, 91) : (0.6158471277538801, 0.33210754135354276, 0.13695160632128495),
(6, 19, 40, 49, 78) : (0.5898959630882554, 0.5849837349401764, 0.1395478206848745),
(6, 19, 31, 40, 49, 59, 84) : (0.5508159716065527, 0.5507115624444804, 0.13320543730746362),
(6, 31, 40, 49, 59, 63, 84) : (0.5334868035040657, 0.4969112537149139, 0.13520536905611247),
(6, 11, 12, 23, 31, 43, 44, 59, 63, 79, 84, 89, 90, 91) : (0.5248341660288149, 0.3695285456138079, 0.14898478769694384),
(16, 19, 40, 54, 78) : (0.648734030229264, 0.69772769100568, 0.14566639395175016),
(7, 16, 19, 54, 78, 92) : (0.7017301747157373, 0.7018096583710086, 0.14788217314648738),
(7, 35, 46, 54, 67, 77, 78, 92, 95) : (0.8016668768331154, 0.7050427315864585, 0.14885954882353508),
(7, 35, 54, 67, 77, 78, 82, 92, 95) : (0.8126860837487624, 0.7390030277575786, 0.14963827070744815),
(7, 35, 54, 67, 77, 82, 92, 93, 95) : (0.8541983606053255, 0.7617510039302191, 0.13551854101469707),
(7, 16, 35, 54, 67, 78, 92, 93, 95) : (0.7835123617757969, 0.7940004134527878, 0.14850931037307125),
(7, 35, 54, 67, 73, 82, 92, 93, 95) : (0.8680257488645291, 0.8105733497073806, 0.14461010599432164),
(16, 35, 54, 67, 73, 92, 93, 95) : (0.8039052049993555, 0.8358136241307832, 0.1460176815171897),
(8, 13, 27, 28, 36, 39, 51, 62, 74, 76, 79) : (0.7864858215585857, 0.29075158032698684, 0.14961460741813482),
(8, 13, 27, 28, 36, 39, 62, 74, 76, 79, 91) : (0.7851472504933936, 0.30671346343945144, 0.14266494791580994),
(8, 13, 27, 36, 39, 57, 62, 74, 76, 79, 91) : (0.7947045059120503, 0.31997763795542744, 0.14446794140299074),
(8, 11, 13, 23, 27, 28, 36, 74, 76, 79, 91) : (0.7372472238258292, 0.2715103777107627, 0.14815884891492234),
(8, 11, 13, 23, 36, 39, 57, 74, 76, 79, 91) : (0.7536701632685218, 0.3264131965382456, 0.1499762709695208),
(8, 11, 13, 23, 28, 36, 39, 63, 74, 76, 79, 91) : (0.7432076014100258, 0.3161679754031407, 0.14735220435952692),
(8, 13, 36, 39, 55, 57, 62, 74) : (0.8270244719636314, 0.3463770009824643, 0.14816894016641344),
(8, 13, 36, 39, 46, 55, 57) : (0.8315524471930096, 0.4208862595245414, 0.14308143530640893),
(9, 19, 20, 49, 75, 78, 87) : (0.526255574364575, 0.7284182151763334, 0.1445142284421115),
(9, 10, 16, 19, 20, 71, 75, 78, 87) : (0.5503029395762983, 0.7725028563327712, 0.1379855198507884),
(9, 19, 20, 40, 49, 75, 78) : (0.5308236138060022, 0.6654717052596012, 0.14166070888466),
(9, 16, 19, 40, 78) : (0.6152792270448181, 0.7022038051249079, 0.14724540705027672),
(9, 19, 20, 31, 38, 49, 75, 85) : (0.4397878732528429, 0.6157549414177731, 0.1379389073709895),
(9, 19, 20, 31, 40, 49, 75) : (0.48958920540021267, 0.6234521812075917, 0.14685558331482343),
(9, 10, 16, 19, 71, 75, 80, 87) : (0.5310332240866265, 0.8284058748099863, 0.14651673216295627),
(9, 10, 16, 19, 71, 78, 87, 92) : (0.6106510896880954, 0.7958501908923952, 0.1430714723104721),
(10, 16, 71, 80, 87, 92) : (0.6264282483677088, 0.9079762183947514, 0.1358534990005984),
(11, 12, 23, 31, 42, 43, 44, 59, 63, 84, 89, 90, 98) : (0.4776061998845129, 0.3308921514293687, 0.14948378198882384),
(11, 12, 14, 23, 42, 43, 44, 59, 63, 79, 84, 89, 90, 98) : (0.5190100909516181, 0.3024309974602939, 0.1461597643756266),
(11, 12, 23, 31, 43, 44, 59, 63, 79, 84, 89, 90, 98) : (0.5167680750767972, 0.3408073723414071, 0.1494775277829455),
(11, 12, 14, 23, 42, 44, 59, 63, 79, 84, 89, 90, 91, 98) : (0.5353432225094631, 0.3092813311287071, 0.14961247846229375),
(11, 12, 23, 42, 43, 44, 59, 63, 79, 84, 89, 90, 91, 98) : (0.5269080789204658, 0.3272778263063749, 0.1492860996243205),
(11, 12, 14, 23, 42, 44, 63, 76, 79, 89, 98) : (0.5651889224135658, 0.24974452994663424, 0.1481860442866704),
(11, 12, 13, 14, 23, 42, 44, 59, 63, 76, 79, 84, 89, 91) : (0.5810248153025497, 0.297301468717096, 0.14553280939641036),
(11, 12, 13, 14, 23, 36, 44, 59, 63, 76, 79, 84, 89, 91) : (0.59020808374762, 0.30242702351356676, 0.14518706205274268),
(11, 12, 13, 14, 23, 28, 42, 44, 63, 76, 79, 89, 91) : (0.6206933635449503, 0.24682154651736443, 0.14397395607960825),
(11, 12, 13, 14, 23, 28, 36, 44, 63, 76, 79, 89, 91) : (0.6443421994012091, 0.27263136238807373, 0.1418464361759105),
(11, 12, 13, 14, 23, 28, 74, 76, 79, 91) : (0.6865690251676432, 0.23557064983017745, 0.1497576533972519),
(11, 12, 13, 23, 28, 36, 63, 74, 76, 79, 91) : (0.7095105226389335, 0.27798372862136267, 0.145811382266761),
(12, 13, 27, 28, 74, 76, 79) : (0.7163112725430478, 0.21385230043077974, 0.14778176906674004),
(12, 14, 28, 61, 74, 76) : (0.692614694039914, 0.15857646831069733, 0.14455379460889162),
(12, 23, 42, 43, 44, 59, 83, 84, 89, 90, 98) : (0.4563543195907547, 0.31480881243674935, 0.14922880337038014),
(12, 23, 31, 43, 44, 59, 83, 84, 89, 90, 98) : (0.45419723615723284, 0.32960642809424645, 0.1499761920887504),
(12, 14, 42, 43, 44, 60, 83, 89, 90, 98) : (0.42955231039420116, 0.2226100668877384, 0.14110959536132095),
(12, 42, 43, 44, 59, 60, 83, 84, 89, 90, 98) : (0.4402325483015652, 0.3046223156987031, 0.14721181227676056),
(14, 22, 28, 61, 74, 76) : (0.7017172984423354, 0.12325899188468137, 0.14999980732453855),
(14, 22, 26, 28, 61, 76) : (0.6912503728261168, 0.10016189310233165, 0.14784082552996525),
(16, 19, 54, 71, 78, 87, 92) : (0.6703761804849702, 0.7581413028998242, 0.13727248723415264),
(16, 54, 71, 78, 87, 92, 95) : (0.7055796088125853, 0.8042768799273943, 0.13751533041746666),
(16, 71, 92, 93, 95) : (0.748680649656, 0.8792981719129548, 0.14810534432725672),
(16, 35, 47, 73, 92, 93, 95) : (0.7973963974798904, 0.8730772012592461, 0.14251677211486202),
(17, 20, 21, 25, 38, 49, 64, 75, 85) : (0.33122073385849954, 0.6424372081216861, 0.140272333871763),
(17, 20, 21, 25, 31, 38, 49, 75, 85) : (0.3899560099849434, 0.6080529827711362, 0.14686618715840474),
(17, 21, 24, 25, 38, 41, 64, 66, 85, 99) : (0.2324845209042679, 0.6381836480533993, 0.14541606090517503),
(17, 21, 24, 25, 41, 64, 66, 85, 88, 99) : (0.17759327332460764, 0.6154216464660676, 0.14680527616816053),
(17, 21, 64, 66, 69, 85, 88, 99) : (0.1700753673132927, 0.7010807602993253, 0.14829695794446568),
(17, 21, 64, 66, 69, 88, 96, 99) : (0.14057040165146145, 0.7404980045079362, 0.14458712542500857),
(21, 32, 64, 66, 69, 88, 96, 99) : (0.13589958287585685, 0.7521082386304109, 0.14938908416349977),
(32, 37, 48, 58, 64, 66, 68, 69, 72, 81, 96) : (0.1587853817899879, 0.8265085757585824, 0.14669323412266905),
(18, 32, 37, 48, 56, 58, 66, 68, 69, 72, 81, 96) : (0.1565898330981594, 0.900576785386657, 0.14039118879912008),
(19, 20, 31, 40, 49, 59, 84) : (0.4955100051053224, 0.5592196556545426, 0.13807852710419102),
(29, 88) : (0.021898984551369127, 0.498905674871803, 0.14491984926943427),
(24, 29, 34, 41, 50, 86, 94) : (0.15186115338348286, 0.38521837733842534, 0.14484075712621175),
(29, 30, 34, 41, 50, 86, 94) : (0.1318289821876929, 0.3907884062675565, 0.14663186091122857),
(30, 34, 45, 50, 60, 65, 83, 86, 94, 97) : (0.17218506307174686, 0.2745348904559653, 0.13778262145170894),
(34, 45, 52, 60, 65, 70, 83, 86, 94, 97) : (0.1946945060242287, 0.20205232918260238, 0.14600384549982623),
(34, 45, 50, 60, 65, 70, 83, 86, 94, 97) : (0.1984942686851189, 0.20938746372536046, 0.14945353002055525),
(32, 37, 48, 64, 66, 69, 81, 96, 99) : (0.13998817052833173, 0.7858689353702485, 0.14814097529549805),
(32, 37, 64, 66, 69, 88, 96, 99) : (0.111022615751386, 0.7676327866502684, 0.1464828433048606),
(34, 60, 65, 70, 83, 86, 97, 98) : (0.27881170846041564, 0.18823061782622416, 0.14535381423478827),
(35, 47, 67, 73, 82, 92, 93, 95) : (0.8668407448339298, 0.8654424303052715, 0.12317143039084451),
}
|
# -*- coding: utf-8 -*-
'''Top-level package for lico.'''
__author__ = '''Sjoerd Kerkstra'''
__email__ = 'w.s.kerkstra@example.com'
__version__ = '0.1.1'
|
help_guide = '''命令和二级命令均可只写首字母
/random help - 查阅帮助
/random - 在 [0, 100] 间取一个随机数
/random <数量> - 在 [0, 100] 间取若干个随机数
/random <a> <b> - 在 [a, b] 间取一个随机数
/random <a> <b> <数量> - 在 [a, b] 间取若干个随机数
/random bool - 取随机布尔值(True or False)
/random shuffle <序列> - 打乱该序列
/random choice <序列> - 在序列中挑一个元素
/random choice <序列> <数量> - 在序列中挑若干个元素
关于"序列"的输入:
- 用半角逗号分隔不同元素。
- 如无逗号,则默认每一个字符分别为序列中的一个元素。
- 应该不支持有空格
- eg.
- 1234 -> ['1', '2', '3', '4']
- 12,34 -> ['12', '34']
'''
err = '错误: %s'
|
"""Stub implementation containing j2kt_provider helpers."""
def _to_j2kt_jvm_name(name):
"""Convert a label name used in j2cl to be used in j2kt jvm"""
if name.endswith("-j2cl"):
name = name[:-5]
return "%s-j2kt-jvm" % name
def _to_j2kt_native_name(name):
"""Convert a label name used in j2cl to be used in j2kt native"""
if name.endswith("-j2cl"):
name = name[:-5]
return "%s-j2kt-native" % name
def _compile(**kwargs):
pass
def _native_compile(**kwargs):
pass
def _jvm_compile(**kwargs):
pass
j2kt_common = struct(
to_j2kt_jvm_name = _to_j2kt_jvm_name,
to_j2kt_native_name = _to_j2kt_native_name,
compile = _compile,
native_compile = _native_compile,
jvm_compile = _jvm_compile,
)
|
# Author: zhao-zh10
# -----------
# User Instructions:
#
# Modify the the search function so that it becomes
# an A* search algorithm as defined in the previous
# lectures.
#
# Your function should return the expanded grid
# which shows, for each element, the count when
# it was expanded or -1 if the element was never expanded.
#
# If there is no path from init to goal,
# the function should return the string 'fail'
# ----------
grid = [[0, 1, 0, 0, 0, 0],
[0, 1, 0, 0, 0, 0],
[0, 1, 0, 0, 0, 0],
[0, 1, 0, 0, 0, 0],
[0, 0, 0, 0, 1, 0]]
heuristic = [[9, 8, 7, 6, 5, 4],
[8, 7, 6, 5, 4, 3],
[7, 6, 5, 4, 3, 2],
[6, 5, 4, 3, 2, 1],
[5, 4, 3, 2, 1, 0]]
init = [0, 0]
goal = [len(grid) - 1, len(grid[0]) - 1]
cost = 1
delta = [[-1, 0], # go up
[0, -1], # go left
[1, 0], # go down
[0, 1]] # go right
delta_name = ['^', '<', 'v', '>']
def search(grid, init, goal, cost, heuristic, debug_flag = False):
# ----------------------------------------
# modify the code below
# ----------------------------------------
closed = [[0 for col in range(len(grid[0]))] for row in range(len(grid))]
closed[init[0]][init[1]] = 1
expand = [[-1 for col in range(len(grid[0]))] for row in range(len(grid))]
action = [[-1 for col in range(len(grid[0]))] for row in range(len(grid))]
policy = [[' ' for col in range(len(grid[0]))] for row in range(len(grid))]
x = init[0]
y = init[1]
g = 0
h = heuristic[x][y]
f = g + h
open = [[f, g, h, x, y]]
found = False # flag that is set when search is complete
resign = False # flag set if we can't find expand
count = 0
if debug_flag:
print('initial open list:')
for i in range(len(open)):
print(" ", open[i])
print("----")
while not found and not resign:
if len(open) == 0:
resign = True
if debug_flag:
print('Fail')
print('###### Search terminated without success')
return "Fail"
else:
# remove node from list
open.sort()
open.reverse()
next = open.pop()
if debug_flag:
print('take list item')
print(next)
x = next[3]
y = next[4]
g = next[1]
expand[x][y] = count
count += 1
if x == goal[0] and y == goal[1]:
if debug_flag:
print(next)
print('###### Search successful')
found = True
else:
# expand winning element and add to new open list
for i in range(len(delta)):
x2 = x + delta[i][0]
y2 = y + delta[i][1]
if 0 <= x2 < len(grid) and 0 <= y2 < len(grid[0]):
if closed[x2][y2] == 0 and grid[x2][y2] == 0:
g2 = g + cost
h2 = heuristic[x2][y2]
f2 = g2 + h2
open.append([f2, g2, h2, x2, y2])
if debug_flag:
print('append list item')
print([f2, g2, h2, x2, y2])
closed[x2][y2] = 1
action[x2][y2] = i
if debug_flag:
print('---'*10)
print('new open list:')
for i in range(len(open)):
print(' ', open[i])
print('---'*10)
if found:
x = goal[0]
y = goal[1]
policy[x][y] = '*'
while x != init[0] or y != init[0]:
x2 = x - delta[action[x][y]][0]
y2 = y - delta[action[x][y]][1]
policy[x2][y2] = delta_name[action[x][y]]
x = x2
y = y2
if debug_flag:
print('---'*10)
print('The path policy is:')
for m in range(len(policy)):
print(policy[m])
print('---'*10)
print('The expanded table is :')
for k in range(len(expand)):
print(expand[k])
return expand
search(grid, init, goal, cost, heuristic)
|
class Solution:
"""
@param nums: A list of integers
@return: A list of integers includes the index of the first number and the index of the last number
"""
def subarraySum(self, nums):
d = {}
d[0] = -1
L = len(nums)
index = 0
count = 0
while index < L :
count += nums[index]
if count in d :
return [d[count]+1,index]
d[count] = index
index += 1
|
# python3
class HeapBuilder:
def __init__(self):
self._swaps = []
self._data = []
def ReadData(self):
global n
n = int(input())
self._data = [int(s) for s in input().split()]
assert n == len(self._data)
def WriteResponse(self):
print(len(self._swaps))
for swap in self._swaps:
print(swap[0], swap[1])
def SiftDown(self, i):
minIndex = i
left = 2 * i + 1
if left < n and self._data[left] < self._data[minIndex]:
minIndex = left
right = 2 * i + 2
if right < n and self._data[right] < self._data[minIndex]:
minIndex = right
if i != minIndex:
self._data[i], self._data[minIndex] = self._data[minIndex], self._data[i]
self._swaps.append([i, minIndex])
self.SiftDown(minIndex)
def GenerateSwaps(self):
for i in range(n // 2, -1, -1):
self.SiftDown(i)
def Solve(self):
self.ReadData()
self.GenerateSwaps()
self.WriteResponse()
if __name__ == '__main__':
heap_builder = HeapBuilder()
heap_builder.Solve()
|
# python dict of naming overrides
GENE_NAME_OVERRIDE = {
# pmmo Genes
'EQU24_RS19315':'pmoC',
'EQU24_RS19310':'pmoA',
'EQU24_RS19305':'pmoB',
# smmo Genes
'EQU24_RS05930':'mmoR',
'EQU24_RS05925':'mmoG',
'EQU24_RS05910':'mmoC',
'EQU24_RS05900':'mmoZ',
'EQU24_RS05895':'mmoB',
'EQU24_RS05890':'mmoY',
'EQU24_RS05885':'mmoX',
# groEL/groES genes
'EQU24_RS17825':'groS',
'EQU24_RS08650':'groS',
# mxaF genes (mxa and mox)
'EQU24_RS18155':'mxaD',
'EQU24_RS18140':'moxF',
'EQU24_RS18125':'moxI',
'EQU24_RS18120':'moxR',
'EQU24_RS18115':'mxaP', # via blast
'EQU24_RS18110':'mxaS',
'EQU24_RS18105':'mxaA',
'EQU24_RS18100':'mxaC',
'EQU24_RS18095':'mxaK',
'EQU24_RS18090':'mxaL',
'EQU24_RS18145':'mxaB',
# Xox
'EQU24_RS18610':'xoxJ',
'EQU24_RS18605':'xoxF'
}
GENE_PRODUCT_OVERRIDE = {
'EQU24_RS05925':'likely chaperone for smmo',
}
SYS_LOOKUP = {
#pmo
'EQU24_RS19315':'pmo',
'EQU24_RS19310':'pmo',
'EQU24_RS19305':'pmo',
# smo
'EQU24_RS05910':'smo',
'EQU24_RS05905':'smo',
'EQU24_RS05900':'smo',
'EQU24_RS05895':'smo',
'EQU24_RS05890':'smo',
'EQU24_RS05885':'smo',
'EQU24_RS05930':'smo',
'EQU24_RS05925':'smo',
# mxa
'EQU24_RS18145':'mox',
'EQU24_RS18140':'mox',
'EQU24_RS18135':'mox',
'EQU24_RS18130':'mox',
'EQU24_RS18125':'mox',
'EQU24_RS18120':'mox',
'EQU24_RS18115':'mox',
'EQU24_RS18110':'mox',
'EQU24_RS18105':'mox',
'EQU24_RS18100':'mox',
'EQU24_RS18095':'mox',
'EQU24_RS18090':'mox',
# xox
'EQU24_RS18605':'xox',
'EQU24_RS18610':'xox',
#groEL/ES
# 'EQU24_RS17825':'gro',
# 'EQU24_RS17820':'gro',
# 'EQU24_RS08655':'gro',
# 'EQU24_RS08650':'gro',
#pilin
'EQU24_RS04275':'pilin',
'EQU24_RS01095':'pilin',
'EQU24_RS16035':'pilin',
'EQU24_RS03345':'pilin',
'EQU24_RS16020':'pilin',
'EQU24_RS19380':'pilin',
'EQU24_RS00705':'pilin',
'EQU24_RS04470':'pilin',
'EQU24_RS12830':'pilin',
'EQU24_RS04480':'pilin',
'EQU24_RS12835':'pilin',
'EQU24_RS04490':'pilin',
'EQU24_RS04485':'pilin',
'EQU24_RS03355':'pilin',
'EQU24_RS00710':'pilin',
'EQU24_RS05130':'pilin',
'EQU24_RS19585':'pilin',
'EQU24_RS04615':'pilin',
'EQU24_RS05525':'pilin',
'EQU24_RS16025':'pilin',
'EQU24_RS05135':'pilin',
'EQU24_RS12840':'pilin',
'EQU24_RS04585':'pilin',
'EQU24_RS04610':'pilin',
'EQU24_RS04595':'pilin',
'EQU24_RS04600':'pilin',
# secretion
'EQU24_RS19520':'secretion',
'EQU24_RS11235':'secretion',
'EQU24_RS15565':'secretion',
'EQU24_RS06345':'secretion',
'EQU24_RS05115':'secretion',
'EQU24_RS15560':'secretion',
'EQU24_RS11240':'secretion',
'EQU24_RS11280':'secretion',
'EQU24_RS11210':'secretion',
'EQU24_RS11245':'secretion',
'EQU24_RS11180':'secretion',
'EQU24_RS20155':'secretion',
'EQU24_RS15945':'secretion',
'EQU24_RS05120':'secretion',
'EQU24_RS11270':'secretion',
'EQU24_RS11275':'secretion',
'EQU24_RS11250':'secretion',
'EQU24_RS11260':'secretion',
'EQU24_RS20160':'secretion',
'EQU24_RS05110':'secretion',
'EQU24_RS04490':'secretion',
'EQU24_RS03350':'secretion',
'EQU24_RS11255':'secretion',
'EQU24_RS15930':'secretion',
'EQU24_RS16015':'secretion',
'EQU24_RS11215':'secretion',
'EQU24_RS11220':'secretion',
'EQU24_RS11205':'secretion',
'EQU24_RS11190':'secretion',
'EQU24_RS19490':'secretion',
'EQU24_RS05160':'secretion',
'EQU24_RS05105':'secretion',
'EQU24_RS16000':'secretion',
'EQU24_RS19465':'secretion',
'EQU24_RS15995':'secretion',
'EQU24_RS01525':'secretion',
'EQU24_RS05405':'secretion',
'EQU24_RS11175':'secretion',
'EQU24_RS10950':'secretion',
#toxin
'EQU24_RS11700':'toxin',
'EQU24_RS14175':'toxin',
'EQU24_RS18440':'toxin',
'EQU24_RS20880':'toxin',
'EQU24_RS07550':'toxin',
'EQU24_RS11705':'toxin',
'EQU24_RS07535':'toxin',
'EQU24_RS08075':'toxin',
'EQU24_RS02930':'toxin',
'EQU24_RS21185':'toxin',
'EQU24_RS21860':'toxin',
'EQU24_RS17985':'toxin',
'EQU24_RS07545':'toxin',
'EQU24_RS18405':'toxin',
'EQU24_RS00235':'toxin',
'EQU24_RS19535':'toxin',
'EQU24_RS10190':'toxin',
'EQU24_RS08220':'toxin',
'EQU24_RS21865':'toxin',
'EQU24_RS15430':'toxin',
'EQU24_RS20925':'toxin',
'EQU24_RS04285':'toxin',
'EQU24_RS10850':'toxin',
'EQU24_RS20920':'toxin',
'EQU24_RS08175':'toxin',
'EQU24_RS08180':'toxin',
'EQU24_RS08210':'toxin',
'EQU24_RS13090':'toxin',
'EQU24_RS20735':'toxin',
'EQU24_RS04320':'toxin',
'EQU24_RS20730':'toxin',
'EQU24_RS01855':'toxin',
'EQU24_RS10855':'toxin',
'EQU24_RS19540':'toxin',
'EQU24_RS20010':'toxin',
'EQU24_RS20725':'toxin',
'EQU24_RS08130':'toxin',
'EQU24_RS15455':'toxin',
'EQU24_RS13520':'toxin',
'EQU24_RS08065':'toxin',
'EQU24_RS04325':'toxin',
'EQU24_RS01485':'toxin',
'EQU24_RS05330':'toxin',
'EQU24_RS20720':'toxin',
'EQU24_RS13725':'toxin',
'EQU24_RS20935':'toxin',
'EQU24_RS08135':'toxin',
'EQU24_RS01930':'toxin',
'EQU24_RS17920':'toxin',
'EQU24_RS20265':'toxin',
'EQU24_RS16915':'toxin',
'EQU24_RS07460':'toxin',
'EQU24_RS01935':'toxin',
'EQU24_RS22115':'toxin',
'EQU24_RS19020':'toxin',
'EQU24_RS04380':'toxin',
'EQU24_RS04110':'toxin',
'EQU24_RS00215':'toxin',
'EQU24_RS01345':'toxin',
'EQU24_RS07575':'toxin',
'EQU24_RS00220':'toxin',
'EQU24_RS20270':'toxin',
'EQU24_RS05325':'toxin',
'EQU24_RS16470':'toxin',
'EQU24_RS17375':'toxin',
'EQU24_RS12475':'toxin',
'EQU24_RS16330':'toxin',
'EQU24_RS12820':'toxin',
'EQU24_RS12825':'toxin',
'EQU24_RS08850':'toxin',
'EQU24_RS08845':'toxin',
# 5152
'EQU24_RS19480':'5152',
'EQU24_RS19490':'5152',
'EQU24_RS19495':'5152',
'EQU24_RS19515':'5152',
'EQU24_RS19510':'5152',
'EQU24_RS19505':'5152',
'EQU24_RS19470':'5152',
'EQU24_RS19460':'5152',
'EQU24_RS19450':'5152',
# repressible no 5152
'EQU24_RS10650':'RepCurCu-no5152',
'EQU24_RS15800':'RepCurCu-no5152',
'EQU24_RS01900':'RepCurCu-no5152',
'EQU24_RS21005':'RepCurCu-no5152',
'EQU24_RS02325':'RepCurCu-no5152',
'EQU24_RS05885':'RepCurCu-no5152',
'EQU24_RS21000':'RepCurCu-no5152',
'EQU24_RS00670':'RepCurCu-no5152',
'EQU24_RS05870':'RepCurCu-no5152',
'EQU24_RS10665':'RepCurCu-no5152',
'EQU24_RS05880':'RepCurCu-no5152',
'EQU24_RS05905':'RepCurCu-no5152',
'EQU24_RS05915':'RepCurCu-no5152',
'EQU24_RS05920':'RepCurCu-no5152',
'EQU24_RS05925':'RepCurCu-no5152'
}
|
"""
107. Word Break
https://www.lintcode.com/problem/word-break/description?_from=ladder&&fromId=160
Memoization
"""
class Solution:
"""
@param: s: A string
@param: dict: A dictionary of words dict
@return: A boolean
"""
def wordBreak(self, s, dict):
# write your code here
if dict:
max_dict_word_length = max([len(x) for x in dict])
else:
max_dict_word_length = 0
return self.can_break(s, 0, dict, max_dict_word_length, {})
def can_break(self, s, i, dict, max_dict_word_length, memo):
if i in memo:
return memo[i]
if len(s) == i:
return True
for index in range(i, len(s)):
if index - i > max_dict_word_length:
break
if s[i:index + 1] not in dict:
continue
if self.can_break(s, index + 1, dict, max_dict_word_length, memo):
memo[i] = True
return memo[i]
return False
|
class Coordinate:
coordX = 0
coordY = 0
def __init__(self, coordX=0, coordY=0):
self.coordX = coordX
self.coordY = coordY
pass
def set(self, coordX, coordY):
self.coordX = coordX
self.coordY = coordY
return coordX, coordY
if __name__ == '__main__':
pass
|
apiAttachAvailable = u'API Kullanilabilir'
apiAttachNotAvailable = u'Kullanilamiyor'
apiAttachPendingAuthorization = u'Yetkilendirme Bekliyor'
apiAttachRefused = u'Reddedildi'
apiAttachSuccess = u'Basarili oldu'
apiAttachUnknown = u'Bilinmiyor'
budDeletedFriend = u'Arkadas Listesinden Silindi'
budFriend = u'Arkadas'
budNeverBeenFriend = u'Arkadas Listesinde Hi\xe7 Olmadi'
budPendingAuthorization = u'Yetkilendirme Bekliyor'
budUnknown = u'Bilinmiyor'
cfrBlockedByRecipient = u'\xc7agri alici tarafindan engellendi'
cfrMiscError = u'Diger Hata'
cfrNoCommonCodec = u'Genel codec yok'
cfrNoProxyFound = u'Proxy bulunamadi'
cfrNotAuthorizedByRecipient = u'Ge\xe7erli kullanici alici tarafindan yetkilendirilmemis'
cfrRecipientNotFriend = u'Alici bir arkadas degil'
cfrRemoteDeviceError = u'Uzak ses aygitinda problem var'
cfrSessionTerminated = u'Oturum sonlandirildi'
cfrSoundIOError = u'Ses G/\xc7 hatasi'
cfrSoundRecordingError = u'Ses kayit hatasi'
cfrUnknown = u'Bilinmiyor'
cfrUserDoesNotExist = u'Kullanici/telefon numarasi mevcut degil'
cfrUserIsOffline = u'\xc7evrim Disi'
chsAllCalls = u'Eski Diyalog'
chsDialog = u'Diyalog'
chsIncomingCalls = u'\xc7oklu Sohbet Kabul\xfc Gerekli'
chsLegacyDialog = u'Eski Diyalog'
chsMissedCalls = u'Diyalog'
chsMultiNeedAccept = u'\xc7oklu Sohbet Kabul\xfc Gerekli'
chsMultiSubscribed = u'\xc7oklu Abonelik'
chsOutgoingCalls = u'\xc7oklu Abonelik'
chsUnknown = u'Bilinmiyor'
chsUnsubscribed = u'Aboneligi Silindi'
clsBusy = u'Mesgul'
clsCancelled = u'Iptal Edildi'
clsEarlyMedia = u'Early Media y\xfcr\xfct\xfcl\xfcyor'
clsFailed = u'\xdczg\xfcn\xfcz, arama basarisiz!'
clsFinished = u'Bitirildi'
clsInProgress = u'Arama Yapiliyor'
clsLocalHold = u'Yerel Beklemede'
clsMissed = u'Cevapsiz Arama'
clsOnHold = u'Beklemede'
clsRefused = u'Reddedildi'
clsRemoteHold = u'Uzak Beklemede'
clsRinging = u'ariyor'
clsRouting = u'Y\xf6nlendirme'
clsTransferred = u'Bilinmiyor'
clsTransferring = u'Bilinmiyor'
clsUnknown = u'Bilinmiyor'
clsUnplaced = u'Asla baglanmadi'
clsVoicemailBufferingGreeting = u'Selamlama Ara Bellege Aliniyor'
clsVoicemailCancelled = u'Sesli Posta Iptal Edildi'
clsVoicemailFailed = u'Sesli Mesaj Basarisiz'
clsVoicemailPlayingGreeting = u'Selamlama Y\xfcr\xfct\xfcl\xfcyor'
clsVoicemailRecording = u'Sesli Mesaj Kaydediliyor'
clsVoicemailSent = u'Sesli Posta G\xf6nderildi'
clsVoicemailUploading = u'Sesli Posta Karsiya Y\xfckleniyor'
cltIncomingP2P = u'Gelen Esler Arasi Telefon \xc7agrisi'
cltIncomingPSTN = u'Gelen Telefon \xc7agrisi'
cltOutgoingP2P = u'Giden Esler Arasi Telefon \xc7agrisi'
cltOutgoingPSTN = u'Giden Telefon \xc7agrisi'
cltUnknown = u'Bilinmiyor'
cmeAddedMembers = u'Eklenen \xdcyeler'
cmeCreatedChatWith = u'Sohbet Olusturuldu:'
cmeEmoted = u'Bilinmiyor'
cmeLeft = u'Birakilan'
cmeSaid = u'Ifade'
cmeSawMembers = u'G\xf6r\xfclen \xdcyeler'
cmeSetTopic = u'Konu Belirleme'
cmeUnknown = u'Bilinmiyor'
cmsRead = u'Okundu'
cmsReceived = u'Alindi'
cmsSending = u'G\xf6nderiliyor...'
cmsSent = u'G\xf6nderildi'
cmsUnknown = u'Bilinmiyor'
conConnecting = u'Baglaniyor'
conOffline = u'\xc7evrim Disi'
conOnline = u'\xc7evrim I\xe7i'
conPausing = u'Duraklatiliyor'
conUnknown = u'Bilinmiyor'
cusAway = u'Uzakta'
cusDoNotDisturb = u'Rahatsiz Etmeyin'
cusInvisible = u'G\xf6r\xfcnmez'
cusLoggedOut = u'\xc7evrim Disi'
cusNotAvailable = u'Kullanilamiyor'
cusOffline = u'\xc7evrim Disi'
cusOnline = u'\xc7evrim I\xe7i'
cusSkypeMe = u'Skype Me'
cusUnknown = u'Bilinmiyor'
cvsBothEnabled = u'Video G\xf6nderme ve Alma'
cvsNone = u'Video Yok'
cvsReceiveEnabled = u'Video Alma'
cvsSendEnabled = u'Video G\xf6nderme'
cvsUnknown = u''
grpAllFriends = u'T\xfcm Arkadaslar'
grpAllUsers = u'T\xfcm Kullanicilar'
grpCustomGroup = u'\xd6zel'
grpOnlineFriends = u'\xc7evrimi\xe7i Arkadaslar'
grpPendingAuthorizationFriends = u'Yetkilendirme Bekliyor'
grpProposedSharedGroup = u'Proposed Shared Group'
grpRecentlyContactedUsers = u'Son Zamanlarda Iletisim Kurulmus Kullanicilar'
grpSharedGroup = u'Shared Group'
grpSkypeFriends = u'Skype Arkadaslari'
grpSkypeOutFriends = u'SkypeOut Arkadaslari'
grpUngroupedFriends = u'Gruplanmamis Arkadaslar'
grpUnknown = u'Bilinmiyor'
grpUsersAuthorizedByMe = u'Tarafimdan Yetkilendirilenler'
grpUsersBlockedByMe = u'Engellediklerim'
grpUsersWaitingMyAuthorization = u'Yetkilendirmemi Bekleyenler'
leaAddDeclined = u'Ekleme Reddedildi'
leaAddedNotAuthorized = u'Ekleyen Kisinin Yetkisi Olmali'
leaAdderNotFriend = u'Ekleyen Bir Arkadas Olmali'
leaUnknown = u'Bilinmiyor'
leaUnsubscribe = u'Aboneligi Silindi'
leaUserIncapable = u'Kullanicidan Kaynaklanan Yetersizlik'
leaUserNotFound = u'Kullanici Bulunamadi'
olsAway = u'Uzakta'
olsDoNotDisturb = u'Rahatsiz Etmeyin'
olsNotAvailable = u'Kullanilamiyor'
olsOffline = u'\xc7evrim Disi'
olsOnline = u'\xc7evrim I\xe7i'
olsSkypeMe = u'Skype Me'
olsSkypeOut = u'SkypeOut'
olsUnknown = u'Bilinmiyor'
smsMessageStatusComposing = u'Composing'
smsMessageStatusDelivered = u'Delivered'
smsMessageStatusFailed = u'Failed'
smsMessageStatusRead = u'Read'
smsMessageStatusReceived = u'Received'
smsMessageStatusSendingToServer = u'Sending to Server'
smsMessageStatusSentToServer = u'Sent to Server'
smsMessageStatusSomeTargetsFailed = u'Some Targets Failed'
smsMessageStatusUnknown = u'Unknown'
smsMessageTypeCCRequest = u'Confirmation Code Request'
smsMessageTypeCCSubmit = u'Confirmation Code Submit'
smsMessageTypeIncoming = u'Incoming'
smsMessageTypeOutgoing = u'Outgoing'
smsMessageTypeUnknown = u'Unknown'
smsTargetStatusAcceptable = u'Acceptable'
smsTargetStatusAnalyzing = u'Analyzing'
smsTargetStatusDeliveryFailed = u'Delivery Failed'
smsTargetStatusDeliveryPending = u'Delivery Pending'
smsTargetStatusDeliverySuccessful = u'Delivery Successful'
smsTargetStatusNotRoutable = u'Not Routable'
smsTargetStatusUndefined = u'Undefined'
smsTargetStatusUnknown = u'Unknown'
usexFemale = u'Kadin'
usexMale = u'Erkek'
usexUnknown = u'Bilinmiyor'
vmrConnectError = u'Baglanti Hatasi'
vmrFileReadError = u'Dosya Okuma Hatasi'
vmrFileWriteError = u'Dosya Yazma Hatasi'
vmrMiscError = u'Diger Hata'
vmrNoError = u'Hata Yok'
vmrNoPrivilege = u'Sesli Posta \xd6nceligi Yok'
vmrNoVoicemail = u'B\xf6yle Bir Sesli Posta Yok'
vmrPlaybackError = u'Y\xfcr\xfctme Hatasi'
vmrRecordingError = u'Kayit Hatasi'
vmrUnknown = u'Bilinmiyor'
vmsBlank = u'Bos'
vmsBuffering = u'Ara bellege aliniyor'
vmsDeleting = u'Siliniyor'
vmsDownloading = u'Karsidan Y\xfckleniyor'
vmsFailed = u'Basarisiz Oldu'
vmsNotDownloaded = u'Karsidan Y\xfcklenmedi'
vmsPlayed = u'Y\xfcr\xfct\xfcld\xfc'
vmsPlaying = u'Y\xfcr\xfct\xfcl\xfcyor'
vmsRecorded = u'Kaydedildi'
vmsRecording = u'Sesli Mesaj Kaydediliyor'
vmsUnknown = u'Bilinmiyor'
vmsUnplayed = u'Y\xfcr\xfct\xfclmemis'
vmsUploaded = u'Karsiya Y\xfcklendi'
vmsUploading = u'Karsiya Y\xfckleniyor'
vmtCustomGreeting = u'\xd6zel Selamlama'
vmtDefaultGreeting = u'Varsayilan Selamlama'
vmtIncoming = u'gelen sesli mesaj'
vmtOutgoing = u'Giden'
vmtUnknown = u'Bilinmiyor'
vssAvailable = u'Kullanilabilir'
vssNotAvailable = u'Kullanilamiyor'
vssPaused = u'Duraklatildi'
vssRejected = u'Reddedildi'
vssRunning = u'\xc7alisiyor'
vssStarting = u'Basliyor'
vssStopping = u'Durduruluyor'
vssUnknown = u'Bilinmiyor'
|
# Copyright (C) 2015-2016 Ammon Smith and Bradley Cai
# Available for use under the terms of the MIT License.
__all__ = [
'print_success',
'print_failure',
]
def print_success(target, usecolor, elapsed):
if usecolor:
start_color = '\033[32;4m'
end_color = '\033[0m'
else:
start_color = ''
end_color = ''
print("%sTarget '%s' ran successfully in %.4f seconds.%s" %
(start_color, target, elapsed, end_color))
def print_failure(target, usecolor, ending):
if usecolor:
start_color = '\033[31;4m'
end_color = '\033[0m'
else:
start_color = ''
end_color = ''
print("%sTarget '%s' was unsuccessful%s%s" %
(start_color, target, ending, end_color))
|
#
# PySNMP MIB module IANA-GMPLS-TC-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IANA-GMPLS-TC-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:19:44 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)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
ObjectIdentity, Counter32, Gauge32, TimeTicks, mib_2, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, iso, Integer32, ModuleIdentity, Bits, NotificationType, Unsigned32, IpAddress, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "Counter32", "Gauge32", "TimeTicks", "mib-2", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "iso", "Integer32", "ModuleIdentity", "Bits", "NotificationType", "Unsigned32", "IpAddress", "Counter64")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
ianaGmpls = ModuleIdentity((1, 3, 6, 1, 2, 1, 152))
ianaGmpls.setRevisions(('2015-11-04 00:00', '2015-09-22 00:00', '2014-05-09 00:00', '2014-03-11 00:00', '2013-12-16 00:00', '2013-11-04 00:00', '2013-10-14 00:00', '2013-10-10 00:00', '2013-10-09 00:00', '2010-04-13 00:00', '2010-02-22 00:00', '2010-02-19 00:00', '2007-02-27 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ianaGmpls.setRevisionsDescriptions(('Updated description for Switching Type 151.', 'Added Switching Type 151.', 'Fixed typographical error that interfered with compilation.', 'Added Administrative Status Information Flags 23-24.', 'Added Switching Type 110.', 'Added missing value 40 to IANAGmplsSwitchingTypeTC.', 'Restored names,added comments for G-PIDs 47, 56; updated IANA contact info.', 'Deprecated 2-4 in IANAGmplsSwitchingTypeTC, added registry reference.', 'Added Generalized PIDs 59-70 and changed names for 47, 56.', 'Added LSP Encoding Type tunnelLine(14), Switching Type evpl(30).', 'Added missing Administrative Status Information Flags 25, 26, and 28.', 'Added dcsc(125).', 'Initial version issued as part of RFC 4802.',))
if mibBuilder.loadTexts: ianaGmpls.setLastUpdated('201511040000Z')
if mibBuilder.loadTexts: ianaGmpls.setOrganization('IANA')
if mibBuilder.loadTexts: ianaGmpls.setContactInfo('Internet Assigned Numbers Authority Postal: 12025 Waterfront Drive, Suite 300 Los Angeles, CA 90094 Tel: +1 310 301-5800 E-Mail: iana&iana.org')
if mibBuilder.loadTexts: ianaGmpls.setDescription('Copyright (C) The IETF Trust (2007). The initial version of this MIB module was published in RFC 4802. For full legal notices see the RFC itself. Supplementary information may be available on: http://www.ietf.org/copyrights/ianamib.html')
class IANAGmplsLSPEncodingTypeTC(TextualConvention, Integer32):
reference = '1. Generalized Multi-Protocol Label Switching (GMPLS) Signaling Functional Description, RFC 3471, section 3.1.1. 2. Generalized MPLS Signalling Extensions for G.709 Optical Transport Networks Control, RFC 4328, section 3.1.1.'
description = 'This type is used to represent and control the LSP encoding type of an LSP signaled by a GMPLS signaling protocol. This textual convention is strongly tied to the LSP Encoding Types sub-registry of the GMPLS Signaling Parameters registry managed by IANA. Values should be assigned by IANA in step with the LSP Encoding Types sub-registry and using the same registry management rules. However, the actual values used in this textual convention are solely within the purview of IANA and do not necessarily match the values in the LSP Encoding Types sub-registry. The definition of this textual convention with the addition of newly assigned values is published periodically by the IANA, in either the Assigned Numbers RFC, or some derivative of it specific to Internet Network Management number assignments. (The latest arrangements can be obtained by contacting the IANA.) Requests for new values should be made to IANA via email (iana&iana.org).'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 5, 7, 8, 9, 11, 12, 13, 14))
namedValues = NamedValues(("tunnelLspNotGmpls", 0), ("tunnelLspPacket", 1), ("tunnelLspEthernet", 2), ("tunnelLspAnsiEtsiPdh", 3), ("tunnelLspSdhSonet", 5), ("tunnelLspDigitalWrapper", 7), ("tunnelLspLambda", 8), ("tunnelLspFiber", 9), ("tunnelLspFiberChannel", 11), ("tunnelDigitalPath", 12), ("tunnelOpticalChannel", 13), ("tunnelLine", 14))
class IANAGmplsSwitchingTypeTC(TextualConvention, Integer32):
reference = '1. Routing Extensions in Support of Generalized Multi-Protocol Label Switching, RFC 4202, section 2.4. 2. Generalized Multi-Protocol Label Switching (GMPLS) Signaling Functional Description, RFC 3471, section 3.1.1. 3. Revised Definition of The GMPLS Switching Capability and Type Fields, RFC7074, section 5.'
description = 'This type is used to represent and control the LSP switching type of an LSP signaled by a GMPLS signaling protocol. This textual convention is strongly tied to the Switching Types sub-registry of the GMPLS Signaling Parameters registry managed by IANA. Values should be assigned by IANA in step with the Switching Types sub-registry and using the same registry management rules. However, the actual values used in this textual convention are solely within the purview of IANA and do not necessarily match the values in the Switching Types sub-registry. The definition of this textual convention with the addition of newly assigned values is published periodically by the IANA, in either the Assigned Numbers RFC, or some derivative of it specific to Internet Network Management number assignments. (The latest arrangements can be obtained by contacting the IANA.) Requests for new values should be made to IANA via email (iana&iana.org).'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 30, 40, 51, 100, 110, 125, 150, 151, 200))
namedValues = NamedValues(("unknown", 0), ("psc1", 1), ("psc2", 2), ("psc3", 3), ("psc4", 4), ("evpl", 30), ("pbb", 40), ("l2sc", 51), ("tdm", 100), ("otntdm", 110), ("dcsc", 125), ("lsc", 150), ("wsonlsc", 151), ("fsc", 200))
class IANAGmplsGeneralizedPidTC(TextualConvention, Integer32):
reference = '1. Generalized Multi-Protocol Label Switching (GMPLS) Signaling Functional Description, RFC 3471, section 3.1.1. 2. Generalized MPLS Signalling Extensions for G.709 Optical Transport Networks Control, RFC 4328, section 3.1.3. 3. Generalized Multi-Protocol Label Switching (GMPLS) Signaling Extensions for the evolving G.709 Optical Transport Networks Control,[RFC7139], sections 4 and 11.'
description = 'This data type is used to represent and control the LSP Generalized Protocol Identifier (G-PID) of an LSP signaled by a GMPLS signaling protocol. This textual convention is strongly tied to the Generalized PIDs (G-PID) sub-registry of the GMPLS Signaling Parameters registry managed by IANA. Values should be assigned by IANA in step with the Generalized PIDs (G-PID) sub-registry and using the same registry management rules. However, the actual values used in this textual convention are solely within the purview of IANA and do not necessarily match the values in the Generalized PIDs (G-PID) sub-registry. The definition of this textual convention with the addition of newly assigned values is published periodically by the IANA, in either the Assigned Numbers RFC, or some derivative of it specific to Internet Network Management number assignments. (The latest arrangements can be obtained by contacting the IANA.) Requests for new values should be made to IANA via email (iana&iana.org).'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70))
namedValues = NamedValues(("unknown", 0), ("asynchE4", 5), ("asynchDS3T3", 6), ("asynchE3", 7), ("bitsynchE3", 8), ("bytesynchE3", 9), ("asynchDS2T2", 10), ("bitsynchDS2T2", 11), ("reservedByRFC3471first", 12), ("asynchE1", 13), ("bytesynchE1", 14), ("bytesynch31ByDS0", 15), ("asynchDS1T1", 16), ("bitsynchDS1T1", 17), ("bytesynchDS1T1", 18), ("vc1vc12", 19), ("reservedByRFC3471second", 20), ("reservedByRFC3471third", 21), ("ds1SFAsynch", 22), ("ds1ESFAsynch", 23), ("ds3M23Asynch", 24), ("ds3CBitParityAsynch", 25), ("vtLovc", 26), ("stsSpeHovc", 27), ("posNoScramble16BitCrc", 28), ("posNoScramble32BitCrc", 29), ("posScramble16BitCrc", 30), ("posScramble32BitCrc", 31), ("atm", 32), ("ethernet", 33), ("sdhSonet", 34), ("digitalwrapper", 36), ("lambda", 37), ("ansiEtsiPdh", 38), ("lapsSdh", 40), ("fddi", 41), ("dqdb", 42), ("fiberChannel3", 43), ("hdlc", 44), ("ethernetV2DixOnly", 45), ("ethernet802dot3Only", 46), ("g709ODUj", 47), ("g709OTUk", 48), ("g709CBRorCBRa", 49), ("g709CBRb", 50), ("g709BSOT", 51), ("g709BSNT", 52), ("gfpIPorPPP", 53), ("gfpEthernetMAC", 54), ("gfpEthernetPHY", 55), ("g709ESCON", 56), ("g709FICON", 57), ("g709FiberChannel", 58), ("framedGFP", 59), ("sTM1", 60), ("sTM4", 61), ("infiniBand", 62), ("sDI", 63), ("sDI1point001", 64), ("dVBASI", 65), ("g709ODU125G", 66), ("g709ODUAny", 67), ("nullTest", 68), ("randomTest", 69), ("sixtyfourB66BGFPFEthernet", 70))
class IANAGmplsAdminStatusInformationTC(TextualConvention, Bits):
reference = '1. Generalized Multi-Protocol Label Switching (GMPLS) Signaling Functional Description, RFC 3471, section 8. 2. Generalized MPLS Signaling - RSVP-TE Extensions, RFC 3473, section 7. 3. GMPLS - Communication of Alarm Information, RFC 4783, section 3.2.1.'
description = 'This data type determines the setting of the Admin Status flags in the Admin Status object or TLV, as described in RFC 3471. Setting this object to a non-zero value will result in the inclusion of the Admin Status object or TLV on signaling messages. This textual convention is strongly tied to the Administrative Status Information Flags sub-registry of the GMPLS Signaling Parameters registry managed by IANA. Values should be assigned by IANA in step with the Administrative Status Flags sub-registry and using the same registry management rules. However, the actual values used in this textual convention are solely within the purview of IANA and do not necessarily match the values in the Administrative Status Information Flags sub-registry. The definition of this textual convention with the addition of newly assigned values is published periodically by the IANA, in either the Assigned Numbers RFC, or some derivative of it specific to Internet Network Management number assignments. (The latest arrangements can be obtained by contacting the IANA.) Requests for new values should be made to IANA via email (iana&iana.org).'
status = 'current'
namedValues = NamedValues(("reflect", 0), ("reserved1", 1), ("reserved2", 2), ("reserved3", 3), ("reserved4", 4), ("reserved5", 5), ("reserved6", 6), ("reserved7", 7), ("reserved8", 8), ("reserved9", 9), ("reserved10", 10), ("reserved11", 11), ("reserved12", 12), ("reserved13", 13), ("reserved14", 14), ("reserved15", 15), ("reserved16", 16), ("reserved17", 17), ("reserved18", 18), ("reserved19", 19), ("reserved20", 20), ("reserved21", 21), ("reserved22", 22), ("oamFlowsEnabled", 23), ("oamAlarmsEnabled", 24), ("handover", 25), ("lockout", 26), ("inhibitAlarmCommunication", 27), ("callControl", 28), ("testing", 29), ("administrativelyDown", 30), ("deleteInProgress", 31))
mibBuilder.exportSymbols("IANA-GMPLS-TC-MIB", IANAGmplsSwitchingTypeTC=IANAGmplsSwitchingTypeTC, IANAGmplsLSPEncodingTypeTC=IANAGmplsLSPEncodingTypeTC, IANAGmplsAdminStatusInformationTC=IANAGmplsAdminStatusInformationTC, PYSNMP_MODULE_ID=ianaGmpls, ianaGmpls=ianaGmpls, IANAGmplsGeneralizedPidTC=IANAGmplsGeneralizedPidTC)
|
'''
int():将一个数值或字符串转换成整数,可以指定进制。
float():将一个字符串转换成浮点数。
str():将指定的对象转换成字符串形式,可以指定编码。
chr():将整数转换成该编码对应的字符串(一个字符)。
ord():将字符串(一个字符)转换成对应的编码(整数)。
'''
a = 76
b = 'y'
print(int(a))
print(float(a))
print(str(a))
print(chr(a))
print(ord(b))
|
"""
Faça um programa que leia 3 números e fale qual é o maior e qual é o menor
"""
num1 = int(input('Digite o número 1: '))
num2 = int(input('Digite o número 2: '))
num3 = int(input('Digite o número 3: '))
menor = num1
if num2 < num1 and num2 <num3:
menor = num2
if num3 < num1 and num3 < num2:
menor = num3
maior = num1
if num2 > num1 and num2 > num3:
maior = num2
if num3 > num1 and num3 > num2:
maior = num3
print('\nO menor número é {}. '. format(menor))
print('O maior número é {}. '.format(maior))
|
letters = ["a", "e", "t", "o", "u"]
word = "CreepyNuts"
if (word[1] in letters) and (word[6] in letters):
print(0)
elif (word[1] in letters) or (word[6] in letters):
print(1)
else:
print(2)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 - hongzhi.wang <hongzhi.wang@moji.com>
'''
Author: hongzhi.wang
Create Date: 2019-09-04
Modify Date: 2019-09-04
'''
|
def parse_input(file):
return [[int(h) for h in l] for l in open(file).read().splitlines()]
input = parse_input('./day 09/Xavier - Python/input.txt')
example = parse_input('./day 09/Xavier - Python/example.txt')
def get_neighbours(map,i,j):
neighbours = []
if i > 0:
neighbours.append((i-1,j))
if i < len(map)-1:
neighbours.append((i+1,j))
if j > 0:
neighbours.append((i,j-1))
if j < len(map[i])-1:
neighbours.append((i,j+1))
return neighbours
def low_points(map):
low_points = []
for i in range(len(map)):
for j in range(len(map[i])):
if map[i][j] < min([map[i][j] for i,j in get_neighbours(map, i , j)]):
low_points.append((i,j))
return low_points
lp_ex = low_points(example)
lp_in = low_points(input)
assert len(lp_ex)+sum([example[i][j] for i,j in lp_ex]) == 15
print(len(lp_in)+sum([input[i][j] for i,j in lp_in]))
def expand(map, point):
points = {point}
neighbours = get_neighbours(map, *point)
for n in neighbours:
if not map[n[0]][n[1]] == 9 and map[n[0]][n[1]] > map[point[0]][point[1]]:
points = points.union(expand(map, n))
return points
def part_two(map, low_points):
sizes = []
for p in low_points:
basin = expand(map, p)
sizes.append(len(basin))
sizes.sort(reverse=True)
return sizes[0]*sizes[1]*sizes[2]
assert part_two(example, lp_ex) == 1134
print(part_two(input, lp_in))
|
_base_ = ['./mask_rcnn_r50_8x2_1x.py']
model = dict(roi_head=dict(type='BTRoIHead',
bbox_head=dict(type='Shared2FCCBBoxHeadBT',
loss_cls=dict(type="EQLv2"),
loss_opl=dict(
type='OrthogonalProjectionLoss', loss_weight=0.0),
loss_bt=dict(
type='BarlowTwinLoss', loss_weight=1.0),
)))
data = dict(train=dict(oversample_thr=1e-3))
# test_cfg = dict(rcnn=dict(max_per_img=800))
# train_cfg = dict(rcnn=dict(sampler=dict(pos_fraction=0.5)))
work_dir = 'bt_1x_rfs'
|
# -*- coding: utf-8 -*-
# System
SYSTEM_LANGUAGE_KEY = 'System/Language'
SYSTEM_THEME_KEY = 'System/Theme'
SYSTEM_THEME_DEFAULT = 'System'
# File
FILE_SAVE_TO_DIR_KEY = 'File/SaveToDir'
FILE_SAVE_TO_DIR_DEFAULT = ''
FILE_FILENAME_PREFIX_FORMAT_KEY = 'File/FilenamePrefixFormat'
FILE_FILENAME_PREFIX_FORMAT_DEFAULT = '{id}_{year}_{author}_{title}'
FILE_OVERWRITE_EXISTING_FILE_KEY = 'File/OverwriteExistingFile'
FILE_OVERWRITE_EXISTING_FILE_DEFAULT = False
# Network
NETWORK_SCIHUB_URL_KEY = 'Network/SciHubURL'
NETWORK_SCIHUB_URL_DEFAULT = 'https://sci-hub.se'
NETWORK_SCIHUB_URLS_KEY = 'Network/SciHubURLs'
NETWORK_SCIHUB_URLS_DEFAULT = ['https://sci-hub.se', 'https://sci-hub.st']
NETWORK_TIMEOUT_KEY = 'Network/Timeout'
NETWORK_TIMEOUT_DEFAULT = 3000
NETWORK_RETRY_TIMES_KEY = 'Network/RetryTimes'
NETWORK_RETRY_TIMES_DEFAULT = 3
NETWORK_PROXY_ENABLE_KEY = 'Network/ProxyEnable'
NETWORK_PROXY_ENABLE_DEFAULT = False
NETWORK_PROXY_TYPE_KEY = 'Network/ProxyType'
NETWORK_PROXY_TYPE_DEFAULT = 'http'
NETWORK_PROXY_HOST_KEY = 'Network/ProxyHost'
NETWORK_PROXY_HOST_DEFAULT = '127.0.0.1'
NETWORK_PROXY_PORT_KEY = 'Network/ProxyPort'
NETWORK_PROXY_PORT_DEFAULT = '7890'
NETWORK_PROXY_USERNAME_KEY = 'Network/ProxyUsername'
NETWORK_PROXY_USERNAME_DEFAULT = ''
NETWORK_PROXY_PASSWORD_KEY = 'Network/ProxyPassword'
NETWORK_PROXY_PASSWORD_DEFAULT = ''
|
#Get roll numbers, name & marks of the students of a class(get from user) and store these details in a file- marks.txt
count = int(input("How many students are there in class? "))
fileObj = open('marks.txt',"w")
for i in range(count):
print("Enter details for student",(i+1),"below:")
rollNo = int(input("Rollno: "))
name = input("Name: ")
marks = float(input("Marks: "))
records = str(rollNo) + "," + name + "," + str(marks) + '\n'
fileObj.write(records)
fileObj.close()
|
# -*- coding: utf-8 -*-
"""Untitled1.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1W2P2nxzaV_t_ePeJDnZMmbLkhvRxqZaF
"""
#used for quick sort algo
#pivot is taken as last element
def lomutoPartition(arr,l,h):
pivot=arr[h]
i=l-1
for j in range(l,h):
if arr[j]<pivot:
i=i+1
arr[i],arr[j]=arr[j],arr[i]
arr[i+1],arr[h]=arr[h],arr[i+1]
return i+1
def qsort(arr,l,h):
if l<h:
p=lomutoPartition(arr,l,h)
qsort(arr,l,p-1)
qsort(arr,p+1,h)
#divercode
arr=[10,3,4,29,5,51]
l=0
h=len(arr)-1
qsort(arr,l,h)
|
# id: 640;Stairs
# title:"Schody",
# about:"",
# robotCol:3,
# robotRow:10,
# robotDir:3,
# subs:[3,3,0,0,0],
# allowedCommands:0,
# board:" ggggggggGG gggggggGGg ggggggGGgg gggggGGggg ggggGGgggg gggGGggggg ggGGgggggg gGGggggggg GGgggggggg gggggggggg "
class Problem:
def __init__(self, parse_str):
gen = self.__lineGenerator(parse_str)
self.id = next(gen)
self.title = next(gen)
self.about = next(gen)
self.robotCol = (int)(next(gen))
self.robotRow = (int)(next(gen))
self.robotDir = (int)(next(gen))
self.subs = next(gen)
self.allowedCommands = (int)(next(gen))
self.board_str = next(gen)
def getBoardCopy(self):
arr = [self.board_str[i:i+16] for i in range(0, 16*12, 16)]
return arr
def getFlowerCount(self):
return self.board_str.count("R") + self.board_str.count("G") + self.board_str.count("B")
def getFirstId(self):
arr = self.id.split(';')
if len(arr) == 1:
return self.id.zfill(4)
else:
return arr[0].zfill(4)
def __lineGenerator(self, parse_str):
for line in parse_str.splitlines():
if len(line) == 0:
continue
line = line.strip()
if line[-1] == ',':
line = line[:-1]
arr = line.split(':')
yield arr[1].strip().replace('"', "")
|
class DSU:
def __init__(self, N):
self.par = list(range(N))
def find(self, U):
if self.par[U] != U:
self.par[U] = self.find(self.par[U])
return self.par[U]
def union(self, U, V):
X, Y = self.find(U), self.find(V)
self.par[X] = Y
class Solution:
def factors(self, n):
for i in range(2, int(math.sqrt(n))+1):
if n % i == 0:
return self.factors(n//i) | set([i])
return set([n])
def largestComponentSize(self, A: List[int]) -> int:
n = len(A)
uf = DSU(n)
factor = defaultdict(list)
for i, num in enumerate(A):
fct = self.factors(num)
for f in fct:
factor[f].append(i)
for k, ind in factor.items():
for i in range(len(ind)-1):
uf.union(ind[i], ind[i+1])
return max(Counter([uf.find(i) for i in range(n)]).values())
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 29 09:58:39 2018
@author: nsde
"""
#%%
#%%
def tf_mahalanobisTransformer(X, scope='mahalanobis_transformer'):
""" Creates a transformer function that for an given input matrix X,
calculates the linear transformation L*X_i """
with tf.variable_scope(scope, reuse=tf.AUTO_REUSE, values=[X]):
X = tf.cast(X, tf.float32)
L = tf.get_variable("L", initializer=np.eye(50, 50, dtype=np.float32))
return tf.matmul(X, L)
#%%
def tf_convTransformer(X, scope='conv_transformer'):
""" Creates a transformer function that for an given input tensor X,
computes the convolution of that tensor with some weights W. """
with tf.variable_scope(scope, reuse=tf.AUTO_REUSE, values=[X]):
X = tf.cast(X, tf.float32)
W = tf.get_variable("W", initializer=np.random.normal(size=(3,3,1,10)).astype('float32'))
return tf.nn.conv2d(X, W, strides=[1,1,1,1], padding="VALID")
#%%
def keras_mahalanobisTransformer(X, scope='mahalanobis_transformer'):
X = tf.cast(X, tf.float32)
with tf.variable_scope(scope, reuse=tf.AUTO_REUSE, values=[X]):
S = Sequential()
S.add(InputLayer(input_shape=(50,)))
S.add(Dense(50, use_bias=False, kernel_initializer='identity'))
return S.call(X)
#%%
if __name__ == '__main__':
# Make sure that variables are shared
X=tf.cast(np.random.normal(size=(100,50)), tf.float32)
tr = KerasTransformer(input_shape=(50,))
tr.add(Dense(50, use_bias=False, kernel_initializer='identity'))
tr.add(Dense(20, use_bias=False, kernel_initializer='identity'))
tr.add(Dense(10, use_bias=False, kernel_initializer='identity'))
trans_func1 = tr.get_function()
res1=trans_func1(X)
res2=trans_func1(X)
# Check that we only have created three variables
for w in tf.trainable_variables():
print(w)
#%%
def tf_pairwiseMahalanobisDistance2(X1, X2, L):
'''
For a given mahalanobis distance parametrized by L, find the pairwise
squared distance between all observations in matrix X1 and matrix X2.
Input
X1: N x d matrix, each row being an observation
X2: M x d matrix, each row being an observation
L: d x d matrix
Output
D: N x M matrix, with squared distances
'''
with tf.name_scope('pairwiseMahalanobisDistance2'):
X1, X2 = tf.cast(X1, tf.float32), tf.cast(X2, tf.float32)
X1L = tf.matmul(X1, L)
X2L = tf.matmul(X2, L)
term1 = tf.pow(tf.norm(X1L, axis=1),2.0)
term2 = tf.pow(tf.norm(X2L, axis=1),2.0)
term3 = 2.0*tf.matmul(X1L, tf.transpose(X2L))
return tf.transpose(tf.maximum(tf.cast(0.0, dtype=X1L.dtype),
term1 + tf.transpose(term2 - term3)))
#%%
def tf_mahalanobisTransformer(X, L):
''' Transformer for the mahalanobis distance '''
with tf.name_scope('mahalanobisTransformer'):
X, L = tf.cast(X, tf.float32), tf.cast(L, tf.float32)
return tf.matmul(X, L)
#%%
def tf_pairwiseConvDistance2(X1, X2, W):
'''
For a given set of convolutional weights W, calculate the convolution
with tensor X1 and X2 and then calculates the pairwise squared distance
(euclidean) between conv features
Input
X: N x h x w x c tensor, each slice being an image
Y: M x h x w x c tensor, each slice being an image
W: f1 x f2 x c x nf tensor, where f1, f2 are the filter sizes and
nf is the number of filters
Output
D: N x M matrix, with squared conv distances
'''
with tf.name_scope('pairwiseConvDistance2'):
X1, X2 = tf.cast(X1, tf.float32), tf.cast(X2, tf.float32)
N, M = tf.shape(X1)[0], tf.shape(X2)[0]
n_filt = tf.shape(W)[3]
convX1 = tf.nn.conv2d(X1, W, strides=[1,1,1,1], padding='SAME') # N x height x width x n_filt
convX2 = tf.nn.conv2d(X2, W, strides=[1,1,1,1], padding='SAME') # M x height x width x n_filt
convX1_perm = tf.transpose(convX1, perm=[3,0,1,2]) # n_filt x N x height x width
convX2_perm = tf.transpose(convX2, perm=[3,0,1,2]) # n_filt x M x height x width
convX1_resh = tf.reshape(convX1_perm, (n_filt, N, -1)) # n_filt x N x (height*width)
convX2_resh = tf.reshape(convX2_perm, (n_filt, M, -1)) # n_filt x M x (height*width)
term1 = tf.expand_dims(tf.pow(tf.norm(convX1_resh, axis=2), 2.0), 2) # n_filt x N x 1
term2 = tf.expand_dims(tf.pow(tf.norm(convX2_resh, axis=2), 2.0), 1) # n_filt x 1 x M
term3 = 2.0*tf.matmul(convX1_resh, tf.transpose(convX2_resh, perm=[0,2,1])) # n_filt x N x M
summ = term1 + term2 - term3 # n_filt x N x M
return tf.maximum(tf.cast(0.0, tf.float32), tf.reduce_sum(summ, axis=0)) # N x M
#%%
def tf_convTransformer(X, W):
''' Transformer for the conv distance '''
with tf.name_scope('convTransformer'):
X, W = tf.cast(X, tf.float32), tf.cast(W, tf.float32)
return tf.nn.conv2d(X, W, strides=[1,1,1,1], padding='SAME')
#%%
def tf_nonlin_pairwiseConvDistance2(X1, X2, W):
'''
For a given set of convolutional weights W, calculate the convolution
with tensor X1 and X2 and then calculates the pairwise squared distance
(euclidean) between conv features
Input
X: N x h x w x c tensor, each slice being an image
Y: M x h x w x c tensor, each slice being an image
W: f1 x f2 x c x nf tensor, where f1, f2 are the filter sizes and
nf is the number of filters
Output
D: N x M matrix, with squared conv distances
'''
with tf.name_scope('pairwiseConvDistance2'):
X1, X2 = tf.cast(X1, tf.float32), tf.cast(X2, tf.float32)
N, M = tf.shape(X1)[0], tf.shape(X2)[0]
n_filt = tf.shape(W)[3]
convX1 = tf.nn.conv2d(X1, W, strides=[1,1,1,1], padding='SAME') # N x height x width x n_filt
convX2 = tf.nn.conv2d(X2, W, strides=[1,1,1,1], padding='SAME') # M x height x width x n_filt
convX1 = tf.nn.relu(convX1)
convX2 = tf.nn.relu(convX2)
convX1_perm = tf.transpose(convX1, perm=[3,0,1,2]) # n_filt x N x height x width
convX2_perm = tf.transpose(convX2, perm=[3,0,1,2]) # n_filt x M x height x width
convX1_resh = tf.reshape(convX1_perm, (n_filt, N, -1)) # n_filt x N x (height*width)
convX2_resh = tf.reshape(convX2_perm, (n_filt, M, -1)) # n_filt x M x (height*width)
term1 = tf.expand_dims(tf.pow(tf.norm(convX1_resh, axis=2), 2.0), 2) # n_filt x N x 1
term2 = tf.expand_dims(tf.pow(tf.norm(convX2_resh, axis=2), 2.0), 1) # n_filt x 1 x M
term3 = 2.0*tf.matmul(convX1_resh, tf.transpose(convX2_resh, perm=[0,2,1])) # n_filt x N x M
summ = term1 + term2 - term3 # n_filt x N x M
return tf.maximum(tf.cast(0.0, tf.float32), tf.reduce_sum(summ, axis=0)) # N x M
#%%
def tf_nonlin_convTransformer(X, W):
''' Transformer for the conv distance '''
with tf.name_scope('convTransformer'):
X, W = tf.cast(X, tf.float32), tf.cast(W, tf.float32)
return tf.nn.relu(tf.nn.conv2d(X, W, strides=[1,1,1,1], padding='SAME'))
#%%
def tf_mode(array):
''' Find the mode of the input array. Expects 1D array '''
with tf.name_scope('mode'):
unique, _, count = tf.unique_with_counts(array)
max_idx = tf.argmax(count, axis=0)
return unique[max_idx]
|
nome = ' Pedro da Silva Moreira'
nomeSeparado = nome.split()
print('O primeiro nome é:')
print(nomeSeparado[0])
#assim
print('O último nome é:')
print(nomeSeparado[-1])
#ou assim
print('O último nome é:')
print(nomeSeparado[len(nomeSeparado)-1])
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
# simple dictionary
mybasket = {'apple':2.99,'orange':1.99,'milk':5.8}
print(mybasket['apple'])
# dictionary with list inside
mynestedbasket = {'apple':2.99,'orange':1.99,'milk':['chocolate','stawbery']}
print(mynestedbasket['milk'][1].upper())
# append more key
mybasket['pizza'] = 4.5
print(mybasket)
# get only keys
print(mybasket.keys())
# get only values
print(mybasket.values())
# get pair values
print(mybasket.items())
|
class Solution:
def islandPerimeter(self, grid: List[List[int]]) -> int:
if not grid or not grid[0]:
return 0
for i in range(len(grid)):
for j in range(len(grid[0])):
if grid[i][j]:
return self.dfs(grid, i, j)
return 0
def dfs(self, grid, i, j):
if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]):
return 1
if grid[i][j] == -1:
return 0
if grid[i][j]:
grid[i][j] = -1
return self.dfs(grid, i + 1, j) + self.dfs(
grid, i, j + 1) + self.dfs(grid, i - 1, j) + self.dfs(
grid, i, j - 1)
else:
return 1
|
class Solution:
def addBinary(self, a, b):
res, carry = '', 0
i, j = len(a) - 1, len(b) - 1
while i >= 0 or j >= 0 or carry:
curval = (i >= 0 and a[i] == '1') + (j >= 0 and b[j] == '1')
carry, rem = divmod(curval + carry, 2)
res = str(rem) + res
i -= 1
j -= 1
return res
|
#this function would write data in the database
def write_data(name, phone, pincode, city, resources):
#here we will connect to database
#and write to it
f = open('/Users/mukesht/Mukesh/Github/covid_resource/resource_item.text', 'a')
f.write(name + ', ' + phone + ', ' + pincode + ', ' + city + ', [' + resources + ']\n')
f.close()
write_data("Hello World", "657254762", "232101", "Mughalsarai", "[ Oxygen, Vaccine ]")
|
def validate(n):
string = str(n)
mod = 0 if len(string) % 2 == 0 else 1 # 0 for even, 1 for odd
total = 0
for i, a in enumerate(string):
current = int(a)
if i % 2 == mod:
double = current * 2
if double > 9:
total += double - 9
else:
total += double
else:
total += current
return total % 10 == 0
|
expected_output = {
"interfaces": {
"Port-channel1": {
"name": "Port-channel1",
"protocol": "lacp",
"members": {
"GigabitEthernet0/0/1": {
"activity": "Active",
"age": 18,
"aggregatable": True,
"collecting": True,
"defaulted": False,
"distributing": True,
"expired": False,
"flags": "FA",
"interface": "GigabitEthernet0/0/1",
"lacp_port_priority": 100,
"oper_key": 1,
"port_num": 2,
"port_state": 63,
"synchronization": True,
"system_id": "00127,6487.88ff.68ef",
"timeout": "Short",
},
"GigabitEthernet0/0/7": {
"activity": "Active",
"age": 0,
"aggregatable": True,
"collecting": False,
"defaulted": False,
"distributing": False,
"expired": False,
"flags": "FA",
"interface": "GigabitEthernet0/0/7",
"lacp_port_priority": 200,
"oper_key": 1,
"port_num": 1,
"port_state": 15,
"synchronization": True,
"system_id": "00127,6487.88ff.68ef",
"timeout": "Short",
},
},
}
}
}
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
inputs = [
"LLLRLLULLDDLDUDRDDURLDDRDLRDDRUULRULLLDLUURUUUDLUUDLRUDLDUDURRLDRRRUULUURLUDRURULRLRLRRUULRUUUDRRDDRLLLDDLLUDDDLLRLLULULRRURRRLDRLDLLRURDULLDULRUURLRUDRURLRRDLLDDURLDDLUDLRLUURDRDRDDUURDDLDDDRUDULDLRDRDDURDLUDDDRUDLUDLULULRUURLRUUUDDRLDULLLUDLULDUUDLDLRRLLLRLDUDRUULDLDRDLRRDLDLULUUDRRUDDDRDLRLDLRDUDRULDRDURRUULLUDURURUUDRDRLRRDRRDRDDDDLLRURULDURDLUDLUULDDLLLDULUUUULDUDRDURLURDLDDLDDUULRLUUDLDRUDRURURRDDLURURDRLRLUUUURLLRR",
"UUUUURRRURLLRRDRLLDUUUUDDDRLRRDRUULDUURURDRLLRRRDRLLUDURUDLDURURRLUDLLLDRDUDRDRLDRUDUDDUULLUULLDUDUDDRDUUUDLULUDUULLUUULURRUDUULDUDDRDURRLDDURLRDLULDDRUDUDRDULLRLRLLUUDDURLUUDLRUUDDLLRUURDUDLLDRURLDURDLRDUUDLRLLRLRURRUDRRLRDRURRRUULLUDLDURDLDDDUUDRUUUDULLLRDRRDRLURDDRUUUDRRUUDLUDDDRRRRRLRLDLLDDLRDURRURLLLULURULLULRLLDDLDRLDULLDLDDDRLUDDDUDUDRRLRDLLDULULRLRURDLUDDLRUDRLUURRURDURDRRDRULUDURRLULUURDRLDLRUDLUDRURLUDUUULRRLRRRULRRRLRLRLULULDRUUDLRLLRLLLURUUDLUDLRURUDRRLDLLULUDRUDRLLLRLLDLLDUDRRURRLDLUUUURDDDUURLLRRDRUUURRRDRUDLLULDLLDLUDRRDLLDDLDURLLDLLDLLLDR",
"LRDULUUUDLRUUUDURUUULLURDRURDRRDDDLRLRUULDLRRUDDLLUURLDRLLRUULLUDLUDUDRDRDLUUDULLLLRDDUDRRRURLRDDLRLDRLULLLRUUULURDDLLLLRURUUDDDLDUDDDDLLLURLUUUURLRUDRRLLLUUULRDUURDLRDDDUDLLRDULURURUULUDLLRRURDLUULUUDULLUDUUDURLRULRLLDLUULLRRUDDULRULDURRLRRLULLLRRDLLDDLDUDDDUDLRUURUDUUUDDLRRDLRUDRLLRDRDLURRLUDUULDRRUDRRUDLLLLRURRRRRUULULLLRDRDUDRDDURDLDDUURRURLDRRUDLRLLRRURULUUDDDLLLRDRLULLDLDDULDLUUDRURULLDLLLLDRLRRLURLRULRDLLULUDRDR",
"RURRRUDLURRURLURDDRULLDRDRDRRULRRDLDDLDUUURUULLRRDRLDRRDRULLURRRULLLDULDDDDLULRUULRURUDURDUDRLRULLLRDURDDUDDRDLURRURUURDLDDDDDURURRURLLLDDLDRRDUDDLLLDRRLDDUUULDLLDRUURUDDRRLDUULRRDDUDRUULRLDLRLRUURLLDRDLDRLURULDLULDRULURLLRRLLDDDURLRUURUULULRLLLULUDULUUULDRURUDDDUUDDRDUDUDRDLLLRDULRLDLRRDRRLRDLDDULULRLRUUDDUDRRLUDRDUUUDRLLLRRLRUDRRLRUUDDLDURLDRRRUDRRDUDDLRDDLULLDLURLUUDLUDLUDLDRRLRRRULDRLRDUURLUULRDURUDUUDDURDDLRRRLUUUDURULRURLDRURULDDUDDLUDLDLURDDRRDDUDUUURLDLRDDLDULDULDDDLDRDDLUURDULLUDRRRULRLDDLRDRLRURLULLLDULLUUDURLDDULRRDDUULDRLDLULRRDULUDUUURUURDDDRULRLRDLRRURR",
"UDDDRLDRDULDRLRDUDDLDLLDDLUUURDDDLUDRDUDLDURLUURUDUULUUULDUURLULLRLUDLLURUUUULRLRLLLRRLULLDRUULURRLLUDUDURULLLRRRRLRUULLRDRDRRDDLUDRRUULUDRUULRDLRDRRLRRDRRRLULRULUURRRULLRRRURUDUURRLLDDDUDDULUULRURUDUDUDRLDLUULUDDLLLLDRLLRLDULLLRLLDLUUDURDLLRURUUDDDDLLUDDRLUUDUDRDRLLURURLURRDLDDDULUURURURRLUUDUDLDLDDULLURUDLRLDLRLDLDUDULURDUDRLURRRULLDDDRDRURDDLDLULUDRUULDLULRDUUURLULDRRULLUDLDRLRDDUDURRRURRLRDUULURUUDLULDLRUUULUDRDRRUDUDULLDDRLRDLURDLRLUURDRUDRDRUDLULRUDDRDLLLRLURRURRLDDDUDDLRDRRRULLUUDULURDLDRDDDLDURRLRRDLLDDLULULRRDUDUUDUULRDRRDURDDDDUUDDLUDDUULDRDDULLUUUURRRUUURRULDRRDURRLULLDU"]
x=1
y=1
combination = []
#Internal Use
_keypad = [[1,2,3],[4,5,6],[7,8,9]]
for line in inputs:
for input in line:
#Move
if input == "D":
if y < 2: y+=1
elif input == "U":
if y > 0: y-=1
elif input == "L":
if x > 0: x-=1
elif input == "R":
if x < 2: x+=1
combination.append(_keypad[y][x])
print("Combinaison : {}".format(combination))
|
'''Faça um programa que leia 4 notas, mostre as notas e a média na tela.'''
notas = []
nota1 = float(input('Digite a primeira nota: '))
notas.append(nota1)
nota2 = float(input('Digite a segunda nota: '))
notas.append(nota2)
nota3 = float(input('Digite a terceira nota: '))
notas.append(nota3)
nota4 = float(input('Digite a quarta nota: '))
notas.append(nota4)
print(notas)
media = float(input('A média é: {}'. format(sum(notas)/len(notas))))
|
#!/usr/bin/env python3
def num_sol(n):
if n==1:
return 1
if n==2:
return 2
solu=num_sol(n-1)+num_sol(n-2)
return solu
# def unrank(n, pos, sorting_criterion="loves_long_tiles"):
# return "(" + unrank(n_in_A, (pos-count) // num_B) + ")" + unrank(n - n_in_A -1, (pos-count) % num_B)
def unrank(n):
if num_sol(n)==1:
return ['[]']
if num_sol(n)==2:
return ['[][]', '[--]']
solu1=[]
solu2=[]
for i in range(num_sol(n-1)):
solu1.append('[]' + unrank(n-1)[i])
for j in range(num_sol(n-2)):
solu2.append('[--]' + unrank(n-2)[j])
return solu1 + solu2
def recognize(tiling, TAc, LANG):
#print(f"tiling={tiling}")
pos = 0
n_tiles = 0
char = None
while pos < len(tiling):
if tiling[pos] != '[':
TAc.print(tiling, "yellow", ["underline"])
TAc.print(LANG.render_feedback("wrong-tile-opening", f'No. The tile in position {n_tiles+1} does not start with "[" (it starts with "{tiling[pos]}" instead). Your tiling is not correctly encoded.'), "red", ["bold"])
return False
n_tiles += 1
if tiling[pos+1] == ']':
pos += 2
else:
if pos+3 < len(tiling) and tiling[pos+3] != ']':
TAc.print(tiling, "yellow", ["underline"])
TAc.print(LANG.render_feedback("wrong-tile-closing", f'No. The tile in position {n_tiles}, starting with {tiling[pos:pos+3]}, does not end wih "]" (it ends with "{tiling[pos+3]}" instead). Your tiling is not correctly encoded.'), "red", ["bold"])
return False
for pos_fill in {pos+1,pos+2}:
if tiling[pos_fill] in {'[',']'}:
TAc.print(tiling, "yellow", ["underline"])
TAc.print(LANG.render_feedback("wrong-tile-filling", f'No. The tile in position {n_tiles}, starting with {tiling[pos:pos+4]}, has a forbidden filling character (namely, "{tiling[pos_fill]}"). Your tiling is not correctly encoded.'), "red", ["bold"])
return False
pos += 4
return True
|
def check_geneassessment(result, payload, previous_assessment_id=None):
assert result["gene_id"] == payload["gene_id"]
assert result["evaluation"] == payload["evaluation"]
assert result["analysis_id"] == payload.get("analysis_id")
assert result["genepanel_name"] == payload["genepanel_name"]
assert result["genepanel_version"] == payload["genepanel_version"]
assert result["date_superceeded"] is None
assert result["user_id"] == 1
assert result["usergroup_id"] == 1
assert result["previous_assessment_id"] == previous_assessment_id
def test_create_assessment(session, client, test_database):
test_database.refresh()
# Insert new geneassessment with analysis_id
ASSESSMENT1 = {
"gene_id": 1101,
"evaluation": {"comment": "TEST1"},
"analysis_id": 1,
"genepanel_name": "Mendel",
"genepanel_version": "v04",
}
r = client.post("/api/v1/geneassessments/", ASSESSMENT1)
assert r.status_code == 200
ga1 = r.get_json()
check_geneassessment(ga1, ASSESSMENT1)
# Check latest result when loading genepanel (allele_id 1 is in BRCA2)
r = client.get("/api/v1/workflows/analyses/1/genepanels/HBOC/v01/?allele_ids=1")
gp = r.get_json()
assert len(gp["geneassessments"]) == 1
check_geneassessment(gp["geneassessments"][0], ASSESSMENT1)
# Insert new geneassessment, without analysis_id
ASSESSMENT2 = {
"gene_id": 1101,
"evaluation": {"comment": "TEST2"},
"genepanel_name": "Mendel",
"genepanel_version": "v04",
"presented_geneassessment_id": ga1["id"],
}
r = client.post("/api/v1/geneassessments/", ASSESSMENT2)
assert r.status_code == 200
ga2 = r.get_json()
check_geneassessment(ga2, ASSESSMENT2, previous_assessment_id=ga1["id"])
r = client.get("/api/v1/workflows/analyses/1/genepanels/HBOC/v01/?allele_ids=1")
gp = r.get_json()
assert len(gp["geneassessments"]) == 1
check_geneassessment(gp["geneassessments"][0], ASSESSMENT2, previous_assessment_id=ga1["id"])
# Insert new geneassessment, with wrong presented id (should fail)
ASSESSMENT3 = {
"gene_id": 1101,
"evaluation": {"comment": "TEST3"},
"genepanel_name": "Mendel",
"genepanel_version": "v04",
"presented_geneassessment_id": ga1["id"],
}
r = client.post("/api/v1/geneassessments/", ASSESSMENT3)
assert r.status_code == 500
ga2 = (
r.get_json()["message"]
== "'presented_geneassessment_id': 1 does not match latest existing geneassessment id: 2"
)
# Check that latest is same as before
r = client.get("/api/v1/workflows/analyses/1/genepanels/HBOC/v01/?allele_ids=1")
gp = r.get_json()
assert len(gp["geneassessments"]) == 1
check_geneassessment(gp["geneassessments"][0], ASSESSMENT2, previous_assessment_id=ga1["id"])
|
def run(m):
sites = m.qualify(["""
SELECT ?equip ?sensor ?setpoint ?sensor_uuid ?setpoint_uuid WHERE {
?setpoint rdf:type/rdfs:subClassOf* brick:Air_Flow_Setpoint .
?sensor rdf:type/rdfs:subClassOf* brick:Air_Flow_Sensor .
?setpoint bf:isPointOf ?equip .
?sensor bf:isPointOf ?equip .
?setpoint bf:uuid ?setpoint_uuid .
?sensor bf:uuid ?sensor_uuid .
};"""])
return sites
|
# -*- coding: utf-8 -*-
'''
Author: Hannibal
Data:
Desc: local data config
NOTE: Don't modify this file, it's build by xml-to-python!!!
'''
fightbuff_map = {};
fightbuff_map[1001] = {"id":1001,"name":"强壮","type":"增益","refresh":1,"count":3,"data":[{"prop":"气血增加","value":"1000.0",},],};
fightbuff_map[1002] = {"id":1002,"name":"强力","type":"增益","refresh":1,"count":1,"data":[{"prop":"攻击增加","value":"100.0",},],};
class Fightbuff:
def __init__(self, key):
config = fightbuff_map.get(key);
for k, v in config.items():
setattr(self, k, v);
return
def create_Fightbuff(key):
config = fightbuff_map.get(key);
if not config:
return
return Fightbuff(key)
|
class Edge:
def __init__(self, start, end):
self.start = start
self.end = end
def __str__(self):
return "<" + str(self.start) + " " + str(self.end) + ">"
|
class Solution:
def minOperations(self, boxes: str) -> List[int]:
ans = [0]*len(boxes)
lc = 0
lcost = 0
rc = 0
rcost = 0
for i in range(1,len(boxes)):
if boxes[i-1]=="1": lc+=1
lcost += lc
ans[i] = lcost
for i in range(len(boxes)-2,-1,-1):
if boxes[i+1]=="1": rc+=1
rcost += rc
ans[i] += rcost
return ans
|
class Solution:
def evalRPN(self, tokens: List[str]) -> int:
stack = []
op = {
"+": lambda x, y: x + y,
"-": lambda x, y: x - y,
"*": lambda x, y: x * y,
"/": lambda x, y: x // y if x * y >= 0 else -(-x // y),
}
for token in tokens:
if token in op:
n2 = stack.pop()
n1 = stack.pop()
stack.append(op[token](n1, n2))
else:
stack.append(int(token))
return stack.pop()
|
'''Faça um programa que
leia o nome completo de uma pessoa, mostrando em
seguida o primeiro e o último nome separadamente.'''
print('''Não e necessário utilizarmos o len nessa situação, ficou entendido no
último exercício que a leitura pode ser vista de trás pra frente utilizando -1''')
next = input("Aperte enter para continuar: ")
name = str(input('Digite seu nome completo: ')).strip()
n1 = name.split()
print(f"Seu primeiro nome é {n1[0]}.")
print(f"Seu ultimo nome é {n1[-1]}.")
next = input("""Vamos verificar a resolução do curso em video.
Aperte ENTER: """)
n = str(input('Digite seu nome completo: '))
nome = n.split()
print('Muito prazer em te conhecer!')
print('Seu primeiro nome é {}'.format(nome[0]))
print('Seu último nome é {}'.format(nome[len(nome)-1]))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.