content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
#weight = 50
State.PS_veliki=_State(False,name='PS_veliki',shared=True)
State.PS_mali=_State(False,name='PS_mali',shared=True)
def run():
r.setpos(-1500+155+125+10,-1000+600+220,90) #bocno absrot90
r.conf_set('send_status_interval', 10)
State.color = 'ljubicasta'
# init servos
llift(0)
rlift(0)
rfliper(0)
lfliper(0)
return
| State.PS_veliki = __state(False, name='PS_veliki', shared=True)
State.PS_mali = __state(False, name='PS_mali', shared=True)
def run():
r.setpos(-1500 + 155 + 125 + 10, -1000 + 600 + 220, 90)
r.conf_set('send_status_interval', 10)
State.color = 'ljubicasta'
llift(0)
rlift(0)
rfliper(0)
lfliper(0)
return |
def join_dictionaries(
dictionaries: list) -> dict:
joined_dictionary = \
dict()
for dictionary in dictionaries:
joined_dictionary.update(
dictionary)
return \
joined_dictionary | def join_dictionaries(dictionaries: list) -> dict:
joined_dictionary = dict()
for dictionary in dictionaries:
joined_dictionary.update(dictionary)
return joined_dictionary |
APIAE_PARAMS = dict(
n_x=90, # dimension of x; observation
n_z=3, # dimension of z; latent space
n_u=1, # dimension of u; control
K=10, # the number of time steps
R=1, # the number of adaptations
L=32, # the number of trajectory sampled
dt=.1, # time interval
ur=.1, # update rate
lr=1e-3, # learning
)
TRAINING_EPOCHS = 3000
OFFSET_STD = 1e-5
| apiae_params = dict(n_x=90, n_z=3, n_u=1, K=10, R=1, L=32, dt=0.1, ur=0.1, lr=0.001)
training_epochs = 3000
offset_std = 1e-05 |
class Computer:
def __init__(self):
self.__maxprice = 900
def sell(self):
print("Selling Price: {}".format(self.__maxprice))
def setMaxPrice(self, price):
self.__maxprice = price
c = Computer()
c.sell()
# change the price
c.__maxprice = 1000
c.sell()
# using setter function
c.setMaxPrice(1000)
c.sell() | class Computer:
def __init__(self):
self.__maxprice = 900
def sell(self):
print('Selling Price: {}'.format(self.__maxprice))
def set_max_price(self, price):
self.__maxprice = price
c = computer()
c.sell()
c.__maxprice = 1000
c.sell()
c.setMaxPrice(1000)
c.sell() |
n,m = input().split(' ')
my_array = list(input().split(' '))
A = set(input().split(' '))
B = set(input().split(' '))
happiness = 0
for i in my_array:
happiness += (i in A) - (i in B)
print(happiness) | (n, m) = input().split(' ')
my_array = list(input().split(' '))
a = set(input().split(' '))
b = set(input().split(' '))
happiness = 0
for i in my_array:
happiness += (i in A) - (i in B)
print(happiness) |
buf = ""
buf += "\xdb\xdd\xd9\x74\x24\xf4\x58\xbf\x63\x6e\x69\x90\x33"
buf += "\xc9\xb1\x52\x83\xe8\xfc\x31\x78\x13\x03\x1b\x7d\x8b"
buf += "\x65\x27\x69\xc9\x86\xd7\x6a\xae\x0f\x32\x5b\xee\x74"
buf += "\x37\xcc\xde\xff\x15\xe1\x95\x52\x8d\x72\xdb\x7a\xa2"
buf += "\x33\x56\x5d\x8d\xc4\xcb\x9d\x8c\x46\x16\xf2\x6e\x76"
buf += "\xd9\x07\x6f\xbf\x04\xe5\x3d\x68\x42\x58\xd1\x1d\x1e"
buf += "\x61\x5a\x6d\x8e\xe1\xbf\x26\xb1\xc0\x6e\x3c\xe8\xc2"
buf += "\x91\x91\x80\x4a\x89\xf6\xad\x05\x22\xcc\x5a\x94\xe2"
buf += "\x1c\xa2\x3b\xcb\x90\x51\x45\x0c\x16\x8a\x30\x64\x64"
buf += "\x37\x43\xb3\x16\xe3\xc6\x27\xb0\x60\x70\x83\x40\xa4"
buf += "\xe7\x40\x4e\x01\x63\x0e\x53\x94\xa0\x25\x6f\x1d\x47"
buf += "\xe9\xf9\x65\x6c\x2d\xa1\x3e\x0d\x74\x0f\x90\x32\x66"
buf += "\xf0\x4d\x97\xed\x1d\x99\xaa\xac\x49\x6e\x87\x4e\x8a"
buf += "\xf8\x90\x3d\xb8\xa7\x0a\xa9\xf0\x20\x95\x2e\xf6\x1a"
buf += "\x61\xa0\x09\xa5\x92\xe9\xcd\xf1\xc2\x81\xe4\x79\x89"
buf += "\x51\x08\xac\x1e\x01\xa6\x1f\xdf\xf1\x06\xf0\xb7\x1b"
buf += "\x89\x2f\xa7\x24\x43\x58\x42\xdf\x04\xa7\x3b\xde\xac"
buf += "\x4f\x3e\xe0\x57\xa9\xb7\x06\x0d\xd9\x91\x91\xba\x40"
buf += "\xb8\x69\x5a\x8c\x16\x14\x5c\x06\x95\xe9\x13\xef\xd0"
buf += "\xf9\xc4\x1f\xaf\xa3\x43\x1f\x05\xcb\x08\xb2\xc2\x0b"
buf += "\x46\xaf\x5c\x5c\x0f\x01\x95\x08\xbd\x38\x0f\x2e\x3c"
buf += "\xdc\x68\xea\x9b\x1d\x76\xf3\x6e\x19\x5c\xe3\xb6\xa2"
buf += "\xd8\x57\x67\xf5\xb6\x01\xc1\xaf\x78\xfb\x9b\x1c\xd3"
buf += "\x6b\x5d\x6f\xe4\xed\x62\xba\x92\x11\xd2\x13\xe3\x2e"
buf += "\xdb\xf3\xe3\x57\x01\x64\x0b\x82\x81\x84\xee\x06\xfc"
buf += "\x2c\xb7\xc3\xbd\x30\x48\x3e\x81\x4c\xcb\xca\x7a\xab"
buf += "\xd3\xbf\x7f\xf7\x53\x2c\xf2\x68\x36\x52\xa1\x89\x13"
| buf = ''
buf += 'ÛÝÙt$ôX¿cni\x903'
buf += 'ɱR\x83èü1x\x13\x03\x1b}\x8b'
buf += "e'iÉ\x86×j®\x0f2[ît"
buf += '7ÌÞÿ\x15á\x95R\x8drÛz¢'
buf += '3V]\x8dÄË\x9d\x8cF\x16ònv'
buf += 'Ù\x07o¿\x04å=hBXÑ\x1d\x1e'
buf += 'aZm\x8eá¿&±Àn<èÂ'
buf += '\x91\x91\x80J\x89ö\xad\x05"ÌZ\x94â'
buf += '\x1c¢;Ë\x90QE\x0c\x16\x8a0dd'
buf += "7C³\x16ãÆ'°`p\x83@¤"
buf += 'ç@N\x01c\x0eS\x94\xa0%o\x1dG'
buf += 'éùel-¡>\rt\x0f\x902f'
buf += 'ðM\x97í\x1d\x99ª¬In\x87N\x8a'
buf += 'ø\x90=¸§\n©ð \x95.ö\x1a'
buf += 'a\xa0\t¥\x92éÍñÂ\x81äy\x89'
buf += 'Q\x08¬\x1e\x01¦\x1fßñ\x06ð·\x1b'
buf += '\x89/§$CXBß\x04§;Þ¬'
buf += 'O>àW©·\x06\rÙ\x91\x91º@'
buf += '¸iZ\x8c\x16\x14\\\x06\x95é\x13ïÐ'
buf += 'ùÄ\x1f¯£C\x1f\x05Ë\x08²Â\x0b'
buf += 'F¯\\\\\x0f\x01\x95\x08½8\x0f.<'
buf += 'Ühê\x9b\x1dvón\x19\\ã¶¢'
buf += 'ØWgõ¶\x01Á¯xû\x9b\x1cÓ'
buf += 'k]oäíbº\x92\x11Ò\x13ã.'
buf += 'ÛóãW\x01d\x0b\x82\x81\x84î\x06ü'
buf += ',·Ã½0H>\x81LËÊz«'
buf += 'Ó¿\x7f÷S,òh6R¡\x89\x13' |
print(" "*7 + "A")
print(" "*6 + "B B")
print(" "*5 + "C C")
print(" "*4 + "D" + " "*5 + "D")
print(" "*3 + "E" + " "*7 + "E")
print(" "*4 + "D" + " "*5 + "D")
print(" "*5 + "C C")
print(" "*6 + "B B")
print(" "*7 + "A")
| print(' ' * 7 + 'A')
print(' ' * 6 + 'B B')
print(' ' * 5 + 'C C')
print(' ' * 4 + 'D' + ' ' * 5 + 'D')
print(' ' * 3 + 'E' + ' ' * 7 + 'E')
print(' ' * 4 + 'D' + ' ' * 5 + 'D')
print(' ' * 5 + 'C C')
print(' ' * 6 + 'B B')
print(' ' * 7 + 'A') |
subscription_service = paymill_context.get_subscription_service()
subscription_with_offer_and_different_values = subscription_service.create_with_offer_id(
payment_id='pay_5e078197cde8a39e4908f8aa',
offer_id='offer_b33253c73ae0dae84ff4',
name='Example Subscription',
period_of_validity='2 YEAR',
start_at=1400575533
)
| subscription_service = paymill_context.get_subscription_service()
subscription_with_offer_and_different_values = subscription_service.create_with_offer_id(payment_id='pay_5e078197cde8a39e4908f8aa', offer_id='offer_b33253c73ae0dae84ff4', name='Example Subscription', period_of_validity='2 YEAR', start_at=1400575533) |
class Monkey(object):
'''Store data of placed monkey'''
def __init__(self, position=None, name=None, mtype=None) -> None:
'''
:arg position: position, list
:arg name: name
:arg mtype: type of monkey (get from action.action)
'''
self.position = position
self.upgrades = [0,0,0]
self.name = name
self.mtype = mtype
def upgrade(self, path):
'''
Increase the stored paths of a monkey when upgrading.
:arg path: Path of upgrade taking place.
<1, 2, 3> (1 being the top path)
'''
if path == 1:
self.upgrades[0] += 1
if self.upgrades[0] > 5 and (self.mtype != 'Dart Monkey' or self.mtype != 'Boomerang Monkey'):
print('invalid upgrade (higher than 5)')
if path == 2:
self.upgrades[1] += 1
if self.upgrades[1] > 5 and (self.mtype != 'Dart Monkey' or self.mtype != 'Boomerang Monkey'):
print('invalid upgrade (higher than 5)')
if path == 3:
self.upgrades[2] += 1
if self.upgrades[2] > 5 and (self.mtype != 'Dart Monkey' or self.mtype != 'Boomerang Monkey'):
print('invalid upgrade (higher than 5)')
| class Monkey(object):
"""Store data of placed monkey"""
def __init__(self, position=None, name=None, mtype=None) -> None:
"""
:arg position: position, list
:arg name: name
:arg mtype: type of monkey (get from action.action)
"""
self.position = position
self.upgrades = [0, 0, 0]
self.name = name
self.mtype = mtype
def upgrade(self, path):
"""
Increase the stored paths of a monkey when upgrading.
:arg path: Path of upgrade taking place.
<1, 2, 3> (1 being the top path)
"""
if path == 1:
self.upgrades[0] += 1
if self.upgrades[0] > 5 and (self.mtype != 'Dart Monkey' or self.mtype != 'Boomerang Monkey'):
print('invalid upgrade (higher than 5)')
if path == 2:
self.upgrades[1] += 1
if self.upgrades[1] > 5 and (self.mtype != 'Dart Monkey' or self.mtype != 'Boomerang Monkey'):
print('invalid upgrade (higher than 5)')
if path == 3:
self.upgrades[2] += 1
if self.upgrades[2] > 5 and (self.mtype != 'Dart Monkey' or self.mtype != 'Boomerang Monkey'):
print('invalid upgrade (higher than 5)') |
matched = [[0, 450], [1, 466], [2, 566], [3, 974], [4, 1000], [5, 1222], [6, 1298], [7, 1322], [8, 1340], [9, 1704],
[10, 1752], [11, 2022], [12, 2114], [13, 2332], [14, 2360], [15, 2380], [16, 2388], [17, 2596],
[18, 2662], [19, 2706], [20, 2842], [21, 2914], [22, 3132], [23, 3148], [24, 3158], [25, 3164],
[26, 3244], [27, 3360], [28, 3386], [29, 3626], [30, 3726], [31, 3832], [32, 3912], [33, 3944],
[34, 4063], [35, 4084], [36, 4146], [37, 4162], [38, 4240], [39, 4356], [40, 4398], [41, 4408],
[42, 4470], [43, 4646], [44, 4692], [45, 4852], [46, 4930], [47, 5122], [48, 5126], [49, 5216],
[50, 5222], [51, 5310], [52, 5400], [53, 5408], [54, 5422], [55, 5482], [56, 5490], [57, 5504],
[58, 5546], [59, 5720], [60, 5744], [61, 5766], [62, 5800], [63, 5826], [64, 5950], [65, 5964],
[66, 5970], [67, 5986], [68, 6010], [69, 6038], [70, 6124], [71, 6166], [72, 6167], [73, 6169],
[74, 6215], [75, 6261], [76, 6275], [77, 6279], [78, 6283], [79, 6289], [80, 6293], [81, 6294],
[82, 6295], [83, 6296], [84, 6304], [85, 6418], [86, 6419], [87, 6454], [88, 6458], [89, 6472],
[90, 6484], [91, 6504], [92, 6506], [93, 6508], [94, 6540], [95, 6541], [96, 6561], [97, 6615],
[98, 6662], [99, 6663], [100, 6676], [101, 6750], [102, 6756], [103, 6758], [104, 6772], [105, 6784],
[106, 6785], [107, 6789], [108, 6887], [109, 6906], [110, 6907], [111, 6921], [112, 6947], [113, 6957],
[114, 6995], [115, 6997], [116, 6999], [117, 7001], [118, 7027], [119, 7028], [120, 7036], [121, 7056],
[122, 7102], [123, 7118], [124, 7147], [125, 7148], [126, 7165], [127, 7229], [128, 7233], [129, 7237],
[130, 7239], [131, 7243], [132, 7267], [133, 7268], [134, 7272], [135, 7358], [136, 7360], [137, 7387],
[138, 7388], [139, 7401], [140, 7427], [141, 7451], [142, 7469], [143, 7475], [144, 7477], [145, 7479],
[146, 7481], [147, 7501], [148, 7505], [149, 7507], [150, 7508], [151, 7512], [152, 7516], [153, 7598],
[154, 7600], [155, 7627], [156, 7628], [157, 7639], [158, 7655], [159, 7665], [160, 7683], [161, 7701],
[162, 7707], [163, 7711], [164, 7717], [165, 7719], [166, 7721], [167, 7725], [168, 7731], [169, 7747],
[170, 7748], [171, 7867], [172, 7868], [173, 7883], [174, 7933], [175, 7947], [176, 7949], [177, 7951],
[178, 7953], [179, 7955], [180, 7957], [181, 7961], [182, 7975], [183, 7987], [184, 7988], [185, 7992],
[186, 7994], [187, 8107], [188, 8108], [189, 8153], [190, 8163], [191, 8181], [192, 8187], [193, 8189],
[194, 8191], [195, 8193], [196, 8195], [197, 8221], [198, 8227], [199, 8228], [200, 8236], [201, 8239],
[202, 8347], [203, 8348], [204, 8363], [205, 8375], [206, 8385], [207, 8397], [208, 8409], [209, 8427],
[210, 8429], [211, 8431], [212, 8433], [213, 8435], [214, 8441], [215, 8457], [216, 8467], [217, 8468],
[218, 8472], [219, 8587], [220, 8588], [221, 8649], [222, 8661], [223, 8667], [224, 8669], [225, 8671],
[226, 8673], [227, 8677], [228, 8679], [229, 8681], [230, 8685], [231, 8705], [232, 8707], [233, 8708],
[234, 8716], [235, 8798], [236, 8800], [237, 8827], [238, 8828], [239, 8841], [240, 8843], [241, 8875],
[242, 8891], [243, 8907], [244, 8915], [245, 8917], [246, 8919], [247, 8921], [248, 8931], [249, 8934],
[250, 8947], [251, 8948], [252, 8954], [253, 8956], [254, 8984], [255, 9038], [256, 9040], [257, 9067],
[258, 9068], [259, 9157], [260, 9159], [261, 9161], [262, 9187], [263, 9188], [264, 9192], [265, 9206],
[266, 9278], [267, 9286], [268, 9299], [269, 9307], [270, 9308], [271, 9321], [272, 9349], [273, 9383],
[274, 9397], [275, 9399], [276, 9427], [277, 9428], [278, 9436], [279, 9522], [280, 9547], [281, 9548],
[282, 9561], [283, 9567], [284, 9583], [285, 9587], [286, 9601], [287, 9633], [288, 9635], [289, 9637],
[290, 9655], [291, 9665], [292, 9667], [293, 9668], [294, 9670], [295, 9787], [296, 9788], [297, 9876],
[298, 9882], [299, 9884], [300, 9908], [301, 9909], [302, 9919], [303, 10030], [304, 10031],
[305, 10065], [306, 10087], [307, 10105], [308, 10135], [309, 10153], [310, 10154], [311, 10155],
[312, 10175], [313, 10239], [314, 10277], [315, 10278], [316, 10280], [317, 10304], [318, 10330],
[319, 10342], [320, 10350], [321, 10392], [322, 10396], [323, 10400], [324, 10404], [325, 10405],
[326, 10407], [327, 10533], [328, 10613], [329, 10623], [330, 10651], [331, 10671], [332, 10709],
[333, 10807], [334, 10849], [335, 10855], [336, 10885], [337, 10891], [338, 10893], [339, 10955],
[340, 11047], [341, 11073], [342, 11143], [343, 11149], [344, 11159], [345, 11321], [346, 11337],
[347, 11353], [348, 11379], [349, 11395], [350, 11425], [351, 11431], [352, 11625], [353, 11823],
[354, 11885], [355, 11923], [356, 11933], [357, 12109], [358, 12125], [359, 12133], [360, 12329],
[361, 12345], [362, 12357], [363, 12373], [364, 12385], [365, 12397], [366, 12401], [367, 12409],
[368, 12441], [369, 12639], [370, 12821], [371, 13125], [372, 13181], [373, 13195], [374, 13211],
[375, 13297], [376, 13351], [377, 13403], [378, 13689], [379, 13713], [380, 13853], [381, 13931],
[382, 14117], [383, 14163], [384, 14181], [385, 14217], [386, 14227], [387, 14306], [388, 14339],
[389, 14381], [390, 14455], [391, 14881], [392, 15127], [393, 15167], [394, 15405], [395, 15909],
[396, 16133], [397, 16203], [398, 16237], [399, 16238], [400, 16239], [401, 16240], [402, 16241],
[403, 16242], [404, 16243], [405, 16244], [406, 16245], [407, 16246], [408, 16247], [409, 16248],
[410, 16249], [411, 16250], [412, 16251], [413, 16252], [414, 16266], [415, 16267], [416, 16268],
[417, 16269], [418, 16270], [419, 16271], [420, 16272], [421, 16273], [422, 16274], [423, 16275],
[424, 16276], [425, 16277], [426, 16301], [427, 16302], [428, 16303], [429, 16304], [430, 16305],
[431, 16306], [432, 16307], [433, 16308], [434, 16340], [435, 16341], [436, 16342], [437, 16343],
[438, 16344], [439, 16364], [440, 16383], [441, 16425], [442, 16459], [443, 16468], [444, 16482],
[445, 16512], [446, 16556], [447, 16557], [448, 16558], [449, 16559], [450, 16605], [451, 16654],
[452, 16704], [453, 16705], [454, 16706], [455, 16710], [456, 16740], [457, 16757], [458, 16811],
[459, 16861], [460, 16866], [461, 16922], [462, 16979], [463, 17037], [464, 17096], [465, 17156],
[466, 17217], [467, 17279], [468, 17299], [469, 17311], [470, 17342], [471, 17343], [472, 17344],
[473, 17408], [474, 17460], [475, 17475], [476, 17541], [477, 17543], [478, 17557], [479, 17612],
[480, 17682], [481, 17688], [482, 17753], [483, 17825], [484, 17841], [485, 17898], [486, 17928],
[487, 17972], [488, 17976], [489, 18047], [490, 18123], [491, 18185], [492, 18200], [493, 18278],
[494, 18286], [495, 18357], [496, 18437], [497, 18467], [498, 18518], [499, 18562], [500, 18600],
[501, 18606], [502, 18612], [503, 18620], [504, 18626], [505, 18632], [506, 18638], [507, 18683],
[508, 18767], [509, 18787], [510, 18789], [511, 18793], [512, 18799], [513, 18803], [514, 18852],
[515, 18938], [516, 18956], [517, 18958], [518, 18962], [519, 18966], [520, 18980], [521, 19025],
[522, 19109], [523, 19113], [524, 19127], [525, 19131], [526, 19147], [527, 19153], [528, 19157],
[529, 19163], [530, 19202], [531, 19292], [532, 19308], [533, 19312], [534, 19330], [535, 19383],
[536, 19475], [537, 19483], [538, 19491], [539, 19501], [540, 19503], [541, 19505], [542, 19509],
[543, 19519], [544, 19523], [545, 19568], [546, 19569], [547, 19570], [548, 19664], [549, 19665],
[550, 19666], [551, 19690], [552, 19694], [553, 19696], [554, 19700], [555, 19706], [556, 19716],
[557, 19720], [558, 19763], [559, 19764], [560, 19765], [561, 19865], [562, 19866], [563, 19867],
[564, 19868], [565, 19869], [566, 19891], [567, 19895], [568, 19901], [569, 19903], [570, 19907],
[571, 19909], [572, 19913], [573, 19919], [574, 19929], [575, 19972], [576, 19973], [577, 19974],
[578, 20022], [579, 20082], [580, 20083], [581, 20084], [582, 20098], [583, 20122], [584, 20124],
[585, 20126], [586, 20128], [587, 20132], [588, 20142], [589, 20195], [590, 20196], [591, 20197],
[592, 20245], [593, 20253], [594, 20311], [595, 20353], [596, 20355], [597, 20361], [598, 20363],
[599, 20365], [600, 20367], [601, 20371], [602, 20381], [603, 20389], [604, 20428], [605, 20429],
[606, 20430], [607, 20548], [608, 20549], [609, 20550], [610, 20560], [611, 20580], [612, 20582],
[613, 20590], [614, 20594], [615, 20598], [616, 20600], [617, 20604], [618, 20606], [619, 20608],
[620, 20610], [621, 20612], [622, 20671], [623, 20795], [624, 20796], [625, 20797], [626, 20849],
[627, 20855], [628, 20859], [629, 20861], [630, 20863], [631, 20865], [632, 20922], [633, 20923],
[634, 21101], [635, 21105], [636, 21117], [637, 21119], [638, 21121], [639, 21125], [640, 21137],
[641, 21223], [642, 21315], [643, 21369], [644, 21371], [645, 21375], [646, 21381], [647, 21389],
[648, 21499], [649, 21593], [650, 21609], [651, 21613], [652, 21633], [653, 21635], [654, 21657],
[655, 21881], [656, 21889], [657, 22077], [658, 22087], [659, 22117], [660, 22137], [661, 22153],
[662, 22285], [663, 22403], [664, 22795], [665, 22893], [666, 22905], [667, 22964], [668, 23145],
[669, 23187], [670, 23387], [671, 23885], [672, 23941], [673, 24299], [674, 24334], [675, 24379],
[676, 24541], [677, 24577], [678, 24845], [679, 24855], [680, 24907], [681, 25073], [682, 25355],
[683, 25659], [684, 26109], [685, 26141], [686, 26191], [687, 26405], [688, 26653], [689, 26671],
[690, 26885], [691, 26907], [692, 27423], [693, 27927], [694, 27943], [695, 27957], [696, 28171],
[697, 28441], [698, 28515], [699, 28709], [700, 28745], [701, 29199], [702, 29241], [703, 29606],
[704, 29745], [705, 29799], [706, 29809], [707, 30138], [708, 30221], [709, 30285], [710, 30829],
[711, 30869], [712, 31147], [713, 31169], [714, 31411], [715, 31618], [716, 31699], [717, 32061],
[718, 32175], [719, 32347], [720, 32455], [721, 32461], [722, 32467], [723, 32669], [724, 32699],
[725, 32709], [726, 32715], [727, 32729], [728, 32969], [729, 32977], [730, 32983], [731, 33117],
[732, 33177], [733, 33215], [734, 33237], [735, 33239], [736, 33243], [737, 33253], [738, 33349],
[739, 33455], [740, 33491], [741, 33503], [742, 33507], [743, 33515], [744, 33559], [745, 33564],
[746, 33565], [747, 33577], [748, 33629], [749, 33663], [750, 33693], [751, 33694], [752, 33695],
[753, 33721], [754, 33739], [755, 33751], [756, 33755], [757, 33757], [758, 33759], [759, 33761],
[760, 33765], [761, 33820], [762, 33944], [763, 33945], [764, 33946], [765, 33990], [766, 33994],
[767, 33996], [768, 33998], [769, 34002], [770, 34004], [771, 34006], [772, 34008], [773, 34067],
[774, 34068], [775, 34069], [776, 34187], [777, 34213], [778, 34221], [779, 34231], [780, 34233],
[781, 34237], [782, 34239], [783, 34241], [784, 34243], [785, 34247], [786, 34304], [787, 34305],
[788, 34306], [789, 34420], [790, 34421], [791, 34422], [792, 34456], [793, 34460], [794, 34466],
[795, 34468], [796, 34470], [797, 34474], [798, 34482], [799, 34488], [800, 34533], [801, 34534],
[802, 34535], [803, 34573], [804, 34583], [805, 34643], [806, 34644], [807, 34645], [808, 34646],
[809, 34647], [810, 34669], [811, 34671], [812, 34675], [813, 34679], [814, 34681], [815, 34683],
[816, 34685], [817, 34687], [818, 34691], [819, 34699], [820, 34703], [821, 34750], [822, 34751],
[823, 34752], [824, 34852], [825, 34853], [826, 34854], [827, 34874], [828, 34882], [829, 34884],
[830, 34888], [831, 34894], [832, 34908], [833, 34910], [834, 34951], [835, 34952], [836, 34953],
[837, 35047], [838, 35055], [839, 35067], [840, 35071], [841, 35073], [842, 35075], [843, 35077],
[844, 35091], [845, 35135], [846, 35140], [847, 35210], [848, 35232], [849, 35248], [850, 35252],
[851, 35256], [852, 35266], [853, 35270], [854, 35323], [855, 35413], [856, 35427], [857, 35431],
[858, 35453], [859, 35455], [860, 35457], [861, 35502], [862, 35590], [863, 35608], [864, 35612],
[865, 35616], [866, 35622], [867, 35632], [868, 35677], [869, 35763], [870, 35767], [871, 35775],
[872, 35781], [873, 35785], [874, 35789], [875, 35797], [876, 35801], [877, 35848], [878, 35932],
[879, 35950], [880, 35954], [881, 35962], [882, 35964], [883, 35970], [884, 36015], [885, 36097],
[886, 36127], [887, 36143], [888, 36163], [889, 36178], [890, 36258], [891, 36316], [892, 36337],
[893, 36413], [894, 36415], [895, 36421], [896, 36492], [897, 36528], [898, 36568], [899, 36578],
[900, 36643], [901, 36717], [902, 36733], [903, 36790], [904, 36862], [905, 36886], [906, 36916],
[907, 36933], [908, 37003], [909, 37015], [910, 37072], [911, 37140], [912, 37207], [913, 37208],
[914, 37209], [915, 37273], [916, 37336], [917, 37398], [918, 37459], [919, 37519], [920, 37561],
[921, 37578], [922, 37636], [923, 37693], [924, 37749], [925, 37759], [926, 37799], [927, 37804],
[928, 37858], [929, 37859], [930, 37860], [931, 37911], [932, 37961], [933, 38010], [934, 38011],
[935, 38012], [936, 38056], [937, 38058], [938, 38084], [939, 38103], [940, 38119], [941, 38147],
[942, 38190], [943, 38232], [944, 38233], [945, 38234], [946, 38273], [947, 38274], [948, 38275],
[949, 38276], [950, 38277], [951, 38309], [952, 38310], [953, 38311], [954, 38312], [955, 38313],
[956, 38314], [957, 38315], [958, 38339], [959, 38340], [960, 38341], [961, 38342], [962, 38343],
[963, 38344], [964, 38358], [965, 38359], [966, 38360], [967, 38361], [968, 38362], [969, 38363],
[970, 38364], [971, 38365], [972, 38366], [973, 38367], [974, 38368], [975, 38369], [976, 38370],
[977, 38371], [978, 38372], [979, 38373], [980, 38374], [981, 38375], [982, 38376], [983, 38377],
[984, 38378], [985, 38427], [986, 38431], [987, 38472], [988, 38475], [989, 38522], [990, 38534],
[991, 38568], [992, 38613], [993, 38657], [994, 38688], [995, 38701], [996, 38745], [997, 38788],
[998, 38790], [999, 38830], [1000, 38871], [1001, 38878], [1002, 38912], [1003, 38953], [1004, 38993],
[1005, 39032], [1006, 39069], [1007, 39070], [1008, 39108], [1009, 39146], [1010, 39168], [1011, 39183],
[1012, 39186], [1013, 39220], [1014, 39257], [1015, 39267], [1016, 39291], [1017, 39293], [1018, 39328],
[1019, 39333], [1020, 39363], [1021, 39398], [1022, 39430], [1023, 39432], [1024, 39466], [1025, 39500],
[1026, 39533], [1027, 39536], [1028, 39544], [1029, 39554], [1030, 39566], [1031, 39599], [1032, 39631],
[1033, 39663], [1034, 39693], [1035, 39695], [1036, 39726], [1037, 39747], [1038, 39757], [1039, 39788],
[1040, 39790], [1041, 39818], [1042, 39848], [1043, 39854], [1044, 39870], [1045, 39876], [1046, 39878],
[1047, 39907], [1048, 39910], [1049, 39920], [1050, 39936], [1051, 39965], [1052, 39971], [1053, 39985],
[1054, 39993], [1055, 40021], [1056, 40023], [1057, 40033], [1058, 40037], [1059, 40049], [1060, 40074],
[1061, 40077], [1062, 40105], [1063, 40125], [1064, 40132], [1065, 40135], [1066, 40137], [1067, 40159],
[1068, 40174], [1069, 40177], [1070, 40183], [1071, 40186], [1072, 40189], [1073, 40193], [1074, 40198],
[1075, 40213], [1076, 40240], [1077, 40267], [1078, 40283], [1079, 40285], [1080, 40294], [1081, 40296],
[1082, 40320], [1083, 40343], [1084, 40346], [1085, 40348], [1086, 40372], [1087, 40379], [1088, 40387],
[1089, 40398], [1090, 40424], [1091, 40441], [1092, 40450], [1093, 40452], [1094, 40458], [1095, 40476],
[1096, 40502], [1097, 40506], [1098, 40528], [1099, 40553], [1100, 40554], [1101, 40556], [1102, 40580],
[1103, 40595], [1104, 40606], [1105, 40610], [1106, 40614], [1107, 40632], [1108, 40658], [1109, 40660],
[1110, 40684], [1111, 40699], [1112, 40707], [1113, 40710], [1114, 40736], [1115, 40748], [1116, 40754],
[1117, 40763], [1118, 40766], [1119, 40768], [1120, 40790], [1121, 40810], [1122, 40817], [1123, 40828],
[1124, 40844], [1125, 40862], [1126, 40871], [1127, 40872], [1128, 40886], [1129, 40898], [1130, 40925],
[1131, 40927], [1132, 40931], [1133, 40953], [1134, 40977], [1135, 40981], [1136, 40983], [1137, 40993],
[1138, 41001], [1139, 41009], [1140, 41037], [1141, 41065], [1142, 41094], [1143, 41095], [1144, 41099],
[1145, 41123], [1146, 41152], [1147, 41166], [1148, 41182], [1149, 41212], [1150, 41214], [1151, 41234],
[1152, 41240], [1153, 41242], [1154, 41273], [1155, 41280], [1156, 41304], [1157, 41335], [1158, 41367],
[1159, 41384], [1160, 41399], [1161, 41403], [1162, 41431], [1163, 41464], [1164, 41493], [1165, 41497],
[1166, 41530], [1167, 41534], [1168, 41538], [1169, 41564], [1170, 41583], [1171, 41598], [1172, 41632],
[1173, 41667], [1174, 41700], [1175, 41702], [1176, 41737], [1177, 41773], [1178, 41810], [1179, 41817],
[1180, 41821], [1181, 41847], [1182, 41884], [1183, 41922], [1184, 41949], [1185, 41960], [1186, 41962],
[1187, 41998], [1188, 42034], [1189, 42037], [1190, 42077], [1191, 42118], [1192, 42133], [1193, 42159],
[1194, 42200], [1195, 42242], [1196, 42282], [1197, 42285], [1198, 42329], [1199, 42362], [1200, 42373],
[1201, 42379], [1202, 42417], [1203, 42462], [1204, 42508], [1205, 42555], [1206, 42567], [1207, 42603],
[1208, 42670], [1209, 42760], [1210, 42836], [1211, 42868], [1212, 42879], [1213, 42976], [1214, 43084],
[1215, 43191], [1216, 43253], [1217, 43297], [1218, 43334], [1219, 43402], [1220, 43506], [1221, 43607],
[1222, 43610], [1223, 43714], [1224, 43767], [1225, 43817], [1226, 43919], [1227, 43938], [1228, 43980],
[1229, 44020], [1230, 44056], [1231, 44108], [1232, 44120], [1233, 44219], [1234, 44311], [1235, 44317],
[1236, 44414], [1237, 44442], [1238, 44494], [1239, 44510], [1240, 44555], [1241, 44563], [1242, 44575],
[1243, 44605], [1244, 44699], [1245, 44712], [1246, 44792], [1247, 44878], [1248, 44884], [1249, 44975],
[1250, 45033], [1251, 45065], [1252, 45136], [1253, 45154], [1254, 45179], [1255, 45242], [1256, 45291],
[1257, 45305], [1258, 45329], [1259, 45409], [1260, 45415], [1261, 45468], [1262, 45500], [1263, 45584],
[1264, 45625], [1265, 45660], [1266, 45667], [1267, 45683], [1268, 45689], [1269, 45749], [1270, 45822],
[1271, 45830], [1272, 45840], [1273, 45876], [1274, 45910], [1275, 45969], [1276, 45979], [1277, 45989],
[1278, 46015], [1279, 46067], [1280, 46144], [1281, 46220], [1282, 46227], [1283, 46285], [1284, 46295],
[1285, 46313], [1286, 46369], [1287, 46438], [1288, 46442], [1289, 46514], [1290, 46561], [1291, 46573],
[1292, 46585], [1293, 46617], [1294, 46647], [1295, 46655], [1296, 46658], [1297, 46722], [1298, 46724],
[1299, 46742], [1300, 46746], [1301, 46762], [1302, 46792], [1303, 46843], [1304, 46853], [1305, 46859],
[1306, 46871], [1307, 46901], [1308, 46925], [1309, 46990], [1310, 47000], [1311, 47004], [1312, 47048],
[1313, 47055], [1314, 47118], [1315, 47120], [1316, 47128], [1317, 47132], [1318, 47144], [1319, 47168],
[1320, 47185], [1321, 47246], [1322, 47250], [1323, 47256], [1324, 47260], [1325, 47266], [1326, 47272],
[1327, 47286], [1328, 47315], [1329, 47378], [1330, 47380], [1331, 47384], [1332, 47392], [1333, 47394],
[1334, 47412], [1335, 47422], [1336, 47434], [1337, 47445], [1338, 47510], [1339, 47515], [1340, 47518],
[1341, 47520], [1342, 47526], [1343, 47562], [1344, 47575], [1345, 47578], [1346, 47634], [1347, 47640],
[1348, 47646], [1349, 47650], [1350, 47652], [1351, 47654], [1352, 47662], [1353, 47676], [1354, 47705],
[1355, 47708], [1356, 47760], [1357, 47770], [1358, 47778], [1359, 47780], [1360, 47786], [1361, 47802],
[1362, 47808], [1363, 47816], [1364, 47835], [1365, 47836], [1366, 47840], [1367, 47888], [1368, 47897],
[1369, 47900], [1370, 47912], [1371, 47914], [1372, 47922], [1373, 47965], [1374, 47968], [1375, 48028],
[1376, 48030], [1377, 48035], [1378, 48038], [1379, 48040], [1380, 48046], [1381, 48078], [1382, 48095],
[1383, 48098], [1384, 48152], [1385, 48160], [1386, 48166], [1387, 48168], [1388, 48170], [1389, 48172],
[1390, 48174], [1391, 48186], [1392, 48194], [1393, 48202], [1394, 48225], [1395, 48279], [1396, 48290],
[1397, 48294], [1398, 48298], [1399, 48306], [1400, 48312], [1401, 48326], [1402, 48354], [1403, 48355],
[1404, 48420], [1405, 48434], [1406, 48468], [1407, 48485], [1408, 48546], [1409, 48548], [1410, 48550],
[1411, 48554], [1412, 48556], [1413, 48558], [1414, 48560], [1415, 48562], [1416, 48572], [1417, 48590],
[1418, 48604], [1419, 48615], [1420, 48616], [1421, 48680], [1422, 48694], [1423, 48698], [1424, 48716],
[1425, 48724], [1426, 48745], [1427, 48753], [1428, 48810], [1429, 48822], [1430, 48828], [1431, 48870],
[1432, 48872], [1433, 48875], [1434, 48940], [1435, 48950], [1436, 48962], [1437, 48976], [1438, 49006],
[1439, 49061], [1440, 49068], [1441, 49073], [1442, 49123], [1443, 49139], [1444, 49141], [1445, 49146],
[1446, 49210], [1447, 49256], [1448, 49270], [1449, 49280], [1450, 49347], [1451, 49351], [1452, 49373],
[1453, 49383], [1454, 49393], [1455, 49423], [1456, 49430], [1457, 49486], [1458, 49496], [1459, 49498],
[1460, 49570], [1461, 49621], [1462, 49639], [1463, 49641], [1464, 49645], [1465, 49721], [1466, 49780],
[1467, 49798], [1468, 49814], [1469, 49820], [1470, 49876], [1471, 49949], [1472, 49955], [1473, 49983],
[1474, 50019], [1475, 50035], [1476, 50044], [1477, 50116], [1478, 50158], [1479, 50172], [1480, 50192],
[1481, 50198], [1482, 50245], [1483, 50249], [1484, 50281], [1485, 50347], [1486, 50365], [1487, 50450],
[1488, 50530], [1489, 50536], [1490, 50547], [1491, 50623], [1492, 50647], [1493, 50655], [1494, 50707],
[1495, 50711], [1496, 50800], [1497, 50868], [1498, 50874], [1499, 50890], [1500, 50939], [1501, 50953],
[1502, 50981], [1503, 51073], [1504, 51132], [1505, 51166], [1506, 51246], [1507, 51256], [1508, 51260],
[1509, 51275], [1510, 51286], [1511, 51294], [1512, 51355], [1513, 51451], [1514, 51548], [1515, 51602],
[1516, 51646], [1517, 51715], [1518, 51745], [1519, 51845], [1520, 51946], [1521, 52026], [1522, 52032],
[1523, 52040], [1524, 52048], [1525, 52077], [1526, 52151], [1527, 52255], [1528, 52314], [1529, 52356],
[1530, 52359], [1531, 52463], [1532, 52480], [1533, 52530], [1534, 52568], [1535, 52630], [1536, 52674],
[1537, 52781], [1538, 52788], [1539, 52889], [1540, 52918], [1541, 52997], [1542, 53035], [1543, 53105],
[1544, 53214]]
simple_tri = [[3, 691, 8], [688, 1, 2], [7, 691, 988], [692, 3, 1], [687, 2, 5], [687, 5, 1213], [1, 3, 6],
[2, 1, 4], [1, 6, 4], [2, 4, 5], [691, 7, 14], [14, 10, 691], [3, 9, 6], [1213, 5, 20], [691, 10, 8],
[4, 12, 5], [1007, 7, 988], [3, 8, 15], [10, 14, 18], [3, 15, 9], [4, 6, 11], [4, 11, 12],
[15, 13, 9], [9, 13, 16], [9, 16, 6], [1007, 21, 7], [16, 17, 6], [6, 17, 11], [11, 17, 19],
[11, 19, 12], [12, 31, 5], [1007, 1017, 21], [8, 10, 15], [5, 31, 20], [7, 21, 14], [13, 25, 16],
[17, 16, 26], [17, 22, 19], [18, 27, 10], [15, 10, 23], [12, 19, 31], [27, 29, 10], [13, 15, 24],
[13, 24, 25], [16, 25, 26], [21, 28, 14], [10, 29, 23], [18, 14, 30], [18, 30, 27], [17, 26, 22],
[24, 35, 25], [19, 22, 32], [28, 30, 14], [23, 33, 15], [26, 34, 22], [22, 36, 32], [29, 38, 23],
[15, 33, 24], [22, 34, 36], [30, 37, 27], [27, 37, 29], [23, 38, 33], [24, 33, 45], [19, 32, 31],
[31, 1283, 20], [28, 1035, 44], [28, 44, 30], [25, 35, 26], [26, 35, 34], [31, 32, 39], [29, 37, 42],
[44, 41, 30], [30, 41, 37], [24, 50, 35], [32, 36, 48], [32, 40, 39], [39, 1283, 31], [35, 46, 34],
[34, 46, 43], [34, 43, 36], [32, 48, 40], [29, 42, 38], [45, 50, 24], [39, 59, 1283], [37, 41, 52],
[42, 47, 38], [38, 47, 33], [35, 51, 46], [36, 43, 48], [1035, 1046, 44], [35, 50, 51], [40, 49, 53],
[40, 53, 39], [39, 53, 54], [39, 54, 59], [44, 55, 41], [48, 49, 40], [42, 37, 52], [42, 52, 47],
[43, 46, 58], [59, 54, 63], [41, 65, 52], [47, 66, 67], [51, 57, 46], [52, 66, 47], [47, 67, 33],
[33, 67, 45], [45, 60, 50], [57, 69, 46], [43, 58, 62], [43, 62, 48], [48, 62, 49], [55, 65, 41],
[50, 60, 68], [56, 57, 51], [58, 46, 77], [52, 64, 66], [50, 68, 51], [51, 68, 56], [56, 61, 57],
[52, 65, 64], [45, 67, 60], [69, 77, 46], [58, 78, 62], [49, 74, 53], [53, 101, 54], [65, 55, 88],
[68, 60, 91], [56, 71, 61], [61, 76, 57], [77, 78, 58], [49, 62, 80], [49, 80, 74], [53, 74, 85],
[64, 89, 75], [64, 75, 66], [62, 79, 80], [53, 85, 101], [101, 63, 54], [64, 65, 89], [66, 90, 67],
[68, 98, 56], [71, 93, 61], [61, 94, 76], [74, 72, 70], [70, 73, 74], [66, 75, 90], [60, 67, 91],
[98, 71, 56], [61, 93, 94], [76, 104, 57], [57, 104, 69], [77, 69, 109], [62, 78, 79], [74, 80, 81],
[74, 81, 72], [73, 82, 74], [74, 82, 83], [74, 84, 85], [74, 83, 84], [85, 121, 101], [55, 1061, 88],
[93, 71, 92], [69, 104, 132], [80, 86, 81], [84, 87, 85], [65, 88, 89], [67, 90, 91], [69, 132, 109],
[80, 95, 86], [87, 96, 85], [85, 96, 108], [71, 98, 123], [71, 128, 92], [94, 103, 76], [78, 77, 105],
[79, 78, 148], [95, 80, 99], [96, 100, 108], [63, 101, 112], [63, 112, 97], [71, 123, 128],
[92, 102, 93], [93, 102, 94], [94, 102, 115], [94, 115, 103], [76, 103, 104], [80, 106, 99],
[100, 107, 108], [1061, 1071, 122], [1061, 122, 88], [88, 122, 89], [89, 122, 113], [89, 113, 75],
[75, 114, 90], [90, 114, 91], [91, 142, 68], [103, 118, 104], [78, 105, 148], [80, 79, 149],
[80, 149, 106], [106, 149, 110], [107, 111, 108], [112, 127, 97], [75, 113, 114], [91, 114, 142],
[68, 142, 98], [115, 116, 103], [103, 116, 117], [103, 117, 118], [104, 118, 132], [79, 148, 149],
[149, 119, 110], [111, 120, 108], [85, 108, 121], [1071, 159, 122], [113, 122, 141], [113, 141, 114],
[114, 161, 142], [92, 128, 102], [102, 129, 115], [115, 130, 116], [116, 130, 124], [116, 124, 117],
[77, 109, 105], [119, 149, 125], [120, 135, 108], [120, 126, 135], [108, 135, 121], [101, 121, 153],
[101, 153, 112], [115, 129, 144], [115, 144, 130], [124, 130, 131], [124, 131, 117], [117, 131, 137],
[117, 137, 118], [105, 183, 148], [149, 133, 125], [126, 134, 135], [153, 140, 112], [112, 140, 127],
[122, 159, 141], [141, 161, 114], [142, 162, 98], [98, 162, 123], [123, 162, 143], [123, 143, 128],
[128, 143, 102], [102, 164, 129], [130, 136, 131], [109, 183, 105], [109, 169, 183], [133, 149, 138],
[134, 139, 135], [135, 152, 121], [143, 164, 102], [144, 145, 130], [130, 145, 136], [136, 146, 131],
[136, 145, 146], [131, 146, 137], [137, 146, 147], [137, 147, 118], [118, 147, 132], [132, 147, 167],
[132, 167, 168], [132, 168, 109], [109, 168, 169], [149, 150, 138], [139, 151, 135], [135, 151, 152],
[121, 152, 153], [141, 160, 161], [162, 163, 143], [144, 165, 145], [145, 165, 154], [145, 154, 146],
[146, 154, 166], [146, 155, 147], [146, 166, 155], [147, 155, 167], [150, 149, 156], [151, 157, 152],
[153, 158, 140], [140, 174, 127], [141, 159, 160], [142, 161, 162], [143, 163, 164], [129, 165, 144],
[154, 165, 166], [155, 166, 167], [149, 170, 156], [157, 171, 152], [152, 171, 186], [186, 187, 152],
[152, 187, 153], [163, 176, 177], [163, 177, 164], [164, 177, 178], [164, 178, 179], [164, 179, 129],
[129, 179, 165], [165, 179, 180], [165, 181, 166], [166, 181, 167], [167, 181, 182], [167, 182, 168],
[148, 198, 149], [170, 149, 172], [171, 173, 186], [1100, 206, 159], [161, 160, 191], [161, 191, 175],
[161, 175, 162], [162, 175, 176], [162, 176, 163], [165, 180, 181], [149, 184, 172], [173, 185, 186],
[187, 201, 153], [153, 201, 158], [158, 202, 140], [140, 202, 205], [140, 205, 174], [159, 190, 160],
[159, 206, 190], [160, 190, 191], [175, 191, 192], [175, 192, 176], [176, 192, 193], [176, 193, 194],
[176, 194, 177], [177, 194, 178], [181, 197, 182], [168, 231, 169], [148, 183, 198], [198, 232, 149],
[149, 232, 184], [184, 232, 188], [185, 189, 186], [178, 194, 195], [178, 195, 196], [178, 196, 179],
[179, 196, 197], [179, 197, 180], [180, 197, 181], [183, 169, 250], [232, 199, 188], [189, 200, 186],
[158, 201, 202], [206, 207, 190], [190, 208, 191], [193, 192, 210], [193, 210, 194], [194, 212, 195],
[195, 212, 196], [197, 215, 182], [199, 232, 203], [200, 219, 186], [200, 204, 219], [186, 219, 187],
[174, 205, 1366], [190, 207, 208], [191, 208, 209], [191, 209, 192], [192, 209, 210], [194, 210, 211],
[194, 211, 212], [212, 213, 196], [196, 213, 197], [197, 213, 214], [197, 214, 215], [182, 215, 168],
[168, 215, 231], [231, 249, 169], [183, 250, 216], [183, 216, 198], [232, 217, 203], [204, 218, 219],
[187, 219, 201], [202, 240, 205], [205, 241, 1366], [210, 224, 211], [169, 249, 250], [217, 232, 220],
[218, 221, 219], [201, 235, 202], [202, 235, 240], [207, 242, 208], [209, 208, 222], [209, 222, 223],
[209, 223, 210], [210, 223, 224], [211, 224, 225], [211, 225, 212], [212, 225, 226], [212, 226, 213],
[213, 226, 227], [213, 227, 214], [214, 228, 229], [214, 229, 215], [215, 229, 230], [232, 233, 220],
[221, 234, 219], [219, 253, 201], [201, 253, 235], [240, 241, 205], [206, 284, 207], [208, 242, 222],
[222, 243, 223], [223, 244, 224], [224, 244, 225], [214, 227, 245], [214, 245, 228], [228, 236, 229],
[229, 237, 230], [215, 230, 231], [233, 232, 238], [234, 265, 219], [234, 239, 265], [207, 255, 242],
[222, 242, 243], [228, 245, 246], [228, 246, 236], [236, 247, 229], [236, 246, 247], [229, 247, 237],
[237, 248, 230], [237, 247, 248], [230, 248, 231], [232, 251, 238], [239, 252, 265], [219, 265, 253],
[235, 253, 254], [226, 225, 288], [245, 227, 289], [246, 245, 260], [246, 260, 256], [246, 256, 247],
[247, 256, 261], [247, 261, 257], [247, 257, 248], [248, 262, 231], [231, 262, 268], [249, 291, 250],
[216, 269, 198], [251, 232, 258], [252, 259, 265], [235, 272, 240], [235, 254, 272], [240, 272, 241],
[207, 285, 255], [207, 284, 285], [255, 273, 242], [242, 273, 287], [242, 287, 243], [223, 243, 274],
[223, 274, 244], [225, 244, 288], [226, 288, 227], [245, 289, 260], [256, 260, 261], [257, 262, 248],
[231, 268, 249], [249, 268, 291], [232, 263, 258], [232, 292, 263], [259, 264, 265], [265, 279, 253],
[253, 279, 254], [241, 272, 266], [206, 1113, 284], [284, 306, 285], [227, 288, 289], [260, 267, 261],
[261, 267, 276], [261, 276, 257], [257, 276, 262], [262, 280, 268], [250, 291, 216], [216, 291, 269],
[198, 269, 323], [198, 323, 232], [263, 292, 270], [264, 271, 265], [254, 279, 272], [255, 285, 273],
[274, 314, 244], [289, 275, 260], [260, 275, 267], [267, 275, 276], [232, 323, 292], [292, 277, 270],
[271, 278, 265], [265, 278, 295], [265, 295, 279], [273, 307, 287], [275, 290, 276], [276, 280, 262],
[280, 300, 268], [277, 292, 281], [278, 282, 295], [279, 283, 272], [272, 283, 266], [285, 286, 273],
[273, 286, 307], [243, 308, 274], [244, 314, 288], [275, 289, 290], [276, 290, 280], [268, 309, 291],
[292, 293, 281], [282, 294, 295], [295, 303, 279], [279, 303, 283], [286, 319, 307], [287, 307, 321],
[287, 321, 243], [289, 298, 290], [290, 299, 280], [280, 299, 300], [291, 322, 269], [293, 292, 296],
[294, 297, 332], [294, 332, 295], [266, 283, 1421], [284, 318, 306], [274, 308, 314], [289, 288, 298],
[290, 298, 299], [292, 301, 296], [297, 302, 332], [283, 313, 1421], [285, 306, 286], [286, 306, 333],
[307, 320, 321], [243, 321, 308], [288, 314, 337], [288, 337, 298], [268, 300, 309], [323, 324, 292],
[301, 292, 304], [302, 305, 332], [283, 303, 313], [286, 333, 319], [308, 330, 314], [291, 309, 322],
[292, 310, 304], [305, 312, 332], [295, 332, 303], [319, 336, 307], [319, 335, 336], [299, 298, 338],
[300, 339, 309], [309, 345, 322], [269, 322, 323], [292, 324, 315], [292, 315, 310], [311, 316, 327],
[311, 327, 317], [312, 317, 327], [312, 327, 332], [1421, 313, 342], [299, 339, 300], [315, 324, 325],
[316, 326, 327], [307, 336, 320], [321, 329, 308], [308, 329, 330], [314, 330, 337], [299, 338, 339],
[325, 324, 328], [326, 328, 341], [326, 341, 327], [303, 334, 313], [306, 318, 340], [306, 340, 333],
[319, 333, 335], [320, 329, 321], [298, 337, 338], [322, 331, 323], [328, 324, 341], [332, 334, 303],
[320, 336, 349], [320, 349, 329], [322, 345, 331], [327, 354, 332], [318, 347, 340], [340, 348, 333],
[339, 345, 309], [331, 352, 323], [323, 341, 324], [327, 341, 354], [335, 353, 336], [329, 350, 330],
[337, 330, 343], [337, 343, 338], [338, 344, 339], [331, 351, 352], [323, 352, 341], [313, 346, 342],
[329, 349, 350], [343, 344, 338], [332, 346, 334], [334, 346, 313], [333, 348, 335], [335, 348, 353],
[331, 345, 351], [330, 350, 343], [343, 356, 344], [339, 344, 345], [341, 352, 354], [354, 346, 332],
[348, 340, 359], [353, 355, 336], [343, 350, 356], [345, 357, 351], [340, 347, 359], [344, 357, 345],
[348, 359, 365], [349, 336, 368], [351, 354, 352], [346, 1460, 342], [348, 365, 360], [348, 360, 353],
[336, 355, 368], [351, 357, 361], [1153, 364, 347], [344, 356, 357], [351, 361, 354], [346, 354, 362],
[347, 364, 359], [360, 366, 353], [350, 349, 374], [356, 369, 357], [361, 362, 354], [346, 362, 1460],
[358, 364, 1153], [353, 367, 355], [353, 366, 367], [355, 367, 368], [349, 368, 374], [350, 371, 356],
[357, 369, 361], [1460, 362, 363], [364, 370, 359], [359, 370, 365], [356, 371, 369], [362, 372, 363],
[367, 373, 368], [361, 377, 362], [358, 378, 364], [360, 376, 366], [365, 376, 360], [366, 376, 367],
[350, 374, 371], [1477, 363, 384], [1477, 384, 1491], [358, 1175, 378], [371, 375, 369],
[369, 375, 361], [363, 372, 384], [376, 379, 367], [375, 377, 361], [378, 385, 364], [364, 385, 382],
[364, 382, 370], [365, 370, 382], [368, 380, 374], [374, 380, 371], [371, 381, 375], [367, 379, 373],
[368, 373, 386], [380, 381, 371], [375, 381, 377], [377, 390, 362], [362, 390, 372], [382, 391, 365],
[365, 391, 376], [368, 386, 380], [381, 383, 377], [378, 1175, 388], [378, 388, 385], [376, 391, 379],
[379, 389, 373], [383, 390, 377], [380, 387, 381], [386, 387, 380], [373, 389, 386], [381, 392, 383],
[390, 384, 372], [381, 387, 392], [379, 391, 389], [388, 397, 385], [387, 393, 392], [383, 395, 390],
[391, 694, 389], [386, 389, 393], [386, 393, 387], [390, 395, 394], [390, 394, 384],
[1491, 384, 1539], [385, 397, 382], [392, 395, 383], [382, 397, 391], [393, 396, 392],
[392, 396, 395], [384, 394, 1539], [1197, 697, 388], [388, 697, 397], [389, 694, 393],
[393, 693, 396], [391, 397, 694], [395, 398, 394], [396, 696, 395], [394, 398, 1539], [694, 693, 393],
[395, 696, 398], [399, 414, 440], [399, 440, 400], [400, 440, 401], [401, 440, 402], [402, 440, 403],
[403, 440, 404], [404, 440, 405], [405, 440, 406], [406, 440, 407], [407, 440, 408], [408, 440, 409],
[409, 440, 443], [409, 443, 410], [410, 443, 411], [411, 443, 415], [412, 426, 445], [412, 445, 413],
[413, 445, 414], [414, 445, 440], [415, 443, 416], [416, 443, 417], [417, 443, 418], [418, 443, 419],
[419, 443, 420], [420, 443, 421], [421, 443, 427], [422, 434, 445], [422, 445, 423], [423, 445, 424],
[424, 445, 425], [425, 445, 426], [427, 443, 428], [428, 443, 429], [429, 443, 435], [430, 439, 456],
[430, 456, 431], [431, 456, 432], [432, 456, 433], [433, 456, 434], [434, 456, 445], [440, 445, 457],
[435, 447, 436], [435, 443, 447], [437, 441, 456], [437, 456, 438], [438, 456, 439], [441, 442, 456],
[442, 444, 456], [440, 457, 443], [444, 446, 456], [446, 450, 456], [448, 451, 456], [448, 456, 449],
[449, 456, 450], [456, 469, 445], [445, 469, 457], [451, 452, 456], [443, 457, 447], [447, 457, 460],
[452, 455, 456], [453, 458, 479], [453, 479, 454], [454, 479, 455], [455, 479, 456], [458, 459, 479],
[459, 461, 479], [461, 462, 479], [457, 469, 470], [457, 475, 460], [460, 475, 477], [462, 463, 479],
[463, 464, 479], [464, 465, 479], [460, 477, 1232], [465, 466, 479], [466, 467, 482], [466, 482, 479],
[456, 479, 469], [457, 470, 475], [467, 468, 482], [468, 473, 482], [471, 474, 482], [471, 482, 472],
[472, 482, 473], [474, 476, 482], [469, 487, 470], [475, 492, 477], [476, 478, 482], [479, 487, 469],
[478, 480, 489], [478, 489, 482], [482, 489, 479], [479, 485, 487], [480, 481, 489], [481, 483, 489],
[489, 485, 479], [477, 492, 1211], [483, 484, 489], [484, 486, 489], [487, 507, 470], [486, 488, 489],
[488, 490, 489], [489, 504, 485], [485, 498, 487], [490, 491, 489], [489, 495, 504], [504, 498, 485],
[470, 492, 475], [491, 493, 502], [491, 502, 489], [504, 495, 503], [493, 494, 502], [470, 507, 500],
[494, 496, 502], [496, 497, 502], [489, 502, 495], [498, 507, 487], [470, 500, 604], [497, 499, 502],
[502, 503, 495], [504, 505, 498], [498, 506, 507], [499, 501, 502], [503, 517, 504], [498, 505, 506],
[507, 521, 500], [492, 523, 1211], [501, 508, 502], [503, 526, 517], [517, 510, 504], [504, 512, 505],
[506, 505, 513], [506, 514, 507], [508, 509, 502], [502, 525, 503], [504, 510, 511], [504, 511, 512],
[505, 512, 513], [506, 513, 514], [514, 521, 507], [509, 515, 538], [509, 538, 502], [503, 525, 526],
[511, 510, 519], [521, 529, 500], [515, 516, 538], [517, 518, 510], [510, 518, 519], [511, 519, 512],
[512, 519, 520], [512, 520, 513], [513, 527, 514], [529, 530, 500], [500, 530, 604], [516, 522, 538],
[520, 527, 513], [514, 528, 521], [470, 604, 492], [522, 524, 538], [514, 527, 528], [521, 528, 529],
[523, 1217, 1211], [524, 531, 538], [502, 538, 525], [525, 533, 526], [526, 533, 534],
[526, 534, 517], [517, 534, 518], [519, 518, 542], [519, 542, 520], [520, 542, 543], [520, 543, 527],
[529, 558, 530], [531, 532, 538], [525, 539, 533], [527, 543, 535], [527, 535, 528], [528, 535, 544],
[528, 544, 545], [528, 545, 529], [532, 536, 538], [518, 540, 541], [518, 541, 542], [529, 545, 558],
[536, 537, 538], [538, 539, 525], [533, 539, 552], [533, 552, 534], [518, 534, 540], [545, 544, 557],
[537, 548, 612], [537, 612, 538], [534, 553, 540], [540, 554, 541], [542, 541, 555], [543, 573, 556],
[543, 556, 535], [545, 575, 558], [546, 551, 612], [546, 612, 547], [547, 612, 548], [539, 568, 552],
[534, 552, 553], [540, 553, 554], [542, 555, 543], [545, 557, 575], [530, 558, 604], [604, 523, 492],
[549, 561, 583], [549, 583, 550], [550, 583, 551], [551, 583, 612], [538, 567, 539], [539, 567, 568],
[552, 569, 553], [553, 569, 570], [553, 570, 554], [554, 571, 541], [541, 571, 555], [555, 572, 543],
[543, 572, 573], [556, 574, 535], [535, 574, 544], [559, 566, 583], [559, 583, 560], [560, 583, 561],
[552, 568, 584], [552, 584, 569], [570, 571, 554], [555, 571, 572], [544, 574, 557], [562, 578, 611],
[562, 611, 563], [563, 611, 564], [564, 611, 565], [565, 611, 566], [566, 611, 583], [538, 612, 613],
[538, 613, 567], [568, 567, 614], [568, 596, 584], [584, 585, 569], [569, 585, 570], [570, 585, 586],
[570, 586, 571], [572, 588, 573], [573, 588, 579], [573, 594, 556], [556, 594, 574], [574, 589, 557],
[557, 589, 603], [557, 603, 575], [558, 575, 604], [576, 582, 611], [576, 611, 577], [577, 611, 578],
[568, 614, 596], [571, 586, 587], [587, 593, 571], [571, 593, 572], [572, 593, 588], [579, 594, 573],
[574, 594, 602], [574, 602, 589], [604, 655, 523], [580, 592, 611], [580, 611, 581], [581, 611, 582],
[614, 615, 596], [584, 597, 585], [585, 617, 586], [593, 599, 588], [588, 599, 600], [588, 600, 579],
[579, 600, 601], [579, 601, 594], [594, 601, 622], [575, 641, 604], [590, 595, 611], [590, 611, 591],
[591, 611, 592], [613, 614, 567], [584, 596, 597], [597, 617, 585], [586, 598, 587], [587, 598, 593],
[593, 598, 599], [594, 622, 602], [603, 641, 575], [595, 607, 643], [595, 643, 611], [596, 616, 597],
[598, 618, 599], [599, 620, 600], [600, 620, 601], [601, 621, 622], [602, 622, 632], [523, 658, 1217],
[605, 610, 643], [605, 643, 606], [606, 643, 607], [596, 615, 616], [597, 616, 617], [586, 617, 598],
[598, 617, 618], [618, 619, 599], [599, 619, 620], [601, 620, 621], [608, 623, 643], [608, 643, 609],
[609, 643, 610], [611, 643, 650], [611, 650, 583], [614, 613, 642], [616, 627, 617], [617, 628, 618],
[618, 628, 619], [619, 629, 620], [620, 629, 621], [621, 629, 630], [622, 621, 631], [622, 631, 632],
[602, 632, 640], [602, 640, 589], [603, 589, 648], [603, 648, 641], [623, 626, 643], [614, 642, 635],
[614, 635, 615], [616, 615, 627], [617, 627, 628], [619, 628, 629], [621, 630, 631], [589, 640, 648],
[523, 655, 658], [624, 634, 643], [624, 643, 625], [625, 643, 626], [615, 636, 627], [627, 636, 628],
[629, 628, 645], [629, 645, 637], [629, 637, 630], [630, 638, 631], [640, 647, 648], [604, 641, 655],
[633, 987, 634], [634, 987, 643], [628, 636, 644], [630, 637, 638], [631, 638, 639], [631, 639, 632],
[613, 612, 642], [628, 644, 645], [645, 646, 637], [638, 646, 639], [632, 639, 647], [632, 647, 640],
[641, 648, 655], [642, 652, 635], [615, 635, 636], [636, 635, 644], [637, 646, 638], [987, 659, 643],
[612, 583, 651], [612, 651, 642], [644, 635, 656], [644, 656, 649], [644, 649, 645], [646, 654, 639],
[642, 651, 652], [645, 649, 653], [645, 653, 646], [646, 653, 654], [639, 654, 647], [647, 654, 648],
[583, 660, 651], [652, 651, 635], [635, 651, 656], [649, 657, 653], [643, 659, 650], [583, 650, 660],
[649, 656, 664], [649, 664, 657], [653, 657, 654], [654, 662, 648], [655, 668, 658], [651, 661, 656],
[656, 661, 664], [654, 657, 662], [648, 663, 655], [651, 660, 661], [648, 662, 663], [659, 671, 650],
[650, 671, 660], [657, 664, 665], [657, 665, 662], [662, 665, 663], [655, 663, 668], [660, 667, 661],
[661, 667, 664], [659, 677, 671], [658, 672, 1219], [671, 669, 660], [660, 666, 667], [665, 670, 663],
[660, 669, 666], [664, 667, 665], [663, 670, 676], [658, 668, 672], [666, 673, 667], [667, 673, 665],
[663, 676, 668], [666, 669, 678], [666, 678, 673], [665, 673, 670], [673, 675, 670], [671, 674, 669],
[669, 674, 678], [670, 680, 676], [672, 668, 681], [675, 680, 670], [681, 1209, 672], [678, 679, 673],
[680, 684, 676], [671, 677, 674], [673, 679, 675], [668, 676, 681], [677, 682, 674], [678, 683, 679],
[679, 686, 675], [675, 686, 680], [676, 684, 681], [678, 674, 683], [995, 988, 677], [682, 683, 674],
[683, 686, 679], [677, 988, 682], [683, 689, 686], [684, 687, 681], [681, 1213, 1209],
[682, 689, 683], [682, 685, 689], [680, 686, 688], [680, 688, 684], [684, 688, 690], [681, 687, 1213],
[685, 692, 689], [682, 988, 685], [685, 988, 691], [684, 690, 687], [685, 691, 692], [689, 1, 686],
[686, 1, 688], [691, 3, 692], [688, 2, 690], [690, 2, 687], [689, 692, 1], [396, 693, 695],
[398, 699, 1539], [694, 397, 697], [396, 695, 696], [398, 696, 699], [697, 698, 694], [694, 698, 693],
[693, 698, 695], [696, 701, 699], [697, 1197, 702], [698, 700, 695], [695, 703, 696], [697, 702, 698],
[695, 705, 703], [703, 701, 696], [701, 706, 699], [1539, 699, 1533], [702, 700, 698],
[700, 705, 695], [1197, 1200, 702], [700, 702, 704], [700, 704, 705], [706, 707, 699],
[699, 707, 1533], [701, 710, 706], [1200, 709, 702], [703, 705, 708], [703, 708, 701],
[702, 709, 704], [701, 708, 710], [1533, 707, 1541], [710, 711, 706], [705, 704, 715],
[705, 714, 708], [708, 714, 717], [708, 717, 710], [709, 1207, 712], [709, 713, 704], [715, 714, 705],
[706, 711, 716], [706, 716, 707], [704, 713, 715], [710, 717, 711], [716, 1541, 707], [709, 712, 713],
[715, 718, 714], [712, 719, 713], [718, 722, 714], [717, 720, 711], [716, 1543, 1541],
[713, 719, 715], [712, 1207, 719], [719, 718, 715], [714, 722, 717], [722, 723, 717], [717, 723, 720],
[711, 720, 716], [1207, 724, 719], [718, 725, 721], [718, 721, 722], [719, 725, 718],
[716, 745, 1543], [725, 726, 721], [721, 727, 722], [723, 728, 720], [720, 750, 716],
[1207, 733, 724], [719, 754, 725], [721, 726, 727], [722, 731, 723], [723, 731, 728], [754, 734, 725],
[727, 730, 722], [722, 730, 735], [728, 731, 732], [725, 734, 726], [726, 729, 727], [722, 735, 731],
[720, 728, 738], [720, 738, 750], [716, 750, 745], [726, 734, 739], [731, 736, 737], [731, 737, 732],
[728, 732, 743], [724, 733, 748], [724, 740, 719], [726, 739, 729], [729, 730, 727], [735, 736, 731],
[732, 737, 742], [728, 743, 738], [724, 748, 740], [740, 754, 719], [730, 741, 735], [736, 749, 737],
[743, 761, 738], [738, 744, 750], [739, 755, 729], [729, 755, 730], [742, 760, 732], [732, 760, 743],
[733, 746, 747], [730, 755, 766], [730, 766, 741], [741, 756, 735], [735, 756, 736], [736, 756, 757],
[736, 757, 749], [737, 749, 758], [737, 758, 759], [737, 759, 742], [738, 761, 744], [750, 846, 745],
[747, 751, 733], [733, 751, 752], [733, 753, 748], [733, 752, 753], [741, 767, 756], [749, 757, 758],
[742, 759, 760], [760, 786, 743], [743, 786, 761], [744, 800, 750], [745, 846, 1536], [753, 762, 748],
[739, 734, 778], [767, 769, 756], [756, 770, 757], [756, 769, 770], [758, 757, 771], [759, 758, 772],
[759, 773, 760], [759, 772, 773], [760, 773, 786], [744, 761, 799], [762, 763, 748], [748, 763, 764],
[748, 764, 765], [766, 767, 741], [767, 768, 769], [757, 770, 771], [758, 771, 772], [750, 800, 834],
[765, 774, 748], [748, 774, 775], [748, 775, 776], [739, 779, 755], [766, 780, 767], [766, 793, 780],
[767, 780, 768], [768, 781, 769], [769, 781, 782], [769, 783, 770], [769, 782, 783], [771, 784, 772],
[772, 784, 785], [761, 786, 799], [744, 799, 800], [776, 777, 748], [778, 839, 739], [739, 839, 779],
[755, 793, 766], [768, 780, 781], [770, 783, 771], [771, 783, 784], [772, 785, 773], [777, 787, 748],
[748, 787, 788], [748, 788, 789], [748, 789, 740], [734, 754, 778], [755, 779, 793], [793, 779, 812],
[782, 795, 783], [783, 796, 797], [783, 797, 784], [773, 785, 798], [773, 798, 786], [800, 799, 821],
[789, 790, 740], [740, 790, 791], [740, 791, 792], [780, 793, 794], [780, 794, 781], [781, 804, 782],
[782, 804, 795], [783, 795, 796], [784, 805, 785], [784, 797, 805], [785, 805, 798], [750, 848, 846],
[792, 801, 740], [740, 801, 802], [740, 802, 803], [779, 839, 811], [779, 811, 812], [793, 813, 794],
[781, 794, 814], [781, 814, 804], [804, 816, 795], [804, 815, 816], [798, 805, 819], [786, 820, 799],
[799, 820, 821], [803, 806, 740], [740, 806, 807], [740, 807, 808], [740, 808, 809], [740, 809, 810],
[740, 810, 754], [793, 812, 813], [794, 813, 814], [804, 814, 815], [795, 816, 817], [795, 817, 796],
[796, 817, 818], [796, 818, 797], [797, 819, 805], [797, 818, 819], [798, 819, 832], [798, 832, 786],
[786, 832, 820], [800, 821, 834], [750, 834, 848], [810, 822, 754], [754, 822, 823], [754, 823, 824],
[812, 828, 813], [815, 814, 829], [816, 815, 830], [816, 830, 817], [817, 830, 843], [818, 817, 831],
[821, 833, 834], [824, 825, 754], [754, 825, 826], [754, 826, 827], [754, 827, 778], [812, 811, 828],
[815, 829, 830], [817, 843, 831], [818, 831, 819], [819, 831, 853], [819, 853, 832], [820, 845, 821],
[827, 835, 778], [778, 835, 836], [778, 836, 837], [813, 840, 814], [814, 841, 829], [829, 841, 842],
[829, 842, 830], [830, 842, 843], [821, 845, 833], [837, 838, 778], [811, 850, 828], [828, 840, 813],
[840, 851, 814], [814, 851, 841], [831, 843, 844], [831, 844, 853], [838, 847, 778], [828, 850, 840],
[853, 854, 832], [820, 832, 854], [845, 860, 833], [847, 849, 778], [778, 849, 839], [811, 839, 850],
[840, 850, 851], [841, 852, 842], [841, 851, 852], [842, 852, 865], [842, 865, 843], [843, 865, 844],
[820, 854, 845], [849, 855, 839], [851, 850, 858], [854, 859, 845], [860, 861, 833], [833, 861, 834],
[848, 834, 888], [846, 848, 889], [855, 856, 839], [839, 871, 850], [850, 857, 858], [858, 864, 851],
[851, 864, 852], [844, 865, 866], [844, 866, 853], [845, 859, 860], [834, 861, 888], [856, 862, 839],
[853, 867, 854], [860, 859, 868], [860, 868, 861], [861, 868, 888], [848, 888, 892], [1536, 846, 894],
[862, 863, 839], [857, 872, 858], [864, 873, 852], [852, 873, 865], [853, 866, 867], [863, 869, 839],
[865, 874, 866], [866, 874, 875], [866, 875, 867], [867, 875, 882], [867, 876, 854], [854, 876, 859],
[859, 877, 868], [869, 870, 839], [839, 870, 871], [850, 871, 857], [857, 871, 872], [865, 873, 874],
[867, 882, 876], [859, 876, 877], [846, 889, 894], [870, 878, 871], [858, 872, 864], [873, 880, 874],
[874, 881, 875], [875, 881, 882], [876, 883, 877], [868, 877, 884], [878, 879, 871], [864, 872, 873],
[873, 872, 880], [876, 882, 883], [877, 883, 884], [879, 885, 871], [874, 880, 881], [868, 884, 898],
[885, 886, 871], [872, 871, 896], [882, 881, 887], [882, 887, 883], [883, 887, 884], [868, 898, 888],
[848, 892, 889], [886, 890, 871], [890, 891, 871], [871, 891, 896], [872, 896, 900], [872, 900, 880],
[880, 900, 881], [891, 893, 896], [884, 887, 906], [893, 895, 896], [881, 903, 887], [887, 903, 906],
[888, 898, 892], [889, 892, 907], [895, 897, 896], [881, 900, 903], [897, 899, 896], [884, 906, 898],
[899, 901, 896], [901, 902, 896], [900, 896, 903], [902, 904, 896], [889, 907, 894], [904, 905, 896],
[896, 910, 903], [905, 908, 896], [908, 909, 896], [892, 921, 907], [909, 911, 896], [898, 921, 892],
[911, 912, 896], [910, 906, 903], [906, 921, 898], [894, 907, 927], [912, 913, 896], [896, 913, 914],
[896, 915, 910], [896, 914, 915], [915, 916, 910], [916, 917, 910], [906, 926, 921], [907, 921, 927],
[917, 918, 910], [906, 910, 926], [918, 919, 910], [919, 920, 910], [920, 922, 910], [922, 923, 910],
[923, 924, 910], [924, 925, 910], [921, 926, 941], [925, 928, 910], [921, 941, 939], [928, 929, 910],
[910, 929, 930], [910, 930, 931], [931, 932, 910], [932, 933, 910], [933, 934, 910], [910, 934, 935],
[910, 936, 926], [910, 935, 936], [939, 927, 921], [936, 938, 926], [938, 940, 926], [940, 942, 926],
[927, 939, 937], [942, 943, 926], [943, 944, 926], [926, 944, 945], [926, 945, 946], [946, 947, 926],
[926, 947, 948], [926, 948, 949], [926, 949, 950], [926, 950, 951], [926, 951, 941], [937, 952, 953],
[951, 954, 941], [941, 954, 955], [941, 955, 956], [941, 956, 957], [941, 957, 958], [939, 959, 937],
[937, 959, 960], [937, 960, 961], [937, 961, 952], [958, 962, 941], [941, 962, 963], [941, 963, 964],
[939, 965, 966], [939, 966, 967], [939, 967, 968], [939, 968, 969], [939, 969, 970], [939, 970, 971],
[939, 971, 959], [964, 972, 941], [941, 972, 973], [941, 973, 974], [941, 974, 975], [941, 975, 976],
[941, 976, 977], [941, 978, 939], [941, 977, 978], [939, 978, 979], [939, 979, 980], [939, 980, 981],
[939, 981, 982], [939, 982, 983], [939, 983, 984], [939, 984, 965], [633, 985, 987], [991, 995, 677],
[985, 986, 987], [659, 987, 991], [659, 991, 677], [986, 989, 987], [989, 990, 987], [990, 992, 987],
[987, 999, 991], [992, 993, 987], [987, 993, 999], [993, 994, 999], [994, 996, 999], [996, 997, 999],
[999, 1002, 991], [997, 998, 999], [991, 1002, 995], [995, 1007, 988], [998, 1000, 999],
[1000, 1002, 999], [1000, 1001, 1002], [1001, 1003, 1002], [995, 1011, 1007], [1003, 1004, 1002],
[1004, 1005, 1002], [1002, 1016, 995], [995, 1016, 1011], [1005, 1006, 1002], [1002, 1006, 1013],
[1006, 1008, 1013], [1008, 1009, 1013], [1002, 1013, 1016], [1009, 1010, 1013], [1010, 1012, 1013],
[1012, 1014, 1013], [1013, 1020, 1016], [1011, 1023, 1007], [1007, 1023, 1017], [1014, 1015, 1013],
[1015, 1018, 1013], [1011, 1016, 1029], [1018, 1020, 1013], [1018, 1019, 1020], [1029, 1030, 1011],
[1011, 1030, 1023], [1019, 1021, 1020], [1017, 1023, 21], [21, 1023, 28], [1021, 1022, 1020],
[1022, 1028, 1020], [1022, 1024, 1028], [1020, 1028, 1016], [1024, 1025, 1028], [1028, 1029, 1016],
[1025, 1026, 1028], [1023, 1035, 28], [1026, 1027, 1028], [1023, 1038, 1035], [1027, 1031, 1028],
[1030, 1038, 1023], [1031, 1032, 1028], [1032, 1033, 1028], [1029, 1028, 1041], [1029, 1044, 1030],
[1033, 1034, 1028], [1038, 1045, 1035], [1034, 1036, 1028], [1028, 1036, 1041], [1029, 1041, 1044],
[1036, 1037, 1041], [1037, 1039, 1041], [1039, 1040, 1041], [1040, 1042, 1041], [1038, 1030, 1050],
[44, 1046, 55], [1042, 1043, 1041], [1038, 1050, 1045], [1043, 1047, 1041], [1041, 1047, 1049],
[1041, 1049, 1044], [1044, 1053, 1030], [1030, 1053, 1050], [1047, 1048, 1049], [1045, 1054, 1035],
[1035, 1054, 1046], [1048, 1051, 1049], [1044, 1049, 1053], [1045, 1059, 1054], [1051, 1052, 1049],
[1050, 1053, 1058], [1050, 1058, 1045], [1045, 1058, 1059], [1054, 1064, 1046], [1052, 1057, 1049],
[1052, 1055, 1057], [1049, 1057, 1053], [1055, 1056, 1057], [1046, 1061, 55], [1056, 1060, 1057],
[1046, 1064, 1061], [1060, 1062, 1057], [1057, 1066, 1053], [1066, 1067, 1053], [1053, 1067, 1058],
[1062, 1063, 1057], [1057, 1063, 1066], [1059, 1069, 1054], [1054, 1069, 1070], [1054, 1070, 1064],
[1064, 1071, 1061], [1063, 1065, 1066], [1067, 1074, 1058], [1059, 1058, 1069], [1065, 1068, 1066],
[1058, 1074, 1075], [1058, 1075, 1069], [1068, 1073, 1066], [1068, 1072, 1073], [1066, 1073, 1067],
[1067, 1073, 1074], [1064, 1070, 1080], [1064, 1080, 1071], [1072, 1076, 1073], [1075, 1079, 1069],
[1069, 1079, 1070], [1070, 1079, 1080], [1076, 1077, 1073], [1073, 1082, 1074], [1071, 1080, 1084],
[1077, 1078, 1073], [1078, 1081, 1073], [1073, 1081, 1082], [1075, 1089, 1079], [1081, 1086, 1082],
[1081, 1083, 1086], [1082, 1088, 1074], [1074, 1088, 1075], [1075, 1088, 1089], [1083, 1085, 1086],
[1082, 1086, 1088], [1079, 1089, 1080], [1080, 1100, 1084], [1084, 159, 1071], [1085, 1087, 1086],
[1086, 1094, 1088], [1080, 1089, 1092], [1087, 1090, 1086], [1088, 1094, 1095], [1084, 1100, 159],
[1090, 1091, 1086], [1088, 1095, 1089], [1080, 1092, 1100], [1091, 1093, 1086], [1086, 1093, 1094],
[1089, 1104, 1092], [1093, 1096, 1094], [1094, 1098, 1095], [1096, 1097, 1094], [1095, 1098, 1104],
[1095, 1104, 1089], [1097, 1102, 1094], [1097, 1099, 1102], [1099, 1101, 1102], [1094, 1102, 1098],
[1098, 1107, 1104], [1101, 1103, 1102], [1102, 1106, 1098], [1098, 1106, 1107], [1103, 1105, 1102],
[1107, 1112, 1104], [1105, 1110, 1102], [1105, 1108, 1110], [1104, 1117, 1092], [1092, 1117, 1100],
[1100, 1117, 1113], [1100, 1113, 206], [1108, 1109, 1110], [1102, 1110, 1106], [1107, 1106, 1116],
[1107, 1116, 1112], [1109, 1111, 1110], [1106, 1120, 1116], [1104, 1112, 1117], [1111, 1114, 1110],
[1110, 1114, 1119], [1110, 1119, 1106], [1106, 1119, 1120], [1114, 1115, 1119], [1115, 1118, 1119],
[1120, 1124, 1116], [1116, 1126, 1112], [1113, 1117, 1122], [1118, 1121, 1119], [1116, 1129, 1126],
[1112, 1126, 1117], [1121, 1128, 1119], [1121, 1123, 1128], [1116, 1124, 1129], [1117, 1126, 1122],
[1113, 1122, 1135], [1123, 1125, 1128], [1119, 1128, 1132], [1125, 1127, 1128], [1119, 1132, 1133],
[1119, 1133, 1120], [1120, 1133, 1124], [1113, 1135, 284], [1127, 1130, 1128], [1130, 1131, 1132],
[1130, 1132, 1128], [1124, 1133, 1138], [1124, 1138, 1129], [1126, 1129, 1139], [1126, 1139, 1122],
[1131, 1134, 1132], [1132, 1137, 1133], [1122, 1139, 1135], [1135, 318, 284], [1134, 1136, 1132],
[1132, 1136, 1137], [1135, 1139, 1153], [1136, 1140, 1137], [1140, 1141, 1137], [1137, 1145, 1133],
[1133, 1145, 1148], [1133, 1148, 1138], [1129, 1138, 1139], [1141, 1142, 1144], [1141, 1144, 1137],
[1138, 1152, 1139], [1135, 347, 318], [1142, 1143, 1144], [1137, 1144, 1145], [1135, 1153, 347],
[1143, 1146, 1144], [1144, 1146, 1151], [1145, 1160, 1148], [1146, 1147, 1151], [1138, 1148, 1152],
[1139, 1152, 1153], [1147, 1149, 1151], [1144, 1156, 1145], [1145, 1156, 1160], [1149, 1150, 1151],
[1144, 1151, 1156], [1150, 1154, 1151], [1148, 1160, 1152], [1154, 1155, 1151], [1160, 1165, 1152],
[1155, 1157, 1151], [1151, 1157, 1162], [1152, 358, 1153], [1157, 1158, 1162], [1152, 1165, 358],
[1158, 1159, 1162], [1151, 1162, 1156], [1159, 1161, 1162], [1156, 1171, 1160], [1156, 1162, 1171],
[1161, 1163, 1168], [1161, 1168, 1162], [1163, 1164, 1168], [1162, 1168, 1169], [1164, 1166, 1168],
[1166, 1167, 1168], [1167, 1170, 1168], [1162, 1169, 1171], [1160, 1171, 1175], [1160, 1175, 1165],
[1170, 1172, 1168], [358, 1165, 1175], [1172, 1173, 1180], [1172, 1180, 1168], [1168, 1180, 1169],
[1173, 1174, 1180], [1174, 1176, 1180], [1169, 1185, 1171], [1171, 1185, 1175], [1175, 1185, 1189],
[1176, 1177, 1180], [1180, 1181, 1169], [1169, 1181, 1185], [1177, 1178, 1180], [1178, 1179, 1180],
[1179, 1182, 1180], [1180, 1182, 1187], [1182, 1183, 1187], [1183, 1184, 1187], [1184, 1186, 1187],
[1187, 1193, 1180], [1180, 1193, 1181], [1186, 1188, 1187], [1188, 1190, 1187], [1181, 1193, 1185],
[1185, 1200, 1189], [1175, 1189, 388], [1190, 1191, 1187], [1191, 1192, 1187], [1185, 1193, 1200],
[1189, 1197, 388], [1192, 1194, 1187], [1187, 1194, 1202], [1187, 1202, 1193], [1194, 1195, 1202],
[1195, 1196, 1202], [1202, 1207, 1193], [1189, 1200, 1197], [1196, 1198, 1202], [1198, 1199, 1202],
[1199, 1201, 1202], [1193, 1207, 1200], [1201, 1203, 733], [1201, 733, 1202], [1203, 1204, 733],
[1204, 1205, 733], [1205, 1206, 733], [1206, 1208, 733], [1202, 733, 1207], [1208, 746, 733],
[1200, 1207, 709], [447, 1210, 436], [658, 1225, 1217], [460, 1222, 447], [447, 1212, 1210],
[658, 1219, 1225], [1212, 447, 1214], [447, 1215, 1214], [447, 1216, 1215], [447, 1218, 1216],
[477, 1239, 1232], [447, 1220, 1218], [1213, 1228, 1209], [672, 1231, 1219], [460, 1232, 1222],
[1222, 1221, 447], [447, 1221, 1220], [1209, 1231, 672], [1225, 1229, 1217], [1221, 1222, 1223],
[1217, 1229, 1211], [1232, 1235, 1222], [1222, 1224, 1223], [1211, 1229, 1243], [1211, 1239, 477],
[1222, 1226, 1224], [1222, 1235, 1227], [1222, 1227, 1226], [1219, 1241, 1225], [1235, 1230, 1227],
[1209, 1228, 1238], [1209, 1238, 1231], [1235, 1233, 1230], [1213, 20, 1246], [1213, 1246, 1228],
[1243, 1239, 1211], [1235, 1234, 1233], [1219, 1231, 1241], [1225, 1242, 1229], [1243, 1253, 1239],
[1235, 1236, 1234], [1235, 1237, 1236], [1229, 1242, 1243], [1235, 1240, 1237], [1241, 1242, 1225],
[1232, 1248, 1235], [1235, 1244, 1240], [1231, 1238, 1241], [1232, 1239, 1248], [1235, 1245, 1244],
[1242, 1251, 1243], [1235, 1247, 1245], [1228, 1246, 1255], [1228, 1255, 1238], [1241, 1257, 1242],
[1248, 1249, 1235], [1235, 1249, 1247], [1241, 1238, 1265], [1243, 1258, 1253], [1248, 1250, 1249],
[1251, 1258, 1243], [1248, 1252, 1250], [1238, 1255, 1265], [1242, 1262, 1251], [1239, 1260, 1248],
[1248, 1254, 1252], [20, 1273, 1246], [1246, 1268, 1255], [1248, 1256, 1254], [1246, 1273, 1268],
[1257, 1262, 1242], [1253, 1266, 1239], [1248, 1259, 1256], [1241, 1265, 1257], [1248, 1261, 1259],
[1239, 1266, 1260], [1248, 1263, 1261], [20, 1283, 1273], [1268, 1269, 1255], [1255, 1269, 1279],
[1255, 1279, 1265], [1248, 1260, 1264], [1248, 1264, 1263], [1265, 1274, 1257], [1257, 1274, 1262],
[1251, 1262, 1258], [1258, 1277, 1253], [1253, 1271, 1266], [1260, 1267, 1264], [1262, 1276, 1258],
[1260, 1270, 1267], [1268, 1273, 1307], [1253, 1277, 1271], [1260, 1272, 1270], [1286, 1269, 1268],
[1260, 1275, 1272], [1258, 1284, 1277], [1258, 1276, 1284], [1266, 1278, 1260], [1260, 1278, 1275],
[1307, 1286, 1268], [1274, 1291, 1262], [1266, 1280, 1278], [1279, 1294, 1265], [1266, 1281, 1280],
[1283, 1311, 1273], [1273, 1311, 1307], [1286, 1300, 1269], [1265, 1291, 1274], [1277, 1284, 1288],
[1266, 1282, 1281], [1269, 1300, 1279], [1294, 1302, 1265], [1262, 1291, 1276], [1276, 1291, 1304],
[1271, 1285, 1266], [1266, 1285, 1282], [1300, 1301, 1279], [1265, 1302, 1291], [1276, 1292, 1284],
[1271, 1287, 1285], [1283, 59, 1297], [1301, 1294, 1279], [1277, 1289, 1271], [1271, 1289, 1287],
[1284, 1292, 1295], [1277, 1290, 1289], [1283, 1317, 1311], [1284, 1298, 1288], [1288, 1293, 1277],
[1277, 1293, 1290], [1297, 1317, 1283], [1292, 1305, 1295], [1284, 1295, 1298], [1288, 1296, 1293],
[59, 63, 1297], [1276, 1304, 1292], [1298, 1299, 1288], [1288, 1299, 1296], [1302, 1308, 1291],
[1298, 1303, 1299], [1307, 1312, 1286], [1286, 1312, 1300], [1291, 1308, 1304], [1295, 1306, 1298],
[1298, 1306, 1303], [1304, 1308, 1320], [1304, 1313, 1292], [1295, 1305, 1309], [1295, 1309, 1306],
[63, 97, 1297], [1300, 1312, 1326], [1300, 1326, 1301], [1301, 1326, 1319], [1301, 1319, 1294],
[1302, 1294, 1328], [1305, 1310, 1309], [1297, 97, 1324], [1307, 1311, 1318], [1307, 1318, 1312],
[1328, 1308, 1302], [1304, 1320, 1313], [1292, 1313, 1305], [1305, 1313, 1322], [1305, 1322, 1315],
[1305, 1315, 1310], [1310, 1315, 1314], [1315, 1316, 1314], [97, 1332, 1324], [1297, 1324, 1317],
[1311, 1317, 1325], [1311, 1325, 1318], [1312, 1318, 1326], [1294, 1319, 1328], [1316, 1315, 1321],
[1326, 1327, 1319], [1308, 1336, 1320], [1320, 1337, 1313], [1313, 1337, 1322], [1322, 1330, 1315],
[1315, 1323, 1321], [1318, 1325, 1333], [1319, 1327, 1335], [1319, 1335, 1328], [1315, 1330, 1323],
[1323, 1330, 1329], [1317, 1324, 1341], [1317, 1341, 1325], [1318, 1334, 1326], [1326, 1334, 1327],
[1328, 1336, 1308], [1328, 1354, 1336], [1336, 1344, 1320], [1320, 1344, 1337], [1322, 1337, 1330],
[1330, 1331, 1329], [97, 1346, 1332], [1318, 1333, 1334], [1331, 1330, 1338], [127, 1346, 97],
[1332, 1346, 1340], [1332, 1340, 1324], [1324, 1340, 1341], [1325, 1341, 1342], [1325, 1342, 1333],
[1333, 1351, 1334], [1334, 1352, 1343], [1334, 1343, 1327], [1327, 1353, 1335], [1337, 1347, 1330],
[1330, 1339, 1338], [127, 174, 1346], [1333, 1342, 1351], [1334, 1351, 1352], [1327, 1343, 1353],
[1328, 1335, 1354], [1330, 1347, 1339], [1339, 1347, 1345], [1340, 1349, 1341], [1341, 1349, 1350],
[1341, 1350, 1342], [1337, 1344, 1347], [1347, 1348, 1345], [1346, 1356, 1340], [1340, 1356, 1349],
[1342, 1350, 1351], [1353, 1362, 1335], [1335, 1362, 1354], [1347, 1344, 1357], [1348, 1347, 1355],
[1346, 174, 1356], [1349, 1367, 1359], [1349, 1359, 1350], [1350, 1359, 1360], [1343, 1352, 1361],
[1343, 1361, 1353], [1354, 1363, 1336], [1336, 1364, 1344], [1347, 1358, 1355], [1347, 1357, 1358],
[174, 1366, 1356], [1350, 1371, 1351], [1350, 1360, 1371], [1351, 1371, 1352], [1352, 1371, 1372],
[1352, 1372, 1361], [1353, 1361, 1373], [1353, 1373, 1362], [1336, 1363, 1364], [1344, 1364, 1368],
[1344, 1368, 1357], [1357, 1369, 1358], [1358, 1369, 1365], [1366, 1375, 1356], [1356, 1375, 1367],
[1356, 1367, 1349], [1357, 1368, 1369], [1369, 1370, 1365], [1359, 1367, 1379], [1360, 1359, 1380],
[1360, 1380, 1371], [1372, 1381, 1361], [1361, 1381, 1373], [1362, 1363, 1354], [1364, 1382, 1368],
[1369, 1376, 1370], [1370, 1376, 1374], [1367, 1375, 1378], [1367, 1378, 1379], [1359, 1379, 1380],
[1373, 1392, 1362], [1362, 1393, 1363], [1363, 1394, 1364], [1368, 1382, 1376], [1368, 1376, 1369],
[1376, 1377, 1374], [1366, 1384, 1375], [1366, 241, 1384], [1375, 1384, 1378], [1371, 1380, 1390],
[1371, 1390, 1391], [1371, 1391, 1372], [1372, 1391, 1381], [1373, 1381, 1392], [1362, 1392, 1393],
[1363, 1393, 1402], [1363, 1402, 1394], [1364, 1394, 1382], [1376, 1382, 1385], [1377, 1376, 1383],
[1380, 1379, 1389], [1380, 1389, 1390], [1392, 1381, 1401], [1376, 1386, 1383], [1376, 1385, 1386],
[1378, 1384, 1387], [1378, 1388, 1379], [1378, 1387, 1388], [1379, 1388, 1389], [1381, 1391, 1401],
[1382, 1396, 1385], [1386, 1385, 1395], [241, 266, 1384], [1391, 1400, 1401], [1394, 1407, 1382],
[1382, 1407, 1396], [1396, 1403, 1385], [1385, 1397, 1395], [1385, 1403, 1397], [1384, 266, 1398],
[1384, 1398, 1387], [1387, 1398, 1399], [1387, 1399, 1388], [1388, 1399, 1389], [1390, 1406, 1391],
[1391, 1406, 1400], [1392, 1401, 1393], [1397, 1403, 1404], [266, 1421, 1398], [1389, 1399, 1415],
[1390, 1389, 1416], [1390, 1416, 1406], [1400, 1417, 1401], [1401, 1417, 1393], [1393, 1425, 1402],
[1402, 1425, 1394], [1396, 1419, 1409], [1396, 1409, 1403], [1403, 1409, 1410], [1403, 1405, 1404],
[1403, 1410, 1405], [1398, 1421, 1412], [1398, 1412, 1413], [1398, 1413, 1399], [1399, 1413, 1414],
[1399, 1414, 1415], [1389, 1415, 1416], [1393, 1417, 1425], [1394, 1418, 1407], [1396, 1407, 1419],
[1405, 1410, 1408], [1400, 1406, 1424], [1400, 1424, 1417], [1425, 1418, 1394], [1410, 1411, 1408],
[1416, 1423, 1406], [1406, 1423, 1424], [1407, 1418, 1426], [1411, 1410, 1420], [1414, 1428, 1415],
[1417, 1438, 1425], [1407, 1426, 1419], [1409, 1432, 1410], [1410, 1422, 1420], [1410, 1433, 1422],
[1414, 1413, 1428], [1423, 1431, 1424], [1419, 1432, 1409], [1422, 1433, 1427], [1424, 1437, 1417],
[1432, 1433, 1410], [1433, 1429, 1427], [1413, 1412, 1446], [1413, 1446, 1428], [1415, 1428, 1436],
[1415, 1430, 1416], [1415, 1436, 1430], [1416, 1430, 1423], [1417, 1437, 1438], [1418, 1425, 1426],
[1426, 1440, 1419], [1419, 1440, 1432], [1429, 1433, 1434], [1412, 1421, 1446], [1426, 1425, 1448],
[1426, 1448, 1443], [1426, 1443, 1440], [1433, 1435, 1434], [1433, 1441, 1435], [1446, 1457, 1428],
[1428, 1457, 1436], [1424, 1431, 1437], [1435, 1441, 1439], [1441, 1444, 1439], [1439, 1444, 1442],
[1421, 342, 1446], [1425, 1438, 1448], [1432, 1449, 1433], [1433, 1449, 1441], [1442, 1444, 1445],
[1423, 1453, 1431], [1431, 1453, 1437], [1437, 1454, 1438], [1445, 1444, 1451], [1445, 1451, 1447],
[1436, 1469, 1430], [1423, 1430, 1453], [1437, 1453, 1454], [1438, 1455, 1448], [1447, 1451, 1463],
[1447, 1463, 1450], [1436, 1457, 1469], [1443, 1448, 1462], [1432, 1440, 1449], [1441, 1458, 1444],
[1441, 1449, 1458], [1450, 1463, 1452], [342, 1460, 1446], [1454, 1455, 1438], [1444, 1458, 1451],
[1452, 1463, 1464], [1452, 1464, 1456], [1446, 1460, 1457], [1456, 1464, 1459], [1448, 1483, 1462],
[1451, 1475, 1463], [1459, 1464, 1461], [1457, 1477, 1469], [1430, 1469, 1453], [1453, 1469, 1470],
[1453, 1474, 1454], [1448, 1455, 1483], [1440, 1467, 1449], [1449, 1467, 1458], [1461, 1464, 1472],
[1461, 1472, 1465], [1453, 1470, 1474], [1454, 1474, 1455], [1443, 1462, 1440], [1458, 1467, 1475],
[1465, 1472, 1481], [1465, 1481, 1466], [1462, 1480, 1440], [1458, 1475, 1451], [1466, 1481, 1468],
[1455, 1474, 1479], [1455, 1479, 1483], [1468, 1481, 1471], [1460, 363, 1457], [1469, 1493, 1470],
[1440, 1480, 1467], [1463, 1486, 1464], [1464, 1486, 1472], [1471, 1481, 1473], [1457, 363, 1477],
[1473, 1481, 1476], [1483, 1484, 1462], [1475, 1467, 1480], [1475, 1486, 1463], [1476, 1481, 1489],
[1476, 1489, 1478], [1462, 1484, 1480], [1478, 1489, 1482], [1469, 1477, 1491], [1470, 1494, 1474],
[1474, 1494, 1479], [1480, 1486, 1475], [1486, 1498, 1472], [1482, 1489, 1485], [1472, 1499, 1481],
[1485, 1489, 1487], [1470, 1493, 1494], [1486, 1480, 1502], [1498, 1499, 1472], [1489, 1495, 1487],
[1487, 1495, 1488], [1491, 1510, 1469], [1486, 1502, 1498], [1488, 1495, 1490], [1479, 1494, 1501],
[1479, 1501, 1483], [1483, 1501, 1484], [1490, 1495, 1492], [1469, 1510, 1493], [1492, 1495, 1496],
[1494, 1512, 1501], [1480, 1484, 1502], [1496, 1495, 1497], [1484, 1505, 1502], [1481, 1507, 1489],
[1497, 1495, 1500], [1484, 1501, 1505], [1499, 1507, 1481], [1495, 1508, 1500], [1500, 1508, 1503],
[1493, 1511, 1494], [1494, 1511, 1512], [1489, 1507, 1495], [1503, 1508, 1504], [1504, 1508, 1506],
[1505, 1501, 1516], [1502, 1518, 1498], [1498, 1518, 1499], [1506, 1508, 1509], [1491, 1539, 1510],
[1509, 1508, 1513], [1510, 1511, 1493], [1502, 1505, 1518], [1495, 1524, 1508], [1513, 1508, 1514],
[1514, 1508, 1524], [1514, 1524, 1515], [1512, 1516, 1501], [1505, 1516, 1518], [1507, 1523, 1495],
[1495, 1523, 1524], [1515, 1524, 1517], [1517, 1524, 1519], [1511, 1526, 1512], [1512, 1526, 1516],
[1499, 1518, 1507], [1519, 1524, 1520], [1516, 1534, 1518], [1507, 1518, 1522], [1507, 1522, 1523],
[1520, 1524, 1521], [1516, 1529, 1534], [1518, 1534, 1522], [1521, 1524, 1525], [1510, 1533, 1511],
[1525, 1524, 1530], [1525, 1530, 1527], [1511, 1533, 1526], [1527, 1530, 1528], [1529, 1536, 1534],
[1528, 1530, 1531], [1510, 1539, 1533], [1524, 1523, 927], [1524, 927, 1530], [1530, 1532, 1531],
[1532, 1530, 1535], [1526, 1543, 1516], [1516, 1543, 1529], [1535, 1530, 1537], [1526, 1541, 1543],
[1522, 1534, 894], [1530, 937, 1537], [1537, 937, 1538], [1529, 1543, 1536], [1534, 1536, 894],
[1522, 894, 1523], [1538, 937, 1540], [927, 937, 1530], [1540, 937, 1542], [1526, 1533, 1541],
[1523, 894, 927], [937, 1544, 1542], [1544, 937, 1545], [1543, 745, 1536], [1545, 937, 953]]
| matched = [[0, 450], [1, 466], [2, 566], [3, 974], [4, 1000], [5, 1222], [6, 1298], [7, 1322], [8, 1340], [9, 1704], [10, 1752], [11, 2022], [12, 2114], [13, 2332], [14, 2360], [15, 2380], [16, 2388], [17, 2596], [18, 2662], [19, 2706], [20, 2842], [21, 2914], [22, 3132], [23, 3148], [24, 3158], [25, 3164], [26, 3244], [27, 3360], [28, 3386], [29, 3626], [30, 3726], [31, 3832], [32, 3912], [33, 3944], [34, 4063], [35, 4084], [36, 4146], [37, 4162], [38, 4240], [39, 4356], [40, 4398], [41, 4408], [42, 4470], [43, 4646], [44, 4692], [45, 4852], [46, 4930], [47, 5122], [48, 5126], [49, 5216], [50, 5222], [51, 5310], [52, 5400], [53, 5408], [54, 5422], [55, 5482], [56, 5490], [57, 5504], [58, 5546], [59, 5720], [60, 5744], [61, 5766], [62, 5800], [63, 5826], [64, 5950], [65, 5964], [66, 5970], [67, 5986], [68, 6010], [69, 6038], [70, 6124], [71, 6166], [72, 6167], [73, 6169], [74, 6215], [75, 6261], [76, 6275], [77, 6279], [78, 6283], [79, 6289], [80, 6293], [81, 6294], [82, 6295], [83, 6296], [84, 6304], [85, 6418], [86, 6419], [87, 6454], [88, 6458], [89, 6472], [90, 6484], [91, 6504], [92, 6506], [93, 6508], [94, 6540], [95, 6541], [96, 6561], [97, 6615], [98, 6662], [99, 6663], [100, 6676], [101, 6750], [102, 6756], [103, 6758], [104, 6772], [105, 6784], [106, 6785], [107, 6789], [108, 6887], [109, 6906], [110, 6907], [111, 6921], [112, 6947], [113, 6957], [114, 6995], [115, 6997], [116, 6999], [117, 7001], [118, 7027], [119, 7028], [120, 7036], [121, 7056], [122, 7102], [123, 7118], [124, 7147], [125, 7148], [126, 7165], [127, 7229], [128, 7233], [129, 7237], [130, 7239], [131, 7243], [132, 7267], [133, 7268], [134, 7272], [135, 7358], [136, 7360], [137, 7387], [138, 7388], [139, 7401], [140, 7427], [141, 7451], [142, 7469], [143, 7475], [144, 7477], [145, 7479], [146, 7481], [147, 7501], [148, 7505], [149, 7507], [150, 7508], [151, 7512], [152, 7516], [153, 7598], [154, 7600], [155, 7627], [156, 7628], [157, 7639], [158, 7655], [159, 7665], [160, 7683], [161, 7701], [162, 7707], [163, 7711], [164, 7717], [165, 7719], [166, 7721], [167, 7725], [168, 7731], [169, 7747], [170, 7748], [171, 7867], [172, 7868], [173, 7883], [174, 7933], [175, 7947], [176, 7949], [177, 7951], [178, 7953], [179, 7955], [180, 7957], [181, 7961], [182, 7975], [183, 7987], [184, 7988], [185, 7992], [186, 7994], [187, 8107], [188, 8108], [189, 8153], [190, 8163], [191, 8181], [192, 8187], [193, 8189], [194, 8191], [195, 8193], [196, 8195], [197, 8221], [198, 8227], [199, 8228], [200, 8236], [201, 8239], [202, 8347], [203, 8348], [204, 8363], [205, 8375], [206, 8385], [207, 8397], [208, 8409], [209, 8427], [210, 8429], [211, 8431], [212, 8433], [213, 8435], [214, 8441], [215, 8457], [216, 8467], [217, 8468], [218, 8472], [219, 8587], [220, 8588], [221, 8649], [222, 8661], [223, 8667], [224, 8669], [225, 8671], [226, 8673], [227, 8677], [228, 8679], [229, 8681], [230, 8685], [231, 8705], [232, 8707], [233, 8708], [234, 8716], [235, 8798], [236, 8800], [237, 8827], [238, 8828], [239, 8841], [240, 8843], [241, 8875], [242, 8891], [243, 8907], [244, 8915], [245, 8917], [246, 8919], [247, 8921], [248, 8931], [249, 8934], [250, 8947], [251, 8948], [252, 8954], [253, 8956], [254, 8984], [255, 9038], [256, 9040], [257, 9067], [258, 9068], [259, 9157], [260, 9159], [261, 9161], [262, 9187], [263, 9188], [264, 9192], [265, 9206], [266, 9278], [267, 9286], [268, 9299], [269, 9307], [270, 9308], [271, 9321], [272, 9349], [273, 9383], [274, 9397], [275, 9399], [276, 9427], [277, 9428], [278, 9436], [279, 9522], [280, 9547], [281, 9548], [282, 9561], [283, 9567], [284, 9583], [285, 9587], [286, 9601], [287, 9633], [288, 9635], [289, 9637], [290, 9655], [291, 9665], [292, 9667], [293, 9668], [294, 9670], [295, 9787], [296, 9788], [297, 9876], [298, 9882], [299, 9884], [300, 9908], [301, 9909], [302, 9919], [303, 10030], [304, 10031], [305, 10065], [306, 10087], [307, 10105], [308, 10135], [309, 10153], [310, 10154], [311, 10155], [312, 10175], [313, 10239], [314, 10277], [315, 10278], [316, 10280], [317, 10304], [318, 10330], [319, 10342], [320, 10350], [321, 10392], [322, 10396], [323, 10400], [324, 10404], [325, 10405], [326, 10407], [327, 10533], [328, 10613], [329, 10623], [330, 10651], [331, 10671], [332, 10709], [333, 10807], [334, 10849], [335, 10855], [336, 10885], [337, 10891], [338, 10893], [339, 10955], [340, 11047], [341, 11073], [342, 11143], [343, 11149], [344, 11159], [345, 11321], [346, 11337], [347, 11353], [348, 11379], [349, 11395], [350, 11425], [351, 11431], [352, 11625], [353, 11823], [354, 11885], [355, 11923], [356, 11933], [357, 12109], [358, 12125], [359, 12133], [360, 12329], [361, 12345], [362, 12357], [363, 12373], [364, 12385], [365, 12397], [366, 12401], [367, 12409], [368, 12441], [369, 12639], [370, 12821], [371, 13125], [372, 13181], [373, 13195], [374, 13211], [375, 13297], [376, 13351], [377, 13403], [378, 13689], [379, 13713], [380, 13853], [381, 13931], [382, 14117], [383, 14163], [384, 14181], [385, 14217], [386, 14227], [387, 14306], [388, 14339], [389, 14381], [390, 14455], [391, 14881], [392, 15127], [393, 15167], [394, 15405], [395, 15909], [396, 16133], [397, 16203], [398, 16237], [399, 16238], [400, 16239], [401, 16240], [402, 16241], [403, 16242], [404, 16243], [405, 16244], [406, 16245], [407, 16246], [408, 16247], [409, 16248], [410, 16249], [411, 16250], [412, 16251], [413, 16252], [414, 16266], [415, 16267], [416, 16268], [417, 16269], [418, 16270], [419, 16271], [420, 16272], [421, 16273], [422, 16274], [423, 16275], [424, 16276], [425, 16277], [426, 16301], [427, 16302], [428, 16303], [429, 16304], [430, 16305], [431, 16306], [432, 16307], [433, 16308], [434, 16340], [435, 16341], [436, 16342], [437, 16343], [438, 16344], [439, 16364], [440, 16383], [441, 16425], [442, 16459], [443, 16468], [444, 16482], [445, 16512], [446, 16556], [447, 16557], [448, 16558], [449, 16559], [450, 16605], [451, 16654], [452, 16704], [453, 16705], [454, 16706], [455, 16710], [456, 16740], [457, 16757], [458, 16811], [459, 16861], [460, 16866], [461, 16922], [462, 16979], [463, 17037], [464, 17096], [465, 17156], [466, 17217], [467, 17279], [468, 17299], [469, 17311], [470, 17342], [471, 17343], [472, 17344], [473, 17408], [474, 17460], [475, 17475], [476, 17541], [477, 17543], [478, 17557], [479, 17612], [480, 17682], [481, 17688], [482, 17753], [483, 17825], [484, 17841], [485, 17898], [486, 17928], [487, 17972], [488, 17976], [489, 18047], [490, 18123], [491, 18185], [492, 18200], [493, 18278], [494, 18286], [495, 18357], [496, 18437], [497, 18467], [498, 18518], [499, 18562], [500, 18600], [501, 18606], [502, 18612], [503, 18620], [504, 18626], [505, 18632], [506, 18638], [507, 18683], [508, 18767], [509, 18787], [510, 18789], [511, 18793], [512, 18799], [513, 18803], [514, 18852], [515, 18938], [516, 18956], [517, 18958], [518, 18962], [519, 18966], [520, 18980], [521, 19025], [522, 19109], [523, 19113], [524, 19127], [525, 19131], [526, 19147], [527, 19153], [528, 19157], [529, 19163], [530, 19202], [531, 19292], [532, 19308], [533, 19312], [534, 19330], [535, 19383], [536, 19475], [537, 19483], [538, 19491], [539, 19501], [540, 19503], [541, 19505], [542, 19509], [543, 19519], [544, 19523], [545, 19568], [546, 19569], [547, 19570], [548, 19664], [549, 19665], [550, 19666], [551, 19690], [552, 19694], [553, 19696], [554, 19700], [555, 19706], [556, 19716], [557, 19720], [558, 19763], [559, 19764], [560, 19765], [561, 19865], [562, 19866], [563, 19867], [564, 19868], [565, 19869], [566, 19891], [567, 19895], [568, 19901], [569, 19903], [570, 19907], [571, 19909], [572, 19913], [573, 19919], [574, 19929], [575, 19972], [576, 19973], [577, 19974], [578, 20022], [579, 20082], [580, 20083], [581, 20084], [582, 20098], [583, 20122], [584, 20124], [585, 20126], [586, 20128], [587, 20132], [588, 20142], [589, 20195], [590, 20196], [591, 20197], [592, 20245], [593, 20253], [594, 20311], [595, 20353], [596, 20355], [597, 20361], [598, 20363], [599, 20365], [600, 20367], [601, 20371], [602, 20381], [603, 20389], [604, 20428], [605, 20429], [606, 20430], [607, 20548], [608, 20549], [609, 20550], [610, 20560], [611, 20580], [612, 20582], [613, 20590], [614, 20594], [615, 20598], [616, 20600], [617, 20604], [618, 20606], [619, 20608], [620, 20610], [621, 20612], [622, 20671], [623, 20795], [624, 20796], [625, 20797], [626, 20849], [627, 20855], [628, 20859], [629, 20861], [630, 20863], [631, 20865], [632, 20922], [633, 20923], [634, 21101], [635, 21105], [636, 21117], [637, 21119], [638, 21121], [639, 21125], [640, 21137], [641, 21223], [642, 21315], [643, 21369], [644, 21371], [645, 21375], [646, 21381], [647, 21389], [648, 21499], [649, 21593], [650, 21609], [651, 21613], [652, 21633], [653, 21635], [654, 21657], [655, 21881], [656, 21889], [657, 22077], [658, 22087], [659, 22117], [660, 22137], [661, 22153], [662, 22285], [663, 22403], [664, 22795], [665, 22893], [666, 22905], [667, 22964], [668, 23145], [669, 23187], [670, 23387], [671, 23885], [672, 23941], [673, 24299], [674, 24334], [675, 24379], [676, 24541], [677, 24577], [678, 24845], [679, 24855], [680, 24907], [681, 25073], [682, 25355], [683, 25659], [684, 26109], [685, 26141], [686, 26191], [687, 26405], [688, 26653], [689, 26671], [690, 26885], [691, 26907], [692, 27423], [693, 27927], [694, 27943], [695, 27957], [696, 28171], [697, 28441], [698, 28515], [699, 28709], [700, 28745], [701, 29199], [702, 29241], [703, 29606], [704, 29745], [705, 29799], [706, 29809], [707, 30138], [708, 30221], [709, 30285], [710, 30829], [711, 30869], [712, 31147], [713, 31169], [714, 31411], [715, 31618], [716, 31699], [717, 32061], [718, 32175], [719, 32347], [720, 32455], [721, 32461], [722, 32467], [723, 32669], [724, 32699], [725, 32709], [726, 32715], [727, 32729], [728, 32969], [729, 32977], [730, 32983], [731, 33117], [732, 33177], [733, 33215], [734, 33237], [735, 33239], [736, 33243], [737, 33253], [738, 33349], [739, 33455], [740, 33491], [741, 33503], [742, 33507], [743, 33515], [744, 33559], [745, 33564], [746, 33565], [747, 33577], [748, 33629], [749, 33663], [750, 33693], [751, 33694], [752, 33695], [753, 33721], [754, 33739], [755, 33751], [756, 33755], [757, 33757], [758, 33759], [759, 33761], [760, 33765], [761, 33820], [762, 33944], [763, 33945], [764, 33946], [765, 33990], [766, 33994], [767, 33996], [768, 33998], [769, 34002], [770, 34004], [771, 34006], [772, 34008], [773, 34067], [774, 34068], [775, 34069], [776, 34187], [777, 34213], [778, 34221], [779, 34231], [780, 34233], [781, 34237], [782, 34239], [783, 34241], [784, 34243], [785, 34247], [786, 34304], [787, 34305], [788, 34306], [789, 34420], [790, 34421], [791, 34422], [792, 34456], [793, 34460], [794, 34466], [795, 34468], [796, 34470], [797, 34474], [798, 34482], [799, 34488], [800, 34533], [801, 34534], [802, 34535], [803, 34573], [804, 34583], [805, 34643], [806, 34644], [807, 34645], [808, 34646], [809, 34647], [810, 34669], [811, 34671], [812, 34675], [813, 34679], [814, 34681], [815, 34683], [816, 34685], [817, 34687], [818, 34691], [819, 34699], [820, 34703], [821, 34750], [822, 34751], [823, 34752], [824, 34852], [825, 34853], [826, 34854], [827, 34874], [828, 34882], [829, 34884], [830, 34888], [831, 34894], [832, 34908], [833, 34910], [834, 34951], [835, 34952], [836, 34953], [837, 35047], [838, 35055], [839, 35067], [840, 35071], [841, 35073], [842, 35075], [843, 35077], [844, 35091], [845, 35135], [846, 35140], [847, 35210], [848, 35232], [849, 35248], [850, 35252], [851, 35256], [852, 35266], [853, 35270], [854, 35323], [855, 35413], [856, 35427], [857, 35431], [858, 35453], [859, 35455], [860, 35457], [861, 35502], [862, 35590], [863, 35608], [864, 35612], [865, 35616], [866, 35622], [867, 35632], [868, 35677], [869, 35763], [870, 35767], [871, 35775], [872, 35781], [873, 35785], [874, 35789], [875, 35797], [876, 35801], [877, 35848], [878, 35932], [879, 35950], [880, 35954], [881, 35962], [882, 35964], [883, 35970], [884, 36015], [885, 36097], [886, 36127], [887, 36143], [888, 36163], [889, 36178], [890, 36258], [891, 36316], [892, 36337], [893, 36413], [894, 36415], [895, 36421], [896, 36492], [897, 36528], [898, 36568], [899, 36578], [900, 36643], [901, 36717], [902, 36733], [903, 36790], [904, 36862], [905, 36886], [906, 36916], [907, 36933], [908, 37003], [909, 37015], [910, 37072], [911, 37140], [912, 37207], [913, 37208], [914, 37209], [915, 37273], [916, 37336], [917, 37398], [918, 37459], [919, 37519], [920, 37561], [921, 37578], [922, 37636], [923, 37693], [924, 37749], [925, 37759], [926, 37799], [927, 37804], [928, 37858], [929, 37859], [930, 37860], [931, 37911], [932, 37961], [933, 38010], [934, 38011], [935, 38012], [936, 38056], [937, 38058], [938, 38084], [939, 38103], [940, 38119], [941, 38147], [942, 38190], [943, 38232], [944, 38233], [945, 38234], [946, 38273], [947, 38274], [948, 38275], [949, 38276], [950, 38277], [951, 38309], [952, 38310], [953, 38311], [954, 38312], [955, 38313], [956, 38314], [957, 38315], [958, 38339], [959, 38340], [960, 38341], [961, 38342], [962, 38343], [963, 38344], [964, 38358], [965, 38359], [966, 38360], [967, 38361], [968, 38362], [969, 38363], [970, 38364], [971, 38365], [972, 38366], [973, 38367], [974, 38368], [975, 38369], [976, 38370], [977, 38371], [978, 38372], [979, 38373], [980, 38374], [981, 38375], [982, 38376], [983, 38377], [984, 38378], [985, 38427], [986, 38431], [987, 38472], [988, 38475], [989, 38522], [990, 38534], [991, 38568], [992, 38613], [993, 38657], [994, 38688], [995, 38701], [996, 38745], [997, 38788], [998, 38790], [999, 38830], [1000, 38871], [1001, 38878], [1002, 38912], [1003, 38953], [1004, 38993], [1005, 39032], [1006, 39069], [1007, 39070], [1008, 39108], [1009, 39146], [1010, 39168], [1011, 39183], [1012, 39186], [1013, 39220], [1014, 39257], [1015, 39267], [1016, 39291], [1017, 39293], [1018, 39328], [1019, 39333], [1020, 39363], [1021, 39398], [1022, 39430], [1023, 39432], [1024, 39466], [1025, 39500], [1026, 39533], [1027, 39536], [1028, 39544], [1029, 39554], [1030, 39566], [1031, 39599], [1032, 39631], [1033, 39663], [1034, 39693], [1035, 39695], [1036, 39726], [1037, 39747], [1038, 39757], [1039, 39788], [1040, 39790], [1041, 39818], [1042, 39848], [1043, 39854], [1044, 39870], [1045, 39876], [1046, 39878], [1047, 39907], [1048, 39910], [1049, 39920], [1050, 39936], [1051, 39965], [1052, 39971], [1053, 39985], [1054, 39993], [1055, 40021], [1056, 40023], [1057, 40033], [1058, 40037], [1059, 40049], [1060, 40074], [1061, 40077], [1062, 40105], [1063, 40125], [1064, 40132], [1065, 40135], [1066, 40137], [1067, 40159], [1068, 40174], [1069, 40177], [1070, 40183], [1071, 40186], [1072, 40189], [1073, 40193], [1074, 40198], [1075, 40213], [1076, 40240], [1077, 40267], [1078, 40283], [1079, 40285], [1080, 40294], [1081, 40296], [1082, 40320], [1083, 40343], [1084, 40346], [1085, 40348], [1086, 40372], [1087, 40379], [1088, 40387], [1089, 40398], [1090, 40424], [1091, 40441], [1092, 40450], [1093, 40452], [1094, 40458], [1095, 40476], [1096, 40502], [1097, 40506], [1098, 40528], [1099, 40553], [1100, 40554], [1101, 40556], [1102, 40580], [1103, 40595], [1104, 40606], [1105, 40610], [1106, 40614], [1107, 40632], [1108, 40658], [1109, 40660], [1110, 40684], [1111, 40699], [1112, 40707], [1113, 40710], [1114, 40736], [1115, 40748], [1116, 40754], [1117, 40763], [1118, 40766], [1119, 40768], [1120, 40790], [1121, 40810], [1122, 40817], [1123, 40828], [1124, 40844], [1125, 40862], [1126, 40871], [1127, 40872], [1128, 40886], [1129, 40898], [1130, 40925], [1131, 40927], [1132, 40931], [1133, 40953], [1134, 40977], [1135, 40981], [1136, 40983], [1137, 40993], [1138, 41001], [1139, 41009], [1140, 41037], [1141, 41065], [1142, 41094], [1143, 41095], [1144, 41099], [1145, 41123], [1146, 41152], [1147, 41166], [1148, 41182], [1149, 41212], [1150, 41214], [1151, 41234], [1152, 41240], [1153, 41242], [1154, 41273], [1155, 41280], [1156, 41304], [1157, 41335], [1158, 41367], [1159, 41384], [1160, 41399], [1161, 41403], [1162, 41431], [1163, 41464], [1164, 41493], [1165, 41497], [1166, 41530], [1167, 41534], [1168, 41538], [1169, 41564], [1170, 41583], [1171, 41598], [1172, 41632], [1173, 41667], [1174, 41700], [1175, 41702], [1176, 41737], [1177, 41773], [1178, 41810], [1179, 41817], [1180, 41821], [1181, 41847], [1182, 41884], [1183, 41922], [1184, 41949], [1185, 41960], [1186, 41962], [1187, 41998], [1188, 42034], [1189, 42037], [1190, 42077], [1191, 42118], [1192, 42133], [1193, 42159], [1194, 42200], [1195, 42242], [1196, 42282], [1197, 42285], [1198, 42329], [1199, 42362], [1200, 42373], [1201, 42379], [1202, 42417], [1203, 42462], [1204, 42508], [1205, 42555], [1206, 42567], [1207, 42603], [1208, 42670], [1209, 42760], [1210, 42836], [1211, 42868], [1212, 42879], [1213, 42976], [1214, 43084], [1215, 43191], [1216, 43253], [1217, 43297], [1218, 43334], [1219, 43402], [1220, 43506], [1221, 43607], [1222, 43610], [1223, 43714], [1224, 43767], [1225, 43817], [1226, 43919], [1227, 43938], [1228, 43980], [1229, 44020], [1230, 44056], [1231, 44108], [1232, 44120], [1233, 44219], [1234, 44311], [1235, 44317], [1236, 44414], [1237, 44442], [1238, 44494], [1239, 44510], [1240, 44555], [1241, 44563], [1242, 44575], [1243, 44605], [1244, 44699], [1245, 44712], [1246, 44792], [1247, 44878], [1248, 44884], [1249, 44975], [1250, 45033], [1251, 45065], [1252, 45136], [1253, 45154], [1254, 45179], [1255, 45242], [1256, 45291], [1257, 45305], [1258, 45329], [1259, 45409], [1260, 45415], [1261, 45468], [1262, 45500], [1263, 45584], [1264, 45625], [1265, 45660], [1266, 45667], [1267, 45683], [1268, 45689], [1269, 45749], [1270, 45822], [1271, 45830], [1272, 45840], [1273, 45876], [1274, 45910], [1275, 45969], [1276, 45979], [1277, 45989], [1278, 46015], [1279, 46067], [1280, 46144], [1281, 46220], [1282, 46227], [1283, 46285], [1284, 46295], [1285, 46313], [1286, 46369], [1287, 46438], [1288, 46442], [1289, 46514], [1290, 46561], [1291, 46573], [1292, 46585], [1293, 46617], [1294, 46647], [1295, 46655], [1296, 46658], [1297, 46722], [1298, 46724], [1299, 46742], [1300, 46746], [1301, 46762], [1302, 46792], [1303, 46843], [1304, 46853], [1305, 46859], [1306, 46871], [1307, 46901], [1308, 46925], [1309, 46990], [1310, 47000], [1311, 47004], [1312, 47048], [1313, 47055], [1314, 47118], [1315, 47120], [1316, 47128], [1317, 47132], [1318, 47144], [1319, 47168], [1320, 47185], [1321, 47246], [1322, 47250], [1323, 47256], [1324, 47260], [1325, 47266], [1326, 47272], [1327, 47286], [1328, 47315], [1329, 47378], [1330, 47380], [1331, 47384], [1332, 47392], [1333, 47394], [1334, 47412], [1335, 47422], [1336, 47434], [1337, 47445], [1338, 47510], [1339, 47515], [1340, 47518], [1341, 47520], [1342, 47526], [1343, 47562], [1344, 47575], [1345, 47578], [1346, 47634], [1347, 47640], [1348, 47646], [1349, 47650], [1350, 47652], [1351, 47654], [1352, 47662], [1353, 47676], [1354, 47705], [1355, 47708], [1356, 47760], [1357, 47770], [1358, 47778], [1359, 47780], [1360, 47786], [1361, 47802], [1362, 47808], [1363, 47816], [1364, 47835], [1365, 47836], [1366, 47840], [1367, 47888], [1368, 47897], [1369, 47900], [1370, 47912], [1371, 47914], [1372, 47922], [1373, 47965], [1374, 47968], [1375, 48028], [1376, 48030], [1377, 48035], [1378, 48038], [1379, 48040], [1380, 48046], [1381, 48078], [1382, 48095], [1383, 48098], [1384, 48152], [1385, 48160], [1386, 48166], [1387, 48168], [1388, 48170], [1389, 48172], [1390, 48174], [1391, 48186], [1392, 48194], [1393, 48202], [1394, 48225], [1395, 48279], [1396, 48290], [1397, 48294], [1398, 48298], [1399, 48306], [1400, 48312], [1401, 48326], [1402, 48354], [1403, 48355], [1404, 48420], [1405, 48434], [1406, 48468], [1407, 48485], [1408, 48546], [1409, 48548], [1410, 48550], [1411, 48554], [1412, 48556], [1413, 48558], [1414, 48560], [1415, 48562], [1416, 48572], [1417, 48590], [1418, 48604], [1419, 48615], [1420, 48616], [1421, 48680], [1422, 48694], [1423, 48698], [1424, 48716], [1425, 48724], [1426, 48745], [1427, 48753], [1428, 48810], [1429, 48822], [1430, 48828], [1431, 48870], [1432, 48872], [1433, 48875], [1434, 48940], [1435, 48950], [1436, 48962], [1437, 48976], [1438, 49006], [1439, 49061], [1440, 49068], [1441, 49073], [1442, 49123], [1443, 49139], [1444, 49141], [1445, 49146], [1446, 49210], [1447, 49256], [1448, 49270], [1449, 49280], [1450, 49347], [1451, 49351], [1452, 49373], [1453, 49383], [1454, 49393], [1455, 49423], [1456, 49430], [1457, 49486], [1458, 49496], [1459, 49498], [1460, 49570], [1461, 49621], [1462, 49639], [1463, 49641], [1464, 49645], [1465, 49721], [1466, 49780], [1467, 49798], [1468, 49814], [1469, 49820], [1470, 49876], [1471, 49949], [1472, 49955], [1473, 49983], [1474, 50019], [1475, 50035], [1476, 50044], [1477, 50116], [1478, 50158], [1479, 50172], [1480, 50192], [1481, 50198], [1482, 50245], [1483, 50249], [1484, 50281], [1485, 50347], [1486, 50365], [1487, 50450], [1488, 50530], [1489, 50536], [1490, 50547], [1491, 50623], [1492, 50647], [1493, 50655], [1494, 50707], [1495, 50711], [1496, 50800], [1497, 50868], [1498, 50874], [1499, 50890], [1500, 50939], [1501, 50953], [1502, 50981], [1503, 51073], [1504, 51132], [1505, 51166], [1506, 51246], [1507, 51256], [1508, 51260], [1509, 51275], [1510, 51286], [1511, 51294], [1512, 51355], [1513, 51451], [1514, 51548], [1515, 51602], [1516, 51646], [1517, 51715], [1518, 51745], [1519, 51845], [1520, 51946], [1521, 52026], [1522, 52032], [1523, 52040], [1524, 52048], [1525, 52077], [1526, 52151], [1527, 52255], [1528, 52314], [1529, 52356], [1530, 52359], [1531, 52463], [1532, 52480], [1533, 52530], [1534, 52568], [1535, 52630], [1536, 52674], [1537, 52781], [1538, 52788], [1539, 52889], [1540, 52918], [1541, 52997], [1542, 53035], [1543, 53105], [1544, 53214]]
simple_tri = [[3, 691, 8], [688, 1, 2], [7, 691, 988], [692, 3, 1], [687, 2, 5], [687, 5, 1213], [1, 3, 6], [2, 1, 4], [1, 6, 4], [2, 4, 5], [691, 7, 14], [14, 10, 691], [3, 9, 6], [1213, 5, 20], [691, 10, 8], [4, 12, 5], [1007, 7, 988], [3, 8, 15], [10, 14, 18], [3, 15, 9], [4, 6, 11], [4, 11, 12], [15, 13, 9], [9, 13, 16], [9, 16, 6], [1007, 21, 7], [16, 17, 6], [6, 17, 11], [11, 17, 19], [11, 19, 12], [12, 31, 5], [1007, 1017, 21], [8, 10, 15], [5, 31, 20], [7, 21, 14], [13, 25, 16], [17, 16, 26], [17, 22, 19], [18, 27, 10], [15, 10, 23], [12, 19, 31], [27, 29, 10], [13, 15, 24], [13, 24, 25], [16, 25, 26], [21, 28, 14], [10, 29, 23], [18, 14, 30], [18, 30, 27], [17, 26, 22], [24, 35, 25], [19, 22, 32], [28, 30, 14], [23, 33, 15], [26, 34, 22], [22, 36, 32], [29, 38, 23], [15, 33, 24], [22, 34, 36], [30, 37, 27], [27, 37, 29], [23, 38, 33], [24, 33, 45], [19, 32, 31], [31, 1283, 20], [28, 1035, 44], [28, 44, 30], [25, 35, 26], [26, 35, 34], [31, 32, 39], [29, 37, 42], [44, 41, 30], [30, 41, 37], [24, 50, 35], [32, 36, 48], [32, 40, 39], [39, 1283, 31], [35, 46, 34], [34, 46, 43], [34, 43, 36], [32, 48, 40], [29, 42, 38], [45, 50, 24], [39, 59, 1283], [37, 41, 52], [42, 47, 38], [38, 47, 33], [35, 51, 46], [36, 43, 48], [1035, 1046, 44], [35, 50, 51], [40, 49, 53], [40, 53, 39], [39, 53, 54], [39, 54, 59], [44, 55, 41], [48, 49, 40], [42, 37, 52], [42, 52, 47], [43, 46, 58], [59, 54, 63], [41, 65, 52], [47, 66, 67], [51, 57, 46], [52, 66, 47], [47, 67, 33], [33, 67, 45], [45, 60, 50], [57, 69, 46], [43, 58, 62], [43, 62, 48], [48, 62, 49], [55, 65, 41], [50, 60, 68], [56, 57, 51], [58, 46, 77], [52, 64, 66], [50, 68, 51], [51, 68, 56], [56, 61, 57], [52, 65, 64], [45, 67, 60], [69, 77, 46], [58, 78, 62], [49, 74, 53], [53, 101, 54], [65, 55, 88], [68, 60, 91], [56, 71, 61], [61, 76, 57], [77, 78, 58], [49, 62, 80], [49, 80, 74], [53, 74, 85], [64, 89, 75], [64, 75, 66], [62, 79, 80], [53, 85, 101], [101, 63, 54], [64, 65, 89], [66, 90, 67], [68, 98, 56], [71, 93, 61], [61, 94, 76], [74, 72, 70], [70, 73, 74], [66, 75, 90], [60, 67, 91], [98, 71, 56], [61, 93, 94], [76, 104, 57], [57, 104, 69], [77, 69, 109], [62, 78, 79], [74, 80, 81], [74, 81, 72], [73, 82, 74], [74, 82, 83], [74, 84, 85], [74, 83, 84], [85, 121, 101], [55, 1061, 88], [93, 71, 92], [69, 104, 132], [80, 86, 81], [84, 87, 85], [65, 88, 89], [67, 90, 91], [69, 132, 109], [80, 95, 86], [87, 96, 85], [85, 96, 108], [71, 98, 123], [71, 128, 92], [94, 103, 76], [78, 77, 105], [79, 78, 148], [95, 80, 99], [96, 100, 108], [63, 101, 112], [63, 112, 97], [71, 123, 128], [92, 102, 93], [93, 102, 94], [94, 102, 115], [94, 115, 103], [76, 103, 104], [80, 106, 99], [100, 107, 108], [1061, 1071, 122], [1061, 122, 88], [88, 122, 89], [89, 122, 113], [89, 113, 75], [75, 114, 90], [90, 114, 91], [91, 142, 68], [103, 118, 104], [78, 105, 148], [80, 79, 149], [80, 149, 106], [106, 149, 110], [107, 111, 108], [112, 127, 97], [75, 113, 114], [91, 114, 142], [68, 142, 98], [115, 116, 103], [103, 116, 117], [103, 117, 118], [104, 118, 132], [79, 148, 149], [149, 119, 110], [111, 120, 108], [85, 108, 121], [1071, 159, 122], [113, 122, 141], [113, 141, 114], [114, 161, 142], [92, 128, 102], [102, 129, 115], [115, 130, 116], [116, 130, 124], [116, 124, 117], [77, 109, 105], [119, 149, 125], [120, 135, 108], [120, 126, 135], [108, 135, 121], [101, 121, 153], [101, 153, 112], [115, 129, 144], [115, 144, 130], [124, 130, 131], [124, 131, 117], [117, 131, 137], [117, 137, 118], [105, 183, 148], [149, 133, 125], [126, 134, 135], [153, 140, 112], [112, 140, 127], [122, 159, 141], [141, 161, 114], [142, 162, 98], [98, 162, 123], [123, 162, 143], [123, 143, 128], [128, 143, 102], [102, 164, 129], [130, 136, 131], [109, 183, 105], [109, 169, 183], [133, 149, 138], [134, 139, 135], [135, 152, 121], [143, 164, 102], [144, 145, 130], [130, 145, 136], [136, 146, 131], [136, 145, 146], [131, 146, 137], [137, 146, 147], [137, 147, 118], [118, 147, 132], [132, 147, 167], [132, 167, 168], [132, 168, 109], [109, 168, 169], [149, 150, 138], [139, 151, 135], [135, 151, 152], [121, 152, 153], [141, 160, 161], [162, 163, 143], [144, 165, 145], [145, 165, 154], [145, 154, 146], [146, 154, 166], [146, 155, 147], [146, 166, 155], [147, 155, 167], [150, 149, 156], [151, 157, 152], [153, 158, 140], [140, 174, 127], [141, 159, 160], [142, 161, 162], [143, 163, 164], [129, 165, 144], [154, 165, 166], [155, 166, 167], [149, 170, 156], [157, 171, 152], [152, 171, 186], [186, 187, 152], [152, 187, 153], [163, 176, 177], [163, 177, 164], [164, 177, 178], [164, 178, 179], [164, 179, 129], [129, 179, 165], [165, 179, 180], [165, 181, 166], [166, 181, 167], [167, 181, 182], [167, 182, 168], [148, 198, 149], [170, 149, 172], [171, 173, 186], [1100, 206, 159], [161, 160, 191], [161, 191, 175], [161, 175, 162], [162, 175, 176], [162, 176, 163], [165, 180, 181], [149, 184, 172], [173, 185, 186], [187, 201, 153], [153, 201, 158], [158, 202, 140], [140, 202, 205], [140, 205, 174], [159, 190, 160], [159, 206, 190], [160, 190, 191], [175, 191, 192], [175, 192, 176], [176, 192, 193], [176, 193, 194], [176, 194, 177], [177, 194, 178], [181, 197, 182], [168, 231, 169], [148, 183, 198], [198, 232, 149], [149, 232, 184], [184, 232, 188], [185, 189, 186], [178, 194, 195], [178, 195, 196], [178, 196, 179], [179, 196, 197], [179, 197, 180], [180, 197, 181], [183, 169, 250], [232, 199, 188], [189, 200, 186], [158, 201, 202], [206, 207, 190], [190, 208, 191], [193, 192, 210], [193, 210, 194], [194, 212, 195], [195, 212, 196], [197, 215, 182], [199, 232, 203], [200, 219, 186], [200, 204, 219], [186, 219, 187], [174, 205, 1366], [190, 207, 208], [191, 208, 209], [191, 209, 192], [192, 209, 210], [194, 210, 211], [194, 211, 212], [212, 213, 196], [196, 213, 197], [197, 213, 214], [197, 214, 215], [182, 215, 168], [168, 215, 231], [231, 249, 169], [183, 250, 216], [183, 216, 198], [232, 217, 203], [204, 218, 219], [187, 219, 201], [202, 240, 205], [205, 241, 1366], [210, 224, 211], [169, 249, 250], [217, 232, 220], [218, 221, 219], [201, 235, 202], [202, 235, 240], [207, 242, 208], [209, 208, 222], [209, 222, 223], [209, 223, 210], [210, 223, 224], [211, 224, 225], [211, 225, 212], [212, 225, 226], [212, 226, 213], [213, 226, 227], [213, 227, 214], [214, 228, 229], [214, 229, 215], [215, 229, 230], [232, 233, 220], [221, 234, 219], [219, 253, 201], [201, 253, 235], [240, 241, 205], [206, 284, 207], [208, 242, 222], [222, 243, 223], [223, 244, 224], [224, 244, 225], [214, 227, 245], [214, 245, 228], [228, 236, 229], [229, 237, 230], [215, 230, 231], [233, 232, 238], [234, 265, 219], [234, 239, 265], [207, 255, 242], [222, 242, 243], [228, 245, 246], [228, 246, 236], [236, 247, 229], [236, 246, 247], [229, 247, 237], [237, 248, 230], [237, 247, 248], [230, 248, 231], [232, 251, 238], [239, 252, 265], [219, 265, 253], [235, 253, 254], [226, 225, 288], [245, 227, 289], [246, 245, 260], [246, 260, 256], [246, 256, 247], [247, 256, 261], [247, 261, 257], [247, 257, 248], [248, 262, 231], [231, 262, 268], [249, 291, 250], [216, 269, 198], [251, 232, 258], [252, 259, 265], [235, 272, 240], [235, 254, 272], [240, 272, 241], [207, 285, 255], [207, 284, 285], [255, 273, 242], [242, 273, 287], [242, 287, 243], [223, 243, 274], [223, 274, 244], [225, 244, 288], [226, 288, 227], [245, 289, 260], [256, 260, 261], [257, 262, 248], [231, 268, 249], [249, 268, 291], [232, 263, 258], [232, 292, 263], [259, 264, 265], [265, 279, 253], [253, 279, 254], [241, 272, 266], [206, 1113, 284], [284, 306, 285], [227, 288, 289], [260, 267, 261], [261, 267, 276], [261, 276, 257], [257, 276, 262], [262, 280, 268], [250, 291, 216], [216, 291, 269], [198, 269, 323], [198, 323, 232], [263, 292, 270], [264, 271, 265], [254, 279, 272], [255, 285, 273], [274, 314, 244], [289, 275, 260], [260, 275, 267], [267, 275, 276], [232, 323, 292], [292, 277, 270], [271, 278, 265], [265, 278, 295], [265, 295, 279], [273, 307, 287], [275, 290, 276], [276, 280, 262], [280, 300, 268], [277, 292, 281], [278, 282, 295], [279, 283, 272], [272, 283, 266], [285, 286, 273], [273, 286, 307], [243, 308, 274], [244, 314, 288], [275, 289, 290], [276, 290, 280], [268, 309, 291], [292, 293, 281], [282, 294, 295], [295, 303, 279], [279, 303, 283], [286, 319, 307], [287, 307, 321], [287, 321, 243], [289, 298, 290], [290, 299, 280], [280, 299, 300], [291, 322, 269], [293, 292, 296], [294, 297, 332], [294, 332, 295], [266, 283, 1421], [284, 318, 306], [274, 308, 314], [289, 288, 298], [290, 298, 299], [292, 301, 296], [297, 302, 332], [283, 313, 1421], [285, 306, 286], [286, 306, 333], [307, 320, 321], [243, 321, 308], [288, 314, 337], [288, 337, 298], [268, 300, 309], [323, 324, 292], [301, 292, 304], [302, 305, 332], [283, 303, 313], [286, 333, 319], [308, 330, 314], [291, 309, 322], [292, 310, 304], [305, 312, 332], [295, 332, 303], [319, 336, 307], [319, 335, 336], [299, 298, 338], [300, 339, 309], [309, 345, 322], [269, 322, 323], [292, 324, 315], [292, 315, 310], [311, 316, 327], [311, 327, 317], [312, 317, 327], [312, 327, 332], [1421, 313, 342], [299, 339, 300], [315, 324, 325], [316, 326, 327], [307, 336, 320], [321, 329, 308], [308, 329, 330], [314, 330, 337], [299, 338, 339], [325, 324, 328], [326, 328, 341], [326, 341, 327], [303, 334, 313], [306, 318, 340], [306, 340, 333], [319, 333, 335], [320, 329, 321], [298, 337, 338], [322, 331, 323], [328, 324, 341], [332, 334, 303], [320, 336, 349], [320, 349, 329], [322, 345, 331], [327, 354, 332], [318, 347, 340], [340, 348, 333], [339, 345, 309], [331, 352, 323], [323, 341, 324], [327, 341, 354], [335, 353, 336], [329, 350, 330], [337, 330, 343], [337, 343, 338], [338, 344, 339], [331, 351, 352], [323, 352, 341], [313, 346, 342], [329, 349, 350], [343, 344, 338], [332, 346, 334], [334, 346, 313], [333, 348, 335], [335, 348, 353], [331, 345, 351], [330, 350, 343], [343, 356, 344], [339, 344, 345], [341, 352, 354], [354, 346, 332], [348, 340, 359], [353, 355, 336], [343, 350, 356], [345, 357, 351], [340, 347, 359], [344, 357, 345], [348, 359, 365], [349, 336, 368], [351, 354, 352], [346, 1460, 342], [348, 365, 360], [348, 360, 353], [336, 355, 368], [351, 357, 361], [1153, 364, 347], [344, 356, 357], [351, 361, 354], [346, 354, 362], [347, 364, 359], [360, 366, 353], [350, 349, 374], [356, 369, 357], [361, 362, 354], [346, 362, 1460], [358, 364, 1153], [353, 367, 355], [353, 366, 367], [355, 367, 368], [349, 368, 374], [350, 371, 356], [357, 369, 361], [1460, 362, 363], [364, 370, 359], [359, 370, 365], [356, 371, 369], [362, 372, 363], [367, 373, 368], [361, 377, 362], [358, 378, 364], [360, 376, 366], [365, 376, 360], [366, 376, 367], [350, 374, 371], [1477, 363, 384], [1477, 384, 1491], [358, 1175, 378], [371, 375, 369], [369, 375, 361], [363, 372, 384], [376, 379, 367], [375, 377, 361], [378, 385, 364], [364, 385, 382], [364, 382, 370], [365, 370, 382], [368, 380, 374], [374, 380, 371], [371, 381, 375], [367, 379, 373], [368, 373, 386], [380, 381, 371], [375, 381, 377], [377, 390, 362], [362, 390, 372], [382, 391, 365], [365, 391, 376], [368, 386, 380], [381, 383, 377], [378, 1175, 388], [378, 388, 385], [376, 391, 379], [379, 389, 373], [383, 390, 377], [380, 387, 381], [386, 387, 380], [373, 389, 386], [381, 392, 383], [390, 384, 372], [381, 387, 392], [379, 391, 389], [388, 397, 385], [387, 393, 392], [383, 395, 390], [391, 694, 389], [386, 389, 393], [386, 393, 387], [390, 395, 394], [390, 394, 384], [1491, 384, 1539], [385, 397, 382], [392, 395, 383], [382, 397, 391], [393, 396, 392], [392, 396, 395], [384, 394, 1539], [1197, 697, 388], [388, 697, 397], [389, 694, 393], [393, 693, 396], [391, 397, 694], [395, 398, 394], [396, 696, 395], [394, 398, 1539], [694, 693, 393], [395, 696, 398], [399, 414, 440], [399, 440, 400], [400, 440, 401], [401, 440, 402], [402, 440, 403], [403, 440, 404], [404, 440, 405], [405, 440, 406], [406, 440, 407], [407, 440, 408], [408, 440, 409], [409, 440, 443], [409, 443, 410], [410, 443, 411], [411, 443, 415], [412, 426, 445], [412, 445, 413], [413, 445, 414], [414, 445, 440], [415, 443, 416], [416, 443, 417], [417, 443, 418], [418, 443, 419], [419, 443, 420], [420, 443, 421], [421, 443, 427], [422, 434, 445], [422, 445, 423], [423, 445, 424], [424, 445, 425], [425, 445, 426], [427, 443, 428], [428, 443, 429], [429, 443, 435], [430, 439, 456], [430, 456, 431], [431, 456, 432], [432, 456, 433], [433, 456, 434], [434, 456, 445], [440, 445, 457], [435, 447, 436], [435, 443, 447], [437, 441, 456], [437, 456, 438], [438, 456, 439], [441, 442, 456], [442, 444, 456], [440, 457, 443], [444, 446, 456], [446, 450, 456], [448, 451, 456], [448, 456, 449], [449, 456, 450], [456, 469, 445], [445, 469, 457], [451, 452, 456], [443, 457, 447], [447, 457, 460], [452, 455, 456], [453, 458, 479], [453, 479, 454], [454, 479, 455], [455, 479, 456], [458, 459, 479], [459, 461, 479], [461, 462, 479], [457, 469, 470], [457, 475, 460], [460, 475, 477], [462, 463, 479], [463, 464, 479], [464, 465, 479], [460, 477, 1232], [465, 466, 479], [466, 467, 482], [466, 482, 479], [456, 479, 469], [457, 470, 475], [467, 468, 482], [468, 473, 482], [471, 474, 482], [471, 482, 472], [472, 482, 473], [474, 476, 482], [469, 487, 470], [475, 492, 477], [476, 478, 482], [479, 487, 469], [478, 480, 489], [478, 489, 482], [482, 489, 479], [479, 485, 487], [480, 481, 489], [481, 483, 489], [489, 485, 479], [477, 492, 1211], [483, 484, 489], [484, 486, 489], [487, 507, 470], [486, 488, 489], [488, 490, 489], [489, 504, 485], [485, 498, 487], [490, 491, 489], [489, 495, 504], [504, 498, 485], [470, 492, 475], [491, 493, 502], [491, 502, 489], [504, 495, 503], [493, 494, 502], [470, 507, 500], [494, 496, 502], [496, 497, 502], [489, 502, 495], [498, 507, 487], [470, 500, 604], [497, 499, 502], [502, 503, 495], [504, 505, 498], [498, 506, 507], [499, 501, 502], [503, 517, 504], [498, 505, 506], [507, 521, 500], [492, 523, 1211], [501, 508, 502], [503, 526, 517], [517, 510, 504], [504, 512, 505], [506, 505, 513], [506, 514, 507], [508, 509, 502], [502, 525, 503], [504, 510, 511], [504, 511, 512], [505, 512, 513], [506, 513, 514], [514, 521, 507], [509, 515, 538], [509, 538, 502], [503, 525, 526], [511, 510, 519], [521, 529, 500], [515, 516, 538], [517, 518, 510], [510, 518, 519], [511, 519, 512], [512, 519, 520], [512, 520, 513], [513, 527, 514], [529, 530, 500], [500, 530, 604], [516, 522, 538], [520, 527, 513], [514, 528, 521], [470, 604, 492], [522, 524, 538], [514, 527, 528], [521, 528, 529], [523, 1217, 1211], [524, 531, 538], [502, 538, 525], [525, 533, 526], [526, 533, 534], [526, 534, 517], [517, 534, 518], [519, 518, 542], [519, 542, 520], [520, 542, 543], [520, 543, 527], [529, 558, 530], [531, 532, 538], [525, 539, 533], [527, 543, 535], [527, 535, 528], [528, 535, 544], [528, 544, 545], [528, 545, 529], [532, 536, 538], [518, 540, 541], [518, 541, 542], [529, 545, 558], [536, 537, 538], [538, 539, 525], [533, 539, 552], [533, 552, 534], [518, 534, 540], [545, 544, 557], [537, 548, 612], [537, 612, 538], [534, 553, 540], [540, 554, 541], [542, 541, 555], [543, 573, 556], [543, 556, 535], [545, 575, 558], [546, 551, 612], [546, 612, 547], [547, 612, 548], [539, 568, 552], [534, 552, 553], [540, 553, 554], [542, 555, 543], [545, 557, 575], [530, 558, 604], [604, 523, 492], [549, 561, 583], [549, 583, 550], [550, 583, 551], [551, 583, 612], [538, 567, 539], [539, 567, 568], [552, 569, 553], [553, 569, 570], [553, 570, 554], [554, 571, 541], [541, 571, 555], [555, 572, 543], [543, 572, 573], [556, 574, 535], [535, 574, 544], [559, 566, 583], [559, 583, 560], [560, 583, 561], [552, 568, 584], [552, 584, 569], [570, 571, 554], [555, 571, 572], [544, 574, 557], [562, 578, 611], [562, 611, 563], [563, 611, 564], [564, 611, 565], [565, 611, 566], [566, 611, 583], [538, 612, 613], [538, 613, 567], [568, 567, 614], [568, 596, 584], [584, 585, 569], [569, 585, 570], [570, 585, 586], [570, 586, 571], [572, 588, 573], [573, 588, 579], [573, 594, 556], [556, 594, 574], [574, 589, 557], [557, 589, 603], [557, 603, 575], [558, 575, 604], [576, 582, 611], [576, 611, 577], [577, 611, 578], [568, 614, 596], [571, 586, 587], [587, 593, 571], [571, 593, 572], [572, 593, 588], [579, 594, 573], [574, 594, 602], [574, 602, 589], [604, 655, 523], [580, 592, 611], [580, 611, 581], [581, 611, 582], [614, 615, 596], [584, 597, 585], [585, 617, 586], [593, 599, 588], [588, 599, 600], [588, 600, 579], [579, 600, 601], [579, 601, 594], [594, 601, 622], [575, 641, 604], [590, 595, 611], [590, 611, 591], [591, 611, 592], [613, 614, 567], [584, 596, 597], [597, 617, 585], [586, 598, 587], [587, 598, 593], [593, 598, 599], [594, 622, 602], [603, 641, 575], [595, 607, 643], [595, 643, 611], [596, 616, 597], [598, 618, 599], [599, 620, 600], [600, 620, 601], [601, 621, 622], [602, 622, 632], [523, 658, 1217], [605, 610, 643], [605, 643, 606], [606, 643, 607], [596, 615, 616], [597, 616, 617], [586, 617, 598], [598, 617, 618], [618, 619, 599], [599, 619, 620], [601, 620, 621], [608, 623, 643], [608, 643, 609], [609, 643, 610], [611, 643, 650], [611, 650, 583], [614, 613, 642], [616, 627, 617], [617, 628, 618], [618, 628, 619], [619, 629, 620], [620, 629, 621], [621, 629, 630], [622, 621, 631], [622, 631, 632], [602, 632, 640], [602, 640, 589], [603, 589, 648], [603, 648, 641], [623, 626, 643], [614, 642, 635], [614, 635, 615], [616, 615, 627], [617, 627, 628], [619, 628, 629], [621, 630, 631], [589, 640, 648], [523, 655, 658], [624, 634, 643], [624, 643, 625], [625, 643, 626], [615, 636, 627], [627, 636, 628], [629, 628, 645], [629, 645, 637], [629, 637, 630], [630, 638, 631], [640, 647, 648], [604, 641, 655], [633, 987, 634], [634, 987, 643], [628, 636, 644], [630, 637, 638], [631, 638, 639], [631, 639, 632], [613, 612, 642], [628, 644, 645], [645, 646, 637], [638, 646, 639], [632, 639, 647], [632, 647, 640], [641, 648, 655], [642, 652, 635], [615, 635, 636], [636, 635, 644], [637, 646, 638], [987, 659, 643], [612, 583, 651], [612, 651, 642], [644, 635, 656], [644, 656, 649], [644, 649, 645], [646, 654, 639], [642, 651, 652], [645, 649, 653], [645, 653, 646], [646, 653, 654], [639, 654, 647], [647, 654, 648], [583, 660, 651], [652, 651, 635], [635, 651, 656], [649, 657, 653], [643, 659, 650], [583, 650, 660], [649, 656, 664], [649, 664, 657], [653, 657, 654], [654, 662, 648], [655, 668, 658], [651, 661, 656], [656, 661, 664], [654, 657, 662], [648, 663, 655], [651, 660, 661], [648, 662, 663], [659, 671, 650], [650, 671, 660], [657, 664, 665], [657, 665, 662], [662, 665, 663], [655, 663, 668], [660, 667, 661], [661, 667, 664], [659, 677, 671], [658, 672, 1219], [671, 669, 660], [660, 666, 667], [665, 670, 663], [660, 669, 666], [664, 667, 665], [663, 670, 676], [658, 668, 672], [666, 673, 667], [667, 673, 665], [663, 676, 668], [666, 669, 678], [666, 678, 673], [665, 673, 670], [673, 675, 670], [671, 674, 669], [669, 674, 678], [670, 680, 676], [672, 668, 681], [675, 680, 670], [681, 1209, 672], [678, 679, 673], [680, 684, 676], [671, 677, 674], [673, 679, 675], [668, 676, 681], [677, 682, 674], [678, 683, 679], [679, 686, 675], [675, 686, 680], [676, 684, 681], [678, 674, 683], [995, 988, 677], [682, 683, 674], [683, 686, 679], [677, 988, 682], [683, 689, 686], [684, 687, 681], [681, 1213, 1209], [682, 689, 683], [682, 685, 689], [680, 686, 688], [680, 688, 684], [684, 688, 690], [681, 687, 1213], [685, 692, 689], [682, 988, 685], [685, 988, 691], [684, 690, 687], [685, 691, 692], [689, 1, 686], [686, 1, 688], [691, 3, 692], [688, 2, 690], [690, 2, 687], [689, 692, 1], [396, 693, 695], [398, 699, 1539], [694, 397, 697], [396, 695, 696], [398, 696, 699], [697, 698, 694], [694, 698, 693], [693, 698, 695], [696, 701, 699], [697, 1197, 702], [698, 700, 695], [695, 703, 696], [697, 702, 698], [695, 705, 703], [703, 701, 696], [701, 706, 699], [1539, 699, 1533], [702, 700, 698], [700, 705, 695], [1197, 1200, 702], [700, 702, 704], [700, 704, 705], [706, 707, 699], [699, 707, 1533], [701, 710, 706], [1200, 709, 702], [703, 705, 708], [703, 708, 701], [702, 709, 704], [701, 708, 710], [1533, 707, 1541], [710, 711, 706], [705, 704, 715], [705, 714, 708], [708, 714, 717], [708, 717, 710], [709, 1207, 712], [709, 713, 704], [715, 714, 705], [706, 711, 716], [706, 716, 707], [704, 713, 715], [710, 717, 711], [716, 1541, 707], [709, 712, 713], [715, 718, 714], [712, 719, 713], [718, 722, 714], [717, 720, 711], [716, 1543, 1541], [713, 719, 715], [712, 1207, 719], [719, 718, 715], [714, 722, 717], [722, 723, 717], [717, 723, 720], [711, 720, 716], [1207, 724, 719], [718, 725, 721], [718, 721, 722], [719, 725, 718], [716, 745, 1543], [725, 726, 721], [721, 727, 722], [723, 728, 720], [720, 750, 716], [1207, 733, 724], [719, 754, 725], [721, 726, 727], [722, 731, 723], [723, 731, 728], [754, 734, 725], [727, 730, 722], [722, 730, 735], [728, 731, 732], [725, 734, 726], [726, 729, 727], [722, 735, 731], [720, 728, 738], [720, 738, 750], [716, 750, 745], [726, 734, 739], [731, 736, 737], [731, 737, 732], [728, 732, 743], [724, 733, 748], [724, 740, 719], [726, 739, 729], [729, 730, 727], [735, 736, 731], [732, 737, 742], [728, 743, 738], [724, 748, 740], [740, 754, 719], [730, 741, 735], [736, 749, 737], [743, 761, 738], [738, 744, 750], [739, 755, 729], [729, 755, 730], [742, 760, 732], [732, 760, 743], [733, 746, 747], [730, 755, 766], [730, 766, 741], [741, 756, 735], [735, 756, 736], [736, 756, 757], [736, 757, 749], [737, 749, 758], [737, 758, 759], [737, 759, 742], [738, 761, 744], [750, 846, 745], [747, 751, 733], [733, 751, 752], [733, 753, 748], [733, 752, 753], [741, 767, 756], [749, 757, 758], [742, 759, 760], [760, 786, 743], [743, 786, 761], [744, 800, 750], [745, 846, 1536], [753, 762, 748], [739, 734, 778], [767, 769, 756], [756, 770, 757], [756, 769, 770], [758, 757, 771], [759, 758, 772], [759, 773, 760], [759, 772, 773], [760, 773, 786], [744, 761, 799], [762, 763, 748], [748, 763, 764], [748, 764, 765], [766, 767, 741], [767, 768, 769], [757, 770, 771], [758, 771, 772], [750, 800, 834], [765, 774, 748], [748, 774, 775], [748, 775, 776], [739, 779, 755], [766, 780, 767], [766, 793, 780], [767, 780, 768], [768, 781, 769], [769, 781, 782], [769, 783, 770], [769, 782, 783], [771, 784, 772], [772, 784, 785], [761, 786, 799], [744, 799, 800], [776, 777, 748], [778, 839, 739], [739, 839, 779], [755, 793, 766], [768, 780, 781], [770, 783, 771], [771, 783, 784], [772, 785, 773], [777, 787, 748], [748, 787, 788], [748, 788, 789], [748, 789, 740], [734, 754, 778], [755, 779, 793], [793, 779, 812], [782, 795, 783], [783, 796, 797], [783, 797, 784], [773, 785, 798], [773, 798, 786], [800, 799, 821], [789, 790, 740], [740, 790, 791], [740, 791, 792], [780, 793, 794], [780, 794, 781], [781, 804, 782], [782, 804, 795], [783, 795, 796], [784, 805, 785], [784, 797, 805], [785, 805, 798], [750, 848, 846], [792, 801, 740], [740, 801, 802], [740, 802, 803], [779, 839, 811], [779, 811, 812], [793, 813, 794], [781, 794, 814], [781, 814, 804], [804, 816, 795], [804, 815, 816], [798, 805, 819], [786, 820, 799], [799, 820, 821], [803, 806, 740], [740, 806, 807], [740, 807, 808], [740, 808, 809], [740, 809, 810], [740, 810, 754], [793, 812, 813], [794, 813, 814], [804, 814, 815], [795, 816, 817], [795, 817, 796], [796, 817, 818], [796, 818, 797], [797, 819, 805], [797, 818, 819], [798, 819, 832], [798, 832, 786], [786, 832, 820], [800, 821, 834], [750, 834, 848], [810, 822, 754], [754, 822, 823], [754, 823, 824], [812, 828, 813], [815, 814, 829], [816, 815, 830], [816, 830, 817], [817, 830, 843], [818, 817, 831], [821, 833, 834], [824, 825, 754], [754, 825, 826], [754, 826, 827], [754, 827, 778], [812, 811, 828], [815, 829, 830], [817, 843, 831], [818, 831, 819], [819, 831, 853], [819, 853, 832], [820, 845, 821], [827, 835, 778], [778, 835, 836], [778, 836, 837], [813, 840, 814], [814, 841, 829], [829, 841, 842], [829, 842, 830], [830, 842, 843], [821, 845, 833], [837, 838, 778], [811, 850, 828], [828, 840, 813], [840, 851, 814], [814, 851, 841], [831, 843, 844], [831, 844, 853], [838, 847, 778], [828, 850, 840], [853, 854, 832], [820, 832, 854], [845, 860, 833], [847, 849, 778], [778, 849, 839], [811, 839, 850], [840, 850, 851], [841, 852, 842], [841, 851, 852], [842, 852, 865], [842, 865, 843], [843, 865, 844], [820, 854, 845], [849, 855, 839], [851, 850, 858], [854, 859, 845], [860, 861, 833], [833, 861, 834], [848, 834, 888], [846, 848, 889], [855, 856, 839], [839, 871, 850], [850, 857, 858], [858, 864, 851], [851, 864, 852], [844, 865, 866], [844, 866, 853], [845, 859, 860], [834, 861, 888], [856, 862, 839], [853, 867, 854], [860, 859, 868], [860, 868, 861], [861, 868, 888], [848, 888, 892], [1536, 846, 894], [862, 863, 839], [857, 872, 858], [864, 873, 852], [852, 873, 865], [853, 866, 867], [863, 869, 839], [865, 874, 866], [866, 874, 875], [866, 875, 867], [867, 875, 882], [867, 876, 854], [854, 876, 859], [859, 877, 868], [869, 870, 839], [839, 870, 871], [850, 871, 857], [857, 871, 872], [865, 873, 874], [867, 882, 876], [859, 876, 877], [846, 889, 894], [870, 878, 871], [858, 872, 864], [873, 880, 874], [874, 881, 875], [875, 881, 882], [876, 883, 877], [868, 877, 884], [878, 879, 871], [864, 872, 873], [873, 872, 880], [876, 882, 883], [877, 883, 884], [879, 885, 871], [874, 880, 881], [868, 884, 898], [885, 886, 871], [872, 871, 896], [882, 881, 887], [882, 887, 883], [883, 887, 884], [868, 898, 888], [848, 892, 889], [886, 890, 871], [890, 891, 871], [871, 891, 896], [872, 896, 900], [872, 900, 880], [880, 900, 881], [891, 893, 896], [884, 887, 906], [893, 895, 896], [881, 903, 887], [887, 903, 906], [888, 898, 892], [889, 892, 907], [895, 897, 896], [881, 900, 903], [897, 899, 896], [884, 906, 898], [899, 901, 896], [901, 902, 896], [900, 896, 903], [902, 904, 896], [889, 907, 894], [904, 905, 896], [896, 910, 903], [905, 908, 896], [908, 909, 896], [892, 921, 907], [909, 911, 896], [898, 921, 892], [911, 912, 896], [910, 906, 903], [906, 921, 898], [894, 907, 927], [912, 913, 896], [896, 913, 914], [896, 915, 910], [896, 914, 915], [915, 916, 910], [916, 917, 910], [906, 926, 921], [907, 921, 927], [917, 918, 910], [906, 910, 926], [918, 919, 910], [919, 920, 910], [920, 922, 910], [922, 923, 910], [923, 924, 910], [924, 925, 910], [921, 926, 941], [925, 928, 910], [921, 941, 939], [928, 929, 910], [910, 929, 930], [910, 930, 931], [931, 932, 910], [932, 933, 910], [933, 934, 910], [910, 934, 935], [910, 936, 926], [910, 935, 936], [939, 927, 921], [936, 938, 926], [938, 940, 926], [940, 942, 926], [927, 939, 937], [942, 943, 926], [943, 944, 926], [926, 944, 945], [926, 945, 946], [946, 947, 926], [926, 947, 948], [926, 948, 949], [926, 949, 950], [926, 950, 951], [926, 951, 941], [937, 952, 953], [951, 954, 941], [941, 954, 955], [941, 955, 956], [941, 956, 957], [941, 957, 958], [939, 959, 937], [937, 959, 960], [937, 960, 961], [937, 961, 952], [958, 962, 941], [941, 962, 963], [941, 963, 964], [939, 965, 966], [939, 966, 967], [939, 967, 968], [939, 968, 969], [939, 969, 970], [939, 970, 971], [939, 971, 959], [964, 972, 941], [941, 972, 973], [941, 973, 974], [941, 974, 975], [941, 975, 976], [941, 976, 977], [941, 978, 939], [941, 977, 978], [939, 978, 979], [939, 979, 980], [939, 980, 981], [939, 981, 982], [939, 982, 983], [939, 983, 984], [939, 984, 965], [633, 985, 987], [991, 995, 677], [985, 986, 987], [659, 987, 991], [659, 991, 677], [986, 989, 987], [989, 990, 987], [990, 992, 987], [987, 999, 991], [992, 993, 987], [987, 993, 999], [993, 994, 999], [994, 996, 999], [996, 997, 999], [999, 1002, 991], [997, 998, 999], [991, 1002, 995], [995, 1007, 988], [998, 1000, 999], [1000, 1002, 999], [1000, 1001, 1002], [1001, 1003, 1002], [995, 1011, 1007], [1003, 1004, 1002], [1004, 1005, 1002], [1002, 1016, 995], [995, 1016, 1011], [1005, 1006, 1002], [1002, 1006, 1013], [1006, 1008, 1013], [1008, 1009, 1013], [1002, 1013, 1016], [1009, 1010, 1013], [1010, 1012, 1013], [1012, 1014, 1013], [1013, 1020, 1016], [1011, 1023, 1007], [1007, 1023, 1017], [1014, 1015, 1013], [1015, 1018, 1013], [1011, 1016, 1029], [1018, 1020, 1013], [1018, 1019, 1020], [1029, 1030, 1011], [1011, 1030, 1023], [1019, 1021, 1020], [1017, 1023, 21], [21, 1023, 28], [1021, 1022, 1020], [1022, 1028, 1020], [1022, 1024, 1028], [1020, 1028, 1016], [1024, 1025, 1028], [1028, 1029, 1016], [1025, 1026, 1028], [1023, 1035, 28], [1026, 1027, 1028], [1023, 1038, 1035], [1027, 1031, 1028], [1030, 1038, 1023], [1031, 1032, 1028], [1032, 1033, 1028], [1029, 1028, 1041], [1029, 1044, 1030], [1033, 1034, 1028], [1038, 1045, 1035], [1034, 1036, 1028], [1028, 1036, 1041], [1029, 1041, 1044], [1036, 1037, 1041], [1037, 1039, 1041], [1039, 1040, 1041], [1040, 1042, 1041], [1038, 1030, 1050], [44, 1046, 55], [1042, 1043, 1041], [1038, 1050, 1045], [1043, 1047, 1041], [1041, 1047, 1049], [1041, 1049, 1044], [1044, 1053, 1030], [1030, 1053, 1050], [1047, 1048, 1049], [1045, 1054, 1035], [1035, 1054, 1046], [1048, 1051, 1049], [1044, 1049, 1053], [1045, 1059, 1054], [1051, 1052, 1049], [1050, 1053, 1058], [1050, 1058, 1045], [1045, 1058, 1059], [1054, 1064, 1046], [1052, 1057, 1049], [1052, 1055, 1057], [1049, 1057, 1053], [1055, 1056, 1057], [1046, 1061, 55], [1056, 1060, 1057], [1046, 1064, 1061], [1060, 1062, 1057], [1057, 1066, 1053], [1066, 1067, 1053], [1053, 1067, 1058], [1062, 1063, 1057], [1057, 1063, 1066], [1059, 1069, 1054], [1054, 1069, 1070], [1054, 1070, 1064], [1064, 1071, 1061], [1063, 1065, 1066], [1067, 1074, 1058], [1059, 1058, 1069], [1065, 1068, 1066], [1058, 1074, 1075], [1058, 1075, 1069], [1068, 1073, 1066], [1068, 1072, 1073], [1066, 1073, 1067], [1067, 1073, 1074], [1064, 1070, 1080], [1064, 1080, 1071], [1072, 1076, 1073], [1075, 1079, 1069], [1069, 1079, 1070], [1070, 1079, 1080], [1076, 1077, 1073], [1073, 1082, 1074], [1071, 1080, 1084], [1077, 1078, 1073], [1078, 1081, 1073], [1073, 1081, 1082], [1075, 1089, 1079], [1081, 1086, 1082], [1081, 1083, 1086], [1082, 1088, 1074], [1074, 1088, 1075], [1075, 1088, 1089], [1083, 1085, 1086], [1082, 1086, 1088], [1079, 1089, 1080], [1080, 1100, 1084], [1084, 159, 1071], [1085, 1087, 1086], [1086, 1094, 1088], [1080, 1089, 1092], [1087, 1090, 1086], [1088, 1094, 1095], [1084, 1100, 159], [1090, 1091, 1086], [1088, 1095, 1089], [1080, 1092, 1100], [1091, 1093, 1086], [1086, 1093, 1094], [1089, 1104, 1092], [1093, 1096, 1094], [1094, 1098, 1095], [1096, 1097, 1094], [1095, 1098, 1104], [1095, 1104, 1089], [1097, 1102, 1094], [1097, 1099, 1102], [1099, 1101, 1102], [1094, 1102, 1098], [1098, 1107, 1104], [1101, 1103, 1102], [1102, 1106, 1098], [1098, 1106, 1107], [1103, 1105, 1102], [1107, 1112, 1104], [1105, 1110, 1102], [1105, 1108, 1110], [1104, 1117, 1092], [1092, 1117, 1100], [1100, 1117, 1113], [1100, 1113, 206], [1108, 1109, 1110], [1102, 1110, 1106], [1107, 1106, 1116], [1107, 1116, 1112], [1109, 1111, 1110], [1106, 1120, 1116], [1104, 1112, 1117], [1111, 1114, 1110], [1110, 1114, 1119], [1110, 1119, 1106], [1106, 1119, 1120], [1114, 1115, 1119], [1115, 1118, 1119], [1120, 1124, 1116], [1116, 1126, 1112], [1113, 1117, 1122], [1118, 1121, 1119], [1116, 1129, 1126], [1112, 1126, 1117], [1121, 1128, 1119], [1121, 1123, 1128], [1116, 1124, 1129], [1117, 1126, 1122], [1113, 1122, 1135], [1123, 1125, 1128], [1119, 1128, 1132], [1125, 1127, 1128], [1119, 1132, 1133], [1119, 1133, 1120], [1120, 1133, 1124], [1113, 1135, 284], [1127, 1130, 1128], [1130, 1131, 1132], [1130, 1132, 1128], [1124, 1133, 1138], [1124, 1138, 1129], [1126, 1129, 1139], [1126, 1139, 1122], [1131, 1134, 1132], [1132, 1137, 1133], [1122, 1139, 1135], [1135, 318, 284], [1134, 1136, 1132], [1132, 1136, 1137], [1135, 1139, 1153], [1136, 1140, 1137], [1140, 1141, 1137], [1137, 1145, 1133], [1133, 1145, 1148], [1133, 1148, 1138], [1129, 1138, 1139], [1141, 1142, 1144], [1141, 1144, 1137], [1138, 1152, 1139], [1135, 347, 318], [1142, 1143, 1144], [1137, 1144, 1145], [1135, 1153, 347], [1143, 1146, 1144], [1144, 1146, 1151], [1145, 1160, 1148], [1146, 1147, 1151], [1138, 1148, 1152], [1139, 1152, 1153], [1147, 1149, 1151], [1144, 1156, 1145], [1145, 1156, 1160], [1149, 1150, 1151], [1144, 1151, 1156], [1150, 1154, 1151], [1148, 1160, 1152], [1154, 1155, 1151], [1160, 1165, 1152], [1155, 1157, 1151], [1151, 1157, 1162], [1152, 358, 1153], [1157, 1158, 1162], [1152, 1165, 358], [1158, 1159, 1162], [1151, 1162, 1156], [1159, 1161, 1162], [1156, 1171, 1160], [1156, 1162, 1171], [1161, 1163, 1168], [1161, 1168, 1162], [1163, 1164, 1168], [1162, 1168, 1169], [1164, 1166, 1168], [1166, 1167, 1168], [1167, 1170, 1168], [1162, 1169, 1171], [1160, 1171, 1175], [1160, 1175, 1165], [1170, 1172, 1168], [358, 1165, 1175], [1172, 1173, 1180], [1172, 1180, 1168], [1168, 1180, 1169], [1173, 1174, 1180], [1174, 1176, 1180], [1169, 1185, 1171], [1171, 1185, 1175], [1175, 1185, 1189], [1176, 1177, 1180], [1180, 1181, 1169], [1169, 1181, 1185], [1177, 1178, 1180], [1178, 1179, 1180], [1179, 1182, 1180], [1180, 1182, 1187], [1182, 1183, 1187], [1183, 1184, 1187], [1184, 1186, 1187], [1187, 1193, 1180], [1180, 1193, 1181], [1186, 1188, 1187], [1188, 1190, 1187], [1181, 1193, 1185], [1185, 1200, 1189], [1175, 1189, 388], [1190, 1191, 1187], [1191, 1192, 1187], [1185, 1193, 1200], [1189, 1197, 388], [1192, 1194, 1187], [1187, 1194, 1202], [1187, 1202, 1193], [1194, 1195, 1202], [1195, 1196, 1202], [1202, 1207, 1193], [1189, 1200, 1197], [1196, 1198, 1202], [1198, 1199, 1202], [1199, 1201, 1202], [1193, 1207, 1200], [1201, 1203, 733], [1201, 733, 1202], [1203, 1204, 733], [1204, 1205, 733], [1205, 1206, 733], [1206, 1208, 733], [1202, 733, 1207], [1208, 746, 733], [1200, 1207, 709], [447, 1210, 436], [658, 1225, 1217], [460, 1222, 447], [447, 1212, 1210], [658, 1219, 1225], [1212, 447, 1214], [447, 1215, 1214], [447, 1216, 1215], [447, 1218, 1216], [477, 1239, 1232], [447, 1220, 1218], [1213, 1228, 1209], [672, 1231, 1219], [460, 1232, 1222], [1222, 1221, 447], [447, 1221, 1220], [1209, 1231, 672], [1225, 1229, 1217], [1221, 1222, 1223], [1217, 1229, 1211], [1232, 1235, 1222], [1222, 1224, 1223], [1211, 1229, 1243], [1211, 1239, 477], [1222, 1226, 1224], [1222, 1235, 1227], [1222, 1227, 1226], [1219, 1241, 1225], [1235, 1230, 1227], [1209, 1228, 1238], [1209, 1238, 1231], [1235, 1233, 1230], [1213, 20, 1246], [1213, 1246, 1228], [1243, 1239, 1211], [1235, 1234, 1233], [1219, 1231, 1241], [1225, 1242, 1229], [1243, 1253, 1239], [1235, 1236, 1234], [1235, 1237, 1236], [1229, 1242, 1243], [1235, 1240, 1237], [1241, 1242, 1225], [1232, 1248, 1235], [1235, 1244, 1240], [1231, 1238, 1241], [1232, 1239, 1248], [1235, 1245, 1244], [1242, 1251, 1243], [1235, 1247, 1245], [1228, 1246, 1255], [1228, 1255, 1238], [1241, 1257, 1242], [1248, 1249, 1235], [1235, 1249, 1247], [1241, 1238, 1265], [1243, 1258, 1253], [1248, 1250, 1249], [1251, 1258, 1243], [1248, 1252, 1250], [1238, 1255, 1265], [1242, 1262, 1251], [1239, 1260, 1248], [1248, 1254, 1252], [20, 1273, 1246], [1246, 1268, 1255], [1248, 1256, 1254], [1246, 1273, 1268], [1257, 1262, 1242], [1253, 1266, 1239], [1248, 1259, 1256], [1241, 1265, 1257], [1248, 1261, 1259], [1239, 1266, 1260], [1248, 1263, 1261], [20, 1283, 1273], [1268, 1269, 1255], [1255, 1269, 1279], [1255, 1279, 1265], [1248, 1260, 1264], [1248, 1264, 1263], [1265, 1274, 1257], [1257, 1274, 1262], [1251, 1262, 1258], [1258, 1277, 1253], [1253, 1271, 1266], [1260, 1267, 1264], [1262, 1276, 1258], [1260, 1270, 1267], [1268, 1273, 1307], [1253, 1277, 1271], [1260, 1272, 1270], [1286, 1269, 1268], [1260, 1275, 1272], [1258, 1284, 1277], [1258, 1276, 1284], [1266, 1278, 1260], [1260, 1278, 1275], [1307, 1286, 1268], [1274, 1291, 1262], [1266, 1280, 1278], [1279, 1294, 1265], [1266, 1281, 1280], [1283, 1311, 1273], [1273, 1311, 1307], [1286, 1300, 1269], [1265, 1291, 1274], [1277, 1284, 1288], [1266, 1282, 1281], [1269, 1300, 1279], [1294, 1302, 1265], [1262, 1291, 1276], [1276, 1291, 1304], [1271, 1285, 1266], [1266, 1285, 1282], [1300, 1301, 1279], [1265, 1302, 1291], [1276, 1292, 1284], [1271, 1287, 1285], [1283, 59, 1297], [1301, 1294, 1279], [1277, 1289, 1271], [1271, 1289, 1287], [1284, 1292, 1295], [1277, 1290, 1289], [1283, 1317, 1311], [1284, 1298, 1288], [1288, 1293, 1277], [1277, 1293, 1290], [1297, 1317, 1283], [1292, 1305, 1295], [1284, 1295, 1298], [1288, 1296, 1293], [59, 63, 1297], [1276, 1304, 1292], [1298, 1299, 1288], [1288, 1299, 1296], [1302, 1308, 1291], [1298, 1303, 1299], [1307, 1312, 1286], [1286, 1312, 1300], [1291, 1308, 1304], [1295, 1306, 1298], [1298, 1306, 1303], [1304, 1308, 1320], [1304, 1313, 1292], [1295, 1305, 1309], [1295, 1309, 1306], [63, 97, 1297], [1300, 1312, 1326], [1300, 1326, 1301], [1301, 1326, 1319], [1301, 1319, 1294], [1302, 1294, 1328], [1305, 1310, 1309], [1297, 97, 1324], [1307, 1311, 1318], [1307, 1318, 1312], [1328, 1308, 1302], [1304, 1320, 1313], [1292, 1313, 1305], [1305, 1313, 1322], [1305, 1322, 1315], [1305, 1315, 1310], [1310, 1315, 1314], [1315, 1316, 1314], [97, 1332, 1324], [1297, 1324, 1317], [1311, 1317, 1325], [1311, 1325, 1318], [1312, 1318, 1326], [1294, 1319, 1328], [1316, 1315, 1321], [1326, 1327, 1319], [1308, 1336, 1320], [1320, 1337, 1313], [1313, 1337, 1322], [1322, 1330, 1315], [1315, 1323, 1321], [1318, 1325, 1333], [1319, 1327, 1335], [1319, 1335, 1328], [1315, 1330, 1323], [1323, 1330, 1329], [1317, 1324, 1341], [1317, 1341, 1325], [1318, 1334, 1326], [1326, 1334, 1327], [1328, 1336, 1308], [1328, 1354, 1336], [1336, 1344, 1320], [1320, 1344, 1337], [1322, 1337, 1330], [1330, 1331, 1329], [97, 1346, 1332], [1318, 1333, 1334], [1331, 1330, 1338], [127, 1346, 97], [1332, 1346, 1340], [1332, 1340, 1324], [1324, 1340, 1341], [1325, 1341, 1342], [1325, 1342, 1333], [1333, 1351, 1334], [1334, 1352, 1343], [1334, 1343, 1327], [1327, 1353, 1335], [1337, 1347, 1330], [1330, 1339, 1338], [127, 174, 1346], [1333, 1342, 1351], [1334, 1351, 1352], [1327, 1343, 1353], [1328, 1335, 1354], [1330, 1347, 1339], [1339, 1347, 1345], [1340, 1349, 1341], [1341, 1349, 1350], [1341, 1350, 1342], [1337, 1344, 1347], [1347, 1348, 1345], [1346, 1356, 1340], [1340, 1356, 1349], [1342, 1350, 1351], [1353, 1362, 1335], [1335, 1362, 1354], [1347, 1344, 1357], [1348, 1347, 1355], [1346, 174, 1356], [1349, 1367, 1359], [1349, 1359, 1350], [1350, 1359, 1360], [1343, 1352, 1361], [1343, 1361, 1353], [1354, 1363, 1336], [1336, 1364, 1344], [1347, 1358, 1355], [1347, 1357, 1358], [174, 1366, 1356], [1350, 1371, 1351], [1350, 1360, 1371], [1351, 1371, 1352], [1352, 1371, 1372], [1352, 1372, 1361], [1353, 1361, 1373], [1353, 1373, 1362], [1336, 1363, 1364], [1344, 1364, 1368], [1344, 1368, 1357], [1357, 1369, 1358], [1358, 1369, 1365], [1366, 1375, 1356], [1356, 1375, 1367], [1356, 1367, 1349], [1357, 1368, 1369], [1369, 1370, 1365], [1359, 1367, 1379], [1360, 1359, 1380], [1360, 1380, 1371], [1372, 1381, 1361], [1361, 1381, 1373], [1362, 1363, 1354], [1364, 1382, 1368], [1369, 1376, 1370], [1370, 1376, 1374], [1367, 1375, 1378], [1367, 1378, 1379], [1359, 1379, 1380], [1373, 1392, 1362], [1362, 1393, 1363], [1363, 1394, 1364], [1368, 1382, 1376], [1368, 1376, 1369], [1376, 1377, 1374], [1366, 1384, 1375], [1366, 241, 1384], [1375, 1384, 1378], [1371, 1380, 1390], [1371, 1390, 1391], [1371, 1391, 1372], [1372, 1391, 1381], [1373, 1381, 1392], [1362, 1392, 1393], [1363, 1393, 1402], [1363, 1402, 1394], [1364, 1394, 1382], [1376, 1382, 1385], [1377, 1376, 1383], [1380, 1379, 1389], [1380, 1389, 1390], [1392, 1381, 1401], [1376, 1386, 1383], [1376, 1385, 1386], [1378, 1384, 1387], [1378, 1388, 1379], [1378, 1387, 1388], [1379, 1388, 1389], [1381, 1391, 1401], [1382, 1396, 1385], [1386, 1385, 1395], [241, 266, 1384], [1391, 1400, 1401], [1394, 1407, 1382], [1382, 1407, 1396], [1396, 1403, 1385], [1385, 1397, 1395], [1385, 1403, 1397], [1384, 266, 1398], [1384, 1398, 1387], [1387, 1398, 1399], [1387, 1399, 1388], [1388, 1399, 1389], [1390, 1406, 1391], [1391, 1406, 1400], [1392, 1401, 1393], [1397, 1403, 1404], [266, 1421, 1398], [1389, 1399, 1415], [1390, 1389, 1416], [1390, 1416, 1406], [1400, 1417, 1401], [1401, 1417, 1393], [1393, 1425, 1402], [1402, 1425, 1394], [1396, 1419, 1409], [1396, 1409, 1403], [1403, 1409, 1410], [1403, 1405, 1404], [1403, 1410, 1405], [1398, 1421, 1412], [1398, 1412, 1413], [1398, 1413, 1399], [1399, 1413, 1414], [1399, 1414, 1415], [1389, 1415, 1416], [1393, 1417, 1425], [1394, 1418, 1407], [1396, 1407, 1419], [1405, 1410, 1408], [1400, 1406, 1424], [1400, 1424, 1417], [1425, 1418, 1394], [1410, 1411, 1408], [1416, 1423, 1406], [1406, 1423, 1424], [1407, 1418, 1426], [1411, 1410, 1420], [1414, 1428, 1415], [1417, 1438, 1425], [1407, 1426, 1419], [1409, 1432, 1410], [1410, 1422, 1420], [1410, 1433, 1422], [1414, 1413, 1428], [1423, 1431, 1424], [1419, 1432, 1409], [1422, 1433, 1427], [1424, 1437, 1417], [1432, 1433, 1410], [1433, 1429, 1427], [1413, 1412, 1446], [1413, 1446, 1428], [1415, 1428, 1436], [1415, 1430, 1416], [1415, 1436, 1430], [1416, 1430, 1423], [1417, 1437, 1438], [1418, 1425, 1426], [1426, 1440, 1419], [1419, 1440, 1432], [1429, 1433, 1434], [1412, 1421, 1446], [1426, 1425, 1448], [1426, 1448, 1443], [1426, 1443, 1440], [1433, 1435, 1434], [1433, 1441, 1435], [1446, 1457, 1428], [1428, 1457, 1436], [1424, 1431, 1437], [1435, 1441, 1439], [1441, 1444, 1439], [1439, 1444, 1442], [1421, 342, 1446], [1425, 1438, 1448], [1432, 1449, 1433], [1433, 1449, 1441], [1442, 1444, 1445], [1423, 1453, 1431], [1431, 1453, 1437], [1437, 1454, 1438], [1445, 1444, 1451], [1445, 1451, 1447], [1436, 1469, 1430], [1423, 1430, 1453], [1437, 1453, 1454], [1438, 1455, 1448], [1447, 1451, 1463], [1447, 1463, 1450], [1436, 1457, 1469], [1443, 1448, 1462], [1432, 1440, 1449], [1441, 1458, 1444], [1441, 1449, 1458], [1450, 1463, 1452], [342, 1460, 1446], [1454, 1455, 1438], [1444, 1458, 1451], [1452, 1463, 1464], [1452, 1464, 1456], [1446, 1460, 1457], [1456, 1464, 1459], [1448, 1483, 1462], [1451, 1475, 1463], [1459, 1464, 1461], [1457, 1477, 1469], [1430, 1469, 1453], [1453, 1469, 1470], [1453, 1474, 1454], [1448, 1455, 1483], [1440, 1467, 1449], [1449, 1467, 1458], [1461, 1464, 1472], [1461, 1472, 1465], [1453, 1470, 1474], [1454, 1474, 1455], [1443, 1462, 1440], [1458, 1467, 1475], [1465, 1472, 1481], [1465, 1481, 1466], [1462, 1480, 1440], [1458, 1475, 1451], [1466, 1481, 1468], [1455, 1474, 1479], [1455, 1479, 1483], [1468, 1481, 1471], [1460, 363, 1457], [1469, 1493, 1470], [1440, 1480, 1467], [1463, 1486, 1464], [1464, 1486, 1472], [1471, 1481, 1473], [1457, 363, 1477], [1473, 1481, 1476], [1483, 1484, 1462], [1475, 1467, 1480], [1475, 1486, 1463], [1476, 1481, 1489], [1476, 1489, 1478], [1462, 1484, 1480], [1478, 1489, 1482], [1469, 1477, 1491], [1470, 1494, 1474], [1474, 1494, 1479], [1480, 1486, 1475], [1486, 1498, 1472], [1482, 1489, 1485], [1472, 1499, 1481], [1485, 1489, 1487], [1470, 1493, 1494], [1486, 1480, 1502], [1498, 1499, 1472], [1489, 1495, 1487], [1487, 1495, 1488], [1491, 1510, 1469], [1486, 1502, 1498], [1488, 1495, 1490], [1479, 1494, 1501], [1479, 1501, 1483], [1483, 1501, 1484], [1490, 1495, 1492], [1469, 1510, 1493], [1492, 1495, 1496], [1494, 1512, 1501], [1480, 1484, 1502], [1496, 1495, 1497], [1484, 1505, 1502], [1481, 1507, 1489], [1497, 1495, 1500], [1484, 1501, 1505], [1499, 1507, 1481], [1495, 1508, 1500], [1500, 1508, 1503], [1493, 1511, 1494], [1494, 1511, 1512], [1489, 1507, 1495], [1503, 1508, 1504], [1504, 1508, 1506], [1505, 1501, 1516], [1502, 1518, 1498], [1498, 1518, 1499], [1506, 1508, 1509], [1491, 1539, 1510], [1509, 1508, 1513], [1510, 1511, 1493], [1502, 1505, 1518], [1495, 1524, 1508], [1513, 1508, 1514], [1514, 1508, 1524], [1514, 1524, 1515], [1512, 1516, 1501], [1505, 1516, 1518], [1507, 1523, 1495], [1495, 1523, 1524], [1515, 1524, 1517], [1517, 1524, 1519], [1511, 1526, 1512], [1512, 1526, 1516], [1499, 1518, 1507], [1519, 1524, 1520], [1516, 1534, 1518], [1507, 1518, 1522], [1507, 1522, 1523], [1520, 1524, 1521], [1516, 1529, 1534], [1518, 1534, 1522], [1521, 1524, 1525], [1510, 1533, 1511], [1525, 1524, 1530], [1525, 1530, 1527], [1511, 1533, 1526], [1527, 1530, 1528], [1529, 1536, 1534], [1528, 1530, 1531], [1510, 1539, 1533], [1524, 1523, 927], [1524, 927, 1530], [1530, 1532, 1531], [1532, 1530, 1535], [1526, 1543, 1516], [1516, 1543, 1529], [1535, 1530, 1537], [1526, 1541, 1543], [1522, 1534, 894], [1530, 937, 1537], [1537, 937, 1538], [1529, 1543, 1536], [1534, 1536, 894], [1522, 894, 1523], [1538, 937, 1540], [927, 937, 1530], [1540, 937, 1542], [1526, 1533, 1541], [1523, 894, 927], [937, 1544, 1542], [1544, 937, 1545], [1543, 745, 1536], [1545, 937, 953]] |
#!/usr/bin/env python
# Mainly for use in stubconnections/kubectl.yml
print('PID: 1')
| print('PID: 1') |
# START LAB EXERCISE 03
print('Lab Exercise 03 \n')
# PROBLEM 1 (5 Points)
inventors = None
# PROBLEM 2 (4 Points)
#SETUP
invention = 'Heating, ventilation, and air conditioning'
#END SETUP
# PROBLEM 3 (4 Points)
# SETUP
new_inventor = {'Alexander Miles': 'Automatic electric elevator doors'}
# END SETUP
# PROBLEM 4 (4 Points)
# PROBLEM 5 (4 Points)
# SETUP
gastroscope_inventor = 'Leonidas Berry'
# END SETUP
tuple_gastroscope_inventor = None
# PROBLEM 6 (4 Points)
medical_inventors = None
# END LAB EXERCISE
| print('Lab Exercise 03 \n')
inventors = None
invention = 'Heating, ventilation, and air conditioning'
new_inventor = {'Alexander Miles': 'Automatic electric elevator doors'}
gastroscope_inventor = 'Leonidas Berry'
tuple_gastroscope_inventor = None
medical_inventors = None |
#!/usr/bin/python3
# Can user retrieve reward after a time cycle?
def test_get_reward(multi, base_token, reward_token, alice, issue, chain):
amount = 10 ** 10
init_reward_balance = reward_token.balanceOf(alice)
base_token.approve(multi, amount, {"from": alice})
multi.stake(amount, {"from": alice})
chain.mine(timedelta=60)
earnings = multi.earned(alice, reward_token)
assert earnings > 0
multi.getReward({"from": alice})
final_reward_balance = reward_token.balanceOf(alice)
assert final_reward_balance - init_reward_balance == earnings
# Reward per token over many cycles?
def test_multiuser_reward_per_token_paid(multi, reward_token, alice, chain):
reward_token._mint_for_testing(alice, 10 ** 18, {"from": alice})
reward_token.approve(multi, 10 ** 18, {"from": alice})
multi.setRewardsDistributor(reward_token, alice, {"from": alice})
multi.stake(10 ** 10, {"from": alice})
for i in range(5):
last_val = multi.userRewardPerTokenPaid(alice, reward_token)
multi.notifyRewardAmount(reward_token, 10 ** 10, {"from": alice})
chain.mine(timedelta=60)
earnings = multi.earned(alice, reward_token)
tx = multi.getReward()
assert multi.userRewardPerTokenPaid(alice, reward_token) > last_val
assert tx.events["RewardPaid"].values()[2] == earnings
# User should not be able to withdraw a reward if empty
def test_cannot_get_empty_reward(multi, reward_token, alice, chain):
init_amount = reward_token.balanceOf(alice)
chain.mine(timedelta=60)
multi.getReward({"from": alice})
final_amount = reward_token.balanceOf(alice)
assert init_amount == final_amount
# User should not be able to withdraw a reward if empty
def test_no_action_on_empty_reward(multi, reward_token, charlie):
tx = multi.getReward({"from": charlie})
assert "RewardPaid" not in tx.events
# Call from a user who is staked should receive the correct amount of tokens
def test_staked_token_value(multi, reward_token, base_token, alice, charlie, issue, chain):
amount = base_token.balanceOf(charlie)
reward_init_bal = reward_token.balanceOf(charlie)
base_token.approve(multi, amount, {"from": charlie})
multi.stake(amount, {"from": charlie})
assert base_token.balanceOf(charlie) == 0
assert multi.balanceOf(charlie) == amount
chain.mine(timedelta=60)
reward_per_token = multi.rewardPerToken(reward_token)
earned_calc = reward_per_token * amount // 10 ** 18
assert earned_calc == multi.earned(charlie, reward_token)
tx = multi.getReward({"from": charlie})
assert tx.events["RewardPaid"].values()[2] == earned_calc
assert reward_token.balanceOf(charlie) - reward_init_bal == earned_calc
# User at outset has no earnings
def test_fresh_user_no_earnings(multi, reward_token, charlie, issue):
assert multi.earned(charlie, reward_token) == 0
# User has no earnings after staking
def test_no_earnings_upon_staking(multi, reward_token, base_token, charlie, issue):
amount = base_token.balanceOf(charlie)
base_token.approve(multi, amount, {"from": charlie})
multi.stake(amount, {"from": charlie})
assert multi.earned(charlie, reward_token) == 0
# User has earnings after staking and waiting
def test_user_accrues_rewards(multi, reward_token, base_token, charlie, issue, chain):
amount = base_token.balanceOf(charlie)
base_token.approve(multi, amount, {"from": charlie})
multi.stake(amount, {"from": charlie})
chain.mine(timedelta=60)
period = (
multi.lastTimeRewardApplicable(reward_token)
- multi.rewardData(reward_token)["lastUpdateTime"]
)
calc_earn = period * (10 ** 18 / 60)
assert calc_earn * 0.99 <= multi.earned(charlie, reward_token) <= calc_earn * 1.01
# User has no earnings after withdrawing
def test_no_earnings_post_withdrawal(
multi, reward_token, slow_token, base_token, alice, charlie, issue, chain
):
amount = base_token.balanceOf(charlie)
base_token.approve(multi, amount, {"from": charlie})
multi.stake(amount, {"from": charlie})
chain.mine(timedelta=30)
assert multi.earned(charlie, reward_token) > 0
multi.getReward({"from": charlie})
multi.withdraw(multi.balanceOf(charlie), {"from": charlie})
chain.mine(timedelta=30)
assert multi.earned(charlie, reward_token) == 0
# Call from a user who is staked should receive the correct amount of tokens
# Also confirm earnings at various stages
def test_staked_tokens_multi_durations(
multi, reward_token, slow_token, base_token, alice, charlie, issue, chain
):
reward_init_bal = reward_token.balanceOf(charlie)
slow_init_bal = slow_token.balanceOf(charlie)
amount = base_token.balanceOf(charlie)
base_token.approve(multi, amount, {"from": charlie})
multi.stake(amount, {"from": charlie})
for i in range(1):
reward_init_bal = reward_token.balanceOf(charlie)
slow_init_bal = slow_token.balanceOf(charlie)
charlie_paid_reward = multi.userRewardPerTokenPaid(charlie, reward_token)
charlie_paid_slow = multi.userRewardPerTokenPaid(charlie, slow_token)
chain.mine(timedelta=30)
reward_per = multi.rewardPerToken(reward_token)
slow_per = multi.rewardPerToken(slow_token)
reward_calc = (amount * (reward_per - charlie_paid_reward)) // 10 ** 18
slow_calc = (amount * (slow_per - charlie_paid_slow)) // 10 ** 18
assert reward_calc == multi.earned(charlie, reward_token)
assert slow_calc == multi.earned(charlie, slow_token)
multi.getReward({"from": charlie})
# Reward may have changed in the second it takes to getReward
reward_per_act = multi.rewardPerToken(reward_token)
slow_per_act = multi.rewardPerToken(slow_token)
reward_calc_act = (amount * (reward_per_act - charlie_paid_reward)) // 10 ** 18
slow_calc_act = (amount * (slow_per_act - charlie_paid_slow)) // 10 ** 18
assert reward_token.balanceOf(charlie) - reward_init_bal == reward_calc_act
assert slow_token.balanceOf(charlie) - slow_init_bal == slow_calc_act
# A user that has withdrawn should still be able to claim their rewards
def test_withdrawn_user_can_claim(multi, slow_token, base_token, alice, charlie, issue, chain):
amount = base_token.balanceOf(charlie)
reward_init_bal = slow_token.balanceOf(charlie)
base_token.approve(multi, amount, {"from": charlie})
multi.stake(amount, {"from": charlie})
# Confirm charlie staked
assert base_token.balanceOf(charlie) == 0
assert multi.balanceOf(charlie) == amount
chain.mine(timedelta=60)
multi.withdraw(amount, {"from": charlie})
# Confirm Charlie withdrew as expected
reward_per_token = multi.rewardPerToken(slow_token)
earned_calc = reward_per_token * amount // 10 ** 18
assert multi.balanceOf(charlie) == 0
assert reward_per_token > 0
assert earned_calc == multi.earned(charlie, slow_token)
# Does Charlie still get rewarded?
tx = multi.getReward({"from": charlie})
for e in tx.events["RewardPaid"]:
if e["user"] == charlie and e["rewardsToken"] == slow_token:
token_log = e
assert token_log["reward"] == earned_calc
assert slow_token.balanceOf(charlie) - reward_init_bal == earned_calc
| def test_get_reward(multi, base_token, reward_token, alice, issue, chain):
amount = 10 ** 10
init_reward_balance = reward_token.balanceOf(alice)
base_token.approve(multi, amount, {'from': alice})
multi.stake(amount, {'from': alice})
chain.mine(timedelta=60)
earnings = multi.earned(alice, reward_token)
assert earnings > 0
multi.getReward({'from': alice})
final_reward_balance = reward_token.balanceOf(alice)
assert final_reward_balance - init_reward_balance == earnings
def test_multiuser_reward_per_token_paid(multi, reward_token, alice, chain):
reward_token._mint_for_testing(alice, 10 ** 18, {'from': alice})
reward_token.approve(multi, 10 ** 18, {'from': alice})
multi.setRewardsDistributor(reward_token, alice, {'from': alice})
multi.stake(10 ** 10, {'from': alice})
for i in range(5):
last_val = multi.userRewardPerTokenPaid(alice, reward_token)
multi.notifyRewardAmount(reward_token, 10 ** 10, {'from': alice})
chain.mine(timedelta=60)
earnings = multi.earned(alice, reward_token)
tx = multi.getReward()
assert multi.userRewardPerTokenPaid(alice, reward_token) > last_val
assert tx.events['RewardPaid'].values()[2] == earnings
def test_cannot_get_empty_reward(multi, reward_token, alice, chain):
init_amount = reward_token.balanceOf(alice)
chain.mine(timedelta=60)
multi.getReward({'from': alice})
final_amount = reward_token.balanceOf(alice)
assert init_amount == final_amount
def test_no_action_on_empty_reward(multi, reward_token, charlie):
tx = multi.getReward({'from': charlie})
assert 'RewardPaid' not in tx.events
def test_staked_token_value(multi, reward_token, base_token, alice, charlie, issue, chain):
amount = base_token.balanceOf(charlie)
reward_init_bal = reward_token.balanceOf(charlie)
base_token.approve(multi, amount, {'from': charlie})
multi.stake(amount, {'from': charlie})
assert base_token.balanceOf(charlie) == 0
assert multi.balanceOf(charlie) == amount
chain.mine(timedelta=60)
reward_per_token = multi.rewardPerToken(reward_token)
earned_calc = reward_per_token * amount // 10 ** 18
assert earned_calc == multi.earned(charlie, reward_token)
tx = multi.getReward({'from': charlie})
assert tx.events['RewardPaid'].values()[2] == earned_calc
assert reward_token.balanceOf(charlie) - reward_init_bal == earned_calc
def test_fresh_user_no_earnings(multi, reward_token, charlie, issue):
assert multi.earned(charlie, reward_token) == 0
def test_no_earnings_upon_staking(multi, reward_token, base_token, charlie, issue):
amount = base_token.balanceOf(charlie)
base_token.approve(multi, amount, {'from': charlie})
multi.stake(amount, {'from': charlie})
assert multi.earned(charlie, reward_token) == 0
def test_user_accrues_rewards(multi, reward_token, base_token, charlie, issue, chain):
amount = base_token.balanceOf(charlie)
base_token.approve(multi, amount, {'from': charlie})
multi.stake(amount, {'from': charlie})
chain.mine(timedelta=60)
period = multi.lastTimeRewardApplicable(reward_token) - multi.rewardData(reward_token)['lastUpdateTime']
calc_earn = period * (10 ** 18 / 60)
assert calc_earn * 0.99 <= multi.earned(charlie, reward_token) <= calc_earn * 1.01
def test_no_earnings_post_withdrawal(multi, reward_token, slow_token, base_token, alice, charlie, issue, chain):
amount = base_token.balanceOf(charlie)
base_token.approve(multi, amount, {'from': charlie})
multi.stake(amount, {'from': charlie})
chain.mine(timedelta=30)
assert multi.earned(charlie, reward_token) > 0
multi.getReward({'from': charlie})
multi.withdraw(multi.balanceOf(charlie), {'from': charlie})
chain.mine(timedelta=30)
assert multi.earned(charlie, reward_token) == 0
def test_staked_tokens_multi_durations(multi, reward_token, slow_token, base_token, alice, charlie, issue, chain):
reward_init_bal = reward_token.balanceOf(charlie)
slow_init_bal = slow_token.balanceOf(charlie)
amount = base_token.balanceOf(charlie)
base_token.approve(multi, amount, {'from': charlie})
multi.stake(amount, {'from': charlie})
for i in range(1):
reward_init_bal = reward_token.balanceOf(charlie)
slow_init_bal = slow_token.balanceOf(charlie)
charlie_paid_reward = multi.userRewardPerTokenPaid(charlie, reward_token)
charlie_paid_slow = multi.userRewardPerTokenPaid(charlie, slow_token)
chain.mine(timedelta=30)
reward_per = multi.rewardPerToken(reward_token)
slow_per = multi.rewardPerToken(slow_token)
reward_calc = amount * (reward_per - charlie_paid_reward) // 10 ** 18
slow_calc = amount * (slow_per - charlie_paid_slow) // 10 ** 18
assert reward_calc == multi.earned(charlie, reward_token)
assert slow_calc == multi.earned(charlie, slow_token)
multi.getReward({'from': charlie})
reward_per_act = multi.rewardPerToken(reward_token)
slow_per_act = multi.rewardPerToken(slow_token)
reward_calc_act = amount * (reward_per_act - charlie_paid_reward) // 10 ** 18
slow_calc_act = amount * (slow_per_act - charlie_paid_slow) // 10 ** 18
assert reward_token.balanceOf(charlie) - reward_init_bal == reward_calc_act
assert slow_token.balanceOf(charlie) - slow_init_bal == slow_calc_act
def test_withdrawn_user_can_claim(multi, slow_token, base_token, alice, charlie, issue, chain):
amount = base_token.balanceOf(charlie)
reward_init_bal = slow_token.balanceOf(charlie)
base_token.approve(multi, amount, {'from': charlie})
multi.stake(amount, {'from': charlie})
assert base_token.balanceOf(charlie) == 0
assert multi.balanceOf(charlie) == amount
chain.mine(timedelta=60)
multi.withdraw(amount, {'from': charlie})
reward_per_token = multi.rewardPerToken(slow_token)
earned_calc = reward_per_token * amount // 10 ** 18
assert multi.balanceOf(charlie) == 0
assert reward_per_token > 0
assert earned_calc == multi.earned(charlie, slow_token)
tx = multi.getReward({'from': charlie})
for e in tx.events['RewardPaid']:
if e['user'] == charlie and e['rewardsToken'] == slow_token:
token_log = e
assert token_log['reward'] == earned_calc
assert slow_token.balanceOf(charlie) - reward_init_bal == earned_calc |
data = (
'ddwim', # 0x00
'ddwib', # 0x01
'ddwibs', # 0x02
'ddwis', # 0x03
'ddwiss', # 0x04
'ddwing', # 0x05
'ddwij', # 0x06
'ddwic', # 0x07
'ddwik', # 0x08
'ddwit', # 0x09
'ddwip', # 0x0a
'ddwih', # 0x0b
'ddyu', # 0x0c
'ddyug', # 0x0d
'ddyugg', # 0x0e
'ddyugs', # 0x0f
'ddyun', # 0x10
'ddyunj', # 0x11
'ddyunh', # 0x12
'ddyud', # 0x13
'ddyul', # 0x14
'ddyulg', # 0x15
'ddyulm', # 0x16
'ddyulb', # 0x17
'ddyuls', # 0x18
'ddyult', # 0x19
'ddyulp', # 0x1a
'ddyulh', # 0x1b
'ddyum', # 0x1c
'ddyub', # 0x1d
'ddyubs', # 0x1e
'ddyus', # 0x1f
'ddyuss', # 0x20
'ddyung', # 0x21
'ddyuj', # 0x22
'ddyuc', # 0x23
'ddyuk', # 0x24
'ddyut', # 0x25
'ddyup', # 0x26
'ddyuh', # 0x27
'ddeu', # 0x28
'ddeug', # 0x29
'ddeugg', # 0x2a
'ddeugs', # 0x2b
'ddeun', # 0x2c
'ddeunj', # 0x2d
'ddeunh', # 0x2e
'ddeud', # 0x2f
'ddeul', # 0x30
'ddeulg', # 0x31
'ddeulm', # 0x32
'ddeulb', # 0x33
'ddeuls', # 0x34
'ddeult', # 0x35
'ddeulp', # 0x36
'ddeulh', # 0x37
'ddeum', # 0x38
'ddeub', # 0x39
'ddeubs', # 0x3a
'ddeus', # 0x3b
'ddeuss', # 0x3c
'ddeung', # 0x3d
'ddeuj', # 0x3e
'ddeuc', # 0x3f
'ddeuk', # 0x40
'ddeut', # 0x41
'ddeup', # 0x42
'ddeuh', # 0x43
'ddyi', # 0x44
'ddyig', # 0x45
'ddyigg', # 0x46
'ddyigs', # 0x47
'ddyin', # 0x48
'ddyinj', # 0x49
'ddyinh', # 0x4a
'ddyid', # 0x4b
'ddyil', # 0x4c
'ddyilg', # 0x4d
'ddyilm', # 0x4e
'ddyilb', # 0x4f
'ddyils', # 0x50
'ddyilt', # 0x51
'ddyilp', # 0x52
'ddyilh', # 0x53
'ddyim', # 0x54
'ddyib', # 0x55
'ddyibs', # 0x56
'ddyis', # 0x57
'ddyiss', # 0x58
'ddying', # 0x59
'ddyij', # 0x5a
'ddyic', # 0x5b
'ddyik', # 0x5c
'ddyit', # 0x5d
'ddyip', # 0x5e
'ddyih', # 0x5f
'ddi', # 0x60
'ddig', # 0x61
'ddigg', # 0x62
'ddigs', # 0x63
'ddin', # 0x64
'ddinj', # 0x65
'ddinh', # 0x66
'ddid', # 0x67
'ddil', # 0x68
'ddilg', # 0x69
'ddilm', # 0x6a
'ddilb', # 0x6b
'ddils', # 0x6c
'ddilt', # 0x6d
'ddilp', # 0x6e
'ddilh', # 0x6f
'ddim', # 0x70
'ddib', # 0x71
'ddibs', # 0x72
'ddis', # 0x73
'ddiss', # 0x74
'dding', # 0x75
'ddij', # 0x76
'ddic', # 0x77
'ddik', # 0x78
'ddit', # 0x79
'ddip', # 0x7a
'ddih', # 0x7b
'ra', # 0x7c
'rag', # 0x7d
'ragg', # 0x7e
'rags', # 0x7f
'ran', # 0x80
'ranj', # 0x81
'ranh', # 0x82
'rad', # 0x83
'ral', # 0x84
'ralg', # 0x85
'ralm', # 0x86
'ralb', # 0x87
'rals', # 0x88
'ralt', # 0x89
'ralp', # 0x8a
'ralh', # 0x8b
'ram', # 0x8c
'rab', # 0x8d
'rabs', # 0x8e
'ras', # 0x8f
'rass', # 0x90
'rang', # 0x91
'raj', # 0x92
'rac', # 0x93
'rak', # 0x94
'rat', # 0x95
'rap', # 0x96
'rah', # 0x97
'rae', # 0x98
'raeg', # 0x99
'raegg', # 0x9a
'raegs', # 0x9b
'raen', # 0x9c
'raenj', # 0x9d
'raenh', # 0x9e
'raed', # 0x9f
'rael', # 0xa0
'raelg', # 0xa1
'raelm', # 0xa2
'raelb', # 0xa3
'raels', # 0xa4
'raelt', # 0xa5
'raelp', # 0xa6
'raelh', # 0xa7
'raem', # 0xa8
'raeb', # 0xa9
'raebs', # 0xaa
'raes', # 0xab
'raess', # 0xac
'raeng', # 0xad
'raej', # 0xae
'raec', # 0xaf
'raek', # 0xb0
'raet', # 0xb1
'raep', # 0xb2
'raeh', # 0xb3
'rya', # 0xb4
'ryag', # 0xb5
'ryagg', # 0xb6
'ryags', # 0xb7
'ryan', # 0xb8
'ryanj', # 0xb9
'ryanh', # 0xba
'ryad', # 0xbb
'ryal', # 0xbc
'ryalg', # 0xbd
'ryalm', # 0xbe
'ryalb', # 0xbf
'ryals', # 0xc0
'ryalt', # 0xc1
'ryalp', # 0xc2
'ryalh', # 0xc3
'ryam', # 0xc4
'ryab', # 0xc5
'ryabs', # 0xc6
'ryas', # 0xc7
'ryass', # 0xc8
'ryang', # 0xc9
'ryaj', # 0xca
'ryac', # 0xcb
'ryak', # 0xcc
'ryat', # 0xcd
'ryap', # 0xce
'ryah', # 0xcf
'ryae', # 0xd0
'ryaeg', # 0xd1
'ryaegg', # 0xd2
'ryaegs', # 0xd3
'ryaen', # 0xd4
'ryaenj', # 0xd5
'ryaenh', # 0xd6
'ryaed', # 0xd7
'ryael', # 0xd8
'ryaelg', # 0xd9
'ryaelm', # 0xda
'ryaelb', # 0xdb
'ryaels', # 0xdc
'ryaelt', # 0xdd
'ryaelp', # 0xde
'ryaelh', # 0xdf
'ryaem', # 0xe0
'ryaeb', # 0xe1
'ryaebs', # 0xe2
'ryaes', # 0xe3
'ryaess', # 0xe4
'ryaeng', # 0xe5
'ryaej', # 0xe6
'ryaec', # 0xe7
'ryaek', # 0xe8
'ryaet', # 0xe9
'ryaep', # 0xea
'ryaeh', # 0xeb
'reo', # 0xec
'reog', # 0xed
'reogg', # 0xee
'reogs', # 0xef
'reon', # 0xf0
'reonj', # 0xf1
'reonh', # 0xf2
'reod', # 0xf3
'reol', # 0xf4
'reolg', # 0xf5
'reolm', # 0xf6
'reolb', # 0xf7
'reols', # 0xf8
'reolt', # 0xf9
'reolp', # 0xfa
'reolh', # 0xfb
'reom', # 0xfc
'reob', # 0xfd
'reobs', # 0xfe
'reos', # 0xff
)
| data = ('ddwim', 'ddwib', 'ddwibs', 'ddwis', 'ddwiss', 'ddwing', 'ddwij', 'ddwic', 'ddwik', 'ddwit', 'ddwip', 'ddwih', 'ddyu', 'ddyug', 'ddyugg', 'ddyugs', 'ddyun', 'ddyunj', 'ddyunh', 'ddyud', 'ddyul', 'ddyulg', 'ddyulm', 'ddyulb', 'ddyuls', 'ddyult', 'ddyulp', 'ddyulh', 'ddyum', 'ddyub', 'ddyubs', 'ddyus', 'ddyuss', 'ddyung', 'ddyuj', 'ddyuc', 'ddyuk', 'ddyut', 'ddyup', 'ddyuh', 'ddeu', 'ddeug', 'ddeugg', 'ddeugs', 'ddeun', 'ddeunj', 'ddeunh', 'ddeud', 'ddeul', 'ddeulg', 'ddeulm', 'ddeulb', 'ddeuls', 'ddeult', 'ddeulp', 'ddeulh', 'ddeum', 'ddeub', 'ddeubs', 'ddeus', 'ddeuss', 'ddeung', 'ddeuj', 'ddeuc', 'ddeuk', 'ddeut', 'ddeup', 'ddeuh', 'ddyi', 'ddyig', 'ddyigg', 'ddyigs', 'ddyin', 'ddyinj', 'ddyinh', 'ddyid', 'ddyil', 'ddyilg', 'ddyilm', 'ddyilb', 'ddyils', 'ddyilt', 'ddyilp', 'ddyilh', 'ddyim', 'ddyib', 'ddyibs', 'ddyis', 'ddyiss', 'ddying', 'ddyij', 'ddyic', 'ddyik', 'ddyit', 'ddyip', 'ddyih', 'ddi', 'ddig', 'ddigg', 'ddigs', 'ddin', 'ddinj', 'ddinh', 'ddid', 'ddil', 'ddilg', 'ddilm', 'ddilb', 'ddils', 'ddilt', 'ddilp', 'ddilh', 'ddim', 'ddib', 'ddibs', 'ddis', 'ddiss', 'dding', 'ddij', 'ddic', 'ddik', 'ddit', 'ddip', 'ddih', 'ra', 'rag', 'ragg', 'rags', 'ran', 'ranj', 'ranh', 'rad', 'ral', 'ralg', 'ralm', 'ralb', 'rals', 'ralt', 'ralp', 'ralh', 'ram', 'rab', 'rabs', 'ras', 'rass', 'rang', 'raj', 'rac', 'rak', 'rat', 'rap', 'rah', 'rae', 'raeg', 'raegg', 'raegs', 'raen', 'raenj', 'raenh', 'raed', 'rael', 'raelg', 'raelm', 'raelb', 'raels', 'raelt', 'raelp', 'raelh', 'raem', 'raeb', 'raebs', 'raes', 'raess', 'raeng', 'raej', 'raec', 'raek', 'raet', 'raep', 'raeh', 'rya', 'ryag', 'ryagg', 'ryags', 'ryan', 'ryanj', 'ryanh', 'ryad', 'ryal', 'ryalg', 'ryalm', 'ryalb', 'ryals', 'ryalt', 'ryalp', 'ryalh', 'ryam', 'ryab', 'ryabs', 'ryas', 'ryass', 'ryang', 'ryaj', 'ryac', 'ryak', 'ryat', 'ryap', 'ryah', 'ryae', 'ryaeg', 'ryaegg', 'ryaegs', 'ryaen', 'ryaenj', 'ryaenh', 'ryaed', 'ryael', 'ryaelg', 'ryaelm', 'ryaelb', 'ryaels', 'ryaelt', 'ryaelp', 'ryaelh', 'ryaem', 'ryaeb', 'ryaebs', 'ryaes', 'ryaess', 'ryaeng', 'ryaej', 'ryaec', 'ryaek', 'ryaet', 'ryaep', 'ryaeh', 'reo', 'reog', 'reogg', 'reogs', 'reon', 'reonj', 'reonh', 'reod', 'reol', 'reolg', 'reolm', 'reolb', 'reols', 'reolt', 'reolp', 'reolh', 'reom', 'reob', 'reobs', 'reos') |
def build_mx(n, m):
grid = []
for i in range(n):
grid.append([' '] * m)
return grid
def EMPTY_SHAPE():
return [[]]
class Shape(object):
_name = None
grid = EMPTY_SHAPE()
rotate_grid = []
def __init__(self, grid):
# align each row and column is same
n = len(grid)
m = max([len(row) for row in grid])
self.grid = build_mx(n, m)
for i, row in enumerate(grid):
for j, col in enumerate(row):
self.grid[i][j] = col
self.rotate_grid = [self.grid]
@property
def name(self):
if self._name is None:
for row in self.grid:
for col in row:
if col != ' ':
self._name = col
return col
return self._name
def all_shapes(self):
visited = {self}
yield self
for i in range(4):
out = Shape(self.rotate(i))
if out not in visited:
yield out
visited.add(out)
h_out = Shape(self.h_mirror())
if h_out not in visited:
yield h_out
visited.add(h_out)
for i in range(4):
out = Shape(h_out.rotate(i))
if out not in visited:
yield out
visited.add(out)
v_out = Shape(self.v_mirror())
if v_out not in visited:
yield v_out
visited.add(v_out)
for i in range(4):
out = Shape(v_out.rotate(i))
if out not in visited:
yield out
visited.add(out)
return
def rotate(self, tim=1):
if len(self.grid) == 0:
return EMPTY_SHAPE
tim = tim % 4
last_grid = self.rotate_grid[-1]
for t in range(len(self.rotate_grid), tim+1):
n, m = len(last_grid), len(last_grid[0])
new_grid = build_mx(m, n) # swap n and m
for i in range(n):
for j in range(m):
new_grid[m-j-1][i] = last_grid[i][j]
self.rotate_grid.append(new_grid)
last_grid = new_grid
return self.rotate_grid[tim]
def v_mirror(self):
if len(self.grid) == 0:
return [[]]
n, m = len(self.grid), len(self.grid[0])
new_grid = build_mx(n, m)
for i in range(n):
for j in range(m):
new_grid[i][j], new_grid[n-i-1][j] = self.grid[n-i-1][j], self.grid[i][j]
return new_grid
def h_mirror(self):
if len(self.grid) == 0:
return EMPTY_SHAPE()
n, m = len(self.grid), len(self.grid[0])
new_grid = build_mx(n, m)
for j in range(m):
for i in range(n):
new_grid[i][j], new_grid[i][m-j-1] = self.grid[i][m-j-1], self.grid[i][j]
return new_grid
def __str__(self) -> str:
return '\n'.join([''.join(row) for row in self.grid])
def __hash__(self) -> int:
return hash(self.__str__())
def __eq__(self, other):
if not isinstance(other, type(self)): return NotImplemented
return self.__str__() == other.__str__()
def __lt__(self, rhs):
return self.name < rhs.name
class ShapeAO(Shape):
def __init__(self):
grid = [
'AA',
'A',
'AA'
]
super().__init__(grid)
class ShapeG(Shape):
def __init__(self):
grid = [
'GGG',
'G',
'G'
]
super().__init__(grid)
class ShapeI(Shape):
def __init__(self):
grid = [
'IIII',
]
super().__init__(grid)
class ShapeL(Shape):
def __init__(self):
grid = [
'LLLL',
'L',
]
super().__init__(grid)
class Shapel(Shape):
def __init__(self):
grid = [
'lll',
'l',
]
super().__init__(grid)
class ShapeO(Shape):
def __init__(self):
grid = [
'O',
'OO',
'OO',
]
super().__init__(grid)
class ShapeS(Shape):
def __init__(self):
grid = [
' SS',
'SS',
]
super().__init__(grid)
class ShapeSS(Shape):
def __init__(self):
grid = [
' DD',
'DDD',
]
super().__init__(grid)
class ShapeT(Shape):
def __init__(self):
grid = [
'TTT',
' T',
' T',
]
super().__init__(grid)
class ShapeZ(Shape):
def __init__(self):
grid = [
' ZZ',
' Z',
'ZZ',
]
super().__init__(grid)
| def build_mx(n, m):
grid = []
for i in range(n):
grid.append([' '] * m)
return grid
def empty_shape():
return [[]]
class Shape(object):
_name = None
grid = empty_shape()
rotate_grid = []
def __init__(self, grid):
n = len(grid)
m = max([len(row) for row in grid])
self.grid = build_mx(n, m)
for (i, row) in enumerate(grid):
for (j, col) in enumerate(row):
self.grid[i][j] = col
self.rotate_grid = [self.grid]
@property
def name(self):
if self._name is None:
for row in self.grid:
for col in row:
if col != ' ':
self._name = col
return col
return self._name
def all_shapes(self):
visited = {self}
yield self
for i in range(4):
out = shape(self.rotate(i))
if out not in visited:
yield out
visited.add(out)
h_out = shape(self.h_mirror())
if h_out not in visited:
yield h_out
visited.add(h_out)
for i in range(4):
out = shape(h_out.rotate(i))
if out not in visited:
yield out
visited.add(out)
v_out = shape(self.v_mirror())
if v_out not in visited:
yield v_out
visited.add(v_out)
for i in range(4):
out = shape(v_out.rotate(i))
if out not in visited:
yield out
visited.add(out)
return
def rotate(self, tim=1):
if len(self.grid) == 0:
return EMPTY_SHAPE
tim = tim % 4
last_grid = self.rotate_grid[-1]
for t in range(len(self.rotate_grid), tim + 1):
(n, m) = (len(last_grid), len(last_grid[0]))
new_grid = build_mx(m, n)
for i in range(n):
for j in range(m):
new_grid[m - j - 1][i] = last_grid[i][j]
self.rotate_grid.append(new_grid)
last_grid = new_grid
return self.rotate_grid[tim]
def v_mirror(self):
if len(self.grid) == 0:
return [[]]
(n, m) = (len(self.grid), len(self.grid[0]))
new_grid = build_mx(n, m)
for i in range(n):
for j in range(m):
(new_grid[i][j], new_grid[n - i - 1][j]) = (self.grid[n - i - 1][j], self.grid[i][j])
return new_grid
def h_mirror(self):
if len(self.grid) == 0:
return empty_shape()
(n, m) = (len(self.grid), len(self.grid[0]))
new_grid = build_mx(n, m)
for j in range(m):
for i in range(n):
(new_grid[i][j], new_grid[i][m - j - 1]) = (self.grid[i][m - j - 1], self.grid[i][j])
return new_grid
def __str__(self) -> str:
return '\n'.join([''.join(row) for row in self.grid])
def __hash__(self) -> int:
return hash(self.__str__())
def __eq__(self, other):
if not isinstance(other, type(self)):
return NotImplemented
return self.__str__() == other.__str__()
def __lt__(self, rhs):
return self.name < rhs.name
class Shapeao(Shape):
def __init__(self):
grid = ['AA', 'A', 'AA']
super().__init__(grid)
class Shapeg(Shape):
def __init__(self):
grid = ['GGG', 'G', 'G']
super().__init__(grid)
class Shapei(Shape):
def __init__(self):
grid = ['IIII']
super().__init__(grid)
class Shapel(Shape):
def __init__(self):
grid = ['LLLL', 'L']
super().__init__(grid)
class Shapel(Shape):
def __init__(self):
grid = ['lll', 'l']
super().__init__(grid)
class Shapeo(Shape):
def __init__(self):
grid = ['O', 'OO', 'OO']
super().__init__(grid)
class Shapes(Shape):
def __init__(self):
grid = [' SS', 'SS']
super().__init__(grid)
class Shapess(Shape):
def __init__(self):
grid = [' DD', 'DDD']
super().__init__(grid)
class Shapet(Shape):
def __init__(self):
grid = ['TTT', ' T', ' T']
super().__init__(grid)
class Shapez(Shape):
def __init__(self):
grid = [' ZZ', ' Z', 'ZZ']
super().__init__(grid) |
def cal_average(num):
i = 0
for x in num:
i += x
avg = i / len(num)
return avg
cal_average([1,2,3,4]) | def cal_average(num):
i = 0
for x in num:
i += x
avg = i / len(num)
return avg
cal_average([1, 2, 3, 4]) |
#!/use/bin/python3
__author__ = 'yangdd'
'''
example 024
'''
a = 2
b =1
total = 0.0
for i in range(1,21):
total += a/b
a,b=a+b,a
print(total)
| __author__ = 'yangdd'
'\n\texample 024\n'
a = 2
b = 1
total = 0.0
for i in range(1, 21):
total += a / b
(a, b) = (a + b, a)
print(total) |
#
# PySNMP MIB module RFC1285-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RFC1285-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:48:17 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, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
ObjectIdentity, transmission, Counter32, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, NotificationType, MibIdentifier, TimeTicks, Unsigned32, ModuleIdentity, Counter64, Integer32, Gauge32, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "transmission", "Counter32", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "NotificationType", "MibIdentifier", "TimeTicks", "Unsigned32", "ModuleIdentity", "Counter64", "Integer32", "Gauge32", "Bits")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
fddi = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 15))
class FddiTime(Integer32):
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 2147483647)
class FddiResourceId(Integer32):
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 65535)
class FddiSMTStationIdType(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class FddiMACLongAddressType(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(6, 6)
fixedLength = 6
snmpFddiSMT = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 15, 1))
snmpFddiMAC = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 15, 2))
snmpFddiPATH = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 15, 3))
snmpFddiPORT = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 15, 4))
snmpFddiATTACHMENT = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 15, 5))
snmpFddiChipSets = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 15, 6))
snmpFddiSMTNumber = MibScalar((1, 3, 6, 1, 2, 1, 10, 15, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTNumber.setStatus('mandatory')
snmpFddiSMTTable = MibTable((1, 3, 6, 1, 2, 1, 10, 15, 1, 2), )
if mibBuilder.loadTexts: snmpFddiSMTTable.setStatus('mandatory')
snmpFddiSMTEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1), ).setIndexNames((0, "RFC1285-MIB", "snmpFddiSMTIndex"))
if mibBuilder.loadTexts: snmpFddiSMTEntry.setStatus('mandatory')
snmpFddiSMTIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTIndex.setStatus('mandatory')
snmpFddiSMTStationId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 2), FddiSMTStationIdType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTStationId.setStatus('mandatory')
snmpFddiSMTOpVersionId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiSMTOpVersionId.setStatus('mandatory')
snmpFddiSMTHiVersionId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTHiVersionId.setStatus('mandatory')
snmpFddiSMTLoVersionId = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTLoVersionId.setStatus('mandatory')
snmpFddiSMTMACCt = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTMACCt.setStatus('mandatory')
snmpFddiSMTNonMasterCt = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTNonMasterCt.setStatus('mandatory')
snmpFddiSMTMasterCt = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTMasterCt.setStatus('mandatory')
snmpFddiSMTPathsAvailable = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTPathsAvailable.setStatus('mandatory')
snmpFddiSMTConfigCapabilities = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTConfigCapabilities.setStatus('mandatory')
snmpFddiSMTConfigPolicy = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 3))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiSMTConfigPolicy.setStatus('mandatory')
snmpFddiSMTConnectionPolicy = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiSMTConnectionPolicy.setStatus('mandatory')
snmpFddiSMTTNotify = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 30))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiSMTTNotify.setStatus('mandatory')
snmpFddiSMTStatusReporting = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTStatusReporting.setStatus('mandatory')
snmpFddiSMTECMState = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("ec0", 1), ("ec1", 2), ("ec2", 3), ("ec3", 4), ("ec4", 5), ("ec5", 6), ("ec6", 7), ("ec7", 8)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTECMState.setStatus('mandatory')
snmpFddiSMTCFState = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("cf0", 1), ("cf1", 2), ("cf2", 3), ("cf3", 4), ("cf4", 5), ("cf5", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTCFState.setStatus('mandatory')
snmpFddiSMTHoldState = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("not-implemented", 1), ("not-holding", 2), ("holding-prm", 3), ("holding-sec", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTHoldState.setStatus('mandatory')
snmpFddiSMTRemoteDisconnectFlag = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiSMTRemoteDisconnectFlag.setStatus('mandatory')
snmpFddiSMTStationAction = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("connect", 2), ("disconnect", 3), ("path-Test", 4), ("self-Test", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiSMTStationAction.setStatus('mandatory')
snmpFddiMACNumber = MibScalar((1, 3, 6, 1, 2, 1, 10, 15, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACNumber.setStatus('mandatory')
snmpFddiMACTable = MibTable((1, 3, 6, 1, 2, 1, 10, 15, 2, 2), )
if mibBuilder.loadTexts: snmpFddiMACTable.setStatus('mandatory')
snmpFddiMACEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1), ).setIndexNames((0, "RFC1285-MIB", "snmpFddiMACSMTIndex"), (0, "RFC1285-MIB", "snmpFddiMACIndex"))
if mibBuilder.loadTexts: snmpFddiMACEntry.setStatus('mandatory')
snmpFddiMACSMTIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACSMTIndex.setStatus('mandatory')
snmpFddiMACIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACIndex.setStatus('mandatory')
snmpFddiMACFrameStatusCapabilities = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1799))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACFrameStatusCapabilities.setStatus('mandatory')
snmpFddiMACTMaxGreatestLowerBound = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 4), FddiTime()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiMACTMaxGreatestLowerBound.setStatus('mandatory')
snmpFddiMACTVXGreatestLowerBound = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 5), FddiTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACTVXGreatestLowerBound.setStatus('mandatory')
snmpFddiMACPathsAvailable = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACPathsAvailable.setStatus('mandatory')
snmpFddiMACCurrentPath = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4, 8, 16))).clone(namedValues=NamedValues(("unknown", 1), ("primary", 2), ("secondary", 4), ("local", 8), ("isolated", 16)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACCurrentPath.setStatus('mandatory')
snmpFddiMACUpstreamNbr = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 8), FddiMACLongAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACUpstreamNbr.setStatus('mandatory')
snmpFddiMACOldUpstreamNbr = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 9), FddiMACLongAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACOldUpstreamNbr.setStatus('mandatory')
snmpFddiMACDupAddrTest = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("pass", 2), ("fail", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACDupAddrTest.setStatus('mandatory')
snmpFddiMACPathsRequested = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 11), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiMACPathsRequested.setStatus('mandatory')
snmpFddiMACDownstreamPORTType = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("a", 1), ("b", 2), ("s", 3), ("m", 4), ("unknown", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACDownstreamPORTType.setStatus('mandatory')
snmpFddiMACSMTAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 13), FddiMACLongAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACSMTAddress.setStatus('mandatory')
snmpFddiMACTReq = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 14), FddiTime()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiMACTReq.setStatus('mandatory')
snmpFddiMACTNeg = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 15), FddiTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACTNeg.setStatus('mandatory')
snmpFddiMACTMax = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 16), FddiTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACTMax.setStatus('mandatory')
snmpFddiMACTvxValue = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 17), FddiTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACTvxValue.setStatus('mandatory')
snmpFddiMACTMin = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 18), FddiTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACTMin.setStatus('mandatory')
snmpFddiMACCurrentFrameStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiMACCurrentFrameStatus.setStatus('mandatory')
snmpFddiMACFrameCts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACFrameCts.setStatus('mandatory')
snmpFddiMACErrorCts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACErrorCts.setStatus('mandatory')
snmpFddiMACLostCts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACLostCts.setStatus('mandatory')
snmpFddiMACFrameErrorThreshold = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACFrameErrorThreshold.setStatus('mandatory')
snmpFddiMACFrameErrorRatio = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 24), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACFrameErrorRatio.setStatus('mandatory')
snmpFddiMACRMTState = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("rm0", 1), ("rm1", 2), ("rm2", 3), ("rm3", 4), ("rm4", 5), ("rm5", 6), ("rm6", 7), ("rm7", 8)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACRMTState.setStatus('mandatory')
snmpFddiMACDaFlag = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACDaFlag.setStatus('mandatory')
snmpFddiMACUnaDaFlag = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACUnaDaFlag.setStatus('mandatory')
snmpFddiMACFrameCondition = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACFrameCondition.setStatus('mandatory')
snmpFddiMACChipSet = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 29), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiMACChipSet.setStatus('mandatory')
snmpFddiMACAction = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("enableLLCService", 2), ("disableLLCService", 3), ("connectMAC", 4), ("disconnectMAC", 5)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiMACAction.setStatus('mandatory')
snmpFddiPORTNumber = MibScalar((1, 3, 6, 1, 2, 1, 10, 15, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTNumber.setStatus('mandatory')
snmpFddiPORTTable = MibTable((1, 3, 6, 1, 2, 1, 10, 15, 4, 2), )
if mibBuilder.loadTexts: snmpFddiPORTTable.setStatus('mandatory')
snmpFddiPORTEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1), ).setIndexNames((0, "RFC1285-MIB", "snmpFddiPORTSMTIndex"), (0, "RFC1285-MIB", "snmpFddiPORTIndex"))
if mibBuilder.loadTexts: snmpFddiPORTEntry.setStatus('mandatory')
snmpFddiPORTSMTIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTSMTIndex.setStatus('mandatory')
snmpFddiPORTIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTIndex.setStatus('mandatory')
snmpFddiPORTPCType = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("a", 1), ("b", 2), ("s", 3), ("m", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTPCType.setStatus('mandatory')
snmpFddiPORTPCNeighbor = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("a", 1), ("b", 2), ("s", 3), ("m", 4), ("unknown", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTPCNeighbor.setStatus('mandatory')
snmpFddiPORTConnectionPolicies = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiPORTConnectionPolicies.setStatus('mandatory')
snmpFddiPORTRemoteMACIndicated = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTRemoteMACIndicated.setStatus('mandatory')
snmpFddiPORTCEState = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("ce0", 1), ("ce1", 2), ("ce2", 3), ("ce3", 4), ("ce4", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTCEState.setStatus('mandatory')
snmpFddiPORTPathsRequested = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiPORTPathsRequested.setStatus('mandatory')
snmpFddiPORTMACPlacement = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 9), FddiResourceId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTMACPlacement.setStatus('mandatory')
snmpFddiPORTAvailablePaths = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTAvailablePaths.setStatus('mandatory')
snmpFddiPORTMACLoopTime = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 11), FddiTime()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiPORTMACLoopTime.setStatus('mandatory')
snmpFddiPORTTBMax = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 12), FddiTime()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiPORTTBMax.setStatus('mandatory')
snmpFddiPORTBSFlag = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTBSFlag.setStatus('mandatory')
snmpFddiPORTLCTFailCts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTLCTFailCts.setStatus('mandatory')
snmpFddiPORTLerEstimate = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(4, 15))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTLerEstimate.setStatus('mandatory')
snmpFddiPORTLemRejectCts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTLemRejectCts.setStatus('mandatory')
snmpFddiPORTLemCts = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTLemCts.setStatus('mandatory')
snmpFddiPORTLerCutoff = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(4, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiPORTLerCutoff.setStatus('mandatory')
snmpFddiPORTLerAlarm = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(4, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiPORTLerAlarm.setStatus('mandatory')
snmpFddiPORTConnectState = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("disabled", 1), ("connecting", 2), ("standby", 3), ("active", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTConnectState.setStatus('mandatory')
snmpFddiPORTPCMState = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("pc0", 1), ("pc1", 2), ("pc2", 3), ("pc3", 4), ("pc4", 5), ("pc5", 6), ("pc6", 7), ("pc7", 8), ("pc8", 9), ("pc9", 10)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTPCMState.setStatus('mandatory')
snmpFddiPORTPCWithhold = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("m-m", 2), ("other", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTPCWithhold.setStatus('mandatory')
snmpFddiPORTLerCondition = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTLerCondition.setStatus('mandatory')
snmpFddiPORTChipSet = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 24), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiPORTChipSet.setStatus('mandatory')
snmpFddiPORTAction = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("maintPORT", 2), ("enablePORT", 3), ("disablePORT", 4), ("startPORT", 5), ("stopPORT", 6)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiPORTAction.setStatus('mandatory')
snmpFddiATTACHMENTNumber = MibScalar((1, 3, 6, 1, 2, 1, 10, 15, 5, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiATTACHMENTNumber.setStatus('mandatory')
snmpFddiATTACHMENTTable = MibTable((1, 3, 6, 1, 2, 1, 10, 15, 5, 2), )
if mibBuilder.loadTexts: snmpFddiATTACHMENTTable.setStatus('mandatory')
snmpFddiATTACHMENTEntry = MibTableRow((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1), ).setIndexNames((0, "RFC1285-MIB", "snmpFddiATTACHMENTSMTIndex"), (0, "RFC1285-MIB", "snmpFddiATTACHMENTIndex"))
if mibBuilder.loadTexts: snmpFddiATTACHMENTEntry.setStatus('mandatory')
snmpFddiATTACHMENTSMTIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiATTACHMENTSMTIndex.setStatus('mandatory')
snmpFddiATTACHMENTIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiATTACHMENTIndex.setStatus('mandatory')
snmpFddiATTACHMENTClass = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("single-attachment", 1), ("dual-attachment", 2), ("concentrator", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiATTACHMENTClass.setStatus('mandatory')
snmpFddiATTACHMENTOpticalBypassPresent = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiATTACHMENTOpticalBypassPresent.setStatus('mandatory')
snmpFddiATTACHMENTIMaxExpiration = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 5), FddiTime()).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiATTACHMENTIMaxExpiration.setStatus('mandatory')
snmpFddiATTACHMENTInsertedStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("true", 1), ("false", 2), ("unimplemented", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: snmpFddiATTACHMENTInsertedStatus.setStatus('mandatory')
snmpFddiATTACHMENTInsertPolicy = MibTableColumn((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("true", 1), ("false", 2), ("unimplemented", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: snmpFddiATTACHMENTInsertPolicy.setStatus('mandatory')
snmpFddiPHYChipSets = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 15, 6, 1))
snmpFddiMACChipSets = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 15, 6, 2))
snmpFddiPHYMACChipSets = MibIdentifier((1, 3, 6, 1, 2, 1, 10, 15, 6, 3))
mibBuilder.exportSymbols("RFC1285-MIB", snmpFddiMACTvxValue=snmpFddiMACTvxValue, FddiSMTStationIdType=FddiSMTStationIdType, snmpFddiSMTCFState=snmpFddiSMTCFState, snmpFddiSMTNumber=snmpFddiSMTNumber, snmpFddiPORTSMTIndex=snmpFddiPORTSMTIndex, snmpFddiPORTBSFlag=snmpFddiPORTBSFlag, snmpFddiMACAction=snmpFddiMACAction, snmpFddiPATH=snmpFddiPATH, snmpFddiPORTNumber=snmpFddiPORTNumber, snmpFddiMACLostCts=snmpFddiMACLostCts, snmpFddiPORTChipSet=snmpFddiPORTChipSet, snmpFddiPORTPCType=snmpFddiPORTPCType, snmpFddiPORTIndex=snmpFddiPORTIndex, snmpFddiSMTStationId=snmpFddiSMTStationId, snmpFddiPORTLerAlarm=snmpFddiPORTLerAlarm, snmpFddiSMTLoVersionId=snmpFddiSMTLoVersionId, snmpFddiPORTRemoteMACIndicated=snmpFddiPORTRemoteMACIndicated, snmpFddiPORTPathsRequested=snmpFddiPORTPathsRequested, snmpFddiMACFrameCondition=snmpFddiMACFrameCondition, snmpFddiPORTConnectionPolicies=snmpFddiPORTConnectionPolicies, snmpFddiPORTTBMax=snmpFddiPORTTBMax, snmpFddiSMTTable=snmpFddiSMTTable, snmpFddiPORTAvailablePaths=snmpFddiPORTAvailablePaths, fddi=fddi, snmpFddiPORTPCWithhold=snmpFddiPORTPCWithhold, snmpFddiPORTPCMState=snmpFddiPORTPCMState, FddiResourceId=FddiResourceId, snmpFddiPORTLerCondition=snmpFddiPORTLerCondition, snmpFddiSMTIndex=snmpFddiSMTIndex, snmpFddiMACSMTAddress=snmpFddiMACSMTAddress, snmpFddiATTACHMENTInsertPolicy=snmpFddiATTACHMENTInsertPolicy, snmpFddiATTACHMENTSMTIndex=snmpFddiATTACHMENTSMTIndex, snmpFddiMACSMTIndex=snmpFddiMACSMTIndex, snmpFddiMACTMax=snmpFddiMACTMax, snmpFddiPHYMACChipSets=snmpFddiPHYMACChipSets, snmpFddiSMT=snmpFddiSMT, snmpFddiMACTVXGreatestLowerBound=snmpFddiMACTVXGreatestLowerBound, snmpFddiATTACHMENT=snmpFddiATTACHMENT, FddiTime=FddiTime, snmpFddiSMTConnectionPolicy=snmpFddiSMTConnectionPolicy, snmpFddiMACOldUpstreamNbr=snmpFddiMACOldUpstreamNbr, snmpFddiMACUnaDaFlag=snmpFddiMACUnaDaFlag, snmpFddiSMTTNotify=snmpFddiSMTTNotify, FddiMACLongAddressType=FddiMACLongAddressType, snmpFddiMACFrameStatusCapabilities=snmpFddiMACFrameStatusCapabilities, snmpFddiATTACHMENTTable=snmpFddiATTACHMENTTable, snmpFddiSMTEntry=snmpFddiSMTEntry, snmpFddiPORT=snmpFddiPORT, snmpFddiSMTMasterCt=snmpFddiSMTMasterCt, snmpFddiMACUpstreamNbr=snmpFddiMACUpstreamNbr, snmpFddiPORTLerCutoff=snmpFddiPORTLerCutoff, snmpFddiMACCurrentPath=snmpFddiMACCurrentPath, snmpFddiMACErrorCts=snmpFddiMACErrorCts, snmpFddiMACChipSet=snmpFddiMACChipSet, snmpFddiSMTStatusReporting=snmpFddiSMTStatusReporting, snmpFddiMACIndex=snmpFddiMACIndex, snmpFddiATTACHMENTIMaxExpiration=snmpFddiATTACHMENTIMaxExpiration, snmpFddiSMTPathsAvailable=snmpFddiSMTPathsAvailable, snmpFddiATTACHMENTNumber=snmpFddiATTACHMENTNumber, snmpFddiMACRMTState=snmpFddiMACRMTState, snmpFddiPORTAction=snmpFddiPORTAction, snmpFddiMACFrameErrorRatio=snmpFddiMACFrameErrorRatio, snmpFddiSMTConfigCapabilities=snmpFddiSMTConfigCapabilities, snmpFddiPORTConnectState=snmpFddiPORTConnectState, snmpFddiMACDownstreamPORTType=snmpFddiMACDownstreamPORTType, snmpFddiPHYChipSets=snmpFddiPHYChipSets, snmpFddiPORTLemRejectCts=snmpFddiPORTLemRejectCts, snmpFddiSMTOpVersionId=snmpFddiSMTOpVersionId, snmpFddiMACChipSets=snmpFddiMACChipSets, snmpFddiPORTTable=snmpFddiPORTTable, snmpFddiPORTLemCts=snmpFddiPORTLemCts, snmpFddiMACPathsRequested=snmpFddiMACPathsRequested, snmpFddiMACFrameCts=snmpFddiMACFrameCts, snmpFddiSMTECMState=snmpFddiSMTECMState, snmpFddiMACDupAddrTest=snmpFddiMACDupAddrTest, snmpFddiMACTNeg=snmpFddiMACTNeg, snmpFddiMACDaFlag=snmpFddiMACDaFlag, snmpFddiATTACHMENTClass=snmpFddiATTACHMENTClass, snmpFddiMACPathsAvailable=snmpFddiMACPathsAvailable, snmpFddiSMTMACCt=snmpFddiSMTMACCt, snmpFddiATTACHMENTEntry=snmpFddiATTACHMENTEntry, snmpFddiMACTReq=snmpFddiMACTReq, snmpFddiPORTLerEstimate=snmpFddiPORTLerEstimate, snmpFddiMACFrameErrorThreshold=snmpFddiMACFrameErrorThreshold, snmpFddiPORTPCNeighbor=snmpFddiPORTPCNeighbor, snmpFddiMACTMin=snmpFddiMACTMin, snmpFddiMACNumber=snmpFddiMACNumber, snmpFddiPORTLCTFailCts=snmpFddiPORTLCTFailCts, snmpFddiChipSets=snmpFddiChipSets, snmpFddiPORTEntry=snmpFddiPORTEntry, snmpFddiMACTMaxGreatestLowerBound=snmpFddiMACTMaxGreatestLowerBound, snmpFddiMACTable=snmpFddiMACTable, snmpFddiMAC=snmpFddiMAC, snmpFddiSMTNonMasterCt=snmpFddiSMTNonMasterCt, snmpFddiSMTRemoteDisconnectFlag=snmpFddiSMTRemoteDisconnectFlag, snmpFddiPORTMACLoopTime=snmpFddiPORTMACLoopTime, snmpFddiSMTHiVersionId=snmpFddiSMTHiVersionId, snmpFddiSMTHoldState=snmpFddiSMTHoldState, snmpFddiSMTStationAction=snmpFddiSMTStationAction, snmpFddiATTACHMENTOpticalBypassPresent=snmpFddiATTACHMENTOpticalBypassPresent, snmpFddiMACEntry=snmpFddiMACEntry, snmpFddiPORTMACPlacement=snmpFddiPORTMACPlacement, snmpFddiATTACHMENTInsertedStatus=snmpFddiATTACHMENTInsertedStatus, snmpFddiATTACHMENTIndex=snmpFddiATTACHMENTIndex, snmpFddiSMTConfigPolicy=snmpFddiSMTConfigPolicy, snmpFddiPORTCEState=snmpFddiPORTCEState, snmpFddiMACCurrentFrameStatus=snmpFddiMACCurrentFrameStatus)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, value_range_constraint, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(object_identity, transmission, counter32, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, notification_type, mib_identifier, time_ticks, unsigned32, module_identity, counter64, integer32, gauge32, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'transmission', 'Counter32', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'NotificationType', 'MibIdentifier', 'TimeTicks', 'Unsigned32', 'ModuleIdentity', 'Counter64', 'Integer32', 'Gauge32', 'Bits')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
fddi = mib_identifier((1, 3, 6, 1, 2, 1, 10, 15))
class Fdditime(Integer32):
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 2147483647)
class Fddiresourceid(Integer32):
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 65535)
class Fddismtstationidtype(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
class Fddimaclongaddresstype(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(6, 6)
fixed_length = 6
snmp_fddi_smt = mib_identifier((1, 3, 6, 1, 2, 1, 10, 15, 1))
snmp_fddi_mac = mib_identifier((1, 3, 6, 1, 2, 1, 10, 15, 2))
snmp_fddi_path = mib_identifier((1, 3, 6, 1, 2, 1, 10, 15, 3))
snmp_fddi_port = mib_identifier((1, 3, 6, 1, 2, 1, 10, 15, 4))
snmp_fddi_attachment = mib_identifier((1, 3, 6, 1, 2, 1, 10, 15, 5))
snmp_fddi_chip_sets = mib_identifier((1, 3, 6, 1, 2, 1, 10, 15, 6))
snmp_fddi_smt_number = mib_scalar((1, 3, 6, 1, 2, 1, 10, 15, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTNumber.setStatus('mandatory')
snmp_fddi_smt_table = mib_table((1, 3, 6, 1, 2, 1, 10, 15, 1, 2))
if mibBuilder.loadTexts:
snmpFddiSMTTable.setStatus('mandatory')
snmp_fddi_smt_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1)).setIndexNames((0, 'RFC1285-MIB', 'snmpFddiSMTIndex'))
if mibBuilder.loadTexts:
snmpFddiSMTEntry.setStatus('mandatory')
snmp_fddi_smt_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTIndex.setStatus('mandatory')
snmp_fddi_smt_station_id = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 2), fddi_smt_station_id_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTStationId.setStatus('mandatory')
snmp_fddi_smt_op_version_id = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiSMTOpVersionId.setStatus('mandatory')
snmp_fddi_smt_hi_version_id = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTHiVersionId.setStatus('mandatory')
snmp_fddi_smt_lo_version_id = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTLoVersionId.setStatus('mandatory')
snmp_fddi_smtmac_ct = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTMACCt.setStatus('mandatory')
snmp_fddi_smt_non_master_ct = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 2))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTNonMasterCt.setStatus('mandatory')
snmp_fddi_smt_master_ct = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTMasterCt.setStatus('mandatory')
snmp_fddi_smt_paths_available = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTPathsAvailable.setStatus('mandatory')
snmp_fddi_smt_config_capabilities = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 3))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTConfigCapabilities.setStatus('mandatory')
snmp_fddi_smt_config_policy = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 3))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiSMTConfigPolicy.setStatus('mandatory')
snmp_fddi_smt_connection_policy = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiSMTConnectionPolicy.setStatus('mandatory')
snmp_fddi_smtt_notify = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(2, 30))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiSMTTNotify.setStatus('mandatory')
snmp_fddi_smt_status_reporting = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTStatusReporting.setStatus('mandatory')
snmp_fddi_smtecm_state = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('ec0', 1), ('ec1', 2), ('ec2', 3), ('ec3', 4), ('ec4', 5), ('ec5', 6), ('ec6', 7), ('ec7', 8)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTECMState.setStatus('mandatory')
snmp_fddi_smtcf_state = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('cf0', 1), ('cf1', 2), ('cf2', 3), ('cf3', 4), ('cf4', 5), ('cf5', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTCFState.setStatus('mandatory')
snmp_fddi_smt_hold_state = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('not-implemented', 1), ('not-holding', 2), ('holding-prm', 3), ('holding-sec', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTHoldState.setStatus('mandatory')
snmp_fddi_smt_remote_disconnect_flag = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiSMTRemoteDisconnectFlag.setStatus('mandatory')
snmp_fddi_smt_station_action = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 1, 2, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('connect', 2), ('disconnect', 3), ('path-Test', 4), ('self-Test', 5)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiSMTStationAction.setStatus('mandatory')
snmp_fddi_mac_number = mib_scalar((1, 3, 6, 1, 2, 1, 10, 15, 2, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACNumber.setStatus('mandatory')
snmp_fddi_mac_table = mib_table((1, 3, 6, 1, 2, 1, 10, 15, 2, 2))
if mibBuilder.loadTexts:
snmpFddiMACTable.setStatus('mandatory')
snmp_fddi_mac_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1)).setIndexNames((0, 'RFC1285-MIB', 'snmpFddiMACSMTIndex'), (0, 'RFC1285-MIB', 'snmpFddiMACIndex'))
if mibBuilder.loadTexts:
snmpFddiMACEntry.setStatus('mandatory')
snmp_fddi_macsmt_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACSMTIndex.setStatus('mandatory')
snmp_fddi_mac_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACIndex.setStatus('mandatory')
snmp_fddi_mac_frame_status_capabilities = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 1799))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACFrameStatusCapabilities.setStatus('mandatory')
snmp_fddi_mact_max_greatest_lower_bound = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 4), fddi_time()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiMACTMaxGreatestLowerBound.setStatus('mandatory')
snmp_fddi_mactvx_greatest_lower_bound = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 5), fddi_time()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACTVXGreatestLowerBound.setStatus('mandatory')
snmp_fddi_mac_paths_available = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACPathsAvailable.setStatus('mandatory')
snmp_fddi_mac_current_path = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 4, 8, 16))).clone(namedValues=named_values(('unknown', 1), ('primary', 2), ('secondary', 4), ('local', 8), ('isolated', 16)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACCurrentPath.setStatus('mandatory')
snmp_fddi_mac_upstream_nbr = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 8), fddi_mac_long_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACUpstreamNbr.setStatus('mandatory')
snmp_fddi_mac_old_upstream_nbr = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 9), fddi_mac_long_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACOldUpstreamNbr.setStatus('mandatory')
snmp_fddi_mac_dup_addr_test = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('pass', 2), ('fail', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACDupAddrTest.setStatus('mandatory')
snmp_fddi_mac_paths_requested = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 11), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiMACPathsRequested.setStatus('mandatory')
snmp_fddi_mac_downstream_port_type = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('a', 1), ('b', 2), ('s', 3), ('m', 4), ('unknown', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACDownstreamPORTType.setStatus('mandatory')
snmp_fddi_macsmt_address = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 13), fddi_mac_long_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACSMTAddress.setStatus('mandatory')
snmp_fddi_mact_req = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 14), fddi_time()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiMACTReq.setStatus('mandatory')
snmp_fddi_mact_neg = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 15), fddi_time()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACTNeg.setStatus('mandatory')
snmp_fddi_mact_max = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 16), fddi_time()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACTMax.setStatus('mandatory')
snmp_fddi_mac_tvx_value = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 17), fddi_time()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACTvxValue.setStatus('mandatory')
snmp_fddi_mact_min = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 18), fddi_time()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACTMin.setStatus('mandatory')
snmp_fddi_mac_current_frame_status = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiMACCurrentFrameStatus.setStatus('mandatory')
snmp_fddi_mac_frame_cts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACFrameCts.setStatus('mandatory')
snmp_fddi_mac_error_cts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 21), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACErrorCts.setStatus('mandatory')
snmp_fddi_mac_lost_cts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACLostCts.setStatus('mandatory')
snmp_fddi_mac_frame_error_threshold = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 23), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACFrameErrorThreshold.setStatus('mandatory')
snmp_fddi_mac_frame_error_ratio = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 24), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACFrameErrorRatio.setStatus('mandatory')
snmp_fddi_macrmt_state = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('rm0', 1), ('rm1', 2), ('rm2', 3), ('rm3', 4), ('rm4', 5), ('rm5', 6), ('rm6', 7), ('rm7', 8)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACRMTState.setStatus('mandatory')
snmp_fddi_mac_da_flag = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 26), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACDaFlag.setStatus('mandatory')
snmp_fddi_mac_una_da_flag = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACUnaDaFlag.setStatus('mandatory')
snmp_fddi_mac_frame_condition = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 28), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACFrameCondition.setStatus('mandatory')
snmp_fddi_mac_chip_set = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 29), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiMACChipSet.setStatus('mandatory')
snmp_fddi_mac_action = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 2, 2, 1, 30), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('enableLLCService', 2), ('disableLLCService', 3), ('connectMAC', 4), ('disconnectMAC', 5)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiMACAction.setStatus('mandatory')
snmp_fddi_port_number = mib_scalar((1, 3, 6, 1, 2, 1, 10, 15, 4, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTNumber.setStatus('mandatory')
snmp_fddi_port_table = mib_table((1, 3, 6, 1, 2, 1, 10, 15, 4, 2))
if mibBuilder.loadTexts:
snmpFddiPORTTable.setStatus('mandatory')
snmp_fddi_port_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1)).setIndexNames((0, 'RFC1285-MIB', 'snmpFddiPORTSMTIndex'), (0, 'RFC1285-MIB', 'snmpFddiPORTIndex'))
if mibBuilder.loadTexts:
snmpFddiPORTEntry.setStatus('mandatory')
snmp_fddi_portsmt_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTSMTIndex.setStatus('mandatory')
snmp_fddi_port_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTIndex.setStatus('mandatory')
snmp_fddi_portpc_type = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('a', 1), ('b', 2), ('s', 3), ('m', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTPCType.setStatus('mandatory')
snmp_fddi_portpc_neighbor = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('a', 1), ('b', 2), ('s', 3), ('m', 4), ('unknown', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTPCNeighbor.setStatus('mandatory')
snmp_fddi_port_connection_policies = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiPORTConnectionPolicies.setStatus('mandatory')
snmp_fddi_port_remote_mac_indicated = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTRemoteMACIndicated.setStatus('mandatory')
snmp_fddi_portce_state = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('ce0', 1), ('ce1', 2), ('ce2', 3), ('ce3', 4), ('ce4', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTCEState.setStatus('mandatory')
snmp_fddi_port_paths_requested = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiPORTPathsRequested.setStatus('mandatory')
snmp_fddi_portmac_placement = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 9), fddi_resource_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTMACPlacement.setStatus('mandatory')
snmp_fddi_port_available_paths = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTAvailablePaths.setStatus('mandatory')
snmp_fddi_portmac_loop_time = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 11), fddi_time()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiPORTMACLoopTime.setStatus('mandatory')
snmp_fddi_porttb_max = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 12), fddi_time()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiPORTTBMax.setStatus('mandatory')
snmp_fddi_portbs_flag = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTBSFlag.setStatus('mandatory')
snmp_fddi_portlct_fail_cts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTLCTFailCts.setStatus('mandatory')
snmp_fddi_port_ler_estimate = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(4, 15))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTLerEstimate.setStatus('mandatory')
snmp_fddi_port_lem_reject_cts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTLemRejectCts.setStatus('mandatory')
snmp_fddi_port_lem_cts = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTLemCts.setStatus('mandatory')
snmp_fddi_port_ler_cutoff = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(4, 15))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiPORTLerCutoff.setStatus('mandatory')
snmp_fddi_port_ler_alarm = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(4, 15))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiPORTLerAlarm.setStatus('mandatory')
snmp_fddi_port_connect_state = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('disabled', 1), ('connecting', 2), ('standby', 3), ('active', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTConnectState.setStatus('mandatory')
snmp_fddi_portpcm_state = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 21), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=named_values(('pc0', 1), ('pc1', 2), ('pc2', 3), ('pc3', 4), ('pc4', 5), ('pc5', 6), ('pc6', 7), ('pc7', 8), ('pc8', 9), ('pc9', 10)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTPCMState.setStatus('mandatory')
snmp_fddi_portpc_withhold = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('m-m', 2), ('other', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTPCWithhold.setStatus('mandatory')
snmp_fddi_port_ler_condition = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 23), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTLerCondition.setStatus('mandatory')
snmp_fddi_port_chip_set = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 24), object_identifier()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiPORTChipSet.setStatus('mandatory')
snmp_fddi_port_action = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 4, 2, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('other', 1), ('maintPORT', 2), ('enablePORT', 3), ('disablePORT', 4), ('startPORT', 5), ('stopPORT', 6)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiPORTAction.setStatus('mandatory')
snmp_fddi_attachment_number = mib_scalar((1, 3, 6, 1, 2, 1, 10, 15, 5, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiATTACHMENTNumber.setStatus('mandatory')
snmp_fddi_attachment_table = mib_table((1, 3, 6, 1, 2, 1, 10, 15, 5, 2))
if mibBuilder.loadTexts:
snmpFddiATTACHMENTTable.setStatus('mandatory')
snmp_fddi_attachment_entry = mib_table_row((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1)).setIndexNames((0, 'RFC1285-MIB', 'snmpFddiATTACHMENTSMTIndex'), (0, 'RFC1285-MIB', 'snmpFddiATTACHMENTIndex'))
if mibBuilder.loadTexts:
snmpFddiATTACHMENTEntry.setStatus('mandatory')
snmp_fddi_attachmentsmt_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiATTACHMENTSMTIndex.setStatus('mandatory')
snmp_fddi_attachment_index = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiATTACHMENTIndex.setStatus('mandatory')
snmp_fddi_attachment_class = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('single-attachment', 1), ('dual-attachment', 2), ('concentrator', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiATTACHMENTClass.setStatus('mandatory')
snmp_fddi_attachment_optical_bypass_present = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiATTACHMENTOpticalBypassPresent.setStatus('mandatory')
snmp_fddi_attachmenti_max_expiration = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 5), fddi_time()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiATTACHMENTIMaxExpiration.setStatus('mandatory')
snmp_fddi_attachment_inserted_status = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('true', 1), ('false', 2), ('unimplemented', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
snmpFddiATTACHMENTInsertedStatus.setStatus('mandatory')
snmp_fddi_attachment_insert_policy = mib_table_column((1, 3, 6, 1, 2, 1, 10, 15, 5, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('true', 1), ('false', 2), ('unimplemented', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
snmpFddiATTACHMENTInsertPolicy.setStatus('mandatory')
snmp_fddi_phy_chip_sets = mib_identifier((1, 3, 6, 1, 2, 1, 10, 15, 6, 1))
snmp_fddi_mac_chip_sets = mib_identifier((1, 3, 6, 1, 2, 1, 10, 15, 6, 2))
snmp_fddi_phymac_chip_sets = mib_identifier((1, 3, 6, 1, 2, 1, 10, 15, 6, 3))
mibBuilder.exportSymbols('RFC1285-MIB', snmpFddiMACTvxValue=snmpFddiMACTvxValue, FddiSMTStationIdType=FddiSMTStationIdType, snmpFddiSMTCFState=snmpFddiSMTCFState, snmpFddiSMTNumber=snmpFddiSMTNumber, snmpFddiPORTSMTIndex=snmpFddiPORTSMTIndex, snmpFddiPORTBSFlag=snmpFddiPORTBSFlag, snmpFddiMACAction=snmpFddiMACAction, snmpFddiPATH=snmpFddiPATH, snmpFddiPORTNumber=snmpFddiPORTNumber, snmpFddiMACLostCts=snmpFddiMACLostCts, snmpFddiPORTChipSet=snmpFddiPORTChipSet, snmpFddiPORTPCType=snmpFddiPORTPCType, snmpFddiPORTIndex=snmpFddiPORTIndex, snmpFddiSMTStationId=snmpFddiSMTStationId, snmpFddiPORTLerAlarm=snmpFddiPORTLerAlarm, snmpFddiSMTLoVersionId=snmpFddiSMTLoVersionId, snmpFddiPORTRemoteMACIndicated=snmpFddiPORTRemoteMACIndicated, snmpFddiPORTPathsRequested=snmpFddiPORTPathsRequested, snmpFddiMACFrameCondition=snmpFddiMACFrameCondition, snmpFddiPORTConnectionPolicies=snmpFddiPORTConnectionPolicies, snmpFddiPORTTBMax=snmpFddiPORTTBMax, snmpFddiSMTTable=snmpFddiSMTTable, snmpFddiPORTAvailablePaths=snmpFddiPORTAvailablePaths, fddi=fddi, snmpFddiPORTPCWithhold=snmpFddiPORTPCWithhold, snmpFddiPORTPCMState=snmpFddiPORTPCMState, FddiResourceId=FddiResourceId, snmpFddiPORTLerCondition=snmpFddiPORTLerCondition, snmpFddiSMTIndex=snmpFddiSMTIndex, snmpFddiMACSMTAddress=snmpFddiMACSMTAddress, snmpFddiATTACHMENTInsertPolicy=snmpFddiATTACHMENTInsertPolicy, snmpFddiATTACHMENTSMTIndex=snmpFddiATTACHMENTSMTIndex, snmpFddiMACSMTIndex=snmpFddiMACSMTIndex, snmpFddiMACTMax=snmpFddiMACTMax, snmpFddiPHYMACChipSets=snmpFddiPHYMACChipSets, snmpFddiSMT=snmpFddiSMT, snmpFddiMACTVXGreatestLowerBound=snmpFddiMACTVXGreatestLowerBound, snmpFddiATTACHMENT=snmpFddiATTACHMENT, FddiTime=FddiTime, snmpFddiSMTConnectionPolicy=snmpFddiSMTConnectionPolicy, snmpFddiMACOldUpstreamNbr=snmpFddiMACOldUpstreamNbr, snmpFddiMACUnaDaFlag=snmpFddiMACUnaDaFlag, snmpFddiSMTTNotify=snmpFddiSMTTNotify, FddiMACLongAddressType=FddiMACLongAddressType, snmpFddiMACFrameStatusCapabilities=snmpFddiMACFrameStatusCapabilities, snmpFddiATTACHMENTTable=snmpFddiATTACHMENTTable, snmpFddiSMTEntry=snmpFddiSMTEntry, snmpFddiPORT=snmpFddiPORT, snmpFddiSMTMasterCt=snmpFddiSMTMasterCt, snmpFddiMACUpstreamNbr=snmpFddiMACUpstreamNbr, snmpFddiPORTLerCutoff=snmpFddiPORTLerCutoff, snmpFddiMACCurrentPath=snmpFddiMACCurrentPath, snmpFddiMACErrorCts=snmpFddiMACErrorCts, snmpFddiMACChipSet=snmpFddiMACChipSet, snmpFddiSMTStatusReporting=snmpFddiSMTStatusReporting, snmpFddiMACIndex=snmpFddiMACIndex, snmpFddiATTACHMENTIMaxExpiration=snmpFddiATTACHMENTIMaxExpiration, snmpFddiSMTPathsAvailable=snmpFddiSMTPathsAvailable, snmpFddiATTACHMENTNumber=snmpFddiATTACHMENTNumber, snmpFddiMACRMTState=snmpFddiMACRMTState, snmpFddiPORTAction=snmpFddiPORTAction, snmpFddiMACFrameErrorRatio=snmpFddiMACFrameErrorRatio, snmpFddiSMTConfigCapabilities=snmpFddiSMTConfigCapabilities, snmpFddiPORTConnectState=snmpFddiPORTConnectState, snmpFddiMACDownstreamPORTType=snmpFddiMACDownstreamPORTType, snmpFddiPHYChipSets=snmpFddiPHYChipSets, snmpFddiPORTLemRejectCts=snmpFddiPORTLemRejectCts, snmpFddiSMTOpVersionId=snmpFddiSMTOpVersionId, snmpFddiMACChipSets=snmpFddiMACChipSets, snmpFddiPORTTable=snmpFddiPORTTable, snmpFddiPORTLemCts=snmpFddiPORTLemCts, snmpFddiMACPathsRequested=snmpFddiMACPathsRequested, snmpFddiMACFrameCts=snmpFddiMACFrameCts, snmpFddiSMTECMState=snmpFddiSMTECMState, snmpFddiMACDupAddrTest=snmpFddiMACDupAddrTest, snmpFddiMACTNeg=snmpFddiMACTNeg, snmpFddiMACDaFlag=snmpFddiMACDaFlag, snmpFddiATTACHMENTClass=snmpFddiATTACHMENTClass, snmpFddiMACPathsAvailable=snmpFddiMACPathsAvailable, snmpFddiSMTMACCt=snmpFddiSMTMACCt, snmpFddiATTACHMENTEntry=snmpFddiATTACHMENTEntry, snmpFddiMACTReq=snmpFddiMACTReq, snmpFddiPORTLerEstimate=snmpFddiPORTLerEstimate, snmpFddiMACFrameErrorThreshold=snmpFddiMACFrameErrorThreshold, snmpFddiPORTPCNeighbor=snmpFddiPORTPCNeighbor, snmpFddiMACTMin=snmpFddiMACTMin, snmpFddiMACNumber=snmpFddiMACNumber, snmpFddiPORTLCTFailCts=snmpFddiPORTLCTFailCts, snmpFddiChipSets=snmpFddiChipSets, snmpFddiPORTEntry=snmpFddiPORTEntry, snmpFddiMACTMaxGreatestLowerBound=snmpFddiMACTMaxGreatestLowerBound, snmpFddiMACTable=snmpFddiMACTable, snmpFddiMAC=snmpFddiMAC, snmpFddiSMTNonMasterCt=snmpFddiSMTNonMasterCt, snmpFddiSMTRemoteDisconnectFlag=snmpFddiSMTRemoteDisconnectFlag, snmpFddiPORTMACLoopTime=snmpFddiPORTMACLoopTime, snmpFddiSMTHiVersionId=snmpFddiSMTHiVersionId, snmpFddiSMTHoldState=snmpFddiSMTHoldState, snmpFddiSMTStationAction=snmpFddiSMTStationAction, snmpFddiATTACHMENTOpticalBypassPresent=snmpFddiATTACHMENTOpticalBypassPresent, snmpFddiMACEntry=snmpFddiMACEntry, snmpFddiPORTMACPlacement=snmpFddiPORTMACPlacement, snmpFddiATTACHMENTInsertedStatus=snmpFddiATTACHMENTInsertedStatus, snmpFddiATTACHMENTIndex=snmpFddiATTACHMENTIndex, snmpFddiSMTConfigPolicy=snmpFddiSMTConfigPolicy, snmpFddiPORTCEState=snmpFddiPORTCEState, snmpFddiMACCurrentFrameStatus=snmpFddiMACCurrentFrameStatus) |
grey_image = np.mean(image, axis=-1)
print("Shape: {}".format(grey_image.shape))
print("Type: {}".format(grey_image.dtype))
print("image size: {:0.3} MB".format(grey_image.nbytes / 1e6))
print("Min: {}; Max: {}".format(grey_image.min(), grey_image.max()))
plt.imshow(grey_image, cmap=plt.cm.Greys_r)
| grey_image = np.mean(image, axis=-1)
print('Shape: {}'.format(grey_image.shape))
print('Type: {}'.format(grey_image.dtype))
print('image size: {:0.3} MB'.format(grey_image.nbytes / 1000000.0))
print('Min: {}; Max: {}'.format(grey_image.min(), grey_image.max()))
plt.imshow(grey_image, cmap=plt.cm.Greys_r) |
def start_HotSpot(ssid="Hovercraft",encrypted=False,passd="1234",iface="wlan0"):
print("HotSpot %s encrypt %s with Pass %s on Interface %s",ssid,encrypted,passd,iface)
def stop_HotSpot():
print("HotSpot stopped")
| def start__hot_spot(ssid='Hovercraft', encrypted=False, passd='1234', iface='wlan0'):
print('HotSpot %s encrypt %s with Pass %s on Interface %s', ssid, encrypted, passd, iface)
def stop__hot_spot():
print('HotSpot stopped') |
n = int(input())
left_side = 0
right_side = 0
for i in range(n):
num = int(input())
left_side += num
for i in range(n):
num = int(input())
right_side += num
if left_side == right_side:
print(f"Yes, sum = {left_side}")
else:
print(f"No, diff = {abs(left_side - right_side)}")
| n = int(input())
left_side = 0
right_side = 0
for i in range(n):
num = int(input())
left_side += num
for i in range(n):
num = int(input())
right_side += num
if left_side == right_side:
print(f'Yes, sum = {left_side}')
else:
print(f'No, diff = {abs(left_side - right_side)}') |
#
# PySNMP MIB module CTRON-PRIORITY-CLASSIFY-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CTRON-PRIORITY-CLASSIFY-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:30:31 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)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint")
ctPriorityExt, = mibBuilder.importSymbols("CTRON-MIB-NAMES", "ctPriorityExt")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
iso, IpAddress, Counter64, Bits, MibIdentifier, NotificationType, ModuleIdentity, Integer32, ObjectIdentity, Unsigned32, Gauge32, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "IpAddress", "Counter64", "Bits", "MibIdentifier", "NotificationType", "ModuleIdentity", "Integer32", "ObjectIdentity", "Unsigned32", "Gauge32", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks")
RowStatus, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "DisplayString", "TextualConvention")
ctPriClassify = ModuleIdentity((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6))
if mibBuilder.loadTexts: ctPriClassify.setLastUpdated('200203121855Z')
if mibBuilder.loadTexts: ctPriClassify.setOrganization('Cabletron Systems, Inc')
if mibBuilder.loadTexts: ctPriClassify.setContactInfo(' Cabletron Systems, Inc. Postal: 35 Industrial Way, P.O. Box 5005 Rochester, NH 03867-0505 Phone: (603) 332-9400 Email: support@cabletron.com Web: http://www.cabletron.com')
if mibBuilder.loadTexts: ctPriClassify.setDescription('The Cabletron Priority Classify MIB module for controlling Cabletron specific priority classification criteria based on packet content.')
ctPriClassifyObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1))
class CtPriClassifyType(TextualConvention, Integer32):
description = 'Each enumerated value represents a unique classification type. Different types have different rules regarding how data is interpreted during classification. These rules are spelled out in the comments preceding each type.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25))
namedValues = NamedValues(("etherType", 1), ("llcDsapSsap", 2), ("ipTypeOfService", 3), ("ipProtocolType", 4), ("ipxClassOfService", 5), ("ipxPacketType", 6), ("ipAddressSource", 7), ("ipAddressDestination", 8), ("ipAddressBilateral", 9), ("ipxNetworkSource", 10), ("ipxNetworkDestination", 11), ("ipxNetworkBilateral", 12), ("ipUdpPortSource", 13), ("ipUdpPortDestination", 14), ("ipUdpPortBilateral", 15), ("ipTcpPortSource", 16), ("ipTcpPortDestination", 17), ("ipTcpPortBilateral", 18), ("ipxSocketSource", 19), ("ipxSocketDestination", 20), ("ipxSocketBilateral", 21), ("macAddressSource", 22), ("macAddressDestination", 23), ("macAddressBilateral", 24), ("ipFragments", 25))
class PortList(TextualConvention, OctetString):
description = "Each octet within this value specifies a set of eight ports, with the first octet specifying ports 1 through 8, the second octet specifying ports 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port. Thus, each port of the bridge is represented by a single bit within the value of this object. If that bit has a value of '1' then that port is included in the set of ports; the port is not included if its bit has a value of '0'."
status = 'current'
ctPriClassifyStatus = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone('disable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ctPriClassifyStatus.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyStatus.setDescription('Allows the Priority Classification feature to be globally enabled/disabled. A value of disable(2), functionally supersedes the RowStatus of individual entries in the ctPriClassifyTable, but does not change their actual RowStatus value.')
ctPriClassifyMaxEntries = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ctPriClassifyMaxEntries.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyMaxEntries.setDescription('The maximum number of entries allowed in the ctPriClassifyTable.')
ctPriClassifyNumEntries = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ctPriClassifyNumEntries.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyNumEntries.setDescription('The current number of entries in the ctPriClassifyTable.')
ctPriClassifyTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4), )
if mibBuilder.loadTexts: ctPriClassifyTable.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyTable.setDescription('A table containing configuration information for each Priority classification configured into the device by (local or network) management. All entries are permanent and will be restored after the device is reset.')
ctPriClassifyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1), ).setIndexNames((0, "CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyPriority"), (0, "CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyDataMeaning"), (0, "CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyDataVal"), (0, "CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyDataMask"))
if mibBuilder.loadTexts: ctPriClassifyEntry.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyEntry.setDescription('Describes a particular entry of ctPriClassifyTable.')
ctPriClassifyPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 7)))
if mibBuilder.loadTexts: ctPriClassifyPriority.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyPriority.setDescription('The priority for this entry. Any packet meeting the classification criteria specified by this conceptual row will be given the priority indicated by this object.')
ctPriClassifyDataMeaning = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 2), CtPriClassifyType())
if mibBuilder.loadTexts: ctPriClassifyDataMeaning.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyDataMeaning.setDescription('The meaning of the ctPriClassifyDataVal leaf for this conceptual row. The ctPriClassifyDataVal specifies a particular value which, when compared to packet data, is used to classify that packet to a particular priority. The part of the packet (if any), to which this data comparison applies, is determined by this object. For example, the value ipAddressBilateral(8) means that the value ctPriClassifyDataVal for this entry is an IP address. It further means that the given IP address will be compared against both source and destination IP address fields in a packet. Such an entry obviously would not not match against any non-IP packets. Additionally, the value of this leaf will impose certain implicit ranges and interpretations of data contained within the ctPriClassifyDataVal leaf for this entry. The specific limitations of each type should be spelled out in the comments for that type.')
ctPriClassifyDataVal = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 3), Unsigned32())
if mibBuilder.loadTexts: ctPriClassifyDataVal.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyDataVal.setDescription('The data value associated with ctPriClassifyDataMeaning. The explicit range of this value is any unsigned 32-bit integer(0..4294967295). This range may vary, however, depending upon the value of ctPriClassifyDataMeaning. Illegal values should not be allowed.')
ctPriClassifyDataMask = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 4), Unsigned32())
if mibBuilder.loadTexts: ctPriClassifyDataMask.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyDataMask.setDescription("This object is the one's complement of a 32-bit mask. This mask is applicable to the data comparison of ctPriClassifyDataVal. The mask is applied to the actual packet data under consideration through a logical bitwise AND operation. This result is then compared to the data. For example, we want to classify according to a bilateral IP address of 134.141.0.0 with a mask of 255.255.240.0. This would be reflected by the following values: ctPriClassifyDataMeaning: ipAddressBilateral(8) ctPriClassifyDataVal: 0x868d0000 ctPriClassifyDataMask: 0x00000fff Again there are contextual implications for this leaf depending upon the value of ctPriClassifyDataMeaning. Not all types will use the mask, and others will impose restrictions. This value should however be a true indication of the masking operation. In other words, data types that don't use a mask should only allow a value of zero, indicating that all data bits are significant in the comparison. The specific restrictions of each type should be spelled out in the comments for that type. Illegal values should not be allowed.")
ctPriClassifyIngressList = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 5), PortList().clone(hexValue="0000")).setMaxAccess("readcreate")
if mibBuilder.loadTexts: ctPriClassifyIngressList.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyIngressList.setDescription('The set of ports on which this classification rule applies. Classification occurs on ingress. An agent implementation should allow a set operation of this object to create a row if it does not exist.')
ctPriClassifyRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 6), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: ctPriClassifyRowStatus.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyRowStatus.setDescription("This object provides both control and status for the associated conceptual row in the table. Rows can be created in two ways. createAndGo - The specified row will be created and activated if the instance is allowable. If not, an inconsistentValue exception will be returned and the row will not be created. This provides the most optimal method of creating an active row, but provides the user no explanation if the row cannot be created. createAndWait - The specified row will be created and put in the notInService state if the instance is allowable. A subsequent activation of this row will bring it into the active state. If the instance is not allowable, the row will be created and put in the notReady state. A subsequent activation of this row will fail. Since the inappropriate information is always contained in the indexing leaves, activation will never succeed and the row should be removed by the management station. When a row is in the notReady state, the ctPriClassifyRowInfo may be retrieved to obtain a plain English explanation of why this row cannot be activated. createAndWait is the preferred method for this reason. Both methods described above leave ctPriClassifyIngressList in it's default state, requiring an additional set operation in order to modify it. An even more optimal twist on the createAndWait method is to set the ctPriClassifyIngressList to it's desired value as a method for row creation. This will essentially cause an implicit createAndWait since it too will leave the row in either the notInService or notReady state. This leaves only activation or error analysis as the last step. Any rows left in the notReady or notInService state for more than 5 minutes should be automatically removed by the agent implementation.")
ctPriClassifyRowInfo = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ctPriClassifyRowInfo.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyRowInfo.setDescription("This object provides info about this row in the form of an ASCII string, suitable for display purposes. The intended purpose of this object is to provide an 'agent-specific' explanation as to why the ctPriClassifyRowStatus for this conceptual row is in the 'notReady' state. A management station should read this object and display it to the user in this case. A conceptual row that does not fall into this category may simply return a single NULL, but may also provide any useful info of its choice. A management station may attempt to display such info if it so chooses, but is under no burden to do so.")
ctPriClassifyTOSStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ctPriClassifyTOSStatus.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyTOSStatus.setDescription('This object indicates whether an IP Type Of Service (TOS) value, defined by ctPriClassifyTOSValue, should be written into the TOS field of the IP header for any packet matching the classification specified by this conceptual row. This object may be set to enable only for the conceptual rows whose ctPriClassifyDataMeaning and ctPriClassifyDataVal have the following values: ctPriClassifyDataMeaning ctPriClassifyDataVal ------------------------ -------------------- etherType(1) 0x0800 (IP) llcDsapSsap(2) 0x0606 (IP) ipTypeOfService(3) any ipProtocolType(4) any ipAddressSource(7) any ipAddressDestination(8) any ipAddressBilateral(9) any ipUdpPortSource(13) any ipUdpPortDestination(14) any ipUdpPortBilateral(15) any ipTdpPortSource(16) any ipTdpPortDestination(17) any ipTdpPortBilateral(18) any ipFrag(25) not applicable A conceptual row that does not fall into these categories may be set to disable(2) and will return disable(2).')
ctPriClassifyTOSValue = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: ctPriClassifyTOSValue.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyTOSValue.setDescription('The value to be written into the IP TOS field of the IP header of any packet that matches the classification specified by the conceptual row.')
ctPriClassifyAbilityTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 5), )
if mibBuilder.loadTexts: ctPriClassifyAbilityTable.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyAbilityTable.setDescription('A table containing information for each of the priority classification types. Types for which there is no corresponding row are not supported by this device.')
ctPriClassifyAbilityEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 5, 1), ).setIndexNames((0, "CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyAbility"))
if mibBuilder.loadTexts: ctPriClassifyAbilityEntry.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyAbilityEntry.setDescription('Describes a particular entry of ctPriClassifyAbilityTable.')
ctPriClassifyAbility = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 5, 1, 1), CtPriClassifyType())
if mibBuilder.loadTexts: ctPriClassifyAbility.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyAbility.setDescription('The priority classification type associated with this entry.')
ctPriClassifyPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 5, 1, 2), PortList()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ctPriClassifyPorts.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyPorts.setDescription('The set of ports on which the classification type specified by ctPriClassifyAbility is supported.')
ctPriClassifyTableLastChange = MibScalar((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 6), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ctPriClassifyTableLastChange.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyTableLastChange.setDescription('Indicates the sysUpTime at which the last change was made to the ctPriClassifyTable.')
ctPriClassifyConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 2))
ctPriClassifyGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 2, 1))
ctPriClassifyCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 2, 2))
ctPriClassifyBaseGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 2, 1, 1)).setObjects(("CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyStatus"), ("CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyMaxEntries"), ("CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyNumEntries"), ("CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyIngressList"), ("CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyRowStatus"), ("CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyRowInfo"), ("CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyTOSStatus"), ("CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyTOSValue"), ("CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyPorts"), ("CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyTableLastChange"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ctPriClassifyBaseGroup = ctPriClassifyBaseGroup.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyBaseGroup.setDescription('A collection of objects providing device level control and status information for Priority classification.')
ctPriClassifyCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 2, 2, 1)).setObjects(("CTRON-PRIORITY-CLASSIFY-MIB", "ctPriClassifyBaseGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ctPriClassifyCompliance = ctPriClassifyCompliance.setStatus('current')
if mibBuilder.loadTexts: ctPriClassifyCompliance.setDescription('The compliance statement for devices that support Priority classification.')
mibBuilder.exportSymbols("CTRON-PRIORITY-CLASSIFY-MIB", ctPriClassifyTOSValue=ctPriClassifyTOSValue, ctPriClassify=ctPriClassify, ctPriClassifyRowStatus=ctPriClassifyRowStatus, ctPriClassifyAbilityTable=ctPriClassifyAbilityTable, PortList=PortList, ctPriClassifyRowInfo=ctPriClassifyRowInfo, ctPriClassifyCompliances=ctPriClassifyCompliances, ctPriClassifyBaseGroup=ctPriClassifyBaseGroup, ctPriClassifyEntry=ctPriClassifyEntry, ctPriClassifyMaxEntries=ctPriClassifyMaxEntries, ctPriClassifyPorts=ctPriClassifyPorts, CtPriClassifyType=CtPriClassifyType, ctPriClassifyStatus=ctPriClassifyStatus, ctPriClassifyTableLastChange=ctPriClassifyTableLastChange, ctPriClassifyDataVal=ctPriClassifyDataVal, ctPriClassifyIngressList=ctPriClassifyIngressList, ctPriClassifyDataMeaning=ctPriClassifyDataMeaning, ctPriClassifyPriority=ctPriClassifyPriority, ctPriClassifyGroups=ctPriClassifyGroups, PYSNMP_MODULE_ID=ctPriClassify, ctPriClassifyDataMask=ctPriClassifyDataMask, ctPriClassifyAbilityEntry=ctPriClassifyAbilityEntry, ctPriClassifyAbility=ctPriClassifyAbility, ctPriClassifyTable=ctPriClassifyTable, ctPriClassifyTOSStatus=ctPriClassifyTOSStatus, ctPriClassifyConformance=ctPriClassifyConformance, ctPriClassifyCompliance=ctPriClassifyCompliance, ctPriClassifyObjects=ctPriClassifyObjects, ctPriClassifyNumEntries=ctPriClassifyNumEntries)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, value_size_constraint, constraints_union, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint')
(ct_priority_ext,) = mibBuilder.importSymbols('CTRON-MIB-NAMES', 'ctPriorityExt')
(notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance')
(iso, ip_address, counter64, bits, mib_identifier, notification_type, module_identity, integer32, object_identity, unsigned32, gauge32, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'IpAddress', 'Counter64', 'Bits', 'MibIdentifier', 'NotificationType', 'ModuleIdentity', 'Integer32', 'ObjectIdentity', 'Unsigned32', 'Gauge32', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks')
(row_status, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'DisplayString', 'TextualConvention')
ct_pri_classify = module_identity((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6))
if mibBuilder.loadTexts:
ctPriClassify.setLastUpdated('200203121855Z')
if mibBuilder.loadTexts:
ctPriClassify.setOrganization('Cabletron Systems, Inc')
if mibBuilder.loadTexts:
ctPriClassify.setContactInfo(' Cabletron Systems, Inc. Postal: 35 Industrial Way, P.O. Box 5005 Rochester, NH 03867-0505 Phone: (603) 332-9400 Email: support@cabletron.com Web: http://www.cabletron.com')
if mibBuilder.loadTexts:
ctPriClassify.setDescription('The Cabletron Priority Classify MIB module for controlling Cabletron specific priority classification criteria based on packet content.')
ct_pri_classify_objects = mib_identifier((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1))
class Ctpriclassifytype(TextualConvention, Integer32):
description = 'Each enumerated value represents a unique classification type. Different types have different rules regarding how data is interpreted during classification. These rules are spelled out in the comments preceding each type.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25))
named_values = named_values(('etherType', 1), ('llcDsapSsap', 2), ('ipTypeOfService', 3), ('ipProtocolType', 4), ('ipxClassOfService', 5), ('ipxPacketType', 6), ('ipAddressSource', 7), ('ipAddressDestination', 8), ('ipAddressBilateral', 9), ('ipxNetworkSource', 10), ('ipxNetworkDestination', 11), ('ipxNetworkBilateral', 12), ('ipUdpPortSource', 13), ('ipUdpPortDestination', 14), ('ipUdpPortBilateral', 15), ('ipTcpPortSource', 16), ('ipTcpPortDestination', 17), ('ipTcpPortBilateral', 18), ('ipxSocketSource', 19), ('ipxSocketDestination', 20), ('ipxSocketBilateral', 21), ('macAddressSource', 22), ('macAddressDestination', 23), ('macAddressBilateral', 24), ('ipFragments', 25))
class Portlist(TextualConvention, OctetString):
description = "Each octet within this value specifies a set of eight ports, with the first octet specifying ports 1 through 8, the second octet specifying ports 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port. Thus, each port of the bridge is represented by a single bit within the value of this object. If that bit has a value of '1' then that port is included in the set of ports; the port is not included if its bit has a value of '0'."
status = 'current'
ct_pri_classify_status = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2))).clone('disable')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ctPriClassifyStatus.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyStatus.setDescription('Allows the Priority Classification feature to be globally enabled/disabled. A value of disable(2), functionally supersedes the RowStatus of individual entries in the ctPriClassifyTable, but does not change their actual RowStatus value.')
ct_pri_classify_max_entries = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ctPriClassifyMaxEntries.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyMaxEntries.setDescription('The maximum number of entries allowed in the ctPriClassifyTable.')
ct_pri_classify_num_entries = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ctPriClassifyNumEntries.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyNumEntries.setDescription('The current number of entries in the ctPriClassifyTable.')
ct_pri_classify_table = mib_table((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4))
if mibBuilder.loadTexts:
ctPriClassifyTable.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyTable.setDescription('A table containing configuration information for each Priority classification configured into the device by (local or network) management. All entries are permanent and will be restored after the device is reset.')
ct_pri_classify_entry = mib_table_row((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1)).setIndexNames((0, 'CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyPriority'), (0, 'CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyDataMeaning'), (0, 'CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyDataVal'), (0, 'CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyDataMask'))
if mibBuilder.loadTexts:
ctPriClassifyEntry.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyEntry.setDescription('Describes a particular entry of ctPriClassifyTable.')
ct_pri_classify_priority = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 7)))
if mibBuilder.loadTexts:
ctPriClassifyPriority.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyPriority.setDescription('The priority for this entry. Any packet meeting the classification criteria specified by this conceptual row will be given the priority indicated by this object.')
ct_pri_classify_data_meaning = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 2), ct_pri_classify_type())
if mibBuilder.loadTexts:
ctPriClassifyDataMeaning.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyDataMeaning.setDescription('The meaning of the ctPriClassifyDataVal leaf for this conceptual row. The ctPriClassifyDataVal specifies a particular value which, when compared to packet data, is used to classify that packet to a particular priority. The part of the packet (if any), to which this data comparison applies, is determined by this object. For example, the value ipAddressBilateral(8) means that the value ctPriClassifyDataVal for this entry is an IP address. It further means that the given IP address will be compared against both source and destination IP address fields in a packet. Such an entry obviously would not not match against any non-IP packets. Additionally, the value of this leaf will impose certain implicit ranges and interpretations of data contained within the ctPriClassifyDataVal leaf for this entry. The specific limitations of each type should be spelled out in the comments for that type.')
ct_pri_classify_data_val = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 3), unsigned32())
if mibBuilder.loadTexts:
ctPriClassifyDataVal.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyDataVal.setDescription('The data value associated with ctPriClassifyDataMeaning. The explicit range of this value is any unsigned 32-bit integer(0..4294967295). This range may vary, however, depending upon the value of ctPriClassifyDataMeaning. Illegal values should not be allowed.')
ct_pri_classify_data_mask = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 4), unsigned32())
if mibBuilder.loadTexts:
ctPriClassifyDataMask.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyDataMask.setDescription("This object is the one's complement of a 32-bit mask. This mask is applicable to the data comparison of ctPriClassifyDataVal. The mask is applied to the actual packet data under consideration through a logical bitwise AND operation. This result is then compared to the data. For example, we want to classify according to a bilateral IP address of 134.141.0.0 with a mask of 255.255.240.0. This would be reflected by the following values: ctPriClassifyDataMeaning: ipAddressBilateral(8) ctPriClassifyDataVal: 0x868d0000 ctPriClassifyDataMask: 0x00000fff Again there are contextual implications for this leaf depending upon the value of ctPriClassifyDataMeaning. Not all types will use the mask, and others will impose restrictions. This value should however be a true indication of the masking operation. In other words, data types that don't use a mask should only allow a value of zero, indicating that all data bits are significant in the comparison. The specific restrictions of each type should be spelled out in the comments for that type. Illegal values should not be allowed.")
ct_pri_classify_ingress_list = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 5), port_list().clone(hexValue='0000')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
ctPriClassifyIngressList.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyIngressList.setDescription('The set of ports on which this classification rule applies. Classification occurs on ingress. An agent implementation should allow a set operation of this object to create a row if it does not exist.')
ct_pri_classify_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 6), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
ctPriClassifyRowStatus.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyRowStatus.setDescription("This object provides both control and status for the associated conceptual row in the table. Rows can be created in two ways. createAndGo - The specified row will be created and activated if the instance is allowable. If not, an inconsistentValue exception will be returned and the row will not be created. This provides the most optimal method of creating an active row, but provides the user no explanation if the row cannot be created. createAndWait - The specified row will be created and put in the notInService state if the instance is allowable. A subsequent activation of this row will bring it into the active state. If the instance is not allowable, the row will be created and put in the notReady state. A subsequent activation of this row will fail. Since the inappropriate information is always contained in the indexing leaves, activation will never succeed and the row should be removed by the management station. When a row is in the notReady state, the ctPriClassifyRowInfo may be retrieved to obtain a plain English explanation of why this row cannot be activated. createAndWait is the preferred method for this reason. Both methods described above leave ctPriClassifyIngressList in it's default state, requiring an additional set operation in order to modify it. An even more optimal twist on the createAndWait method is to set the ctPriClassifyIngressList to it's desired value as a method for row creation. This will essentially cause an implicit createAndWait since it too will leave the row in either the notInService or notReady state. This leaves only activation or error analysis as the last step. Any rows left in the notReady or notInService state for more than 5 minutes should be automatically removed by the agent implementation.")
ct_pri_classify_row_info = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ctPriClassifyRowInfo.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyRowInfo.setDescription("This object provides info about this row in the form of an ASCII string, suitable for display purposes. The intended purpose of this object is to provide an 'agent-specific' explanation as to why the ctPriClassifyRowStatus for this conceptual row is in the 'notReady' state. A management station should read this object and display it to the user in this case. A conceptual row that does not fall into this category may simply return a single NULL, but may also provide any useful info of its choice. A management station may attempt to display such info if it so chooses, but is under no burden to do so.")
ct_pri_classify_tos_status = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ctPriClassifyTOSStatus.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyTOSStatus.setDescription('This object indicates whether an IP Type Of Service (TOS) value, defined by ctPriClassifyTOSValue, should be written into the TOS field of the IP header for any packet matching the classification specified by this conceptual row. This object may be set to enable only for the conceptual rows whose ctPriClassifyDataMeaning and ctPriClassifyDataVal have the following values: ctPriClassifyDataMeaning ctPriClassifyDataVal ------------------------ -------------------- etherType(1) 0x0800 (IP) llcDsapSsap(2) 0x0606 (IP) ipTypeOfService(3) any ipProtocolType(4) any ipAddressSource(7) any ipAddressDestination(8) any ipAddressBilateral(9) any ipUdpPortSource(13) any ipUdpPortDestination(14) any ipUdpPortBilateral(15) any ipTdpPortSource(16) any ipTdpPortDestination(17) any ipTdpPortBilateral(18) any ipFrag(25) not applicable A conceptual row that does not fall into these categories may be set to disable(2) and will return disable(2).')
ct_pri_classify_tos_value = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 4, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
ctPriClassifyTOSValue.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyTOSValue.setDescription('The value to be written into the IP TOS field of the IP header of any packet that matches the classification specified by the conceptual row.')
ct_pri_classify_ability_table = mib_table((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 5))
if mibBuilder.loadTexts:
ctPriClassifyAbilityTable.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyAbilityTable.setDescription('A table containing information for each of the priority classification types. Types for which there is no corresponding row are not supported by this device.')
ct_pri_classify_ability_entry = mib_table_row((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 5, 1)).setIndexNames((0, 'CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyAbility'))
if mibBuilder.loadTexts:
ctPriClassifyAbilityEntry.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyAbilityEntry.setDescription('Describes a particular entry of ctPriClassifyAbilityTable.')
ct_pri_classify_ability = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 5, 1, 1), ct_pri_classify_type())
if mibBuilder.loadTexts:
ctPriClassifyAbility.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyAbility.setDescription('The priority classification type associated with this entry.')
ct_pri_classify_ports = mib_table_column((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 5, 1, 2), port_list()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ctPriClassifyPorts.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyPorts.setDescription('The set of ports on which the classification type specified by ctPriClassifyAbility is supported.')
ct_pri_classify_table_last_change = mib_scalar((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 1, 6), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ctPriClassifyTableLastChange.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyTableLastChange.setDescription('Indicates the sysUpTime at which the last change was made to the ctPriClassifyTable.')
ct_pri_classify_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 2))
ct_pri_classify_groups = mib_identifier((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 2, 1))
ct_pri_classify_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 2, 2))
ct_pri_classify_base_group = object_group((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 2, 1, 1)).setObjects(('CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyStatus'), ('CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyMaxEntries'), ('CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyNumEntries'), ('CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyIngressList'), ('CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyRowStatus'), ('CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyRowInfo'), ('CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyTOSStatus'), ('CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyTOSValue'), ('CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyPorts'), ('CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyTableLastChange'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ct_pri_classify_base_group = ctPriClassifyBaseGroup.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyBaseGroup.setDescription('A collection of objects providing device level control and status information for Priority classification.')
ct_pri_classify_compliance = module_compliance((1, 3, 6, 1, 4, 1, 52, 4, 1, 2, 14, 6, 2, 2, 1)).setObjects(('CTRON-PRIORITY-CLASSIFY-MIB', 'ctPriClassifyBaseGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ct_pri_classify_compliance = ctPriClassifyCompliance.setStatus('current')
if mibBuilder.loadTexts:
ctPriClassifyCompliance.setDescription('The compliance statement for devices that support Priority classification.')
mibBuilder.exportSymbols('CTRON-PRIORITY-CLASSIFY-MIB', ctPriClassifyTOSValue=ctPriClassifyTOSValue, ctPriClassify=ctPriClassify, ctPriClassifyRowStatus=ctPriClassifyRowStatus, ctPriClassifyAbilityTable=ctPriClassifyAbilityTable, PortList=PortList, ctPriClassifyRowInfo=ctPriClassifyRowInfo, ctPriClassifyCompliances=ctPriClassifyCompliances, ctPriClassifyBaseGroup=ctPriClassifyBaseGroup, ctPriClassifyEntry=ctPriClassifyEntry, ctPriClassifyMaxEntries=ctPriClassifyMaxEntries, ctPriClassifyPorts=ctPriClassifyPorts, CtPriClassifyType=CtPriClassifyType, ctPriClassifyStatus=ctPriClassifyStatus, ctPriClassifyTableLastChange=ctPriClassifyTableLastChange, ctPriClassifyDataVal=ctPriClassifyDataVal, ctPriClassifyIngressList=ctPriClassifyIngressList, ctPriClassifyDataMeaning=ctPriClassifyDataMeaning, ctPriClassifyPriority=ctPriClassifyPriority, ctPriClassifyGroups=ctPriClassifyGroups, PYSNMP_MODULE_ID=ctPriClassify, ctPriClassifyDataMask=ctPriClassifyDataMask, ctPriClassifyAbilityEntry=ctPriClassifyAbilityEntry, ctPriClassifyAbility=ctPriClassifyAbility, ctPriClassifyTable=ctPriClassifyTable, ctPriClassifyTOSStatus=ctPriClassifyTOSStatus, ctPriClassifyConformance=ctPriClassifyConformance, ctPriClassifyCompliance=ctPriClassifyCompliance, ctPriClassifyObjects=ctPriClassifyObjects, ctPriClassifyNumEntries=ctPriClassifyNumEntries) |
DESCRIPTION = "switch to a different module"
def autocomplete(shell, line, text, state):
# todo: make this show shorter paths at a time
# should never go this big...
if len(line.split()) > 2 and line.split()[0] != "set":
return None
options = [x + " " for x in shell.plugins if x.startswith(text)]
try:
return options[state]
except:
return None
def help(shell):
pass
def execute(shell, cmd):
splitted = cmd.split()
if len(splitted) > 1:
module = splitted[1]
if module not in shell.plugins:
shell.print_error("No module named %s" % (module))
return
shell.previous = shell.state
shell.state = module
| description = 'switch to a different module'
def autocomplete(shell, line, text, state):
if len(line.split()) > 2 and line.split()[0] != 'set':
return None
options = [x + ' ' for x in shell.plugins if x.startswith(text)]
try:
return options[state]
except:
return None
def help(shell):
pass
def execute(shell, cmd):
splitted = cmd.split()
if len(splitted) > 1:
module = splitted[1]
if module not in shell.plugins:
shell.print_error('No module named %s' % module)
return
shell.previous = shell.state
shell.state = module |
# test builtin issubclass
class A:
pass
print(issubclass(A, A))
print(issubclass(A, (A,)))
try:
issubclass(A, 1)
except TypeError:
print('TypeError')
try:
issubclass('a', 1)
except TypeError:
print('TypeError')
| class A:
pass
print(issubclass(A, A))
print(issubclass(A, (A,)))
try:
issubclass(A, 1)
except TypeError:
print('TypeError')
try:
issubclass('a', 1)
except TypeError:
print('TypeError') |
# Gianna-Carina Gruen
# 05/23/2016
# Homework 1
# 1. Prompt the user for their year of birth, and tell them (approximately):
year_of_birth = input ("Hello! I'm not interested in your name, but I would like to know your age. In what year were you born?")
# Additionally, if someone gives you a year in the future, try asking them again (assume they'll do it right the second time)
if int(year_of_birth) >=2016:
year_of_birth = input ("I seriously doubt that - you get another chance. Tell me the truth this time. In what year where you born?")
# 2. How old they are
age = 2016 - int(year_of_birth)
print ("So you are roughly", age, "years old.")
# 3. How many times their heart has beaten
#human heartbeat: 70bpm; source: https://answers.yahoo.com/question/index?qid=20070907185006AAo85XE
human_heartbeat_since = age * 365 * 70 * 60 * 24
print ("Since you were born your heart has beaten roughly", human_heartbeat_since, "times. Plus one, two, three...")
# 4. How many times a blue whale's heart has beaten
#bluewhale heartbeat: 9 bpm; source: http://www.whalefacts.org/blue-whale-heart/
whale_heartbeat_since = age * 365 * 9 * 60 * 24
print ("In the same time, a blue whale's heart has beaten approximately", whale_heartbeat_since, "times." )
# 5. How many times a rabbit's heart has beaten
#rabbit heartbeat: 205 bpm; source: http://www.cardio-research.com/quick-facts/animals
rabbit_heartbeat_since = age * 365 * 205 * 60 * 24
# 6. If the answer to (5) is more than a billion, say "XXX billion" instead of the very long raw number
if rabbit_heartbeat_since >= 1000000000:
print ("Whereas a rabbit's heart has beaten roughly", rabbit_heartbeat_since/1000000000, "billion times.")
#no idea how to round the number. Tried round ( x [, n]) and I assume it doesn't work because rabbit_heartbeat_since/1000000000 is not a number. Changing it into an integer didn't help either. Defining it as a new variable neither. So, gave up on rounding it for now.
# 7. How old they are in Venus years
# One year = one surrounding of the sun. For Venus to surround the sun once, it takes 225 Earth days; source: http://spaceplace.nasa.gov/all-about-venus/en/
# To translate into code: How many times did Venus surround the sun since you were born?
# Approach: 1) Calculate the number of days passed since birth 2) divide them by 225
age_on_venus = age * 365 / 225
print ("Measured in Venus years, you are", age_on_venus, "years old.")
# 8. How old they are in Neptune years
# A year on Neptune equals 164.8 Earth years; source: https://pds.jpl.nasa.gov/planets/special/neptune.htm
age_on_neptune = age * 164.8
print ("Measured in Neptune years, you are", age_on_neptune, "years old.")
# 9. Whether they are the same age as you, older or younger
if int(year_of_birth) == 1987:
print("And it might surprise you, but we were both born in the same year!")
# 10. If older or younger, how many years difference
elif int(year_of_birth) > 1987:
print ("You are", int(year_of_birth)-1987, "years younger than me.")
else:
print ("You are", 1987-int(year_of_birth), "years older than me.")
# 11. If they were born in an even or odd year
# Approach: If year_of_birth divided by 2 results in an integer number, the year is even
if int(year_of_birth) % 2 == 0:
print ("You might have noticed, but in case not: you were born in an even year.")
else:
print ("You might have noticed, but in case not: you were born in an odd year.")
# 12. How many times the Pittsburgh Steelers have won the Superbowl since their birth.
#Pittsburgh Steelers won in 1975, 1976, 1979, 1980, 2006, 2009; source: http://www.steelers.com/history/superbowl.html
if int(year_of_birth) <= 1975:
print ("And did you know that the Pittsburgh Steelers won six Superbowls since you were born?!")
elif int(year_of_birth) >= 1976 and int(year_of_birth) < 1979:
print ("And did you know that the Pittsburgh Steelers won five Superbowls since you were born?!")
elif int(year_of_birth) == 1979:
print ("And did you know that the Pittsburgh Steelers won four Superbowls since you were born?!")
elif int(year_of_birth) == 1980:
print ("And did you know that the Pittsburgh Steelers won three Superbowls since you were born?!")
elif int(year_of_birth) >= 1981 and int(year_of_birth) <= 2006:
print ("And did you know that the Pittsburgh Steelers won two Superbowls since you were born?!")
elif int(year_of_birth) > 2006 and int(year_of_birth) <= 2009:
print ("And did you know that the Pittsburgh Steelers won one Superbowl since you were born?!")
elif int(year_of_birth) > 2009:
print ("And did you know that the Pittsburgh Steelers haven't won one single Superbowl since you were born?!")
# 13. Which US President was in office when they were born (FDR onward)
# actually I guess there's probably a more elegant way to solve Task 12 and this one, however I haven't yet figured the right way to google it...
# Franklin D. Roosevelt 1933 - 1945
# Harry S. Truman 1945 - 1953
# Dwight D. Eisenhower 1953 - 1961
# John F. Kennedy 1961 - 1963
# Lydon B. Johnson 1963 - 1969
# Richard Nixon 1969 - 1974
# Gerald Ford 1974 - 1977
# Jimmy Carter 1977- 1981
# Ronald Reagan 1981 - 1989
# George Bush 1989 - 1993
# Bill Clinton 1993 - 2001
# George W. Bush 2001 - 2009
# Barack Obama 2009 - 2016
if int(year_of_birth) >= 1933 and int(year_of_birth) < 1945:
print ("At the end, we're getting official: When you were born, President Franklin D. Roosevelt governed the US from the Oval Office")
elif int(year_of_birth) == 1945:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President Frankling D. Roosevelt was followed by President Harry S. Truman.")
elif int(year_of_birth) > 1945 and int(year_of_birth) < 1953:
print ("At the end, we're getting official: When you were born, President Harry S. Truman governed the US from the Oval Office.")
elif int(year_of_birth) == 1953:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President Harry S. Truman was followed by President Dwight D. Eisenhower.")
elif int(year_of_birth) > 1953 and int(year_of_birth) < 1961:
print ("At the end, we're getting official: When you were born, President Dwight D. Eisenhower governed the US from the Oval Office.")
elif int(year_of_birth) == 1961:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President Dwight D. Eisenhower was followed by President John F. Kennedy.")
elif int(year_of_birth) > 1961 and int(year_of_birth) < 1963:
print ("At the end, we're getting official: When you were born, President John F. Kennedy governed the US from the Oval Office.")
elif int(year_of_birth) == 1963:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President John F. Kennedy was followed by President Lydon B. Johnson.")
elif int(year_of_birth) > 1963 and int(year_of_birth) < 1969:
print ("At the end, we're getting official: When you were born, President Lydon B. Johnson governed the US from the Oval Office.")
elif int(year_of_birth) == 1969:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President Lydon B. Johnson was followed by President Richard Nixon.")
elif int(year_of_birth) > 1969 and int(year_of_birth) < 1974:
print ("At the end, we're getting official: When you were born, President Richard Nixon governed the US from the Oval Office.")
elif int(year_of_birth) == 1974:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President Richard Nixon was followed by President Gerald Ford.")
elif int(year_of_birth) > 1974 and int(year_of_birth) < 1977:
print ("At the end, we're getting official: When you were born, President Gerald Ford governed the US from the Oval Office.")
elif int(year_of_birth) == 1977:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President Gerald Ford was followed by President Jimmy Carter.")
elif int(year_of_birth) > 1977 and int(year_of_birth) < 1981:
print ("At the end, we're getting official: When you were born, President Jimmy Carter governed the US from the Oval Office.")
elif int(year_of_birth) == 1981:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President Jimmy Carter was followed by President Ronald Reagan.")
elif int(year_of_birth) > 1981 and int(year_of_birth) < 1989:
print ("At the end, we're getting official: When you were born, President Ronald Reagan governed the US from the Oval Office.")
elif int(year_of_birth) == 1989:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President Ronald Reagan was followed by President George Bush.")
elif int(year_of_birth) > 1989 and int(year_of_birth) < 1993:
print ("At the end, we're getting official: When you were born, President George Bush governed the US from the Oval Office.")
elif int(year_of_birth) == 1993:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President George Bush was followed by President Bill Clinton.")
elif int(year_of_birth) > 1993 and int(year_of_birth) < 2001:
print ("At the end, we're getting official: When you were born, President Bill Clinton governed the US from the Oval Office.")
elif int(year_of_birth) == 2001:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President Bill Clinton was followed by President George W. Bush.")
elif int(year_of_birth) > 2001 and int(year_of_birth) < 2009:
print ("At the end, we're getting official: When you were born, President George W. Bush governed the US from the Oval Office.")
elif int(year_of_birth) == 2009:
print ("At the end, we're getting official: The year you were born, there were elections in the US. President George W. Bush was followed by President Barack Obama.")
elif int(year_of_birth) > 2009:
print ("At the end, we're getting official: When you were born, President Barack Obama governed the US from the Oval Office.")
| year_of_birth = input("Hello! I'm not interested in your name, but I would like to know your age. In what year were you born?")
if int(year_of_birth) >= 2016:
year_of_birth = input('I seriously doubt that - you get another chance. Tell me the truth this time. In what year where you born?')
age = 2016 - int(year_of_birth)
print('So you are roughly', age, 'years old.')
human_heartbeat_since = age * 365 * 70 * 60 * 24
print('Since you were born your heart has beaten roughly', human_heartbeat_since, 'times. Plus one, two, three...')
whale_heartbeat_since = age * 365 * 9 * 60 * 24
print("In the same time, a blue whale's heart has beaten approximately", whale_heartbeat_since, 'times.')
rabbit_heartbeat_since = age * 365 * 205 * 60 * 24
if rabbit_heartbeat_since >= 1000000000:
print("Whereas a rabbit's heart has beaten roughly", rabbit_heartbeat_since / 1000000000, 'billion times.')
age_on_venus = age * 365 / 225
print('Measured in Venus years, you are', age_on_venus, 'years old.')
age_on_neptune = age * 164.8
print('Measured in Neptune years, you are', age_on_neptune, 'years old.')
if int(year_of_birth) == 1987:
print('And it might surprise you, but we were both born in the same year!')
elif int(year_of_birth) > 1987:
print('You are', int(year_of_birth) - 1987, 'years younger than me.')
else:
print('You are', 1987 - int(year_of_birth), 'years older than me.')
if int(year_of_birth) % 2 == 0:
print('You might have noticed, but in case not: you were born in an even year.')
else:
print('You might have noticed, but in case not: you were born in an odd year.')
if int(year_of_birth) <= 1975:
print('And did you know that the Pittsburgh Steelers won six Superbowls since you were born?!')
elif int(year_of_birth) >= 1976 and int(year_of_birth) < 1979:
print('And did you know that the Pittsburgh Steelers won five Superbowls since you were born?!')
elif int(year_of_birth) == 1979:
print('And did you know that the Pittsburgh Steelers won four Superbowls since you were born?!')
elif int(year_of_birth) == 1980:
print('And did you know that the Pittsburgh Steelers won three Superbowls since you were born?!')
elif int(year_of_birth) >= 1981 and int(year_of_birth) <= 2006:
print('And did you know that the Pittsburgh Steelers won two Superbowls since you were born?!')
elif int(year_of_birth) > 2006 and int(year_of_birth) <= 2009:
print('And did you know that the Pittsburgh Steelers won one Superbowl since you were born?!')
elif int(year_of_birth) > 2009:
print("And did you know that the Pittsburgh Steelers haven't won one single Superbowl since you were born?!")
if int(year_of_birth) >= 1933 and int(year_of_birth) < 1945:
print("At the end, we're getting official: When you were born, President Franklin D. Roosevelt governed the US from the Oval Office")
elif int(year_of_birth) == 1945:
print("At the end, we're getting official: The year you were born, there were elections in the US. President Frankling D. Roosevelt was followed by President Harry S. Truman.")
elif int(year_of_birth) > 1945 and int(year_of_birth) < 1953:
print("At the end, we're getting official: When you were born, President Harry S. Truman governed the US from the Oval Office.")
elif int(year_of_birth) == 1953:
print("At the end, we're getting official: The year you were born, there were elections in the US. President Harry S. Truman was followed by President Dwight D. Eisenhower.")
elif int(year_of_birth) > 1953 and int(year_of_birth) < 1961:
print("At the end, we're getting official: When you were born, President Dwight D. Eisenhower governed the US from the Oval Office.")
elif int(year_of_birth) == 1961:
print("At the end, we're getting official: The year you were born, there were elections in the US. President Dwight D. Eisenhower was followed by President John F. Kennedy.")
elif int(year_of_birth) > 1961 and int(year_of_birth) < 1963:
print("At the end, we're getting official: When you were born, President John F. Kennedy governed the US from the Oval Office.")
elif int(year_of_birth) == 1963:
print("At the end, we're getting official: The year you were born, there were elections in the US. President John F. Kennedy was followed by President Lydon B. Johnson.")
elif int(year_of_birth) > 1963 and int(year_of_birth) < 1969:
print("At the end, we're getting official: When you were born, President Lydon B. Johnson governed the US from the Oval Office.")
elif int(year_of_birth) == 1969:
print("At the end, we're getting official: The year you were born, there were elections in the US. President Lydon B. Johnson was followed by President Richard Nixon.")
elif int(year_of_birth) > 1969 and int(year_of_birth) < 1974:
print("At the end, we're getting official: When you were born, President Richard Nixon governed the US from the Oval Office.")
elif int(year_of_birth) == 1974:
print("At the end, we're getting official: The year you were born, there were elections in the US. President Richard Nixon was followed by President Gerald Ford.")
elif int(year_of_birth) > 1974 and int(year_of_birth) < 1977:
print("At the end, we're getting official: When you were born, President Gerald Ford governed the US from the Oval Office.")
elif int(year_of_birth) == 1977:
print("At the end, we're getting official: The year you were born, there were elections in the US. President Gerald Ford was followed by President Jimmy Carter.")
elif int(year_of_birth) > 1977 and int(year_of_birth) < 1981:
print("At the end, we're getting official: When you were born, President Jimmy Carter governed the US from the Oval Office.")
elif int(year_of_birth) == 1981:
print("At the end, we're getting official: The year you were born, there were elections in the US. President Jimmy Carter was followed by President Ronald Reagan.")
elif int(year_of_birth) > 1981 and int(year_of_birth) < 1989:
print("At the end, we're getting official: When you were born, President Ronald Reagan governed the US from the Oval Office.")
elif int(year_of_birth) == 1989:
print("At the end, we're getting official: The year you were born, there were elections in the US. President Ronald Reagan was followed by President George Bush.")
elif int(year_of_birth) > 1989 and int(year_of_birth) < 1993:
print("At the end, we're getting official: When you were born, President George Bush governed the US from the Oval Office.")
elif int(year_of_birth) == 1993:
print("At the end, we're getting official: The year you were born, there were elections in the US. President George Bush was followed by President Bill Clinton.")
elif int(year_of_birth) > 1993 and int(year_of_birth) < 2001:
print("At the end, we're getting official: When you were born, President Bill Clinton governed the US from the Oval Office.")
elif int(year_of_birth) == 2001:
print("At the end, we're getting official: The year you were born, there were elections in the US. President Bill Clinton was followed by President George W. Bush.")
elif int(year_of_birth) > 2001 and int(year_of_birth) < 2009:
print("At the end, we're getting official: When you were born, President George W. Bush governed the US from the Oval Office.")
elif int(year_of_birth) == 2009:
print("At the end, we're getting official: The year you were born, there were elections in the US. President George W. Bush was followed by President Barack Obama.")
elif int(year_of_birth) > 2009:
print("At the end, we're getting official: When you were born, President Barack Obama governed the US from the Oval Office.") |
class Solution:
def removePalindromeSub(self, s: str) -> int:
# exception
if s == '':
return 0
elif s == s[::-1]:
return 1
else:
return 2
| class Solution:
def remove_palindrome_sub(self, s: str) -> int:
if s == '':
return 0
elif s == s[::-1]:
return 1
else:
return 2 |
#!/usr/bin/env python
# coding=utf-8
class startURL:
xinfangURL = [
'http://cs.ganji.com/fang12/o1/',
'http://cs.ganji.com/fang12/o2/',
'http://cs.ganji.com/fang12/o3/',
'http://cs.ganji.com/fang12/o4/',
'http://cs.ganji.com/fang12/o5/',
'http://cs.ganji.com/fang12/o6/',
'http://cs.ganji.com/fang12/o7/',
'http://cs.ganji.com/fang12/o8/',
'http://cs.ganji.com/fang12/o9/',
'http://cs.ganji.com/fang12/o10/',
'http://cs.ganji.com/fang12/o11/',
'http://cs.ganji.com/fang12/o12/',
'http://cs.ganji.com/fang12/o13/',
'http://cs.ganji.com/fang12/o14/',
'http://cs.ganji.com/fang12/o15/',
'http://cs.ganji.com/fang12/o16/',
'http://cs.ganji.com/fang12/o17/',
'http://cs.ganji.com/fang12/o18/',
'http://cs.ganji.com/fang12/o19/',
'http://cs.ganji.com/fang12/o20/',
'http://cs.ganji.com/fang12/o21/',
'http://cs.ganji.com/fang12/o22/',
'http://cs.ganji.com/fang12/o23/',
'http://cs.ganji.com/fang12/o24/',
'http://cs.ganji.com/fang12/o25/',
'http://cs.ganji.com/fang12/o26/',
'http://cs.ganji.com/fang12/o27/',
'http://cs.ganji.com/fang12/o28/',
'http://cs.ganji.com/fang12/o29/',
'http://cs.ganji.com/fang12/o30/',
'http://cs.ganji.com/fang12/o31/',
'http://cs.ganji.com/fang12/o32/',
'http://cs.ganji.com/fang12/o33/',
'http://cs.ganji.com/fang12/o34/',
'http://cs.ganji.com/fang12/o35/',
'http://cs.ganji.com/fang12/o36/',
'http://cs.ganji.com/fang12/o37/',
'http://cs.ganji.com/fang12/o38/',
'http://cs.ganji.com/fang12/o39/',
'http://cs.ganji.com/fang12/o40/',
'http://cs.ganji.com/fang12/o41/',
'http://cs.ganji.com/fang12/o42/',
'http://cs.ganji.com/fang12/o43/',
'http://cs.ganji.com/fang12/o44/',
'http://cs.ganji.com/fang12/o45/',
'http://cs.ganji.com/fang12/o46/',
'http://cs.ganji.com/fang12/o47/',
'http://cs.ganji.com/fang12/o48/',
'http://cs.ganji.com/fang12/o49/',
'http://cs.ganji.com/fang12/o50/',
'http://cs.ganji.com/fang12/o51/',
'http://cs.ganji.com/fang12/o52/',
'http://cs.ganji.com/fang12/o53/',
'http://cs.ganji.com/fang12/o54/',
'http://cs.ganji.com/fang12/o55/',
'http://cs.ganji.com/fang12/o56/',
'http://cs.ganji.com/fang12/o57/',
'http://cs.ganji.com/fang12/o58/',
'http://cs.ganji.com/fang12/o59/',
'http://cs.ganji.com/fang12/o60/',
'http://cs.ganji.com/fang12/o61/',
'http://cs.ganji.com/fang12/o62/',
'http://cs.ganji.com/fang12/o63/',
'http://cs.ganji.com/fang12/o64/',
'http://cs.ganji.com/fang12/o65/',
'http://cs.ganji.com/fang12/o66/',
'http://cs.ganji.com/fang12/o67/',
'http://cs.ganji.com/fang12/o68/',
'http://cs.ganji.com/fang12/o69/',
'http://cs.ganji.com/fang12/o70/'
]
ershoufangURL = [
'http://cs.ganji.com/fang5/o1/',
'http://cs.ganji.com/fang5/o2/',
'http://cs.ganji.com/fang5/o3/',
'http://cs.ganji.com/fang5/o4/',
'http://cs.ganji.com/fang5/o5/',
'http://cs.ganji.com/fang5/o6/',
'http://cs.ganji.com/fang5/o7/',
'http://cs.ganji.com/fang5/o8/',
'http://cs.ganji.com/fang5/o9/',
'http://cs.ganji.com/fang5/o10/',
'http://cs.ganji.com/fang5/o11/',
'http://cs.ganji.com/fang5/o12/',
'http://cs.ganji.com/fang5/o13/',
'http://cs.ganji.com/fang5/o14/',
'http://cs.ganji.com/fang5/o15/',
'http://cs.ganji.com/fang5/o16/',
'http://cs.ganji.com/fang5/o17/',
'http://cs.ganji.com/fang5/o18/',
'http://cs.ganji.com/fang5/o19/',
'http://cs.ganji.com/fang5/o20/',
'http://cs.ganji.com/fang5/o21/',
'http://cs.ganji.com/fang5/o22/',
'http://cs.ganji.com/fang5/o23/',
'http://cs.ganji.com/fang5/o24/',
'http://cs.ganji.com/fang5/o25/',
'http://cs.ganji.com/fang5/o26/',
'http://cs.ganji.com/fang5/o27/',
'http://cs.ganji.com/fang5/o28/',
'http://cs.ganji.com/fang5/o29/',
'http://cs.ganji.com/fang5/o30/',
'http://cs.ganji.com/fang5/o31/',
'http://cs.ganji.com/fang5/o32/',
'http://cs.ganji.com/fang5/o33/',
'http://cs.ganji.com/fang5/o34/',
'http://cs.ganji.com/fang5/o35/',
'http://cs.ganji.com/fang5/o36/',
'http://cs.ganji.com/fang5/o37/',
'http://cs.ganji.com/fang5/o38/',
'http://cs.ganji.com/fang5/o39/',
'http://cs.ganji.com/fang5/o40/',
'http://cs.ganji.com/fang5/o41/',
'http://cs.ganji.com/fang5/o42/',
'http://cs.ganji.com/fang5/o43/',
'http://cs.ganji.com/fang5/o44/',
'http://cs.ganji.com/fang5/o45/',
'http://cs.ganji.com/fang5/o46/',
'http://cs.ganji.com/fang5/o47/',
'http://cs.ganji.com/fang5/o48/',
'http://cs.ganji.com/fang5/o49/',
'http://cs.ganji.com/fang5/o50/',
'http://cs.ganji.com/fang5/o51/',
'http://cs.ganji.com/fang5/o52/',
'http://cs.ganji.com/fang5/o53/',
'http://cs.ganji.com/fang5/o54/',
'http://cs.ganji.com/fang5/o55/',
'http://cs.ganji.com/fang5/o56/',
'http://cs.ganji.com/fang5/o57/',
'http://cs.ganji.com/fang5/o58/',
'http://cs.ganji.com/fang5/o59/',
'http://cs.ganji.com/fang5/o60/',
'http://cs.ganji.com/fang5/o61/',
'http://cs.ganji.com/fang5/o62/',
'http://cs.ganji.com/fang5/o63/',
'http://cs.ganji.com/fang5/o64/',
'http://cs.ganji.com/fang5/o65/',
'http://cs.ganji.com/fang5/o66/',
'http://cs.ganji.com/fang5/o67/',
'http://cs.ganji.com/fang5/o68/',
'http://cs.ganji.com/fang5/o69/',
'http://cs.ganji.com/fang5/o70/'
]
zufangURL = [
'http://cs.ganji.com/fang1/o1/',
'http://cs.ganji.com/fang1/o2/',
'http://cs.ganji.com/fang1/o3/',
'http://cs.ganji.com/fang1/o4/',
'http://cs.ganji.com/fang1/o5/',
'http://cs.ganji.com/fang1/o6/',
'http://cs.ganji.com/fang1/o7/',
'http://cs.ganji.com/fang1/o8/',
'http://cs.ganji.com/fang1/o9/',
'http://cs.ganji.com/fang1/o10/',
'http://cs.ganji.com/fang1/o11/',
'http://cs.ganji.com/fang1/o12/',
'http://cs.ganji.com/fang1/o13/',
'http://cs.ganji.com/fang1/o14/',
'http://cs.ganji.com/fang1/o15/',
'http://cs.ganji.com/fang1/o16/',
'http://cs.ganji.com/fang1/o17/',
'http://cs.ganji.com/fang1/o18/',
'http://cs.ganji.com/fang1/o19/',
'http://cs.ganji.com/fang1/o20/',
'http://cs.ganji.com/fang1/o21/',
'http://cs.ganji.com/fang1/o22/',
'http://cs.ganji.com/fang1/o23/',
'http://cs.ganji.com/fang1/o24/',
'http://cs.ganji.com/fang1/o25/',
'http://cs.ganji.com/fang1/o26/',
'http://cs.ganji.com/fang1/o27/',
'http://cs.ganji.com/fang1/o28/',
'http://cs.ganji.com/fang1/o29/',
'http://cs.ganji.com/fang1/o30/',
'http://cs.ganji.com/fang1/o31/',
'http://cs.ganji.com/fang1/o32/',
'http://cs.ganji.com/fang1/o33/',
'http://cs.ganji.com/fang1/o34/',
'http://cs.ganji.com/fang1/o35/',
'http://cs.ganji.com/fang1/o36/',
'http://cs.ganji.com/fang1/o37/',
'http://cs.ganji.com/fang1/o38/',
'http://cs.ganji.com/fang1/o39/',
'http://cs.ganji.com/fang1/o40/',
'http://cs.ganji.com/fang1/o41/',
'http://cs.ganji.com/fang1/o42/',
'http://cs.ganji.com/fang1/o43/',
'http://cs.ganji.com/fang1/o44/',
'http://cs.ganji.com/fang1/o45/',
'http://cs.ganji.com/fang1/o46/',
'http://cs.ganji.com/fang1/o47/',
'http://cs.ganji.com/fang1/o48/',
'http://cs.ganji.com/fang1/o49/',
'http://cs.ganji.com/fang1/o50/',
'http://cs.ganji.com/fang1/o51/',
'http://cs.ganji.com/fang1/o52/',
'http://cs.ganji.com/fang1/o53/',
'http://cs.ganji.com/fang1/o54/',
'http://cs.ganji.com/fang1/o55/',
'http://cs.ganji.com/fang1/o56/',
'http://cs.ganji.com/fang1/o57/',
'http://cs.ganji.com/fang1/o58/',
'http://cs.ganji.com/fang1/o59/',
'http://cs.ganji.com/fang1/o60/',
'http://cs.ganji.com/fang1/o61/',
'http://cs.ganji.com/fang1/o62/',
'http://cs.ganji.com/fang1/o63/',
'http://cs.ganji.com/fang1/o64/',
'http://cs.ganji.com/fang1/o65/',
'http://cs.ganji.com/fang1/o66/',
'http://cs.ganji.com/fang1/o67/',
'http://cs.ganji.com/fang1/o68/',
'http://cs.ganji.com/fang1/o69/',
'http://cs.ganji.com/fang1/o70/'
]
| class Starturl:
xinfang_url = ['http://cs.ganji.com/fang12/o1/', 'http://cs.ganji.com/fang12/o2/', 'http://cs.ganji.com/fang12/o3/', 'http://cs.ganji.com/fang12/o4/', 'http://cs.ganji.com/fang12/o5/', 'http://cs.ganji.com/fang12/o6/', 'http://cs.ganji.com/fang12/o7/', 'http://cs.ganji.com/fang12/o8/', 'http://cs.ganji.com/fang12/o9/', 'http://cs.ganji.com/fang12/o10/', 'http://cs.ganji.com/fang12/o11/', 'http://cs.ganji.com/fang12/o12/', 'http://cs.ganji.com/fang12/o13/', 'http://cs.ganji.com/fang12/o14/', 'http://cs.ganji.com/fang12/o15/', 'http://cs.ganji.com/fang12/o16/', 'http://cs.ganji.com/fang12/o17/', 'http://cs.ganji.com/fang12/o18/', 'http://cs.ganji.com/fang12/o19/', 'http://cs.ganji.com/fang12/o20/', 'http://cs.ganji.com/fang12/o21/', 'http://cs.ganji.com/fang12/o22/', 'http://cs.ganji.com/fang12/o23/', 'http://cs.ganji.com/fang12/o24/', 'http://cs.ganji.com/fang12/o25/', 'http://cs.ganji.com/fang12/o26/', 'http://cs.ganji.com/fang12/o27/', 'http://cs.ganji.com/fang12/o28/', 'http://cs.ganji.com/fang12/o29/', 'http://cs.ganji.com/fang12/o30/', 'http://cs.ganji.com/fang12/o31/', 'http://cs.ganji.com/fang12/o32/', 'http://cs.ganji.com/fang12/o33/', 'http://cs.ganji.com/fang12/o34/', 'http://cs.ganji.com/fang12/o35/', 'http://cs.ganji.com/fang12/o36/', 'http://cs.ganji.com/fang12/o37/', 'http://cs.ganji.com/fang12/o38/', 'http://cs.ganji.com/fang12/o39/', 'http://cs.ganji.com/fang12/o40/', 'http://cs.ganji.com/fang12/o41/', 'http://cs.ganji.com/fang12/o42/', 'http://cs.ganji.com/fang12/o43/', 'http://cs.ganji.com/fang12/o44/', 'http://cs.ganji.com/fang12/o45/', 'http://cs.ganji.com/fang12/o46/', 'http://cs.ganji.com/fang12/o47/', 'http://cs.ganji.com/fang12/o48/', 'http://cs.ganji.com/fang12/o49/', 'http://cs.ganji.com/fang12/o50/', 'http://cs.ganji.com/fang12/o51/', 'http://cs.ganji.com/fang12/o52/', 'http://cs.ganji.com/fang12/o53/', 'http://cs.ganji.com/fang12/o54/', 'http://cs.ganji.com/fang12/o55/', 'http://cs.ganji.com/fang12/o56/', 'http://cs.ganji.com/fang12/o57/', 'http://cs.ganji.com/fang12/o58/', 'http://cs.ganji.com/fang12/o59/', 'http://cs.ganji.com/fang12/o60/', 'http://cs.ganji.com/fang12/o61/', 'http://cs.ganji.com/fang12/o62/', 'http://cs.ganji.com/fang12/o63/', 'http://cs.ganji.com/fang12/o64/', 'http://cs.ganji.com/fang12/o65/', 'http://cs.ganji.com/fang12/o66/', 'http://cs.ganji.com/fang12/o67/', 'http://cs.ganji.com/fang12/o68/', 'http://cs.ganji.com/fang12/o69/', 'http://cs.ganji.com/fang12/o70/']
ershoufang_url = ['http://cs.ganji.com/fang5/o1/', 'http://cs.ganji.com/fang5/o2/', 'http://cs.ganji.com/fang5/o3/', 'http://cs.ganji.com/fang5/o4/', 'http://cs.ganji.com/fang5/o5/', 'http://cs.ganji.com/fang5/o6/', 'http://cs.ganji.com/fang5/o7/', 'http://cs.ganji.com/fang5/o8/', 'http://cs.ganji.com/fang5/o9/', 'http://cs.ganji.com/fang5/o10/', 'http://cs.ganji.com/fang5/o11/', 'http://cs.ganji.com/fang5/o12/', 'http://cs.ganji.com/fang5/o13/', 'http://cs.ganji.com/fang5/o14/', 'http://cs.ganji.com/fang5/o15/', 'http://cs.ganji.com/fang5/o16/', 'http://cs.ganji.com/fang5/o17/', 'http://cs.ganji.com/fang5/o18/', 'http://cs.ganji.com/fang5/o19/', 'http://cs.ganji.com/fang5/o20/', 'http://cs.ganji.com/fang5/o21/', 'http://cs.ganji.com/fang5/o22/', 'http://cs.ganji.com/fang5/o23/', 'http://cs.ganji.com/fang5/o24/', 'http://cs.ganji.com/fang5/o25/', 'http://cs.ganji.com/fang5/o26/', 'http://cs.ganji.com/fang5/o27/', 'http://cs.ganji.com/fang5/o28/', 'http://cs.ganji.com/fang5/o29/', 'http://cs.ganji.com/fang5/o30/', 'http://cs.ganji.com/fang5/o31/', 'http://cs.ganji.com/fang5/o32/', 'http://cs.ganji.com/fang5/o33/', 'http://cs.ganji.com/fang5/o34/', 'http://cs.ganji.com/fang5/o35/', 'http://cs.ganji.com/fang5/o36/', 'http://cs.ganji.com/fang5/o37/', 'http://cs.ganji.com/fang5/o38/', 'http://cs.ganji.com/fang5/o39/', 'http://cs.ganji.com/fang5/o40/', 'http://cs.ganji.com/fang5/o41/', 'http://cs.ganji.com/fang5/o42/', 'http://cs.ganji.com/fang5/o43/', 'http://cs.ganji.com/fang5/o44/', 'http://cs.ganji.com/fang5/o45/', 'http://cs.ganji.com/fang5/o46/', 'http://cs.ganji.com/fang5/o47/', 'http://cs.ganji.com/fang5/o48/', 'http://cs.ganji.com/fang5/o49/', 'http://cs.ganji.com/fang5/o50/', 'http://cs.ganji.com/fang5/o51/', 'http://cs.ganji.com/fang5/o52/', 'http://cs.ganji.com/fang5/o53/', 'http://cs.ganji.com/fang5/o54/', 'http://cs.ganji.com/fang5/o55/', 'http://cs.ganji.com/fang5/o56/', 'http://cs.ganji.com/fang5/o57/', 'http://cs.ganji.com/fang5/o58/', 'http://cs.ganji.com/fang5/o59/', 'http://cs.ganji.com/fang5/o60/', 'http://cs.ganji.com/fang5/o61/', 'http://cs.ganji.com/fang5/o62/', 'http://cs.ganji.com/fang5/o63/', 'http://cs.ganji.com/fang5/o64/', 'http://cs.ganji.com/fang5/o65/', 'http://cs.ganji.com/fang5/o66/', 'http://cs.ganji.com/fang5/o67/', 'http://cs.ganji.com/fang5/o68/', 'http://cs.ganji.com/fang5/o69/', 'http://cs.ganji.com/fang5/o70/']
zufang_url = ['http://cs.ganji.com/fang1/o1/', 'http://cs.ganji.com/fang1/o2/', 'http://cs.ganji.com/fang1/o3/', 'http://cs.ganji.com/fang1/o4/', 'http://cs.ganji.com/fang1/o5/', 'http://cs.ganji.com/fang1/o6/', 'http://cs.ganji.com/fang1/o7/', 'http://cs.ganji.com/fang1/o8/', 'http://cs.ganji.com/fang1/o9/', 'http://cs.ganji.com/fang1/o10/', 'http://cs.ganji.com/fang1/o11/', 'http://cs.ganji.com/fang1/o12/', 'http://cs.ganji.com/fang1/o13/', 'http://cs.ganji.com/fang1/o14/', 'http://cs.ganji.com/fang1/o15/', 'http://cs.ganji.com/fang1/o16/', 'http://cs.ganji.com/fang1/o17/', 'http://cs.ganji.com/fang1/o18/', 'http://cs.ganji.com/fang1/o19/', 'http://cs.ganji.com/fang1/o20/', 'http://cs.ganji.com/fang1/o21/', 'http://cs.ganji.com/fang1/o22/', 'http://cs.ganji.com/fang1/o23/', 'http://cs.ganji.com/fang1/o24/', 'http://cs.ganji.com/fang1/o25/', 'http://cs.ganji.com/fang1/o26/', 'http://cs.ganji.com/fang1/o27/', 'http://cs.ganji.com/fang1/o28/', 'http://cs.ganji.com/fang1/o29/', 'http://cs.ganji.com/fang1/o30/', 'http://cs.ganji.com/fang1/o31/', 'http://cs.ganji.com/fang1/o32/', 'http://cs.ganji.com/fang1/o33/', 'http://cs.ganji.com/fang1/o34/', 'http://cs.ganji.com/fang1/o35/', 'http://cs.ganji.com/fang1/o36/', 'http://cs.ganji.com/fang1/o37/', 'http://cs.ganji.com/fang1/o38/', 'http://cs.ganji.com/fang1/o39/', 'http://cs.ganji.com/fang1/o40/', 'http://cs.ganji.com/fang1/o41/', 'http://cs.ganji.com/fang1/o42/', 'http://cs.ganji.com/fang1/o43/', 'http://cs.ganji.com/fang1/o44/', 'http://cs.ganji.com/fang1/o45/', 'http://cs.ganji.com/fang1/o46/', 'http://cs.ganji.com/fang1/o47/', 'http://cs.ganji.com/fang1/o48/', 'http://cs.ganji.com/fang1/o49/', 'http://cs.ganji.com/fang1/o50/', 'http://cs.ganji.com/fang1/o51/', 'http://cs.ganji.com/fang1/o52/', 'http://cs.ganji.com/fang1/o53/', 'http://cs.ganji.com/fang1/o54/', 'http://cs.ganji.com/fang1/o55/', 'http://cs.ganji.com/fang1/o56/', 'http://cs.ganji.com/fang1/o57/', 'http://cs.ganji.com/fang1/o58/', 'http://cs.ganji.com/fang1/o59/', 'http://cs.ganji.com/fang1/o60/', 'http://cs.ganji.com/fang1/o61/', 'http://cs.ganji.com/fang1/o62/', 'http://cs.ganji.com/fang1/o63/', 'http://cs.ganji.com/fang1/o64/', 'http://cs.ganji.com/fang1/o65/', 'http://cs.ganji.com/fang1/o66/', 'http://cs.ganji.com/fang1/o67/', 'http://cs.ganji.com/fang1/o68/', 'http://cs.ganji.com/fang1/o69/', 'http://cs.ganji.com/fang1/o70/'] |
# File: hackerone_consts.py
# Copyright (c) 2020-2021 Splunk Inc.
#
# Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
#
# Constants for actions
ACTION_ID_GET_ALL = 'get_reports'
ACTION_ID_GET_UPDATED = 'get_updated_reports'
ACTION_ID_GET_ONE = 'get_report'
ACTION_ID_UPDATE = 'update_id'
ACTION_ID_UNASSIGN = 'unassign'
ACTION_ID_ON_POLL = 'on_poll'
ACTION_ID_TEST = 'test_asset_connectivity'
ACTION_ID_GET_BOUNTY_BALANCE = 'get_bounty_balance'
ACTION_ID_GET_BILLING_TRANSACTIONS = 'get_billing_transactions'
# Constants for error messages
ERR_CODE_MSG = "Error code unavailable"
ERR_MSG_UNAVAILABLE = "Error message unavailable. Please check the asset configuration and|or action parameters"
PARSE_ERR_MSG = "Unable to parse the error message. Please check the asset configuration and|or action parameters"
TYPE_ERR_MSG = "Error occurred while connecting to the HackerOne Server. Please check the asset configuration and|or the action parameters"
INT_VALIDATION_ERR_MSG = "Please provide a valid integer value in the {}"
NEG_INT_VALIDATION_ERR_MSG = "Please provide a valid non-negative integer value in the {}"
# Constants for params
RANGE_KEY = "'range' action parameter"
CONTAINER_COUNT_KEY = "'container_count' action parameter"
| action_id_get_all = 'get_reports'
action_id_get_updated = 'get_updated_reports'
action_id_get_one = 'get_report'
action_id_update = 'update_id'
action_id_unassign = 'unassign'
action_id_on_poll = 'on_poll'
action_id_test = 'test_asset_connectivity'
action_id_get_bounty_balance = 'get_bounty_balance'
action_id_get_billing_transactions = 'get_billing_transactions'
err_code_msg = 'Error code unavailable'
err_msg_unavailable = 'Error message unavailable. Please check the asset configuration and|or action parameters'
parse_err_msg = 'Unable to parse the error message. Please check the asset configuration and|or action parameters'
type_err_msg = 'Error occurred while connecting to the HackerOne Server. Please check the asset configuration and|or the action parameters'
int_validation_err_msg = 'Please provide a valid integer value in the {}'
neg_int_validation_err_msg = 'Please provide a valid non-negative integer value in the {}'
range_key = "'range' action parameter"
container_count_key = "'container_count' action parameter" |
# -*- coding: utf-8 -*-
# Author: Daniel Yang <daniel.yj.yang@gmail.com>
#
# License: BSD-3-Clause
__version__ = "0.0.6"
__license__ = "BSD-3-Clause License"
| __version__ = '0.0.6'
__license__ = 'BSD-3-Clause License' |
##n=int(input("enter a number:"))
##i=1
##
##count=0
##while(i<n):
## if(n%i==0):
## count=count+1
##
## i=i+1
##if(count<=2):
## print("prime")
##else:
## print("not")
i=2
j=2
while(i<=10):
while(j<i):
if(i%j==0):
break;
else:
print(i)
j+=1
i+=1
| i = 2
j = 2
while i <= 10:
while j < i:
if i % j == 0:
break
else:
print(i)
j += 1
i += 1 |
for m in range(1,1000):
for n in range(m+1,1000):
c=1000-m-n
if c**2==(m**2+n**2):
print('The individual numbers a,b,c respectively are',m,n,c,'the product of abc is',m*n*c)
| for m in range(1, 1000):
for n in range(m + 1, 1000):
c = 1000 - m - n
if c ** 2 == m ** 2 + n ** 2:
print('The individual numbers a,b,c respectively are', m, n, c, 'the product of abc is', m * n * c) |
{
'target_defaults': {
'includes': ['../common-mk/common.gypi'],
'variables': {
'deps': [
'protobuf',
],
},
},
'targets': [
{
'target_name': 'media_perception_protos',
'type': 'static_library',
'variables': {
'proto_in_dir': 'proto/',
'proto_out_dir': 'include/media_perception',
},
'sources': [
'<(proto_in_dir)/device_management.proto',
'<(proto_in_dir)/pipeline.proto',
],
'includes': ['../common-mk/protoc.gypi'],
},
{
'target_name': 'media_perception_mojo_bindings',
'type': 'static_library',
'sources': [
'mojom/color_space.mojom',
'mojom/constants.mojom',
'mojom/device.mojom',
'mojom/device_factory.mojom',
'mojom/device_management.mojom',
'mojom/geometry.mojom',
'mojom/image_capture.mojom',
'mojom/mailbox.mojom',
'mojom/mailbox_holder.mojom',
'mojom/media_perception.mojom',
'mojom/media_perception_service.mojom',
'mojom/pipeline.mojom',
'mojom/producer.mojom',
'mojom/receiver.mojom',
'mojom/scoped_access_permission.mojom',
'mojom/shared_memory.mojom',
'mojom/sync_token.mojom',
'mojom/time.mojom',
'mojom/values.mojom',
'mojom/video_capture_types.mojom',
'mojom/virtual_device.mojom',
],
'includes': ['../common-mk/mojom_bindings_generator.gypi'],
},
{
'target_name': 'media_perception_service_lib',
'type': 'static_library',
'variables': {
'exported_deps': [
'libchrome-<(libbase_ver)',
'libbrillo-<(libbase_ver)',
'libmojo-<(libbase_ver)',
],
'deps': ['<@(exported_deps)'],
},
'dependencies': [
'media_perception_mojo_bindings',
'media_perception_protos',
],
'all_dependent_settings': {
'variables': {
'deps': [
'<@(exported_deps)',
],
},
},
'sources': [
'cras_client_impl.cc',
'media_perception_controller_impl.cc',
'media_perception_impl.cc',
'media_perception_service_impl.cc',
'mojo_connector.cc',
'producer_impl.cc',
'proto_mojom_conversion.cc',
'receiver_impl.cc',
'shared_memory_provider.cc',
'video_capture_service_client_impl.cc',
],
'direct_dependent_settings': {
'cflags': [
'<!@(<(pkg-config) --cflags libcras)',
'<!@(<(pkg-config) --cflags dbus-1)',
],
},
'link_settings': {
'ldflags': [
'<!@(<(pkg-config) --libs-only-L --libs-only-other libcras)',
'<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
],
'libraries': [
'<!@(<(pkg-config) --libs-only-l libcras)',
'<!@(<(pkg-config) --libs-only-l dbus-1)',
],
},
},
{
'target_name': 'rtanalytics_main',
'type': 'executable',
'dependencies': [
'media_perception_service_lib',
],
'sources': ['main.cc'],
'link_settings': {
'ldflags': [
'-L .',
],
'libraries': [
'-lrtanalytics -ldl',
],
},
},
],
'conditions': [
['USE_test == 1', {
'targets': [
{
'target_name': 'media_perception_service_test',
'type': 'executable',
'includes': ['../common-mk/common_test.gypi'],
'dependencies': ['media_perception_service_lib'],
'sources': [
'../common-mk/testrunner.cc',
'proto_mojom_conversion_test.cc',
],
},
],
}],
],
}
| {'target_defaults': {'includes': ['../common-mk/common.gypi'], 'variables': {'deps': ['protobuf']}}, 'targets': [{'target_name': 'media_perception_protos', 'type': 'static_library', 'variables': {'proto_in_dir': 'proto/', 'proto_out_dir': 'include/media_perception'}, 'sources': ['<(proto_in_dir)/device_management.proto', '<(proto_in_dir)/pipeline.proto'], 'includes': ['../common-mk/protoc.gypi']}, {'target_name': 'media_perception_mojo_bindings', 'type': 'static_library', 'sources': ['mojom/color_space.mojom', 'mojom/constants.mojom', 'mojom/device.mojom', 'mojom/device_factory.mojom', 'mojom/device_management.mojom', 'mojom/geometry.mojom', 'mojom/image_capture.mojom', 'mojom/mailbox.mojom', 'mojom/mailbox_holder.mojom', 'mojom/media_perception.mojom', 'mojom/media_perception_service.mojom', 'mojom/pipeline.mojom', 'mojom/producer.mojom', 'mojom/receiver.mojom', 'mojom/scoped_access_permission.mojom', 'mojom/shared_memory.mojom', 'mojom/sync_token.mojom', 'mojom/time.mojom', 'mojom/values.mojom', 'mojom/video_capture_types.mojom', 'mojom/virtual_device.mojom'], 'includes': ['../common-mk/mojom_bindings_generator.gypi']}, {'target_name': 'media_perception_service_lib', 'type': 'static_library', 'variables': {'exported_deps': ['libchrome-<(libbase_ver)', 'libbrillo-<(libbase_ver)', 'libmojo-<(libbase_ver)'], 'deps': ['<@(exported_deps)']}, 'dependencies': ['media_perception_mojo_bindings', 'media_perception_protos'], 'all_dependent_settings': {'variables': {'deps': ['<@(exported_deps)']}}, 'sources': ['cras_client_impl.cc', 'media_perception_controller_impl.cc', 'media_perception_impl.cc', 'media_perception_service_impl.cc', 'mojo_connector.cc', 'producer_impl.cc', 'proto_mojom_conversion.cc', 'receiver_impl.cc', 'shared_memory_provider.cc', 'video_capture_service_client_impl.cc'], 'direct_dependent_settings': {'cflags': ['<!@(<(pkg-config) --cflags libcras)', '<!@(<(pkg-config) --cflags dbus-1)']}, 'link_settings': {'ldflags': ['<!@(<(pkg-config) --libs-only-L --libs-only-other libcras)', '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)'], 'libraries': ['<!@(<(pkg-config) --libs-only-l libcras)', '<!@(<(pkg-config) --libs-only-l dbus-1)']}}, {'target_name': 'rtanalytics_main', 'type': 'executable', 'dependencies': ['media_perception_service_lib'], 'sources': ['main.cc'], 'link_settings': {'ldflags': ['-L .'], 'libraries': ['-lrtanalytics -ldl']}}], 'conditions': [['USE_test == 1', {'targets': [{'target_name': 'media_perception_service_test', 'type': 'executable', 'includes': ['../common-mk/common_test.gypi'], 'dependencies': ['media_perception_service_lib'], 'sources': ['../common-mk/testrunner.cc', 'proto_mojom_conversion_test.cc']}]}]]} |
class Solution:
def canReach(self, arr: List[int], start: int) -> bool:
# bastardized version of DFS
# if we are out of bounds return false
# else check to left and right
# same idea as sinking islands where we remove visited for current recurse
left, right = 0, len(arr)
def dfs(i):
if (i < left or i >= right or arr[i] < 0):
return False
if arr[i] == 0:
return True
arr[i] = -arr[i]
poss1 = dfs(i - arr[i])
poss2 = dfs(i + arr[i])
arr[i] = -arr[i]
return poss1 or poss2
return dfs(start)
| class Solution:
def can_reach(self, arr: List[int], start: int) -> bool:
(left, right) = (0, len(arr))
def dfs(i):
if i < left or i >= right or arr[i] < 0:
return False
if arr[i] == 0:
return True
arr[i] = -arr[i]
poss1 = dfs(i - arr[i])
poss2 = dfs(i + arr[i])
arr[i] = -arr[i]
return poss1 or poss2
return dfs(start) |
class Queue:
def __init__(self, maxsize):
self.__max_size = maxsize
self.__elements = [None] * self.__max_size
self.__rear = -1
self.__front = 0
def getMaxSize(self):
return self.__max_size
def isFull(self):
return self.__rear == self.__max_size
def isEmpty(self):
if self.__rear == -1 or self.__front == self.__max_size:
return True
else:
return False
def enqueue(self, data):
if self.isFull():
print('Queue is full')
else:
self.__rear += 1
self.__elements[self.__rear] = data
def dequeue(self):
if self.isEmpty():
print('Queue is empty.')
else:
data = self.__elements[self.__front]
self.__front += 1
return data
def display(self):
if not self.isEmpty():
for i in range(self.__front, (self.__rear + 1)):
print(self.__elements[i])
else:
print('Empty queue.')
def __str__(self):
msg = []
index = self.__front
while index <= self.__rear:
msg.append(str(self.__elements[index]))
index += 1
msg = ' '.join(msg)
msg = f'Queue data (from front to rear) : {msg}'
return msg
if __name__ == '__main__':
queue = Queue(5)
queue.enqueue('A')
queue.enqueue('B')
queue.enqueue('C')
queue.enqueue('D')
queue.enqueue('E')
print(queue)
print('Dequeued: ', queue.dequeue())
print('Dequeued: ', queue.dequeue())
print('Dequeued: ', queue.dequeue())
print('Dequeued: ', queue.dequeue())
print('Dequeued: ', queue.dequeue())
print('Dequeued: ', queue.dequeue())
queue.display() | class Queue:
def __init__(self, maxsize):
self.__max_size = maxsize
self.__elements = [None] * self.__max_size
self.__rear = -1
self.__front = 0
def get_max_size(self):
return self.__max_size
def is_full(self):
return self.__rear == self.__max_size
def is_empty(self):
if self.__rear == -1 or self.__front == self.__max_size:
return True
else:
return False
def enqueue(self, data):
if self.isFull():
print('Queue is full')
else:
self.__rear += 1
self.__elements[self.__rear] = data
def dequeue(self):
if self.isEmpty():
print('Queue is empty.')
else:
data = self.__elements[self.__front]
self.__front += 1
return data
def display(self):
if not self.isEmpty():
for i in range(self.__front, self.__rear + 1):
print(self.__elements[i])
else:
print('Empty queue.')
def __str__(self):
msg = []
index = self.__front
while index <= self.__rear:
msg.append(str(self.__elements[index]))
index += 1
msg = ' '.join(msg)
msg = f'Queue data (from front to rear) : {msg}'
return msg
if __name__ == '__main__':
queue = queue(5)
queue.enqueue('A')
queue.enqueue('B')
queue.enqueue('C')
queue.enqueue('D')
queue.enqueue('E')
print(queue)
print('Dequeued: ', queue.dequeue())
print('Dequeued: ', queue.dequeue())
print('Dequeued: ', queue.dequeue())
print('Dequeued: ', queue.dequeue())
print('Dequeued: ', queue.dequeue())
print('Dequeued: ', queue.dequeue())
queue.display() |
def HammingDistance(p, q):
mm = [p[i] != q[i] for i in range(len(p))]
return sum(mm)
# def ImmediateNeighbors(Pattern):
# Neighborhood = [Pattern]
# for i in range(len(Pattern)):
# nuc = Pattern[i]
# for nuc2 in ['A', 'C', 'G', 'T']:
# if nuc != nuc2:
# pat = list(Pattern)
# pat[i] = nuc2
# Neighborhood.append(''.join(pat))
# return Neighborhood
def Neighbors(Pattern, d):
if d == 0:
return Pattern
if len(Pattern) == 1:
return ['A', 'C', 'G', 'T']
Neighborhood = set()
SuffixNeighbors = Neighbors(Pattern[1:], d)
for Text in SuffixNeighbors:
if HammingDistance(Pattern[1:], Text) < d:
for nuc in ['A', 'C', 'G', 'T']:
Neighborhood.add(nuc + Text)
else:
Neighborhood.add(Pattern[0] + Text)
return Neighborhood
def FrequentWordsWithMismatches(Text, k, d):
pattern_dict = {}
max_val = -1
for i in range(len(Text) - k + 1):
Pattern = Text[i:i+k]
Neighborhood = Neighbors(Pattern, d)
for ApproximatePattern in Neighborhood:
if ApproximatePattern in pattern_dict.keys():
pattern_dict[ApproximatePattern] += 1
if pattern_dict[ApproximatePattern] > max_val:
max_val = pattern_dict[ApproximatePattern]
else:
pattern_dict[ApproximatePattern] = 1
if pattern_dict[ApproximatePattern] > max_val:
max_val = pattern_dict[ApproximatePattern]
FrequentPatterns = []
for key, value in pattern_dict.iteritems():
if value == max_val:
FrequentPatterns.append(key)
return FrequentPatterns
FrequentWordsWithMismatches('ATA', 3, 1)
FrequentWordsWithMismatches('GTAAGATGTGCACTGATGTAAGTAAGTAACACTGACGGACGGATGTGGATGTAACACTCACTGTGGACGGATGTGGTAAGACGGTAAGTGCACTGATGACGGTGGTGGATGATGATGTGGATGACGCACTCACTGTAAGTGGATCACTGACGGATGTAAGACGGTGGATGTAAGATGTGGATGATGATGACGCACTGTAAGACGGTAAGTAAGTAAGACGGTGGTGGTGGTAAGACGGTAACACTCACTGTGCACTGACGGATGTAACACTGATCACTCACTGATGTGGTGGTAAGACGGTAAGATGTAAGACGCACTGTGCACTGTAAGATGACGGACGGTGGATCACTGATGACGGTAACACTCACTGACGGTAA', 6, 2) | def hamming_distance(p, q):
mm = [p[i] != q[i] for i in range(len(p))]
return sum(mm)
def neighbors(Pattern, d):
if d == 0:
return Pattern
if len(Pattern) == 1:
return ['A', 'C', 'G', 'T']
neighborhood = set()
suffix_neighbors = neighbors(Pattern[1:], d)
for text in SuffixNeighbors:
if hamming_distance(Pattern[1:], Text) < d:
for nuc in ['A', 'C', 'G', 'T']:
Neighborhood.add(nuc + Text)
else:
Neighborhood.add(Pattern[0] + Text)
return Neighborhood
def frequent_words_with_mismatches(Text, k, d):
pattern_dict = {}
max_val = -1
for i in range(len(Text) - k + 1):
pattern = Text[i:i + k]
neighborhood = neighbors(Pattern, d)
for approximate_pattern in Neighborhood:
if ApproximatePattern in pattern_dict.keys():
pattern_dict[ApproximatePattern] += 1
if pattern_dict[ApproximatePattern] > max_val:
max_val = pattern_dict[ApproximatePattern]
else:
pattern_dict[ApproximatePattern] = 1
if pattern_dict[ApproximatePattern] > max_val:
max_val = pattern_dict[ApproximatePattern]
frequent_patterns = []
for (key, value) in pattern_dict.iteritems():
if value == max_val:
FrequentPatterns.append(key)
return FrequentPatterns
frequent_words_with_mismatches('ATA', 3, 1)
frequent_words_with_mismatches('GTAAGATGTGCACTGATGTAAGTAAGTAACACTGACGGACGGATGTGGATGTAACACTCACTGTGGACGGATGTGGTAAGACGGTAAGTGCACTGATGACGGTGGTGGATGATGATGTGGATGACGCACTCACTGTAAGTGGATCACTGACGGATGTAAGACGGTGGATGTAAGATGTGGATGATGATGACGCACTGTAAGACGGTAAGTAAGTAAGACGGTGGTGGTGGTAAGACGGTAACACTCACTGTGCACTGACGGATGTAACACTGATCACTCACTGATGTGGTGGTAAGACGGTAAGATGTAAGACGCACTGTGCACTGTAAGATGACGGACGGTGGATCACTGATGACGGTAACACTCACTGACGGTAA', 6, 2) |
'''
Description:
Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive).
The binary search tree is guaranteed to have unique values.
Example 1:
Input: root = [10,5,15,3,7,null,18], L = 7, R = 15
Output: 32
Example 2:
Input: root = [10,5,15,3,7,13,18,1,null,6], L = 6, R = 10
Output: 23
Note:
The number of nodes in the tree is at most 10000.
The final answer is guaranteed to be less than 2^31.
'''
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def helper(self, node, arr):
# in-order traversal
if node:
self.helper( node.left, arr )
arr.append( node.val )
self.helper( node.right, arr )
def rangeSumBST(self, root: TreeNode, L: int, R: int) -> int:
arr = []
self.helper(root, arr)
index_of_L, index_of_R = arr.index(L), arr.index(R)
return sum( arr[index_of_L : index_of_R+1] )
# n : the number of node in given binary search tree
## Time Complexity: O( n )
#
# The overhead in time is to traversal the binary search tree within range, which is of O( n )
## Space Complexity: O( n )
#
# The overhead in space is the call stack for recursion and array, arr, which are both of O( n )
def test_bench():
root = TreeNode( 10 )
root.left = TreeNode( 5 )
root.right = TreeNode( 15 )
root.left.left = TreeNode( 3 )
root.left.right = TreeNode( 7 )
root.right.left = None
root.right.right = TreeNode( 18 )
L, R = 7, 15
print( Solution().rangeSumBST(root, L, R) )
return
if __name__ == '__main__':
test_bench() | """
Description:
Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive).
The binary search tree is guaranteed to have unique values.
Example 1:
Input: root = [10,5,15,3,7,null,18], L = 7, R = 15
Output: 32
Example 2:
Input: root = [10,5,15,3,7,13,18,1,null,6], L = 6, R = 10
Output: 23
Note:
The number of nodes in the tree is at most 10000.
The final answer is guaranteed to be less than 2^31.
"""
class Treenode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def helper(self, node, arr):
if node:
self.helper(node.left, arr)
arr.append(node.val)
self.helper(node.right, arr)
def range_sum_bst(self, root: TreeNode, L: int, R: int) -> int:
arr = []
self.helper(root, arr)
(index_of_l, index_of_r) = (arr.index(L), arr.index(R))
return sum(arr[index_of_L:index_of_R + 1])
def test_bench():
root = tree_node(10)
root.left = tree_node(5)
root.right = tree_node(15)
root.left.left = tree_node(3)
root.left.right = tree_node(7)
root.right.left = None
root.right.right = tree_node(18)
(l, r) = (7, 15)
print(solution().rangeSumBST(root, L, R))
return
if __name__ == '__main__':
test_bench() |
# model settings
model = dict(
type='Classification',
pretrained=None,
backbone=dict(
type='MobileNetV3',
arch='large',
out_indices=(16,), # x-1: stage-x
norm_cfg=dict(type='BN', eps=0.001, momentum=0.01),
),
head=dict(
type='ClsHead',
loss=dict(type='CrossEntropyLoss', loss_weight=1.0),
with_avg_pool=True, in_channels=960, num_classes=1000)
)
| model = dict(type='Classification', pretrained=None, backbone=dict(type='MobileNetV3', arch='large', out_indices=(16,), norm_cfg=dict(type='BN', eps=0.001, momentum=0.01)), head=dict(type='ClsHead', loss=dict(type='CrossEntropyLoss', loss_weight=1.0), with_avg_pool=True, in_channels=960, num_classes=1000)) |
# Generate permutations with a space
def permutation_with_space_helper(input_val, output_val):
if len(input_val) == 0:
# Base condition to get a final output once the input string is empty
final.append(output_val)
return
# Store the first element of the string and make decisions on it
temp = input_val[0]
# Recursively calling the fnc including the temp in the output
permutation_with_space_helper(input_val[1:], output_val + temp)
# Recursively calling the fnc including the temp and "_" in the output
permutation_with_space_helper(input_val[1:], output_val + "_" + temp)
def permutation_with_space(input_val):
output_val = ""
# Calling the helper function
for i in range(len(input_val)):
permutation_with_space_helper(input_val[:i] + input_val[i+1:], input_val[i])
final = []
permutation_with_space('abc')
print(final) | def permutation_with_space_helper(input_val, output_val):
if len(input_val) == 0:
final.append(output_val)
return
temp = input_val[0]
permutation_with_space_helper(input_val[1:], output_val + temp)
permutation_with_space_helper(input_val[1:], output_val + '_' + temp)
def permutation_with_space(input_val):
output_val = ''
for i in range(len(input_val)):
permutation_with_space_helper(input_val[:i] + input_val[i + 1:], input_val[i])
final = []
permutation_with_space('abc')
print(final) |
EXAMPLE_DOCS = [ # Collection stored as "docs"
{
'_data': 'one two',
'_type': 'http://sharejs.org/types/textv1',
'_v': 8,
'_m': {
'mtime': 1415654366808,
'ctime': 1415654358668
},
'_id': '26aabd89-541b-5c02-9e6a-ad332ba43118'
},
{
'_data': 'XXX',
'_type': 'http://sharejs.org/types/textv1',
'_v': 4,
'_m': {
'mtime': 1415654385628,
'ctime': 1415654381131
},
'_id': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a'
}
]
EXAMPLE_OPS = [ # Collection stored as "docs_ops"
{
'op': None,
'v': 0,
'src': '94ae709f9736c24d821301de2dfc71df',
'seq': 1,
'create': {
'type': 'http://sharejs.org/types/textv1',
'data': None
},
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654358667
},
'_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v0',
'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'
},
{
'op': [
'o'
],
'v': 1,
'src': '94ae709f9736c24d821301de2dfc71df',
'seq': 2,
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654363751
},
'_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v1',
'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'
},
{
'op': [
1,
'n'
],
'v': 2,
'src': '94ae709f9736c24d821301de2dfc71df',
'seq': 3,
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654363838
},
'_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v2',
'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'
},
{
'op': [
2,
'e'
],
'v': 3,
'src': '94ae709f9736c24d821301de2dfc71df',
'seq': 4,
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654364007
},
'_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v3',
'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'
},
{
'op': [
3,
' '
],
'v': 4,
'src': '94ae709f9736c24d821301de2dfc71df',
'seq': 5,
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654366367
},
'_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v4',
'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'
},
{
'op': [
4,
't'
],
'v': 5,
'src': '94ae709f9736c24d821301de2dfc71df',
'seq': 6,
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654366542
},
'_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v5',
'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'
},
{
'op': [
5,
'w'
],
'v': 6,
'src': '94ae709f9736c24d821301de2dfc71df',
'seq': 7,
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654366678
},
'_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v6',
'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'
},
{
'op': [
6,
'o'
],
'v': 7,
'src': '94ae709f9736c24d821301de2dfc71df',
'seq': 8,
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654366808
},
'_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v7',
'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'
},
{
'op': None,
'v': 0,
'src': '166028c1b14818475eec6fab9720af7b',
'seq': 1,
'create': {
'type': 'http://sharejs.org/types/textv1',
'data': None
},
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654381130
},
'_id': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a v0',
'name': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a'
},
{
'op': [
'X'
],
'v': 1,
'src': '166028c1b14818475eec6fab9720af7b',
'seq': 2,
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654384929
},
'_id': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a v1',
'name': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a'
},
{
'op': [
1,
'X'
],
'v': 2,
'src': '166028c1b14818475eec6fab9720af7b',
'seq': 3,
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654385266
},
'_id': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a v2',
'name': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a'
},
{
'op': [
2,
'X'
],
'v': 3,
'src': '166028c1b14818475eec6fab9720af7b',
'seq': 4,
'preValidate': None,
'validate': None,
'm': {
'ts': 1415654385626
},
'_id': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a v3',
'name': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a'
}
]
EXAMPLE_DOCS_6 = {
'_id': '9a247ce9-b219-5f7d-b2c8-ef31661b38d7',
'data': {
'v': 20,
'meta': {
'mtime': 1413229471447.0,
'ctime': 1413229471447.0,
},
'snapshot': 'one two three four! ',
'type': 'text',
}
}
| example_docs = [{'_data': 'one two', '_type': 'http://sharejs.org/types/textv1', '_v': 8, '_m': {'mtime': 1415654366808, 'ctime': 1415654358668}, '_id': '26aabd89-541b-5c02-9e6a-ad332ba43118'}, {'_data': 'XXX', '_type': 'http://sharejs.org/types/textv1', '_v': 4, '_m': {'mtime': 1415654385628, 'ctime': 1415654381131}, '_id': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a'}]
example_ops = [{'op': None, 'v': 0, 'src': '94ae709f9736c24d821301de2dfc71df', 'seq': 1, 'create': {'type': 'http://sharejs.org/types/textv1', 'data': None}, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654358667}, '_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v0', 'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'}, {'op': ['o'], 'v': 1, 'src': '94ae709f9736c24d821301de2dfc71df', 'seq': 2, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654363751}, '_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v1', 'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'}, {'op': [1, 'n'], 'v': 2, 'src': '94ae709f9736c24d821301de2dfc71df', 'seq': 3, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654363838}, '_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v2', 'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'}, {'op': [2, 'e'], 'v': 3, 'src': '94ae709f9736c24d821301de2dfc71df', 'seq': 4, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654364007}, '_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v3', 'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'}, {'op': [3, ' '], 'v': 4, 'src': '94ae709f9736c24d821301de2dfc71df', 'seq': 5, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654366367}, '_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v4', 'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'}, {'op': [4, 't'], 'v': 5, 'src': '94ae709f9736c24d821301de2dfc71df', 'seq': 6, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654366542}, '_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v5', 'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'}, {'op': [5, 'w'], 'v': 6, 'src': '94ae709f9736c24d821301de2dfc71df', 'seq': 7, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654366678}, '_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v6', 'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'}, {'op': [6, 'o'], 'v': 7, 'src': '94ae709f9736c24d821301de2dfc71df', 'seq': 8, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654366808}, '_id': '26aabd89-541b-5c02-9e6a-ad332ba43118 v7', 'name': '26aabd89-541b-5c02-9e6a-ad332ba43118'}, {'op': None, 'v': 0, 'src': '166028c1b14818475eec6fab9720af7b', 'seq': 1, 'create': {'type': 'http://sharejs.org/types/textv1', 'data': None}, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654381130}, '_id': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a v0', 'name': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a'}, {'op': ['X'], 'v': 1, 'src': '166028c1b14818475eec6fab9720af7b', 'seq': 2, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654384929}, '_id': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a v1', 'name': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a'}, {'op': [1, 'X'], 'v': 2, 'src': '166028c1b14818475eec6fab9720af7b', 'seq': 3, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654385266}, '_id': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a v2', 'name': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a'}, {'op': [2, 'X'], 'v': 3, 'src': '166028c1b14818475eec6fab9720af7b', 'seq': 4, 'preValidate': None, 'validate': None, 'm': {'ts': 1415654385626}, '_id': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a v3', 'name': '9a68120a-d3c5-5ba6-b399-fe39e8f2028a'}]
example_docs_6 = {'_id': '9a247ce9-b219-5f7d-b2c8-ef31661b38d7', 'data': {'v': 20, 'meta': {'mtime': 1413229471447.0, 'ctime': 1413229471447.0}, 'snapshot': 'one two three four! ', 'type': 'text'}} |
def insert_line(file, text, after=None, before=None, past=None, once=True):
with open(file) as f:
lines = iter(f.readlines())
with open(file, 'w') as f:
if past:
for line in lines:
f.write(line)
if re.match(past, line):
break
for line in lines:
if before and re.match(before, line):
f.write(text + '\n')
if once:
f.write(line)
break
f.write(line)
if after and re.match(after, line):
f.write(text + '\n')
if once:
break
for line in lines:
f.write(line)
| def insert_line(file, text, after=None, before=None, past=None, once=True):
with open(file) as f:
lines = iter(f.readlines())
with open(file, 'w') as f:
if past:
for line in lines:
f.write(line)
if re.match(past, line):
break
for line in lines:
if before and re.match(before, line):
f.write(text + '\n')
if once:
f.write(line)
break
f.write(line)
if after and re.match(after, line):
f.write(text + '\n')
if once:
break
for line in lines:
f.write(line) |
count = int(input())
tux = [" _~_ ", " (o o) ", " / V \ ", "/( _ )\\ ", " ^^ ^^ "]
for i in tux:
print(i * count)
| count = int(input())
tux = [' _~_ ', ' (o o) ', ' / V \\ ', '/( _ )\\ ', ' ^^ ^^ ']
for i in tux:
print(i * count) |
class Node():
'''
The DiNode class is specifically designed for altering path search.
- Active and passive out nodes, for easily iteratively find new nodes in path.
- Marks for easy look up edges already visited (earlier Schlaufen) / nodes in path-creation already visited
- The edge-marks have the Schlaufen number saved, such that later a reconstruction of the Schlaufen found is
possible
'''
def __init__(self, id, degree, totalnodes):
self.id = id
self.degree = degree
self.passive_outnodes = set(range(totalnodes))
self.passive_outnodes.remove(id)
self.passive_outnodes_removed_selfloop_crossarrow = 1 # for graph correctness check
self.outnodes = set()
# marks
self.active_visited = False
self.passive_visited = False
# marked edges
self.active_marked = {} # dictionary outarrows as key, number of schlaufe as Value
self.passive_marked = {}
def add_outedge(self, out_node):
self.outnodes.add(out_node)
def add_passive_outedge(self, out_node):
self.passive_outnodes.add(out_node)
def del_outedge(self, out_node):
if not (out_node in self.outnodes):
raise ValueError('outnode subtraction error')
else:
self.outnodes.remove(out_node)
def del_passive_outedge(self, out_node):
if not (out_node in self.passive_outnodes):
raise ValueError('outnode subtraction error')
else:
self.passive_outnodes.remove(out_node)
| class Node:
"""
The DiNode class is specifically designed for altering path search.
- Active and passive out nodes, for easily iteratively find new nodes in path.
- Marks for easy look up edges already visited (earlier Schlaufen) / nodes in path-creation already visited
- The edge-marks have the Schlaufen number saved, such that later a reconstruction of the Schlaufen found is
possible
"""
def __init__(self, id, degree, totalnodes):
self.id = id
self.degree = degree
self.passive_outnodes = set(range(totalnodes))
self.passive_outnodes.remove(id)
self.passive_outnodes_removed_selfloop_crossarrow = 1
self.outnodes = set()
self.active_visited = False
self.passive_visited = False
self.active_marked = {}
self.passive_marked = {}
def add_outedge(self, out_node):
self.outnodes.add(out_node)
def add_passive_outedge(self, out_node):
self.passive_outnodes.add(out_node)
def del_outedge(self, out_node):
if not out_node in self.outnodes:
raise value_error('outnode subtraction error')
else:
self.outnodes.remove(out_node)
def del_passive_outedge(self, out_node):
if not out_node in self.passive_outnodes:
raise value_error('outnode subtraction error')
else:
self.passive_outnodes.remove(out_node) |
class Point2D:
def __init__(self,x,y):
self.x = x
self.y = y
def __eq__(self, value):
return self.x == value.x and self.y == value.y
def __hash__(self):
return hash((self.x,self.y)) | class Point2D:
def __init__(self, x, y):
self.x = x
self.y = y
def __eq__(self, value):
return self.x == value.x and self.y == value.y
def __hash__(self):
return hash((self.x, self.y)) |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def mergeTwoLists(self, a, b):
if a is None:
return b
if b is None:
return a
if a.val > b.val:
a, b = b, a
result = a
result_head = result
a = a.next
while a is not None or b is not None:
a_val = a.val if a is not None else math.inf
b_val = b.val if b is not None else math.inf
if a_val < b_val:
result.next = a
a = a.next
else:
result.next = b
b = b.next
result = result.next
return result_head
| class Solution:
def merge_two_lists(self, a, b):
if a is None:
return b
if b is None:
return a
if a.val > b.val:
(a, b) = (b, a)
result = a
result_head = result
a = a.next
while a is not None or b is not None:
a_val = a.val if a is not None else math.inf
b_val = b.val if b is not None else math.inf
if a_val < b_val:
result.next = a
a = a.next
else:
result.next = b
b = b.next
result = result.next
return result_head |
# DEFAULT_ASSET_URL="https://totogoto.com/assets/python_project/images/"
DEFAULT_ASSET_URL="https://cdn.jsdelivr.net/gh/totogoto/assets/"
DEFAULT_OBJECTS = [
"1",
"2",
"3",
"4",
"5",
"apple_goal",
"apple",
"around3_sol",
"banana_goal",
"banana",
"beeper_goal",
"box_goal",
"box",
"bricks",
"bridge",
"carrot_goal",
"carrot",
"daisy_goal",
"daisy",
"dandelion_goal",
"dandelion",
"desert",
"east_goal",
"east_grid",
"east",
"external_link",
"favicon",
"fence_double",
"fence_left",
"fence_right",
"fence_vertical",
"fire1",
"fire2",
"fire",
"flame1",
"flame2",
"flame3",
"flame4",
"flame5",
"flame6",
"fromage",
"grass_bottom_left",
"grass_bottom_right",
"grass",
"grass_top_left",
"grass_top_right",
"gravel",
"green_home_tile",
"highlight",
"house",
"hurdles",
"ice",
"leaf_goal",
"leaf",
"logs",
"magnifying_no",
"magnifying_yes",
"mailto",
"mort",
"mud",
"north",
"not_ok",
"ok",
"open_program",
"orange_goal",
"orange",
"ouch",
"pale_grass",
"pause",
"plain_e",
"plain_n",
"plain_s",
"plain_w",
"play",
"poison",
"racing_flag",
"racing_flag_small",
"rat_e",
"rat_n",
"rat_s",
"rat_w",
"reeborg_judkis",
"reload",
"resize",
"reverse_step",
"save_program",
"scorpion",
"seed",
"simple_path",
"sp_e",
"sp_n",
"sp_s",
"sp_w",
"square_goal",
"square",
"stalactite2",
"stalactite",
"star_goal",
"star",
"step",
"stop",
"strawberry_goal",
"strawberry",
"student",
"teleport",
"tile_colour",
"token_goal",
"token",
"transparent_tile",
"triangle_goal",
"triangle",
"tulip_goal",
"tulip",
"water2",
"water3",
"water4",
"water5",
"water6",
"water_bucket",
"water",
"east_arrow",
"north_arrow",
"west_arrow",
"south_arrow",
"envelope",
"envelope-30",
"envelope-sprite",
"speech_bubble",
"robot-yellow"
]
DEFAULT_TILE_MAP = {tile: "{}{}.png".format(DEFAULT_ASSET_URL, tile) for tile in DEFAULT_OBJECTS }
| default_asset_url = 'https://cdn.jsdelivr.net/gh/totogoto/assets/'
default_objects = ['1', '2', '3', '4', '5', 'apple_goal', 'apple', 'around3_sol', 'banana_goal', 'banana', 'beeper_goal', 'box_goal', 'box', 'bricks', 'bridge', 'carrot_goal', 'carrot', 'daisy_goal', 'daisy', 'dandelion_goal', 'dandelion', 'desert', 'east_goal', 'east_grid', 'east', 'external_link', 'favicon', 'fence_double', 'fence_left', 'fence_right', 'fence_vertical', 'fire1', 'fire2', 'fire', 'flame1', 'flame2', 'flame3', 'flame4', 'flame5', 'flame6', 'fromage', 'grass_bottom_left', 'grass_bottom_right', 'grass', 'grass_top_left', 'grass_top_right', 'gravel', 'green_home_tile', 'highlight', 'house', 'hurdles', 'ice', 'leaf_goal', 'leaf', 'logs', 'magnifying_no', 'magnifying_yes', 'mailto', 'mort', 'mud', 'north', 'not_ok', 'ok', 'open_program', 'orange_goal', 'orange', 'ouch', 'pale_grass', 'pause', 'plain_e', 'plain_n', 'plain_s', 'plain_w', 'play', 'poison', 'racing_flag', 'racing_flag_small', 'rat_e', 'rat_n', 'rat_s', 'rat_w', 'reeborg_judkis', 'reload', 'resize', 'reverse_step', 'save_program', 'scorpion', 'seed', 'simple_path', 'sp_e', 'sp_n', 'sp_s', 'sp_w', 'square_goal', 'square', 'stalactite2', 'stalactite', 'star_goal', 'star', 'step', 'stop', 'strawberry_goal', 'strawberry', 'student', 'teleport', 'tile_colour', 'token_goal', 'token', 'transparent_tile', 'triangle_goal', 'triangle', 'tulip_goal', 'tulip', 'water2', 'water3', 'water4', 'water5', 'water6', 'water_bucket', 'water', 'east_arrow', 'north_arrow', 'west_arrow', 'south_arrow', 'envelope', 'envelope-30', 'envelope-sprite', 'speech_bubble', 'robot-yellow']
default_tile_map = {tile: '{}{}.png'.format(DEFAULT_ASSET_URL, tile) for tile in DEFAULT_OBJECTS} |
def main():
with open('test.txt','rt') as infile:
test2 = infile.read()
test1 ='This is a test of the emergency text system'
print(test1 == test2)
if __name__ == '__main__':
main()
| def main():
with open('test.txt', 'rt') as infile:
test2 = infile.read()
test1 = 'This is a test of the emergency text system'
print(test1 == test2)
if __name__ == '__main__':
main() |
# Enter your code here. Read input from STDIN. Print output to STDOUT
testCases = int(input())
for i in range(testCases):
word = input()
for j in range(len(word)):
if j%2 == 0:
print(word[j], end='')
print(" ", end="")
for j in range(len(word)):
if j%2 !=0 :
print(word[j], end='')
print('') | test_cases = int(input())
for i in range(testCases):
word = input()
for j in range(len(word)):
if j % 2 == 0:
print(word[j], end='')
print(' ', end='')
for j in range(len(word)):
if j % 2 != 0:
print(word[j], end='')
print('') |
#
# gambit
#
# This file contains the information to make the mesh for a subset of the original point data set.
#
#
# The original data sets are in csv format and are for 6519 observation points.
# 1. `Grav_MeasEs.csv` contains the cartesian coordinates of the observation points (m).
# 2. `Grav_gz.csv` contains the Bouger corrected gravity measurements ( micro m/s^2).
# 3. `Grav_acc.csv` cotains the measurement accuracy (micro m/s^2).
#
big_gravity_data_file = "Grav_gz.csv"
big_acc_data_file = "Grav_acc.csv"
big_obsPts_file = "Grav_MeasEs.csv"
#
# The inversion code has a measurement scale factor so it is not absolutely necessary
# to have the same units for the gravity measurments. The scale factor conversts the
# measurements to m/s^2. It is assumed that the spatial measurements are in m.
#
# The size of the data sets can be reduced. The new arrays contain the first element and
# then in steps of "pick" .
#
pick = 4
#
# The new small data file names
#
gravity_data_file = "Grav_small_gz.csv"
accuracy_data_file = "Grav_small_acc.csv"
obsPts_file = "Grav_small_MeasEs.csv"
#
# Element size at observation points depends on the distance to its nearest neighbour.
# To make the ground variable mesh, the minimum nearest neighbour distance is computed for each observation point
# and recorded in the file
minDist_file = "Grav_small_minDist.csv"
#
#
# GMSH mesh making parameters
#
# A bound for the maximum nearest neighbour distance. This value will be used to compute element size for any point
# that has no nearest neighbour closer.
maxDist = 5000
#
# For each observatio point, element length is, in general
# nearest neighbour distance / spacing0
#
# For nearest neighbour distance < mindist1, element length is,
# nearest neighbour distance / spacing1
#
# For nearest neighbour distance < mindist1, element length is,
# nearest neighbour distance / spacing2
#
mindist1 = 500
mindist2 = 100
spacing0 = 4
spacing1 = 3
spacing2 = 2
#
# The core area is 1.01*span of observation points in the x and y directions.
# Ground level is at 0m and is horizontal. There is a core ground region and core air region.
groundLevel = 0
coreDepth = - 20000
coreAir = 10000
#
# mesh sizes vary.
# Mesh size at the top of the core air region
MCtop = 5000
# Mesh size at the bottom of the core ground region
MCbase = 5000
# mesh size at the core ground region. This is probably over ruled by the mesh size of the observation points.
MCground = 5000
#
# The buffer region has different element lengths.
# Mesh size at the tob of the buffer in the air
MBtop = 20000
# Mesh size at the edge of the buffer region at ground level
MBbase = 20000
# Mesh size at the base of the buffer region.
MBground = 10000
# Name for the geo file.
geo_name = "smallPointMesh.geo"
| big_gravity_data_file = 'Grav_gz.csv'
big_acc_data_file = 'Grav_acc.csv'
big_obs_pts_file = 'Grav_MeasEs.csv'
pick = 4
gravity_data_file = 'Grav_small_gz.csv'
accuracy_data_file = 'Grav_small_acc.csv'
obs_pts_file = 'Grav_small_MeasEs.csv'
min_dist_file = 'Grav_small_minDist.csv'
max_dist = 5000
mindist1 = 500
mindist2 = 100
spacing0 = 4
spacing1 = 3
spacing2 = 2
ground_level = 0
core_depth = -20000
core_air = 10000
m_ctop = 5000
m_cbase = 5000
m_cground = 5000
m_btop = 20000
m_bbase = 20000
m_bground = 10000
geo_name = 'smallPointMesh.geo' |
i = 1
while i < 6:
print(i)
if i == 3:
break
i += 1
i = 1
while i < 6:
print(i)
if i == 3:
continue
i += 1
fruits = ["apple", "banana", "cherry"]
for x in fruits:
print(x)
if x == "banana":
break
fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "banana":
continue
print(x)
| i = 1
while i < 6:
print(i)
if i == 3:
break
i += 1
i = 1
while i < 6:
print(i)
if i == 3:
continue
i += 1
fruits = ['apple', 'banana', 'cherry']
for x in fruits:
print(x)
if x == 'banana':
break
fruits = ['apple', 'banana', 'cherry']
for x in fruits:
if x == 'banana':
continue
print(x) |
def config():
return None
def watch():
return None | def config():
return None
def watch():
return None |
def transposition(key, order, order_name):
new_key = ""
for pos in order:
new_key += key[pos-1]
print("Permuted "+ order_name +" = "+ new_key)
return new_key
def P10(key):
P10_order = [3, 5, 2, 7, 4, 10, 1, 9, 8, 6]
P10_key = transposition(key, P10_order, "P10")
return P10_key
def P8(LS1_key):
P8_order = [6, 3, 7, 4, 8, 5, 10, 9]
P8_key = transposition(LS1_key, P8_order, "P8")
return P8_key
def LS1(P10_key):
P10_key_left = P10_key[:5]
P10_key_right = P10_key[5:]
LS1_key_left = P10_key_left[1:5] + P10_key_left[0]
LS1_key_right = P10_key_right[1:5] + P10_key_right[0]
LS1_key = LS1_key_left+LS1_key_right
#print("LS-1 = " + LS1_key)
return LS1_key
def IP(LS1_key):
IP_order = [2, 6, 3, 1, 4, 8, 5, 7]
IP_key = transposition(LS1_key, IP_order, "IP")
return IP_key
def IP_inv(LS1_key):
IP_inv_order = [4, 1, 3, 5, 7, 2, 8, 6]
IP_inv_key = transposition(LS1_key, IP_inv_order, "IP-1")
return IP_inv_key
def key_gen(key):
LS1_key = LS1(P10(key))
key_1 = P8(LS1_key)
key_2 = P8(LS1(LS1_key))
#print("Key-1:"+ key_1 +"\nKey-2:"+ key_2)
return (key_1,key_2)
def encrypt_plain(plain_text):
enc = IP(plain_text)
dec = IP_inv(enc)
#print("ENC:"+ enc +"\nDEC:"+ dec)
return(enc, dec)
def f_key(enc_plain, SK):
L = enc_plain[:4]
R = enc_plain[4:]
F = F_func(R, SK)
#print(L)
#print(R)
f = A_xor_B(L, SK) + R
#print(f)
return f
def F_func(R, SK):
EP_order = [4, 1, 2, 3, 2, 3, 4, 1]
EP_key = transposition(R, EP_order, "EP")
P = A_xor_B(EP_key, SK)
P4 = s_box(P)
return P4
def A_xor_B(A,B):
bit_xor = ""
for i in range(len(A)):
bit_xor += str ( int(A[i]) ^ int(B[i]) )
#print(bit_xor)
return bit_xor
def s_box(P):
P0 = P[:4]
P1 = P[4:]
S0_order = [[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
S1_order = [[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]
P4_order = [2, 4, 3, 1]
S0 = sbox_calc(P0, S0_order)
S1 = sbox_calc(P1, S1_order)
P4 = transposition( S0+S1, P4_order, "P4" )
#print(P4)
return P4
def sbox_calc(P, S):
row = int( (P[0] + P[3]) , 2 )
col = int( (P[1] + P[2]) , 2 )
s_val = bin(S[row][col])[2:].zfill(2)
return(s_val)
def SW(key):
key_new = key[:4] + key[4:]
#print(key_new)
return key_new
option = input("\n1. Encode\n2. Decode\nEnter your option:")
key = input("Enter the key:")
inp = input("Enter the text:")
key_1, key_2 = key_gen(key)
#enc_plain, dec_plain = encrypt_plain(plain_text)
if option == '1':
print()
IP_1 = IP(inp)
fk_1 = f_key(IP_1, key_1)
switch = SW(fk_1)
fk_2 = f_key(switch, key_2)
IP_2 = IP_inv(fk_2)
print("\nEncoded = " + IP_2)
else:
print()
plain_text = inp
IP_1 = IP(plain_text)
fk_2 = f_key(IP_1, key_2)
switch = SW(fk_2)
fk_1 = f_key(switch, key_1)
IP_2 = IP_inv(fk_1)
print("\nDecoded = " + IP_2)
# 1010000010
# 10111101
| def transposition(key, order, order_name):
new_key = ''
for pos in order:
new_key += key[pos - 1]
print('Permuted ' + order_name + ' = ' + new_key)
return new_key
def p10(key):
p10_order = [3, 5, 2, 7, 4, 10, 1, 9, 8, 6]
p10_key = transposition(key, P10_order, 'P10')
return P10_key
def p8(LS1_key):
p8_order = [6, 3, 7, 4, 8, 5, 10, 9]
p8_key = transposition(LS1_key, P8_order, 'P8')
return P8_key
def ls1(P10_key):
p10_key_left = P10_key[:5]
p10_key_right = P10_key[5:]
ls1_key_left = P10_key_left[1:5] + P10_key_left[0]
ls1_key_right = P10_key_right[1:5] + P10_key_right[0]
ls1_key = LS1_key_left + LS1_key_right
return LS1_key
def ip(LS1_key):
ip_order = [2, 6, 3, 1, 4, 8, 5, 7]
ip_key = transposition(LS1_key, IP_order, 'IP')
return IP_key
def ip_inv(LS1_key):
ip_inv_order = [4, 1, 3, 5, 7, 2, 8, 6]
ip_inv_key = transposition(LS1_key, IP_inv_order, 'IP-1')
return IP_inv_key
def key_gen(key):
ls1_key = ls1(p10(key))
key_1 = p8(LS1_key)
key_2 = p8(ls1(LS1_key))
return (key_1, key_2)
def encrypt_plain(plain_text):
enc = ip(plain_text)
dec = ip_inv(enc)
return (enc, dec)
def f_key(enc_plain, SK):
l = enc_plain[:4]
r = enc_plain[4:]
f = f_func(R, SK)
f = a_xor_b(L, SK) + R
return f
def f_func(R, SK):
ep_order = [4, 1, 2, 3, 2, 3, 4, 1]
ep_key = transposition(R, EP_order, 'EP')
p = a_xor_b(EP_key, SK)
p4 = s_box(P)
return P4
def a_xor_b(A, B):
bit_xor = ''
for i in range(len(A)):
bit_xor += str(int(A[i]) ^ int(B[i]))
return bit_xor
def s_box(P):
p0 = P[:4]
p1 = P[4:]
s0_order = [[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
s1_order = [[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]
p4_order = [2, 4, 3, 1]
s0 = sbox_calc(P0, S0_order)
s1 = sbox_calc(P1, S1_order)
p4 = transposition(S0 + S1, P4_order, 'P4')
return P4
def sbox_calc(P, S):
row = int(P[0] + P[3], 2)
col = int(P[1] + P[2], 2)
s_val = bin(S[row][col])[2:].zfill(2)
return s_val
def sw(key):
key_new = key[:4] + key[4:]
return key_new
option = input('\n1. Encode\n2. Decode\nEnter your option:')
key = input('Enter the key:')
inp = input('Enter the text:')
(key_1, key_2) = key_gen(key)
if option == '1':
print()
ip_1 = ip(inp)
fk_1 = f_key(IP_1, key_1)
switch = sw(fk_1)
fk_2 = f_key(switch, key_2)
ip_2 = ip_inv(fk_2)
print('\nEncoded = ' + IP_2)
else:
print()
plain_text = inp
ip_1 = ip(plain_text)
fk_2 = f_key(IP_1, key_2)
switch = sw(fk_2)
fk_1 = f_key(switch, key_1)
ip_2 = ip_inv(fk_1)
print('\nDecoded = ' + IP_2) |
class laptop:
brand=[]
year=[]
ram=[]
def __init__(self,brand,year,ram,cost):
self.brand.append(brand)
self.year.append(year)
self.ram.append(ram)
self.cost.append(cost)
| class Laptop:
brand = []
year = []
ram = []
def __init__(self, brand, year, ram, cost):
self.brand.append(brand)
self.year.append(year)
self.ram.append(ram)
self.cost.append(cost) |
dataset_type = 'TextDetDataset'
data_root = 'data/synthtext'
train = dict(
type=dataset_type,
ann_file=f'{data_root}/instances_training.lmdb',
loader=dict(
type='AnnFileLoader',
repeat=1,
file_format='lmdb',
parser=dict(
type='LineJsonParser',
keys=['file_name', 'height', 'width', 'annotations'])),
img_prefix=f'{data_root}/imgs',
pipeline=None)
train_list = [train]
test_list = [train]
| dataset_type = 'TextDetDataset'
data_root = 'data/synthtext'
train = dict(type=dataset_type, ann_file=f'{data_root}/instances_training.lmdb', loader=dict(type='AnnFileLoader', repeat=1, file_format='lmdb', parser=dict(type='LineJsonParser', keys=['file_name', 'height', 'width', 'annotations'])), img_prefix=f'{data_root}/imgs', pipeline=None)
train_list = [train]
test_list = [train] |
class Solution:
def judgeSquareSum(self, c: int) -> bool:
left = 0
right = int(c ** 0.5)
while left <= right:
cur = left ** 2 + right ** 2
if cur < c:
left += 1
elif cur > c:
right -= 1
else:
return True
return False
| class Solution:
def judge_square_sum(self, c: int) -> bool:
left = 0
right = int(c ** 0.5)
while left <= right:
cur = left ** 2 + right ** 2
if cur < c:
left += 1
elif cur > c:
right -= 1
else:
return True
return False |
#!/usr/bin/env python3
def score_word(word):
score = 0
for letter in word:
# add code here
pass
return score
| def score_word(word):
score = 0
for letter in word:
pass
return score |
#!/bin/python3
# https://www.hackerrank.com/challenges/alphabet-rangoli/problem
#ll=limitting letter
#sl=starting letter
#df=deduction factor
#cd=character difference
#rl=resulting letter
while True:
ll=ord(input("Enter the limitting letter in the pattern:> "))
sl=65 if ll in range(65,91) else (97 if ll in range(97,123) else None)
if sl: break
print("Enter a valid input.")
print("See the alphabet pattern:>\n")
for df in range(sl-ll,ll-sl+1):
for cd in range(sl-ll,ll-sl+1):
rl=sl+abs(cd)+abs(df)
if(cd==ll-sl):
print(chr(rl) if rl<=ll else '-')
else:
print(chr(rl) if rl<=ll else '-',end="-")
| while True:
ll = ord(input('Enter the limitting letter in the pattern:> '))
sl = 65 if ll in range(65, 91) else 97 if ll in range(97, 123) else None
if sl:
break
print('Enter a valid input.')
print('See the alphabet pattern:>\n')
for df in range(sl - ll, ll - sl + 1):
for cd in range(sl - ll, ll - sl + 1):
rl = sl + abs(cd) + abs(df)
if cd == ll - sl:
print(chr(rl) if rl <= ll else '-')
else:
print(chr(rl) if rl <= ll else '-', end='-') |
# initialize step_end
step_end = 25
with plt.xkcd():
# initialize the figure
plt.figure()
# loop for step_end steps
for step in range(step_end):
t = step * dt
i = i_mean * (1 + np.sin((t * 2 * np.pi) / 0.01))
plt.plot(t, i, 'ko')
plt.title('Synaptic Input $I(t)$')
plt.xlabel('time (s)')
plt.ylabel(r'$I$ (A)')
plt.show() | step_end = 25
with plt.xkcd():
plt.figure()
for step in range(step_end):
t = step * dt
i = i_mean * (1 + np.sin(t * 2 * np.pi / 0.01))
plt.plot(t, i, 'ko')
plt.title('Synaptic Input $I(t)$')
plt.xlabel('time (s)')
plt.ylabel('$I$ (A)')
plt.show() |
S = list(map(str, input()))
for i in range(len(S)):
if S[i] == '6':
S[i] = '9'
elif S[i] == '9':
S[i] = '6'
S = reversed(S)
print("".join(S)) | s = list(map(str, input()))
for i in range(len(S)):
if S[i] == '6':
S[i] = '9'
elif S[i] == '9':
S[i] = '6'
s = reversed(S)
print(''.join(S)) |
global_variable = "global_variable"
print(global_variable + " printed at the module level.")
class GeoPoint():
class_attribute = "class_attribute"
print(class_attribute + " printed at the class level.")
def __init__(self):
global global_variable
print(global_variable + " printed at the method level.")
print(GeoPoint.class_attribute + " printed at the method level.")
print(class_attribute + " printed at the method level without class.")
self.instance_variable = "self.instance_variable"
print(self.instance_variable + " printed at the method level.")
method_local_variable = "method_local_variable"
print(method_local_variable + " printed at the method level.")
def another_method(self):
# No access to method_local_variable here
print(method_local_variable + " printed within another method.")
| global_variable = 'global_variable'
print(global_variable + ' printed at the module level.')
class Geopoint:
class_attribute = 'class_attribute'
print(class_attribute + ' printed at the class level.')
def __init__(self):
global global_variable
print(global_variable + ' printed at the method level.')
print(GeoPoint.class_attribute + ' printed at the method level.')
print(class_attribute + ' printed at the method level without class.')
self.instance_variable = 'self.instance_variable'
print(self.instance_variable + ' printed at the method level.')
method_local_variable = 'method_local_variable'
print(method_local_variable + ' printed at the method level.')
def another_method(self):
print(method_local_variable + ' printed within another method.') |
#!/usr/bin/env python3
#!/usr/bin/python
str1 = 'test1'
if str1 == 'test1' or str1 == 'test2':
print('1 or 2')
elif str1 == 'test3' or str1 == 'test4':
print("3 or 4")
else:
print("else")
str1 = ''
if str1:
print(("'%s' is True" % str1))
else:
print(("'%s' is False" % str1))
str1 = ' '
if str1:
print(("'%s' is True" % str1))
else:
print(("'%s' is False" % str1))
| str1 = 'test1'
if str1 == 'test1' or str1 == 'test2':
print('1 or 2')
elif str1 == 'test3' or str1 == 'test4':
print('3 or 4')
else:
print('else')
str1 = ''
if str1:
print("'%s' is True" % str1)
else:
print("'%s' is False" % str1)
str1 = ' '
if str1:
print("'%s' is True" % str1)
else:
print("'%s' is False" % str1) |
# Python Class 1
# variable <-- Left
# = <-- Assign
# data = int, String, char, boolean, float
name = "McGill University"
age = 10
is_good = False
height = 5.6
print("Name is :" + name)
print("Age is :" + str(age))
print("He is good :" +str(is_good))
| name = 'McGill University'
age = 10
is_good = False
height = 5.6
print('Name is :' + name)
print('Age is :' + str(age))
print('He is good :' + str(is_good)) |
e,f,c = map(int,input().split())
bottle = (e+f)//c
get = (e+f)%c + bottle
while 1:
if get < c: break
bottle += get//c
get = get//c + get%c
print(bottle) | (e, f, c) = map(int, input().split())
bottle = (e + f) // c
get = (e + f) % c + bottle
while 1:
if get < c:
break
bottle += get // c
get = get // c + get % c
print(bottle) |
TESTING = True
HOST = "127.0.0.1"
PORT = 8000
| testing = True
host = '127.0.0.1'
port = 8000 |
def to_star(word):
vowels = ['a', 'e' ,'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']
for char in vowels:
word = word.replace(char,"*")
return word
word = input("Enter a word: ")
print(to_star(word)) | def to_star(word):
vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']
for char in vowels:
word = word.replace(char, '*')
return word
word = input('Enter a word: ')
print(to_star(word)) |
print ("Welcome to the mad lib generator. Please follow along and type your input to each statement or question.")
print ("Name an object")
obj1 = input()
print ("Name the plural of your previous object")
obj3 = input()
print ("Name a different plural object")
obj2 = input()
print ("Name a color")
color1 = input()
print ("What is the weather today?")
weather = input()
print ("Name an adjective ending in 'ly'")
adj1 = input()
print ("Name a feeling (present tense)")
feeling = input()
print ("Name an adjective ending in 'ly'")
adj2 = input()
print ("Name a verb (past tense)")
verb1 = input()
print ("Name a color")
color2 = input()
print ("Name an adjective")
adj3 = input()
print ("Name a quality or a person or thing")
quality1 = input()
print ("Name a quality or a person or thing")
quality2 = input()
#Print Song Title
print ("\t*O Christmas Tree Mad Lib*")
#Verse 1
print ("\n O Christmas %s," %obj1 )
print ("O Christmas %s," %obj1 )
print ("How lovely are your %s!" %obj2)
print ("O Christmas %s," %obj1 )
print ("O Christmas %s," %obj1 )
print ("How lovely are your %s!" %obj2)
print ("Not only %s in summer's heat," %color1)
print ("But also winter's snow and %s" %weather)
print ("O Christmas %s," %obj1 )
print ("O Christmas %s," %obj1 )
print ("How lovely are your %s!" %obj2)
# Verse 2
print ("\n O Christmas %s," %obj1 )
print ("O Christmas %s," %obj1 )
print ("Of all the %s most %s;" %(obj3, adj1))
print ("O Christmas %s," %obj1 )
print ("O Christmas %s," %obj1 )
print ("Of all the %s most %s;" %(obj3, adj1))
print ("Each year you bring to us %s" %feeling)
print ("With %s shinning Christmas light!" %adj2)
print ("O Christmas %s," %obj1 )
print ("O Christmas %s," %obj1 )
print ("Of all the %s most %s." %(obj1, adj1))
# Verse 3
print ("\n O Christmas %s," %obj1 )
print ("O Christmas %s," %obj1 )
print ("We %s from all your beauty;" %verb1)
print ("O Christmas %s," %obj1 )
print ("O Christmas %s," %obj1 )
print ("We %s from all your beauty;" %verb1)
print ("Your bright %s leaves with %s cheer," %(color2, adj3))
print ("Give %s and %s throughout the year." %(quality1, quality2))
print ("O Christmas %s," %obj1 )
print ("O Christmas %s," %obj1 )
print ("We %s from all your beauty;" %verb1)
print ("\nHappy Holidays! And congratulations on making a new song: 'O Christmas %s!'" %obj1 ) | print('Welcome to the mad lib generator. Please follow along and type your input to each statement or question.')
print('Name an object')
obj1 = input()
print('Name the plural of your previous object')
obj3 = input()
print('Name a different plural object')
obj2 = input()
print('Name a color')
color1 = input()
print('What is the weather today?')
weather = input()
print("Name an adjective ending in 'ly'")
adj1 = input()
print('Name a feeling (present tense)')
feeling = input()
print("Name an adjective ending in 'ly'")
adj2 = input()
print('Name a verb (past tense)')
verb1 = input()
print('Name a color')
color2 = input()
print('Name an adjective')
adj3 = input()
print('Name a quality or a person or thing')
quality1 = input()
print('Name a quality or a person or thing')
quality2 = input()
print('\t*O Christmas Tree Mad Lib*')
print('\n O Christmas %s,' % obj1)
print('O Christmas %s,' % obj1)
print('How lovely are your %s!' % obj2)
print('O Christmas %s,' % obj1)
print('O Christmas %s,' % obj1)
print('How lovely are your %s!' % obj2)
print("Not only %s in summer's heat," % color1)
print("But also winter's snow and %s" % weather)
print('O Christmas %s,' % obj1)
print('O Christmas %s,' % obj1)
print('How lovely are your %s!' % obj2)
print('\n O Christmas %s,' % obj1)
print('O Christmas %s,' % obj1)
print('Of all the %s most %s;' % (obj3, adj1))
print('O Christmas %s,' % obj1)
print('O Christmas %s,' % obj1)
print('Of all the %s most %s;' % (obj3, adj1))
print('Each year you bring to us %s' % feeling)
print('With %s shinning Christmas light!' % adj2)
print('O Christmas %s,' % obj1)
print('O Christmas %s,' % obj1)
print('Of all the %s most %s.' % (obj1, adj1))
print('\n O Christmas %s,' % obj1)
print('O Christmas %s,' % obj1)
print('We %s from all your beauty;' % verb1)
print('O Christmas %s,' % obj1)
print('O Christmas %s,' % obj1)
print('We %s from all your beauty;' % verb1)
print('Your bright %s leaves with %s cheer,' % (color2, adj3))
print('Give %s and %s throughout the year.' % (quality1, quality2))
print('O Christmas %s,' % obj1)
print('O Christmas %s,' % obj1)
print('We %s from all your beauty;' % verb1)
print("\nHappy Holidays! And congratulations on making a new song: 'O Christmas %s!'" % obj1) |
students = {
"ivan": 5.50,
"alex": 3.50,
"maria": 5.50,
"georgy": 5.50,
}
for k,v in students.items():
if v > 4.50:
print( "{} - {}".format(k, v) ) | students = {'ivan': 5.5, 'alex': 3.5, 'maria': 5.5, 'georgy': 5.5}
for (k, v) in students.items():
if v > 4.5:
print('{} - {}'.format(k, v)) |
# This script will track two lists through a 3-D printing process
# Source code/inspiration/software
# Python Crash Course by Eric Matthews, Chapter 8, example 8+
# Made with Mu 1.0.3 in October 2021
# Start with a list of unprinted_designs to be 3-D printed
unprinted_designs = ['iphone case', 'robot pendant', 'dodecahedron']
for unprinted_design in unprinted_designs:
print("The following model will be printed: " + unprinted_design)
completed_models =[]
print("\n ")
# Track unprinted_designs as they are 3-D printed
while unprinted_designs:
current_design = unprinted_designs.pop()
# Track model in the 3-D print process
print("Printing model: " + current_design)
completed_models.append(current_design)
# Generate a list of printed designs
print("\nThe following models have been printed:")
for completed_model in completed_models:
print(completed_model)
| unprinted_designs = ['iphone case', 'robot pendant', 'dodecahedron']
for unprinted_design in unprinted_designs:
print('The following model will be printed: ' + unprinted_design)
completed_models = []
print('\n ')
while unprinted_designs:
current_design = unprinted_designs.pop()
print('Printing model: ' + current_design)
completed_models.append(current_design)
print('\nThe following models have been printed:')
for completed_model in completed_models:
print(completed_model) |
# from typing import Counter
# counter={}
words=input().split(" ")
counter ={ x:words.count(x) for x in set(words)}
print('max: ', max(counter))
print('min: ', min(counter))
# a = input().split()
# d = {}
# for x in a:
# try:
# d[x] += 1
# except:
# d[x] = 1
# print('max: ', max(d))
# print('min: ', min(d))
# words = input().split()
# counter={}
# for word in set(words):
# counter[word] = words.count(word)
# print(word)
# print('max: ', max(counter))
# print('min: ', min(counter)) | words = input().split(' ')
counter = {x: words.count(x) for x in set(words)}
print('max: ', max(counter))
print('min: ', min(counter)) |
# This file is part of the Extra-P software (http://www.scalasca.org/software/extra-p)
#
# Copyright (c) 2020, Technical University of Darmstadt, Germany
#
# This software may be modified and distributed under the terms of a BSD-style license.
# See the LICENSE file in the base directory for details.
class RecoverableError(RuntimeError):
def __init__(self, *args: object) -> None:
super().__init__(*args)
class FileFormatError(RecoverableError):
NAME = 'File Format Error'
def __init__(self, *args: object) -> None:
super().__init__(*args)
class InvalidExperimentError(RecoverableError):
NAME = 'Invalid Experiment Error'
def __init__(self, *args: object) -> None:
super().__init__(*args)
class CancelProcessError(RecoverableError):
NAME = 'Canceled Process'
def __init__(self, *args: object) -> None:
super().__init__(*args)
| class Recoverableerror(RuntimeError):
def __init__(self, *args: object) -> None:
super().__init__(*args)
class Fileformaterror(RecoverableError):
name = 'File Format Error'
def __init__(self, *args: object) -> None:
super().__init__(*args)
class Invalidexperimenterror(RecoverableError):
name = 'Invalid Experiment Error'
def __init__(self, *args: object) -> None:
super().__init__(*args)
class Cancelprocesserror(RecoverableError):
name = 'Canceled Process'
def __init__(self, *args: object) -> None:
super().__init__(*args) |
def greet(first_name, last_name):
print(f"Hi {first_name} {last_name}")
greet("Tom", "Hill")
| def greet(first_name, last_name):
print(f'Hi {first_name} {last_name}')
greet('Tom', 'Hill') |
print()
print("--- Math ---")
print(1+1)
print(1*3)
print(1/2)
print(3**2)
print(4%2)
print(4%2 == 0)
print(type(1))
print(type(1.0)) | print()
print('--- Math ---')
print(1 + 1)
print(1 * 3)
print(1 / 2)
print(3 ** 2)
print(4 % 2)
print(4 % 2 == 0)
print(type(1))
print(type(1.0)) |
directions = [(-1,0), (0,1), (1,0), (0,-1), (0,0)]
dirs = ["North", "East", "South", "West", "Stay"]
def add(a, b):
return tuple(map(lambda a, b: a + b, a, b))
def sub(a,b):
return tuple(map(lambda a, b: a - b, a, b))
def manhattan_dist(a, b):
return abs(a[0]-b[0]) + abs(a[1]-b[1])
def direction_to_cmd(p):
return dirs[directions.index((p[0],p[1]))]
def cmd_to_direction(c):
return directions[dirs.index(c)]
| directions = [(-1, 0), (0, 1), (1, 0), (0, -1), (0, 0)]
dirs = ['North', 'East', 'South', 'West', 'Stay']
def add(a, b):
return tuple(map(lambda a, b: a + b, a, b))
def sub(a, b):
return tuple(map(lambda a, b: a - b, a, b))
def manhattan_dist(a, b):
return abs(a[0] - b[0]) + abs(a[1] - b[1])
def direction_to_cmd(p):
return dirs[directions.index((p[0], p[1]))]
def cmd_to_direction(c):
return directions[dirs.index(c)] |
def even_fibo():
a =1
b = 1
even_sum = 0
c =0
while(c<= 4000000):
c = a + b
a = b
b = c
if(c %2 == 0):
even_sum = c + even_sum
print(even_sum)
if __name__ == "__main__":
print("Project Euler Problem 1")
even_fibo()
| def even_fibo():
a = 1
b = 1
even_sum = 0
c = 0
while c <= 4000000:
c = a + b
a = b
b = c
if c % 2 == 0:
even_sum = c + even_sum
print(even_sum)
if __name__ == '__main__':
print('Project Euler Problem 1')
even_fibo() |
MULTI_ERRORS_HTTP_RESPONSE = {
"errors": [
{
"code": 403,
"message": "access denied, authorization failed"
},
{
"code": 401,
"message": "test error #1"
},
{
"code": 402,
"message": "test error #2"
}
],
"meta": {
"powered_by": "crowdstrike-api-gateway",
"query_time": 0.000654734,
"trace_id": "39f1573c-7a51-4b1a-abaa-92d29f704afd"
}
}
NO_ERRORS_HTTP_RESPONSE = {
"errors": [],
"meta": {
"powered_by": "crowdstrike-api-gateway",
"query_time": 0.000654734,
"trace_id": "39f1573c-7a51-4b1a-abaa-92d29f704afd"
}
}
| multi_errors_http_response = {'errors': [{'code': 403, 'message': 'access denied, authorization failed'}, {'code': 401, 'message': 'test error #1'}, {'code': 402, 'message': 'test error #2'}], 'meta': {'powered_by': 'crowdstrike-api-gateway', 'query_time': 0.000654734, 'trace_id': '39f1573c-7a51-4b1a-abaa-92d29f704afd'}}
no_errors_http_response = {'errors': [], 'meta': {'powered_by': 'crowdstrike-api-gateway', 'query_time': 0.000654734, 'trace_id': '39f1573c-7a51-4b1a-abaa-92d29f704afd'}} |
name = 'shell_proc'
version = '1.1.1'
description = 'Continuous shell process'
url = 'https://github.com/justengel/shell_proc'
author = 'Justin Engel'
author_email = 'jtengel08@gmail.com'
| name = 'shell_proc'
version = '1.1.1'
description = 'Continuous shell process'
url = 'https://github.com/justengel/shell_proc'
author = 'Justin Engel'
author_email = 'jtengel08@gmail.com' |
def open_input():
with open("input.txt") as fd:
array = fd.read().splitlines()
array = list(map(int, array))
return array
def part_one(array):
lenght = len(array)
increased = 0
for i in range(0, lenght - 1):
if array[i] < array[i + 1]:
increased += 1
print("part one:", increased)
def part_two(array):
lenght = len(array)
increased = 0
for i in range(0, lenght - 3):
sum1 = array[i] + array[i + 1] + array[i + 2]
sum2 = array[i + 1] + array[i + 2] + array[i + 3]
if sum1 < sum2:
increased += 1
print("part two:", increased)
if (__name__ == "__main__"):
array = open_input()
part_one(array)
part_two(array)
| def open_input():
with open('input.txt') as fd:
array = fd.read().splitlines()
array = list(map(int, array))
return array
def part_one(array):
lenght = len(array)
increased = 0
for i in range(0, lenght - 1):
if array[i] < array[i + 1]:
increased += 1
print('part one:', increased)
def part_two(array):
lenght = len(array)
increased = 0
for i in range(0, lenght - 3):
sum1 = array[i] + array[i + 1] + array[i + 2]
sum2 = array[i + 1] + array[i + 2] + array[i + 3]
if sum1 < sum2:
increased += 1
print('part two:', increased)
if __name__ == '__main__':
array = open_input()
part_one(array)
part_two(array) |
# ===========================================================================
# dictionary.py -----------------------------------------------------------
# ===========================================================================
# function ----------------------------------------------------------------
# ---------------------------------------------------------------------------
def update_dict(a, b):
# @todo[comment]:
if a and b and isinstance(a, dict):
a.update(b)
return a
# function ----------------------------------------------------------------
# ---------------------------------------------------------------------------
def get_dict_element(dict_list, field, query):
# @todo[comment]:
for item in dict_list:
if item[field] == query:
return item
return dict()
# function ----------------------------------------------------------------
# ---------------------------------------------------------------------------
def get_dict_elements(dict_list, field, query, update=False):
# @todo[comment]:
if not isinstance(field, list) and isinstance(query, list):
field = [field] * len(query)
result = list() if not update else dict()
if isinstance(field, list) and isinstance(query, list):
for field_item, query_item in zip(field, query):
item = get_dict_element(dict_list, field_item, query_item)
if item:
if not update:
result.append(item)
else:
result.update(item)
return result
| def update_dict(a, b):
if a and b and isinstance(a, dict):
a.update(b)
return a
def get_dict_element(dict_list, field, query):
for item in dict_list:
if item[field] == query:
return item
return dict()
def get_dict_elements(dict_list, field, query, update=False):
if not isinstance(field, list) and isinstance(query, list):
field = [field] * len(query)
result = list() if not update else dict()
if isinstance(field, list) and isinstance(query, list):
for (field_item, query_item) in zip(field, query):
item = get_dict_element(dict_list, field_item, query_item)
if item:
if not update:
result.append(item)
else:
result.update(item)
return result |
# selectionsort() method
def selectionSort(arr):
arraySize = len(arr)
for i in range(arraySize):
min = i
for j in range(i+1, arraySize):
if arr[j] < arr[min]:
min = j
#swap values
arr[i], arr[min] = arr[min], arr[i]
# method to print an array
def printList(arr):
for i in range(len(arr)):
print(arr[i],end=" ")
print("\n")
# driver method
if __name__ == '__main__':
arr = [3,4,1,7,6,2,8]
print ("Given array: ", end="\n")
printList(arr)
selectionSort(arr)
print("Sorted array: ", end="\n")
printList(arr) | def selection_sort(arr):
array_size = len(arr)
for i in range(arraySize):
min = i
for j in range(i + 1, arraySize):
if arr[j] < arr[min]:
min = j
(arr[i], arr[min]) = (arr[min], arr[i])
def print_list(arr):
for i in range(len(arr)):
print(arr[i], end=' ')
print('\n')
if __name__ == '__main__':
arr = [3, 4, 1, 7, 6, 2, 8]
print('Given array: ', end='\n')
print_list(arr)
selection_sort(arr)
print('Sorted array: ', end='\n')
print_list(arr) |
logo = '''
______ __ __ _ __ __
/ ____/__ __ ___ _____ _____ / /_ / /_ ___ / | / /__ __ ____ ___ / /_ ___ _____
/ / __ / / / // _ \ / ___// ___/ / __// __ \ / _ \ / |/ // / / // __ `__ \ / __ \ / _ \ / ___/
/ /_/ // /_/ // __/(__ )(__ ) / /_ / / / // __/ / /| // /_/ // / / / / // /_/ // __// /
\____/ \__,_/ \___//____//____/ \__//_/ /_/ \___/ /_/ |_/ \__,_//_/ /_/ /_//_.___/ \___//_/
''' | logo = '\n ______ __ __ _ __ __ \n / ____/__ __ ___ _____ _____ / /_ / /_ ___ / | / /__ __ ____ ___ / /_ ___ _____\n / / __ / / / // _ \\ / ___// ___/ / __// __ \\ / _ \\ / |/ // / / // __ `__ \\ / __ \\ / _ \\ / ___/\n/ /_/ // /_/ // __/(__ )(__ ) / /_ / / / // __/ / /| // /_/ // / / / / // /_/ // __// / \n\\____/ \\__,_/ \\___//____//____/ \\__//_/ /_/ \\___/ /_/ |_/ \\__,_//_/ /_/ /_//_.___/ \\___//_/ \n' |
'''https://leetcode.com/problems/symmetric-tree/'''
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def isMirror(self, left, right):
if left is None and right is None:
return True
if left is None or right is None:
return False
if left.val==right.val:
return self.isMirror(left.left, right.right) and self.isMirror(left.right, right.left)
else:
return False
def isSymmetric(self, root: TreeNode) -> bool:
if not root:
return True
return self.isMirror(root.left, root.right)
| """https://leetcode.com/problems/symmetric-tree/"""
class Solution:
def is_mirror(self, left, right):
if left is None and right is None:
return True
if left is None or right is None:
return False
if left.val == right.val:
return self.isMirror(left.left, right.right) and self.isMirror(left.right, right.left)
else:
return False
def is_symmetric(self, root: TreeNode) -> bool:
if not root:
return True
return self.isMirror(root.left, root.right) |
'''
LeetCode LinkedList Q.876 Middle of the Linked List
Recusion and Slow/Fast Pointer Solution
'''
def middleNode(self, head: ListNode) -> ListNode:
def rec(slow, fast):
if not fast:
return slow
elif not fast.next:
return slow
return rec(slow.next, fast.next.next)
return rec(head, head)
| """
LeetCode LinkedList Q.876 Middle of the Linked List
Recusion and Slow/Fast Pointer Solution
"""
def middle_node(self, head: ListNode) -> ListNode:
def rec(slow, fast):
if not fast:
return slow
elif not fast.next:
return slow
return rec(slow.next, fast.next.next)
return rec(head, head) |
class ParameterDefinition(object):
def __init__(self, name, param_type=None, value=None):
self.name = name
self.param_type = param_type
self.value = value
class Parameter(object):
def __init__(self, definition):
self.definition = definition
self.value = definition.value
self.binding = None
| class Parameterdefinition(object):
def __init__(self, name, param_type=None, value=None):
self.name = name
self.param_type = param_type
self.value = value
class Parameter(object):
def __init__(self, definition):
self.definition = definition
self.value = definition.value
self.binding = None |
load(":import_external.bzl", import_external = "import_external")
def dependencies():
import_external(
name = "org_apache_httpcomponents_client5_httpclient5",
artifact = "org.apache.httpcomponents.client5:httpclient5:5.1",
artifact_sha256 = "b7a30296763a4d5dbf840f0b79df7439cf3d2341c8990aee4111591b61b50935",
srcjar_sha256 = "d7351329b7720b482766aca78d1c040225a1b4bbd723034c6f686bec538edddd",
deps = [
"@commons_codec_commons_codec",
"@org_apache_httpcomponents_core5_httpcore5",
"@org_apache_httpcomponents_core5_httpcore5_h2",
"@org_slf4j_slf4j_api",
],
)
| load(':import_external.bzl', import_external='import_external')
def dependencies():
import_external(name='org_apache_httpcomponents_client5_httpclient5', artifact='org.apache.httpcomponents.client5:httpclient5:5.1', artifact_sha256='b7a30296763a4d5dbf840f0b79df7439cf3d2341c8990aee4111591b61b50935', srcjar_sha256='d7351329b7720b482766aca78d1c040225a1b4bbd723034c6f686bec538edddd', deps=['@commons_codec_commons_codec', '@org_apache_httpcomponents_core5_httpcore5', '@org_apache_httpcomponents_core5_httpcore5_h2', '@org_slf4j_slf4j_api']) |
class Solution:
def imageSmoother(self, M: list) -> list:
l = len(M)
if l == 0:
return M
m = len(M[0])
res = []
for i in range(l):
res.append([0] * m)
# print(res)
for x in range(l):
for y in range(m):
summ = 0
count = 0
for i in range(x-1, x+2):
for j in range(y-1, y+2):
if 0 <= i < l and 0 <= j < m:
summ += M[i][j]
count += 1
res[x][y] = int(summ / count)
return res
M = [[1,1,1],
[1,0,1],
[1,1,1]]
s = Solution()
print(s.imageSmoother(M))
| class Solution:
def image_smoother(self, M: list) -> list:
l = len(M)
if l == 0:
return M
m = len(M[0])
res = []
for i in range(l):
res.append([0] * m)
for x in range(l):
for y in range(m):
summ = 0
count = 0
for i in range(x - 1, x + 2):
for j in range(y - 1, y + 2):
if 0 <= i < l and 0 <= j < m:
summ += M[i][j]
count += 1
res[x][y] = int(summ / count)
return res
m = [[1, 1, 1], [1, 0, 1], [1, 1, 1]]
s = solution()
print(s.imageSmoother(M)) |
#!/usr/bin/env python3
# pylint: disable=invalid-name,missing-docstring
def test_get_arns(oa, shared_datadir):
with open("%s/saml_assertion.txt" % shared_datadir) as fh:
assertion = fh.read()
arns = oa.get_arns(assertion)
# Principal
assert arns[0] == 'arn:aws:iam::012345678901:saml-provider/OKTA'
# Role
assert arns[1] == 'arn:aws:iam::012345678901:role/Okta_AdministratorAccess'
| def test_get_arns(oa, shared_datadir):
with open('%s/saml_assertion.txt' % shared_datadir) as fh:
assertion = fh.read()
arns = oa.get_arns(assertion)
assert arns[0] == 'arn:aws:iam::012345678901:saml-provider/OKTA'
assert arns[1] == 'arn:aws:iam::012345678901:role/Okta_AdministratorAccess' |
__all__ = [
"cart_factory",
"cart",
"environment",
"job_factory",
"job",
"location",
"trace",
]
| __all__ = ['cart_factory', 'cart', 'environment', 'job_factory', 'job', 'location', 'trace'] |
TITLE = "The World of Light and Shadow"
ALPHABET = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
ALPHABET += ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
MISC = [",", "!", "#", "$", "%", "&", "*", "(", ")", "-", "_", "+", "=", "`", "~", ".", ";", ":", " ", "?", "@", "[", "]", "{", "}"]
NUMBERS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
CLEAN_CHARS = ALPHABET + MISC + NUMBERS
ZONE_NAMES = ["harbor"]
# ---------------------------------------------
TILESIZE = 120
TILES_WIDE = 4
TILES_HIGH = 4
WINDOW_WIDTH = TILESIZE * TILES_WIDE
WINDOW_HEIGHT = TILESIZE * TILES_HIGH
# ---------------------------------------------
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
DARKGREY = (40, 40, 40)
LIGHTGREY = (200, 200, 200)
DARK_GREEN = ( 0, 153, 0)
GREEN = (0, 255, 0)
DARK_RED = (204, 0, 0)
RED = (255, 0, 0)
ORANGE = (255, 128, 0)
YELLOW = (255, 255, 0)
BROWN = (106, 55, 5)
AQUA = ( 0, 255, 255)
BLUE = ( 0, 0, 255)
FUCHIA = (255, 0, 255)
GRAY = (128, 128, 128)
LIME = ( 0, 255, 0)
MAROON = (128, 0, 0)
NAVY_BLUE = ( 0, 0, 128)
OLIVE = (128, 128, 0)
PURPLE = (128, 0, 128)
LIGHT_PURBLE = (255, 153, 255)
SILVER = (192, 192, 192)
TEAL = ( 0, 128, 128)
BACKGROUND_COLOR = WHITE
| title = 'The World of Light and Shadow'
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
alphabet += ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
misc = [',', '!', '#', '$', '%', '&', '*', '(', ')', '-', '_', '+', '=', '`', '~', '.', ';', ':', ' ', '?', '@', '[', ']', '{', '}']
numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
clean_chars = ALPHABET + MISC + NUMBERS
zone_names = ['harbor']
tilesize = 120
tiles_wide = 4
tiles_high = 4
window_width = TILESIZE * TILES_WIDE
window_height = TILESIZE * TILES_HIGH
white = (255, 255, 255)
black = (0, 0, 0)
darkgrey = (40, 40, 40)
lightgrey = (200, 200, 200)
dark_green = (0, 153, 0)
green = (0, 255, 0)
dark_red = (204, 0, 0)
red = (255, 0, 0)
orange = (255, 128, 0)
yellow = (255, 255, 0)
brown = (106, 55, 5)
aqua = (0, 255, 255)
blue = (0, 0, 255)
fuchia = (255, 0, 255)
gray = (128, 128, 128)
lime = (0, 255, 0)
maroon = (128, 0, 0)
navy_blue = (0, 0, 128)
olive = (128, 128, 0)
purple = (128, 0, 128)
light_purble = (255, 153, 255)
silver = (192, 192, 192)
teal = (0, 128, 128)
background_color = WHITE |
class Solution:
def closedIsland(self, grid: List[List[int]]) -> int:
def dfs(r, c, val):
grid[r][c] = val
for nr, nc in (r-1, c), (r+1, c), (r, c-1), (r, c+1):
if 0 <= nr < len(grid) and 0 <= nc < len(grid[0]) and grid[nr][nc] != val:
dfs(nr, nc, val)
for i in range(len(grid)):
for j in range(len(grid[i])):
if grid[i][j] == 0 and (i == 0 or i == len(grid) - 1 or j == 0 or j == len(grid[i]) - 1):
dfs(i, j, 1)
count = 0
for i in range(len(grid)):
for j in range(len(grid[i])):
if grid[i][j] == 0:
count += 1
dfs(i, j, 1)
return count
| class Solution:
def closed_island(self, grid: List[List[int]]) -> int:
def dfs(r, c, val):
grid[r][c] = val
for (nr, nc) in ((r - 1, c), (r + 1, c), (r, c - 1), (r, c + 1)):
if 0 <= nr < len(grid) and 0 <= nc < len(grid[0]) and (grid[nr][nc] != val):
dfs(nr, nc, val)
for i in range(len(grid)):
for j in range(len(grid[i])):
if grid[i][j] == 0 and (i == 0 or i == len(grid) - 1 or j == 0 or (j == len(grid[i]) - 1)):
dfs(i, j, 1)
count = 0
for i in range(len(grid)):
for j in range(len(grid[i])):
if grid[i][j] == 0:
count += 1
dfs(i, j, 1)
return count |
# you can use print for debugging purposes, e.g.
# print "this is a debug message"
def solution(A):
# write your code in Python 2.7
N = len(A)
counter = []
leader = -1
leader_count = 0
left_leader_count = 0
equi_count = 0
for i in xrange(N):
if not counter:
counter.append((A[i], 1))
elif counter[0][0] == A[i]:
counter[0] = (counter[0][0], counter[0][1]+1)
elif counter[0][1] > 1:
counter[0] = (counter[0][0], counter[0][1]-1)
else:
counter.pop()
if counter:
for i in xrange(N):
if A[i] == counter[0][0]:
leader_count += 1
if leader_count > N/2:
leader = counter[0][0]
else:
return 0
else:
return 0
for i in xrange(N):
if leader == A[i]:
left_leader_count += 1
if left_leader_count > (i+1)/2:
if leader_count - left_leader_count > (N-(i+1))/2:
equi_count += 1
return equi_count
| def solution(A):
n = len(A)
counter = []
leader = -1
leader_count = 0
left_leader_count = 0
equi_count = 0
for i in xrange(N):
if not counter:
counter.append((A[i], 1))
elif counter[0][0] == A[i]:
counter[0] = (counter[0][0], counter[0][1] + 1)
elif counter[0][1] > 1:
counter[0] = (counter[0][0], counter[0][1] - 1)
else:
counter.pop()
if counter:
for i in xrange(N):
if A[i] == counter[0][0]:
leader_count += 1
if leader_count > N / 2:
leader = counter[0][0]
else:
return 0
else:
return 0
for i in xrange(N):
if leader == A[i]:
left_leader_count += 1
if left_leader_count > (i + 1) / 2:
if leader_count - left_leader_count > (N - (i + 1)) / 2:
equi_count += 1
return equi_count |
# this py file will be strictly dedicated to "Boolean Logic"
# Boolean Logic is best defined as the combination of phrases that can result in printing different values
# define two variables
a = True
b = False
# if-statement... output: True
# the if condition prints, if the "if statement" evaluates to True
if a:
print("True")
else:
print("False")
if b: # output: False
print("True")
else:
print("False")
'''
and: both clauses must be True
or: one of the clauses must be True
'''
# and-statements... output: Neither
if a and b:
print("Both")
else:
print("Neither")
# or-statement... output: Both
if a or b:
print("Both")
else:
print("Neither")
# define new variables to demonstrate truth table
x = True
y = True
# output: True
if x and y:
print("True")
else:
print("False")
# output: True
if (x and y) or x:
print("True")
else:
print("False")
# new reassignment
# x still equals True
y = False
# output: False
if x and y:
print("True")
else:
print("False")
# output: True
if x or y:
print("True")
else:
print("False")
# output: True
if (x or y) and x:
print("True")
else:
print("False")
# output: True
if (x and y) or x:
print("True")
else:
print("False")
# output: False
if not x and not y:
print("True")
else:
print("False") | a = True
b = False
if a:
print('True')
else:
print('False')
if b:
print('True')
else:
print('False')
' \nand: both clauses must be True \nor: one of the clauses must be True\n'
if a and b:
print('Both')
else:
print('Neither')
if a or b:
print('Both')
else:
print('Neither')
x = True
y = True
if x and y:
print('True')
else:
print('False')
if x and y or x:
print('True')
else:
print('False')
y = False
if x and y:
print('True')
else:
print('False')
if x or y:
print('True')
else:
print('False')
if (x or y) and x:
print('True')
else:
print('False')
if x and y or x:
print('True')
else:
print('False')
if not x and (not y):
print('True')
else:
print('False') |
words = set(
(
"scipy",
"Combinatorics",
"rhs",
"lhs",
"df",
"AttributeError",
"Cymru",
"FiniteSet",
"Jupyter",
"LaTeX",
"Modularisation",
"NameError",
"PyCons",
"allclose",
"ax",
"bc",
"boolean",
"docstring",
"dtype",
"dx",
"dy",
"expr",
"frisbee",
"inv",
"ipynb",
"isclose",
"itertools",
"jupyter",
"len",
"nbs",
"nd",
"np",
"numpy",
"solveset",
"sqrt",
"sym",
"sympy",
"th",
)
)
prose_exceptions = {
"assets/nbs/assessment/mock/main.ipynb": set(
(
r"The matrix \\(D\\) is given by \\(D = \begin{pmatrix} a & 2 & 0\\ 3 & 1 & 2\\ 0 & -1 & 1\end{pmatrix}\\) where \\(a\ne 2\\).",
),
),
"assets/nbs/assessment/mock/assignment.ipynb": set(
(
r"The matrix \\(D\\) is given by \\(D = \begin{pmatrix} a & 2 & 0\\ 3 & 1 & 2\\ 0 & -1 & 1\end{pmatrix}\\) where \\(a\ne 2\\).",
)
),
"assets/nbs/assessment/mock/solution.ipynb": set(
(
r"The matrix \\(D\\) is given by \\(D = \begin{pmatrix} a & 2 & 0\\ 3 & 1 & 2\\ 0 & -1 & 1\end{pmatrix}\\) where \\(a\ne 2\\).",
)
),
}
prose_suggestions_to_ignore = {
"assets/nbs/assessment/2020/main.ipynb": set(
("typography.symbols.curly_quotes", "garner.preferred_forms")
),
"assets/nbs/assessment/2020/solution.ipynb": set(
("typography.symbols.curly_quotes", "garner.preferred_forms")
),
"assets/nbs/assessment/mock/main.ipynb": set(
("typography.symbols.curly_quotes", "garner.preferred_forms")
),
"assets/nbs/assessment/mock/assignment.ipynb": set(
("typography.symbols.curly_quotes", "garner.preferred_forms")
),
"assets/nbs/assessment/mock/solution.ipynb": set(
("typography.symbols.curly_quotes", "garner.preferred_forms")
),
"assets/nbs/assessment/example/main.ipynb": set(
(
"typography.symbols.curly_quotes",
"typography.symbols.ellipsis",
"garner.preferred_forms",
)
),
}
| words = set(('scipy', 'Combinatorics', 'rhs', 'lhs', 'df', 'AttributeError', 'Cymru', 'FiniteSet', 'Jupyter', 'LaTeX', 'Modularisation', 'NameError', 'PyCons', 'allclose', 'ax', 'bc', 'boolean', 'docstring', 'dtype', 'dx', 'dy', 'expr', 'frisbee', 'inv', 'ipynb', 'isclose', 'itertools', 'jupyter', 'len', 'nbs', 'nd', 'np', 'numpy', 'solveset', 'sqrt', 'sym', 'sympy', 'th'))
prose_exceptions = {'assets/nbs/assessment/mock/main.ipynb': set(('The matrix \\\\(D\\\\) is given by \\\\(D = \\begin{pmatrix} a & 2 & 0\\\\ 3 & 1 & 2\\\\ 0 & -1 & 1\\end{pmatrix}\\\\) where \\\\(a\\ne 2\\\\).',)), 'assets/nbs/assessment/mock/assignment.ipynb': set(('The matrix \\\\(D\\\\) is given by \\\\(D = \\begin{pmatrix} a & 2 & 0\\\\ 3 & 1 & 2\\\\ 0 & -1 & 1\\end{pmatrix}\\\\) where \\\\(a\\ne 2\\\\).',)), 'assets/nbs/assessment/mock/solution.ipynb': set(('The matrix \\\\(D\\\\) is given by \\\\(D = \\begin{pmatrix} a & 2 & 0\\\\ 3 & 1 & 2\\\\ 0 & -1 & 1\\end{pmatrix}\\\\) where \\\\(a\\ne 2\\\\).',))}
prose_suggestions_to_ignore = {'assets/nbs/assessment/2020/main.ipynb': set(('typography.symbols.curly_quotes', 'garner.preferred_forms')), 'assets/nbs/assessment/2020/solution.ipynb': set(('typography.symbols.curly_quotes', 'garner.preferred_forms')), 'assets/nbs/assessment/mock/main.ipynb': set(('typography.symbols.curly_quotes', 'garner.preferred_forms')), 'assets/nbs/assessment/mock/assignment.ipynb': set(('typography.symbols.curly_quotes', 'garner.preferred_forms')), 'assets/nbs/assessment/mock/solution.ipynb': set(('typography.symbols.curly_quotes', 'garner.preferred_forms')), 'assets/nbs/assessment/example/main.ipynb': set(('typography.symbols.curly_quotes', 'typography.symbols.ellipsis', 'garner.preferred_forms'))} |
#Booleans are operators that allow you to convey True or False statements
print(True)
print(False)
type(False)
print(1>2)
print(1==1)
b= None #None is used as a placeholder for an object that has not been assigned , so that object unassigned errors can be avoided
type(b)
print(b)
type(True)
| print(True)
print(False)
type(False)
print(1 > 2)
print(1 == 1)
b = None
type(b)
print(b)
type(True) |
def for_g():
for row in range(6):
for col in range(3):
if row-col==2 or col-row==1 or row+col==4 or col==2 and row>0 or row==5 and col==1 or row==1 and col==0:
print("*",end=" ")
else:
print(" ",end=" ")
print()
def while_g():
row=0
while row<6:
col=0
while col<3:
if row-col==2 or col-row==1 or row+col==4 or col==2 and row>0 or row==5 and col==1 or row==1 and col==0:
print("*",end=" ")
else:
print(" ",end=" ")
col+=1
row+=1
print()
| def for_g():
for row in range(6):
for col in range(3):
if row - col == 2 or col - row == 1 or row + col == 4 or (col == 2 and row > 0) or (row == 5 and col == 1) or (row == 1 and col == 0):
print('*', end=' ')
else:
print(' ', end=' ')
print()
def while_g():
row = 0
while row < 6:
col = 0
while col < 3:
if row - col == 2 or col - row == 1 or row + col == 4 or (col == 2 and row > 0) or (row == 5 and col == 1) or (row == 1 and col == 0):
print('*', end=' ')
else:
print(' ', end=' ')
col += 1
row += 1
print() |
ERR_SVR_NOT_FOUND = 1
ERR_CLSTR_NOT_FOUND = 2
ERR_IMG_NOT_FOUND = 3
ERR_SVR_EXISTS = 4
ERR_CLSTR_EXISTS = 5
ERR_IMG_EXISTS = 6
ERR_IMG_TYPE_INVALID = 7
ERR_OPR_ERROR = 8
ERR_GENERAL_ERROR = 9
ERR_MATCH_KEY_NOT_PRESENT = 10
ERR_MATCH_VALUE_NOT_PRESENT = 11
ERR_INVALID_MATCH_KEY = 12
| err_svr_not_found = 1
err_clstr_not_found = 2
err_img_not_found = 3
err_svr_exists = 4
err_clstr_exists = 5
err_img_exists = 6
err_img_type_invalid = 7
err_opr_error = 8
err_general_error = 9
err_match_key_not_present = 10
err_match_value_not_present = 11
err_invalid_match_key = 12 |
def swap_case(s):
# sWAP cASE in Python - HackerRank Solution START
Output = ''
for char in s:
if(char.isupper()==True):
Output += (char.lower())
elif(char.islower()==True):
Output += (char.upper())
else:
Output += char
return Output | def swap_case(s):
output = ''
for char in s:
if char.isupper() == True:
output += char.lower()
elif char.islower() == True:
output += char.upper()
else:
output += char
return Output |
a=10
b=1.5
c= 'Arpan'
print (c,"is of type",type(c) )
| a = 10
b = 1.5
c = 'Arpan'
print(c, 'is of type', type(c)) |
KNOWN_BINARIES = [
"*.avi", # video
"*.bin", # binary
"*.bmp", # image
"*.docx", # ms-word
"*.eot", # font
"*.exe", # binary
"*.gif", # image
"*.gz", # compressed
"*.heic", # image
"*.heif", # image
"*.ico", # image
"*.jpeg", # image
"*.jpg", # image
"*.m1v", # video
"*.m2a", # audio
"*.mov", # video
"*.mp2", # audio
"*.mp3", # audio
"*.mp4", # video
"*.mpa", # video
"*.mpe", # video
"*.mpeg", # video
"*.mpg", # video
"*.opus", # audio
"*.otf", # font
"*.pdf", # pdf
"*.png", # image
"*.pptx", # ms-powerpoint
"*.qt", # video
"*.rar", # compressed
"*.tar", # compressed
"*.tif", # image
"*.tiff", # image
"*.ttf", # font
"*.wasm", # wasm
"*.wav", # audio
"*.webm", # video
"*.wma", # video
"*.wmv", # video
"*.woff", # font
"*.woff2", # font
"*.xlsx", # ms-excel
"*.zip", # compressed
]
| known_binaries = ['*.avi', '*.bin', '*.bmp', '*.docx', '*.eot', '*.exe', '*.gif', '*.gz', '*.heic', '*.heif', '*.ico', '*.jpeg', '*.jpg', '*.m1v', '*.m2a', '*.mov', '*.mp2', '*.mp3', '*.mp4', '*.mpa', '*.mpe', '*.mpeg', '*.mpg', '*.opus', '*.otf', '*.pdf', '*.png', '*.pptx', '*.qt', '*.rar', '*.tar', '*.tif', '*.tiff', '*.ttf', '*.wasm', '*.wav', '*.webm', '*.wma', '*.wmv', '*.woff', '*.woff2', '*.xlsx', '*.zip'] |
ecc_fpga_constants_v128 = [
[
# Parameter name
"p192",
# base word size
16,
# extended word size
128,
# number of bits added
9,
# number of words
2,
# prime
6277101735386680763835789423207666416083908700390324961279,
# prime size in bits
192,
# prime+1
6277101735386680763835789423207666416083908700390324961280,
# prime' = -1/prime mod r
340282366920938463444927863358058659841,
# prime plus one number of zeroes
0,
# 2*prime
12554203470773361527671578846415332832167817400780649922558,
# r mod prime
340282366920938463481821351505477763072,
# r^2 mod prime
680564733841876926982089447084665077762,
# value 1
1,
# ECC curve order
6277101735386680763835789423176059013767194773182842284081,
# ECC curve order bit length
192,
# ECC curve constant a in Montgomery domain (*r mod prime)
6277101735386680762814942322444851025638444645873891672063,
# ECC curve constant a^2 in Montgomery domain (*r mod prime)
3062541302288446171336392163549299867648,
# ECC curve constant 3*b in Montgomery domain (*r mod prime)
2146011979814483024655457172515544228634458728892725334932,
# ECC curve constant a original
6277101735386680763835789423207666416083908700390324961276,
# ECC curve constant a^2 original
9,
# ECC curve constant 3*b original
1088364902640150689385092322384688938223415474093248752916,
# ECC curve generator point x original
602046282375688656758213480587526111916698976636884684818,
# ECC curve generator point y original
174050332293622031404857552280219410364023488927386650641,
# ECC curve generator point z original
1,
# ECC stack starting address
1792,
],
[
# Parameter name
"p224",
# base word size
16,
# extended word size
128,
# number of bits added
9,
# number of words
2,
# prime
26959946667150639794667015087019630673557916260026308143510066298881,
# prime size in bits
224,
# prime+1
26959946667150639794667015087019630673557916260026308143510066298882,
# prime' = -1/prime mod r
26959946660873538059280334323183841250350249843923952699046031785983,
# prime plus one number of zeroes
0,
# 2*prime
53919893334301279589334030174039261347115832520052616287020132597762,
# r mod prime
340282366920938463463374607427473244160,
# r^2 mod prime
26959946667150639791744011812698107204071485058075563455699384008705,
# value 1
1,
# ECC curve order
26959946667150639794667015087019625940457807714424391721682722368061,
# ECC curve order bit length
224,
# ECC curve constant a in Montgomery domain (*r mod prime)
26959946667150639794667015085998783572795100869636184321227646566401,
# ECC curve constant a^2 in Montgomery domain (*r mod prime)
3062541302288446171170371466847259197440,
# ECC curve constant 3*b in Montgomery domain (*r mod prime)
13401218465836556856847955134146467949031625748186257869499969637734,
# ECC curve constant a original
26959946667150639794667015087019630673557916260026308143510066298878,
# ECC curve constant a^2 original
9,
# ECC curve constant 3*b original
2954965522398544411891975459442517899398210385985346940341571419930,
# ECC curve generator point x original
19277929113566293071110308034699488026831934219452440156649784352033,
# ECC curve generator point y original
19926808758034470970197974370888749184205991990603949537637343198772,
# ECC curve generator point z original
1,
# ECC stack starting address
1792,
],
[
# Parameter name
"p256",
# base word size
16,
# extended word size
128,
# number of bits added
9,
# number of words
3,
# prime
115792089210356248762697446949407573530086143415290314195533631308867097853951,
# prime size in bits
256,
# prime+1
115792089210356248762697446949407573530086143415290314195533631308867097853952,
# prime' = -1/prime mod r
18347988923648598022536716706971804129709918677350277014173567881887264878223328924289981802626012577529857,
# prime plus one number of zeroes
0,
# 2*prime
231584178420712497525394893898815147060172286830580628391067262617734195707902,
# r mod prime
115792089183396302095546807154740558443747077475653503024948336717809816961022,
# r^2 mod prime
647038720017892456816164052675271495997532319237579337257304618696714,
# value 1
1,
# ECC curve order
115792089210356248762697446949407573529996955224135760342422259061068512044369,
# ECC curve order bit length
256,
# ECC curve constant a in Montgomery domain (*r mod prime)
80879840001451919384001045259017197818910433511755883773171842678787,
# ECC curve constant a^2 in Montgomery domain (*r mod prime)
115792088967716728758341688797404437753034549958559013660265979989351569817590,
# ECC curve constant 3*b in Montgomery domain (*r mod prime)
33495354891368907141352085619905772971337155559618643861777243941875987635246,
# ECC curve constant a original
115792089210356248762697446949407573530086143415290314195533631308867097853948,
# ECC curve constant a^2 original
9,
# ECC curve constant 3*b original
7383001965100177625280942390734231697257179632690862468972137633251304349922,
# ECC curve generator point x original
48439561293906451759052585252797914202762949526041747995844080717082404635286,
# ECC curve generator point y original
36134250956749795798585127919587881956611106672985015071877198253568414405109,
# ECC curve generator point z original
1,
# ECC stack starting address
1792,
],
[
# Parameter name
"p384",
# base word size
16,
# extended word size
128,
# number of bits added
9,
# number of words
4,
# prime
39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112319,
# prime size in bits
384,
# prime+1
39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112320,
# prime' = -1/prime mod r
13407807648985227524617045814712496250916495602455859132428975829761605269743128573023706335482896061566913845096358773683926276119763782985192138296262657,
# prime plus one number of zeroes
0,
# 2*prime
78804012392788958424558080200287227610159478540930893335896586808491443542993740658094532176517876003723213946224638,
# r mod prime
115792089264276142090721624801893421303298994787994962092745248076792575557632,
# r^2 mod prime
18347988930056559127812830772223728126786819762522737026661065083431152758333894840256060847379628934823936,
# value 1
1,
# ECC curve order
39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942643,
# ECC curve order bit length
384,
# ECC curve constant a in Montgomery domain (*r mod prime)
39402006196394479212279040100143613804732363002672618241676128529840041507586973344683281201980702257631229246439423,
# ECC curve constant a^2 in Montgomery domain (*r mod prime)
1042128803378485278816494623217040791729690953091954658834707232691133180018688,
# ECC curve constant 3*b in Montgomery domain (*r mod prime)
26111218080071188457686646591327611440845506966732540570282325137754995868870791235070305575251358638402738321777086,
# ECC curve constant a original
39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112316,
# ECC curve constant a^2 original
9,
# ECC curve constant 3*b original
3936568287090159208988955320879916669011239028153812228389535097474624180935841937314250118133359319573105337467087,
# ECC curve generator point x original
26247035095799689268623156744566981891852923491109213387815615900925518854738050089022388053975719786650872476732087,
# ECC curve generator point y original
8325710961489029985546751289520108179287853048861315594709205902480503199884419224438643760392947333078086511627871,
# ECC curve generator point z original
1,
# ECC stack starting address
1792,
],
[
# Parameter name
"p521",
# base word size
16,
# extended word size
128,
# number of bits added
9,
# number of words
5,
# prime
6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151,
# prime size in bits
521,
# prime+1
6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152,
# prime' = -1/prime mod r
6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057153,
# prime plus one number of zeroes
3,
# 2*prime
13729595320261219429963801598162786434538870600286610818788926918371086366795312104245119281322909109954592622782961716074243975999433287625148056582230114302,
# r mod prime
664613997892457936451903530140172288,
# r^2 mod prime
441711766194596082395824375185729628956870974218904739530401550323154944,
# value 1
1,
# ECC curve order
6864797660130609714981900799081393217269435300143305409394463459185543183397655394245057746333217197532963996371363321113864768612440380340372808892707005449,
# ECC curve order bit length
521,
# ECC curve constant a in Montgomery domain (*r mod prime)
6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858035128146006039270003218317700694540287,
# ECC curve constant a^2 in Montgomery domain (*r mod prime)
5981525981032121428067131771261550592,
# ECC curve constant 3*b in Montgomery domain (*r mod prime)
6454495390007915947061041987725961162904274121557891147018847125712493623674470779573474404800029704056764955388514936956769162135843165244571821404023458019,
# ECC curve constant a original
6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057148,
# ECC curve constant a^2 original
9,
# ECC curve constant 3*b original
3281547114221202823533337172300416709808622796855051246983759183487859348452205048041126212721278869745776396890118939928315357594773038736426982465436957952,
# ECC curve generator point x original
2661740802050217063228768716723360960729859168756973147706671368418802944996427808491545080627771902352094241225065558662157113545570916814161637315895999846,
# ECC curve generator point y original
3757180025770020463545507224491183603594455134769762486694567779615544477440556316691234405012945539562144444537289428522585666729196580810124344277578376784,
# ECC curve generator point z original
1,
# ECC stack starting address
1792,
],
]
| ecc_fpga_constants_v128 = [['p192', 16, 128, 9, 2, 6277101735386680763835789423207666416083908700390324961279, 192, 6277101735386680763835789423207666416083908700390324961280, 340282366920938463444927863358058659841, 0, 12554203470773361527671578846415332832167817400780649922558, 340282366920938463481821351505477763072, 680564733841876926982089447084665077762, 1, 6277101735386680763835789423176059013767194773182842284081, 192, 6277101735386680762814942322444851025638444645873891672063, 3062541302288446171336392163549299867648, 2146011979814483024655457172515544228634458728892725334932, 6277101735386680763835789423207666416083908700390324961276, 9, 1088364902640150689385092322384688938223415474093248752916, 602046282375688656758213480587526111916698976636884684818, 174050332293622031404857552280219410364023488927386650641, 1, 1792], ['p224', 16, 128, 9, 2, 26959946667150639794667015087019630673557916260026308143510066298881, 224, 26959946667150639794667015087019630673557916260026308143510066298882, 26959946660873538059280334323183841250350249843923952699046031785983, 0, 53919893334301279589334030174039261347115832520052616287020132597762, 340282366920938463463374607427473244160, 26959946667150639791744011812698107204071485058075563455699384008705, 1, 26959946667150639794667015087019625940457807714424391721682722368061, 224, 26959946667150639794667015085998783572795100869636184321227646566401, 3062541302288446171170371466847259197440, 13401218465836556856847955134146467949031625748186257869499969637734, 26959946667150639794667015087019630673557916260026308143510066298878, 9, 2954965522398544411891975459442517899398210385985346940341571419930, 19277929113566293071110308034699488026831934219452440156649784352033, 19926808758034470970197974370888749184205991990603949537637343198772, 1, 1792], ['p256', 16, 128, 9, 3, 115792089210356248762697446949407573530086143415290314195533631308867097853951, 256, 115792089210356248762697446949407573530086143415290314195533631308867097853952, 18347988923648598022536716706971804129709918677350277014173567881887264878223328924289981802626012577529857, 0, 231584178420712497525394893898815147060172286830580628391067262617734195707902, 115792089183396302095546807154740558443747077475653503024948336717809816961022, 647038720017892456816164052675271495997532319237579337257304618696714, 1, 115792089210356248762697446949407573529996955224135760342422259061068512044369, 256, 80879840001451919384001045259017197818910433511755883773171842678787, 115792088967716728758341688797404437753034549958559013660265979989351569817590, 33495354891368907141352085619905772971337155559618643861777243941875987635246, 115792089210356248762697446949407573530086143415290314195533631308867097853948, 9, 7383001965100177625280942390734231697257179632690862468972137633251304349922, 48439561293906451759052585252797914202762949526041747995844080717082404635286, 36134250956749795798585127919587881956611106672985015071877198253568414405109, 1, 1792], ['p384', 16, 128, 9, 4, 39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112319, 384, 39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112320, 13407807648985227524617045814712496250916495602455859132428975829761605269743128573023706335482896061566913845096358773683926276119763782985192138296262657, 0, 78804012392788958424558080200287227610159478540930893335896586808491443542993740658094532176517876003723213946224638, 115792089264276142090721624801893421303298994787994962092745248076792575557632, 18347988930056559127812830772223728126786819762522737026661065083431152758333894840256060847379628934823936, 1, 39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942643, 384, 39402006196394479212279040100143613804732363002672618241676128529840041507586973344683281201980702257631229246439423, 1042128803378485278816494623217040791729690953091954658834707232691133180018688, 26111218080071188457686646591327611440845506966732540570282325137754995868870791235070305575251358638402738321777086, 39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112316, 9, 3936568287090159208988955320879916669011239028153812228389535097474624180935841937314250118133359319573105337467087, 26247035095799689268623156744566981891852923491109213387815615900925518854738050089022388053975719786650872476732087, 8325710961489029985546751289520108179287853048861315594709205902480503199884419224438643760392947333078086511627871, 1, 1792], ['p521', 16, 128, 9, 5, 6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151, 521, 6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152, 6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057153, 3, 13729595320261219429963801598162786434538870600286610818788926918371086366795312104245119281322909109954592622782961716074243975999433287625148056582230114302, 664613997892457936451903530140172288, 441711766194596082395824375185729628956870974218904739530401550323154944, 1, 6864797660130609714981900799081393217269435300143305409394463459185543183397655394245057746333217197532963996371363321113864768612440380340372808892707005449, 521, 6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858035128146006039270003218317700694540287, 5981525981032121428067131771261550592, 6454495390007915947061041987725961162904274121557891147018847125712493623674470779573474404800029704056764955388514936956769162135843165244571821404023458019, 6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057148, 9, 3281547114221202823533337172300416709808622796855051246983759183487859348452205048041126212721278869745776396890118939928315357594773038736426982465436957952, 2661740802050217063228768716723360960729859168756973147706671368418802944996427808491545080627771902352094241225065558662157113545570916814161637315895999846, 3757180025770020463545507224491183603594455134769762486694567779615544477440556316691234405012945539562144444537289428522585666729196580810124344277578376784, 1, 1792]] |
OpenVZ_EXIT_STATUS = {
'vzctl': {0: 'Command executed successfully',
1: 'Failed to set a UBC parameter',
2: 'Failed to set a fair scheduler parameter',
3: 'Generic system error',
5: 'The running kernel is not an OpenVZ kernel (or some OpenVZ modules are not loaded)',
6: 'Not enough system resources',
7: 'ENV_CREATE ioctl failed',
8: 'Command executed by vzctl exec returned non-zero exit code',
9: 'Container is locked by another vzctl invocation',
10: 'Global OpenVZ configuration file vz.conf(5) not found',
11: 'A vzctl helper script file not found',
12: 'Permission denied',
13: 'Capability setting failed',
14: 'Container configuration file ctid.conf(5) not found',
15: 'Timeout on vzctl exec',
16: 'Error during vzctl chkpnt',
17: 'Error during vzctl restore',
18: 'Error from setluid() syscall',
20: 'Invalid command line parameter',
21: 'Invalid value for command line parameter',
22: 'Container root directory (VE_ROOT) not set',
23: 'Container private directory (VE_PRIVATE) not set',
24: 'Container template directory (TEMPLATE) not set',
28: 'Not all required UBC parameters are set, unable to start container',
29: 'OS template is not specified, unable to create container',
31: 'Container not running',
32: 'Container already running',
33: 'Unable to stop container',
34: 'Unable to add IP address to container',
40: 'Container not mounted',
41: 'Container already mounted',
43: 'Container private area not found',
44: 'Container private area already exists',
46: 'Not enough disk space',
47: 'Bad/broken container (/sbin/init or /bin/sh not found)',
48: 'Unable to create a new container private area',
49: 'Unable to create a new container root area',
50: 'Unable to mount container',
51: 'Unable to unmount container',
52: 'Unable to delete a container',
53: 'Container private area not exist',
60: 'vzquota on failed',
61: 'vzquota init failed',
62: 'vzquota setlimit failed',
63: 'Parameter DISKSPACE not set (or set too high)',
64: 'Parameter DISKINODES not set',
65: 'Error setting in-container disk quotas',
66: 'vzquota off failed',
67: 'ugid quota not initialized',
71: 'Incorrect IP address format',
74: 'Error changing password',
78: 'IP address already in use',
79: 'Container action script returned an error',
82: 'Config file copying error',
86: 'Error setting devices (--devices or --devnodes)',
89: 'IP address not available',
91: 'OS template not found',
99: 'Ploop is not supported by either the running kernel or vzctl.',
100: 'Unable to find container IP address',
104: 'VE_NETDEV ioctl error',
105: 'Container start disabled',
106: 'Unable to set iptables on a running container',
107: 'Distribution-specific configuration file not found',
109: 'Unable to apply a config',
129: 'Unable to set meminfo parameter',
130: 'Error setting veth interface',
131: 'Error setting container name',
133: 'Waiting for container start failed',
139: 'Error saving container configuration file',
148: 'Error setting container IO parameters (ioprio)',
150: 'Ploop image file not found',
151: 'Error creating ploop image',
152: 'Error mounting ploop image',
153: 'Error unmounting ploop image',
154: 'Error resizing ploop image',
155: 'Error converting container to ploop layout',
156: 'Error creating ploop snapshot',
157: 'Error merging ploop snapshot',
158: 'Error deleting ploop snapshot',
159: 'Error switching ploop snapshot',
161: 'Error compacting ploop image'},
'vzquoata': {0: 'Command executed successfully',
1: 'System error',
2: 'Usage error',
3: 'Virtuozzo syscall error',
4: 'Quota file error',
5: 'Quota is already running',
6: 'Quota is not running',
7: 'Can not get lock on this quota id',
8: 'Directory tree crosses mount points',
9: '(Info) Quota is running but user/group quota is inactive',
10: '(Info) Quota is marked as dirty in file',
11: 'Quota file does not exist',
12: 'Internal error',
13: "Can't obtain mount point"},
'ndsend': {0: 'Command executed successfully',
1: 'Usage error',
2: 'System error'},
'arpsend': {0: 'Command executed successfully',
1: 'Usage error',
2: 'System error',
3: 'ARP reply was received'},
'vzmigrate': {0: 'Command executed successfully',
1: 'Bad command line options.',
2: 'Container is stopped.',
4: "Can't connect to destination (source) HN.",
6: 'Container private area copying/moving failed.',
7: "Can't start or restore destination CT.",
8: "Can't stop or checkpoint source CT.",
9: 'Container already exists on destination HN.',
10: 'Container does not exists on source HN.',
12: 'You attempt to migrate CT which IP address(es) are already in use on the destination node.',
13: 'Operation with CT quota failed.',
14: 'OpenVZ is not running, or some required kernel modules are not loaded.',
15: 'Unable to set CT name on destination node.',
16: 'Ploop is not supported by destination node.'},
'vzcfgvalidate': {0: 'Command executed successfully',
1: 'On program execution error.',
2: 'Validation failed.'}
}
| open_vz_exit_status = {'vzctl': {0: 'Command executed successfully', 1: 'Failed to set a UBC parameter', 2: 'Failed to set a fair scheduler parameter', 3: 'Generic system error', 5: 'The running kernel is not an OpenVZ kernel (or some OpenVZ modules are not loaded)', 6: 'Not enough system resources', 7: 'ENV_CREATE ioctl failed', 8: 'Command executed by vzctl exec returned non-zero exit code', 9: 'Container is locked by another vzctl invocation', 10: 'Global OpenVZ configuration file vz.conf(5) not found', 11: 'A vzctl helper script file not found', 12: 'Permission denied', 13: 'Capability setting failed', 14: 'Container configuration file ctid.conf(5) not found', 15: 'Timeout on vzctl exec', 16: 'Error during vzctl chkpnt', 17: 'Error during vzctl restore', 18: 'Error from setluid() syscall', 20: 'Invalid command line parameter', 21: 'Invalid value for command line parameter', 22: 'Container root directory (VE_ROOT) not set', 23: 'Container private directory (VE_PRIVATE) not set', 24: 'Container template directory (TEMPLATE) not set', 28: 'Not all required UBC parameters are set, unable to start container', 29: 'OS template is not specified, unable to create container', 31: 'Container not running', 32: 'Container already running', 33: 'Unable to stop container', 34: 'Unable to add IP address to container', 40: 'Container not mounted', 41: 'Container already mounted', 43: 'Container private area not found', 44: 'Container private area already exists', 46: 'Not enough disk space', 47: 'Bad/broken container (/sbin/init or /bin/sh not found)', 48: 'Unable to create a new container private area', 49: 'Unable to create a new container root area', 50: 'Unable to mount container', 51: 'Unable to unmount container', 52: 'Unable to delete a container', 53: 'Container private area not exist', 60: 'vzquota on failed', 61: 'vzquota init failed', 62: 'vzquota setlimit failed', 63: 'Parameter DISKSPACE not set (or set too high)', 64: 'Parameter DISKINODES not set', 65: 'Error setting in-container disk quotas', 66: 'vzquota off failed', 67: 'ugid quota not initialized', 71: 'Incorrect IP address format', 74: 'Error changing password', 78: 'IP address already in use', 79: 'Container action script returned an error', 82: 'Config file copying error', 86: 'Error setting devices (--devices or --devnodes)', 89: 'IP address not available', 91: 'OS template not found', 99: 'Ploop is not supported by either the running kernel or vzctl.', 100: 'Unable to find container IP address', 104: 'VE_NETDEV ioctl error', 105: 'Container start disabled', 106: 'Unable to set iptables on a running container', 107: 'Distribution-specific configuration file not found', 109: 'Unable to apply a config', 129: 'Unable to set meminfo parameter', 130: 'Error setting veth interface', 131: 'Error setting container name', 133: 'Waiting for container start failed', 139: 'Error saving container configuration file', 148: 'Error setting container IO parameters (ioprio)', 150: 'Ploop image file not found', 151: 'Error creating ploop image', 152: 'Error mounting ploop image', 153: 'Error unmounting ploop image', 154: 'Error resizing ploop image', 155: 'Error converting container to ploop layout', 156: 'Error creating ploop snapshot', 157: 'Error merging ploop snapshot', 158: 'Error deleting ploop snapshot', 159: 'Error switching ploop snapshot', 161: 'Error compacting ploop image'}, 'vzquoata': {0: 'Command executed successfully', 1: 'System error', 2: 'Usage error', 3: 'Virtuozzo syscall error', 4: 'Quota file error', 5: 'Quota is already running', 6: 'Quota is not running', 7: 'Can not get lock on this quota id', 8: 'Directory tree crosses mount points', 9: '(Info) Quota is running but user/group quota is inactive', 10: '(Info) Quota is marked as dirty in file', 11: 'Quota file does not exist', 12: 'Internal error', 13: "Can't obtain mount point"}, 'ndsend': {0: 'Command executed successfully', 1: 'Usage error', 2: 'System error'}, 'arpsend': {0: 'Command executed successfully', 1: 'Usage error', 2: 'System error', 3: 'ARP reply was received'}, 'vzmigrate': {0: 'Command executed successfully', 1: 'Bad command line options.', 2: 'Container is stopped.', 4: "Can't connect to destination (source) HN.", 6: 'Container private area copying/moving failed.', 7: "Can't start or restore destination CT.", 8: "Can't stop or checkpoint source CT.", 9: 'Container already exists on destination HN.', 10: 'Container does not exists on source HN.', 12: 'You attempt to migrate CT which IP address(es) are already in use on the destination node.', 13: 'Operation with CT quota failed.', 14: 'OpenVZ is not running, or some required kernel modules are not loaded.', 15: 'Unable to set CT name on destination node.', 16: 'Ploop is not supported by destination node.'}, 'vzcfgvalidate': {0: 'Command executed successfully', 1: 'On program execution error.', 2: 'Validation failed.'}} |
# !/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/4/16 13:02
# @Author : Yunhao Cao
# @File : exceptions.py
__author__ = 'Yunhao Cao'
__all__ = [
'CrawlerBaseException',
'RuleManyMatchedError',
]
class CrawlerBaseException(Exception):
pass
class RuleManyMatchedError(CrawlerBaseException):
pass
| __author__ = 'Yunhao Cao'
__all__ = ['CrawlerBaseException', 'RuleManyMatchedError']
class Crawlerbaseexception(Exception):
pass
class Rulemanymatchederror(CrawlerBaseException):
pass |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.