content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
def crime_list(z): #function definition f=open(z,"r") #open csv file in read mode d1=dict() d2=dict() list1=[] list2=[] for line in f: line.strip() for lines in line.split(','): list1.append(lines[-1]) list2.append(lines[-2]) for y in list1: if y not in d1: d1[y]=1 else: d1[y]=d[y]+1 for z in list2: if z not in d2: d2[z]=1 else: d2[z]+=1 print("crime name",' '*15,"crimeid",' '*15,"crimecount") #printing Headers for k1,v in d1.items(): for k2,v in d2.items(): print(k1,k2,v, "\n") file="Crime.csv" crime_list(file) #function call
def crime_list(z): f = open(z, 'r') d1 = dict() d2 = dict() list1 = [] list2 = [] for line in f: line.strip() for lines in line.split(','): list1.append(lines[-1]) list2.append(lines[-2]) for y in list1: if y not in d1: d1[y] = 1 else: d1[y] = d[y] + 1 for z in list2: if z not in d2: d2[z] = 1 else: d2[z] += 1 print('crime name', ' ' * 15, 'crimeid', ' ' * 15, 'crimecount') for (k1, v) in d1.items(): for (k2, v) in d2.items(): print(k1, k2, v, '\n') file = 'Crime.csv' crime_list(file)
def part1(lines): total = 0 for box in lines: dim = list(map(int, box.split("x"))) lw = dim[0] * dim[1] wh = dim[1] * dim[2] hl = dim[2] * dim[0] total += 2*lw + 2*wh + 2*hl + min(lw,wh,hl) return total def part2(lines): total = 0 for box in lines: dim = sorted(list(map(int, box.split("x")))) total += dim[0] + dim[0] + dim[1] + dim[1] + dim[0]*dim[1]*dim[2] return total if __name__ == "__main__": with open("../input.txt") as file: lines = file.read().splitlines() print(part1(lines)) print(part2(lines))
def part1(lines): total = 0 for box in lines: dim = list(map(int, box.split('x'))) lw = dim[0] * dim[1] wh = dim[1] * dim[2] hl = dim[2] * dim[0] total += 2 * lw + 2 * wh + 2 * hl + min(lw, wh, hl) return total def part2(lines): total = 0 for box in lines: dim = sorted(list(map(int, box.split('x')))) total += dim[0] + dim[0] + dim[1] + dim[1] + dim[0] * dim[1] * dim[2] return total if __name__ == '__main__': with open('../input.txt') as file: lines = file.read().splitlines() print(part1(lines)) print(part2(lines))
def _findwinners(players): best = -1 winners = [] for i in range(len(players)): if players[i]: if best == -1 or players[i] > best: best = players[i] winners = [i] elif players[i] == best: winners.append(i) return winners def _splitpot(winners, pot): amount = pot // len(winners) winnings = [amount] * len(winners) winningsamount = amount * len(winners) for i in range(len(winnings)): if winningsamount >= amount: break winnings[i] += 1 winningsamount += 1 return winnings def payout(players, pots): payouts = [0] * len(players) for pot in pots: if pot['chips'] > 0: winners = _findwinners(players) if (len(winners) > 0): winnings = _splitpot(winners, pot['chips']) for i in range(len(winners)): payouts[winners[i]] += winnings[i] for allin in pot['players']: players[allin] = False return payouts if __name__ == '__main__': payouts = payout([False, [8, 13], [7, 14], False], [{ 'chips': 100, 'players': [] }]) if payouts != [0, 100, 0, 0]: print('Test1 failed') payouts = payout([False, [8, 13], [7, 14], False], [{ 'chips': 100, 'players': [1] }, { 'chips': 50, 'players': [] }]) if payouts != [0, 100, 50, 0]: print('Test2 failed') payouts = payout([False, [8, 13], [7, 14], [8, 13]], [{ 'chips': 100, 'players': [] }]) if payouts != [0, 50, 0, 50]: print('Test3 failed')
def _findwinners(players): best = -1 winners = [] for i in range(len(players)): if players[i]: if best == -1 or players[i] > best: best = players[i] winners = [i] elif players[i] == best: winners.append(i) return winners def _splitpot(winners, pot): amount = pot // len(winners) winnings = [amount] * len(winners) winningsamount = amount * len(winners) for i in range(len(winnings)): if winningsamount >= amount: break winnings[i] += 1 winningsamount += 1 return winnings def payout(players, pots): payouts = [0] * len(players) for pot in pots: if pot['chips'] > 0: winners = _findwinners(players) if len(winners) > 0: winnings = _splitpot(winners, pot['chips']) for i in range(len(winners)): payouts[winners[i]] += winnings[i] for allin in pot['players']: players[allin] = False return payouts if __name__ == '__main__': payouts = payout([False, [8, 13], [7, 14], False], [{'chips': 100, 'players': []}]) if payouts != [0, 100, 0, 0]: print('Test1 failed') payouts = payout([False, [8, 13], [7, 14], False], [{'chips': 100, 'players': [1]}, {'chips': 50, 'players': []}]) if payouts != [0, 100, 50, 0]: print('Test2 failed') payouts = payout([False, [8, 13], [7, 14], [8, 13]], [{'chips': 100, 'players': []}]) if payouts != [0, 50, 0, 50]: print('Test3 failed')
def avg(list): return (float(sum(list)) / len(list)) def apply(map, f_x, f_y): return {f_x(x): f_y(y) for x,y in map.items()} def linear(a, b): return (lambda x: (a * x + b)) def read_csv(filename): file = open(filename, "r") labels = file.readline()[:-1].split(',') print("We get {} from {}".format(labels[1], labels[0])) map = {} for line in file: x, y = line.split(',') map[int(x)] = int(y) file.close() return (map) def distance(map): def partial(single_cost): def total(f): sum = 0 for (x,y) in map.items(): sum += single_cost(f, x, y) return (sum / len(map)) return (total) return (partial) def train(): F = read_csv("data.csv") mx, my = max(F.keys()), max(F.values()) delta = distance(apply(F, lambda x: x/mx, lambda y: y/my)) dx = delta(lambda f,x,y: y - f(x)) dy = delta(lambda f,x,y: (y - f(x)) * x) cost = delta(lambda f,x,y: (y - f(x)) ** 2) theta = gradient_descent([dx, dy, cost]) return (theta[0] * my, theta[1] * my / mx) def gradient_descent(distance_functions): count = 0 learning_rate = 1.5 theta = [0, 0] prev_cost = 200 cur_cost = 100 while (count < 1000 and abs(cur_cost - prev_cost) > 10e-11): f = linear(theta[1], theta[0]) prev_cost = cur_cost cur_cost = distance_functions[2](f) for i in range(2): theta[i] += learning_rate * distance_functions[i](f) count += 1 print("Performed {} iterations".format(count)) return (theta)
def avg(list): return float(sum(list)) / len(list) def apply(map, f_x, f_y): return {f_x(x): f_y(y) for (x, y) in map.items()} def linear(a, b): return lambda x: a * x + b def read_csv(filename): file = open(filename, 'r') labels = file.readline()[:-1].split(',') print('We get {} from {}'.format(labels[1], labels[0])) map = {} for line in file: (x, y) = line.split(',') map[int(x)] = int(y) file.close() return map def distance(map): def partial(single_cost): def total(f): sum = 0 for (x, y) in map.items(): sum += single_cost(f, x, y) return sum / len(map) return total return partial def train(): f = read_csv('data.csv') (mx, my) = (max(F.keys()), max(F.values())) delta = distance(apply(F, lambda x: x / mx, lambda y: y / my)) dx = delta(lambda f, x, y: y - f(x)) dy = delta(lambda f, x, y: (y - f(x)) * x) cost = delta(lambda f, x, y: (y - f(x)) ** 2) theta = gradient_descent([dx, dy, cost]) return (theta[0] * my, theta[1] * my / mx) def gradient_descent(distance_functions): count = 0 learning_rate = 1.5 theta = [0, 0] prev_cost = 200 cur_cost = 100 while count < 1000 and abs(cur_cost - prev_cost) > 1e-10: f = linear(theta[1], theta[0]) prev_cost = cur_cost cur_cost = distance_functions[2](f) for i in range(2): theta[i] += learning_rate * distance_functions[i](f) count += 1 print('Performed {} iterations'.format(count)) return theta
class test: def __init__(self): pass def printer(self): print("hello world!") if __name__=='__main__': foo = test() foo.printer()
class Test: def __init__(self): pass def printer(self): print('hello world!') if __name__ == '__main__': foo = test() foo.printer()
res = client.get_arrays_space() print(res) if type(res) == pypureclient.responses.ValidResponse: print(list(res.items)) # list array space of file systems res = client.get_arrays_space(type='file-system') print(res) if type(res) == pypureclient.responses.ValidResponse: print(list(res.items)) # list historical array space res = client.get_arrays_space(start_time=START_TIME, end_time=END_TIME, resolution=30000) print(res) if type(res) == pypureclient.responses.ValidResponse: print(list(res.items))
res = client.get_arrays_space() print(res) if type(res) == pypureclient.responses.ValidResponse: print(list(res.items)) res = client.get_arrays_space(type='file-system') print(res) if type(res) == pypureclient.responses.ValidResponse: print(list(res.items)) res = client.get_arrays_space(start_time=START_TIME, end_time=END_TIME, resolution=30000) print(res) if type(res) == pypureclient.responses.ValidResponse: print(list(res.items))
# Created by MechAviv # Map ID :: 940001210 # Eastern Region of Pantheon : East Sanctum sm.curNodeEventEnd(True) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(True, True, False, False) sm.forcedInput(0) sm.forcedInput(2) sm.sendDelay(30) sm.forcedInput(0) OBJECT_1 = sm.sendNpcController(3000103, -300, 220) sm.showNpcSpecialActionByObjectId(OBJECT_1, "summon", 0) OBJECT_2 = sm.sendNpcController(3000104, -450, 220) sm.showNpcSpecialActionByObjectId(OBJECT_2, "summon", 0) OBJECT_3 = sm.sendNpcController(3000110, -120, 220) sm.showNpcSpecialActionByObjectId(OBJECT_3, "summon", 0) OBJECT_4 = sm.sendNpcController(3000114, -100, 220) sm.showNpcSpecialActionByObjectId(OBJECT_4, "summon", 0) OBJECT_5 = sm.sendNpcController(3000111, 130, 220) sm.showNpcSpecialActionByObjectId(OBJECT_5, "summon", 0) OBJECT_6 = sm.sendNpcController(3000115, 250, 220) sm.showNpcSpecialActionByObjectId(OBJECT_6, "summon", 0) sm.setSpeakerID(3000104) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext("Nothing here, big surprise...") sm.showEffect("Effect/Direction9.img/effect/story/BalloonMsg1/3", 1200, 0, -120, 0, OBJECT_2, False, 0) sm.showEffect("Effect/Direction9.img/effect/story/BalloonMsg1/3", 1200, 0, -120, -2, -2, False, 0) sm.showEffect("Effect/Direction9.img/effect/story/BalloonMsg1/4", 1200, 0, -120, 0, OBJECT_1, False, 0) sm.sendDelay(1200) sm.setSpeakerID(3000103) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext("Well, those priests are keeping busy. It's funny, though...I don't recognize any of them.") sm.setSpeakerID(3000103) sm.removeEscapeButton() sm.flipDialoguePlayerAsSpeaker() sm.setSpeakerType(3) sm.sendSay("Shhh! Something is not right. Velderoth!") sm.setSpeakerID(3000104) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay("You're right. They look suspicious. I'm going to run back to base and get help. You two stay here and keep an eye on them, okay? But no heroics. You get out of here if they spot you.") sm.showEffect("Effect/Direction9.img/effect/story/BalloonMsg0/0", 1200, 0, -120, 0, OBJECT_1, False, 0) sm.sendDelay(900) sm.setSpeakerID(3000103) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext("What are you talking about?") sm.sendNpcController(OBJECT_2, False) sm.setSpeakerID(3000103) sm.removeEscapeButton() sm.flipDialoguePlayerAsSpeaker() sm.setSpeakerType(3) sm.sendSay("They attacked the East Sanctum? What are they trying to do with the Relic?)") sm.setSpeakerID(3000110) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay("The relic's disappearance should weaken the shields.") # Unhandled Stat Changed [HP] Packet: 00 00 00 04 00 00 00 00 00 00 02 02 00 00 FF 00 00 00 00 sm.setSpeakerID(3000114) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay("I thought the relic was cursed... should we really be touching it?") sm.setSpeakerID(3000110) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay("I did not realize they allowed superstitious nincompoops entry to our order! Will you balk at the call of destiny?") sm.setSpeakerID(3000110) sm.removeEscapeButton() sm.flipDialoguePlayerAsSpeaker() sm.setSpeakerType(3) sm.sendSay("Are they trying to take the Relic?") sm.setSpeakerID(3000103) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay("We gotta stop them!") sm.moveNpcByObjectId(OBJECT_1, False, 300, 100) sm.sendDelay(300) sm.forcedInput(2) sm.showEffect("Effect/Direction9.img/effect/story/BalloonMsg1/1", 1200, 0, -120, 0, OBJECT_3, False, 0) sm.showEffect("Effect/Direction9.img/effect/story/BalloonMsg1/1", 1200, 0, -120, 0, OBJECT_4, False, 0) sm.showEffect("Effect/Direction9.img/effect/story/BalloonMsg1/1", 1200, 0, -120, 0, OBJECT_5, False, 0) sm.showEffect("Effect/Direction9.img/effect/story/BalloonMsg1/1", 1200, 0, -120, 0, OBJECT_6, False, 0) sm.sendDelay(600) sm.forcedInput(0) sm.showEffect("Effect/Direction9.img/effect/story/BalloonMsg1/7", 900, 0, -120, 0, OBJECT_1, False, 0) sm.sendDelay(900) sm.showFieldEffect("kaiser/tear_rush", 0) sm.sendDelay(3000) # Unhandled Message [COLLECTION_RECORD_MESSAGE] Packet: 2A 01 00 00 00 2F 00 31 30 3A 31 3A 32 3A 31 31 3D 34 3B 31 30 3A 31 3A 32 3A 31 32 3D 35 3B 31 30 3A 31 3A 33 3A 31 35 3D 34 3B 31 30 3A 31 3A 33 3A 31 36 3D 35 sm.sendNpcController(OBJECT_1, False) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(False, True, False, False) sm.sendNpcController(OBJECT_3, False) sm.sendNpcController(OBJECT_4, False) sm.sendNpcController(OBJECT_5, False) sm.sendNpcController(OBJECT_6, False) sm.warp(940001220, 0)
sm.curNodeEventEnd(True) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(True, True, False, False) sm.forcedInput(0) sm.forcedInput(2) sm.sendDelay(30) sm.forcedInput(0) object_1 = sm.sendNpcController(3000103, -300, 220) sm.showNpcSpecialActionByObjectId(OBJECT_1, 'summon', 0) object_2 = sm.sendNpcController(3000104, -450, 220) sm.showNpcSpecialActionByObjectId(OBJECT_2, 'summon', 0) object_3 = sm.sendNpcController(3000110, -120, 220) sm.showNpcSpecialActionByObjectId(OBJECT_3, 'summon', 0) object_4 = sm.sendNpcController(3000114, -100, 220) sm.showNpcSpecialActionByObjectId(OBJECT_4, 'summon', 0) object_5 = sm.sendNpcController(3000111, 130, 220) sm.showNpcSpecialActionByObjectId(OBJECT_5, 'summon', 0) object_6 = sm.sendNpcController(3000115, 250, 220) sm.showNpcSpecialActionByObjectId(OBJECT_6, 'summon', 0) sm.setSpeakerID(3000104) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext('Nothing here, big surprise...') sm.showEffect('Effect/Direction9.img/effect/story/BalloonMsg1/3', 1200, 0, -120, 0, OBJECT_2, False, 0) sm.showEffect('Effect/Direction9.img/effect/story/BalloonMsg1/3', 1200, 0, -120, -2, -2, False, 0) sm.showEffect('Effect/Direction9.img/effect/story/BalloonMsg1/4', 1200, 0, -120, 0, OBJECT_1, False, 0) sm.sendDelay(1200) sm.setSpeakerID(3000103) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext("Well, those priests are keeping busy. It's funny, though...I don't recognize any of them.") sm.setSpeakerID(3000103) sm.removeEscapeButton() sm.flipDialoguePlayerAsSpeaker() sm.setSpeakerType(3) sm.sendSay('Shhh! Something is not right. Velderoth!') sm.setSpeakerID(3000104) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay("You're right. They look suspicious. I'm going to run back to base and get help. You two stay here and keep an eye on them, okay? But no heroics. You get out of here if they spot you.") sm.showEffect('Effect/Direction9.img/effect/story/BalloonMsg0/0', 1200, 0, -120, 0, OBJECT_1, False, 0) sm.sendDelay(900) sm.setSpeakerID(3000103) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendNext('What are you talking about?') sm.sendNpcController(OBJECT_2, False) sm.setSpeakerID(3000103) sm.removeEscapeButton() sm.flipDialoguePlayerAsSpeaker() sm.setSpeakerType(3) sm.sendSay('They attacked the East Sanctum? What are they trying to do with the Relic?)') sm.setSpeakerID(3000110) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay("The relic's disappearance should weaken the shields.") sm.setSpeakerID(3000114) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay('I thought the relic was cursed... should we really be touching it?') sm.setSpeakerID(3000110) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay('I did not realize they allowed superstitious nincompoops entry to our order! Will you balk at the call of destiny?') sm.setSpeakerID(3000110) sm.removeEscapeButton() sm.flipDialoguePlayerAsSpeaker() sm.setSpeakerType(3) sm.sendSay('Are they trying to take the Relic?') sm.setSpeakerID(3000103) sm.removeEscapeButton() sm.setSpeakerType(3) sm.sendSay('We gotta stop them!') sm.moveNpcByObjectId(OBJECT_1, False, 300, 100) sm.sendDelay(300) sm.forcedInput(2) sm.showEffect('Effect/Direction9.img/effect/story/BalloonMsg1/1', 1200, 0, -120, 0, OBJECT_3, False, 0) sm.showEffect('Effect/Direction9.img/effect/story/BalloonMsg1/1', 1200, 0, -120, 0, OBJECT_4, False, 0) sm.showEffect('Effect/Direction9.img/effect/story/BalloonMsg1/1', 1200, 0, -120, 0, OBJECT_5, False, 0) sm.showEffect('Effect/Direction9.img/effect/story/BalloonMsg1/1', 1200, 0, -120, 0, OBJECT_6, False, 0) sm.sendDelay(600) sm.forcedInput(0) sm.showEffect('Effect/Direction9.img/effect/story/BalloonMsg1/7', 900, 0, -120, 0, OBJECT_1, False, 0) sm.sendDelay(900) sm.showFieldEffect('kaiser/tear_rush', 0) sm.sendDelay(3000) sm.sendNpcController(OBJECT_1, False) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(False, True, False, False) sm.sendNpcController(OBJECT_3, False) sm.sendNpcController(OBJECT_4, False) sm.sendNpcController(OBJECT_5, False) sm.sendNpcController(OBJECT_6, False) sm.warp(940001220, 0)
# 2019-01-31 # number sorting and reading in list score = [[80, 85, 90], [82, 87, 92], [75, 92, 84]] for i in range(len(score)): student = score[i] score_sum = 0 for j in student: score_sum += j # append the sum of scores score[i] = [score_sum] + score[i] # sorts the students according to the total sum number score.sort(reverse=True) for s in score: print(s[0], s[1], s[2], s[3])
score = [[80, 85, 90], [82, 87, 92], [75, 92, 84]] for i in range(len(score)): student = score[i] score_sum = 0 for j in student: score_sum += j score[i] = [score_sum] + score[i] score.sort(reverse=True) for s in score: print(s[0], s[1], s[2], s[3])
mysql={ 'host':"localhost", 'user':'root', 'password':'Liscannor10', 'database': 'datarepresentation' }
mysql = {'host': 'localhost', 'user': 'root', 'password': 'Liscannor10', 'database': 'datarepresentation'}
d = dict() d['0']='O' d['1']='l' d['3']='E' d['4']='A' d['5']='S' d['6']='G' d['8']='B' d['9']='g' s = input() for c in s: print(d[c] if c in d else c, end='')
d = dict() d['0'] = 'O' d['1'] = 'l' d['3'] = 'E' d['4'] = 'A' d['5'] = 'S' d['6'] = 'G' d['8'] = 'B' d['9'] = 'g' s = input() for c in s: print(d[c] if c in d else c, end='')
MIN_SQUARE = 0 MAX_SQUARE = 63 MAX_INT = 2 ** 64 - 1 STARTING_FEN = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" # DIRECTIONS NORTH = 8 EAST = 1 SOUTH = -8 WEST = -1 NE = 9 SE = -7 SW = -9 NW = 7 NWW = NW + WEST NNW = NORTH + NW NNE = NORTH + NE NEE = NE + EAST SEE = SE + EAST SSE = SOUTH + SE SSW = SOUTH + SW SWW = SW + WEST INFINITY = float("inf") MAX_PLY = 31 QUIESCENCE_SEARCH_DEPTH_PLY = 5
min_square = 0 max_square = 63 max_int = 2 ** 64 - 1 starting_fen = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1' north = 8 east = 1 south = -8 west = -1 ne = 9 se = -7 sw = -9 nw = 7 nww = NW + WEST nnw = NORTH + NW nne = NORTH + NE nee = NE + EAST see = SE + EAST sse = SOUTH + SE ssw = SOUTH + SW sww = SW + WEST infinity = float('inf') max_ply = 31 quiescence_search_depth_ply = 5
num = input()[::-1] # num = num[::-1] for i in num: if int(i)==0: print("ZERO") else: symbol = chr(int(i) + 33) print(symbol*int(i))
num = input()[::-1] for i in num: if int(i) == 0: print('ZERO') else: symbol = chr(int(i) + 33) print(symbol * int(i))
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'libwebp_dec', 'type': 'static_library', 'dependencies' : [ 'libwebp_dsp', 'libwebp_dsp_neon', 'libwebp_utils', ], 'include_dirs': ['.'], 'sources': [ '<(DEPTH)/third_party/libwebp/src/dec/alpha.c', '<(DEPTH)/third_party/libwebp/src/dec/buffer.c', '<(DEPTH)/third_party/libwebp/src/dec/frame.c', '<(DEPTH)/third_party/libwebp/src/dec/idec.c', '<(DEPTH)/third_party/libwebp/src/dec/io.c', '<(DEPTH)/third_party/libwebp/src/dec/quant.c', '<(DEPTH)/third_party/libwebp/src/dec/tree.c', '<(DEPTH)/third_party/libwebp/src/dec/vp8.c', '<(DEPTH)/third_party/libwebp/src/dec/vp8l.c', '<(DEPTH)/third_party/libwebp/src/dec/webp.c', ], }, { 'target_name': 'libwebp_demux', 'type': 'static_library', 'include_dirs': ['.'], 'sources': [ 'demux/demux.c', ], }, { 'target_name': 'libwebp_dsp', 'type': 'static_library', 'include_dirs': ['.'], 'sources': [ '<(DEPTH)/third_party/libwebp/src/dsp/alpha_processing.c', '<(DEPTH)/third_party/libwebp/src/dsp/cpu.c', '<(DEPTH)/third_party/libwebp/src/dsp/dec.c', '<(DEPTH)/third_party/libwebp/src/dsp/dec_clip_tables.c', '<(DEPTH)/third_party/libwebp/src/dsp/dec_mips32.c', '<(DEPTH)/third_party/libwebp/src/dsp/dec_sse2.c', '<(DEPTH)/third_party/libwebp/src/dsp/enc.c', '<(DEPTH)/third_party/libwebp/src/dsp/enc_avx2.c', '<(DEPTH)/third_party/libwebp/src/dsp/enc_mips32.c', '<(DEPTH)/third_party/libwebp/src/dsp/enc_sse2.c', '<(DEPTH)/third_party/libwebp/src/dsp/lossless.c', '<(DEPTH)/third_party/libwebp/src/dsp/lossless_mips32.c', '<(DEPTH)/third_party/libwebp/src/dsp/lossless_sse2.c', '<(DEPTH)/third_party/libwebp/src/dsp/upsampling.c', '<(DEPTH)/third_party/libwebp/src/dsp/upsampling_sse2.c', '<(DEPTH)/third_party/libwebp/src/dsp/yuv.c', '<(DEPTH)/third_party/libwebp/src/dsp/yuv_mips32.c', '<(DEPTH)/third_party/libwebp/src/dsp/yuv_sse2.c', ], # 'conditions': [ # ['OS == "android"', { # 'includes': [ 'android/cpufeatures.gypi' ], # }], # ['order_profiling != 0', { # 'target_conditions' : [ # ['_toolset=="target"', { # 'cflags!': [ '-finstrument-functions' ], # }], # ], # }], # ], }, { 'target_name': 'libwebp_dsp_neon', 'conditions': [ ['target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)', { 'type': 'static_library', 'include_dirs': ['.'], 'sources': [ '<(DEPTH)/third_party/libwebp/src/dsp/dec_neon.c', '<(DEPTH)/third_party/libwebp/src/dsp/enc_neon.c', '<(DEPTH)/third_party/libwebp/src/dsp/lossless_neon.c', '<(DEPTH)/third_party/libwebp/src/dsp/upsampling_neon.c', ], # behavior similar to *.c.neon in an Android.mk 'cflags!': [ '-mfpu=vfpv3-d16' ], 'cflags': [ '-mfpu=neon' ], },{ # "target_arch != "arm" or arm_version < 7" 'type': 'none', }], ['order_profiling != 0', { 'target_conditions' : [ ['_toolset=="target"', { 'cflags!': [ '-finstrument-functions' ], }], ], }], ], }, { 'target_name': 'libwebp_enc', 'type': 'static_library', 'include_dirs': ['.'], 'sources': [ '<(DEPTH)/third_party/libwebp/src/enc/alpha.c', '<(DEPTH)/third_party/libwebp/src/enc/analysis.c', '<(DEPTH)/third_party/libwebp/src/enc/backward_references.c', '<(DEPTH)/third_party/libwebp/src/enc/config.c', '<(DEPTH)/third_party/libwebp/src/enc/cost.c', '<(DEPTH)/third_party/libwebp/src/enc/filter.c', '<(DEPTH)/third_party/libwebp/src/enc/frame.c', '<(DEPTH)/third_party/libwebp/src/enc/histogram.c', '<(DEPTH)/third_party/libwebp/src/enc/iterator.c', '<(DEPTH)/third_party/libwebp/src/enc/picture.c', '<(DEPTH)/third_party/libwebp/src/enc/picture_csp.c', '<(DEPTH)/third_party/libwebp/src/enc/picture_psnr.c', '<(DEPTH)/third_party/libwebp/src/enc/picture_rescale.c', '<(DEPTH)/third_party/libwebp/src/enc/picture_tools.c', '<(DEPTH)/third_party/libwebp/src/enc/quant.c', '<(DEPTH)/third_party/libwebp/src/enc/syntax.c', '<(DEPTH)/third_party/libwebp/src/enc/token.c', '<(DEPTH)/third_party/libwebp/src/enc/tree.c', '<(DEPTH)/third_party/libwebp/src/enc/vp8l.c', '<(DEPTH)/third_party/libwebp/src/enc/webpenc.c', ], }, { 'target_name': 'libwebp_utils', 'type': 'static_library', 'include_dirs': ['.'], 'sources': [ '<(DEPTH)/third_party/libwebp/src/utils/bit_reader.c', '<(DEPTH)/third_party/libwebp/src/utils/bit_writer.c', '<(DEPTH)/third_party/libwebp/src/utils/color_cache.c', '<(DEPTH)/third_party/libwebp/src/utils/filters.c', '<(DEPTH)/third_party/libwebp/src/utils/huffman.c', '<(DEPTH)/third_party/libwebp/src/utils/huffman_encode.c', '<(DEPTH)/third_party/libwebp/src/utils/quant_levels.c', '<(DEPTH)/third_party/libwebp/src/utils/quant_levels_dec.c', '<(DEPTH)/third_party/libwebp/src/utils/random.c', '<(DEPTH)/third_party/libwebp/src/utils/rescaler.c', '<(DEPTH)/third_party/libwebp/src/utils/thread.c', '<(DEPTH)/third_party/libwebp/src/utils/utils.c', ], }, { 'target_name': 'libwebp_mux', 'type': 'static_library', 'include_dirs': ['.'], 'sources': [ '<(DEPTH)/third_party/libwebp/src/mux/muxedit.c', '<(DEPTH)/third_party/libwebp/src/mux/muxinternal.c', '<(DEPTH)/third_party/libwebp/src/mux/muxread.c', ], }, { 'target_name': 'libwebp_enc_mux', 'type': 'static_library', 'dependencies': [ 'libwebp_mux', ], 'include_dirs': [ '<(DEPTH)/third_party/libwebp/src', ], 'sources': [ '<(DEPTH)/third_party/libwebp/examples/gif2webp_util.c', ], }, { 'target_name': 'libwebp', 'type': 'none', 'dependencies' : [ 'libwebp_dec', 'libwebp_demux', 'libwebp_dsp', 'libwebp_dsp_neon', 'libwebp_enc', 'libwebp_enc_mux', 'libwebp_utils', ], 'direct_dependent_settings': { 'include_dirs': ['.'], }, 'conditions': [ ['OS!="win"', {'product_name': 'webp'}], ], }, ], }
{'targets': [{'target_name': 'libwebp_dec', 'type': 'static_library', 'dependencies': ['libwebp_dsp', 'libwebp_dsp_neon', 'libwebp_utils'], 'include_dirs': ['.'], 'sources': ['<(DEPTH)/third_party/libwebp/src/dec/alpha.c', '<(DEPTH)/third_party/libwebp/src/dec/buffer.c', '<(DEPTH)/third_party/libwebp/src/dec/frame.c', '<(DEPTH)/third_party/libwebp/src/dec/idec.c', '<(DEPTH)/third_party/libwebp/src/dec/io.c', '<(DEPTH)/third_party/libwebp/src/dec/quant.c', '<(DEPTH)/third_party/libwebp/src/dec/tree.c', '<(DEPTH)/third_party/libwebp/src/dec/vp8.c', '<(DEPTH)/third_party/libwebp/src/dec/vp8l.c', '<(DEPTH)/third_party/libwebp/src/dec/webp.c']}, {'target_name': 'libwebp_demux', 'type': 'static_library', 'include_dirs': ['.'], 'sources': ['demux/demux.c']}, {'target_name': 'libwebp_dsp', 'type': 'static_library', 'include_dirs': ['.'], 'sources': ['<(DEPTH)/third_party/libwebp/src/dsp/alpha_processing.c', '<(DEPTH)/third_party/libwebp/src/dsp/cpu.c', '<(DEPTH)/third_party/libwebp/src/dsp/dec.c', '<(DEPTH)/third_party/libwebp/src/dsp/dec_clip_tables.c', '<(DEPTH)/third_party/libwebp/src/dsp/dec_mips32.c', '<(DEPTH)/third_party/libwebp/src/dsp/dec_sse2.c', '<(DEPTH)/third_party/libwebp/src/dsp/enc.c', '<(DEPTH)/third_party/libwebp/src/dsp/enc_avx2.c', '<(DEPTH)/third_party/libwebp/src/dsp/enc_mips32.c', '<(DEPTH)/third_party/libwebp/src/dsp/enc_sse2.c', '<(DEPTH)/third_party/libwebp/src/dsp/lossless.c', '<(DEPTH)/third_party/libwebp/src/dsp/lossless_mips32.c', '<(DEPTH)/third_party/libwebp/src/dsp/lossless_sse2.c', '<(DEPTH)/third_party/libwebp/src/dsp/upsampling.c', '<(DEPTH)/third_party/libwebp/src/dsp/upsampling_sse2.c', '<(DEPTH)/third_party/libwebp/src/dsp/yuv.c', '<(DEPTH)/third_party/libwebp/src/dsp/yuv_mips32.c', '<(DEPTH)/third_party/libwebp/src/dsp/yuv_sse2.c']}, {'target_name': 'libwebp_dsp_neon', 'conditions': [['target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)', {'type': 'static_library', 'include_dirs': ['.'], 'sources': ['<(DEPTH)/third_party/libwebp/src/dsp/dec_neon.c', '<(DEPTH)/third_party/libwebp/src/dsp/enc_neon.c', '<(DEPTH)/third_party/libwebp/src/dsp/lossless_neon.c', '<(DEPTH)/third_party/libwebp/src/dsp/upsampling_neon.c'], 'cflags!': ['-mfpu=vfpv3-d16'], 'cflags': ['-mfpu=neon']}, {'type': 'none'}], ['order_profiling != 0', {'target_conditions': [['_toolset=="target"', {'cflags!': ['-finstrument-functions']}]]}]]}, {'target_name': 'libwebp_enc', 'type': 'static_library', 'include_dirs': ['.'], 'sources': ['<(DEPTH)/third_party/libwebp/src/enc/alpha.c', '<(DEPTH)/third_party/libwebp/src/enc/analysis.c', '<(DEPTH)/third_party/libwebp/src/enc/backward_references.c', '<(DEPTH)/third_party/libwebp/src/enc/config.c', '<(DEPTH)/third_party/libwebp/src/enc/cost.c', '<(DEPTH)/third_party/libwebp/src/enc/filter.c', '<(DEPTH)/third_party/libwebp/src/enc/frame.c', '<(DEPTH)/third_party/libwebp/src/enc/histogram.c', '<(DEPTH)/third_party/libwebp/src/enc/iterator.c', '<(DEPTH)/third_party/libwebp/src/enc/picture.c', '<(DEPTH)/third_party/libwebp/src/enc/picture_csp.c', '<(DEPTH)/third_party/libwebp/src/enc/picture_psnr.c', '<(DEPTH)/third_party/libwebp/src/enc/picture_rescale.c', '<(DEPTH)/third_party/libwebp/src/enc/picture_tools.c', '<(DEPTH)/third_party/libwebp/src/enc/quant.c', '<(DEPTH)/third_party/libwebp/src/enc/syntax.c', '<(DEPTH)/third_party/libwebp/src/enc/token.c', '<(DEPTH)/third_party/libwebp/src/enc/tree.c', '<(DEPTH)/third_party/libwebp/src/enc/vp8l.c', '<(DEPTH)/third_party/libwebp/src/enc/webpenc.c']}, {'target_name': 'libwebp_utils', 'type': 'static_library', 'include_dirs': ['.'], 'sources': ['<(DEPTH)/third_party/libwebp/src/utils/bit_reader.c', '<(DEPTH)/third_party/libwebp/src/utils/bit_writer.c', '<(DEPTH)/third_party/libwebp/src/utils/color_cache.c', '<(DEPTH)/third_party/libwebp/src/utils/filters.c', '<(DEPTH)/third_party/libwebp/src/utils/huffman.c', '<(DEPTH)/third_party/libwebp/src/utils/huffman_encode.c', '<(DEPTH)/third_party/libwebp/src/utils/quant_levels.c', '<(DEPTH)/third_party/libwebp/src/utils/quant_levels_dec.c', '<(DEPTH)/third_party/libwebp/src/utils/random.c', '<(DEPTH)/third_party/libwebp/src/utils/rescaler.c', '<(DEPTH)/third_party/libwebp/src/utils/thread.c', '<(DEPTH)/third_party/libwebp/src/utils/utils.c']}, {'target_name': 'libwebp_mux', 'type': 'static_library', 'include_dirs': ['.'], 'sources': ['<(DEPTH)/third_party/libwebp/src/mux/muxedit.c', '<(DEPTH)/third_party/libwebp/src/mux/muxinternal.c', '<(DEPTH)/third_party/libwebp/src/mux/muxread.c']}, {'target_name': 'libwebp_enc_mux', 'type': 'static_library', 'dependencies': ['libwebp_mux'], 'include_dirs': ['<(DEPTH)/third_party/libwebp/src'], 'sources': ['<(DEPTH)/third_party/libwebp/examples/gif2webp_util.c']}, {'target_name': 'libwebp', 'type': 'none', 'dependencies': ['libwebp_dec', 'libwebp_demux', 'libwebp_dsp', 'libwebp_dsp_neon', 'libwebp_enc', 'libwebp_enc_mux', 'libwebp_utils'], 'direct_dependent_settings': {'include_dirs': ['.']}, 'conditions': [['OS!="win"', {'product_name': 'webp'}]]}]}
class Usuario: def __init__(self, nome) -> None: self.nome = nome self.id = None
class Usuario: def __init__(self, nome) -> None: self.nome = nome self.id = None
_all__ = [ 'Auto' ] class Auto(object): pass
_all__ = ['Auto'] class Auto(object): pass
def add(number_one, number_two): return number_one + number_two def multiply(number_one, number_two): return number_one * number_two if __name__ == "__main__": print(add(3, 4)) print(multiply(5, 5))
def add(number_one, number_two): return number_one + number_two def multiply(number_one, number_two): return number_one * number_two if __name__ == '__main__': print(add(3, 4)) print(multiply(5, 5))
# ElasticQuery # File: exception.py # Desc: ES query builder exceptions class QueryError(ValueError): pass class NoQueryError(QueryError): pass class NoAggregateError(QueryError): pass class NoSuggesterError(QueryError): pass class MissingArgError(ValueError): pass
class Queryerror(ValueError): pass class Noqueryerror(QueryError): pass class Noaggregateerror(QueryError): pass class Nosuggestererror(QueryError): pass class Missingargerror(ValueError): pass
#serie a,b,a,b,a,b.... limite = int(input("Digite las veces que se repetira: ")) interructor = True controlador = 0 letra = "" while controlador < limite: controlador = controlador + 1 if interructor: letra = "A" interructor = False else: letra = "B" interructor = True print(letra, end=", ")
limite = int(input('Digite las veces que se repetira: ')) interructor = True controlador = 0 letra = '' while controlador < limite: controlador = controlador + 1 if interructor: letra = 'A' interructor = False else: letra = 'B' interructor = True print(letra, end=', ')
# Longest Common Subsequence def lcs(X, Y, m, n): if m == 0 or n == 0: return 0 elif X[m - 1] == Y[n - 1]: return 1 + lcs(X, Y, m-1, n-1) else: return max(lcs(X, Y, m, n-1), lcs(X, Y, m-1, n)) X = 'AGGTAB' Y = 'GXTXAYB' print('Length of LCS is ', lcs(X, Y, len(X), len(Y))) ''' Output:- >>> Length of LCS is 4 '''
def lcs(X, Y, m, n): if m == 0 or n == 0: return 0 elif X[m - 1] == Y[n - 1]: return 1 + lcs(X, Y, m - 1, n - 1) else: return max(lcs(X, Y, m, n - 1), lcs(X, Y, m - 1, n)) x = 'AGGTAB' y = 'GXTXAYB' print('Length of LCS is ', lcs(X, Y, len(X), len(Y))) '\nOutput:-\n>>> \nLength of LCS is 4\n'
#!env python # # ACSL Intermediate Division - Number Transformation - 2019-2020 # Solution by Arul John # 2020-11-22 # # Function to do the number transformations def number_transformation(n, p): str_n = n n = int(n) p = int(p) if len(str_n) < p: return str_n_ans = '' # answer # index of the Pth digit i = len(str_n) - p # Pth digit pth_digit = int(str_n[i:i+1]) str_n_right = str_n[i+1:] str_n_left = str_n[:i] for c in str_n_left: str_n_ans += str((int(c) + pth_digit) % 10) str_n_ans += str(pth_digit) for c in str_n_right: str_n_ans += str(abs(int(c) - pth_digit)) return int(str_n_ans) # Tests def test_number_transformation(): test_data = [('296351 5', 193648), ('762184 3', 873173), ('45873216 7', 95322341), ('19750418 6', 86727361), ('386257914 5', 831752441) ] for test_input, answer in test_data: testlist = test_input.split(' ') assert number_transformation(*testlist) == answer # Main if __name__ == "__main__": test_number_transformation() n, p = input().split() print(number_transformation(n, p))
def number_transformation(n, p): str_n = n n = int(n) p = int(p) if len(str_n) < p: return str_n_ans = '' i = len(str_n) - p pth_digit = int(str_n[i:i + 1]) str_n_right = str_n[i + 1:] str_n_left = str_n[:i] for c in str_n_left: str_n_ans += str((int(c) + pth_digit) % 10) str_n_ans += str(pth_digit) for c in str_n_right: str_n_ans += str(abs(int(c) - pth_digit)) return int(str_n_ans) def test_number_transformation(): test_data = [('296351 5', 193648), ('762184 3', 873173), ('45873216 7', 95322341), ('19750418 6', 86727361), ('386257914 5', 831752441)] for (test_input, answer) in test_data: testlist = test_input.split(' ') assert number_transformation(*testlist) == answer if __name__ == '__main__': test_number_transformation() (n, p) = input().split() print(number_transformation(n, p))
def fileNaming(names): for i in range(1, len(names)): temp = names[i] counter = 1 while temp in names[0:i]: temp = f"{names[i]}({counter})" counter += 1 names[i] = temp return names print(fileNaming(["doc", "doc", "image", "doc(1)", "doc"]))
def file_naming(names): for i in range(1, len(names)): temp = names[i] counter = 1 while temp in names[0:i]: temp = f'{names[i]}({counter})' counter += 1 names[i] = temp return names print(file_naming(['doc', 'doc', 'image', 'doc(1)', 'doc']))
helpline_numbers = { 'source':'https://www.mohfw.gov.in/pdf/coronvavirushelplinenumber.pdf', 'helpline_number':'+91-11-23978046', 'toll_free':'1075', 'helpline_email':'ncov2019@gov.in', 'contact_details':[ { 'state_or_UT':'Andhra Pradesh', 'helpline_number':'0866-2410978' }, { 'state_or_UT':'Arunachal Pradesh', 'helpline_number':'9436055743' }, { 'state_or_UT':'Assam', 'helpline_number':'6913347770' }, { 'state_or_UT':'Bihar', 'helpline_number':'104' }, { 'state_or_UT':'Chhattisgarh', 'helpline_number':'104' }, { 'state_or_UT':'Goa', 'helpline_number':'104' }, { 'state_or_UT':'Gujarat', 'helpline_number':'104' }, { 'state_or_UT':'Haryana', 'helpline_number':'8558893911' }, { 'state_or_UT':'Himachal Pradesh', 'helpline_number':'104' }, { 'state_or_UT':'Jharkhand', 'helpline_number':'104' }, { 'state_or_UT':'Karnataka', 'helpline_number':'104' }, { 'state_or_UT':'Kerala', 'helpline_number':'0471-2552056' }, { 'state_or_UT':'Madhya Pradesh', 'helpline_number':'104' }, { 'state_or_UT':'Maharashtra', 'helpline_number':'020-26127394' }, { 'state_or_UT':'Manipur', 'helpline_number':'3852411668' }, { 'state_or_UT':'Meghalaya', 'helpline_number':'108' }, { 'state_or_UT':'Mizoram', 'helpline_number':'102' }, { 'state_or_UT':'Nagaland', 'helpline_number':'7005539653' }, { 'state_or_UT':'Odisha', 'helpline_number':'9439994859' }, { 'state_or_UT':'Punjab', 'helpline_number':'104' }, { 'state_or_UT':'Rajasthan', 'helpline_number':'0141-2225624' }, { 'state_or_UT':'Sikkim', 'helpline_number':'104' }, { 'state_or_UT':'Tamil Nadu', 'helpline_number':'044-29510500' }, { 'state_or_UT':'Telangana', 'helpline_number':'104' }, { 'state_or_UT':'Tripura', 'helpline_number':'0381-2315879' }, { 'state_or_UT':'Uttarakhand', 'helpline_number':'104' }, { 'state_or_UT':'Uttar Pradesh', 'helpline_number':'18001805145' }, { 'state_or_UT':'West Bengal', 'helpline_number':'1800313444222 , 03323412600' }, { 'state_or_UT':'Andaman and Nicobar Islands', 'helpline_number':'03192-232102' }, { 'state_or_UT':'Chandigarh', 'helpline_number':'9779558282' }, { 'state_or_UT':'Dadra and Nagar Haveli and Daman & Diu', 'helpline_number':'104' }, { 'state_or_UT':'Delhi', 'helpline_number':'011-22307145' }, { 'state_or_UT':'Jammu & Kashmir', 'helpline_number':'01912520982, 0194-2440283' }, { 'state_or_UT':'Ladakh', 'helpline_number':'01982256462' }, { 'state_or_UT':'Lakshadweep', 'helpline_number':'104' }, { 'state_or_UT':'Puducherry', 'helpline_number':'104' } ] }
helpline_numbers = {'source': 'https://www.mohfw.gov.in/pdf/coronvavirushelplinenumber.pdf', 'helpline_number': '+91-11-23978046', 'toll_free': '1075', 'helpline_email': 'ncov2019@gov.in', 'contact_details': [{'state_or_UT': 'Andhra Pradesh', 'helpline_number': '0866-2410978'}, {'state_or_UT': 'Arunachal Pradesh', 'helpline_number': '9436055743'}, {'state_or_UT': 'Assam', 'helpline_number': '6913347770'}, {'state_or_UT': 'Bihar', 'helpline_number': '104'}, {'state_or_UT': 'Chhattisgarh', 'helpline_number': '104'}, {'state_or_UT': 'Goa', 'helpline_number': '104'}, {'state_or_UT': 'Gujarat', 'helpline_number': '104'}, {'state_or_UT': 'Haryana', 'helpline_number': '8558893911'}, {'state_or_UT': 'Himachal Pradesh', 'helpline_number': '104'}, {'state_or_UT': 'Jharkhand', 'helpline_number': '104'}, {'state_or_UT': 'Karnataka', 'helpline_number': '104'}, {'state_or_UT': 'Kerala', 'helpline_number': '0471-2552056'}, {'state_or_UT': 'Madhya Pradesh', 'helpline_number': '104'}, {'state_or_UT': 'Maharashtra', 'helpline_number': '020-26127394'}, {'state_or_UT': 'Manipur', 'helpline_number': '3852411668'}, {'state_or_UT': 'Meghalaya', 'helpline_number': '108'}, {'state_or_UT': 'Mizoram', 'helpline_number': '102'}, {'state_or_UT': 'Nagaland', 'helpline_number': '7005539653'}, {'state_or_UT': 'Odisha', 'helpline_number': '9439994859'}, {'state_or_UT': 'Punjab', 'helpline_number': '104'}, {'state_or_UT': 'Rajasthan', 'helpline_number': '0141-2225624'}, {'state_or_UT': 'Sikkim', 'helpline_number': '104'}, {'state_or_UT': 'Tamil Nadu', 'helpline_number': '044-29510500'}, {'state_or_UT': 'Telangana', 'helpline_number': '104'}, {'state_or_UT': 'Tripura', 'helpline_number': '0381-2315879'}, {'state_or_UT': 'Uttarakhand', 'helpline_number': '104'}, {'state_or_UT': 'Uttar Pradesh', 'helpline_number': '18001805145'}, {'state_or_UT': 'West Bengal', 'helpline_number': '1800313444222 , 03323412600'}, {'state_or_UT': 'Andaman and Nicobar Islands', 'helpline_number': '03192-232102'}, {'state_or_UT': 'Chandigarh', 'helpline_number': '9779558282'}, {'state_or_UT': 'Dadra and Nagar Haveli and Daman & Diu', 'helpline_number': '104'}, {'state_or_UT': 'Delhi', 'helpline_number': '011-22307145'}, {'state_or_UT': 'Jammu & Kashmir', 'helpline_number': '01912520982, 0194-2440283'}, {'state_or_UT': 'Ladakh', 'helpline_number': '01982256462'}, {'state_or_UT': 'Lakshadweep', 'helpline_number': '104'}, {'state_or_UT': 'Puducherry', 'helpline_number': '104'}]}
# Utility macros for Twister2 core files def twister2_core_files(): return twister2_core_conf_files() + twister2_core_lib_files() def twister2_core_conf_files(): return [ "//twister2/config/src/yaml:config-system-yaml", "//twister2/config/src/yaml:common-conf-yaml", ] def twister2_core_lib_files(): return twister2_core_lib_resource_scheduler_files() + \ twister2_core_lib_task_scheduler_files() + \ twister2_core_lib_communication_files() def twister2_core_lib_resource_scheduler_files(): return [ "//twister2/resource-scheduler/src/java:resource-scheduler-java", ] def twister2_core_lib_task_scheduler_files(): return [ "//twister2/taskscheduler/src/java:taskscheduler-java", ] def twister2_core_lib_communication_files(): return [ "//twister2/comms/src/java:comms-java", "//twister2/proto:proto-jobmaster-java", ] def twister2_core_lib_connector_files(): return [ "//twister2/connectors/src/java:connector-java", "@org_xerial_snappy_snappy_java//jar", "@org_lz4_lz4_java//jar", "@org_slf4j_slf4j_api//jar", "@org_apache_kafka_kafka_clients//jar", ] def twister2_client_lib_master_files(): return [ "//twister2/connectors/src/java:master-java", ] def twister2_core_lib_data_files(): return [ "//twister2/data/src/main/java:data-java", "@org_apache_hadoop_hadoop_hdfs//jar", "@org_apache_hadoop_hadoop_common//jar", "@org_apache_hadoop_hadoop_annotations//jar", "@org_apache_hadoop_hadoop_auth//jar", "@org_apache_hadoop_hadoop_mapreduce_client_core//jar", "@com_google_code_findbugs_jsr305//jar", "@com_fasterxml_woodstox_woodstox_core//jar", "@org_codehaus_woodstox_stax2_api//jar", "@commons_io_commons_io//jar", "@commons_collections_commons_collections//jar", "@org_apache_commons_commons_lang3//jar", "@commons_configuration_commons_configuration//jar", "@log4j_log4j//jar", "@org_apache_htrace_htrace_core4//jar", "@org_apache_hadoop_hadoop_hdfs_client//jar", ] def twister2_core_lib_executor_files(): return [ "//twister2/executor/src/java:executor-java", ] def twister2_core_lib_data_lmdb_files(): return [ "//twister2/data/src/main/java:data-java", "@org_lmdbjava_lmdbjava//jar", "@org_lmdbjava_lmdbjava_native_linux_x86_64//jar", "@org_lmdbjava_lmdbjava_native_windows_x86_64//jar", "@org_lmdbjava_lmdbjava_native_osx_x86_64//jar", "@com_github_jnr_jnr_ffi//jar", "@com_github_jnr_jnr_constants//jar", "@com_github_jnr_jffi//jar", "//third_party:com_github_jnr_jffi_native", ] def twister2_harp_integration_files(): return [ "//twister2/compatibility/harp:twister2-harp", "//third_party:harp_collective", "@it_unimi_dsi_fastutil//jar", ] def twister2_dashboard_files(): return [ "//dashboard/server:twister2-dash-server", ] def twister2_core_checkpointing_files(): return [ "//twister2/checkpointing/src/java:checkpointing-java", ] def twister2_core_tset_files(): return [ "//twister2/tset/src/java:tset-java", "@maven//:com_google_re2j_re2j" ] def twister2_core_restarter_files(): return [ "//twister2/checkpointing/src/java/edu/iu/dsc/tws/restarter:restarter-java", ] def twister2_storm_files(): return [ "//twister2/compatibility/storm:twister2-storm", ] def twister2_beam_files(): return [ "//twister2/compatibility/beam:twister2-beam", "@org_apache_beam_beam_runners_core_java//jar", "@org_apache_beam_beam_sdks_java_core//jar", "@org_apache_beam_beam_model_pipeline//jar", "@org_apache_beam_beam_runners_java_fn_execution//jar", "@com_fasterxml_jackson_core_jackson_annotations//jar", "@joda_time_joda_time//jar", "@org_apache_beam_beam_runners_core_construction_java//jar", "@com_google_guava_guava//jar", "//third_party:vendored_grpc_1_21_0", "//third_party:vendored_guava_26_0_jre", "@org_apache_beam_beam_vendor_guava_20_0//jar", "@javax_xml_bind_jaxb_api//jar", "@org_apache_beam_beam_vendor_sdks_java_extensions_protobuf//jar", "@org_apache_beam_beam_vendor_grpc_1_13_1//jar", ] def twister2_python_support_files(): return [ "//twister2/python-support:python-support", "@net_sf_py4j_py4j//jar", "@black_ninia_jep//jar", ]
def twister2_core_files(): return twister2_core_conf_files() + twister2_core_lib_files() def twister2_core_conf_files(): return ['//twister2/config/src/yaml:config-system-yaml', '//twister2/config/src/yaml:common-conf-yaml'] def twister2_core_lib_files(): return twister2_core_lib_resource_scheduler_files() + twister2_core_lib_task_scheduler_files() + twister2_core_lib_communication_files() def twister2_core_lib_resource_scheduler_files(): return ['//twister2/resource-scheduler/src/java:resource-scheduler-java'] def twister2_core_lib_task_scheduler_files(): return ['//twister2/taskscheduler/src/java:taskscheduler-java'] def twister2_core_lib_communication_files(): return ['//twister2/comms/src/java:comms-java', '//twister2/proto:proto-jobmaster-java'] def twister2_core_lib_connector_files(): return ['//twister2/connectors/src/java:connector-java', '@org_xerial_snappy_snappy_java//jar', '@org_lz4_lz4_java//jar', '@org_slf4j_slf4j_api//jar', '@org_apache_kafka_kafka_clients//jar'] def twister2_client_lib_master_files(): return ['//twister2/connectors/src/java:master-java'] def twister2_core_lib_data_files(): return ['//twister2/data/src/main/java:data-java', '@org_apache_hadoop_hadoop_hdfs//jar', '@org_apache_hadoop_hadoop_common//jar', '@org_apache_hadoop_hadoop_annotations//jar', '@org_apache_hadoop_hadoop_auth//jar', '@org_apache_hadoop_hadoop_mapreduce_client_core//jar', '@com_google_code_findbugs_jsr305//jar', '@com_fasterxml_woodstox_woodstox_core//jar', '@org_codehaus_woodstox_stax2_api//jar', '@commons_io_commons_io//jar', '@commons_collections_commons_collections//jar', '@org_apache_commons_commons_lang3//jar', '@commons_configuration_commons_configuration//jar', '@log4j_log4j//jar', '@org_apache_htrace_htrace_core4//jar', '@org_apache_hadoop_hadoop_hdfs_client//jar'] def twister2_core_lib_executor_files(): return ['//twister2/executor/src/java:executor-java'] def twister2_core_lib_data_lmdb_files(): return ['//twister2/data/src/main/java:data-java', '@org_lmdbjava_lmdbjava//jar', '@org_lmdbjava_lmdbjava_native_linux_x86_64//jar', '@org_lmdbjava_lmdbjava_native_windows_x86_64//jar', '@org_lmdbjava_lmdbjava_native_osx_x86_64//jar', '@com_github_jnr_jnr_ffi//jar', '@com_github_jnr_jnr_constants//jar', '@com_github_jnr_jffi//jar', '//third_party:com_github_jnr_jffi_native'] def twister2_harp_integration_files(): return ['//twister2/compatibility/harp:twister2-harp', '//third_party:harp_collective', '@it_unimi_dsi_fastutil//jar'] def twister2_dashboard_files(): return ['//dashboard/server:twister2-dash-server'] def twister2_core_checkpointing_files(): return ['//twister2/checkpointing/src/java:checkpointing-java'] def twister2_core_tset_files(): return ['//twister2/tset/src/java:tset-java', '@maven//:com_google_re2j_re2j'] def twister2_core_restarter_files(): return ['//twister2/checkpointing/src/java/edu/iu/dsc/tws/restarter:restarter-java'] def twister2_storm_files(): return ['//twister2/compatibility/storm:twister2-storm'] def twister2_beam_files(): return ['//twister2/compatibility/beam:twister2-beam', '@org_apache_beam_beam_runners_core_java//jar', '@org_apache_beam_beam_sdks_java_core//jar', '@org_apache_beam_beam_model_pipeline//jar', '@org_apache_beam_beam_runners_java_fn_execution//jar', '@com_fasterxml_jackson_core_jackson_annotations//jar', '@joda_time_joda_time//jar', '@org_apache_beam_beam_runners_core_construction_java//jar', '@com_google_guava_guava//jar', '//third_party:vendored_grpc_1_21_0', '//third_party:vendored_guava_26_0_jre', '@org_apache_beam_beam_vendor_guava_20_0//jar', '@javax_xml_bind_jaxb_api//jar', '@org_apache_beam_beam_vendor_sdks_java_extensions_protobuf//jar', '@org_apache_beam_beam_vendor_grpc_1_13_1//jar'] def twister2_python_support_files(): return ['//twister2/python-support:python-support', '@net_sf_py4j_py4j//jar', '@black_ninia_jep//jar']
class Exception: def __init__(self, message): self.message = message class TypeError(Exception): pass class AttributeError(Exception): pass class KeyError(Exception): pass class StopIteration(Exception): pass class NotImplementedError(Exception): pass class NotImplemented(Exception): pass class ValueError(Exception): pass
class Exception: def __init__(self, message): self.message = message class Typeerror(Exception): pass class Attributeerror(Exception): pass class Keyerror(Exception): pass class Stopiteration(Exception): pass class Notimplementederror(Exception): pass class Notimplemented(Exception): pass class Valueerror(Exception): pass
__version__ = '0.15.0.dev0' PROJECT_NAME = "pulsar" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" PROJECT_AUTHOR = 'Galaxy Project and Community' PROJECT_EMAIL = 'jmchilton@gmail.com' PROJECT_URL = "https://github.com/{}/{}".format(PROJECT_OWNER, PROJECT_NAME) RAW_CONTENT_URL = "https://raw.github.com/{}/{}/master/".format( PROJECT_USERAME, PROJECT_NAME )
__version__ = '0.15.0.dev0' project_name = 'pulsar' project_owner = project_userame = 'galaxyproject' project_author = 'Galaxy Project and Community' project_email = 'jmchilton@gmail.com' project_url = 'https://github.com/{}/{}'.format(PROJECT_OWNER, PROJECT_NAME) raw_content_url = 'https://raw.github.com/{}/{}/master/'.format(PROJECT_USERAME, PROJECT_NAME)
# puzzle3a.py def main(): calc_slope(1, 1) calc_slope(3, 1) calc_slope(5, 1) calc_slope(7, 1) calc_slope(1, 2) def calc_slope(horiz_step = 3, vert_step = 1): tree_char = "#" horiz_pos = 0 trees = 0 input_file = open("input.txt", "r") lines = input_file.readlines() line_len = len(lines[0]) - 1 # Subtract 1 to account for '\n' lines = lines[vert_step::vert_step] for line in lines: horiz_pos = (horiz_pos + horiz_step) % line_len if line[horiz_pos] == tree_char: trees += 1 print("Trees encountered: " + str(trees)) return trees if __name__ == "__main__": main()
def main(): calc_slope(1, 1) calc_slope(3, 1) calc_slope(5, 1) calc_slope(7, 1) calc_slope(1, 2) def calc_slope(horiz_step=3, vert_step=1): tree_char = '#' horiz_pos = 0 trees = 0 input_file = open('input.txt', 'r') lines = input_file.readlines() line_len = len(lines[0]) - 1 lines = lines[vert_step::vert_step] for line in lines: horiz_pos = (horiz_pos + horiz_step) % line_len if line[horiz_pos] == tree_char: trees += 1 print('Trees encountered: ' + str(trees)) return trees if __name__ == '__main__': main()
# # PySNMP MIB module RADLAN-AGGREGATEVLAN-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RADLAN-AGGREGATEVLAN-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:45:06 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") rnd, = mibBuilder.importSymbols("RADLAN-MIB", "rnd") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibIdentifier, Unsigned32, Integer32, ModuleIdentity, NotificationType, Bits, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, IpAddress, iso, Counter64, TimeTicks, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "Unsigned32", "Integer32", "ModuleIdentity", "NotificationType", "Bits", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "IpAddress", "iso", "Counter64", "TimeTicks", "ObjectIdentity") RowStatus, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "TextualConvention", "DisplayString") rlAggregateVlan = ModuleIdentity((1, 3, 6, 1, 4, 1, 89, 73)) rlAggregateVlan.setRevisions(('2007-01-02 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlAggregateVlan.setRevisionsDescriptions(('Initial revision.',)) if mibBuilder.loadTexts: rlAggregateVlan.setLastUpdated('200701020000Z') if mibBuilder.loadTexts: rlAggregateVlan.setOrganization('Radlan - a MARVELL company. Marvell Semiconductor, Inc.') if mibBuilder.loadTexts: rlAggregateVlan.setContactInfo('www.marvell.com') if mibBuilder.loadTexts: rlAggregateVlan.setDescription('This private MIB module defines Aggregate Vlan private MIBs.') rlAggregateVlanMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 89, 73, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlAggregateVlanMibVersion.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanMibVersion.setDescription("MIB's version, the current version is 1.") rlAggregateVlanTable = MibTable((1, 3, 6, 1, 4, 1, 89, 73, 2), ) if mibBuilder.loadTexts: rlAggregateVlanTable.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanTable.setDescription('The table creates an aggregateVlans, the IfIndex is from 10000') rlAggregateVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 73, 2, 1), ).setIndexNames((0, "RADLAN-AGGREGATEVLAN-MIB", "rlAggregateVlanIndex")) if mibBuilder.loadTexts: rlAggregateVlanEntry.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanEntry.setDescription('The row definition for this table.') rlAggregateVlanIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 73, 2, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: rlAggregateVlanIndex.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanIndex.setDescription('This index indicate the aggrigateVlan id, the aggregate vlan index is starting from 10000 ') rlAggregateVlanName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 73, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlAggregateVlanName.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanName.setDescription('The name of the aggregateVlan ') rlAggregateVlanPhysAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 73, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("default", 1), ("reserve", 2))).clone('default')).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlAggregateVlanPhysAddressType.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanPhysAddressType.setDescription(' This variable indicates whether the physical address assigned to this VLAN should be the default one or be chosen from the set of reserved physical addresses of the device.') rlAggregateVlanStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 73, 2, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlAggregateVlanStatus.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanStatus.setDescription("The status of the aggregateVlan table entry. It's used to delete an entry") rlAggregateSubVlanTable = MibTable((1, 3, 6, 1, 4, 1, 89, 73, 3), ) if mibBuilder.loadTexts: rlAggregateSubVlanTable.setStatus('current') if mibBuilder.loadTexts: rlAggregateSubVlanTable.setDescription('The table indicates all the allocated sub-vlans to the aggregateVlans, an entry in the rlAggregateVlanTable must be exist before allocating the subVlans') rlAggregateSubVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 73, 3, 1), ).setIndexNames((0, "RADLAN-AGGREGATEVLAN-MIB", "rlAggregateVlanIndex"), (0, "RADLAN-AGGREGATEVLAN-MIB", "rlAggregateSubVlanIfIndex")) if mibBuilder.loadTexts: rlAggregateSubVlanEntry.setStatus('current') if mibBuilder.loadTexts: rlAggregateSubVlanEntry.setDescription('The row definition for this table.') rlAggregateSubVlanIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 73, 3, 1, 1), InterfaceIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlAggregateSubVlanIfIndex.setStatus('current') if mibBuilder.loadTexts: rlAggregateSubVlanIfIndex.setDescription('Indicate the subVlan that allocated to the aggregate vlan') rlAggregateSubVlanStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 73, 3, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlAggregateSubVlanStatus.setStatus('current') if mibBuilder.loadTexts: rlAggregateSubVlanStatus.setDescription("The status of the aggregateSubVlan table entry. It's used to delete an entry") rlAggregateVlanArpProxy = MibScalar((1, 3, 6, 1, 4, 1, 89, 73, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone('disable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlAggregateVlanArpProxy.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanArpProxy.setDescription('When ARP Proxy is enabled, the router can respond to ARP requests for nodes located on different sub-vlans, which belong to the same Super VLAN.The router responds with its own MAC address. When ARP Proxy is disabled, the router responds only to ARP requests for its own IP addresses.') mibBuilder.exportSymbols("RADLAN-AGGREGATEVLAN-MIB", rlAggregateVlanName=rlAggregateVlanName, rlAggregateVlan=rlAggregateVlan, rlAggregateSubVlanTable=rlAggregateSubVlanTable, PYSNMP_MODULE_ID=rlAggregateVlan, rlAggregateVlanIndex=rlAggregateVlanIndex, rlAggregateSubVlanEntry=rlAggregateSubVlanEntry, rlAggregateVlanEntry=rlAggregateVlanEntry, rlAggregateVlanArpProxy=rlAggregateVlanArpProxy, rlAggregateVlanTable=rlAggregateVlanTable, rlAggregateSubVlanStatus=rlAggregateSubVlanStatus, rlAggregateSubVlanIfIndex=rlAggregateSubVlanIfIndex, rlAggregateVlanPhysAddressType=rlAggregateVlanPhysAddressType, rlAggregateVlanStatus=rlAggregateVlanStatus, rlAggregateVlanMibVersion=rlAggregateVlanMibVersion)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_union, single_value_constraint, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection') (interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex') (rnd,) = mibBuilder.importSymbols('RADLAN-MIB', 'rnd') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (mib_identifier, unsigned32, integer32, module_identity, notification_type, bits, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, ip_address, iso, counter64, time_ticks, object_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'Unsigned32', 'Integer32', 'ModuleIdentity', 'NotificationType', 'Bits', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'IpAddress', 'iso', 'Counter64', 'TimeTicks', 'ObjectIdentity') (row_status, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'TextualConvention', 'DisplayString') rl_aggregate_vlan = module_identity((1, 3, 6, 1, 4, 1, 89, 73)) rlAggregateVlan.setRevisions(('2007-01-02 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlAggregateVlan.setRevisionsDescriptions(('Initial revision.',)) if mibBuilder.loadTexts: rlAggregateVlan.setLastUpdated('200701020000Z') if mibBuilder.loadTexts: rlAggregateVlan.setOrganization('Radlan - a MARVELL company. Marvell Semiconductor, Inc.') if mibBuilder.loadTexts: rlAggregateVlan.setContactInfo('www.marvell.com') if mibBuilder.loadTexts: rlAggregateVlan.setDescription('This private MIB module defines Aggregate Vlan private MIBs.') rl_aggregate_vlan_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 89, 73, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlAggregateVlanMibVersion.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanMibVersion.setDescription("MIB's version, the current version is 1.") rl_aggregate_vlan_table = mib_table((1, 3, 6, 1, 4, 1, 89, 73, 2)) if mibBuilder.loadTexts: rlAggregateVlanTable.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanTable.setDescription('The table creates an aggregateVlans, the IfIndex is from 10000') rl_aggregate_vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 73, 2, 1)).setIndexNames((0, 'RADLAN-AGGREGATEVLAN-MIB', 'rlAggregateVlanIndex')) if mibBuilder.loadTexts: rlAggregateVlanEntry.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanEntry.setDescription('The row definition for this table.') rl_aggregate_vlan_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 73, 2, 1, 1), interface_index()) if mibBuilder.loadTexts: rlAggregateVlanIndex.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanIndex.setDescription('This index indicate the aggrigateVlan id, the aggregate vlan index is starting from 10000 ') rl_aggregate_vlan_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 73, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readcreate') if mibBuilder.loadTexts: rlAggregateVlanName.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanName.setDescription('The name of the aggregateVlan ') rl_aggregate_vlan_phys_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 73, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('default', 1), ('reserve', 2))).clone('default')).setMaxAccess('readcreate') if mibBuilder.loadTexts: rlAggregateVlanPhysAddressType.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanPhysAddressType.setDescription(' This variable indicates whether the physical address assigned to this VLAN should be the default one or be chosen from the set of reserved physical addresses of the device.') rl_aggregate_vlan_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 73, 2, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: rlAggregateVlanStatus.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanStatus.setDescription("The status of the aggregateVlan table entry. It's used to delete an entry") rl_aggregate_sub_vlan_table = mib_table((1, 3, 6, 1, 4, 1, 89, 73, 3)) if mibBuilder.loadTexts: rlAggregateSubVlanTable.setStatus('current') if mibBuilder.loadTexts: rlAggregateSubVlanTable.setDescription('The table indicates all the allocated sub-vlans to the aggregateVlans, an entry in the rlAggregateVlanTable must be exist before allocating the subVlans') rl_aggregate_sub_vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 73, 3, 1)).setIndexNames((0, 'RADLAN-AGGREGATEVLAN-MIB', 'rlAggregateVlanIndex'), (0, 'RADLAN-AGGREGATEVLAN-MIB', 'rlAggregateSubVlanIfIndex')) if mibBuilder.loadTexts: rlAggregateSubVlanEntry.setStatus('current') if mibBuilder.loadTexts: rlAggregateSubVlanEntry.setDescription('The row definition for this table.') rl_aggregate_sub_vlan_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 73, 3, 1, 1), interface_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlAggregateSubVlanIfIndex.setStatus('current') if mibBuilder.loadTexts: rlAggregateSubVlanIfIndex.setDescription('Indicate the subVlan that allocated to the aggregate vlan') rl_aggregate_sub_vlan_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 73, 3, 1, 2), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: rlAggregateSubVlanStatus.setStatus('current') if mibBuilder.loadTexts: rlAggregateSubVlanStatus.setDescription("The status of the aggregateSubVlan table entry. It's used to delete an entry") rl_aggregate_vlan_arp_proxy = mib_scalar((1, 3, 6, 1, 4, 1, 89, 73, 4), 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: rlAggregateVlanArpProxy.setStatus('current') if mibBuilder.loadTexts: rlAggregateVlanArpProxy.setDescription('When ARP Proxy is enabled, the router can respond to ARP requests for nodes located on different sub-vlans, which belong to the same Super VLAN.The router responds with its own MAC address. When ARP Proxy is disabled, the router responds only to ARP requests for its own IP addresses.') mibBuilder.exportSymbols('RADLAN-AGGREGATEVLAN-MIB', rlAggregateVlanName=rlAggregateVlanName, rlAggregateVlan=rlAggregateVlan, rlAggregateSubVlanTable=rlAggregateSubVlanTable, PYSNMP_MODULE_ID=rlAggregateVlan, rlAggregateVlanIndex=rlAggregateVlanIndex, rlAggregateSubVlanEntry=rlAggregateSubVlanEntry, rlAggregateVlanEntry=rlAggregateVlanEntry, rlAggregateVlanArpProxy=rlAggregateVlanArpProxy, rlAggregateVlanTable=rlAggregateVlanTable, rlAggregateSubVlanStatus=rlAggregateSubVlanStatus, rlAggregateSubVlanIfIndex=rlAggregateSubVlanIfIndex, rlAggregateVlanPhysAddressType=rlAggregateVlanPhysAddressType, rlAggregateVlanStatus=rlAggregateVlanStatus, rlAggregateVlanMibVersion=rlAggregateVlanMibVersion)
# Title : Url shortner # Author : Kiran Raj R. # Date : 07:11:2020 class URL_short: url_id = 0 url_dict = {} def url_shortner(self,orginal_url): if orginal_url in self.url_dict: url = self.url_dict[orginal_url] return f"{orginal_url} already has a shorten url: my_url.com/{url}" else: url = str(hex(self.url_id)) # print(url) self.url_dict[orginal_url] = url self.url_id+=1 return f"my_url.com/{url}" def return_site(self,short_url): url = short_url.split('/')[1] site = [key for key,value in self.url_dict.items() if value == url] if site == []: return f"{short_url} not found!!!" else: return site[0] url_obj = URL_short() site1 = url_obj.url_shortner('google.com') site2 = url_obj.url_shortner('facebook.com') site3 = url_obj.url_shortner('instagram.com') site4 = url_obj.url_shortner('facebook.com') # print(site1, site2, site3, site4) # print(url_obj.url_dict) print(url_obj.return_site('my_url.com/0x1')) print(url_obj.return_site('my_url.com/0x21')) print(site4)
class Url_Short: url_id = 0 url_dict = {} def url_shortner(self, orginal_url): if orginal_url in self.url_dict: url = self.url_dict[orginal_url] return f'{orginal_url} already has a shorten url: my_url.com/{url}' else: url = str(hex(self.url_id)) self.url_dict[orginal_url] = url self.url_id += 1 return f'my_url.com/{url}' def return_site(self, short_url): url = short_url.split('/')[1] site = [key for (key, value) in self.url_dict.items() if value == url] if site == []: return f'{short_url} not found!!!' else: return site[0] url_obj = url_short() site1 = url_obj.url_shortner('google.com') site2 = url_obj.url_shortner('facebook.com') site3 = url_obj.url_shortner('instagram.com') site4 = url_obj.url_shortner('facebook.com') print(url_obj.return_site('my_url.com/0x1')) print(url_obj.return_site('my_url.com/0x21')) print(site4)
# -*- coding: utf-8 -*- __title__ = 'gym_breakout_pygame' __description__ = 'Gym Breakout environment using Pygame' __url__ = 'https://github.com/whitemech/gym-breakout-pygame.git' __version__ = '0.1.1' __author__ = 'Marco Favorito, Luca Iocchi' __author_email__ = 'favorito@diag.uniroma1.it, iocchi@diag.uniroma1.it' __license__ = 'Apache License 2.0' __copyright__ = '2019 Marco Favorito, Luca Iocchi'
__title__ = 'gym_breakout_pygame' __description__ = 'Gym Breakout environment using Pygame' __url__ = 'https://github.com/whitemech/gym-breakout-pygame.git' __version__ = '0.1.1' __author__ = 'Marco Favorito, Luca Iocchi' __author_email__ = 'favorito@diag.uniroma1.it, iocchi@diag.uniroma1.it' __license__ = 'Apache License 2.0' __copyright__ = '2019 Marco Favorito, Luca Iocchi'
# MOOC-Python Task # takuron@github def lcm(n1,n2) : maxx = 0 if n1>=n2: maxx = n1 else: maxx = n2 i = 0 while 1 : i = i+1 if ((maxx+i)%n1==0) and ((maxx+i)%n2==0): return maxx+i num1=int(input("")) num2=int(input("")) print(lcm(num1,num2))
def lcm(n1, n2): maxx = 0 if n1 >= n2: maxx = n1 else: maxx = n2 i = 0 while 1: i = i + 1 if (maxx + i) % n1 == 0 and (maxx + i) % n2 == 0: return maxx + i num1 = int(input('')) num2 = int(input('')) print(lcm(num1, num2))
# The marketing team is spending way too much time typing in hashtags. # Let's help them with our own Hashtag Generator! # # Here's the deal: # # It must start with a hashtag (#). # All words must have their first letter capitalized. # If the final result is longer than 140 chars it must return false. # If the input or the result is an empty string it must return false. # Examples # " Hello there thanks for trying my Kata" => "#HelloThereThanksForTryingMyKata" # " Hello World " => "#HelloWorld" # "" => false def generate_hashtag(s): output_str = '' first_letter = True if not s: return False output_str = output_str + "#" for x in s: if first_letter and x != ' ': output_str += x.upper() first_letter = False elif x != ' ': output_str += x.lower() else: first_letter = True if len(output_str) > 140: return False else: return output_str
def generate_hashtag(s): output_str = '' first_letter = True if not s: return False output_str = output_str + '#' for x in s: if first_letter and x != ' ': output_str += x.upper() first_letter = False elif x != ' ': output_str += x.lower() else: first_letter = True if len(output_str) > 140: return False else: return output_str
class Solution: def isPowerOfThree(self, n: int) -> bool: if n < 1: return False if n == 1: return True if sum(list(map(int, str(n)))) % 3 != 0: return False else: while n > 1: if n % 3 == 0: n /= 3 else: return False if n != 1: return False else: return True # Alternate Approach class Solution: def isPowerOfThree(self, n: int) -> bool: if n < 1: return False else: return 1162261467 % n == 0
class Solution: def is_power_of_three(self, n: int) -> bool: if n < 1: return False if n == 1: return True if sum(list(map(int, str(n)))) % 3 != 0: return False else: while n > 1: if n % 3 == 0: n /= 3 else: return False if n != 1: return False else: return True class Solution: def is_power_of_three(self, n: int) -> bool: if n < 1: return False else: return 1162261467 % n == 0
def bubble_sort(items): for i in range(len(items)): for j in range(len(items)-1-i): if items[j] > items[j+1]: items[j], items[j+1] = items[j+1], items[j] def f(n): #bubble sort worst case bubble_sort(range(n,0,-1))
def bubble_sort(items): for i in range(len(items)): for j in range(len(items) - 1 - i): if items[j] > items[j + 1]: (items[j], items[j + 1]) = (items[j + 1], items[j]) def f(n): bubble_sort(range(n, 0, -1))
a = 'C:\\Users\\Jason\\Documents\\GitHub\\chesspdftofen\\data\\out\\yasser\\WhiteQueen' l = [] for e in sorted(os.listdir(a)): i = cv2.imread(os.path.join(a, e), 0) h,w = i.shape # l.append([np.sum(i[h//4:h//4*3, w//4:w//4*3]), e]) l.append([np.sum(i), e]) l.sort() print(l) for i, k in enumerate(l): # aa = k[1].find('_') # bb = k[1][aa:] # os.rename(os.path.join(a, k[1]), os.path.join(a, str(i) + bb)) os.rename(os.path.join(a, k[1]), os.path.join(a, ('%06d_' % (i,)) + '_' + k[1]))
a = 'C:\\Users\\Jason\\Documents\\GitHub\\chesspdftofen\\data\\out\\yasser\\WhiteQueen' l = [] for e in sorted(os.listdir(a)): i = cv2.imread(os.path.join(a, e), 0) (h, w) = i.shape l.append([np.sum(i), e]) l.sort() print(l) for (i, k) in enumerate(l): os.rename(os.path.join(a, k[1]), os.path.join(a, '%06d_' % (i,) + '_' + k[1]))
''' Created on Sep 3, 2010 @author: ilg ''' class WriterBase(object): ''' classdocs ''' def __init__(self, sName): ''' Constructor ''' self.bVerbose = False self.sName = sName self.sLocalUrl = None pass def setVerbose(self, bVerbose): self.bVerbose = bVerbose def setUserUrl(self, sUrl): self.sUserUrl = sUrl def setLocalUrl(self, sUrl): self.sLocalUrl = sUrl def setOutputStream(self, oOutStream): self.oOutStream = oOutStream def setHierarchicalDepth(self, s): self.sHierarchicalDepth = s def setCollection(self, sID, sTitle, sDescription, sSmallIcon, sLargeIcon): self.sCollectionID = sID self.sCollectionTitle = sTitle self.sCollectionDescription = sDescription self.sCollectionSmallIcon = sSmallIcon self.sCollectionLargeIcon = sLargeIcon def setStatistics(self, nCollections, nSets, nPhotos): self.nCollections = nCollections self.nSets = nSets self.nPhotos = nPhotos def setPhotoset(self, sID, sTitle, sDescription, nPhotos, sIcon): self.sPhotosetID = sID self.sPhotosetTitle = sTitle self.sPhotosetDescription = sDescription self.nPhotosetPhotos = nPhotos self.sPhotosetIcon = sIcon def setDepth(self, nDepth): self.nDepth = nDepth self.sIndent = '' for i in range(1, self.nDepth): #@UnusedVariable self.sIndent += '\t' def incDepth(self): self.setDepth(self.nDepth+1) def decDepth(self): self.setDepth(self.nDepth-1) def writeBegin(self): return def writeEnd(self): return def writeHeaderBegin(self): return def writeHeaderEnd(self): return def writeCollectionBegin(self): return def writeEmbeddedBegin(self): return def writeEmbeddedEnd(self): return def writeCollectionEnd(self): return def writePhotosetBegin(self): return def writePhotosetEnd(self): return
""" Created on Sep 3, 2010 @author: ilg """ class Writerbase(object): """ classdocs """ def __init__(self, sName): """ Constructor """ self.bVerbose = False self.sName = sName self.sLocalUrl = None pass def set_verbose(self, bVerbose): self.bVerbose = bVerbose def set_user_url(self, sUrl): self.sUserUrl = sUrl def set_local_url(self, sUrl): self.sLocalUrl = sUrl def set_output_stream(self, oOutStream): self.oOutStream = oOutStream def set_hierarchical_depth(self, s): self.sHierarchicalDepth = s def set_collection(self, sID, sTitle, sDescription, sSmallIcon, sLargeIcon): self.sCollectionID = sID self.sCollectionTitle = sTitle self.sCollectionDescription = sDescription self.sCollectionSmallIcon = sSmallIcon self.sCollectionLargeIcon = sLargeIcon def set_statistics(self, nCollections, nSets, nPhotos): self.nCollections = nCollections self.nSets = nSets self.nPhotos = nPhotos def set_photoset(self, sID, sTitle, sDescription, nPhotos, sIcon): self.sPhotosetID = sID self.sPhotosetTitle = sTitle self.sPhotosetDescription = sDescription self.nPhotosetPhotos = nPhotos self.sPhotosetIcon = sIcon def set_depth(self, nDepth): self.nDepth = nDepth self.sIndent = '' for i in range(1, self.nDepth): self.sIndent += '\t' def inc_depth(self): self.setDepth(self.nDepth + 1) def dec_depth(self): self.setDepth(self.nDepth - 1) def write_begin(self): return def write_end(self): return def write_header_begin(self): return def write_header_end(self): return def write_collection_begin(self): return def write_embedded_begin(self): return def write_embedded_end(self): return def write_collection_end(self): return def write_photoset_begin(self): return def write_photoset_end(self): return
class Solution: def calculateTime(self, keyboard: str, word: str) -> int: positions = {key : i for i, key in enumerate(keyboard)} n = len(word) ans = 0 for i in range(1, n): ans += abs(positions[word[i]] - positions[word[i - 1]]) return ans + positions[word[0]]
class Solution: def calculate_time(self, keyboard: str, word: str) -> int: positions = {key: i for (i, key) in enumerate(keyboard)} n = len(word) ans = 0 for i in range(1, n): ans += abs(positions[word[i]] - positions[word[i - 1]]) return ans + positions[word[0]]
numbers = [0, 1, 2, 3, 4] doubled_numbers = [] for num in numbers: doubled_numbers.append(num * 2) print(doubled_numbers) # -- List comprehension -- numbers = [0, 1, 2, 3, 4] # list(range(5)) is better doubled_numbers = [num * 2 for num in numbers] # [num * 2 for num in range(5)] would be even better. print(doubled_numbers) # -- You can add anything to the new list -- friend_ages = [22, 31, 35, 37] age_strings = [f"My friend is {age} years old." for age in friend_ages] print(age_strings) # -- This includes things like -- names = ["Rolf", "Bob", "Jen"] lower = [name.lower() for name in names] # That is particularly useful for working with user input. # By turning everything to lowercase, it's less likely we'll miss a match. friend = input("Enter your friend name: ") friends = ["Rolf", "Bob", "Jen", "Charlie", "Anne"] friends_lower = [name.lower() for name in friends] if friend.lower() in friends_lower: print(f"I know {friend}!")
numbers = [0, 1, 2, 3, 4] doubled_numbers = [] for num in numbers: doubled_numbers.append(num * 2) print(doubled_numbers) numbers = [0, 1, 2, 3, 4] doubled_numbers = [num * 2 for num in numbers] print(doubled_numbers) friend_ages = [22, 31, 35, 37] age_strings = [f'My friend is {age} years old.' for age in friend_ages] print(age_strings) names = ['Rolf', 'Bob', 'Jen'] lower = [name.lower() for name in names] friend = input('Enter your friend name: ') friends = ['Rolf', 'Bob', 'Jen', 'Charlie', 'Anne'] friends_lower = [name.lower() for name in friends] if friend.lower() in friends_lower: print(f'I know {friend}!')
# internal library def ceil_pow2(n): x = 0 while((1 << x) < n): x += 1 return x # internal library end class segtree: def __init__(self, op, e, n=0, ary=[]): self.op = op self.e = e if n: ary = [e()] * n else: n = len(ary) self.n = n self.log = ceil_pow2(n) self.size = 1 << self.log self.d = [e()] * (2 * self.size) for i in range(n): self.d[self.size + i] = ary[i] for i in reversed(range(1, self.size)): self.update(i) def set(self, p, x): p += self.size self.d[p] = x for i in range(1, self.log + 1): self.update(p >> i) def get(self, p): return self.d[p + self.size] def prod(self, l, r): sml = self.e() smr = self.e() l += self.size r += self.size while l < r: if l & 1: sml = self.op(sml, self.d[l]) l += 1 if r & 1: r -= 1 smr = self.op(self.d[r], smr) l >>= 1 r >>= 1 return self.op(sml, smr) def all_prod(self): return self.d[1] def max_right(self, l, f): if l == self.n: return self.n l += self.size sm = self.e() while 1: while l % 2 == 0: l >>= 1 if f(self.op(sm, self.d[l])) == 0: while l < self.size: l *= 2 if f(self.op(sm, self.d[l])): sm = self.op(sm, self.d[l]) l += 1 return l - self.size sm = self.op(sm, self.d[l]) l += 1 if (l & -l) == l: break return self.n def min_left(self, r, f): assert(0 <= r and r < self.n) if r == 0: return 0 r += self.size sm = self.e() while 1: r -= 1 while r > 1 and (r & 1): r >>= 1 if not f(self.op(self.d[r], sm)): while r < self.size: if f(self.op(self.d[r], sm)): sm = self.op(sm, self.d[r]) r -= 1 return r + 1 - self.size sm = self.op(self.d[r], sm) if (r & -r) == r: break return 0 def update(self, k): self.d[k] = self.op(self.d[2 * k], self.d[2 * k + 1])
def ceil_pow2(n): x = 0 while 1 << x < n: x += 1 return x class Segtree: def __init__(self, op, e, n=0, ary=[]): self.op = op self.e = e if n: ary = [e()] * n else: n = len(ary) self.n = n self.log = ceil_pow2(n) self.size = 1 << self.log self.d = [e()] * (2 * self.size) for i in range(n): self.d[self.size + i] = ary[i] for i in reversed(range(1, self.size)): self.update(i) def set(self, p, x): p += self.size self.d[p] = x for i in range(1, self.log + 1): self.update(p >> i) def get(self, p): return self.d[p + self.size] def prod(self, l, r): sml = self.e() smr = self.e() l += self.size r += self.size while l < r: if l & 1: sml = self.op(sml, self.d[l]) l += 1 if r & 1: r -= 1 smr = self.op(self.d[r], smr) l >>= 1 r >>= 1 return self.op(sml, smr) def all_prod(self): return self.d[1] def max_right(self, l, f): if l == self.n: return self.n l += self.size sm = self.e() while 1: while l % 2 == 0: l >>= 1 if f(self.op(sm, self.d[l])) == 0: while l < self.size: l *= 2 if f(self.op(sm, self.d[l])): sm = self.op(sm, self.d[l]) l += 1 return l - self.size sm = self.op(sm, self.d[l]) l += 1 if l & -l == l: break return self.n def min_left(self, r, f): assert 0 <= r and r < self.n if r == 0: return 0 r += self.size sm = self.e() while 1: r -= 1 while r > 1 and r & 1: r >>= 1 if not f(self.op(self.d[r], sm)): while r < self.size: if f(self.op(self.d[r], sm)): sm = self.op(sm, self.d[r]) r -= 1 return r + 1 - self.size sm = self.op(self.d[r], sm) if r & -r == r: break return 0 def update(self, k): self.d[k] = self.op(self.d[2 * k], self.d[2 * k + 1])
class User: # Class Attribute active_users = 0 #class Methods @classmethod def display_active(cls): return f"Total Active users are {cls.active_users}" def __init__(self,first_name,last_name,age): # instance Attribute/Variable self.first_name = first_name self.last_name = last_name self.age = age User.active_users += 1 # Instance method def fullName(self): return f"{self.first_name} {self.last_name}" def initials(self): return f"{self.first_name[0]}.{self.last_name[0]}." def likes(self,thing): return f"{self.first_name} likes {thing}" def isSenior(self): return (self.age > 65) print('Active Users',User.active_users) p = User('Qaidjohar','Jawadwala',70) q = User('Mustafa','Poona',25) print('Active Users',User.active_users) r = User('Qaidjohar','Jawadwala',70) print('R Active Users',User.active_users) s = User('Mustafa','Poona',25) print('Active Users',User.active_users) print('P Active Users',p.active_users) print(User.display_active()) print(User.fullName(self)) print(s.display_active())
class User: active_users = 0 @classmethod def display_active(cls): return f'Total Active users are {cls.active_users}' def __init__(self, first_name, last_name, age): self.first_name = first_name self.last_name = last_name self.age = age User.active_users += 1 def full_name(self): return f'{self.first_name} {self.last_name}' def initials(self): return f'{self.first_name[0]}.{self.last_name[0]}.' def likes(self, thing): return f'{self.first_name} likes {thing}' def is_senior(self): return self.age > 65 print('Active Users', User.active_users) p = user('Qaidjohar', 'Jawadwala', 70) q = user('Mustafa', 'Poona', 25) print('Active Users', User.active_users) r = user('Qaidjohar', 'Jawadwala', 70) print('R Active Users', User.active_users) s = user('Mustafa', 'Poona', 25) print('Active Users', User.active_users) print('P Active Users', p.active_users) print(User.display_active()) print(User.fullName(self)) print(s.display_active())
# Notices we don't need to worry about ignore_notices = [ "already_banned", "already_emote_only_off", "already_emote_only_on", "already_r9k_off", "already_r9k_on", "already_subs_off", "already_subs_on", "bad_ban_admin", "bad_ban_anon", "bad_ban_broadcaster", "bad_ban_global_mod", "bad_ban_mod", "bad_ban_self", "bad_ban_staff", "bad_commercial_error", "bad_delete_message_broadcaster", "bad_delete_message_mod", "bad_host_error", "bad_host_hosting", "bad_host_rate_exceeded", "bad_host_rejected", "bad_host_self", "bad_marker_client", "bad_mod_banned", "bad_mod_mod", "bad_slow_duration", "bad_timeout_admin", "bad_timeout_anon", "bad_timeout_broadcaster", "bad_timeout_duration", "bad_timeout_global_mod", "bad_timeout_mod", "bad_timeout_self", "bad_timeout_staff", "bad_unban_no_ban", "bad_unhost_error", "bad_unmod_mod", "ban_success", "cmds_available", "color_changed", "commercial_success", "delete_message_success", "emote_only_off", "emote_only_on", "followers_off", "followers_on", "followers_onzero", "host_off", "host_on", "host_success", "host_success_viewers", "host_target_went_offline", "hosts_remaining", "invalid_user", "mod_success", "no_help", "no_mods", "not_hosting", "r9k_off", "r9k_on", "raid_error_already_raiding", "raid_error_forbidden", "raid_error_self", "raid_error_too_many_viewers", "raid_error_unexpected", "raid_notice_mature", "raid_notice_restricted_chat", "room_mods", "slow_off", "slow_on", "subs_off", "subs_on", "timeout_no_timeout", "timeout_success", "turbo_only_color", "unban_success", "unmod_success", "unraid_error_no_active_raid", "unraid_error_unexpected", "unraid_success", "untimeout_banned", "untimeout_success", "usage_ban", "usage_clear", "usage_color", "usage_commercial", "usage_disconnect", "usage_emote_only_off", "usage_emote_only_on", "usage_followers_off", "usage_followers_on", "usage_help", "usage_host", "usage_marker", "usage_me", "usage_mod", "usage_mods", "usage_r9k_off", "usage_r9k_on", "usage_raid", "usage_slow_off", "usage_slow_on", "usage_subs_off", "usage_subs_on", "usage_timeout", "usage_unban", "usage_unhost", "usage_unmod", "usage_unraid", "usage_untimeout", ] # Notices that indicate we're not a mod cooldown_notices = [ "msg_duplicate", "msg_emoteonly", "msg_facebook", "msg_followersonly", "msg_followersonly_followed", "msg_followersonly_zero", "msg_r9k", "msg_ratelimit", "msg_rejected", "msg_rejected_mandatory", "msg_slowmode", "msg_subsonly", "no_permission", ] # Notices that indicate we should probably go leave_notices = [ "msg_banned", "msg_channel_blocked", "msg_room_not_found", "msg_timedout", "msg_verified_email", "tos_ban", ]
ignore_notices = ['already_banned', 'already_emote_only_off', 'already_emote_only_on', 'already_r9k_off', 'already_r9k_on', 'already_subs_off', 'already_subs_on', 'bad_ban_admin', 'bad_ban_anon', 'bad_ban_broadcaster', 'bad_ban_global_mod', 'bad_ban_mod', 'bad_ban_self', 'bad_ban_staff', 'bad_commercial_error', 'bad_delete_message_broadcaster', 'bad_delete_message_mod', 'bad_host_error', 'bad_host_hosting', 'bad_host_rate_exceeded', 'bad_host_rejected', 'bad_host_self', 'bad_marker_client', 'bad_mod_banned', 'bad_mod_mod', 'bad_slow_duration', 'bad_timeout_admin', 'bad_timeout_anon', 'bad_timeout_broadcaster', 'bad_timeout_duration', 'bad_timeout_global_mod', 'bad_timeout_mod', 'bad_timeout_self', 'bad_timeout_staff', 'bad_unban_no_ban', 'bad_unhost_error', 'bad_unmod_mod', 'ban_success', 'cmds_available', 'color_changed', 'commercial_success', 'delete_message_success', 'emote_only_off', 'emote_only_on', 'followers_off', 'followers_on', 'followers_onzero', 'host_off', 'host_on', 'host_success', 'host_success_viewers', 'host_target_went_offline', 'hosts_remaining', 'invalid_user', 'mod_success', 'no_help', 'no_mods', 'not_hosting', 'r9k_off', 'r9k_on', 'raid_error_already_raiding', 'raid_error_forbidden', 'raid_error_self', 'raid_error_too_many_viewers', 'raid_error_unexpected', 'raid_notice_mature', 'raid_notice_restricted_chat', 'room_mods', 'slow_off', 'slow_on', 'subs_off', 'subs_on', 'timeout_no_timeout', 'timeout_success', 'turbo_only_color', 'unban_success', 'unmod_success', 'unraid_error_no_active_raid', 'unraid_error_unexpected', 'unraid_success', 'untimeout_banned', 'untimeout_success', 'usage_ban', 'usage_clear', 'usage_color', 'usage_commercial', 'usage_disconnect', 'usage_emote_only_off', 'usage_emote_only_on', 'usage_followers_off', 'usage_followers_on', 'usage_help', 'usage_host', 'usage_marker', 'usage_me', 'usage_mod', 'usage_mods', 'usage_r9k_off', 'usage_r9k_on', 'usage_raid', 'usage_slow_off', 'usage_slow_on', 'usage_subs_off', 'usage_subs_on', 'usage_timeout', 'usage_unban', 'usage_unhost', 'usage_unmod', 'usage_unraid', 'usage_untimeout'] cooldown_notices = ['msg_duplicate', 'msg_emoteonly', 'msg_facebook', 'msg_followersonly', 'msg_followersonly_followed', 'msg_followersonly_zero', 'msg_r9k', 'msg_ratelimit', 'msg_rejected', 'msg_rejected_mandatory', 'msg_slowmode', 'msg_subsonly', 'no_permission'] leave_notices = ['msg_banned', 'msg_channel_blocked', 'msg_room_not_found', 'msg_timedout', 'msg_verified_email', 'tos_ban']
class InvalidUsage(Exception): status_code = 404 message = 'Instance Not Found!' def __init__(self, message=None, status_code=None): Exception.__init__(self) if message is not None: self.message = message if status_code is not None: self.status_code = status_code def to_dict(self): rv = dict(self.payload or ()) rv['message'] = self.message return rv NotCorrectDirection = InvalidUsage("Direction is not correct!", 418) IdNotFound = InvalidUsage("Id not found!", 404) CoordinatesNotEmpty = InvalidUsage("Coordinates is not empty.", 421) CoordinatesNotValid = InvalidUsage("Coordinates not valid.", 422) ErrorOnBoardCoding = InvalidUsage("Not matching with robot values.", 423) ErrorBoardCreation = InvalidUsage("String size is not matching with board size", 424) BoardIsFull = InvalidUsage("Board is full, no emtpy spot! Attack!", 425) RobotNotFound = InvalidUsage("Robot not found on given coordinates.", 426) SizeIsNotValid = InvalidUsage("Size should be larger than 1!", 427) ServerError = InvalidUsage("Server Error!", 500) ExceptionResponses = { NotCorrectDirection.status_code: NotCorrectDirection.message, IdNotFound.status_code: IdNotFound.message, CoordinatesNotEmpty.status_code: CoordinatesNotEmpty.message, CoordinatesNotValid.status_code: CoordinatesNotValid.message, ErrorOnBoardCoding.status_code: ErrorOnBoardCoding.message, ErrorBoardCreation.status_code: ErrorBoardCreation.message, BoardIsFull.status_code: BoardIsFull.message, RobotNotFound.status_code: RobotNotFound.message, ServerError.status_code: ServerError.message }
class Invalidusage(Exception): status_code = 404 message = 'Instance Not Found!' def __init__(self, message=None, status_code=None): Exception.__init__(self) if message is not None: self.message = message if status_code is not None: self.status_code = status_code def to_dict(self): rv = dict(self.payload or ()) rv['message'] = self.message return rv not_correct_direction = invalid_usage('Direction is not correct!', 418) id_not_found = invalid_usage('Id not found!', 404) coordinates_not_empty = invalid_usage('Coordinates is not empty.', 421) coordinates_not_valid = invalid_usage('Coordinates not valid.', 422) error_on_board_coding = invalid_usage('Not matching with robot values.', 423) error_board_creation = invalid_usage('String size is not matching with board size', 424) board_is_full = invalid_usage('Board is full, no emtpy spot! Attack!', 425) robot_not_found = invalid_usage('Robot not found on given coordinates.', 426) size_is_not_valid = invalid_usage('Size should be larger than 1!', 427) server_error = invalid_usage('Server Error!', 500) exception_responses = {NotCorrectDirection.status_code: NotCorrectDirection.message, IdNotFound.status_code: IdNotFound.message, CoordinatesNotEmpty.status_code: CoordinatesNotEmpty.message, CoordinatesNotValid.status_code: CoordinatesNotValid.message, ErrorOnBoardCoding.status_code: ErrorOnBoardCoding.message, ErrorBoardCreation.status_code: ErrorBoardCreation.message, BoardIsFull.status_code: BoardIsFull.message, RobotNotFound.status_code: RobotNotFound.message, ServerError.status_code: ServerError.message}
def build_response(parameters): response = {} if("success" in parameters and parameters["success"] == True): response['success'] = True else: response['success'] = False if("response" in parameters): response["response"] = parameters["response"] if("error" in parameters): response['error'] = parameters["error"] if("context" in parameters): response['@context'] = parameters["context"] return response
def build_response(parameters): response = {} if 'success' in parameters and parameters['success'] == True: response['success'] = True else: response['success'] = False if 'response' in parameters: response['response'] = parameters['response'] if 'error' in parameters: response['error'] = parameters['error'] if 'context' in parameters: response['@context'] = parameters['context'] return response
f = open("Q20/testinputs.txt","r") #ques_input = [i.strip("\n") for i in f.readlines()] a,b = f.read().split("\n\n") b = "".join(b).split("\n") trans = [] for i in range(-1,2,1): for j in range(-1,2,1): trans += [(i,j)] # rowlength = len(b[0]) # top_row = [inf_symbol] * (rowlength+4) inf_symbol = "." flip_switch = True for _ in range(50): rowlength = len(b[0]) top_row = [inf_symbol] * (rowlength+4) new_matrix = [] next_iter = [] for _ in range(2): new_matrix += [top_row[:]] next_iter += [top_row[:]] for c in b: new_matrix += [[inf_symbol]*2 + list(c) + [inf_symbol]*2] next_iter += [top_row[:]] for _ in range(2): new_matrix += [top_row[:]] next_iter += [top_row[:]] b = new_matrix k = 0 for i in range(1,len(new_matrix)-1): for j in range(1,len(new_matrix[i])-1): u = "" for x,y in [(-1,-1),(-1,0),(-1,1),(0,-1),(0,0),(0,1),(1,-1),(1,0),(1,1)]: u += b[i+x][j+y] binnum = int(u.replace(".","0").replace("#","1"),2) next_iter[i][j] = a[binnum] # if j == 0: # #print(i,j) b = [row[1:-1] for row in next_iter[1:-1]] if flip_switch: if inf_symbol == "#": inf_symbol = "." else: inf_symbol = "#" # for i in b: # print("".join(i)) # 1/0 fstr = "" for i in b: fstr += "".join(i) print(fstr.count("#"))
f = open('Q20/testinputs.txt', 'r') (a, b) = f.read().split('\n\n') b = ''.join(b).split('\n') trans = [] for i in range(-1, 2, 1): for j in range(-1, 2, 1): trans += [(i, j)] inf_symbol = '.' flip_switch = True for _ in range(50): rowlength = len(b[0]) top_row = [inf_symbol] * (rowlength + 4) new_matrix = [] next_iter = [] for _ in range(2): new_matrix += [top_row[:]] next_iter += [top_row[:]] for c in b: new_matrix += [[inf_symbol] * 2 + list(c) + [inf_symbol] * 2] next_iter += [top_row[:]] for _ in range(2): new_matrix += [top_row[:]] next_iter += [top_row[:]] b = new_matrix k = 0 for i in range(1, len(new_matrix) - 1): for j in range(1, len(new_matrix[i]) - 1): u = '' for (x, y) in [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 0), (0, 1), (1, -1), (1, 0), (1, 1)]: u += b[i + x][j + y] binnum = int(u.replace('.', '0').replace('#', '1'), 2) next_iter[i][j] = a[binnum] b = [row[1:-1] for row in next_iter[1:-1]] if flip_switch: if inf_symbol == '#': inf_symbol = '.' else: inf_symbol = '#' fstr = '' for i in b: fstr += ''.join(i) print(fstr.count('#'))
goal = int(input('Write a number: ')) epsilon = 0.01 low = 0.0 high = max(1.0, goal) answer = (high + low) / 2 while abs(answer**2 - goal) >= epsilon: if answer**2 < goal: low = answer else: high = answer answer = (high + low) / 2 print(f'The square root of {goal} is {answer}')
goal = int(input('Write a number: ')) epsilon = 0.01 low = 0.0 high = max(1.0, goal) answer = (high + low) / 2 while abs(answer ** 2 - goal) >= epsilon: if answer ** 2 < goal: low = answer else: high = answer answer = (high + low) / 2 print(f'The square root of {goal} is {answer}')
class CustomListIndexException(Exception): pass class CustomListTypeException(Exception): pass class CustomListSumException(Exception): pass
class Customlistindexexception(Exception): pass class Customlisttypeexception(Exception): pass class Customlistsumexception(Exception): pass
# len = 1001 tp_qtys = ( (0.0, 0.0, 0.0, 0.0, 1.0), (0.0, 0.0, 0.0, 0.1, 0.9), (0.0, 0.0, 0.0, 0.2, 0.8), (0.0, 0.0, 0.0, 0.3, 0.7), (0.0, 0.0, 0.0, 0.4, 0.6), (0.0, 0.0, 0.0, 0.5, 0.5), (0.0, 0.0, 0.0, 0.6, 0.4), (0.0, 0.0, 0.0, 0.7, 0.3), (0.0, 0.0, 0.0, 0.8, 0.2), (0.0, 0.0, 0.0, 0.9, 0.1), (0.0, 0.0, 0.0, 1.0, 0.0), (0.0, 0.0, 0.1, 0.0, 0.9), (0.0, 0.0, 0.1, 0.1, 0.8), (0.0, 0.0, 0.1, 0.2, 0.7), (0.0, 0.0, 0.1, 0.3, 0.6), (0.0, 0.0, 0.1, 0.4, 0.5), (0.0, 0.0, 0.1, 0.5, 0.4), (0.0, 0.0, 0.1, 0.6, 0.3), (0.0, 0.0, 0.1, 0.7, 0.2), (0.0, 0.0, 0.1, 0.8, 0.1), (0.0, 0.0, 0.1, 0.9, 0.0), (0.0, 0.0, 0.2, 0.0, 0.8), (0.0, 0.0, 0.2, 0.1, 0.7), (0.0, 0.0, 0.2, 0.2, 0.6), (0.0, 0.0, 0.2, 0.3, 0.5), (0.0, 0.0, 0.2, 0.4, 0.4), (0.0, 0.0, 0.2, 0.5, 0.3), (0.0, 0.0, 0.2, 0.6, 0.2), (0.0, 0.0, 0.2, 0.7, 0.1), (0.0, 0.0, 0.2, 0.8, 0.0), (0.0, 0.0, 0.3, 0.0, 0.7), (0.0, 0.0, 0.3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0.0, 0.0, 0.0, 0.1), (0.9, 0.0, 0.0, 0.1, 0.0), (0.9, 0.0, 0.1, 0.0, 0.0), (0.9, 0.1, 0.0, 0.0, 0.0), (1.0, 0.0, 0.0, 0.0, 0.0))
def binary_prefix(value, binary=True): '''Return a tuple with a scaled down version of value and it's binary prefix Parameters: - `value`: numeric type to trim down - `binary`: use binary (ICE) or decimal (SI) prefix ''' SI = 'kMGTPEZY' unit = binary and 1024. or 1000. for i in range(-1, len(SI)): if abs(value) < unit: break value/= unit return (value, i<0 and '' or (binary and SI[i].upper() + 'i' or SI[i]))
def binary_prefix(value, binary=True): """Return a tuple with a scaled down version of value and it's binary prefix Parameters: - `value`: numeric type to trim down - `binary`: use binary (ICE) or decimal (SI) prefix """ si = 'kMGTPEZY' unit = binary and 1024.0 or 1000.0 for i in range(-1, len(SI)): if abs(value) < unit: break value /= unit return (value, i < 0 and '' or (binary and SI[i].upper() + 'i' or SI[i]))
a, b, c = [int(x) for x in input().split()] if c >= a and c <= b: print("Yes") else: print("No")
(a, b, c) = [int(x) for x in input().split()] if c >= a and c <= b: print('Yes') else: print('No')
def lambda_handler(event, context): print("event ->", event) print("context ->", context) return {"statusCode": "200", "body" : "hello from user profile"}
def lambda_handler(event, context): print('event ->', event) print('context ->', context) return {'statusCode': '200', 'body': 'hello from user profile'}
# Python Classes and Objects # Python is an Object-oriented Programming Language and almost everything in Python is an object with it properties and methods # A Python Class is like an object constructor or a blueprint for creating objects class Employee: # This "Employee" class contains one variable "age" age = 30 # Class instantiation uses function notation. # The class object is a parameterless function that returns a new instance of the class. # The below code creates a new instance of the class named "Employee" and assigns this object to the local variable named "employeeObject" employeeObject = Employee() print(employeeObject.age) print("**********************************************************") # _init_function of a class # This gets executed when the class is being initiated. It can be used to assign values # to object properties or ot other properties that are necessary when the object is # being created class Person: # This "Person" class contains one public method "printAge" and a constructor # The "self" parameter is a reference to the class itself, and is used to access variables # that belongs to the class. It does not have to be named "self" , we can call it # whatever we like, but it has to be the first parameter of any function in the class. def __init__(self, name, age, city): self.name = name self.age = age self.city = city # Object Methods # Objects can also contain methods. Methods in objects are functions that belong to the object def printAge(self): print("Printing the age of the person and his age is: " + str(self.age)) personObject1 = Person("Sam", 30, "Pune") print("The name of the person is: " + personObject1.name) print("The age of the person is: " + str(personObject1.age)) print("The city where the person lives is: " + personObject1.city) print("**********************************************************") personObject2 = Person("Richard", 35, "Kolkata") personObject2.printAge() print("**********************************************************") # We can also modify, delete the object properties like below personObject2.age = 40 personObject2.printAge() del personObject2.age # personObject2.printAge() # This will throw AttributeError print("**********************************************************") # We can also delete objects del personObject2 # personObject2.printAge() # This will throw NameError print("**********************************************************")
class Employee: age = 30 employee_object = employee() print(employeeObject.age) print('**********************************************************') class Person: def __init__(self, name, age, city): self.name = name self.age = age self.city = city def print_age(self): print('Printing the age of the person and his age is: ' + str(self.age)) person_object1 = person('Sam', 30, 'Pune') print('The name of the person is: ' + personObject1.name) print('The age of the person is: ' + str(personObject1.age)) print('The city where the person lives is: ' + personObject1.city) print('**********************************************************') person_object2 = person('Richard', 35, 'Kolkata') personObject2.printAge() print('**********************************************************') personObject2.age = 40 personObject2.printAge() del personObject2.age print('**********************************************************') del personObject2 print('**********************************************************')
def traverse_nested_dict(d): iters = [d.iteritems()] while iters: it = iters.pop() try: k, v = it.next() except StopIteration: continue iters.append(it) if isinstance(v, dict): iters.append(v.iteritems()) yield k, v def transform_to_json(dot_notation_dict): keys_dict = {} delim = '.' for key, val in dot_notation_dict.items(): if delim in key: splits = key.split(delim) if splits[0] not in keys_dict: keys_dict[splits[0]] = {} keys_dict[splits[0]]['.'.join(splits[1:])] = val else: keys_dict[key] = val for key, val in keys_dict.items(): if isinstance(val, dict): keys_dict[key] = transform_to_json(val) return keys_dict
def traverse_nested_dict(d): iters = [d.iteritems()] while iters: it = iters.pop() try: (k, v) = it.next() except StopIteration: continue iters.append(it) if isinstance(v, dict): iters.append(v.iteritems()) yield (k, v) def transform_to_json(dot_notation_dict): keys_dict = {} delim = '.' for (key, val) in dot_notation_dict.items(): if delim in key: splits = key.split(delim) if splits[0] not in keys_dict: keys_dict[splits[0]] = {} keys_dict[splits[0]]['.'.join(splits[1:])] = val else: keys_dict[key] = val for (key, val) in keys_dict.items(): if isinstance(val, dict): keys_dict[key] = transform_to_json(val) return keys_dict
T = int(input()) for i in range(T): n_A = int(input()) A = set([int(j) for j in input().split(' ')]) n_B = int(input()) B = set([int(j) for j in input().split(' ')]) if not A.difference(B): print("True") else: print("False")
t = int(input()) for i in range(T): n_a = int(input()) a = set([int(j) for j in input().split(' ')]) n_b = int(input()) b = set([int(j) for j in input().split(' ')]) if not A.difference(B): print('True') else: print('False')
for _ in range(int(input())): n=int(input()) if(n%4==0 or n%4==1): print((n//4)**2) else: print(((n//4)+1) * (n//4))
for _ in range(int(input())): n = int(input()) if n % 4 == 0 or n % 4 == 1: print((n // 4) ** 2) else: print((n // 4 + 1) * (n // 4))
BASE_URL = 'https://imdb.com' URLS = { 'Top 250 movies': '/chart/top/', 'Most popular movies': '/chart/moviemeter/', 'Top 250 TV shows': '/chart/toptv/', 'Most popular TV shows': '/chart/tvmeter/', 'Lowest rated movies': '/chart/bottom/', } def get_url(url_key): if url_key in URLS: return BASE_URL + URLS[url_key] return BASE_URL + url_key
base_url = 'https://imdb.com' urls = {'Top 250 movies': '/chart/top/', 'Most popular movies': '/chart/moviemeter/', 'Top 250 TV shows': '/chart/toptv/', 'Most popular TV shows': '/chart/tvmeter/', 'Lowest rated movies': '/chart/bottom/'} def get_url(url_key): if url_key in URLS: return BASE_URL + URLS[url_key] return BASE_URL + url_key
while True: try: a = float(input('Number: ')) except ValueError: print('Please, numbers only.') continue break print('You entered a number: {}'.format(a))
while True: try: a = float(input('Number: ')) except ValueError: print('Please, numbers only.') continue break print('You entered a number: {}'.format(a))
class Solution: def maxProduct(self, nums: List[int]) -> int: ans , max_p, min_p = nums[0], 1, 1 for num in nums: max_p, min_p = max(num, min_p*num, max_p* num), min(num, min_p*num, max_p*num) ans = max(ans, max_p) return ans
class Solution: def max_product(self, nums: List[int]) -> int: (ans, max_p, min_p) = (nums[0], 1, 1) for num in nums: (max_p, min_p) = (max(num, min_p * num, max_p * num), min(num, min_p * num, max_p * num)) ans = max(ans, max_p) return ans
class Solution: # @param n, an integer # @return an integer def reverseBits(self, n): t = bin(n)[2:] return int(((32 - len(t)) * "0" + t)[: : -1], 2)
class Solution: def reverse_bits(self, n): t = bin(n)[2:] return int(((32 - len(t)) * '0' + t)[::-1], 2)
'''Simple parsing using mxTextTools See the /doc subdirectory for introductory and general documentation. See license.txt for licensing information. (This is a BSD-licensed package). ''' __version__="2.1.1"
"""Simple parsing using mxTextTools See the /doc subdirectory for introductory and general documentation. See license.txt for licensing information. (This is a BSD-licensed package). """ __version__ = '2.1.1'
class Stack: def __init__(self): self.stack = [] def push(self, el): self.stack.append(el) def pop(self): return self.stack.pop() def peek(self): return self.stack[-1] def is_empty(self): return len(self.stack) == 0
class Stack: def __init__(self): self.stack = [] def push(self, el): self.stack.append(el) def pop(self): return self.stack.pop() def peek(self): return self.stack[-1] def is_empty(self): return len(self.stack) == 0
class Student: def __init__(self, name, phy, chem, bio): self.name = name self.phy = phy self.chem = chem self.bio = bio def totalObtained(self): return(self.phy + self.chem + self.bio) def percentage(self): return((self.totalObtained() / 300) * 100)
class Student: def __init__(self, name, phy, chem, bio): self.name = name self.phy = phy self.chem = chem self.bio = bio def total_obtained(self): return self.phy + self.chem + self.bio def percentage(self): return self.totalObtained() / 300 * 100
local_var = "foo" class C: local_var = local_var #pass def foo(self): print(self.local_var) C().foo()
local_var = 'foo' class C: local_var = local_var def foo(self): print(self.local_var) c().foo()
n = int(input()) lista = list(map(int,input().split(" "))) menor = lista[0] posicao = 0 for i in range(len(lista)): if menor > lista[i]: menor = lista[i] posicao = i print("Menor valor: {}".format(menor)) print("Posicao: {}".format(posicao))
n = int(input()) lista = list(map(int, input().split(' '))) menor = lista[0] posicao = 0 for i in range(len(lista)): if menor > lista[i]: menor = lista[i] posicao = i print('Menor valor: {}'.format(menor)) print('Posicao: {}'.format(posicao))
a = list(map(int, input().split())) def mergesort(a): if len(a) > 1: mid = len(a) // 2 left = a[:mid] right = a[mid:] mergesort(left) mergesort(right) i = j = k = 0 while i < len(left) and j < len(right): if left[i] <= right[j]: a[k] = left[i] i += 1 elif right[j] < left[i]: a[k] = right[j] j += 1 k += 1 while i < len(left): a[k] = left[i] i += 1 k += 1 while j < len(right): a[k] = right[j] j += 1 k += 1 mergesort(a) print(a)
a = list(map(int, input().split())) def mergesort(a): if len(a) > 1: mid = len(a) // 2 left = a[:mid] right = a[mid:] mergesort(left) mergesort(right) i = j = k = 0 while i < len(left) and j < len(right): if left[i] <= right[j]: a[k] = left[i] i += 1 elif right[j] < left[i]: a[k] = right[j] j += 1 k += 1 while i < len(left): a[k] = left[i] i += 1 k += 1 while j < len(right): a[k] = right[j] j += 1 k += 1 mergesort(a) print(a)
''' Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals targetSum. A leaf is a node with no children. ''' # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def hasPathSum(self, root: Optional[TreeNode], targetSum: int) -> bool: if not root: return False node_stack = [] node_stack.append((root, targetSum - root.val)) while node_stack: node, curr_sum = node_stack.pop() if not node.left and not node.right and curr_sum == 0: return True if node.right: node_stack.append((node.right, curr_sum - node.right.val)) if node.left: node_stack.append((node.left, curr_sum - node.left.val)) return False def hasPathSum_recur(self, root: Optional[TreeNode], targetSum: int) -> bool: if not root: return False targetSum = targetSum - root.val if not root.left and not root.right: return targetSum == 0 return self.hasPathSum_recur(root.left, targetSum) or self.hasPathSum_recur(root.right, targetSum)
""" Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals targetSum. A leaf is a node with no children. """ class Treenode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def has_path_sum(self, root: Optional[TreeNode], targetSum: int) -> bool: if not root: return False node_stack = [] node_stack.append((root, targetSum - root.val)) while node_stack: (node, curr_sum) = node_stack.pop() if not node.left and (not node.right) and (curr_sum == 0): return True if node.right: node_stack.append((node.right, curr_sum - node.right.val)) if node.left: node_stack.append((node.left, curr_sum - node.left.val)) return False def has_path_sum_recur(self, root: Optional[TreeNode], targetSum: int) -> bool: if not root: return False target_sum = targetSum - root.val if not root.left and (not root.right): return targetSum == 0 return self.hasPathSum_recur(root.left, targetSum) or self.hasPathSum_recur(root.right, targetSum)
# # PySNMP MIB module AP64STATS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AP64STATS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:07:11 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) # ap64Stats, = mibBuilder.importSymbols("APENT-MIB", "ap64Stats") ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ModuleIdentity, Unsigned32, TimeTicks, iso, Counter64, IpAddress, Integer32, Counter32, Bits, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Gauge32, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "Unsigned32", "TimeTicks", "iso", "Counter64", "IpAddress", "Integer32", "Counter32", "Bits", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Gauge32", "NotificationType") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") ap64StatsMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 2467, 1, 44, 1)) if mibBuilder.loadTexts: ap64StatsMib.setLastUpdated('9710092000Z') if mibBuilder.loadTexts: ap64StatsMib.setOrganization('ArrowPoint Communications Inc.') class PhysAddress(OctetString): pass class OwnerString(DisplayString): pass class EntryStatus(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("valid", 1), ("createRequest", 2), ("underCreation", 3), ("invalid", 4)) ap64dot3StatsTable = MibTable((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2), ) if mibBuilder.loadTexts: ap64dot3StatsTable.setStatus('current') ap64dot3StatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1), ).setIndexNames((0, "AP64STATS-MIB", "ap64dot3StatsIndex")) if mibBuilder.loadTexts: ap64dot3StatsEntry.setStatus('current') ap64dot3StatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsIndex.setStatus('current') ap64dot3StatsAlignmentErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsAlignmentErrors.setStatus('current') ap64dot3StatsFCSErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsFCSErrors.setStatus('current') ap64dot3StatsSingleCollisionFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsSingleCollisionFrames.setStatus('current') ap64dot3StatsMultipleCollisionFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsMultipleCollisionFrames.setStatus('current') ap64dot3StatsSQETestErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsSQETestErrors.setStatus('current') ap64dot3StatsDeferredTransmissions = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsDeferredTransmissions.setStatus('current') ap64dot3StatsLateCollisions = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsLateCollisions.setStatus('current') ap64dot3StatsExcessiveCollisions = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsExcessiveCollisions.setStatus('current') ap64dot3StatsInternalMacTransmitErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsInternalMacTransmitErrors.setStatus('current') ap64dot3StatsCarrierSenseErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsCarrierSenseErrors.setStatus('current') ap64dot3StatsFrameTooLongs = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsFrameTooLongs.setStatus('current') ap64dot3StatsInternalMacReceiveErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 16), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64dot3StatsInternalMacReceiveErrors.setStatus('current') ap64ifTable = MibTable((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3), ) if mibBuilder.loadTexts: ap64ifTable.setStatus('current') ap64ifEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1), ).setIndexNames((0, "AP64STATS-MIB", "ap64ifIndex")) if mibBuilder.loadTexts: ap64ifEntry.setStatus('current') ap64ifIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifIndex.setStatus('current') ap64ifDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifDescr.setStatus('current') ap64ifType = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 3), Integer32().subtype(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, 26, 27, 28, 29, 30, 31, 32))).clone(namedValues=NamedValues(("other", 1), ("regular1822", 2), ("hdh1822", 3), ("ddn-x25", 4), ("rfc877-x25", 5), ("ethernet-csmacd", 6), ("iso88023-csmacd", 7), ("iso88024-tokenBus", 8), ("iso88025-tokenRing", 9), ("iso88026-man", 10), ("starLan", 11), ("proteon-10Mbit", 12), ("proteon-80Mbit", 13), ("hyperchannel", 14), ("fddi", 15), ("lapb", 16), ("sdlc", 17), ("ds1", 18), ("e1", 19), ("basicISDN", 20), ("primaryISDN", 21), ("propPointToPointSerial", 22), ("ppp", 23), ("softwareLoopback", 24), ("eon", 25), ("ethernet-3Mbit", 26), ("nsip", 27), ("slip", 28), ("ultra", 29), ("ds3", 30), ("sip", 31), ("frame-relay", 32)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifType.setStatus('current') ap64ifMtu = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifMtu.setStatus('current') ap64ifSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifSpeed.setStatus('current') ap64ifPhysAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 6), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifPhysAddress.setStatus('current') ap64ifAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifAdminStatus.setStatus('current') ap64ifOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifOperStatus.setStatus('current') ap64ifLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 9), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifLastChange.setStatus('current') ap64ifInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifInOctets.setStatus('current') ap64ifInUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifInUcastPkts.setStatus('current') ap64ifInNUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifInNUcastPkts.setStatus('current') ap64ifInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifInDiscards.setStatus('current') ap64ifInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 14), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifInErrors.setStatus('current') ap64ifInUnknownProtos = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 15), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifInUnknownProtos.setStatus('current') ap64ifOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 16), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifOutOctets.setStatus('current') ap64ifOutUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 17), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifOutUcastPkts.setStatus('current') ap64ifOutNUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 18), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifOutNUcastPkts.setStatus('current') ap64ifOutDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 19), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifOutDiscards.setStatus('current') ap64ifOutErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 20), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifOutErrors.setStatus('current') ap64ifOutQLen = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 21), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifOutQLen.setStatus('current') ap64ifSpecific = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 22), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64ifSpecific.setStatus('current') ap64etherStatsTable = MibTable((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4), ) if mibBuilder.loadTexts: ap64etherStatsTable.setStatus('current') ap64etherStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1), ).setIndexNames((0, "AP64STATS-MIB", "ap64etherStatsIndex")) if mibBuilder.loadTexts: ap64etherStatsEntry.setStatus('current') ap64etherStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsIndex.setStatus('current') ap64etherStatsDataSource = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 2), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsDataSource.setStatus('current') ap64etherStatsDropEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsDropEvents.setStatus('current') ap64etherStatsOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsOctets.setStatus('current') ap64etherStatsPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsPkts.setStatus('current') ap64etherStatsBroadcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsBroadcastPkts.setStatus('current') ap64etherStatsMulticastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsMulticastPkts.setStatus('current') ap64etherStatsCRCAlignErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsCRCAlignErrors.setStatus('current') ap64etherStatsUndersizePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsUndersizePkts.setStatus('current') ap64etherStatsOversizePkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsOversizePkts.setStatus('current') ap64etherStatsFragments = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsFragments.setStatus('current') ap64etherStatsJabbers = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsJabbers.setStatus('current') ap64etherStatsCollisions = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsCollisions.setStatus('current') ap64etherStatsPkts64Octets = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 14), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsPkts64Octets.setStatus('current') ap64etherStatsPkts65to127Octets = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 15), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsPkts65to127Octets.setStatus('current') ap64etherStatsPkts128to255Octets = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 16), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsPkts128to255Octets.setStatus('current') ap64etherStatsPkts256to511Octets = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 17), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsPkts256to511Octets.setStatus('current') ap64etherStatsPkts512to1023Octets = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 18), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsPkts512to1023Octets.setStatus('current') ap64etherStatsPkts1024to1518Octets = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 19), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsPkts1024to1518Octets.setStatus('current') ap64etherStatsOwner = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 20), OwnerString()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsOwner.setStatus('current') ap64etherStatsStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 21), EntryStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: ap64etherStatsStatus.setStatus('current') mibBuilder.exportSymbols("AP64STATS-MIB", ap64etherStatsPkts64Octets=ap64etherStatsPkts64Octets, ap64etherStatsIndex=ap64etherStatsIndex, ap64etherStatsStatus=ap64etherStatsStatus, ap64etherStatsJabbers=ap64etherStatsJabbers, ap64ifInNUcastPkts=ap64ifInNUcastPkts, ap64etherStatsCollisions=ap64etherStatsCollisions, ap64dot3StatsInternalMacReceiveErrors=ap64dot3StatsInternalMacReceiveErrors, ap64dot3StatsExcessiveCollisions=ap64dot3StatsExcessiveCollisions, ap64ifLastChange=ap64ifLastChange, ap64ifOutDiscards=ap64ifOutDiscards, ap64ifMtu=ap64ifMtu, ap64ifInUcastPkts=ap64ifInUcastPkts, ap64ifInErrors=ap64ifInErrors, ap64dot3StatsIndex=ap64dot3StatsIndex, ap64etherStatsPkts=ap64etherStatsPkts, PYSNMP_MODULE_ID=ap64StatsMib, ap64etherStatsOwner=ap64etherStatsOwner, ap64dot3StatsSingleCollisionFrames=ap64dot3StatsSingleCollisionFrames, ap64ifInDiscards=ap64ifInDiscards, OwnerString=OwnerString, ap64etherStatsPkts128to255Octets=ap64etherStatsPkts128to255Octets, ap64ifSpecific=ap64ifSpecific, ap64etherStatsEntry=ap64etherStatsEntry, ap64ifType=ap64ifType, ap64ifOutOctets=ap64ifOutOctets, ap64etherStatsDropEvents=ap64etherStatsDropEvents, ap64etherStatsOversizePkts=ap64etherStatsOversizePkts, ap64StatsMib=ap64StatsMib, ap64ifAdminStatus=ap64ifAdminStatus, ap64ifOutErrors=ap64ifOutErrors, ap64dot3StatsLateCollisions=ap64dot3StatsLateCollisions, ap64etherStatsPkts512to1023Octets=ap64etherStatsPkts512to1023Octets, ap64dot3StatsTable=ap64dot3StatsTable, PhysAddress=PhysAddress, ap64ifOperStatus=ap64ifOperStatus, ap64dot3StatsMultipleCollisionFrames=ap64dot3StatsMultipleCollisionFrames, ap64ifEntry=ap64ifEntry, ap64dot3StatsAlignmentErrors=ap64dot3StatsAlignmentErrors, ap64ifOutNUcastPkts=ap64ifOutNUcastPkts, ap64ifSpeed=ap64ifSpeed, ap64dot3StatsFrameTooLongs=ap64dot3StatsFrameTooLongs, ap64etherStatsPkts1024to1518Octets=ap64etherStatsPkts1024to1518Octets, ap64dot3StatsSQETestErrors=ap64dot3StatsSQETestErrors, ap64dot3StatsInternalMacTransmitErrors=ap64dot3StatsInternalMacTransmitErrors, ap64etherStatsMulticastPkts=ap64etherStatsMulticastPkts, ap64etherStatsDataSource=ap64etherStatsDataSource, ap64ifDescr=ap64ifDescr, ap64etherStatsTable=ap64etherStatsTable, ap64etherStatsOctets=ap64etherStatsOctets, ap64etherStatsCRCAlignErrors=ap64etherStatsCRCAlignErrors, ap64etherStatsPkts65to127Octets=ap64etherStatsPkts65to127Octets, ap64ifOutUcastPkts=ap64ifOutUcastPkts, ap64etherStatsFragments=ap64etherStatsFragments, EntryStatus=EntryStatus, ap64dot3StatsDeferredTransmissions=ap64dot3StatsDeferredTransmissions, ap64ifInOctets=ap64ifInOctets, ap64etherStatsUndersizePkts=ap64etherStatsUndersizePkts, ap64dot3StatsFCSErrors=ap64dot3StatsFCSErrors, ap64dot3StatsCarrierSenseErrors=ap64dot3StatsCarrierSenseErrors, ap64ifTable=ap64ifTable, ap64ifOutQLen=ap64ifOutQLen, ap64etherStatsBroadcastPkts=ap64etherStatsBroadcastPkts, ap64ifPhysAddress=ap64ifPhysAddress, ap64etherStatsPkts256to511Octets=ap64etherStatsPkts256to511Octets, ap64dot3StatsEntry=ap64dot3StatsEntry, ap64ifInUnknownProtos=ap64ifInUnknownProtos, ap64ifIndex=ap64ifIndex)
(ap64_stats,) = mibBuilder.importSymbols('APENT-MIB', 'ap64Stats') (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, single_value_constraint, constraints_intersection, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (module_identity, unsigned32, time_ticks, iso, counter64, ip_address, integer32, counter32, bits, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, gauge32, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'Unsigned32', 'TimeTicks', 'iso', 'Counter64', 'IpAddress', 'Integer32', 'Counter32', 'Bits', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'Gauge32', 'NotificationType') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') ap64_stats_mib = module_identity((1, 3, 6, 1, 4, 1, 2467, 1, 44, 1)) if mibBuilder.loadTexts: ap64StatsMib.setLastUpdated('9710092000Z') if mibBuilder.loadTexts: ap64StatsMib.setOrganization('ArrowPoint Communications Inc.') class Physaddress(OctetString): pass class Ownerstring(DisplayString): pass class Entrystatus(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4)) named_values = named_values(('valid', 1), ('createRequest', 2), ('underCreation', 3), ('invalid', 4)) ap64dot3_stats_table = mib_table((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2)) if mibBuilder.loadTexts: ap64dot3StatsTable.setStatus('current') ap64dot3_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1)).setIndexNames((0, 'AP64STATS-MIB', 'ap64dot3StatsIndex')) if mibBuilder.loadTexts: ap64dot3StatsEntry.setStatus('current') ap64dot3_stats_index = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsIndex.setStatus('current') ap64dot3_stats_alignment_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 2), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsAlignmentErrors.setStatus('current') ap64dot3_stats_fcs_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 3), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsFCSErrors.setStatus('current') ap64dot3_stats_single_collision_frames = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsSingleCollisionFrames.setStatus('current') ap64dot3_stats_multiple_collision_frames = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 5), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsMultipleCollisionFrames.setStatus('current') ap64dot3_stats_sqe_test_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 6), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsSQETestErrors.setStatus('current') ap64dot3_stats_deferred_transmissions = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 7), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsDeferredTransmissions.setStatus('current') ap64dot3_stats_late_collisions = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 8), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsLateCollisions.setStatus('current') ap64dot3_stats_excessive_collisions = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 9), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsExcessiveCollisions.setStatus('current') ap64dot3_stats_internal_mac_transmit_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 10), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsInternalMacTransmitErrors.setStatus('current') ap64dot3_stats_carrier_sense_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 11), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsCarrierSenseErrors.setStatus('current') ap64dot3_stats_frame_too_longs = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 13), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsFrameTooLongs.setStatus('current') ap64dot3_stats_internal_mac_receive_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 2, 1, 16), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64dot3StatsInternalMacReceiveErrors.setStatus('current') ap64if_table = mib_table((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3)) if mibBuilder.loadTexts: ap64ifTable.setStatus('current') ap64if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1)).setIndexNames((0, 'AP64STATS-MIB', 'ap64ifIndex')) if mibBuilder.loadTexts: ap64ifEntry.setStatus('current') ap64if_index = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifIndex.setStatus('current') ap64if_descr = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifDescr.setStatus('current') ap64if_type = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 3), integer32().subtype(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, 26, 27, 28, 29, 30, 31, 32))).clone(namedValues=named_values(('other', 1), ('regular1822', 2), ('hdh1822', 3), ('ddn-x25', 4), ('rfc877-x25', 5), ('ethernet-csmacd', 6), ('iso88023-csmacd', 7), ('iso88024-tokenBus', 8), ('iso88025-tokenRing', 9), ('iso88026-man', 10), ('starLan', 11), ('proteon-10Mbit', 12), ('proteon-80Mbit', 13), ('hyperchannel', 14), ('fddi', 15), ('lapb', 16), ('sdlc', 17), ('ds1', 18), ('e1', 19), ('basicISDN', 20), ('primaryISDN', 21), ('propPointToPointSerial', 22), ('ppp', 23), ('softwareLoopback', 24), ('eon', 25), ('ethernet-3Mbit', 26), ('nsip', 27), ('slip', 28), ('ultra', 29), ('ds3', 30), ('sip', 31), ('frame-relay', 32)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifType.setStatus('current') ap64if_mtu = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifMtu.setStatus('current') ap64if_speed = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 5), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifSpeed.setStatus('current') ap64if_phys_address = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 6), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifPhysAddress.setStatus('current') ap64if_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('down', 2), ('testing', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifAdminStatus.setStatus('current') ap64if_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('down', 2), ('testing', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifOperStatus.setStatus('current') ap64if_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 9), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifLastChange.setStatus('current') ap64if_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 10), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifInOctets.setStatus('current') ap64if_in_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 11), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifInUcastPkts.setStatus('current') ap64if_in_n_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 12), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifInNUcastPkts.setStatus('current') ap64if_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 13), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifInDiscards.setStatus('current') ap64if_in_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 14), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifInErrors.setStatus('current') ap64if_in_unknown_protos = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 15), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifInUnknownProtos.setStatus('current') ap64if_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 16), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifOutOctets.setStatus('current') ap64if_out_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 17), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifOutUcastPkts.setStatus('current') ap64if_out_n_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 18), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifOutNUcastPkts.setStatus('current') ap64if_out_discards = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 19), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifOutDiscards.setStatus('current') ap64if_out_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 20), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifOutErrors.setStatus('current') ap64if_out_q_len = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 21), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifOutQLen.setStatus('current') ap64if_specific = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 3, 1, 22), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64ifSpecific.setStatus('current') ap64ether_stats_table = mib_table((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4)) if mibBuilder.loadTexts: ap64etherStatsTable.setStatus('current') ap64ether_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1)).setIndexNames((0, 'AP64STATS-MIB', 'ap64etherStatsIndex')) if mibBuilder.loadTexts: ap64etherStatsEntry.setStatus('current') ap64ether_stats_index = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsIndex.setStatus('current') ap64ether_stats_data_source = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 2), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsDataSource.setStatus('current') ap64ether_stats_drop_events = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 3), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsDropEvents.setStatus('current') ap64ether_stats_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 4), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsOctets.setStatus('current') ap64ether_stats_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 5), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsPkts.setStatus('current') ap64ether_stats_broadcast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 6), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsBroadcastPkts.setStatus('current') ap64ether_stats_multicast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 7), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsMulticastPkts.setStatus('current') ap64ether_stats_crc_align_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 8), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsCRCAlignErrors.setStatus('current') ap64ether_stats_undersize_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 9), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsUndersizePkts.setStatus('current') ap64ether_stats_oversize_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 10), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsOversizePkts.setStatus('current') ap64ether_stats_fragments = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 11), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsFragments.setStatus('current') ap64ether_stats_jabbers = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 12), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsJabbers.setStatus('current') ap64ether_stats_collisions = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 13), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsCollisions.setStatus('current') ap64ether_stats_pkts64_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 14), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsPkts64Octets.setStatus('current') ap64ether_stats_pkts65to127_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 15), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsPkts65to127Octets.setStatus('current') ap64ether_stats_pkts128to255_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 16), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsPkts128to255Octets.setStatus('current') ap64ether_stats_pkts256to511_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 17), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsPkts256to511Octets.setStatus('current') ap64ether_stats_pkts512to1023_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 18), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsPkts512to1023Octets.setStatus('current') ap64ether_stats_pkts1024to1518_octets = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 19), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsPkts1024to1518Octets.setStatus('current') ap64ether_stats_owner = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 20), owner_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsOwner.setStatus('current') ap64ether_stats_status = mib_table_column((1, 3, 6, 1, 4, 1, 2467, 1, 44, 4, 1, 21), entry_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: ap64etherStatsStatus.setStatus('current') mibBuilder.exportSymbols('AP64STATS-MIB', ap64etherStatsPkts64Octets=ap64etherStatsPkts64Octets, ap64etherStatsIndex=ap64etherStatsIndex, ap64etherStatsStatus=ap64etherStatsStatus, ap64etherStatsJabbers=ap64etherStatsJabbers, ap64ifInNUcastPkts=ap64ifInNUcastPkts, ap64etherStatsCollisions=ap64etherStatsCollisions, ap64dot3StatsInternalMacReceiveErrors=ap64dot3StatsInternalMacReceiveErrors, ap64dot3StatsExcessiveCollisions=ap64dot3StatsExcessiveCollisions, ap64ifLastChange=ap64ifLastChange, ap64ifOutDiscards=ap64ifOutDiscards, ap64ifMtu=ap64ifMtu, ap64ifInUcastPkts=ap64ifInUcastPkts, ap64ifInErrors=ap64ifInErrors, ap64dot3StatsIndex=ap64dot3StatsIndex, ap64etherStatsPkts=ap64etherStatsPkts, PYSNMP_MODULE_ID=ap64StatsMib, ap64etherStatsOwner=ap64etherStatsOwner, ap64dot3StatsSingleCollisionFrames=ap64dot3StatsSingleCollisionFrames, ap64ifInDiscards=ap64ifInDiscards, OwnerString=OwnerString, ap64etherStatsPkts128to255Octets=ap64etherStatsPkts128to255Octets, ap64ifSpecific=ap64ifSpecific, ap64etherStatsEntry=ap64etherStatsEntry, ap64ifType=ap64ifType, ap64ifOutOctets=ap64ifOutOctets, ap64etherStatsDropEvents=ap64etherStatsDropEvents, ap64etherStatsOversizePkts=ap64etherStatsOversizePkts, ap64StatsMib=ap64StatsMib, ap64ifAdminStatus=ap64ifAdminStatus, ap64ifOutErrors=ap64ifOutErrors, ap64dot3StatsLateCollisions=ap64dot3StatsLateCollisions, ap64etherStatsPkts512to1023Octets=ap64etherStatsPkts512to1023Octets, ap64dot3StatsTable=ap64dot3StatsTable, PhysAddress=PhysAddress, ap64ifOperStatus=ap64ifOperStatus, ap64dot3StatsMultipleCollisionFrames=ap64dot3StatsMultipleCollisionFrames, ap64ifEntry=ap64ifEntry, ap64dot3StatsAlignmentErrors=ap64dot3StatsAlignmentErrors, ap64ifOutNUcastPkts=ap64ifOutNUcastPkts, ap64ifSpeed=ap64ifSpeed, ap64dot3StatsFrameTooLongs=ap64dot3StatsFrameTooLongs, ap64etherStatsPkts1024to1518Octets=ap64etherStatsPkts1024to1518Octets, ap64dot3StatsSQETestErrors=ap64dot3StatsSQETestErrors, ap64dot3StatsInternalMacTransmitErrors=ap64dot3StatsInternalMacTransmitErrors, ap64etherStatsMulticastPkts=ap64etherStatsMulticastPkts, ap64etherStatsDataSource=ap64etherStatsDataSource, ap64ifDescr=ap64ifDescr, ap64etherStatsTable=ap64etherStatsTable, ap64etherStatsOctets=ap64etherStatsOctets, ap64etherStatsCRCAlignErrors=ap64etherStatsCRCAlignErrors, ap64etherStatsPkts65to127Octets=ap64etherStatsPkts65to127Octets, ap64ifOutUcastPkts=ap64ifOutUcastPkts, ap64etherStatsFragments=ap64etherStatsFragments, EntryStatus=EntryStatus, ap64dot3StatsDeferredTransmissions=ap64dot3StatsDeferredTransmissions, ap64ifInOctets=ap64ifInOctets, ap64etherStatsUndersizePkts=ap64etherStatsUndersizePkts, ap64dot3StatsFCSErrors=ap64dot3StatsFCSErrors, ap64dot3StatsCarrierSenseErrors=ap64dot3StatsCarrierSenseErrors, ap64ifTable=ap64ifTable, ap64ifOutQLen=ap64ifOutQLen, ap64etherStatsBroadcastPkts=ap64etherStatsBroadcastPkts, ap64ifPhysAddress=ap64ifPhysAddress, ap64etherStatsPkts256to511Octets=ap64etherStatsPkts256to511Octets, ap64dot3StatsEntry=ap64dot3StatsEntry, ap64ifInUnknownProtos=ap64ifInUnknownProtos, ap64ifIndex=ap64ifIndex)
#!/usr/bin/env python # encoding: utf-8 ''' @author: Jason Lee @license: (C) Copyright @ Jason Lee @contact: jiansenll@163.com @file: jianzhi_offer_65_1.py @time: 2019/4/25 15:29 @desc: ''' class Solution: def maxInWindows(self, num, size): if not num or size <= 0: return [] if size > len(num): return [] if size == 1: return num idx = [] # queue stores index, max value in [0] res = [] # results # first size numbers for i in range(size): while idx and num[i] >= num[idx[-1]]: idx.pop() idx.append(i) # only store index res.append(num[idx[0]]) # the first max value in the first sliding window # other numbers for i in range(size, len(num)): if idx[0] <= i - size: # index[0] is out of the window idx.pop(0) while idx and num[i] >= num[idx[-1]]: idx.pop() idx.append(i) res.append(num[idx[0]]) return res if __name__ == '__main__': num = [2,3,4,2,6,2,5,1] res = Solution() a = res.maxInWindows(num, 3) print(a)
""" @author: Jason Lee @license: (C) Copyright @ Jason Lee @contact: jiansenll@163.com @file: jianzhi_offer_65_1.py @time: 2019/4/25 15:29 @desc: """ class Solution: def max_in_windows(self, num, size): if not num or size <= 0: return [] if size > len(num): return [] if size == 1: return num idx = [] res = [] for i in range(size): while idx and num[i] >= num[idx[-1]]: idx.pop() idx.append(i) res.append(num[idx[0]]) for i in range(size, len(num)): if idx[0] <= i - size: idx.pop(0) while idx and num[i] >= num[idx[-1]]: idx.pop() idx.append(i) res.append(num[idx[0]]) return res if __name__ == '__main__': num = [2, 3, 4, 2, 6, 2, 5, 1] res = solution() a = res.maxInWindows(num, 3) print(a)
n=int(input("Enter the number : ")) sum=0 order=len(str(n)) copy_n=n while(n>0): digit=n%10 sum+=digit**order n=n//10 if(sum==copy_n): print(f"{copy_n} is an armstrong number") else: print(f"{copy_n} is not an armstrong number")
n = int(input('Enter the number : ')) sum = 0 order = len(str(n)) copy_n = n while n > 0: digit = n % 10 sum += digit ** order n = n // 10 if sum == copy_n: print(f'{copy_n} is an armstrong number') else: print(f'{copy_n} is not an armstrong number')
a = True while a: if(not a): a = get() else: execute(b) a = execute(mogrify(a))
a = True while a: if not a: a = get() else: execute(b) a = execute(mogrify(a))
# Features used in this test: #https://www.openstreetmap.org/way/316623706 #https://www.openstreetmap.org/way/343269426 #https://www.openstreetmap.org/way/370123970 #https://www.openstreetmap.org/way/84422829 #https://www.openstreetmap.org/way/316623706 #https://www.openstreetmap.org/way/343269426 #https://www.openstreetmap.org/way/370123970 #https://www.openstreetmap.org/way/84422829 #https://www.openstreetmap.org/way/103256220 # expect these features in _both_ the landuse and POIs layers. for layer in ['pois', 'landuse']: # whitelist zoo values zoo_values = [ (17, 22916, 43711, 316623706, 'enclosure'), # Bear Enclosure (presumably + woods=yes?) (17, 41926, 47147, 343269426, 'petting_zoo'), # Oaklawn Farm Zoo (17, 20927, 45938, 370123970, 'aviary'), # Budgie Buddies (17, 42457, 47102, 84422829, 'wildlife_park') # Shubenacadie Provincial Wildlife Park ] for z, x, y, osm_id, zoo in zoo_values: assert_has_feature( z, x, y, layer, { 'id': osm_id, 'kind': zoo }) # this is a building, so won't show up in landuse. still should be a POI. # Wings of Asia assert_has_feature( 17, 36263, 55884, 'pois', { 'id': 103256220, 'kind': 'aviary' })
for layer in ['pois', 'landuse']: zoo_values = [(17, 22916, 43711, 316623706, 'enclosure'), (17, 41926, 47147, 343269426, 'petting_zoo'), (17, 20927, 45938, 370123970, 'aviary'), (17, 42457, 47102, 84422829, 'wildlife_park')] for (z, x, y, osm_id, zoo) in zoo_values: assert_has_feature(z, x, y, layer, {'id': osm_id, 'kind': zoo}) assert_has_feature(17, 36263, 55884, 'pois', {'id': 103256220, 'kind': 'aviary'})
#symbol symbol = { 'PAD': 0, 'A': 1, 'T': 2, 'C': 3, 'G': 4, 'LOST': 5, 'CLS': 6, 'MASK': 7 } vocab_size = len(symbol) #pre-train embed_len = 256 context_len = 512 lm_input_len = 2 * context_len + 2 drop_1_prob = 0.1 drop_1_ratio = 0.2 drop_x_prob = 0.15 drop_x_ratio = 0.4 lm_heads_num = 8 lm_trans_num = 8 lm_hidden_num = 256 lm_linear_dropout = 0.5 lm_batch = 4 data_queue_max = 4096 lm_step_samples = 1024 lm_show_samples = 1024 lm_save_samples = 102400 # 1000000 pre_lr = 1e-4 lm_model_out = './lm.pth' lm_record_out = './lm.rec' #access-train dna_least_len = 50 test_ratio = 0.1 valid_ratio = 0.05 access_heads_num = 4 access_trans_num = 2 access_hidden_dim = lm_hidden_num access_linear_dropout = 0.5 access_lr = 2e-5 #MT MU NO NP PC PH access_data_name = 'SNEDE0000EPC' access_model_out = './PC.pth' dna_len = 767 access_epochs = 5 access_input_len = dna_len + 1 access_batch = 64
symbol = {'PAD': 0, 'A': 1, 'T': 2, 'C': 3, 'G': 4, 'LOST': 5, 'CLS': 6, 'MASK': 7} vocab_size = len(symbol) embed_len = 256 context_len = 512 lm_input_len = 2 * context_len + 2 drop_1_prob = 0.1 drop_1_ratio = 0.2 drop_x_prob = 0.15 drop_x_ratio = 0.4 lm_heads_num = 8 lm_trans_num = 8 lm_hidden_num = 256 lm_linear_dropout = 0.5 lm_batch = 4 data_queue_max = 4096 lm_step_samples = 1024 lm_show_samples = 1024 lm_save_samples = 102400 pre_lr = 0.0001 lm_model_out = './lm.pth' lm_record_out = './lm.rec' dna_least_len = 50 test_ratio = 0.1 valid_ratio = 0.05 access_heads_num = 4 access_trans_num = 2 access_hidden_dim = lm_hidden_num access_linear_dropout = 0.5 access_lr = 2e-05 access_data_name = 'SNEDE0000EPC' access_model_out = './PC.pth' dna_len = 767 access_epochs = 5 access_input_len = dna_len + 1 access_batch = 64
report = { "Water": 300, "Milk": 200, "Coffee": 100, "Money": 0, } prices = { "espresso": 1.50, "latte": 2.50, "cappuccino": 3.00, } ingredients = { "espresso": {"Water": 50, "Coffee": 18,}, "latte": {"Water": 200, "Coffee": 24, "Milk": 150,}, "cappuccino": {"Water": 250, "Coffee": 24, "Milk": 100,}, } def get_coffee(coffee_type): global report global num_pennies global num_nickels global num_dimes global num_quarters print("Please enter the coins.") try: num_quarters = int(input("Quarters: ")) num_dimes = int(input("Dimes: ")) num_nickels = int(input("Nickels: ")) num_pennies = int(input("Pennies: ")) except ValueError: num_quarters = 0 num_dimes = 0 num_nickels = 0 num_pennies = 0 total_money = num_quarters * 0.25 + num_dimes * 0.10 + num_nickels * 0.05 + num_pennies * 0.01 if total_money > prices[coffee_type]: print(f"Here is your change: ${round(total_money - 1.50, 2)}.") print(f"Here is your espresso.\nEnjoy!") report["Water"] -= ingredients[coffee_type]["Water"] report["Coffee"] -= ingredients[coffee_type]["Coffee"] report["Money"] += prices[coffee_type] try: report["Milk"] -= ingredients[coffee_type]["Milk"] except KeyError: pass else: print("That is not enough money.") while True: the_input = input("What would you like? " "Type 'report' for a list of the resources. " "Type 'restock' to reload the resources. (espresso/latte/cappuccino/report/restock): ") the_input = the_input.lower() if the_input == 'report': print(f"Water: {report['Water']}ml\n" f"Milk: {report['Milk']}ml\n" f"Coffee: {report['Coffee']}g\n" f"Money: ${report['Money']}") elif the_input == 'restock': print("Resources restocked.") report["Milk"] += 500 report["Water"] += 500 report["Coffee"] += 100 elif the_input == "espresso": if report["Water"] < 50: print("There isn't enough water.") exit() elif report["Coffee"] < 18: print("There isn't enough coffee.") exit() get_coffee("espresso") elif the_input == "latte": if report["Water"] < 200: print("There isn't enough water.") exit() elif report["Coffee"] < 24: print("There isn't enough coffee.") exit() elif report["Milk"] < 150: print("There isn't enough milk.") exit() get_coffee("latte") elif the_input == "cappuccino": if report["Water"] < 250: print("There isn't enough water.") exit() elif report["Coffee"] < 24: print("There isn't enough coffee.") exit() elif report["Milk"] < 100: print("There isn't enough milk.") exit() get_coffee("cappuccino") elif the_input == "exit": print("Goodbye") exit() else: print("That is not a coffee.")
report = {'Water': 300, 'Milk': 200, 'Coffee': 100, 'Money': 0} prices = {'espresso': 1.5, 'latte': 2.5, 'cappuccino': 3.0} ingredients = {'espresso': {'Water': 50, 'Coffee': 18}, 'latte': {'Water': 200, 'Coffee': 24, 'Milk': 150}, 'cappuccino': {'Water': 250, 'Coffee': 24, 'Milk': 100}} def get_coffee(coffee_type): global report global num_pennies global num_nickels global num_dimes global num_quarters print('Please enter the coins.') try: num_quarters = int(input('Quarters: ')) num_dimes = int(input('Dimes: ')) num_nickels = int(input('Nickels: ')) num_pennies = int(input('Pennies: ')) except ValueError: num_quarters = 0 num_dimes = 0 num_nickels = 0 num_pennies = 0 total_money = num_quarters * 0.25 + num_dimes * 0.1 + num_nickels * 0.05 + num_pennies * 0.01 if total_money > prices[coffee_type]: print(f'Here is your change: ${round(total_money - 1.5, 2)}.') print(f'Here is your espresso.\nEnjoy!') report['Water'] -= ingredients[coffee_type]['Water'] report['Coffee'] -= ingredients[coffee_type]['Coffee'] report['Money'] += prices[coffee_type] try: report['Milk'] -= ingredients[coffee_type]['Milk'] except KeyError: pass else: print('That is not enough money.') while True: the_input = input("What would you like? Type 'report' for a list of the resources. Type 'restock' to reload the resources. (espresso/latte/cappuccino/report/restock): ") the_input = the_input.lower() if the_input == 'report': print(f"Water: {report['Water']}ml\nMilk: {report['Milk']}ml\nCoffee: {report['Coffee']}g\nMoney: ${report['Money']}") elif the_input == 'restock': print('Resources restocked.') report['Milk'] += 500 report['Water'] += 500 report['Coffee'] += 100 elif the_input == 'espresso': if report['Water'] < 50: print("There isn't enough water.") exit() elif report['Coffee'] < 18: print("There isn't enough coffee.") exit() get_coffee('espresso') elif the_input == 'latte': if report['Water'] < 200: print("There isn't enough water.") exit() elif report['Coffee'] < 24: print("There isn't enough coffee.") exit() elif report['Milk'] < 150: print("There isn't enough milk.") exit() get_coffee('latte') elif the_input == 'cappuccino': if report['Water'] < 250: print("There isn't enough water.") exit() elif report['Coffee'] < 24: print("There isn't enough coffee.") exit() elif report['Milk'] < 100: print("There isn't enough milk.") exit() get_coffee('cappuccino') elif the_input == 'exit': print('Goodbye') exit() else: print('That is not a coffee.')
class IncompatibleStateToRuleException(RuntimeError): def __init__(self): RuntimeError.__init__(self, "State incompatible to any rule from grammar.")
class Incompatiblestatetoruleexception(RuntimeError): def __init__(self): RuntimeError.__init__(self, 'State incompatible to any rule from grammar.')
class NoOpTrainer(object): def train(self,batcher,dir,dev_batcher): pass
class Nooptrainer(object): def train(self, batcher, dir, dev_batcher): pass
SERIES_URL = 'https://api.themoviedb.org/3/tv/popular?language=en-US' GENRE_SERIES_URL = 'https://api.themoviedb.org/3/genre/tv/list?language=en-US' GENRE_MOVIES_URL = 'https://api.themoviedb.org/3/genre/movie/list?language=en-US' paramAPI = '&api_key=' paramPage = '&page='
series_url = 'https://api.themoviedb.org/3/tv/popular?language=en-US' genre_series_url = 'https://api.themoviedb.org/3/genre/tv/list?language=en-US' genre_movies_url = 'https://api.themoviedb.org/3/genre/movie/list?language=en-US' param_api = '&api_key=' param_page = '&page='
class numtup(tuple): def __add__(self, other): if isinstance(other, tuple): assert len(self) == len(other) return numtup(lhs + rhs for lhs, rhs in zip(self, other)) return numtup(lhs + other for lhs in self) def __mul__(self, other): if isinstance(other, tuple): assert len(self) == len(other) return numtup(lhs * rhs for lhs, rhs in zip(self, other)) return numtup(lhs * other for lhs in self)
class Numtup(tuple): def __add__(self, other): if isinstance(other, tuple): assert len(self) == len(other) return numtup((lhs + rhs for (lhs, rhs) in zip(self, other))) return numtup((lhs + other for lhs in self)) def __mul__(self, other): if isinstance(other, tuple): assert len(self) == len(other) return numtup((lhs * rhs for (lhs, rhs) in zip(self, other))) return numtup((lhs * other for lhs in self))
# FIND THE DUPLICATE NUMBER LEETCODE SOLUTION: # creating a class. class Solution(object): # creating a function to solve the problem. def findDuplicate(self, nums): # creating an iterable set. elements = set() # creating a for-loop to iterate for the elements in the list. for i in nums: # creating a nested if-statement to find the duplicated in the list. if i not in elements: # if the element is not initially present, we add it to the iterable set. elements.add(i) # creating an if-statement for returning the element if it is found more than once. else: # returning the element found more than once if the condition is met. return i
class Solution(object): def find_duplicate(self, nums): elements = set() for i in nums: if i not in elements: elements.add(i) else: return i
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"read_headers": "03_convert_files.ipynb", "parse_header_line": "03_convert_files.ipynb", "restore_header": "03_convert_files.ipynb", "read__write_from_sep_sv": "03_convert_files.ipynb", "run_subprocess": "04_generate_report.ipynb", "create_base_directories": "02_initalise_repository.ipynb", "directory_is_empty": "02_initalise_repository.ipynb", "parse_directory_date_to_datetime": "02_initalise_repository.ipynb", "datetime_to_timestamp": "02_initalise_repository.ipynb", "delete_files_in_repository_directory": "02_initalise_repository.ipynb", "copy_directory_to_directory": "02_initalise_repository.ipynb", "rename_all_files_in_directory_from_txt_to_csv": "02_initalise_repository.ipynb", "add_all_new_files_to_respository": "02_initalise_repository.ipynb", "commit_repository": "02_initalise_repository.ipynb", "branch_exists": "02_initalise_repository.ipynb", "create_branch": "02_initalise_repository.ipynb", "switch_to_branch": "02_initalise_repository.ipynb", "repository_exists": "02_initalise_repository.ipynb", "create_repository": "02_initalise_repository.ipynb", "add_directory_to_repository": "02_initalise_repository.ipynb", "copy_into_repository": "02_initalise_repository.ipynb", "write_from_sep_sv": "03_convert_files.ipynb", "restore_header_in_mem": "03_convert_files.ipynb", "convert_directory": "03_convert_files.ipynb", "convert_dirs": "03_convert_files.ipynb", "get_output_from_cmd": "04_generate_report.ipynb", "verbose": "04_generate_report.ipynb", "show_progress": "04_generate_report.ipynb", "GitRepositoryReader": "04_generate_report.ipynb", "parse_commitstr_to_datetime": "04_generate_report.ipynb", "copyfile_fullpath": "04_generate_report.ipynb", "mkdir_for_fullpath": "04_generate_report.ipynb", "remove_files_from_output_branch": "04_generate_report.ipynb", "remove_files_from_output": "04_generate_report.ipynb", "get_report_name_refs": "04_generate_report.ipynb", "make_output_directories": "04_generate_report.ipynb", "get_relative_path": "04_generate_report.ipynb", "copy_style_and_bootstrap": "04_generate_report.ipynb", "bootstrap_navbar": "04_generate_report.ipynb", "header": "04_generate_report.ipynb", "footer": "04_generate_report.ipynb", "page": "04_generate_report.ipynb", "diff2html_template": "04_generate_report.ipynb", "default_footer": "04_generate_report.ipynb", "generate_difference_report_page": "04_generate_report.ipynb", "BranchComparisonReport": "04_generate_report.ipynb", "FileChangeHistoryReportForBranch": "04_generate_report.ipynb"} modules = ["csv_header_restore.py", "convert_to_csv.py", "initalise_repository.py", "convert_files.py", "generate_report.py"] doc_url = "https://3ideas.github.io/config_tracker/" git_url = "https://github.com/3ideas/config_tracker/tree/master/" def custom_doc_links(name): return None
__all__ = ['index', 'modules', 'custom_doc_links', 'git_url'] index = {'read_headers': '03_convert_files.ipynb', 'parse_header_line': '03_convert_files.ipynb', 'restore_header': '03_convert_files.ipynb', 'read__write_from_sep_sv': '03_convert_files.ipynb', 'run_subprocess': '04_generate_report.ipynb', 'create_base_directories': '02_initalise_repository.ipynb', 'directory_is_empty': '02_initalise_repository.ipynb', 'parse_directory_date_to_datetime': '02_initalise_repository.ipynb', 'datetime_to_timestamp': '02_initalise_repository.ipynb', 'delete_files_in_repository_directory': '02_initalise_repository.ipynb', 'copy_directory_to_directory': '02_initalise_repository.ipynb', 'rename_all_files_in_directory_from_txt_to_csv': '02_initalise_repository.ipynb', 'add_all_new_files_to_respository': '02_initalise_repository.ipynb', 'commit_repository': '02_initalise_repository.ipynb', 'branch_exists': '02_initalise_repository.ipynb', 'create_branch': '02_initalise_repository.ipynb', 'switch_to_branch': '02_initalise_repository.ipynb', 'repository_exists': '02_initalise_repository.ipynb', 'create_repository': '02_initalise_repository.ipynb', 'add_directory_to_repository': '02_initalise_repository.ipynb', 'copy_into_repository': '02_initalise_repository.ipynb', 'write_from_sep_sv': '03_convert_files.ipynb', 'restore_header_in_mem': '03_convert_files.ipynb', 'convert_directory': '03_convert_files.ipynb', 'convert_dirs': '03_convert_files.ipynb', 'get_output_from_cmd': '04_generate_report.ipynb', 'verbose': '04_generate_report.ipynb', 'show_progress': '04_generate_report.ipynb', 'GitRepositoryReader': '04_generate_report.ipynb', 'parse_commitstr_to_datetime': '04_generate_report.ipynb', 'copyfile_fullpath': '04_generate_report.ipynb', 'mkdir_for_fullpath': '04_generate_report.ipynb', 'remove_files_from_output_branch': '04_generate_report.ipynb', 'remove_files_from_output': '04_generate_report.ipynb', 'get_report_name_refs': '04_generate_report.ipynb', 'make_output_directories': '04_generate_report.ipynb', 'get_relative_path': '04_generate_report.ipynb', 'copy_style_and_bootstrap': '04_generate_report.ipynb', 'bootstrap_navbar': '04_generate_report.ipynb', 'header': '04_generate_report.ipynb', 'footer': '04_generate_report.ipynb', 'page': '04_generate_report.ipynb', 'diff2html_template': '04_generate_report.ipynb', 'default_footer': '04_generate_report.ipynb', 'generate_difference_report_page': '04_generate_report.ipynb', 'BranchComparisonReport': '04_generate_report.ipynb', 'FileChangeHistoryReportForBranch': '04_generate_report.ipynb'} modules = ['csv_header_restore.py', 'convert_to_csv.py', 'initalise_repository.py', 'convert_files.py', 'generate_report.py'] doc_url = 'https://3ideas.github.io/config_tracker/' git_url = 'https://github.com/3ideas/config_tracker/tree/master/' def custom_doc_links(name): return None
class Solution: @staticmethod def longest_palindromic(s: str) -> str: pass def expandAroundCenter (s, left, right): while left >= 0 and right < len(s) and s[left] == s[right]: left -=1 right +=1 return s[left+1:right] longestSub = "" for i in range(len(s)): center = expandAroundCenter(s, i, i) inBetween = expandAroundCenter(s, i, i+1) longestSub = max(longestSub, center, inBetween, key=len) return print("Output : ", longestSub) s =input("input : s = ") Solution.longest_palindromic(s)
class Solution: @staticmethod def longest_palindromic(s: str) -> str: pass def expand_around_center(s, left, right): while left >= 0 and right < len(s) and (s[left] == s[right]): left -= 1 right += 1 return s[left + 1:right] longest_sub = '' for i in range(len(s)): center = expand_around_center(s, i, i) in_between = expand_around_center(s, i, i + 1) longest_sub = max(longestSub, center, inBetween, key=len) return print('Output : ', longestSub) s = input('input : s = ') Solution.longest_palindromic(s)
# # PySNMP MIB module PET-EVENTS (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PET-EVENTS # Produced by pysmi-0.3.4 at Wed May 1 14:40:13 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "SingleValueConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, iso, TimeTicks, ModuleIdentity, IpAddress, enterprises, Gauge32, MibIdentifier, Bits, NotificationType, Integer32, ObjectIdentity, Counter64, NotificationType, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "iso", "TimeTicks", "ModuleIdentity", "IpAddress", "enterprises", "Gauge32", "MibIdentifier", "Bits", "NotificationType", "Integer32", "ObjectIdentity", "Counter64", "NotificationType", "Counter32") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") wiredformgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 3183)) pet = MibIdentifier((1, 3, 6, 1, 4, 1, 3183, 1)) petEvts = MibIdentifier((1, 3, 6, 1, 4, 1, 3183, 1, 1)) petTrapUnderTemperatureWarning = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,65792)) if mibBuilder.loadTexts: petTrapUnderTemperatureWarning.setDescription('Under-Temperature Warning (Lower non-critical, going low)') petTrapUnderTemperatureCritical = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,65794)) if mibBuilder.loadTexts: petTrapUnderTemperatureCritical.setDescription('Critical Under-Temperature Problem (Lower Critical - going low)') petTrapOverTemperatureWarning = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,65799)) if mibBuilder.loadTexts: petTrapOverTemperatureWarning.setDescription('Over-Temperature Warning (Upper non-critical, going high)') petTrapOverTemperatureCritical = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,65801)) if mibBuilder.loadTexts: petTrapOverTemperatureCritical.setDescription('Critical Over-Temperature Problem (Upper Critical - going high)') petTrapGenericCriticalTemperature = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,67330)) if mibBuilder.loadTexts: petTrapGenericCriticalTemperature.setDescription('Generic Critical Temperature Problem (Transition to Critical from less severe)') petTrapGenericTemperatureWarning = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,67331)) if mibBuilder.loadTexts: petTrapGenericTemperatureWarning.setDescription('Generic Temperature Warning (Transition to Warning from less severe)') petTrapUnderAnalogVoltageCritical = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,131330)) if mibBuilder.loadTexts: petTrapUnderAnalogVoltageCritical.setDescription('Critical Under-Voltage Problem (Lower Critical - going low)') petTrapOverAnalogVoltageCritical = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,131337)) if mibBuilder.loadTexts: petTrapOverAnalogVoltageCritical.setDescription('Critical Over-Voltage Problem (Upper Critical - going high)') petTrapGenericCriticalDiscreteVoltage2 = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,132866)) if mibBuilder.loadTexts: petTrapGenericCriticalDiscreteVoltage2.setDescription('Generic Critical Voltage Problem (Transition to Critical from less severe)') petTrapGenericDiscreteVoltageWarning = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,132867)) if mibBuilder.loadTexts: petTrapGenericDiscreteVoltageWarning.setDescription('Generic Voltage Warning (Transition to Non-Critical from less severe)') petTrapGenericCriticalFan = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,263938)) if mibBuilder.loadTexts: petTrapGenericCriticalFan.setDescription('Generic Critical Fan failure (Transition to Critical from less severe)') petTrapGenericFanWarning = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,263169)) if mibBuilder.loadTexts: petTrapGenericFanWarning.setDescription('Generic Predictive Fan failure (predictive failure asserted)') petTrapFanSpeedproblem = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,262402)) if mibBuilder.loadTexts: petTrapFanSpeedproblem.setDescription('Fan Speed Problem (speed too low to meet chassis cooling specs)') petTrapFanSpeedWarning = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,262400)) if mibBuilder.loadTexts: petTrapFanSpeedWarning.setDescription('Fan speed warning (Fan speed below expected speed. Cooling still adequate)') petTrapPowerSupplyFailureDetected = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,552705)) if mibBuilder.loadTexts: petTrapPowerSupplyFailureDetected.setDescription('Power supply Failure detected') petTrapPowerSupplyWarning = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,552706)) if mibBuilder.loadTexts: petTrapPowerSupplyWarning.setDescription('Power supply Warning') petTrapProcessorInternalError = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,487168)) if mibBuilder.loadTexts: petTrapProcessorInternalError.setDescription('Processor Internal Error') petTrapProcessorThermalTrip = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,487169)) if mibBuilder.loadTexts: petTrapProcessorThermalTrip.setDescription('Processor Thermal Trip (Over Temperature Shutdown)') petTrapProcessorBistError = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,487170)) if mibBuilder.loadTexts: petTrapProcessorBistError.setDescription('Processor Fault Resilient Booting (FRB) 1 / BIST (Built In Self Test) Failure') petTrapProcessorFRB2Failure = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,487171)) if mibBuilder.loadTexts: petTrapProcessorFRB2Failure.setDescription('Processor Fault Resilient Booting (FRB) 2 / Hang in Power On Self Test (POST) Failure') petTrapProcessorFRB3Failure = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,487172)) if mibBuilder.loadTexts: petTrapProcessorFRB3Failure.setDescription('Processor Fault Resilient Booting (FRB) 3 / Processor Setup / Initialization Failure') petTrapMemoryUncorrectableECC = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,814849)) if mibBuilder.loadTexts: petTrapMemoryUncorrectableECC.setDescription('Uncorrectable ECC or other uncorrectable memory error') petTrapChassisIntrusion = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,356096)) if mibBuilder.loadTexts: petTrapChassisIntrusion.setDescription('Chassis Intrusion - Physical Security Violation') petTrapCriticalInterruptBusTimeout = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,1273601)) if mibBuilder.loadTexts: petTrapCriticalInterruptBusTimeout.setDescription('Critical Interrupt, Bus Timeout error') petTrapCriticalInterruptIOChannelNMI = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,1273602)) if mibBuilder.loadTexts: petTrapCriticalInterruptIOChannelNMI.setDescription('Critical Interrupt, IO Channel check NMI error') petTrapCriticalInterruptSoftwareNMI = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,1273603)) if mibBuilder.loadTexts: petTrapCriticalInterruptSoftwareNMI.setDescription('Critical Interrupt, software NMI error') petTrapCriticalInterruptPCIPERR = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,1273604)) if mibBuilder.loadTexts: petTrapCriticalInterruptPCIPERR.setDescription('Critical Interrupt, PCI PERR parity error') petTrapCriticalInterruptPCISERR = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,1273605)) if mibBuilder.loadTexts: petTrapCriticalInterruptPCISERR.setDescription('Critical Interrupt, PCI SERR parity error') petTrapCriticalInterruptBusUncorrect = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,1273608)) if mibBuilder.loadTexts: petTrapCriticalInterruptBusUncorrect.setDescription('Critical Interrupt, Bus Uncorrectable error') petTrapCriticalInterruptFatalNMI = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,1273609)) if mibBuilder.loadTexts: petTrapCriticalInterruptFatalNMI.setDescription('Critical Interrupt, Fatal NMI error') petTrapBIOSPOSTCodeError = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,1011456)) if mibBuilder.loadTexts: petTrapBIOSPOSTCodeError.setDescription('System Firmware Progress: BIOS POST code error') petTrapWatchdogReset = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,2322177)) if mibBuilder.loadTexts: petTrapWatchdogReset.setDescription('Watchdog Reset') petTrapWatchdogPowerDown = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,2322178)) if mibBuilder.loadTexts: petTrapWatchdogPowerDown.setDescription('Watchdog Power Down') petTrapWatchdogPowerCycle = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,2322179)) if mibBuilder.loadTexts: petTrapWatchdogPowerCycle.setDescription('Watchdog Power Cycle') petTrapOEMSystemBootEvent = NotificationType((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0,1208065)) if mibBuilder.loadTexts: petTrapOEMSystemBootEvent.setDescription('OEM System Boot Event') mibBuilder.exportSymbols("PET-EVENTS", petTrapUnderTemperatureCritical=petTrapUnderTemperatureCritical, wiredformgmt=wiredformgmt, petTrapUnderAnalogVoltageCritical=petTrapUnderAnalogVoltageCritical, petEvts=petEvts, petTrapOverTemperatureWarning=petTrapOverTemperatureWarning, petTrapFanSpeedWarning=petTrapFanSpeedWarning, petTrapProcessorThermalTrip=petTrapProcessorThermalTrip, petTrapProcessorBistError=petTrapProcessorBistError, petTrapGenericDiscreteVoltageWarning=petTrapGenericDiscreteVoltageWarning, petTrapGenericCriticalTemperature=petTrapGenericCriticalTemperature, petTrapProcessorFRB2Failure=petTrapProcessorFRB2Failure, petTrapWatchdogPowerDown=petTrapWatchdogPowerDown, petTrapWatchdogReset=petTrapWatchdogReset, petTrapCriticalInterruptSoftwareNMI=petTrapCriticalInterruptSoftwareNMI, petTrapOEMSystemBootEvent=petTrapOEMSystemBootEvent, petTrapGenericCriticalFan=petTrapGenericCriticalFan, petTrapGenericCriticalDiscreteVoltage2=petTrapGenericCriticalDiscreteVoltage2, petTrapOverAnalogVoltageCritical=petTrapOverAnalogVoltageCritical, petTrapMemoryUncorrectableECC=petTrapMemoryUncorrectableECC, petTrapPowerSupplyWarning=petTrapPowerSupplyWarning, petTrapCriticalInterruptBusUncorrect=petTrapCriticalInterruptBusUncorrect, petTrapProcessorFRB3Failure=petTrapProcessorFRB3Failure, petTrapOverTemperatureCritical=petTrapOverTemperatureCritical, petTrapGenericFanWarning=petTrapGenericFanWarning, petTrapUnderTemperatureWarning=petTrapUnderTemperatureWarning, petTrapCriticalInterruptFatalNMI=petTrapCriticalInterruptFatalNMI, petTrapWatchdogPowerCycle=petTrapWatchdogPowerCycle, petTrapProcessorInternalError=petTrapProcessorInternalError, petTrapCriticalInterruptIOChannelNMI=petTrapCriticalInterruptIOChannelNMI, petTrapCriticalInterruptBusTimeout=petTrapCriticalInterruptBusTimeout, petTrapFanSpeedproblem=petTrapFanSpeedproblem, petTrapCriticalInterruptPCIPERR=petTrapCriticalInterruptPCIPERR, petTrapChassisIntrusion=petTrapChassisIntrusion, petTrapBIOSPOSTCodeError=petTrapBIOSPOSTCodeError, petTrapCriticalInterruptPCISERR=petTrapCriticalInterruptPCISERR, petTrapPowerSupplyFailureDetected=petTrapPowerSupplyFailureDetected, pet=pet, petTrapGenericTemperatureWarning=petTrapGenericTemperatureWarning)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_intersection, value_size_constraint, constraints_union, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'SingleValueConstraint') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32, iso, time_ticks, module_identity, ip_address, enterprises, gauge32, mib_identifier, bits, notification_type, integer32, object_identity, counter64, notification_type, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32', 'iso', 'TimeTicks', 'ModuleIdentity', 'IpAddress', 'enterprises', 'Gauge32', 'MibIdentifier', 'Bits', 'NotificationType', 'Integer32', 'ObjectIdentity', 'Counter64', 'NotificationType', 'Counter32') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') wiredformgmt = mib_identifier((1, 3, 6, 1, 4, 1, 3183)) pet = mib_identifier((1, 3, 6, 1, 4, 1, 3183, 1)) pet_evts = mib_identifier((1, 3, 6, 1, 4, 1, 3183, 1, 1)) pet_trap_under_temperature_warning = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 65792)) if mibBuilder.loadTexts: petTrapUnderTemperatureWarning.setDescription('Under-Temperature Warning (Lower non-critical, going low)') pet_trap_under_temperature_critical = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 65794)) if mibBuilder.loadTexts: petTrapUnderTemperatureCritical.setDescription('Critical Under-Temperature Problem (Lower Critical - going low)') pet_trap_over_temperature_warning = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 65799)) if mibBuilder.loadTexts: petTrapOverTemperatureWarning.setDescription('Over-Temperature Warning (Upper non-critical, going high)') pet_trap_over_temperature_critical = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 65801)) if mibBuilder.loadTexts: petTrapOverTemperatureCritical.setDescription('Critical Over-Temperature Problem (Upper Critical - going high)') pet_trap_generic_critical_temperature = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 67330)) if mibBuilder.loadTexts: petTrapGenericCriticalTemperature.setDescription('Generic Critical Temperature Problem (Transition to Critical from less severe)') pet_trap_generic_temperature_warning = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 67331)) if mibBuilder.loadTexts: petTrapGenericTemperatureWarning.setDescription('Generic Temperature Warning (Transition to Warning from less severe)') pet_trap_under_analog_voltage_critical = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 131330)) if mibBuilder.loadTexts: petTrapUnderAnalogVoltageCritical.setDescription('Critical Under-Voltage Problem (Lower Critical - going low)') pet_trap_over_analog_voltage_critical = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 131337)) if mibBuilder.loadTexts: petTrapOverAnalogVoltageCritical.setDescription('Critical Over-Voltage Problem (Upper Critical - going high)') pet_trap_generic_critical_discrete_voltage2 = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 132866)) if mibBuilder.loadTexts: petTrapGenericCriticalDiscreteVoltage2.setDescription('Generic Critical Voltage Problem (Transition to Critical from less severe)') pet_trap_generic_discrete_voltage_warning = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 132867)) if mibBuilder.loadTexts: petTrapGenericDiscreteVoltageWarning.setDescription('Generic Voltage Warning (Transition to Non-Critical from less severe)') pet_trap_generic_critical_fan = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 263938)) if mibBuilder.loadTexts: petTrapGenericCriticalFan.setDescription('Generic Critical Fan failure (Transition to Critical from less severe)') pet_trap_generic_fan_warning = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 263169)) if mibBuilder.loadTexts: petTrapGenericFanWarning.setDescription('Generic Predictive Fan failure (predictive failure asserted)') pet_trap_fan_speedproblem = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 262402)) if mibBuilder.loadTexts: petTrapFanSpeedproblem.setDescription('Fan Speed Problem (speed too low to meet chassis cooling specs)') pet_trap_fan_speed_warning = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 262400)) if mibBuilder.loadTexts: petTrapFanSpeedWarning.setDescription('Fan speed warning (Fan speed below expected speed. Cooling still adequate)') pet_trap_power_supply_failure_detected = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 552705)) if mibBuilder.loadTexts: petTrapPowerSupplyFailureDetected.setDescription('Power supply Failure detected') pet_trap_power_supply_warning = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 552706)) if mibBuilder.loadTexts: petTrapPowerSupplyWarning.setDescription('Power supply Warning') pet_trap_processor_internal_error = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 487168)) if mibBuilder.loadTexts: petTrapProcessorInternalError.setDescription('Processor Internal Error') pet_trap_processor_thermal_trip = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 487169)) if mibBuilder.loadTexts: petTrapProcessorThermalTrip.setDescription('Processor Thermal Trip (Over Temperature Shutdown)') pet_trap_processor_bist_error = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 487170)) if mibBuilder.loadTexts: petTrapProcessorBistError.setDescription('Processor Fault Resilient Booting (FRB) 1 / BIST (Built In Self Test) Failure') pet_trap_processor_frb2_failure = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 487171)) if mibBuilder.loadTexts: petTrapProcessorFRB2Failure.setDescription('Processor Fault Resilient Booting (FRB) 2 / Hang in Power On Self Test (POST) Failure') pet_trap_processor_frb3_failure = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 487172)) if mibBuilder.loadTexts: petTrapProcessorFRB3Failure.setDescription('Processor Fault Resilient Booting (FRB) 3 / Processor Setup / Initialization Failure') pet_trap_memory_uncorrectable_ecc = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 814849)) if mibBuilder.loadTexts: petTrapMemoryUncorrectableECC.setDescription('Uncorrectable ECC or other uncorrectable memory error') pet_trap_chassis_intrusion = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 356096)) if mibBuilder.loadTexts: petTrapChassisIntrusion.setDescription('Chassis Intrusion - Physical Security Violation') pet_trap_critical_interrupt_bus_timeout = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 1273601)) if mibBuilder.loadTexts: petTrapCriticalInterruptBusTimeout.setDescription('Critical Interrupt, Bus Timeout error') pet_trap_critical_interrupt_io_channel_nmi = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 1273602)) if mibBuilder.loadTexts: petTrapCriticalInterruptIOChannelNMI.setDescription('Critical Interrupt, IO Channel check NMI error') pet_trap_critical_interrupt_software_nmi = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 1273603)) if mibBuilder.loadTexts: petTrapCriticalInterruptSoftwareNMI.setDescription('Critical Interrupt, software NMI error') pet_trap_critical_interrupt_pciperr = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 1273604)) if mibBuilder.loadTexts: petTrapCriticalInterruptPCIPERR.setDescription('Critical Interrupt, PCI PERR parity error') pet_trap_critical_interrupt_pciserr = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 1273605)) if mibBuilder.loadTexts: petTrapCriticalInterruptPCISERR.setDescription('Critical Interrupt, PCI SERR parity error') pet_trap_critical_interrupt_bus_uncorrect = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 1273608)) if mibBuilder.loadTexts: petTrapCriticalInterruptBusUncorrect.setDescription('Critical Interrupt, Bus Uncorrectable error') pet_trap_critical_interrupt_fatal_nmi = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 1273609)) if mibBuilder.loadTexts: petTrapCriticalInterruptFatalNMI.setDescription('Critical Interrupt, Fatal NMI error') pet_trap_biospost_code_error = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 1011456)) if mibBuilder.loadTexts: petTrapBIOSPOSTCodeError.setDescription('System Firmware Progress: BIOS POST code error') pet_trap_watchdog_reset = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 2322177)) if mibBuilder.loadTexts: petTrapWatchdogReset.setDescription('Watchdog Reset') pet_trap_watchdog_power_down = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 2322178)) if mibBuilder.loadTexts: petTrapWatchdogPowerDown.setDescription('Watchdog Power Down') pet_trap_watchdog_power_cycle = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 2322179)) if mibBuilder.loadTexts: petTrapWatchdogPowerCycle.setDescription('Watchdog Power Cycle') pet_trap_oem_system_boot_event = notification_type((1, 3, 6, 1, 4, 1, 3183, 1, 1) + (0, 1208065)) if mibBuilder.loadTexts: petTrapOEMSystemBootEvent.setDescription('OEM System Boot Event') mibBuilder.exportSymbols('PET-EVENTS', petTrapUnderTemperatureCritical=petTrapUnderTemperatureCritical, wiredformgmt=wiredformgmt, petTrapUnderAnalogVoltageCritical=petTrapUnderAnalogVoltageCritical, petEvts=petEvts, petTrapOverTemperatureWarning=petTrapOverTemperatureWarning, petTrapFanSpeedWarning=petTrapFanSpeedWarning, petTrapProcessorThermalTrip=petTrapProcessorThermalTrip, petTrapProcessorBistError=petTrapProcessorBistError, petTrapGenericDiscreteVoltageWarning=petTrapGenericDiscreteVoltageWarning, petTrapGenericCriticalTemperature=petTrapGenericCriticalTemperature, petTrapProcessorFRB2Failure=petTrapProcessorFRB2Failure, petTrapWatchdogPowerDown=petTrapWatchdogPowerDown, petTrapWatchdogReset=petTrapWatchdogReset, petTrapCriticalInterruptSoftwareNMI=petTrapCriticalInterruptSoftwareNMI, petTrapOEMSystemBootEvent=petTrapOEMSystemBootEvent, petTrapGenericCriticalFan=petTrapGenericCriticalFan, petTrapGenericCriticalDiscreteVoltage2=petTrapGenericCriticalDiscreteVoltage2, petTrapOverAnalogVoltageCritical=petTrapOverAnalogVoltageCritical, petTrapMemoryUncorrectableECC=petTrapMemoryUncorrectableECC, petTrapPowerSupplyWarning=petTrapPowerSupplyWarning, petTrapCriticalInterruptBusUncorrect=petTrapCriticalInterruptBusUncorrect, petTrapProcessorFRB3Failure=petTrapProcessorFRB3Failure, petTrapOverTemperatureCritical=petTrapOverTemperatureCritical, petTrapGenericFanWarning=petTrapGenericFanWarning, petTrapUnderTemperatureWarning=petTrapUnderTemperatureWarning, petTrapCriticalInterruptFatalNMI=petTrapCriticalInterruptFatalNMI, petTrapWatchdogPowerCycle=petTrapWatchdogPowerCycle, petTrapProcessorInternalError=petTrapProcessorInternalError, petTrapCriticalInterruptIOChannelNMI=petTrapCriticalInterruptIOChannelNMI, petTrapCriticalInterruptBusTimeout=petTrapCriticalInterruptBusTimeout, petTrapFanSpeedproblem=petTrapFanSpeedproblem, petTrapCriticalInterruptPCIPERR=petTrapCriticalInterruptPCIPERR, petTrapChassisIntrusion=petTrapChassisIntrusion, petTrapBIOSPOSTCodeError=petTrapBIOSPOSTCodeError, petTrapCriticalInterruptPCISERR=petTrapCriticalInterruptPCISERR, petTrapPowerSupplyFailureDetected=petTrapPowerSupplyFailureDetected, pet=pet, petTrapGenericTemperatureWarning=petTrapGenericTemperatureWarning)
andres = { "nombre": "Andres", "apellido": "Velasco", "edad": 22, "sueldo": 1.01, "hijos": [], "casado": False, "lotera": None, "mascota": { "nombre": "Cachetes", "edad": 3, }, } if andres: print("Si") else: print("No") print(andres['nombre']) print(andres['mascota']['nombre']) andres.pop("casado") print(andres) # Iterar por valores for valor in andres.values(): print(f"Valor: {valor}") # Iterar por llaves for llave in andres.keys(): print(f"Llave: {llave} Valor: {andres[llave]} {andres.get(llave)}") # Otra forma de iterar el diccionario for clave, valor in andres.items(): print(f"clave: {clave} valor: {valor}") # Agregar un nuevo atributo al diccionario andres["profesion"] = "Maestro" andres.update({"peso": 0, "altura": 1}) print(andres)
andres = {'nombre': 'Andres', 'apellido': 'Velasco', 'edad': 22, 'sueldo': 1.01, 'hijos': [], 'casado': False, 'lotera': None, 'mascota': {'nombre': 'Cachetes', 'edad': 3}} if andres: print('Si') else: print('No') print(andres['nombre']) print(andres['mascota']['nombre']) andres.pop('casado') print(andres) for valor in andres.values(): print(f'Valor: {valor}') for llave in andres.keys(): print(f'Llave: {llave} Valor: {andres[llave]} {andres.get(llave)}') for (clave, valor) in andres.items(): print(f'clave: {clave} valor: {valor}') andres['profesion'] = 'Maestro' andres.update({'peso': 0, 'altura': 1}) print(andres)
class Listened: def __init__(self, times): self.times = times def params_str(self): return "{{times: '{}'}}".format(self.times)
class Listened: def __init__(self, times): self.times = times def params_str(self): return "{{times: '{}'}}".format(self.times)
''' Question 03: Write code in python to print various datatypes of variable x. My Solution: ''' a = "fruits" b = 20 c = 20.5 d = 1j e = ["apple", "orange", "pomegranate"] f = ("banana", "strawberry", "grape") g = range(8) h = {"pomegranate" : "fruit", "class" : "flora" } i = {"kiwi", "dragon fruit", "custard apple"} j = frozenset({"kiwi", "dragon fruit", "custard apple"}) k = True l = b"Hello" m = bytearray(5) n = memoryview(bytes(5)) print(type(a)) print(type(b)) print(type(c)) print(type(d)) print(type(e)) print(type(f)) print(type(g)) print(type(h)) print(type(i)) print(type(j)) print(type(k)) print(type(l)) print(type(m)) print(type(n))
""" Question 03: Write code in python to print various datatypes of variable x. My Solution: """ a = 'fruits' b = 20 c = 20.5 d = 1j e = ['apple', 'orange', 'pomegranate'] f = ('banana', 'strawberry', 'grape') g = range(8) h = {'pomegranate': 'fruit', 'class': 'flora'} i = {'kiwi', 'dragon fruit', 'custard apple'} j = frozenset({'kiwi', 'dragon fruit', 'custard apple'}) k = True l = b'Hello' m = bytearray(5) n = memoryview(bytes(5)) print(type(a)) print(type(b)) print(type(c)) print(type(d)) print(type(e)) print(type(f)) print(type(g)) print(type(h)) print(type(i)) print(type(j)) print(type(k)) print(type(l)) print(type(m)) print(type(n))
VARS_COMMAND = 'command' VARS_SUBCOMMAND = 'subcommand' VARS_DEFAULT = 'default' API_BASE_URL = 'https://api.epsagon.com'
vars_command = 'command' vars_subcommand = 'subcommand' vars_default = 'default' api_base_url = 'https://api.epsagon.com'
''' An object class for a value of a parameter. ''' class Value: def __init__(self, p, v): self.param_name = p self.value = v self.visited = False self.visited_num = 0
""" An object class for a value of a parameter. """ class Value: def __init__(self, p, v): self.param_name = p self.value = v self.visited = False self.visited_num = 0
parentToChildrenBags = {} with open("C:\\Privat\\advent_of_code20\\puzzle7\\input1.txt") as f: for line in f: line = line.strip() print(line) lineSplit = line.split('contain') startingColorSplit = lineSplit[0].split(' ') startingColor = startingColorSplit[0] + ' ' + startingColorSplit[1] if not startingColor in parentToChildrenBags: parentToChildrenBags[startingColor] = [] print(lineSplit) lineSplit2 = lineSplit[1].split(',') print(lineSplit2) for bag in lineSplit2: if 'no other bags' in bag: continue bagSplit = bag.strip().split(' ') bagString = bagSplit[1] + ' ' + bagSplit[2] if not bagString in parentToChildrenBags[startingColor]: parentToChildrenBags[startingColor].append((bagString, bagSplit[0])) print(parentToChildrenBags) baggs = [] def recurse(parentToChildrenBags, bagTuples): for bagTuple in bagTuples: i = 0 while i < int(bagTuple[1]): recurse(parentToChildrenBags, parentToChildrenBags[bagTuple[0]]) i += 1 baggs.append(bagTuple[0]) recurse(parentToChildrenBags, parentToChildrenBags['shiny gold']) #print(baggs) print("Number of bags that are contained in a shiny gold bag: " + str(len(baggs)))
parent_to_children_bags = {} with open('C:\\Privat\\advent_of_code20\\puzzle7\\input1.txt') as f: for line in f: line = line.strip() print(line) line_split = line.split('contain') starting_color_split = lineSplit[0].split(' ') starting_color = startingColorSplit[0] + ' ' + startingColorSplit[1] if not startingColor in parentToChildrenBags: parentToChildrenBags[startingColor] = [] print(lineSplit) line_split2 = lineSplit[1].split(',') print(lineSplit2) for bag in lineSplit2: if 'no other bags' in bag: continue bag_split = bag.strip().split(' ') bag_string = bagSplit[1] + ' ' + bagSplit[2] if not bagString in parentToChildrenBags[startingColor]: parentToChildrenBags[startingColor].append((bagString, bagSplit[0])) print(parentToChildrenBags) baggs = [] def recurse(parentToChildrenBags, bagTuples): for bag_tuple in bagTuples: i = 0 while i < int(bagTuple[1]): recurse(parentToChildrenBags, parentToChildrenBags[bagTuple[0]]) i += 1 baggs.append(bagTuple[0]) recurse(parentToChildrenBags, parentToChildrenBags['shiny gold']) print('Number of bags that are contained in a shiny gold bag: ' + str(len(baggs)))
def main() -> None: # fermat's little theorem n, k, m = map(int, input().split()) # m^(k^n) MOD = 998_244_353 m %= MOD print(0 if m == 0 else pow(m, pow(k, n, MOD - 1), MOD)) # k^n % (MOD - 1) might be 0. # 0^0 is defined as 1 in Python. # but if m == 0, answer shoud be 0 # (Fermat's Little Theorem cannot be applied when m == 0). if __name__ == "__main__": main()
def main() -> None: (n, k, m) = map(int, input().split()) mod = 998244353 m %= MOD print(0 if m == 0 else pow(m, pow(k, n, MOD - 1), MOD)) if __name__ == '__main__': main()
lista = ['99', '102', '89', '120', '117'] cont = 0 maximo = lista[1] while cont < 3: if lista[cont] > lista[cont+1]: maximo = lista[cont+1] cont = cont + 1 print(maximo)
lista = ['99', '102', '89', '120', '117'] cont = 0 maximo = lista[1] while cont < 3: if lista[cont] > lista[cont + 1]: maximo = lista[cont + 1] cont = cont + 1 print(maximo)
t = int(input()) for _ in range(t): fib = [1,1] n = int(input()) if n == 1: print('IsFibo') else: while n > fib[1]: fib.insert(2, fib[0] + fib[1]) fib.remove(fib[0]) if fib[1] == n: print('IsFibo') else: print('IsNotFibo')
t = int(input()) for _ in range(t): fib = [1, 1] n = int(input()) if n == 1: print('IsFibo') else: while n > fib[1]: fib.insert(2, fib[0] + fib[1]) fib.remove(fib[0]) if fib[1] == n: print('IsFibo') else: print('IsNotFibo')
def g(x): b = 0 i = 1 while i < x: j = i + 1 while j <= x: b += gcd(i, j) j += 1 i += 1 return b def gcd(a, b): while not b == 0: a, b = b, a % b return a a = int(input()) while a: a = g(a) print(a) a = int(input())
def g(x): b = 0 i = 1 while i < x: j = i + 1 while j <= x: b += gcd(i, j) j += 1 i += 1 return b def gcd(a, b): while not b == 0: (a, b) = (b, a % b) return a a = int(input()) while a: a = g(a) print(a) a = int(input())
class ExampleError(Exception): pass def bad_function(): raise ExampleError('this is a message', 1, 2, 'other1', 'other2', 'other3') try: bad_function() except ExampleError as err: message, x, y, *others = err.args print(f'[I] {message}') print(f'[I] Others: {others}')
class Exampleerror(Exception): pass def bad_function(): raise example_error('this is a message', 1, 2, 'other1', 'other2', 'other3') try: bad_function() except ExampleError as err: (message, x, y, *others) = err.args print(f'[I] {message}') print(f'[I] Others: {others}')
# Created by MechAviv # Kinesis Introduction # Map ID :: 331001110 # Hideout :: Training Room 1 if "1" not in sm.getQuestEx(22700, "E1"): sm.lockForIntro() sm.playSound("Sound/Field.img/masteryBook/EnchantSuccess") sm.showClearStageExpWindow(350) sm.giveExp(350) sm.playExclSoundWithDownBGM("Voice3.img/Kinesis/guide_04", 100) sm.sendDelay(2500) sm.setQuestEx(22700, "E1", "1") sm.unlockForIntro() sm.warp(331001120, 0)
if '1' not in sm.getQuestEx(22700, 'E1'): sm.lockForIntro() sm.playSound('Sound/Field.img/masteryBook/EnchantSuccess') sm.showClearStageExpWindow(350) sm.giveExp(350) sm.playExclSoundWithDownBGM('Voice3.img/Kinesis/guide_04', 100) sm.sendDelay(2500) sm.setQuestEx(22700, 'E1', '1') sm.unlockForIntro() sm.warp(331001120, 0)
#TheBestTimeToParty # celebrities Comes Goes # beyonce 6 7 # Taylor 7 9 # Brad 10 11 # Katy 10 12 # Tom 8 10 # Drake 9 11 # Alicia 6 8 # [6 7) <- notice that at 6:59, Beyonce is there, but 7, she will be gone # but the great thing about this, is that python intervals are integer; why does this help us? # Answer: The range when someone is there, say 9-11 only needs to care about the times [9,10], inclusive. # therefore python's natural usage of lists that start inclusively at the first value, and end non-inclusive are perfect. # e.g. mylist[9:11] means it represents 9, 10 but not 11 ###### # How to build this array above to represent my celebs and their comes/goes times? # I chose two arrays; one for the celebs, and one for the times. In reality, the names of the celebs aren't given, however # I think I will keep a list of their names. def firstAttempt(): celebs = ['beyonce', 'taylor', 'brad', 'katy', 'tom', 'drake', 'alicia'] times = [list(range(6,7)), list(range(7,9)), list(range(10,12)), list(range(10,12)), list(range(8,10)), list(range(9,11)), list(range(6,8))] maxcount = 0 maxindex = 0 celebNames=['' for x in range(max(max(times)) + 1)] count=[0 for x in range(max(max(times)) + 1)] #print (times) #print (min(min(times))) for j in range(min(min(times)) , max(max(times))+1): for index, time in enumerate(times): if(time[0] == j): count[j] = count[j]+1 celebNames[j] = ' '.join([celebNames[j],celebs[index-len(celebs)]]) elif(len(time) > 1): if(time[0] <= j) and (j < (time[len(time)-1] + 1)): count[j] = count[j] + 1 celebNames[j] = ' '.join([celebNames[j],celebs[index-len(celebs)]]) if(maxcount < count[j]): maxindex = j maxcount = count[j] print("The best time to meet a celebrity is at ", maxindex, " and you would meet these people: ", celebNames[maxindex]) firstAttempt()
def first_attempt(): celebs = ['beyonce', 'taylor', 'brad', 'katy', 'tom', 'drake', 'alicia'] times = [list(range(6, 7)), list(range(7, 9)), list(range(10, 12)), list(range(10, 12)), list(range(8, 10)), list(range(9, 11)), list(range(6, 8))] maxcount = 0 maxindex = 0 celeb_names = ['' for x in range(max(max(times)) + 1)] count = [0 for x in range(max(max(times)) + 1)] for j in range(min(min(times)), max(max(times)) + 1): for (index, time) in enumerate(times): if time[0] == j: count[j] = count[j] + 1 celebNames[j] = ' '.join([celebNames[j], celebs[index - len(celebs)]]) elif len(time) > 1: if time[0] <= j and j < time[len(time) - 1] + 1: count[j] = count[j] + 1 celebNames[j] = ' '.join([celebNames[j], celebs[index - len(celebs)]]) if maxcount < count[j]: maxindex = j maxcount = count[j] print('The best time to meet a celebrity is at ', maxindex, ' and you would meet these people: ', celebNames[maxindex]) first_attempt()
class Heap: def __init__(self, initial_size=10): self.cbt = [None for _ in range(initial_size)] # initialize arrays self.next_index = 0 # denotes next index where new element should go def insert(self, data): # insert element at the next index self.cbt[self.next_index] = data # heapify self._up_heapify() # increase index by 1 self.next_index += 1 # double the array and copy elements if next_index goes out of array bounds if self.next_index >= len(self.cbt): temp = self.cbt self.cbt = [None for _ in range(2 * len(self.cbt))] for index in range(self.next_index): self.cbt[index] = temp[index] def remove(self): if self.size() == 0: return None self.next_index -= 1 to_remove = self.cbt[0] last_element = self.cbt[self.next_index] # place last element of the cbt at the root self.cbt[0] = last_element # we do not remove the elementm, rather we allow next `insert` operation to overwrite it self.cbt[self.next_index] = to_remove self._down_heapify() return to_remove def size(self): return self.next_index def is_empty(self): return self.size() == 0 def _up_heapify(self): # print("inside heapify") child_index = self.next_index while child_index >= 1: parent_index = (child_index - 1) // 2 parent_element = self.cbt[parent_index] child_element = self.cbt[child_index] if parent_element > child_element: self.cbt[parent_index] = child_element self.cbt[child_index] = parent_element child_index = parent_index else: break def _down_heapify(self): parent_index = 0 while parent_index < self.next_index: left_child_index = 2 * parent_index + 1 right_child_index = 2 * parent_index + 2 parent = self.cbt[parent_index] left_child = None right_child = None min_element = parent # check if left child exists if left_child_index < self.next_index: left_child = self.cbt[left_child_index] # check if right child exists if right_child_index < self.next_index: right_child = self.cbt[right_child_index] # compare with left child if left_child is not None: min_element = min(parent, left_child) # compare with right child if right_child is not None: min_element = min(right_child, min_element) # check if parent is rightly placed if min_element == parent: return if min_element == left_child: self.cbt[left_child_index] = parent self.cbt[parent_index] = min_element parent = left_child_index elif min_element == right_child: self.cbt[right_child_index] = parent self.cbt[parent_index] = min_element parent = right_child_index def get_minimum(self): # Returns the minimum element present in the heap if self.size() == 0: return None return self.cbt[0] if __name__ == '__main__': heap_size = 5 heap = Heap(heap_size) elements = [1, 2, 3, 4, 1, 2] for element in elements: heap.insert(element) print('Inserted elements: {}'.format(elements)) print('size of heap: {}'.format(heap.size())) for _ in range(4): print('Call remove: {}'.format(heap.remove())) print('Call get_minimum: {}'.format(heap.get_minimum())) for _ in range(2): print('Call remove: {}'.format(heap.remove())) print('size of heap: {}'.format(heap.size())) print('Call remove: {}'.format(heap.remove())) print('Call is_empty: {}'.format(heap.is_empty()))
class Heap: def __init__(self, initial_size=10): self.cbt = [None for _ in range(initial_size)] self.next_index = 0 def insert(self, data): self.cbt[self.next_index] = data self._up_heapify() self.next_index += 1 if self.next_index >= len(self.cbt): temp = self.cbt self.cbt = [None for _ in range(2 * len(self.cbt))] for index in range(self.next_index): self.cbt[index] = temp[index] def remove(self): if self.size() == 0: return None self.next_index -= 1 to_remove = self.cbt[0] last_element = self.cbt[self.next_index] self.cbt[0] = last_element self.cbt[self.next_index] = to_remove self._down_heapify() return to_remove def size(self): return self.next_index def is_empty(self): return self.size() == 0 def _up_heapify(self): child_index = self.next_index while child_index >= 1: parent_index = (child_index - 1) // 2 parent_element = self.cbt[parent_index] child_element = self.cbt[child_index] if parent_element > child_element: self.cbt[parent_index] = child_element self.cbt[child_index] = parent_element child_index = parent_index else: break def _down_heapify(self): parent_index = 0 while parent_index < self.next_index: left_child_index = 2 * parent_index + 1 right_child_index = 2 * parent_index + 2 parent = self.cbt[parent_index] left_child = None right_child = None min_element = parent if left_child_index < self.next_index: left_child = self.cbt[left_child_index] if right_child_index < self.next_index: right_child = self.cbt[right_child_index] if left_child is not None: min_element = min(parent, left_child) if right_child is not None: min_element = min(right_child, min_element) if min_element == parent: return if min_element == left_child: self.cbt[left_child_index] = parent self.cbt[parent_index] = min_element parent = left_child_index elif min_element == right_child: self.cbt[right_child_index] = parent self.cbt[parent_index] = min_element parent = right_child_index def get_minimum(self): if self.size() == 0: return None return self.cbt[0] if __name__ == '__main__': heap_size = 5 heap = heap(heap_size) elements = [1, 2, 3, 4, 1, 2] for element in elements: heap.insert(element) print('Inserted elements: {}'.format(elements)) print('size of heap: {}'.format(heap.size())) for _ in range(4): print('Call remove: {}'.format(heap.remove())) print('Call get_minimum: {}'.format(heap.get_minimum())) for _ in range(2): print('Call remove: {}'.format(heap.remove())) print('size of heap: {}'.format(heap.size())) print('Call remove: {}'.format(heap.remove())) print('Call is_empty: {}'.format(heap.is_empty()))
class Solution: def specialArray(self, nums: List[int]) -> int: for i in range(len(nums) + 1): count = 0 for num in nums: if num >= i: count += 1 if count > i: break if count == i: return i return -1
class Solution: def special_array(self, nums: List[int]) -> int: for i in range(len(nums) + 1): count = 0 for num in nums: if num >= i: count += 1 if count > i: break if count == i: return i return -1
decoration_prices = { 'ornament set': 2, 'tree skirt': 5, 'tree garlands': 3, 'tree lights': 15, } quantity = int(input()) days = int(input()) total_spirit = 0 total_cost = 0 for day in range(2, days+1): if day % 11 == 0: quantity += 2 if day % 2 == 0: total_spirit += 5 total_cost += decoration_prices['ornament set'] * quantity if day % 3 == 0: total_spirit += 13 total_cost += ( decoration_prices['tree skirt'] + decoration_prices['tree garlands'] ) * quantity if day % 5 == 0: total_spirit += 17 total_cost += decoration_prices['tree lights'] * quantity if day % 3 == 0: total_spirit += 30 if day % 10 == 0: total_spirit -= 20 total_cost += ( decoration_prices['tree skirt'] + decoration_prices['tree garlands'] + decoration_prices['tree lights'] ) if day == days: total_spirit -= 30 print(f'cost {total_cost}') print(f'spirit {total_spirit}')
decoration_prices = {'ornament set': 2, 'tree skirt': 5, 'tree garlands': 3, 'tree lights': 15} quantity = int(input()) days = int(input()) total_spirit = 0 total_cost = 0 for day in range(2, days + 1): if day % 11 == 0: quantity += 2 if day % 2 == 0: total_spirit += 5 total_cost += decoration_prices['ornament set'] * quantity if day % 3 == 0: total_spirit += 13 total_cost += (decoration_prices['tree skirt'] + decoration_prices['tree garlands']) * quantity if day % 5 == 0: total_spirit += 17 total_cost += decoration_prices['tree lights'] * quantity if day % 3 == 0: total_spirit += 30 if day % 10 == 0: total_spirit -= 20 total_cost += decoration_prices['tree skirt'] + decoration_prices['tree garlands'] + decoration_prices['tree lights'] if day == days: total_spirit -= 30 print(f'cost {total_cost}') print(f'spirit {total_spirit}')
# Leetcode 35. Search Insert Position # # Link: https://leetcode.com/problems/search-insert-position/ # Difficulty: Easy # Solution using BinarySearch # Complexity: # O(logN) time | where N represent the number of elements in the input array # O(1) space class Solution: def searchInsert(self, nums: List[int], target: int) -> int: left, right = 0, len(nums) - 1 while left <= right: pivot = (left + right) // 2 if nums[pivot] > target: right = pivot - 1 elif nums[pivot] < target: left = pivot + 1 else: return pivot return left
class Solution: def search_insert(self, nums: List[int], target: int) -> int: (left, right) = (0, len(nums) - 1) while left <= right: pivot = (left + right) // 2 if nums[pivot] > target: right = pivot - 1 elif nums[pivot] < target: left = pivot + 1 else: return pivot return left
def darken(hex_str: str, amount: int) -> str: rgb = hex_to_rgb(hex_str) rgb_result = tuple(map(lambda x: clamp(x - amount, 0, 255), rgb)) return rgb_to_hex(rgb_result) def hex_to_rgb(hex_str: str) -> tuple: hex_ = hex_str.lstrip('#') return tuple(int(hex_[i:i+2], 16) for i in (0, 2, 4)) def rgb_to_hex(rgb: tuple) -> str: return '#' + ''.join(map(lambda x: (str(hex(x))[2:4]).zfill(2), rgb)) def clamp(value: int, min_: int, max_: int) -> int: return min(max_, max(min_, value))
def darken(hex_str: str, amount: int) -> str: rgb = hex_to_rgb(hex_str) rgb_result = tuple(map(lambda x: clamp(x - amount, 0, 255), rgb)) return rgb_to_hex(rgb_result) def hex_to_rgb(hex_str: str) -> tuple: hex_ = hex_str.lstrip('#') return tuple((int(hex_[i:i + 2], 16) for i in (0, 2, 4))) def rgb_to_hex(rgb: tuple) -> str: return '#' + ''.join(map(lambda x: str(hex(x))[2:4].zfill(2), rgb)) def clamp(value: int, min_: int, max_: int) -> int: return min(max_, max(min_, value))
# spread # Manas Dash # 24th aug 2020 # Implements javascript's [].concat(...arr). Flattens the list(non-deep) and returns a list. def spread(arg): ret = [] for i in arg: if isinstance(i, list): ret.extend(i) else: ret.append(i) return ret print(spread([1, 2, 3, [4, 5, 6], [7], 8, 9])) print(spread(['The', 'quick', 'brown', ['fox', 'jumps', 'over'], ['the'], 'lazy', 'dog'])) # Output # [1,2,3,4,5,6,7,8,9] # ['The', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog']
def spread(arg): ret = [] for i in arg: if isinstance(i, list): ret.extend(i) else: ret.append(i) return ret print(spread([1, 2, 3, [4, 5, 6], [7], 8, 9])) print(spread(['The', 'quick', 'brown', ['fox', 'jumps', 'over'], ['the'], 'lazy', 'dog']))
# testnet_nanoswap_pools = {(77279127, 77279142): 77282939} # (asset1_id, asset2_id) -> app_id ASSET1_ID = 77279127 ASSET2_ID = 77279142 # Test UST asset # Set to zero to initialize a new test asset USTEST_ID = 0 # USTEST_ID = 85382910 # USTEST_ID = 80691763 # MetaPool App Id # Set to zero to initialize a new metapool METAPOOL_APP_ID = 0 # METAPOOL_APP_ID = 85383055 # METAPOOL_APP_ID = 83592564 # metaswap_contract_id = 81880111 # Default Pool argument MIN_INCREMENT = 1000 FEE_BPS = 30
asset1_id = 77279127 asset2_id = 77279142 ustest_id = 0 metapool_app_id = 0 min_increment = 1000 fee_bps = 30
num = int(input()) isHave = False for i in range(1, 31): for j in range(1, 31): for k in range(1, 31): if i < j < k: sum = i + j + k if sum == num: print(f'{i} + {j} + {k} = {sum}') isHave=True if i > j > k: sum = i * j * k if sum == num: print(f'{i} * {j} * {k} = {sum}') isHave=True if not isHave: print('No!') # for i in range(3, num+1): # for j in range(2, num): # if j > i: # continue # for k in range(1, num - 1): # if i > j > k: # sum = i * j * k # if sum == num: # print(f'{i} * {j} * {k} = {sum}')
num = int(input()) is_have = False for i in range(1, 31): for j in range(1, 31): for k in range(1, 31): if i < j < k: sum = i + j + k if sum == num: print(f'{i} + {j} + {k} = {sum}') is_have = True if i > j > k: sum = i * j * k if sum == num: print(f'{i} * {j} * {k} = {sum}') is_have = True if not isHave: print('No!')