content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
num1 = 1.5
num2 = 6.3
sum = num1 + num2
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))
| num1 = 1.5
num2 = 6.3
sum = num1 + num2
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum)) |
a = []
while True:
k = 0
resposta = str(input('digite uma expressao qualquer:')).strip()
for itens in resposta:
if itens == '(':
a.append(resposta)
elif itens == ')':
if len(a) == 0:
print('expressao invalida')
k = 1
break
elif len(a) != 0:
a.pop()
if len(a) > 0:
print('''Expressao invalida
Tente novamente!!''')
elif len(a) == 0 and resposta[0] != ')' and resposta.count('(') == resposta.count(')') and k == 0:
print('Expressao valida!!')
print(a)
while True:
c = str(input('deseja continuar ? [S/N] ')).strip().upper()
if c == 'S' or c == 'N':
break
if c == 'N':
break
| a = []
while True:
k = 0
resposta = str(input('digite uma expressao qualquer:')).strip()
for itens in resposta:
if itens == '(':
a.append(resposta)
elif itens == ')':
if len(a) == 0:
print('expressao invalida')
k = 1
break
elif len(a) != 0:
a.pop()
if len(a) > 0:
print('Expressao invalida\n Tente novamente!!')
elif len(a) == 0 and resposta[0] != ')' and (resposta.count('(') == resposta.count(')')) and (k == 0):
print('Expressao valida!!')
print(a)
while True:
c = str(input('deseja continuar ? [S/N] ')).strip().upper()
if c == 'S' or c == 'N':
break
if c == 'N':
break |
# Copyright (c) 2019 Damian Grzywna
# Licensed under the zlib/libpng License
# http://opensource.org/licenses/zlib/
__all__ = ('__title__', '__summary__', '__uri__', '__version_info__',
'__version__', '__author__', '__maintainer__', '__email__',
'__copyright__', '__license__')
__title__ = "aptiv.digitRecognizer"
__summary__ = "Small application to recognize handwritten digits on the image using machine learning algorithm."
__uri__ = "https://github.com/dawis96/digitRecognizer"
__version_info__ = type("version_info", (), dict(serial=0,
major=0, minor=1, micro=0, releaselevel="alpha"))
__version__ = "{0.major}.{0.minor}.{0.micro}{1}{2}".format(__version_info__,
dict(final="", alpha="a", beta="b", rc="rc")[__version_info__.releaselevel],
"" if __version_info__.releaselevel == "final" else __version_info__.serial)
__author__ = "Damian Grzywna"
__maintainer__ = "Damian Grzywna"
__email__ = "dawis996@gmail.com"
__copyright__ = "Copyright (c) 2019, {0}".format(__author__)
__license__ = "zlib/libpng License ; {0}".format(
"http://opensource.org/licenses/zlib/")
| __all__ = ('__title__', '__summary__', '__uri__', '__version_info__', '__version__', '__author__', '__maintainer__', '__email__', '__copyright__', '__license__')
__title__ = 'aptiv.digitRecognizer'
__summary__ = 'Small application to recognize handwritten digits on the image using machine learning algorithm.'
__uri__ = 'https://github.com/dawis96/digitRecognizer'
__version_info__ = type('version_info', (), dict(serial=0, major=0, minor=1, micro=0, releaselevel='alpha'))
__version__ = '{0.major}.{0.minor}.{0.micro}{1}{2}'.format(__version_info__, dict(final='', alpha='a', beta='b', rc='rc')[__version_info__.releaselevel], '' if __version_info__.releaselevel == 'final' else __version_info__.serial)
__author__ = 'Damian Grzywna'
__maintainer__ = 'Damian Grzywna'
__email__ = 'dawis996@gmail.com'
__copyright__ = 'Copyright (c) 2019, {0}'.format(__author__)
__license__ = 'zlib/libpng License ; {0}'.format('http://opensource.org/licenses/zlib/') |
class Array:
n = 0
arr = []
def print_array(self):
print(self.arr)
def get_user_input(self):
self.n = int(input('Enter the size of array: '))
print('Enter the elements of array in next line (space separated)')
self.arr = list(map(int, input().split()))
| class Array:
n = 0
arr = []
def print_array(self):
print(self.arr)
def get_user_input(self):
self.n = int(input('Enter the size of array: '))
print('Enter the elements of array in next line (space separated)')
self.arr = list(map(int, input().split())) |
def hello(name):
print("hello", name, "!")
hello("xxcfun") | def hello(name):
print('hello', name, '!')
hello('xxcfun') |
# def fun(num):
# if num>5:
# return True
# else:
# return False
fun=lambda x: x>5
l=[1,2,3,4,45,35,43,523]
print(list(filter(fun,l))) | fun = lambda x: x > 5
l = [1, 2, 3, 4, 45, 35, 43, 523]
print(list(filter(fun, l))) |
class Node:
def __init__(self, value):
self.value = value
self.next = None
self.previous = None
def remove_node(self):
if self.next:
self.next.previous = self.previous
if self.previous:
self.previous.next = self.next
self.next = None
self.previous = None | class Node:
def __init__(self, value):
self.value = value
self.next = None
self.previous = None
def remove_node(self):
if self.next:
self.next.previous = self.previous
if self.previous:
self.previous.next = self.next
self.next = None
self.previous = None |
path = "./Inputs/day5.txt"
# path = "./Inputs/day5Test.txt"
def part1():
seats = getSeats()
highestSeat = max(seats)
print("Part 1:")
print(highestSeat)
def part2():
seats = getSeats()
# get the missing seat
difference = sorted(set(range(seats[0], seats[-1] + 1)).difference(seats))
print("Part 2:")
print(difference[0])
def getSeats():
seats = []
with open(path) as file:
for line in file.readlines():
rows = list(range(128))
cols = list(range(8))
letters = list(line.rstrip('\n'))
for letter in letters:
if(letter == 'F' or letter == 'B'):
rows = splitList(rows, letter)
elif(letter == 'L' or letter == 'R'):
cols = splitList(cols, letter)
row = rows[0]
col = cols[0]
seat = row * 8 + col
seats.append(seat)
return seats
def splitList(origList, part):
if (part == 'F' or part == 'L'):
# take first half
new_list = origList[:len(origList)//2]
else:
# take second half
new_list = origList[len(origList)//2:]
return new_list
part1()
part2()
| path = './Inputs/day5.txt'
def part1():
seats = get_seats()
highest_seat = max(seats)
print('Part 1:')
print(highestSeat)
def part2():
seats = get_seats()
difference = sorted(set(range(seats[0], seats[-1] + 1)).difference(seats))
print('Part 2:')
print(difference[0])
def get_seats():
seats = []
with open(path) as file:
for line in file.readlines():
rows = list(range(128))
cols = list(range(8))
letters = list(line.rstrip('\n'))
for letter in letters:
if letter == 'F' or letter == 'B':
rows = split_list(rows, letter)
elif letter == 'L' or letter == 'R':
cols = split_list(cols, letter)
row = rows[0]
col = cols[0]
seat = row * 8 + col
seats.append(seat)
return seats
def split_list(origList, part):
if part == 'F' or part == 'L':
new_list = origList[:len(origList) // 2]
else:
new_list = origList[len(origList) // 2:]
return new_list
part1()
part2() |
def max(*args):
if len(args) == 0:
return 'no numbers given'
m = args[0]
for arg in args:
if arg > m:
m = arg
return m
print(max())
print(max(5, 12, 3, 6, 7, 10, 9))
| def max(*args):
if len(args) == 0:
return 'no numbers given'
m = args[0]
for arg in args:
if arg > m:
m = arg
return m
print(max())
print(max(5, 12, 3, 6, 7, 10, 9)) |
def solution(N):
n = 0; current = 1; nex = 1
while n <N-1:
current, nex = nex, current+nex
n +=1
return 2*(current+nex)
| def solution(N):
n = 0
current = 1
nex = 1
while n < N - 1:
(current, nex) = (nex, current + nex)
n += 1
return 2 * (current + nex) |
a = [2012, 2013, 2014]
print (a)
print (a[0])
print (a[1])
print (a[2])
b = 2012
c = [b, 2015, 20.1, "Hello", "Hi"]
print (c[1:4])
| a = [2012, 2013, 2014]
print(a)
print(a[0])
print(a[1])
print(a[2])
b = 2012
c = [b, 2015, 20.1, 'Hello', 'Hi']
print(c[1:4]) |
class Solution:
def _breakIntoLines(self, words: List[str], maxWidth: int) -> List[List[str]]:
allLines = []
charCount = 0
# list of strings for easy append
currLine = []
for word in words:
wordLen = len(word)
if wordLen + charCount > maxWidth:
# start a new line
allLines.append(currLine)
charCount = 0
currLine = []
currLine.append(word)
charCount += (wordLen+1)
allLines.append(currLine)
return allLines
def _generateSpaces(self, line: List[str], idx: int, numLines: int, maxWidth: int) -> List[str]:
spaces = maxWidth - sum([len(word) for word in line])
numWords = len(line)
countSpaces = numWords - 1
# if not both these cases, then need left justification
if numWords > 1 and idx != numLines-1:
minSpace = spaces // countSpaces
remainingSpaces = spaces - (minSpace * countSpaces)
spacesToFill = [minSpace for _ in range(countSpaces)]
for x in range(remainingSpaces):
spacesToFill[x] += 1
# for the last word
spacesToFill.append(0)
else:
# left justified cases
extraSpace = spaces - countSpaces
spacesToFill = [1 for _ in range(countSpaces)]
# for the last word, fill remaining width with space
spacesToFill.append(extraSpace)
return spacesToFill
def fullJustify(self, words: List[str], maxWidth: int) -> List[str]:
allLines = self._breakIntoLines(words, maxWidth)
numLines = len(allLines)
for idx, line in enumerate(allLines):
spacesToFill = self._generateSpaces(line, idx, numLines, maxWidth)
newLine = []
for j, word in enumerate(line):
newLine.append(word)
newLine.append(' ' * spacesToFill[j])
allLines[idx] = newLine
return list(map(lambda x: ''.join(x), allLines)) | class Solution:
def _break_into_lines(self, words: List[str], maxWidth: int) -> List[List[str]]:
all_lines = []
char_count = 0
curr_line = []
for word in words:
word_len = len(word)
if wordLen + charCount > maxWidth:
allLines.append(currLine)
char_count = 0
curr_line = []
currLine.append(word)
char_count += wordLen + 1
allLines.append(currLine)
return allLines
def _generate_spaces(self, line: List[str], idx: int, numLines: int, maxWidth: int) -> List[str]:
spaces = maxWidth - sum([len(word) for word in line])
num_words = len(line)
count_spaces = numWords - 1
if numWords > 1 and idx != numLines - 1:
min_space = spaces // countSpaces
remaining_spaces = spaces - minSpace * countSpaces
spaces_to_fill = [minSpace for _ in range(countSpaces)]
for x in range(remainingSpaces):
spacesToFill[x] += 1
spacesToFill.append(0)
else:
extra_space = spaces - countSpaces
spaces_to_fill = [1 for _ in range(countSpaces)]
spacesToFill.append(extraSpace)
return spacesToFill
def full_justify(self, words: List[str], maxWidth: int) -> List[str]:
all_lines = self._breakIntoLines(words, maxWidth)
num_lines = len(allLines)
for (idx, line) in enumerate(allLines):
spaces_to_fill = self._generateSpaces(line, idx, numLines, maxWidth)
new_line = []
for (j, word) in enumerate(line):
newLine.append(word)
newLine.append(' ' * spacesToFill[j])
allLines[idx] = newLine
return list(map(lambda x: ''.join(x), allLines)) |
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = '\xc2\xce\xc6\x9e\xff\xa7\x1b:\xc7O\x919\xdf=}d'
_lr_action_items = {'TAG':([20,25,32,44,45,],[-21,-19,39,-22,-20,]),'LBRACE':([10,13,15,24,],[-9,17,20,-10,]),'RPAREN':([14,18,19,26,31,],[-11,-12,24,34,-13,]),'RBRACE':([17,20,22,25,32,35,41,42,44,45,],[-14,-21,27,-19,38,-17,-15,-16,-22,-20,]),'FIELD_HIGH':([17,22,35,41,42,],[-14,30,-17,-15,-16,]),'MASK':([20,25,44,],[-21,33,-22,]),'PADDING':([17,22,35,41,42,],[-14,28,-17,-15,-16,]),'FIELD':([17,22,35,41,42,],[-14,29,-17,-15,-16,]),'BASE':([0,2,5,7,8,9,27,34,38,],[-2,3,-3,-5,-4,-6,-8,-7,-18,]),'COMMA':([14,16,18,19,31,],[-11,21,-12,23,-13,]),'LPAREN':([9,10,],[12,14,]),'INTLIT':([3,12,21,28,33,36,37,40,43,],[9,16,26,35,40,41,42,44,45,]),'IDENTIFIER':([4,6,11,14,23,29,30,39,],[10,11,15,18,31,36,37,43,]),'TAGGED_UNION':([0,2,5,7,8,9,27,34,38,],[-2,6,-3,-5,-4,-6,-8,-7,-18,]),'BLOCK':([0,2,5,7,8,9,27,34,38,],[-2,4,-3,-5,-4,-6,-8,-7,-18,]),'$end':([0,1,2,5,7,8,9,27,34,38,],[-2,0,-1,-3,-5,-4,-6,-8,-7,-18,]),}
_lr_action = { }
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_action: _lr_action[_x] = { }
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'entity_list':([0,],[2,]),'fields':([17,],[22,]),'opt_visible_order_spec':([10,],[13,]),'masks':([20,],[25,]),'start':([0,],[1,]),'base':([2,],[5,]),'visible_order_spec':([14,],[19,]),'tags':([25,],[32,]),'tagged_union':([2,],[7,]),'block':([2,],[8,]),}
_lr_goto = { }
for _k, _v in _lr_goto_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_goto: _lr_goto[_x] = { }
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S' -> start","S'",1,None,None,None),
('start -> entity_list','start',1,'p_start','bitfield_gen.py',93),
('entity_list -> <empty>','entity_list',0,'p_entity_list_empty','bitfield_gen.py',97),
('entity_list -> entity_list base','entity_list',2,'p_entity_list_base','bitfield_gen.py',101),
('entity_list -> entity_list block','entity_list',2,'p_entity_list_block','bitfield_gen.py',108),
('entity_list -> entity_list tagged_union','entity_list',2,'p_entity_list_union','bitfield_gen.py',114),
('base -> BASE INTLIT','base',2,'p_base_simple','bitfield_gen.py',120),
('base -> BASE INTLIT LPAREN INTLIT COMMA INTLIT RPAREN','base',7,'p_base_mask','bitfield_gen.py',124),
('block -> BLOCK IDENTIFIER opt_visible_order_spec LBRACE fields RBRACE','block',6,'p_block','bitfield_gen.py',128),
('opt_visible_order_spec -> <empty>','opt_visible_order_spec',0,'p_opt_visible_order_spec_empty','bitfield_gen.py',133),
('opt_visible_order_spec -> LPAREN visible_order_spec RPAREN','opt_visible_order_spec',3,'p_opt_visible_order_spec','bitfield_gen.py',137),
('visible_order_spec -> <empty>','visible_order_spec',0,'p_visible_order_spec_empty','bitfield_gen.py',141),
('visible_order_spec -> IDENTIFIER','visible_order_spec',1,'p_visible_order_spec_single','bitfield_gen.py',145),
('visible_order_spec -> visible_order_spec COMMA IDENTIFIER','visible_order_spec',3,'p_visible_order_spec','bitfield_gen.py',149),
('fields -> <empty>','fields',0,'p_fields_empty','bitfield_gen.py',153),
('fields -> fields FIELD IDENTIFIER INTLIT','fields',4,'p_fields_field','bitfield_gen.py',157),
('fields -> fields FIELD_HIGH IDENTIFIER INTLIT','fields',4,'p_fields_field_high','bitfield_gen.py',161),
('fields -> fields PADDING INTLIT','fields',3,'p_fields_padding','bitfield_gen.py',165),
('tagged_union -> TAGGED_UNION IDENTIFIER IDENTIFIER LBRACE masks tags RBRACE','tagged_union',7,'p_tagged_union','bitfield_gen.py',169),
('tags -> <empty>','tags',0,'p_tags_empty','bitfield_gen.py',174),
('tags -> tags TAG IDENTIFIER INTLIT','tags',4,'p_tags','bitfield_gen.py',178),
('masks -> <empty>','masks',0,'p_masks_empty','bitfield_gen.py',182),
('masks -> masks MASK INTLIT INTLIT','masks',4,'p_masks','bitfield_gen.py',186),
]
| _tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = 'ÂÎÆ\x9eÿ§\x1b:ÇO\x919ß=}d'
_lr_action_items = {'TAG': ([20, 25, 32, 44, 45], [-21, -19, 39, -22, -20]), 'LBRACE': ([10, 13, 15, 24], [-9, 17, 20, -10]), 'RPAREN': ([14, 18, 19, 26, 31], [-11, -12, 24, 34, -13]), 'RBRACE': ([17, 20, 22, 25, 32, 35, 41, 42, 44, 45], [-14, -21, 27, -19, 38, -17, -15, -16, -22, -20]), 'FIELD_HIGH': ([17, 22, 35, 41, 42], [-14, 30, -17, -15, -16]), 'MASK': ([20, 25, 44], [-21, 33, -22]), 'PADDING': ([17, 22, 35, 41, 42], [-14, 28, -17, -15, -16]), 'FIELD': ([17, 22, 35, 41, 42], [-14, 29, -17, -15, -16]), 'BASE': ([0, 2, 5, 7, 8, 9, 27, 34, 38], [-2, 3, -3, -5, -4, -6, -8, -7, -18]), 'COMMA': ([14, 16, 18, 19, 31], [-11, 21, -12, 23, -13]), 'LPAREN': ([9, 10], [12, 14]), 'INTLIT': ([3, 12, 21, 28, 33, 36, 37, 40, 43], [9, 16, 26, 35, 40, 41, 42, 44, 45]), 'IDENTIFIER': ([4, 6, 11, 14, 23, 29, 30, 39], [10, 11, 15, 18, 31, 36, 37, 43]), 'TAGGED_UNION': ([0, 2, 5, 7, 8, 9, 27, 34, 38], [-2, 6, -3, -5, -4, -6, -8, -7, -18]), 'BLOCK': ([0, 2, 5, 7, 8, 9, 27, 34, 38], [-2, 4, -3, -5, -4, -6, -8, -7, -18]), '$end': ([0, 1, 2, 5, 7, 8, 9, 27, 34, 38], [-2, 0, -1, -3, -5, -4, -6, -8, -7, -18])}
_lr_action = {}
for (_k, _v) in _lr_action_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_action:
_lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'entity_list': ([0], [2]), 'fields': ([17], [22]), 'opt_visible_order_spec': ([10], [13]), 'masks': ([20], [25]), 'start': ([0], [1]), 'base': ([2], [5]), 'visible_order_spec': ([14], [19]), 'tags': ([25], [32]), 'tagged_union': ([2], [7]), 'block': ([2], [8])}
_lr_goto = {}
for (_k, _v) in _lr_goto_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_goto:
_lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [("S' -> start", "S'", 1, None, None, None), ('start -> entity_list', 'start', 1, 'p_start', 'bitfield_gen.py', 93), ('entity_list -> <empty>', 'entity_list', 0, 'p_entity_list_empty', 'bitfield_gen.py', 97), ('entity_list -> entity_list base', 'entity_list', 2, 'p_entity_list_base', 'bitfield_gen.py', 101), ('entity_list -> entity_list block', 'entity_list', 2, 'p_entity_list_block', 'bitfield_gen.py', 108), ('entity_list -> entity_list tagged_union', 'entity_list', 2, 'p_entity_list_union', 'bitfield_gen.py', 114), ('base -> BASE INTLIT', 'base', 2, 'p_base_simple', 'bitfield_gen.py', 120), ('base -> BASE INTLIT LPAREN INTLIT COMMA INTLIT RPAREN', 'base', 7, 'p_base_mask', 'bitfield_gen.py', 124), ('block -> BLOCK IDENTIFIER opt_visible_order_spec LBRACE fields RBRACE', 'block', 6, 'p_block', 'bitfield_gen.py', 128), ('opt_visible_order_spec -> <empty>', 'opt_visible_order_spec', 0, 'p_opt_visible_order_spec_empty', 'bitfield_gen.py', 133), ('opt_visible_order_spec -> LPAREN visible_order_spec RPAREN', 'opt_visible_order_spec', 3, 'p_opt_visible_order_spec', 'bitfield_gen.py', 137), ('visible_order_spec -> <empty>', 'visible_order_spec', 0, 'p_visible_order_spec_empty', 'bitfield_gen.py', 141), ('visible_order_spec -> IDENTIFIER', 'visible_order_spec', 1, 'p_visible_order_spec_single', 'bitfield_gen.py', 145), ('visible_order_spec -> visible_order_spec COMMA IDENTIFIER', 'visible_order_spec', 3, 'p_visible_order_spec', 'bitfield_gen.py', 149), ('fields -> <empty>', 'fields', 0, 'p_fields_empty', 'bitfield_gen.py', 153), ('fields -> fields FIELD IDENTIFIER INTLIT', 'fields', 4, 'p_fields_field', 'bitfield_gen.py', 157), ('fields -> fields FIELD_HIGH IDENTIFIER INTLIT', 'fields', 4, 'p_fields_field_high', 'bitfield_gen.py', 161), ('fields -> fields PADDING INTLIT', 'fields', 3, 'p_fields_padding', 'bitfield_gen.py', 165), ('tagged_union -> TAGGED_UNION IDENTIFIER IDENTIFIER LBRACE masks tags RBRACE', 'tagged_union', 7, 'p_tagged_union', 'bitfield_gen.py', 169), ('tags -> <empty>', 'tags', 0, 'p_tags_empty', 'bitfield_gen.py', 174), ('tags -> tags TAG IDENTIFIER INTLIT', 'tags', 4, 'p_tags', 'bitfield_gen.py', 178), ('masks -> <empty>', 'masks', 0, 'p_masks_empty', 'bitfield_gen.py', 182), ('masks -> masks MASK INTLIT INTLIT', 'masks', 4, 'p_masks', 'bitfield_gen.py', 186)] |
class Solution:
def romanToInt(self, s: str) -> int:
symbol_map = {
"I": (0, 1),
"V": (1, 5),
"X": (2, 10),
"L": (3, 50),
"C": (4, 100),
"D": (5, 500),
"M": (6, 1000)
}
position = 0
value = 0
for symbol in reversed(s):
if symbol_map[symbol][0] < position:
value -= symbol_map[symbol][1]
else:
value += symbol_map[symbol][1]
position = symbol_map[symbol][0]
return value
print(Solution().romanToInt("III")) # 3
print(Solution().romanToInt("LVIII")) # 58
print(Solution().romanToInt("MCMXCIV")) # 1994
| class Solution:
def roman_to_int(self, s: str) -> int:
symbol_map = {'I': (0, 1), 'V': (1, 5), 'X': (2, 10), 'L': (3, 50), 'C': (4, 100), 'D': (5, 500), 'M': (6, 1000)}
position = 0
value = 0
for symbol in reversed(s):
if symbol_map[symbol][0] < position:
value -= symbol_map[symbol][1]
else:
value += symbol_map[symbol][1]
position = symbol_map[symbol][0]
return value
print(solution().romanToInt('III'))
print(solution().romanToInt('LVIII'))
print(solution().romanToInt('MCMXCIV')) |
#!/bin/python
#This script is made to remove ID's from a file that contains every ID of every contig.
def file_opener(of_file):
with open(of_file, 'r') as f:
return f.readlines()
def filter(all, matched):
filterd = []
for a in matched:
if a not in matched:
filterd.append(a)
return filterd
def file_writer(data, of_file):
content = ""
for line in data:
content += line + "\n"
file = open(of_file, "w")
file.write(content)
file.close()
def main():
all_ids = file_opener('/home/richard.wissels/Foram-assembly/data/contig_ids.txt')
matched_ids = file_opener('/home/richard.wissels/Foram-assembly/results/uniq_1e-43_contig_matches.txt')
filterd_ids = filter(all_ids, matched_ids)
file_writer(filterd_ids, '/home/richard.wissels/Foram-assembly/results/non_matched_contig_ids.txt')
main()
| def file_opener(of_file):
with open(of_file, 'r') as f:
return f.readlines()
def filter(all, matched):
filterd = []
for a in matched:
if a not in matched:
filterd.append(a)
return filterd
def file_writer(data, of_file):
content = ''
for line in data:
content += line + '\n'
file = open(of_file, 'w')
file.write(content)
file.close()
def main():
all_ids = file_opener('/home/richard.wissels/Foram-assembly/data/contig_ids.txt')
matched_ids = file_opener('/home/richard.wissels/Foram-assembly/results/uniq_1e-43_contig_matches.txt')
filterd_ids = filter(all_ids, matched_ids)
file_writer(filterd_ids, '/home/richard.wissels/Foram-assembly/results/non_matched_contig_ids.txt')
main() |
# This is to write an escape function to escape text at the MarkdownV2 style.
#
# **NOTE**
# The [1]'s content provides some notes on how strings should be escaped,
# but let the user deal with it himself; there are such things as "the string
# ___italic underline___ should be changed to ___italic underline_\r__,
# where \r is a character with code 13", but this program's aim is not being a
# perfect text parser/a perfect escaper of symbols at text.
#
# References:
# -----------
#
# [1]: https://core.telegram.org/bots/api#markdownv2-style
#
# Bot API version: 5.3
# import re
_special_symbols = {
'_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{',
'}', '.', '!'
}
def escape(string: str) -> str:
for symbol in _special_symbols:
# Escape each special symbol
string = string.replace(symbol, '\\' + symbol)
# Mind that such sequences, being replaced, do not intersect.
# Replacement order is not important.
return string
| _special_symbols = {'_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!'}
def escape(string: str) -> str:
for symbol in _special_symbols:
string = string.replace(symbol, '\\' + symbol)
return string |
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:
def node2num(node):
val = 0
while node:
val = val * 10 + node.val
node = node.next
return val
if l1 == None:
return l2
if l2 == None:
return l1
res = node2num(l1) + node2num(l2)
dummyNode = ListNode(0)
startNode = dummyNode
for i in str(res):
startNode.next = ListNode(int(i))
startNode = startNode.next
return dummyNode.next
| class Listnode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def add_two_numbers(self, l1: ListNode, l2: ListNode) -> ListNode:
def node2num(node):
val = 0
while node:
val = val * 10 + node.val
node = node.next
return val
if l1 == None:
return l2
if l2 == None:
return l1
res = node2num(l1) + node2num(l2)
dummy_node = list_node(0)
start_node = dummyNode
for i in str(res):
startNode.next = list_node(int(i))
start_node = startNode.next
return dummyNode.next |
#generator2.py
class Week:
def __init__(self):
self.days = {1:'Monday', 2: "Tuesday",
3:"Wednesday", 4: "Thursday",
5:"Friday", 6:"Saturday", 7:"Sunday"}
def week_gen(self):
for x in self.days:
yield self.days[x]
if(__name__ == "__main__"):
wk = Week()
iter1 = wk.week_gen()
iter2 = iter(wk.week_gen())
print(iter1.__next__())
print(iter2.__next__())
print(next(iter1))
print(next(iter2)) | class Week:
def __init__(self):
self.days = {1: 'Monday', 2: 'Tuesday', 3: 'Wednesday', 4: 'Thursday', 5: 'Friday', 6: 'Saturday', 7: 'Sunday'}
def week_gen(self):
for x in self.days:
yield self.days[x]
if __name__ == '__main__':
wk = week()
iter1 = wk.week_gen()
iter2 = iter(wk.week_gen())
print(iter1.__next__())
print(iter2.__next__())
print(next(iter1))
print(next(iter2)) |
s1 = '854'
print(s1.isnumeric()) # -- ISN1
s2 = '\u00B2368'
print(s2.isnumeric()) # -- ISN2
s3 = '\u00BC'
print(s3.isnumeric()) # -- ISN3
s4='python895'
print(s4.isnumeric()) # -- ISN4
s5='100m2'
print(s5.isnumeric()) # -- ISN5
| s1 = '854'
print(s1.isnumeric())
s2 = '²368'
print(s2.isnumeric())
s3 = '¼'
print(s3.isnumeric())
s4 = 'python895'
print(s4.isnumeric())
s5 = '100m2'
print(s5.isnumeric()) |
# class LLNode:
# def __init__(self, val, next=None):
# self.val = val
# self.next = next
class Solution:
def solve(self, node, k):
# Write your code here
n = 0
curr = node
while curr:
curr = curr.next
n += 1
if k%n==0:
return node
if k>n:
k = k%n
curr = node
k1 = n-k-1
while k1!=0:
curr = curr.next
k1 -= 1
replace = curr
head = curr.next
while curr.next:
curr = curr.next
curr.next = node
replace.next = None
return head
| class Solution:
def solve(self, node, k):
n = 0
curr = node
while curr:
curr = curr.next
n += 1
if k % n == 0:
return node
if k > n:
k = k % n
curr = node
k1 = n - k - 1
while k1 != 0:
curr = curr.next
k1 -= 1
replace = curr
head = curr.next
while curr.next:
curr = curr.next
curr.next = node
replace.next = None
return head |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def nextLargerNodes(self, head: ListNode) -> List[int]:
if not head:
return [0]
node = head
# this stack will contain the elements that we don't know its next greater node
# alongside its index, to insert in correct place
stack = [(0, node.val)]
node = node.next
# starts the array with one element and increase it as we start iterating over the nodes
result = [0]
i = 1
while node: # iterate over the linked list
# do this until we find an element that is not greater that current node
# or stack is empry
while stack and node.val > stack[-1][-1]:
pos, val = stack.pop() # get index and value of top of stack
result[pos] = node.val # update the greater element it the given index
stack.append((i, node.val))
node = node.next
i += 1
result.append(0) # increase by 1 each new visited node
# any element in the stack does not have a greater element
while stack:
pos, val = stack.pop()
result[pos] = 0
return result | class Solution:
def next_larger_nodes(self, head: ListNode) -> List[int]:
if not head:
return [0]
node = head
stack = [(0, node.val)]
node = node.next
result = [0]
i = 1
while node:
while stack and node.val > stack[-1][-1]:
(pos, val) = stack.pop()
result[pos] = node.val
stack.append((i, node.val))
node = node.next
i += 1
result.append(0)
while stack:
(pos, val) = stack.pop()
result[pos] = 0
return result |
class Config():
API_KEY = '9b680a8b-22d4-4069-b0e6-f6cc97cd9d71'
API_URL = 'https://api.demo.11b.io'
API_ACCOUNT = 'A00-000-030'
config = Config() | class Config:
api_key = '9b680a8b-22d4-4069-b0e6-f6cc97cd9d71'
api_url = 'https://api.demo.11b.io'
api_account = 'A00-000-030'
config = config() |
'''
One cool aspect of using an outer join is that, because it returns all rows from both merged tables and null where they do not match, you can use it to find rows that do not have a match in the other table. To try for yourself, you have been given two tables with a list of actors from two popular movies: Iron Man 1 and Iron Man 2. Most of the actors played in both movies. Use an outer join to find actors who did not act in both movies.
The Iron Man 1 table is called iron_1_actors, and Iron Man 2 table is called iron_2_actors. Both tables have been loaded for you and a few rows printed so you can see the structure.
'''
# Merge iron_1_actors to iron_2_actors on id with outer join using suffixes
iron_1_and_2 = iron_1_actors.merge(iron_2_actors,
on='id',
how='outer',
suffixes=('_1', '_2'))
# Create an index that returns true if name_1 or name_2 are null
m = ((iron_1_and_2['name_1'].isnull()) |
(iron_1_and_2['name_2'].isnull()))
# Print the first few rows of iron_1_and_2
print(iron_1_and_2[m].head()) | """
One cool aspect of using an outer join is that, because it returns all rows from both merged tables and null where they do not match, you can use it to find rows that do not have a match in the other table. To try for yourself, you have been given two tables with a list of actors from two popular movies: Iron Man 1 and Iron Man 2. Most of the actors played in both movies. Use an outer join to find actors who did not act in both movies.
The Iron Man 1 table is called iron_1_actors, and Iron Man 2 table is called iron_2_actors. Both tables have been loaded for you and a few rows printed so you can see the structure.
"""
iron_1_and_2 = iron_1_actors.merge(iron_2_actors, on='id', how='outer', suffixes=('_1', '_2'))
m = iron_1_and_2['name_1'].isnull() | iron_1_and_2['name_2'].isnull()
print(iron_1_and_2[m].head()) |
#
# PySNMP MIB module CISCO-ANNOUNCEMENT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ANNOUNCEMENT-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:50:09 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion")
cmgwIndex, = mibBuilder.importSymbols("CISCO-MEDIA-GATEWAY-MIB", "cmgwIndex")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
Counter64, Bits, iso, Counter32, Gauge32, Integer32, Unsigned32, ObjectIdentity, ModuleIdentity, MibIdentifier, NotificationType, TimeTicks, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Bits", "iso", "Counter32", "Gauge32", "Integer32", "Unsigned32", "ObjectIdentity", "ModuleIdentity", "MibIdentifier", "NotificationType", "TimeTicks", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
RowStatus, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "TextualConvention", "DisplayString")
ciscoAnnouncementMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 8888))
ciscoAnnouncementMIB.setRevisions(('2003-03-25 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoAnnouncementMIB.setRevisionsDescriptions(('Initial version of the MIB.',))
if mibBuilder.loadTexts: ciscoAnnouncementMIB.setLastUpdated('200303250000Z')
if mibBuilder.loadTexts: ciscoAnnouncementMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: ciscoAnnouncementMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-voice-gateway@cisco.com')
if mibBuilder.loadTexts: ciscoAnnouncementMIB.setDescription('This MIB defines the objects for announcement system supported on media gateway. With announcement system setup, media gateway will have the capability to play pre-recorded audio files. The audio files can be played in either direction over existing connections (calls) or towards the Time Division Multiplexed (TDM) network on a TDM endpoint that is terminated on the media gateway. ')
ciscoAnnouncementMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 0))
ciscoAnnouncementMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1))
ciscoAnnouncementMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2))
cannoGeneric = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1))
cannoControlConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1))
cannoAudioFileConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2))
cannoControlTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1), )
if mibBuilder.loadTexts: cannoControlTable.setStatus('current')
if mibBuilder.loadTexts: cannoControlTable.setDescription('The MIB objects in this table are used to control the announcement system of media gateway. ')
cannoControlEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1), ).setIndexNames((0, "CISCO-MEDIA-GATEWAY-MIB", "cmgwIndex"))
if mibBuilder.loadTexts: cannoControlEntry.setStatus('current')
if mibBuilder.loadTexts: cannoControlEntry.setDescription('An entry in this table contains the control parameters of the announcement system on media gateway. ')
cannoAudioFileServerName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cannoAudioFileServerName.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileServerName.setDescription('This object specifies the domain name of an announcement file server that resides in an IP network and is reachable from the media gateway. The default value of this object is NULL string(size is 0). Before using any object in this table, this object should be configured to non NULL. ')
cannoDnResolution = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("internalOnly", 1), ("externalOnly", 2))).clone('internalOnly')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cannoDnResolution.setStatus('current')
if mibBuilder.loadTexts: cannoDnResolution.setDescription('This object specifies the domain name resolution for the domain name of the Announcement File server which is specified by the cannoAudioFileServerName object. If this object is set to internalOnly(1), the IP address associated with the file server (cannoAudioFileServerName) will be determined by the cannoIpAddress object. ')
cannoIpAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 3), InetAddressType().clone('ipv4')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cannoIpAddressType.setStatus('current')
if mibBuilder.loadTexts: cannoIpAddressType.setDescription('This object specifies the IP address type of cannoIpAddress. This object is not applicable when cannoDnResolution is set to externalOnly(2). ')
cannoIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 4), InetAddress().clone(hexValue="00000000")).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cannoIpAddress.setStatus('current')
if mibBuilder.loadTexts: cannoIpAddress.setDescription('This object specifies the IP address associated with the cannoAudioFileServerName. This object is not applicable when cannoDnResolution is set to externalOnly(2). ')
cannoAgeTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(10080)).setUnits('minutes').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cannoAgeTime.setStatus('current')
if mibBuilder.loadTexts: cannoAgeTime.setDescription("This object specifies the maximum life-span(in minutes) of the dynamic announcement files in the cache. A dynamic announcement file starts aging as soon as it is brought into the cache from the file server. When a dynamic file age crosses the 'cannoAgeTime' threshold, the file will be removed from the cache. The value zero time specifies that 'cannoAgeTime' is disabled. ")
cannoSubDirPath = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 6), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cannoSubDirPath.setStatus('current')
if mibBuilder.loadTexts: cannoSubDirPath.setDescription('This object specifies the directory path under the default TFTP directory in the Announcement File server for announcement files. The individual characters in cannoSubDirPath may be alphanumeric characters, forward slashes, backward slashes, periods, dashes, and underscores, but no embedded spaces. The last character of cannoSubDirPath must not be a dash. ')
cannoReqTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 50)).clone(5)).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cannoReqTimeout.setStatus('current')
if mibBuilder.loadTexts: cannoReqTimeout.setDescription("This object specifies the time for a play announcement request to be serviced. The cannoReqTimeout is the time within which an announcement must start playing after receiving announcement request. If the announcement system cannot start playing the announcement within cannoReqTimeout seconds since the request was received, the play request will be aborted. The value zero time specifies that 'cannoReqTimeout' is disabled. ")
cannoMaxPermanent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 500)).clone(41)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cannoMaxPermanent.setStatus('current')
if mibBuilder.loadTexts: cannoMaxPermanent.setDescription('This object specifies the maximum number of permanent announcement files that can be added to the media gateway. The space on media gateway cache is reserved for the cannoMaxPermanent number of permanent announcement files and the permanent announcement files should be stored on media gateway cache forever until to be deleted. The value zero specifies that media gateway only support dynamic announcement file. ')
cannoAudioFileTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1), )
if mibBuilder.loadTexts: cannoAudioFileTable.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileTable.setDescription('The MIB objects in this table contain information to manage audio announcement files. ')
cannoAudioFileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1), ).setIndexNames((0, "CISCO-MEDIA-GATEWAY-MIB", "cmgwIndex"), (0, "CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileNumber"))
if mibBuilder.loadTexts: cannoAudioFileEntry.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileEntry.setDescription('Each entry in the cannoAudioFileTable consists of management information for a specific announcement file, which include file descriptor, name, type, age, duration, number of cycles, status. ')
cannoAudioFileNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 9999)))
if mibBuilder.loadTexts: cannoAudioFileNumber.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileNumber.setDescription('A unique index to identify announcement file to be used in media gateway. ')
cannoAudioFileDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cannoAudioFileDescr.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileDescr.setDescription('A textual string containing information about the audio file. User can store any information to this object such as which customer using this audio file, usage of the audio file, etc.. ')
cannoAudioFileName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 3), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cannoAudioFileName.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileName.setDescription('This object specifies the name of a valid announcement file which has been stored in cannoAudioFileTable. This file name may include path or subdirectory information. The individual characters in this name may be alphanumeric characters, forward slashes, backward slashes, periods, dashes, and underscores, but no embedded spaces. The last character of the name must not be a dash or a forward slash. ')
cannoAudioFileStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("cached", 1), ("loading", 2), ("invalidFile", 3), ("loadFailed", 4), ("notCached", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cannoAudioFileStatus.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileStatus.setDescription("This object indicates the status of the the audio file: cached (1): the file successfully downloaded to media gateway cache cache is the memory on media gateway which is used to store announcement files. loading (2): the file in process of downloading invalidFile(3): the file on Announcement File server is too large or corrupted loadFailed (4): timeout when trying to download the file notCached (5): the file is not in cache Note: The cache is the memory on media gateway which is used to store announcement files. Some of space on the cache is reserved for the permanent announcement files (refer to 'cannoMaxPermanent'), the rest of cache is for the dynamic announcement files. The 'notCached' is applicable only for the dynamic announcement files in the following cases: 1. The dynamic file age reaches to 'cannoAgeTime', the status of the file will be changed from 'cached' to 'notCached'. 2. If the cache is full for the dynamic files, and if user try to add a new dynamic file, the one of the dynamic files on cache will be removed by LRU algorithm. The status of that file will be changed from 'cached' to 'notCached'. 3. If there is no space for the dynamic files (whole cache is reserved for the permanent file), the status of the dynamic files is set to 'notCached'. ")
cannoAudioFileOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("inPlaying", 1), ("notPlaying", 2), ("delPending", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cannoAudioFileOperStatus.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileOperStatus.setDescription('This object indicates the current operational status of the entry: inPlaying (1): the file is in playing notPlaying (2): the file is not in playing delPending (3): deletion is pending because the file is in playing ')
cannoAudioFilePlayNoc = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647)).clone(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cannoAudioFilePlayNoc.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFilePlayNoc.setDescription("This object specifies number of cycles the announcement file is played. This object is used only when the Play Announcement signal from the MGC does not include a 'cannoAudioFilePlayNoc' parameter. The value zero is used to represent an announcement that continuously plays or loops. ")
cannoAudioFileDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setUnits('10 milliseconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: cannoAudioFileDuration.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileDuration.setDescription("This object indicates the duration to play the announcement for one cycle, it is applicable only for the fixed announcement play. This object is used only when the Play Announcement signal from the MGC does not include a 'cannoAudioFileDuration' parameter. For the fixed announcement play, the 'cannoAudioFilePlayNoc' and the 'cannoAudioFileDuration' are used together to determine how long the announcement is to be played. The value zero indicates that this is a variable announcement play and only the 'cannoAudioFilePlayNoc' is used to determine the play time. ")
cannoAudioFileType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("dynamic", 1), ("permanent", 2))).clone('dynamic')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cannoAudioFileType.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileType.setDescription('This object specifies announcement file type. dynamic(1) : Dynamic file can be removed from cache if file age(cannoAudioFileAge) reaches cannoAgeTime or according to LRU algorithm when cache is full permanent(2): Permanent file should be stored on cache forever except to be deleted. The max number of permanent file can be stored on cache is determined by cannoMaxPermanent. ')
cannoAudioFileAge = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 9), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setUnits('minutes').setMaxAccess("readonly")
if mibBuilder.loadTexts: cannoAudioFileAge.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileAge.setDescription("This object indicates that announcement file age in cache, it is only for dynamic file. A dynamic announcement file starts aging as soon as it is brought into the cache from the Announcement File server. When the 'cannoAudioFileAge' reach to 'cannoAgeTime', then the file will be removed from cache. This object is not applicable for two cases: (1)For the permanent files, because the the permanent files should be stored on cache forever except to be deleted. (2)The 'cannoAgeTime' is set to zero which means the cannoAgeTime is infinite and 'cannoAudioFileAge' can never reach the cannoAgeTime. ")
cannoAudioFileAdminDeletion = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("gracefully", 1), ("forcefully", 2))).clone('gracefully')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cannoAudioFileAdminDeletion.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileAdminDeletion.setDescription('This object specifies entry deletion behavior: gracefully(1): gateway will not stop the current announcement file playing (till it completes) while deleting this entry. forcefully(2): gateway will immediately stop current announcement file playing while deleting this entry ')
cannoAudioFileRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 11), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cannoAudioFileRowStatus.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileRowStatus.setDescription("This object is used to create or delete an entry. The mandatory objects for creating an entry in this table: 'cannoAudioFileName' The following objects are not allowed to be modified after the entry to be added: 'cannoAudioFileName' 'cannoAudioFileType' ")
cannoMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2, 1))
cannoMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2, 2))
cannoMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2, 1, 1)).setObjects(("CISCO-ANNOUNCEMENT-MIB", "cannoControlGroup"), ("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cannoMIBCompliance = cannoMIBCompliance.setStatus('current')
if mibBuilder.loadTexts: cannoMIBCompliance.setDescription(' The compliance statement for Announcement File')
cannoControlGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2, 2, 1)).setObjects(("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileServerName"), ("CISCO-ANNOUNCEMENT-MIB", "cannoDnResolution"), ("CISCO-ANNOUNCEMENT-MIB", "cannoIpAddressType"), ("CISCO-ANNOUNCEMENT-MIB", "cannoIpAddress"), ("CISCO-ANNOUNCEMENT-MIB", "cannoAgeTime"), ("CISCO-ANNOUNCEMENT-MIB", "cannoSubDirPath"), ("CISCO-ANNOUNCEMENT-MIB", "cannoReqTimeout"), ("CISCO-ANNOUNCEMENT-MIB", "cannoMaxPermanent"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cannoControlGroup = cannoControlGroup.setStatus('current')
if mibBuilder.loadTexts: cannoControlGroup.setDescription('This group contains objects related to announcement system control on media gateway. ')
cannoAudioFileGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2, 2, 2)).setObjects(("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileDescr"), ("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileName"), ("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileStatus"), ("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileOperStatus"), ("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFilePlayNoc"), ("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileDuration"), ("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileType"), ("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileAge"), ("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileAdminDeletion"), ("CISCO-ANNOUNCEMENT-MIB", "cannoAudioFileRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cannoAudioFileGroup = cannoAudioFileGroup.setStatus('current')
if mibBuilder.loadTexts: cannoAudioFileGroup.setDescription('This group contains objects related to announcement files on media gateway. ')
mibBuilder.exportSymbols("CISCO-ANNOUNCEMENT-MIB", cannoAudioFileDescr=cannoAudioFileDescr, ciscoAnnouncementMIBConformance=ciscoAnnouncementMIBConformance, cannoMaxPermanent=cannoMaxPermanent, ciscoAnnouncementMIB=ciscoAnnouncementMIB, cannoControlTable=cannoControlTable, cannoAudioFilePlayNoc=cannoAudioFilePlayNoc, cannoIpAddressType=cannoIpAddressType, cannoAudioFileName=cannoAudioFileName, cannoAgeTime=cannoAgeTime, cannoAudioFileOperStatus=cannoAudioFileOperStatus, cannoAudioFileGroup=cannoAudioFileGroup, cannoMIBCompliance=cannoMIBCompliance, cannoDnResolution=cannoDnResolution, PYSNMP_MODULE_ID=ciscoAnnouncementMIB, cannoAudioFileStatus=cannoAudioFileStatus, cannoAudioFileConfig=cannoAudioFileConfig, cannoAudioFileAge=cannoAudioFileAge, cannoControlEntry=cannoControlEntry, cannoAudioFileNumber=cannoAudioFileNumber, cannoGeneric=cannoGeneric, cannoSubDirPath=cannoSubDirPath, cannoControlGroup=cannoControlGroup, cannoAudioFileTable=cannoAudioFileTable, cannoMIBCompliances=cannoMIBCompliances, cannoControlConfig=cannoControlConfig, cannoIpAddress=cannoIpAddress, cannoAudioFileAdminDeletion=cannoAudioFileAdminDeletion, cannoAudioFileEntry=cannoAudioFileEntry, cannoAudioFileType=cannoAudioFileType, ciscoAnnouncementMIBObjects=ciscoAnnouncementMIBObjects, cannoMIBGroups=cannoMIBGroups, cannoAudioFileServerName=cannoAudioFileServerName, cannoAudioFileRowStatus=cannoAudioFileRowStatus, cannoAudioFileDuration=cannoAudioFileDuration, cannoReqTimeout=cannoReqTimeout, ciscoAnnouncementMIBNotifs=ciscoAnnouncementMIBNotifs)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_size_constraint, value_range_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion')
(cmgw_index,) = mibBuilder.importSymbols('CISCO-MEDIA-GATEWAY-MIB', 'cmgwIndex')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(inet_address, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddress', 'InetAddressType')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(counter64, bits, iso, counter32, gauge32, integer32, unsigned32, object_identity, module_identity, mib_identifier, notification_type, time_ticks, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'Bits', 'iso', 'Counter32', 'Gauge32', 'Integer32', 'Unsigned32', 'ObjectIdentity', 'ModuleIdentity', 'MibIdentifier', 'NotificationType', 'TimeTicks', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(row_status, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'TextualConvention', 'DisplayString')
cisco_announcement_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 8888))
ciscoAnnouncementMIB.setRevisions(('2003-03-25 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
ciscoAnnouncementMIB.setRevisionsDescriptions(('Initial version of the MIB.',))
if mibBuilder.loadTexts:
ciscoAnnouncementMIB.setLastUpdated('200303250000Z')
if mibBuilder.loadTexts:
ciscoAnnouncementMIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts:
ciscoAnnouncementMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-voice-gateway@cisco.com')
if mibBuilder.loadTexts:
ciscoAnnouncementMIB.setDescription('This MIB defines the objects for announcement system supported on media gateway. With announcement system setup, media gateway will have the capability to play pre-recorded audio files. The audio files can be played in either direction over existing connections (calls) or towards the Time Division Multiplexed (TDM) network on a TDM endpoint that is terminated on the media gateway. ')
cisco_announcement_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 0))
cisco_announcement_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1))
cisco_announcement_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2))
canno_generic = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1))
canno_control_config = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1))
canno_audio_file_config = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2))
canno_control_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1))
if mibBuilder.loadTexts:
cannoControlTable.setStatus('current')
if mibBuilder.loadTexts:
cannoControlTable.setDescription('The MIB objects in this table are used to control the announcement system of media gateway. ')
canno_control_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1)).setIndexNames((0, 'CISCO-MEDIA-GATEWAY-MIB', 'cmgwIndex'))
if mibBuilder.loadTexts:
cannoControlEntry.setStatus('current')
if mibBuilder.loadTexts:
cannoControlEntry.setDescription('An entry in this table contains the control parameters of the announcement system on media gateway. ')
canno_audio_file_server_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 1), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cannoAudioFileServerName.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileServerName.setDescription('This object specifies the domain name of an announcement file server that resides in an IP network and is reachable from the media gateway. The default value of this object is NULL string(size is 0). Before using any object in this table, this object should be configured to non NULL. ')
canno_dn_resolution = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('internalOnly', 1), ('externalOnly', 2))).clone('internalOnly')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cannoDnResolution.setStatus('current')
if mibBuilder.loadTexts:
cannoDnResolution.setDescription('This object specifies the domain name resolution for the domain name of the Announcement File server which is specified by the cannoAudioFileServerName object. If this object is set to internalOnly(1), the IP address associated with the file server (cannoAudioFileServerName) will be determined by the cannoIpAddress object. ')
canno_ip_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 3), inet_address_type().clone('ipv4')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cannoIpAddressType.setStatus('current')
if mibBuilder.loadTexts:
cannoIpAddressType.setDescription('This object specifies the IP address type of cannoIpAddress. This object is not applicable when cannoDnResolution is set to externalOnly(2). ')
canno_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 4), inet_address().clone(hexValue='00000000')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cannoIpAddress.setStatus('current')
if mibBuilder.loadTexts:
cannoIpAddress.setDescription('This object specifies the IP address associated with the cannoAudioFileServerName. This object is not applicable when cannoDnResolution is set to externalOnly(2). ')
canno_age_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(10080)).setUnits('minutes').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cannoAgeTime.setStatus('current')
if mibBuilder.loadTexts:
cannoAgeTime.setDescription("This object specifies the maximum life-span(in minutes) of the dynamic announcement files in the cache. A dynamic announcement file starts aging as soon as it is brought into the cache from the file server. When a dynamic file age crosses the 'cannoAgeTime' threshold, the file will be removed from the cache. The value zero time specifies that 'cannoAgeTime' is disabled. ")
canno_sub_dir_path = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 6), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cannoSubDirPath.setStatus('current')
if mibBuilder.loadTexts:
cannoSubDirPath.setDescription('This object specifies the directory path under the default TFTP directory in the Announcement File server for announcement files. The individual characters in cannoSubDirPath may be alphanumeric characters, forward slashes, backward slashes, periods, dashes, and underscores, but no embedded spaces. The last character of cannoSubDirPath must not be a dash. ')
canno_req_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 50)).clone(5)).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cannoReqTimeout.setStatus('current')
if mibBuilder.loadTexts:
cannoReqTimeout.setDescription("This object specifies the time for a play announcement request to be serviced. The cannoReqTimeout is the time within which an announcement must start playing after receiving announcement request. If the announcement system cannot start playing the announcement within cannoReqTimeout seconds since the request was received, the play request will be aborted. The value zero time specifies that 'cannoReqTimeout' is disabled. ")
canno_max_permanent = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 1, 1, 1, 8), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 500)).clone(41)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cannoMaxPermanent.setStatus('current')
if mibBuilder.loadTexts:
cannoMaxPermanent.setDescription('This object specifies the maximum number of permanent announcement files that can be added to the media gateway. The space on media gateway cache is reserved for the cannoMaxPermanent number of permanent announcement files and the permanent announcement files should be stored on media gateway cache forever until to be deleted. The value zero specifies that media gateway only support dynamic announcement file. ')
canno_audio_file_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1))
if mibBuilder.loadTexts:
cannoAudioFileTable.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileTable.setDescription('The MIB objects in this table contain information to manage audio announcement files. ')
canno_audio_file_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1)).setIndexNames((0, 'CISCO-MEDIA-GATEWAY-MIB', 'cmgwIndex'), (0, 'CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileNumber'))
if mibBuilder.loadTexts:
cannoAudioFileEntry.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileEntry.setDescription('Each entry in the cannoAudioFileTable consists of management information for a specific announcement file, which include file descriptor, name, type, age, duration, number of cycles, status. ')
canno_audio_file_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 9999)))
if mibBuilder.loadTexts:
cannoAudioFileNumber.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileNumber.setDescription('A unique index to identify announcement file to be used in media gateway. ')
canno_audio_file_descr = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 2), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cannoAudioFileDescr.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileDescr.setDescription('A textual string containing information about the audio file. User can store any information to this object such as which customer using this audio file, usage of the audio file, etc.. ')
canno_audio_file_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 3), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cannoAudioFileName.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileName.setDescription('This object specifies the name of a valid announcement file which has been stored in cannoAudioFileTable. This file name may include path or subdirectory information. The individual characters in this name may be alphanumeric characters, forward slashes, backward slashes, periods, dashes, and underscores, but no embedded spaces. The last character of the name must not be a dash or a forward slash. ')
canno_audio_file_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('cached', 1), ('loading', 2), ('invalidFile', 3), ('loadFailed', 4), ('notCached', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cannoAudioFileStatus.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileStatus.setDescription("This object indicates the status of the the audio file: cached (1): the file successfully downloaded to media gateway cache cache is the memory on media gateway which is used to store announcement files. loading (2): the file in process of downloading invalidFile(3): the file on Announcement File server is too large or corrupted loadFailed (4): timeout when trying to download the file notCached (5): the file is not in cache Note: The cache is the memory on media gateway which is used to store announcement files. Some of space on the cache is reserved for the permanent announcement files (refer to 'cannoMaxPermanent'), the rest of cache is for the dynamic announcement files. The 'notCached' is applicable only for the dynamic announcement files in the following cases: 1. The dynamic file age reaches to 'cannoAgeTime', the status of the file will be changed from 'cached' to 'notCached'. 2. If the cache is full for the dynamic files, and if user try to add a new dynamic file, the one of the dynamic files on cache will be removed by LRU algorithm. The status of that file will be changed from 'cached' to 'notCached'. 3. If there is no space for the dynamic files (whole cache is reserved for the permanent file), the status of the dynamic files is set to 'notCached'. ")
canno_audio_file_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('inPlaying', 1), ('notPlaying', 2), ('delPending', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cannoAudioFileOperStatus.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileOperStatus.setDescription('This object indicates the current operational status of the entry: inPlaying (1): the file is in playing notPlaying (2): the file is not in playing delPending (3): deletion is pending because the file is in playing ')
canno_audio_file_play_noc = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 2147483647)).clone(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cannoAudioFilePlayNoc.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFilePlayNoc.setDescription("This object specifies number of cycles the announcement file is played. This object is used only when the Play Announcement signal from the MGC does not include a 'cannoAudioFilePlayNoc' parameter. The value zero is used to represent an announcement that continuously plays or loops. ")
canno_audio_file_duration = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 4294967295))).setUnits('10 milliseconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cannoAudioFileDuration.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileDuration.setDescription("This object indicates the duration to play the announcement for one cycle, it is applicable only for the fixed announcement play. This object is used only when the Play Announcement signal from the MGC does not include a 'cannoAudioFileDuration' parameter. For the fixed announcement play, the 'cannoAudioFilePlayNoc' and the 'cannoAudioFileDuration' are used together to determine how long the announcement is to be played. The value zero indicates that this is a variable announcement play and only the 'cannoAudioFilePlayNoc' is used to determine the play time. ")
canno_audio_file_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('dynamic', 1), ('permanent', 2))).clone('dynamic')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cannoAudioFileType.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileType.setDescription('This object specifies announcement file type. dynamic(1) : Dynamic file can be removed from cache if file age(cannoAudioFileAge) reaches cannoAgeTime or according to LRU algorithm when cache is full permanent(2): Permanent file should be stored on cache forever except to be deleted. The max number of permanent file can be stored on cache is determined by cannoMaxPermanent. ')
canno_audio_file_age = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 9), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setUnits('minutes').setMaxAccess('readonly')
if mibBuilder.loadTexts:
cannoAudioFileAge.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileAge.setDescription("This object indicates that announcement file age in cache, it is only for dynamic file. A dynamic announcement file starts aging as soon as it is brought into the cache from the Announcement File server. When the 'cannoAudioFileAge' reach to 'cannoAgeTime', then the file will be removed from cache. This object is not applicable for two cases: (1)For the permanent files, because the the permanent files should be stored on cache forever except to be deleted. (2)The 'cannoAgeTime' is set to zero which means the cannoAgeTime is infinite and 'cannoAudioFileAge' can never reach the cannoAgeTime. ")
canno_audio_file_admin_deletion = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('gracefully', 1), ('forcefully', 2))).clone('gracefully')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cannoAudioFileAdminDeletion.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileAdminDeletion.setDescription('This object specifies entry deletion behavior: gracefully(1): gateway will not stop the current announcement file playing (till it completes) while deleting this entry. forcefully(2): gateway will immediately stop current announcement file playing while deleting this entry ')
canno_audio_file_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 8888, 1, 1, 2, 1, 1, 11), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cannoAudioFileRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileRowStatus.setDescription("This object is used to create or delete an entry. The mandatory objects for creating an entry in this table: 'cannoAudioFileName' The following objects are not allowed to be modified after the entry to be added: 'cannoAudioFileName' 'cannoAudioFileType' ")
canno_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2, 1))
canno_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2, 2))
canno_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2, 1, 1)).setObjects(('CISCO-ANNOUNCEMENT-MIB', 'cannoControlGroup'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
canno_mib_compliance = cannoMIBCompliance.setStatus('current')
if mibBuilder.loadTexts:
cannoMIBCompliance.setDescription(' The compliance statement for Announcement File')
canno_control_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2, 2, 1)).setObjects(('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileServerName'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoDnResolution'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoIpAddressType'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoIpAddress'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoAgeTime'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoSubDirPath'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoReqTimeout'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoMaxPermanent'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
canno_control_group = cannoControlGroup.setStatus('current')
if mibBuilder.loadTexts:
cannoControlGroup.setDescription('This group contains objects related to announcement system control on media gateway. ')
canno_audio_file_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 8888, 2, 2, 2)).setObjects(('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileDescr'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileName'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileStatus'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileOperStatus'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFilePlayNoc'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileDuration'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileType'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileAge'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileAdminDeletion'), ('CISCO-ANNOUNCEMENT-MIB', 'cannoAudioFileRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
canno_audio_file_group = cannoAudioFileGroup.setStatus('current')
if mibBuilder.loadTexts:
cannoAudioFileGroup.setDescription('This group contains objects related to announcement files on media gateway. ')
mibBuilder.exportSymbols('CISCO-ANNOUNCEMENT-MIB', cannoAudioFileDescr=cannoAudioFileDescr, ciscoAnnouncementMIBConformance=ciscoAnnouncementMIBConformance, cannoMaxPermanent=cannoMaxPermanent, ciscoAnnouncementMIB=ciscoAnnouncementMIB, cannoControlTable=cannoControlTable, cannoAudioFilePlayNoc=cannoAudioFilePlayNoc, cannoIpAddressType=cannoIpAddressType, cannoAudioFileName=cannoAudioFileName, cannoAgeTime=cannoAgeTime, cannoAudioFileOperStatus=cannoAudioFileOperStatus, cannoAudioFileGroup=cannoAudioFileGroup, cannoMIBCompliance=cannoMIBCompliance, cannoDnResolution=cannoDnResolution, PYSNMP_MODULE_ID=ciscoAnnouncementMIB, cannoAudioFileStatus=cannoAudioFileStatus, cannoAudioFileConfig=cannoAudioFileConfig, cannoAudioFileAge=cannoAudioFileAge, cannoControlEntry=cannoControlEntry, cannoAudioFileNumber=cannoAudioFileNumber, cannoGeneric=cannoGeneric, cannoSubDirPath=cannoSubDirPath, cannoControlGroup=cannoControlGroup, cannoAudioFileTable=cannoAudioFileTable, cannoMIBCompliances=cannoMIBCompliances, cannoControlConfig=cannoControlConfig, cannoIpAddress=cannoIpAddress, cannoAudioFileAdminDeletion=cannoAudioFileAdminDeletion, cannoAudioFileEntry=cannoAudioFileEntry, cannoAudioFileType=cannoAudioFileType, ciscoAnnouncementMIBObjects=ciscoAnnouncementMIBObjects, cannoMIBGroups=cannoMIBGroups, cannoAudioFileServerName=cannoAudioFileServerName, cannoAudioFileRowStatus=cannoAudioFileRowStatus, cannoAudioFileDuration=cannoAudioFileDuration, cannoReqTimeout=cannoReqTimeout, ciscoAnnouncementMIBNotifs=ciscoAnnouncementMIBNotifs) |
# Will you make it?
def zero_fuel(distance_to_pump, mpg, fuel_left):
if ( distance_to_pump - mpg*fuel_left )>0:
result = False
else:
result = True
return result
| def zero_fuel(distance_to_pump, mpg, fuel_left):
if distance_to_pump - mpg * fuel_left > 0:
result = False
else:
result = True
return result |
def fib(n, calc):
if n == 0 or n == 1:
if len(calc) < 2:
calc.append(n)
return calc[n], calc
elif len(calc)-1 >= n:
return calc[n], calc
elif n >= 2:
res1, c = fib(n-1, calc)
res2, c = fib(n-2, calc)
res = res1 + res2
calc.append(res)
return res, calc
else:
return calc[n], calc
a = int(input())
res = ''
calc = []
for num in range(0, a):
n, calc = fib(num, calc)
res += str(n) + ' '
print(res.strip())
| def fib(n, calc):
if n == 0 or n == 1:
if len(calc) < 2:
calc.append(n)
return (calc[n], calc)
elif len(calc) - 1 >= n:
return (calc[n], calc)
elif n >= 2:
(res1, c) = fib(n - 1, calc)
(res2, c) = fib(n - 2, calc)
res = res1 + res2
calc.append(res)
return (res, calc)
else:
return (calc[n], calc)
a = int(input())
res = ''
calc = []
for num in range(0, a):
(n, calc) = fib(num, calc)
res += str(n) + ' '
print(res.strip()) |
def Tproduct(arg0, *args):
p = arg0
for arg in args:
p *= arg
return p
| def tproduct(arg0, *args):
p = arg0
for arg in args:
p *= arg
return p |
mylist = input('Enter your list: ')
mylist = [int(x) for x in mylist.split(' ')]
points = [0,15,10,10,25,15,15,20,10,25,20,25,25,5,20,30,20,15,10,5,5,15,20,20,20,20,15,15,20,25,15,20,20,20,15,40,15,30,35,20,25,15,20,15,25,20,25,20,25,20,10]
total = 0
for index in mylist:
total += points[index]
print (total) | mylist = input('Enter your list: ')
mylist = [int(x) for x in mylist.split(' ')]
points = [0, 15, 10, 10, 25, 15, 15, 20, 10, 25, 20, 25, 25, 5, 20, 30, 20, 15, 10, 5, 5, 15, 20, 20, 20, 20, 15, 15, 20, 25, 15, 20, 20, 20, 15, 40, 15, 30, 35, 20, 25, 15, 20, 15, 25, 20, 25, 20, 25, 20, 10]
total = 0
for index in mylist:
total += points[index]
print(total) |
URLS = 'app.urls'
POSTGRESQL_DATABASE_URI = ""
DEBUG = True
BASE_HOSTNAME = 'http://192.168.30.101:8080'
HOST = '0.0.0.0'
USERNAME = 'user'
PASSWORD = 'pass'
| urls = 'app.urls'
postgresql_database_uri = ''
debug = True
base_hostname = 'http://192.168.30.101:8080'
host = '0.0.0.0'
username = 'user'
password = 'pass' |
class ModelMetrics:
def __init__(self, model_name, model_version, metric_by_feature):
self.model_name = model_name
self.model_version = model_version
self.metrics_by_feature = metric_by_feature
| class Modelmetrics:
def __init__(self, model_name, model_version, metric_by_feature):
self.model_name = model_name
self.model_version = model_version
self.metrics_by_feature = metric_by_feature |
def constraint_in_set(_set = range(0,128)):
def f(context):
note, seq, tick = context
if seq.to_pitch_set() == {}:
return False
return seq.to_pitch_set().issubset(_set)
return f
def constraint_no_repeated_adjacent_notes():
def f(context):
note, seq, tick = context
return seq[0].pitches[0] != context["previous"][-1].pitches[0]
return f
def constraint_limit_shared_pitches(max_shared=1):
def f(context):
note, seq, tick = context
intersection = set(seq.pitches).intersection(set(context["previous"].pitches))
return len(intersection) <= max_shared
return f
def constraint_enforce_shared_pitches(min_shared=1):
def f(context):
note, seq, tick = context
intersection = set(seq.pitches).intersection(set(context["previous"].pitches))
return len(intersection) >= min_shared
return f
def constraint_no_leaps_more_than(max_int):
def f(context):
note, seq, tick = context
previous_pitch = seq.events[-2].pitches[0]
delta = note - previous_pitch
return abs(delta) <= max_int
return f
def constraint_note_is(tick=0,pitch=0):
def f(context):
event, seq, _tick = context
if _tick != tick:
return True
return event.pitches[0] == pitch
return f
def constraint_voice2_is_lower_than(voice1):
def f(context):
event, seq, tick = context
#print(tick, voice1[tick], note, voice1[tick] >= note)
return voice1[tick].pitches[0] >= event.pitches[0]
return f | def constraint_in_set(_set=range(0, 128)):
def f(context):
(note, seq, tick) = context
if seq.to_pitch_set() == {}:
return False
return seq.to_pitch_set().issubset(_set)
return f
def constraint_no_repeated_adjacent_notes():
def f(context):
(note, seq, tick) = context
return seq[0].pitches[0] != context['previous'][-1].pitches[0]
return f
def constraint_limit_shared_pitches(max_shared=1):
def f(context):
(note, seq, tick) = context
intersection = set(seq.pitches).intersection(set(context['previous'].pitches))
return len(intersection) <= max_shared
return f
def constraint_enforce_shared_pitches(min_shared=1):
def f(context):
(note, seq, tick) = context
intersection = set(seq.pitches).intersection(set(context['previous'].pitches))
return len(intersection) >= min_shared
return f
def constraint_no_leaps_more_than(max_int):
def f(context):
(note, seq, tick) = context
previous_pitch = seq.events[-2].pitches[0]
delta = note - previous_pitch
return abs(delta) <= max_int
return f
def constraint_note_is(tick=0, pitch=0):
def f(context):
(event, seq, _tick) = context
if _tick != tick:
return True
return event.pitches[0] == pitch
return f
def constraint_voice2_is_lower_than(voice1):
def f(context):
(event, seq, tick) = context
return voice1[tick].pitches[0] >= event.pitches[0]
return f |
load("@rules_scala_annex//rules:providers.bzl", "LabeledJars")
def labeled_jars_implementation(target, ctx):
if JavaInfo not in target:
return []
deps_labeled_jars = [dep[LabeledJars] for dep in getattr(ctx.rule.attr, "deps", []) if LabeledJars in dep]
java_info = target[JavaInfo]
return [
LabeledJars(
values = depset(
[struct(label = ctx.label, jars = depset(transitive = [java_info.compile_jars, java_info.full_compile_jars]))],
order = "preorder",
transitive = [labeled_jars.values for labeled_jars in deps_labeled_jars],
),
),
]
| load('@rules_scala_annex//rules:providers.bzl', 'LabeledJars')
def labeled_jars_implementation(target, ctx):
if JavaInfo not in target:
return []
deps_labeled_jars = [dep[LabeledJars] for dep in getattr(ctx.rule.attr, 'deps', []) if LabeledJars in dep]
java_info = target[JavaInfo]
return [labeled_jars(values=depset([struct(label=ctx.label, jars=depset(transitive=[java_info.compile_jars, java_info.full_compile_jars]))], order='preorder', transitive=[labeled_jars.values for labeled_jars in deps_labeled_jars]))] |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0.html
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
class TableJoiner:
def __init__(self, hive_context, query):
self.query = query
self.hive_context = hive_context
def join_tables(self):
df = self.hive_context.sql(self.query)
return df
| class Tablejoiner:
def __init__(self, hive_context, query):
self.query = query
self.hive_context = hive_context
def join_tables(self):
df = self.hive_context.sql(self.query)
return df |
#Escreva um programa que leia a velocidade de um carro.
velocidade = float(input('Velocidade: '))
# Se ele ultrapassar 80Km/h, mostre uma mensagem dizendo que ele foi multado
if velocidade > 80:
print(f'Passou a {velocidade} numa pista de 80 !!! \nVai pagar R${((velocidade-80)*30):.2f} de multa')
#A multa vai custar R$7,00 por cada Km acima do limite.
else:
print(f'{velocidade}Km. Voce estava dentro do limite de 80Km') | velocidade = float(input('Velocidade: '))
if velocidade > 80:
print(f'Passou a {velocidade} numa pista de 80 !!! \nVai pagar R${(velocidade - 80) * 30:.2f} de multa')
else:
print(f'{velocidade}Km. Voce estava dentro do limite de 80Km') |
# This is the version string assigned to the entire egg post
# setup.py install
__version__ = "0.0.9"
# Ownership and Copyright Information.
__author__ = "Colin Bell <colin.bell@uwaterloo.ca>"
__copyright__ = "Copyright 2011-2014, University of Waterloo"
__license__ = "BSD-new"
| __version__ = '0.0.9'
__author__ = 'Colin Bell <colin.bell@uwaterloo.ca>'
__copyright__ = 'Copyright 2011-2014, University of Waterloo'
__license__ = 'BSD-new' |
#This file was created by Diego Saldana
TITLE = " SUPREME JUMP "
TITLE2 = " GAME OVER FOO :( "
# screen dims
WIDTH = 480
HEIGHT = 600
# frames per second
FPS = 60
# player settings
PLAYER_ACC = 0.5
PLAYER_FRICTION = -0.12
PLAYER_GRAV = 0.8
PLAYER_JUMP = 100
FONT_NAME = 'arcade'
# platform settings
PLATFORM_LIST = [(0, HEIGHT - 40, WIDTH, 40),
(65, HEIGHT - 300, WIDTH-400, 40),
(20, HEIGHT - 350, WIDTH-300, 40),
(200, HEIGHT - 150, WIDTH-350, 40),
(200, HEIGHT - 450, WIDTH-350, 40)]
#colors
WHITE = (255, 255, 255)
GREY = (205,201,201)
BLUE = (175,238,238)
BLACK = (0,0,0)
RED = (178,34,34) | title = ' SUPREME JUMP '
title2 = ' GAME OVER FOO :( '
width = 480
height = 600
fps = 60
player_acc = 0.5
player_friction = -0.12
player_grav = 0.8
player_jump = 100
font_name = 'arcade'
platform_list = [(0, HEIGHT - 40, WIDTH, 40), (65, HEIGHT - 300, WIDTH - 400, 40), (20, HEIGHT - 350, WIDTH - 300, 40), (200, HEIGHT - 150, WIDTH - 350, 40), (200, HEIGHT - 450, WIDTH - 350, 40)]
white = (255, 255, 255)
grey = (205, 201, 201)
blue = (175, 238, 238)
black = (0, 0, 0)
red = (178, 34, 34) |
#
# PySNMP MIB module XYLAN-HEALTH-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/XYLAN-HEALTH-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:38:37 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Integer32, ModuleIdentity, iso, MibIdentifier, Counter64, NotificationType, Counter32, Bits, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Unsigned32, Gauge32, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "ModuleIdentity", "iso", "MibIdentifier", "Counter64", "NotificationType", "Counter32", "Bits", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Unsigned32", "Gauge32", "TimeTicks")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
xylanHealthArch, = mibBuilder.importSymbols("XYLAN-BASE-MIB", "xylanHealthArch")
healthDeviceInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 1))
healthModuleInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 2))
healthPortInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 3))
healthGroupInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 4))
healthControlInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 5))
healthThreshInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 6))
health2DeviceInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 7))
health2ModuleInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 8))
health2PortInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 9))
healthDeviceRxData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceRxData.setStatus('mandatory')
healthDeviceRxTimeDelta = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceRxTimeDelta.setStatus('mandatory')
healthDeviceRxTxData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceRxTxData.setStatus('mandatory')
healthDeviceRxTxTimeDelta = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceRxTxTimeDelta.setStatus('mandatory')
healthDeviceBackplaneData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceBackplaneData.setStatus('mandatory')
healthDeviceBackplaneTimeDelta = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceBackplaneTimeDelta.setStatus('mandatory')
healthDeviceCamData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(12, 12)).setFixedLength(12)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceCamData.setStatus('mandatory')
healthDeviceCamTimeDelta = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceCamTimeDelta.setStatus('mandatory')
healthDeviceMemoryData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(12, 12)).setFixedLength(12)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceMemoryData.setStatus('mandatory')
healthDeviceMemoryTimeDelta = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceMemoryTimeDelta.setStatus('mandatory')
healthDeviceCpuData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 11), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceCpuData.setStatus('mandatory')
healthDeviceCpuTimeDelta = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceCpuTimeDelta.setStatus('mandatory')
healthDeviceNumCpus = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceNumCpus.setStatus('mandatory')
healthDeviceMemoryTotal = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceMemoryTotal.setStatus('mandatory')
healthDeviceMemoryFree = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceMemoryFree.setStatus('mandatory')
healthDeviceMpmCamTotal = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceMpmCamTotal.setStatus('mandatory')
healthDeviceMpmCamFree = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 17), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceMpmCamFree.setStatus('mandatory')
healthDeviceHreCamTotal = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 18), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceHreCamTotal.setStatus('mandatory')
healthDeviceHreCamFree = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 19), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceHreCamFree.setStatus('mandatory')
healthDeviceTemp = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 20), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceTemp.setStatus('mandatory')
healthDeviceIPRouteCacheFlushCount = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 21), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceIPRouteCacheFlushCount.setStatus('mandatory')
healthDeviceIPXRouteCacheFlushCount = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 22), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceIPXRouteCacheFlushCount.setStatus('mandatory')
healthDeviceMpmRxOverrunCount = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 23), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceMpmRxOverrunCount.setStatus('mandatory')
healthDeviceMpmTxOverrunCount = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 24), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceMpmTxOverrunCount.setStatus('mandatory')
healthDeviceVccData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 25), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceVccData.setStatus('mandatory')
healthDeviceVccTimeDelta = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 26), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceVccTimeDelta.setStatus('mandatory')
healthDeviceTemperatureData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 27), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceTemperatureData.setStatus('mandatory')
healthDeviceTemperatureTimeDelta = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 28), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceTemperatureTimeDelta.setStatus('mandatory')
healthDeviceVpData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 29), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceVpData.setStatus('mandatory')
healthDeviceVpTimeDelta = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 30), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceVpTimeDelta.setStatus('mandatory')
healthDeviceHreCollisionTotal = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 31), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceHreCollisionTotal.setStatus('mandatory')
healthDeviceHreCollisionFree = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 32), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthDeviceHreCollisionFree.setStatus('mandatory')
healthModuleTable = MibTable((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1), )
if mibBuilder.loadTexts: healthModuleTable.setStatus('mandatory')
healthModuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1), ).setIndexNames((0, "XYLAN-HEALTH-MIB", "healthModuleSlot"))
if mibBuilder.loadTexts: healthModuleEntry.setStatus('mandatory')
healthModuleSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleSlot.setStatus('mandatory')
healthModuleRxData = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleRxData.setStatus('mandatory')
healthModuleRxTimeDelta = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleRxTimeDelta.setStatus('mandatory')
healthModuleRxTxData = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleRxTxData.setStatus('mandatory')
healthModuleRxTxTimeDelta = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleRxTxTimeDelta.setStatus('mandatory')
healthModuleBackplaneData = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleBackplaneData.setStatus('mandatory')
healthModuleBackplaneTimeDelta = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleBackplaneTimeDelta.setStatus('mandatory')
healthModuleCamData = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleCamData.setStatus('mandatory')
healthModuleCamTimeDelta = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleCamTimeDelta.setStatus('mandatory')
healthModuleCamNumInstalled = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleCamNumInstalled.setStatus('mandatory')
healthModuleCamConfigured = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleCamConfigured.setStatus('mandatory')
healthModuleCamAvail = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleCamAvail.setStatus('mandatory')
healthModuleCamAvailNonIntern = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleCamAvailNonIntern.setStatus('mandatory')
healthModuleCamFree = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleCamFree.setStatus('mandatory')
healthModuleVccData = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 15), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleVccData.setStatus('mandatory')
healthModuleVccTimeDelta = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthModuleVccTimeDelta.setStatus('mandatory')
healthSamplingInterval = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 5, 1), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: healthSamplingInterval.setStatus('mandatory')
healthSamplingReset = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 5, 2), Integer32()).setMaxAccess("writeonly")
if mibBuilder.loadTexts: healthSamplingReset.setStatus('mandatory')
healthThreshDeviceRxLimit = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: healthThreshDeviceRxLimit.setStatus('mandatory')
healthThreshDeviceRxTxLimit = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: healthThreshDeviceRxTxLimit.setStatus('mandatory')
healthThreshDeviceBackplaneLimit = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: healthThreshDeviceBackplaneLimit.setStatus('mandatory')
healthThreshDeviceCamLimit = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: healthThreshDeviceCamLimit.setStatus('mandatory')
healthThreshDeviceMemoryLimit = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: healthThreshDeviceMemoryLimit.setStatus('mandatory')
healthThreshDeviceCpuLimit = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: healthThreshDeviceCpuLimit.setStatus('mandatory')
healthThreshDeviceSummary = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(27, 27)).setFixedLength(27)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthThreshDeviceSummary.setStatus('mandatory')
healthThreshModuleSummaryTable = MibTable((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 8), )
if mibBuilder.loadTexts: healthThreshModuleSummaryTable.setStatus('mandatory')
healthThreshModuleSummaryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 8, 1), ).setIndexNames((0, "XYLAN-HEALTH-MIB", "healthThreshModuleSummarySlot"))
if mibBuilder.loadTexts: healthThreshModuleSummaryEntry.setStatus('mandatory')
healthThreshModuleSummarySlot = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 8, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthThreshModuleSummarySlot.setStatus('mandatory')
healthThreshModuleSummaryData = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 8, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(16, 16)).setFixedLength(16)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthThreshModuleSummaryData.setStatus('mandatory')
healthThreshDevTrapData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 21)))
if mibBuilder.loadTexts: healthThreshDevTrapData.setStatus('mandatory')
healthThreshModTrapCount = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 10), Integer32())
if mibBuilder.loadTexts: healthThreshModTrapCount.setStatus('mandatory')
healthThreshModTrapData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128)))
if mibBuilder.loadTexts: healthThreshModTrapData.setStatus('mandatory')
healthThreshPortSummaryTable = MibTable((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 12), )
if mibBuilder.loadTexts: healthThreshPortSummaryTable.setStatus('mandatory')
healthThreshPortSummaryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 12, 1), ).setIndexNames((0, "XYLAN-HEALTH-MIB", "healthThreshPortSummarySlot"), (0, "XYLAN-HEALTH-MIB", "healthThreshPortSummaryIF"))
if mibBuilder.loadTexts: healthThreshPortSummaryEntry.setStatus('mandatory')
healthThreshPortSummarySlot = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 12, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthThreshPortSummarySlot.setStatus('mandatory')
healthThreshPortSummaryIF = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 12, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthThreshPortSummaryIF.setStatus('mandatory')
healthThreshPortSummaryData = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 12, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(13, 13)).setFixedLength(13)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthThreshPortSummaryData.setStatus('mandatory')
healthThreshPortTrapSlot = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 13), Integer32())
if mibBuilder.loadTexts: healthThreshPortTrapSlot.setStatus('mandatory')
healthThreshPortTrapCount = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 14), Integer32())
if mibBuilder.loadTexts: healthThreshPortTrapCount.setStatus('mandatory')
healthThreshPortTrapData = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 15), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255)))
if mibBuilder.loadTexts: healthThreshPortTrapData.setStatus('mandatory')
healthThreshDeviceVccLimit = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: healthThreshDeviceVccLimit.setStatus('mandatory')
healthThreshDeviceTemperatureLimit = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: healthThreshDeviceTemperatureLimit.setStatus('mandatory')
healthThreshDeviceVpLimit = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: healthThreshDeviceVpLimit.setStatus('mandatory')
healthPortMax = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(21, 21)).setFixedLength(21)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortMax.setStatus('mandatory')
class HealthPortUpDownStatus(Integer32):
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("healthPortDn", 1), ("healthPortUp", 2))
healthPortTable = MibTable((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2), )
if mibBuilder.loadTexts: healthPortTable.setStatus('mandatory')
healthPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1), ).setIndexNames((0, "XYLAN-HEALTH-MIB", "healthPortSlot"), (0, "XYLAN-HEALTH-MIB", "healthPortIF"))
if mibBuilder.loadTexts: healthPortEntry.setStatus('mandatory')
healthPortSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortSlot.setStatus('mandatory')
healthPortIF = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortIF.setStatus('mandatory')
healthPortUpDn = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 3), HealthPortUpDownStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortUpDn.setStatus('mandatory')
healthPortRxData = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortRxData.setStatus('mandatory')
healthPortRxTimeDelta = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortRxTimeDelta.setStatus('mandatory')
healthPortRxTxData = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortRxTxData.setStatus('mandatory')
healthPortRxTxTimeDelta = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortRxTxTimeDelta.setStatus('mandatory')
healthPortBackplaneData = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortBackplaneData.setStatus('mandatory')
healthPortBackplaneTimeDelta = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortBackplaneTimeDelta.setStatus('mandatory')
healthPortVccData = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortVccData.setStatus('mandatory')
healthPortVccTimeDelta = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: healthPortVccTimeDelta.setStatus('mandatory')
health2DeviceRxLatest = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceRxLatest.setStatus('mandatory')
health2DeviceRx1MinAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceRx1MinAvg.setStatus('mandatory')
health2DeviceRx1HrAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceRx1HrAvg.setStatus('mandatory')
health2DeviceRx1HrMax = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceRx1HrMax.setStatus('mandatory')
health2DeviceRxTxLatest = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceRxTxLatest.setStatus('mandatory')
health2DeviceRxTx1MinAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceRxTx1MinAvg.setStatus('mandatory')
health2DeviceRxTx1HrAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceRxTx1HrAvg.setStatus('mandatory')
health2DeviceRxTx1HrMax = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceRxTx1HrMax.setStatus('mandatory')
health2DeviceBackplaneLatest = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceBackplaneLatest.setStatus('mandatory')
health2DeviceBackplane1MinAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceBackplane1MinAvg.setStatus('mandatory')
health2DeviceBackplane1HrAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceBackplane1HrAvg.setStatus('mandatory')
health2DeviceBackplane1HrMax = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceBackplane1HrMax.setStatus('mandatory')
health2DeviceMpmCamLatest = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceMpmCamLatest.setStatus('mandatory')
health2DeviceMpmCam1MinAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceMpmCam1MinAvg.setStatus('mandatory')
health2DeviceMpmCam1HrAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceMpmCam1HrAvg.setStatus('mandatory')
health2DeviceMpmCam1HrMax = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceMpmCam1HrMax.setStatus('mandatory')
health2DeviceHreCamLatest = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceHreCamLatest.setStatus('mandatory')
health2DeviceHreCam1MinAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceHreCam1MinAvg.setStatus('mandatory')
health2DeviceHreCam1HrAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceHreCam1HrAvg.setStatus('mandatory')
health2DeviceHreCam1HrMax = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceHreCam1HrMax.setStatus('mandatory')
health2DeviceMemoryLatest = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceMemoryLatest.setStatus('mandatory')
health2DeviceMemory1MinAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceMemory1MinAvg.setStatus('mandatory')
health2DeviceMemory1HrAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceMemory1HrAvg.setStatus('mandatory')
health2DeviceMemory1HrMax = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 24), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceMemory1HrMax.setStatus('mandatory')
health2DeviceNumCpus = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 25), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceNumCpus.setStatus('mandatory')
health2DeviceCpuTable = MibTable((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26), )
if mibBuilder.loadTexts: health2DeviceCpuTable.setStatus('mandatory')
health2DeviceCpuEntry = MibTableRow((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1), ).setIndexNames((0, "XYLAN-HEALTH-MIB", "health2DeviceCpuNum"))
if mibBuilder.loadTexts: health2DeviceCpuEntry.setStatus('mandatory')
health2DeviceCpuNum = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceCpuNum.setStatus('mandatory')
health2DeviceCpuLatest = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceCpuLatest.setStatus('mandatory')
health2DeviceCpu1MinAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceCpu1MinAvg.setStatus('mandatory')
health2DeviceCpu1HrAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceCpu1HrAvg.setStatus('mandatory')
health2DeviceCpu1HrMax = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceCpu1HrMax.setStatus('mandatory')
health2DeviceVccLatest = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 27), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceVccLatest.setStatus('mandatory')
health2DeviceVcc1MinAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 28), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceVcc1MinAvg.setStatus('mandatory')
health2DeviceVcc1HrAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceVcc1HrAvg.setStatus('mandatory')
health2DeviceVcc1HrMax = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 30), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceVcc1HrMax.setStatus('mandatory')
health2DeviceTemperatureLatest = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 31), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceTemperatureLatest.setStatus('mandatory')
health2DeviceTemperature1MinAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 32), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceTemperature1MinAvg.setStatus('mandatory')
health2DeviceTemperature1HrAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 33), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceTemperature1HrAvg.setStatus('mandatory')
health2DeviceTemperature1HrMax = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 34), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceTemperature1HrMax.setStatus('mandatory')
health2DeviceVpLatest = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 35), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceVpLatest.setStatus('mandatory')
health2DeviceVp1MinAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 36), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceVp1MinAvg.setStatus('mandatory')
health2DeviceVp1HrAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 37), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceVp1HrAvg.setStatus('mandatory')
health2DeviceVp1HrMax = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 38), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceVp1HrMax.setStatus('mandatory')
health2DeviceHreCollisionLatest = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 39), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceHreCollisionLatest.setStatus('mandatory')
health2DeviceHreCollision1MinAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 40), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceHreCollision1MinAvg.setStatus('mandatory')
health2DeviceHreCollision1HrAvg = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 41), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceHreCollision1HrAvg.setStatus('mandatory')
health2DeviceHreCollision1HrMax = MibScalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 42), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2DeviceHreCollision1HrMax.setStatus('mandatory')
health2ModuleTable = MibTable((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1), )
if mibBuilder.loadTexts: health2ModuleTable.setStatus('mandatory')
health2ModuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1), ).setIndexNames((0, "XYLAN-HEALTH-MIB", "health2ModuleSlot"))
if mibBuilder.loadTexts: health2ModuleEntry.setStatus('mandatory')
health2ModuleSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleSlot.setStatus('mandatory')
health2ModuleRxLatest = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleRxLatest.setStatus('mandatory')
health2ModuleRx1MinAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleRx1MinAvg.setStatus('mandatory')
health2ModuleRx1HrAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleRx1HrAvg.setStatus('mandatory')
health2ModuleRx1HrMax = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleRx1HrMax.setStatus('mandatory')
health2ModuleRxTxLatest = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleRxTxLatest.setStatus('mandatory')
health2ModuleRxTx1MinAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleRxTx1MinAvg.setStatus('mandatory')
health2ModuleRxTx1HrAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleRxTx1HrAvg.setStatus('mandatory')
health2ModuleRxTx1HrMax = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleRxTx1HrMax.setStatus('mandatory')
health2ModuleBackplaneLatest = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleBackplaneLatest.setStatus('mandatory')
health2ModuleBackplane1MinAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleBackplane1MinAvg.setStatus('mandatory')
health2ModuleBackplane1HrAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleBackplane1HrAvg.setStatus('mandatory')
health2ModuleBackplane1HrMax = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleBackplane1HrMax.setStatus('mandatory')
health2ModuleCamLatest = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleCamLatest.setStatus('mandatory')
health2ModuleCam1MinAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleCam1MinAvg.setStatus('mandatory')
health2ModuleCam1HrAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleCam1HrAvg.setStatus('mandatory')
health2ModuleCam1HrMax = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleCam1HrMax.setStatus('mandatory')
health2ModuleVccLatest = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleVccLatest.setStatus('mandatory')
health2ModuleVcc1MinAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleVcc1MinAvg.setStatus('mandatory')
health2ModuleVcc1HrAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleVcc1HrAvg.setStatus('mandatory')
health2ModuleVcc1HrMax = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2ModuleVcc1HrMax.setStatus('mandatory')
health2PortTable = MibTable((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1), )
if mibBuilder.loadTexts: health2PortTable.setStatus('mandatory')
health2PortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1), ).setIndexNames((0, "XYLAN-HEALTH-MIB", "health2PortSlot"), (0, "XYLAN-HEALTH-MIB", "health2PortIF"))
if mibBuilder.loadTexts: health2PortEntry.setStatus('mandatory')
health2PortSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 9))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortSlot.setStatus('mandatory')
health2PortIF = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortIF.setStatus('mandatory')
health2PortRxLatest = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortRxLatest.setStatus('mandatory')
health2PortRx1MinAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortRx1MinAvg.setStatus('mandatory')
health2PortRx1HrAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortRx1HrAvg.setStatus('mandatory')
health2PortRx1HrMax = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortRx1HrMax.setStatus('mandatory')
health2PortRxTxLatest = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortRxTxLatest.setStatus('mandatory')
health2PortRxTx1MinAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortRxTx1MinAvg.setStatus('mandatory')
health2PortRxTx1HrAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortRxTx1HrAvg.setStatus('mandatory')
health2PortRxTx1HrMax = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortRxTx1HrMax.setStatus('mandatory')
health2PortBackplaneLatest = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortBackplaneLatest.setStatus('mandatory')
health2PortBackplane1MinAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortBackplane1MinAvg.setStatus('mandatory')
health2PortBackplane1HrAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortBackplane1HrAvg.setStatus('mandatory')
health2PortBackplane1HrMax = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortBackplane1HrMax.setStatus('mandatory')
health2PortVccLatest = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortVccLatest.setStatus('mandatory')
health2PortVcc1MinAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortVcc1MinAvg.setStatus('mandatory')
health2PortVcc1HrAvg = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortVcc1HrAvg.setStatus('mandatory')
health2PortVcc1HrMax = MibTableColumn((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: health2PortVcc1HrMax.setStatus('mandatory')
mibBuilder.exportSymbols("XYLAN-HEALTH-MIB", healthThreshPortSummaryIF=healthThreshPortSummaryIF, healthDeviceTemp=healthDeviceTemp, healthDeviceMpmRxOverrunCount=healthDeviceMpmRxOverrunCount, healthThreshDeviceRxLimit=healthThreshDeviceRxLimit, healthDeviceRxTxData=healthDeviceRxTxData, healthPortRxTxTimeDelta=healthPortRxTxTimeDelta, health2PortSlot=health2PortSlot, health2DeviceHreCamLatest=health2DeviceHreCamLatest, health2DeviceBackplaneLatest=health2DeviceBackplaneLatest, health2ModuleVcc1MinAvg=health2ModuleVcc1MinAvg, healthPortRxData=healthPortRxData, health2DeviceCpu1MinAvg=health2DeviceCpu1MinAvg, health2DeviceHreCam1HrMax=health2DeviceHreCam1HrMax, health2ModuleRx1HrMax=health2ModuleRx1HrMax, healthThreshModTrapCount=healthThreshModTrapCount, healthPortVccTimeDelta=healthPortVccTimeDelta, health2ModuleSlot=health2ModuleSlot, healthDeviceHreCamTotal=healthDeviceHreCamTotal, healthDeviceTemperatureTimeDelta=healthDeviceTemperatureTimeDelta, health2PortBackplaneLatest=health2PortBackplaneLatest, health2DeviceVcc1HrMax=health2DeviceVcc1HrMax, health2DeviceHreCollision1HrMax=health2DeviceHreCollision1HrMax, healthPortIF=healthPortIF, health2DeviceCpu1HrMax=health2DeviceCpu1HrMax, healthThreshDeviceBackplaneLimit=healthThreshDeviceBackplaneLimit, healthDeviceVpTimeDelta=healthDeviceVpTimeDelta, health2DeviceHreCollision1MinAvg=health2DeviceHreCollision1MinAvg, health2DeviceInfo=health2DeviceInfo, healthThreshDeviceVpLimit=healthThreshDeviceVpLimit, healthDeviceVccData=healthDeviceVccData, healthDeviceTemperatureData=healthDeviceTemperatureData, healthPortEntry=healthPortEntry, healthThreshPortSummarySlot=healthThreshPortSummarySlot, health2PortRxLatest=health2PortRxLatest, healthThreshDeviceSummary=healthThreshDeviceSummary, healthDeviceCpuTimeDelta=healthDeviceCpuTimeDelta, health2DeviceRxTx1HrAvg=health2DeviceRxTx1HrAvg, healthModuleRxData=healthModuleRxData, health2DeviceCpuNum=health2DeviceCpuNum, healthDeviceMpmCamFree=healthDeviceMpmCamFree, healthThreshDeviceMemoryLimit=healthThreshDeviceMemoryLimit, health2ModuleCam1HrMax=health2ModuleCam1HrMax, health2DeviceTemperature1HrAvg=health2DeviceTemperature1HrAvg, health2ModuleCam1MinAvg=health2ModuleCam1MinAvg, healthThreshPortTrapCount=healthThreshPortTrapCount, health2ModuleInfo=health2ModuleInfo, health2ModuleBackplaneLatest=health2ModuleBackplaneLatest, health2PortRxTxLatest=health2PortRxTxLatest, health2ModuleRx1HrAvg=health2ModuleRx1HrAvg, HealthPortUpDownStatus=HealthPortUpDownStatus, healthDeviceRxTimeDelta=healthDeviceRxTimeDelta, health2DeviceRx1MinAvg=health2DeviceRx1MinAvg, health2DeviceHreCam1MinAvg=health2DeviceHreCam1MinAvg, healthPortSlot=healthPortSlot, health2ModuleBackplane1MinAvg=health2ModuleBackplane1MinAvg, healthControlInfo=healthControlInfo, healthThreshDeviceVccLimit=healthThreshDeviceVccLimit, health2DeviceVp1HrMax=health2DeviceVp1HrMax, health2ModuleCam1HrAvg=health2ModuleCam1HrAvg, healthThreshModuleSummaryEntry=healthThreshModuleSummaryEntry, health2PortBackplane1HrAvg=health2PortBackplane1HrAvg, health2PortVcc1HrAvg=health2PortVcc1HrAvg, health2ModuleEntry=health2ModuleEntry, health2PortRx1MinAvg=health2PortRx1MinAvg, healthModuleCamConfigured=healthModuleCamConfigured, health2DeviceNumCpus=health2DeviceNumCpus, healthDeviceBackplaneTimeDelta=healthDeviceBackplaneTimeDelta, health2ModuleRxTx1HrAvg=health2ModuleRxTx1HrAvg, healthDeviceBackplaneData=healthDeviceBackplaneData, healthPortRxTxData=healthPortRxTxData, healthDeviceMemoryTimeDelta=healthDeviceMemoryTimeDelta, healthDeviceHreCamFree=healthDeviceHreCamFree, healthThreshPortSummaryEntry=healthThreshPortSummaryEntry, health2DeviceMpmCam1HrAvg=health2DeviceMpmCam1HrAvg, health2DeviceRx1HrMax=health2DeviceRx1HrMax, healthModuleInfo=healthModuleInfo, health2ModuleBackplane1HrAvg=health2ModuleBackplane1HrAvg, health2ModuleCamLatest=health2ModuleCamLatest, healthDeviceRxTxTimeDelta=healthDeviceRxTxTimeDelta, health2DeviceRxLatest=health2DeviceRxLatest, health2PortEntry=health2PortEntry, healthModuleRxTxData=healthModuleRxTxData, healthModuleVccTimeDelta=healthModuleVccTimeDelta, health2DeviceMpmCam1HrMax=health2DeviceMpmCam1HrMax, healthDeviceVccTimeDelta=healthDeviceVccTimeDelta, health2DeviceMemoryLatest=health2DeviceMemoryLatest, health2DeviceMpmCam1MinAvg=health2DeviceMpmCam1MinAvg, health2ModuleRxTx1HrMax=health2ModuleRxTx1HrMax, health2DeviceVpLatest=health2DeviceVpLatest, healthThreshDeviceCamLimit=healthThreshDeviceCamLimit, healthDeviceRxData=healthDeviceRxData, healthThreshInfo=healthThreshInfo, healthModuleVccData=healthModuleVccData, health2DeviceCpuTable=health2DeviceCpuTable, healthDeviceIPXRouteCacheFlushCount=healthDeviceIPXRouteCacheFlushCount, health2PortRx1HrMax=health2PortRx1HrMax, healthPortUpDn=healthPortUpDn, healthPortBackplaneData=healthPortBackplaneData, health2DeviceCpuEntry=health2DeviceCpuEntry, healthDeviceMemoryFree=healthDeviceMemoryFree, healthPortRxTimeDelta=healthPortRxTimeDelta, healthModuleRxTxTimeDelta=healthModuleRxTxTimeDelta, health2ModuleRxTxLatest=health2ModuleRxTxLatest, healthSamplingInterval=healthSamplingInterval, healthPortVccData=healthPortVccData, healthModuleCamData=healthModuleCamData, health2DeviceVccLatest=health2DeviceVccLatest, healthThreshDeviceCpuLimit=healthThreshDeviceCpuLimit, health2DeviceTemperature1HrMax=health2DeviceTemperature1HrMax, healthDeviceMpmTxOverrunCount=healthDeviceMpmTxOverrunCount, health2DeviceBackplane1HrAvg=health2DeviceBackplane1HrAvg, health2PortBackplane1HrMax=health2PortBackplane1HrMax, health2PortVcc1MinAvg=health2PortVcc1MinAvg, health2PortInfo=health2PortInfo, healthPortBackplaneTimeDelta=healthPortBackplaneTimeDelta, health2PortRx1HrAvg=health2PortRx1HrAvg, health2PortTable=health2PortTable, healthThreshModTrapData=healthThreshModTrapData, healthModuleCamNumInstalled=healthModuleCamNumInstalled, health2DeviceMpmCamLatest=health2DeviceMpmCamLatest, health2DeviceHreCam1HrAvg=health2DeviceHreCam1HrAvg, healthDeviceIPRouteCacheFlushCount=healthDeviceIPRouteCacheFlushCount, healthDeviceMemoryTotal=healthDeviceMemoryTotal, healthDeviceHreCollisionTotal=healthDeviceHreCollisionTotal, healthModuleBackplaneTimeDelta=healthModuleBackplaneTimeDelta, healthPortMax=healthPortMax, health2ModuleVcc1HrMax=health2ModuleVcc1HrMax, health2ModuleBackplane1HrMax=health2ModuleBackplane1HrMax, health2PortBackplane1MinAvg=health2PortBackplane1MinAvg, health2DeviceTemperature1MinAvg=health2DeviceTemperature1MinAvg, health2DeviceVcc1MinAvg=health2DeviceVcc1MinAvg, healthThreshModuleSummaryData=healthThreshModuleSummaryData, healthThreshModuleSummarySlot=healthThreshModuleSummarySlot, health2ModuleRxTx1MinAvg=health2ModuleRxTx1MinAvg, health2DeviceBackplane1HrMax=health2DeviceBackplane1HrMax, healthDeviceNumCpus=healthDeviceNumCpus, healthDeviceInfo=healthDeviceInfo, healthDeviceMemoryData=healthDeviceMemoryData, health2DeviceHreCollision1HrAvg=health2DeviceHreCollision1HrAvg, healthModuleCamFree=healthModuleCamFree, healthModuleRxTimeDelta=healthModuleRxTimeDelta, healthDeviceHreCollisionFree=healthDeviceHreCollisionFree, healthModuleTable=healthModuleTable, healthPortInfo=healthPortInfo, healthThreshPortSummaryData=healthThreshPortSummaryData, health2DeviceBackplane1MinAvg=health2DeviceBackplane1MinAvg, healthThreshPortTrapData=healthThreshPortTrapData, health2PortVccLatest=health2PortVccLatest, healthThreshModuleSummaryTable=healthThreshModuleSummaryTable, healthThreshPortTrapSlot=healthThreshPortTrapSlot, healthGroupInfo=healthGroupInfo, health2PortRxTx1MinAvg=health2PortRxTx1MinAvg, healthModuleBackplaneData=healthModuleBackplaneData, health2DeviceTemperatureLatest=health2DeviceTemperatureLatest, healthModuleCamAvailNonIntern=healthModuleCamAvailNonIntern, healthSamplingReset=healthSamplingReset, health2PortIF=health2PortIF, health2PortVcc1HrMax=health2PortVcc1HrMax, health2DeviceVp1MinAvg=health2DeviceVp1MinAvg, healthDeviceVpData=healthDeviceVpData, health2DeviceMemory1HrMax=health2DeviceMemory1HrMax, health2DeviceCpu1HrAvg=health2DeviceCpu1HrAvg, healthModuleCamTimeDelta=healthModuleCamTimeDelta, health2DeviceCpuLatest=health2DeviceCpuLatest, health2DeviceHreCollisionLatest=health2DeviceHreCollisionLatest, healthDeviceMpmCamTotal=healthDeviceMpmCamTotal, health2ModuleRx1MinAvg=health2ModuleRx1MinAvg, healthDeviceCamData=healthDeviceCamData, health2DeviceVp1HrAvg=health2DeviceVp1HrAvg, healthModuleEntry=healthModuleEntry, healthPortTable=healthPortTable, health2DeviceRxTx1MinAvg=health2DeviceRxTx1MinAvg, health2ModuleVcc1HrAvg=health2ModuleVcc1HrAvg, healthDeviceCpuData=healthDeviceCpuData, health2DeviceVcc1HrAvg=health2DeviceVcc1HrAvg, health2PortRxTx1HrAvg=health2PortRxTx1HrAvg, health2DeviceRx1HrAvg=health2DeviceRx1HrAvg, healthThreshDeviceTemperatureLimit=healthThreshDeviceTemperatureLimit, health2ModuleVccLatest=health2ModuleVccLatest, healthModuleCamAvail=healthModuleCamAvail, health2DeviceMemory1MinAvg=health2DeviceMemory1MinAvg, healthThreshDeviceRxTxLimit=healthThreshDeviceRxTxLimit, health2DeviceMemory1HrAvg=health2DeviceMemory1HrAvg, health2PortRxTx1HrMax=health2PortRxTx1HrMax, healthThreshDevTrapData=healthThreshDevTrapData, healthDeviceCamTimeDelta=healthDeviceCamTimeDelta, health2DeviceRxTxLatest=health2DeviceRxTxLatest, health2DeviceRxTx1HrMax=health2DeviceRxTx1HrMax, health2ModuleRxLatest=health2ModuleRxLatest, health2ModuleTable=health2ModuleTable, healthThreshPortSummaryTable=healthThreshPortSummaryTable, healthModuleSlot=healthModuleSlot)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, constraints_union, value_range_constraint, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(integer32, module_identity, iso, mib_identifier, counter64, notification_type, counter32, bits, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, unsigned32, gauge32, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'ModuleIdentity', 'iso', 'MibIdentifier', 'Counter64', 'NotificationType', 'Counter32', 'Bits', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'Unsigned32', 'Gauge32', 'TimeTicks')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
(xylan_health_arch,) = mibBuilder.importSymbols('XYLAN-BASE-MIB', 'xylanHealthArch')
health_device_info = mib_identifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 1))
health_module_info = mib_identifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 2))
health_port_info = mib_identifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 3))
health_group_info = mib_identifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 4))
health_control_info = mib_identifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 5))
health_thresh_info = mib_identifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 6))
health2_device_info = mib_identifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 7))
health2_module_info = mib_identifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 8))
health2_port_info = mib_identifier((1, 3, 6, 1, 4, 1, 800, 2, 18, 9))
health_device_rx_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceRxData.setStatus('mandatory')
health_device_rx_time_delta = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceRxTimeDelta.setStatus('mandatory')
health_device_rx_tx_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceRxTxData.setStatus('mandatory')
health_device_rx_tx_time_delta = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceRxTxTimeDelta.setStatus('mandatory')
health_device_backplane_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceBackplaneData.setStatus('mandatory')
health_device_backplane_time_delta = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceBackplaneTimeDelta.setStatus('mandatory')
health_device_cam_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 7), octet_string().subtype(subtypeSpec=value_size_constraint(12, 12)).setFixedLength(12)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceCamData.setStatus('mandatory')
health_device_cam_time_delta = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceCamTimeDelta.setStatus('mandatory')
health_device_memory_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(12, 12)).setFixedLength(12)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceMemoryData.setStatus('mandatory')
health_device_memory_time_delta = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceMemoryTimeDelta.setStatus('mandatory')
health_device_cpu_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 11), octet_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceCpuData.setStatus('mandatory')
health_device_cpu_time_delta = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceCpuTimeDelta.setStatus('mandatory')
health_device_num_cpus = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceNumCpus.setStatus('mandatory')
health_device_memory_total = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 14), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceMemoryTotal.setStatus('mandatory')
health_device_memory_free = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 15), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceMemoryFree.setStatus('mandatory')
health_device_mpm_cam_total = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 16), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceMpmCamTotal.setStatus('mandatory')
health_device_mpm_cam_free = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 17), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceMpmCamFree.setStatus('mandatory')
health_device_hre_cam_total = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 18), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceHreCamTotal.setStatus('mandatory')
health_device_hre_cam_free = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 19), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceHreCamFree.setStatus('mandatory')
health_device_temp = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 20), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceTemp.setStatus('mandatory')
health_device_ip_route_cache_flush_count = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 21), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceIPRouteCacheFlushCount.setStatus('mandatory')
health_device_ipx_route_cache_flush_count = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 22), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceIPXRouteCacheFlushCount.setStatus('mandatory')
health_device_mpm_rx_overrun_count = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 23), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceMpmRxOverrunCount.setStatus('mandatory')
health_device_mpm_tx_overrun_count = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 24), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceMpmTxOverrunCount.setStatus('mandatory')
health_device_vcc_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 25), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceVccData.setStatus('mandatory')
health_device_vcc_time_delta = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 26), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceVccTimeDelta.setStatus('mandatory')
health_device_temperature_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 27), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceTemperatureData.setStatus('mandatory')
health_device_temperature_time_delta = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 28), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceTemperatureTimeDelta.setStatus('mandatory')
health_device_vp_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 29), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceVpData.setStatus('mandatory')
health_device_vp_time_delta = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 30), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceVpTimeDelta.setStatus('mandatory')
health_device_hre_collision_total = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 31), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceHreCollisionTotal.setStatus('mandatory')
health_device_hre_collision_free = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 1, 32), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthDeviceHreCollisionFree.setStatus('mandatory')
health_module_table = mib_table((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1))
if mibBuilder.loadTexts:
healthModuleTable.setStatus('mandatory')
health_module_entry = mib_table_row((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1)).setIndexNames((0, 'XYLAN-HEALTH-MIB', 'healthModuleSlot'))
if mibBuilder.loadTexts:
healthModuleEntry.setStatus('mandatory')
health_module_slot = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleSlot.setStatus('mandatory')
health_module_rx_data = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleRxData.setStatus('mandatory')
health_module_rx_time_delta = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleRxTimeDelta.setStatus('mandatory')
health_module_rx_tx_data = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleRxTxData.setStatus('mandatory')
health_module_rx_tx_time_delta = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleRxTxTimeDelta.setStatus('mandatory')
health_module_backplane_data = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleBackplaneData.setStatus('mandatory')
health_module_backplane_time_delta = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleBackplaneTimeDelta.setStatus('mandatory')
health_module_cam_data = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 8), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleCamData.setStatus('mandatory')
health_module_cam_time_delta = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleCamTimeDelta.setStatus('mandatory')
health_module_cam_num_installed = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleCamNumInstalled.setStatus('mandatory')
health_module_cam_configured = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleCamConfigured.setStatus('mandatory')
health_module_cam_avail = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleCamAvail.setStatus('mandatory')
health_module_cam_avail_non_intern = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleCamAvailNonIntern.setStatus('mandatory')
health_module_cam_free = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 14), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleCamFree.setStatus('mandatory')
health_module_vcc_data = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 15), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleVccData.setStatus('mandatory')
health_module_vcc_time_delta = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 2, 1, 1, 16), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthModuleVccTimeDelta.setStatus('mandatory')
health_sampling_interval = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 5, 1), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
healthSamplingInterval.setStatus('mandatory')
health_sampling_reset = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 5, 2), integer32()).setMaxAccess('writeonly')
if mibBuilder.loadTexts:
healthSamplingReset.setStatus('mandatory')
health_thresh_device_rx_limit = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
healthThreshDeviceRxLimit.setStatus('mandatory')
health_thresh_device_rx_tx_limit = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
healthThreshDeviceRxTxLimit.setStatus('mandatory')
health_thresh_device_backplane_limit = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
healthThreshDeviceBackplaneLimit.setStatus('mandatory')
health_thresh_device_cam_limit = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
healthThreshDeviceCamLimit.setStatus('mandatory')
health_thresh_device_memory_limit = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
healthThreshDeviceMemoryLimit.setStatus('mandatory')
health_thresh_device_cpu_limit = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
healthThreshDeviceCpuLimit.setStatus('mandatory')
health_thresh_device_summary = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 7), octet_string().subtype(subtypeSpec=value_size_constraint(27, 27)).setFixedLength(27)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthThreshDeviceSummary.setStatus('mandatory')
health_thresh_module_summary_table = mib_table((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 8))
if mibBuilder.loadTexts:
healthThreshModuleSummaryTable.setStatus('mandatory')
health_thresh_module_summary_entry = mib_table_row((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 8, 1)).setIndexNames((0, 'XYLAN-HEALTH-MIB', 'healthThreshModuleSummarySlot'))
if mibBuilder.loadTexts:
healthThreshModuleSummaryEntry.setStatus('mandatory')
health_thresh_module_summary_slot = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 8, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 9))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthThreshModuleSummarySlot.setStatus('mandatory')
health_thresh_module_summary_data = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 8, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(16, 16)).setFixedLength(16)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthThreshModuleSummaryData.setStatus('mandatory')
health_thresh_dev_trap_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 9), octet_string().subtype(subtypeSpec=value_size_constraint(0, 21)))
if mibBuilder.loadTexts:
healthThreshDevTrapData.setStatus('mandatory')
health_thresh_mod_trap_count = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 10), integer32())
if mibBuilder.loadTexts:
healthThreshModTrapCount.setStatus('mandatory')
health_thresh_mod_trap_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 11), octet_string().subtype(subtypeSpec=value_size_constraint(0, 128)))
if mibBuilder.loadTexts:
healthThreshModTrapData.setStatus('mandatory')
health_thresh_port_summary_table = mib_table((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 12))
if mibBuilder.loadTexts:
healthThreshPortSummaryTable.setStatus('mandatory')
health_thresh_port_summary_entry = mib_table_row((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 12, 1)).setIndexNames((0, 'XYLAN-HEALTH-MIB', 'healthThreshPortSummarySlot'), (0, 'XYLAN-HEALTH-MIB', 'healthThreshPortSummaryIF'))
if mibBuilder.loadTexts:
healthThreshPortSummaryEntry.setStatus('mandatory')
health_thresh_port_summary_slot = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 12, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 9))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthThreshPortSummarySlot.setStatus('mandatory')
health_thresh_port_summary_if = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 12, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 9))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthThreshPortSummaryIF.setStatus('mandatory')
health_thresh_port_summary_data = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 12, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(13, 13)).setFixedLength(13)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthThreshPortSummaryData.setStatus('mandatory')
health_thresh_port_trap_slot = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 13), integer32())
if mibBuilder.loadTexts:
healthThreshPortTrapSlot.setStatus('mandatory')
health_thresh_port_trap_count = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 14), integer32())
if mibBuilder.loadTexts:
healthThreshPortTrapCount.setStatus('mandatory')
health_thresh_port_trap_data = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 15), octet_string().subtype(subtypeSpec=value_size_constraint(0, 255)))
if mibBuilder.loadTexts:
healthThreshPortTrapData.setStatus('mandatory')
health_thresh_device_vcc_limit = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
healthThreshDeviceVccLimit.setStatus('mandatory')
health_thresh_device_temperature_limit = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
healthThreshDeviceTemperatureLimit.setStatus('mandatory')
health_thresh_device_vp_limit = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 6, 18), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
healthThreshDeviceVpLimit.setStatus('mandatory')
health_port_max = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 1), octet_string().subtype(subtypeSpec=value_size_constraint(21, 21)).setFixedLength(21)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortMax.setStatus('mandatory')
class Healthportupdownstatus(Integer32):
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('healthPortDn', 1), ('healthPortUp', 2))
health_port_table = mib_table((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2))
if mibBuilder.loadTexts:
healthPortTable.setStatus('mandatory')
health_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1)).setIndexNames((0, 'XYLAN-HEALTH-MIB', 'healthPortSlot'), (0, 'XYLAN-HEALTH-MIB', 'healthPortIF'))
if mibBuilder.loadTexts:
healthPortEntry.setStatus('mandatory')
health_port_slot = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 9))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortSlot.setStatus('mandatory')
health_port_if = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortIF.setStatus('mandatory')
health_port_up_dn = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 3), health_port_up_down_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortUpDn.setStatus('mandatory')
health_port_rx_data = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortRxData.setStatus('mandatory')
health_port_rx_time_delta = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortRxTimeDelta.setStatus('mandatory')
health_port_rx_tx_data = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 6), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortRxTxData.setStatus('mandatory')
health_port_rx_tx_time_delta = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortRxTxTimeDelta.setStatus('mandatory')
health_port_backplane_data = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 8), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortBackplaneData.setStatus('mandatory')
health_port_backplane_time_delta = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortBackplaneTimeDelta.setStatus('mandatory')
health_port_vcc_data = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 10), octet_string().subtype(subtypeSpec=value_size_constraint(4, 4)).setFixedLength(4)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortVccData.setStatus('mandatory')
health_port_vcc_time_delta = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 3, 2, 1, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
healthPortVccTimeDelta.setStatus('mandatory')
health2_device_rx_latest = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceRxLatest.setStatus('mandatory')
health2_device_rx1_min_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceRx1MinAvg.setStatus('mandatory')
health2_device_rx1_hr_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceRx1HrAvg.setStatus('mandatory')
health2_device_rx1_hr_max = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceRx1HrMax.setStatus('mandatory')
health2_device_rx_tx_latest = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceRxTxLatest.setStatus('mandatory')
health2_device_rx_tx1_min_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceRxTx1MinAvg.setStatus('mandatory')
health2_device_rx_tx1_hr_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceRxTx1HrAvg.setStatus('mandatory')
health2_device_rx_tx1_hr_max = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceRxTx1HrMax.setStatus('mandatory')
health2_device_backplane_latest = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceBackplaneLatest.setStatus('mandatory')
health2_device_backplane1_min_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceBackplane1MinAvg.setStatus('mandatory')
health2_device_backplane1_hr_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceBackplane1HrAvg.setStatus('mandatory')
health2_device_backplane1_hr_max = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceBackplane1HrMax.setStatus('mandatory')
health2_device_mpm_cam_latest = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceMpmCamLatest.setStatus('mandatory')
health2_device_mpm_cam1_min_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceMpmCam1MinAvg.setStatus('mandatory')
health2_device_mpm_cam1_hr_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 15), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceMpmCam1HrAvg.setStatus('mandatory')
health2_device_mpm_cam1_hr_max = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceMpmCam1HrMax.setStatus('mandatory')
health2_device_hre_cam_latest = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceHreCamLatest.setStatus('mandatory')
health2_device_hre_cam1_min_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 18), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceHreCam1MinAvg.setStatus('mandatory')
health2_device_hre_cam1_hr_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 19), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceHreCam1HrAvg.setStatus('mandatory')
health2_device_hre_cam1_hr_max = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceHreCam1HrMax.setStatus('mandatory')
health2_device_memory_latest = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 21), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceMemoryLatest.setStatus('mandatory')
health2_device_memory1_min_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 22), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceMemory1MinAvg.setStatus('mandatory')
health2_device_memory1_hr_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 23), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceMemory1HrAvg.setStatus('mandatory')
health2_device_memory1_hr_max = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 24), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceMemory1HrMax.setStatus('mandatory')
health2_device_num_cpus = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 25), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceNumCpus.setStatus('mandatory')
health2_device_cpu_table = mib_table((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26))
if mibBuilder.loadTexts:
health2DeviceCpuTable.setStatus('mandatory')
health2_device_cpu_entry = mib_table_row((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1)).setIndexNames((0, 'XYLAN-HEALTH-MIB', 'health2DeviceCpuNum'))
if mibBuilder.loadTexts:
health2DeviceCpuEntry.setStatus('mandatory')
health2_device_cpu_num = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceCpuNum.setStatus('mandatory')
health2_device_cpu_latest = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceCpuLatest.setStatus('mandatory')
health2_device_cpu1_min_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceCpu1MinAvg.setStatus('mandatory')
health2_device_cpu1_hr_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceCpu1HrAvg.setStatus('mandatory')
health2_device_cpu1_hr_max = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 26, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceCpu1HrMax.setStatus('mandatory')
health2_device_vcc_latest = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 27), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceVccLatest.setStatus('mandatory')
health2_device_vcc1_min_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 28), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceVcc1MinAvg.setStatus('mandatory')
health2_device_vcc1_hr_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 29), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceVcc1HrAvg.setStatus('mandatory')
health2_device_vcc1_hr_max = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 30), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceVcc1HrMax.setStatus('mandatory')
health2_device_temperature_latest = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 31), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceTemperatureLatest.setStatus('mandatory')
health2_device_temperature1_min_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 32), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceTemperature1MinAvg.setStatus('mandatory')
health2_device_temperature1_hr_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 33), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceTemperature1HrAvg.setStatus('mandatory')
health2_device_temperature1_hr_max = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 34), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceTemperature1HrMax.setStatus('mandatory')
health2_device_vp_latest = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 35), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceVpLatest.setStatus('mandatory')
health2_device_vp1_min_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 36), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceVp1MinAvg.setStatus('mandatory')
health2_device_vp1_hr_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 37), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceVp1HrAvg.setStatus('mandatory')
health2_device_vp1_hr_max = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 38), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceVp1HrMax.setStatus('mandatory')
health2_device_hre_collision_latest = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 39), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceHreCollisionLatest.setStatus('mandatory')
health2_device_hre_collision1_min_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 40), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceHreCollision1MinAvg.setStatus('mandatory')
health2_device_hre_collision1_hr_avg = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 41), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceHreCollision1HrAvg.setStatus('mandatory')
health2_device_hre_collision1_hr_max = mib_scalar((1, 3, 6, 1, 4, 1, 800, 2, 18, 7, 42), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2DeviceHreCollision1HrMax.setStatus('mandatory')
health2_module_table = mib_table((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1))
if mibBuilder.loadTexts:
health2ModuleTable.setStatus('mandatory')
health2_module_entry = mib_table_row((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1)).setIndexNames((0, 'XYLAN-HEALTH-MIB', 'health2ModuleSlot'))
if mibBuilder.loadTexts:
health2ModuleEntry.setStatus('mandatory')
health2_module_slot = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleSlot.setStatus('mandatory')
health2_module_rx_latest = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleRxLatest.setStatus('mandatory')
health2_module_rx1_min_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleRx1MinAvg.setStatus('mandatory')
health2_module_rx1_hr_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleRx1HrAvg.setStatus('mandatory')
health2_module_rx1_hr_max = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleRx1HrMax.setStatus('mandatory')
health2_module_rx_tx_latest = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleRxTxLatest.setStatus('mandatory')
health2_module_rx_tx1_min_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleRxTx1MinAvg.setStatus('mandatory')
health2_module_rx_tx1_hr_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleRxTx1HrAvg.setStatus('mandatory')
health2_module_rx_tx1_hr_max = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleRxTx1HrMax.setStatus('mandatory')
health2_module_backplane_latest = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleBackplaneLatest.setStatus('mandatory')
health2_module_backplane1_min_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleBackplane1MinAvg.setStatus('mandatory')
health2_module_backplane1_hr_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleBackplane1HrAvg.setStatus('mandatory')
health2_module_backplane1_hr_max = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleBackplane1HrMax.setStatus('mandatory')
health2_module_cam_latest = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleCamLatest.setStatus('mandatory')
health2_module_cam1_min_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleCam1MinAvg.setStatus('mandatory')
health2_module_cam1_hr_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleCam1HrAvg.setStatus('mandatory')
health2_module_cam1_hr_max = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleCam1HrMax.setStatus('mandatory')
health2_module_vcc_latest = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleVccLatest.setStatus('mandatory')
health2_module_vcc1_min_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleVcc1MinAvg.setStatus('mandatory')
health2_module_vcc1_hr_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleVcc1HrAvg.setStatus('mandatory')
health2_module_vcc1_hr_max = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 8, 1, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2ModuleVcc1HrMax.setStatus('mandatory')
health2_port_table = mib_table((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1))
if mibBuilder.loadTexts:
health2PortTable.setStatus('mandatory')
health2_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1)).setIndexNames((0, 'XYLAN-HEALTH-MIB', 'health2PortSlot'), (0, 'XYLAN-HEALTH-MIB', 'health2PortIF'))
if mibBuilder.loadTexts:
health2PortEntry.setStatus('mandatory')
health2_port_slot = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 9))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortSlot.setStatus('mandatory')
health2_port_if = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortIF.setStatus('mandatory')
health2_port_rx_latest = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortRxLatest.setStatus('mandatory')
health2_port_rx1_min_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortRx1MinAvg.setStatus('mandatory')
health2_port_rx1_hr_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortRx1HrAvg.setStatus('mandatory')
health2_port_rx1_hr_max = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortRx1HrMax.setStatus('mandatory')
health2_port_rx_tx_latest = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortRxTxLatest.setStatus('mandatory')
health2_port_rx_tx1_min_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortRxTx1MinAvg.setStatus('mandatory')
health2_port_rx_tx1_hr_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortRxTx1HrAvg.setStatus('mandatory')
health2_port_rx_tx1_hr_max = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortRxTx1HrMax.setStatus('mandatory')
health2_port_backplane_latest = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortBackplaneLatest.setStatus('mandatory')
health2_port_backplane1_min_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortBackplane1MinAvg.setStatus('mandatory')
health2_port_backplane1_hr_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortBackplane1HrAvg.setStatus('mandatory')
health2_port_backplane1_hr_max = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortBackplane1HrMax.setStatus('mandatory')
health2_port_vcc_latest = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortVccLatest.setStatus('mandatory')
health2_port_vcc1_min_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortVcc1MinAvg.setStatus('mandatory')
health2_port_vcc1_hr_avg = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortVcc1HrAvg.setStatus('mandatory')
health2_port_vcc1_hr_max = mib_table_column((1, 3, 6, 1, 4, 1, 800, 2, 18, 9, 1, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
health2PortVcc1HrMax.setStatus('mandatory')
mibBuilder.exportSymbols('XYLAN-HEALTH-MIB', healthThreshPortSummaryIF=healthThreshPortSummaryIF, healthDeviceTemp=healthDeviceTemp, healthDeviceMpmRxOverrunCount=healthDeviceMpmRxOverrunCount, healthThreshDeviceRxLimit=healthThreshDeviceRxLimit, healthDeviceRxTxData=healthDeviceRxTxData, healthPortRxTxTimeDelta=healthPortRxTxTimeDelta, health2PortSlot=health2PortSlot, health2DeviceHreCamLatest=health2DeviceHreCamLatest, health2DeviceBackplaneLatest=health2DeviceBackplaneLatest, health2ModuleVcc1MinAvg=health2ModuleVcc1MinAvg, healthPortRxData=healthPortRxData, health2DeviceCpu1MinAvg=health2DeviceCpu1MinAvg, health2DeviceHreCam1HrMax=health2DeviceHreCam1HrMax, health2ModuleRx1HrMax=health2ModuleRx1HrMax, healthThreshModTrapCount=healthThreshModTrapCount, healthPortVccTimeDelta=healthPortVccTimeDelta, health2ModuleSlot=health2ModuleSlot, healthDeviceHreCamTotal=healthDeviceHreCamTotal, healthDeviceTemperatureTimeDelta=healthDeviceTemperatureTimeDelta, health2PortBackplaneLatest=health2PortBackplaneLatest, health2DeviceVcc1HrMax=health2DeviceVcc1HrMax, health2DeviceHreCollision1HrMax=health2DeviceHreCollision1HrMax, healthPortIF=healthPortIF, health2DeviceCpu1HrMax=health2DeviceCpu1HrMax, healthThreshDeviceBackplaneLimit=healthThreshDeviceBackplaneLimit, healthDeviceVpTimeDelta=healthDeviceVpTimeDelta, health2DeviceHreCollision1MinAvg=health2DeviceHreCollision1MinAvg, health2DeviceInfo=health2DeviceInfo, healthThreshDeviceVpLimit=healthThreshDeviceVpLimit, healthDeviceVccData=healthDeviceVccData, healthDeviceTemperatureData=healthDeviceTemperatureData, healthPortEntry=healthPortEntry, healthThreshPortSummarySlot=healthThreshPortSummarySlot, health2PortRxLatest=health2PortRxLatest, healthThreshDeviceSummary=healthThreshDeviceSummary, healthDeviceCpuTimeDelta=healthDeviceCpuTimeDelta, health2DeviceRxTx1HrAvg=health2DeviceRxTx1HrAvg, healthModuleRxData=healthModuleRxData, health2DeviceCpuNum=health2DeviceCpuNum, healthDeviceMpmCamFree=healthDeviceMpmCamFree, healthThreshDeviceMemoryLimit=healthThreshDeviceMemoryLimit, health2ModuleCam1HrMax=health2ModuleCam1HrMax, health2DeviceTemperature1HrAvg=health2DeviceTemperature1HrAvg, health2ModuleCam1MinAvg=health2ModuleCam1MinAvg, healthThreshPortTrapCount=healthThreshPortTrapCount, health2ModuleInfo=health2ModuleInfo, health2ModuleBackplaneLatest=health2ModuleBackplaneLatest, health2PortRxTxLatest=health2PortRxTxLatest, health2ModuleRx1HrAvg=health2ModuleRx1HrAvg, HealthPortUpDownStatus=HealthPortUpDownStatus, healthDeviceRxTimeDelta=healthDeviceRxTimeDelta, health2DeviceRx1MinAvg=health2DeviceRx1MinAvg, health2DeviceHreCam1MinAvg=health2DeviceHreCam1MinAvg, healthPortSlot=healthPortSlot, health2ModuleBackplane1MinAvg=health2ModuleBackplane1MinAvg, healthControlInfo=healthControlInfo, healthThreshDeviceVccLimit=healthThreshDeviceVccLimit, health2DeviceVp1HrMax=health2DeviceVp1HrMax, health2ModuleCam1HrAvg=health2ModuleCam1HrAvg, healthThreshModuleSummaryEntry=healthThreshModuleSummaryEntry, health2PortBackplane1HrAvg=health2PortBackplane1HrAvg, health2PortVcc1HrAvg=health2PortVcc1HrAvg, health2ModuleEntry=health2ModuleEntry, health2PortRx1MinAvg=health2PortRx1MinAvg, healthModuleCamConfigured=healthModuleCamConfigured, health2DeviceNumCpus=health2DeviceNumCpus, healthDeviceBackplaneTimeDelta=healthDeviceBackplaneTimeDelta, health2ModuleRxTx1HrAvg=health2ModuleRxTx1HrAvg, healthDeviceBackplaneData=healthDeviceBackplaneData, healthPortRxTxData=healthPortRxTxData, healthDeviceMemoryTimeDelta=healthDeviceMemoryTimeDelta, healthDeviceHreCamFree=healthDeviceHreCamFree, healthThreshPortSummaryEntry=healthThreshPortSummaryEntry, health2DeviceMpmCam1HrAvg=health2DeviceMpmCam1HrAvg, health2DeviceRx1HrMax=health2DeviceRx1HrMax, healthModuleInfo=healthModuleInfo, health2ModuleBackplane1HrAvg=health2ModuleBackplane1HrAvg, health2ModuleCamLatest=health2ModuleCamLatest, healthDeviceRxTxTimeDelta=healthDeviceRxTxTimeDelta, health2DeviceRxLatest=health2DeviceRxLatest, health2PortEntry=health2PortEntry, healthModuleRxTxData=healthModuleRxTxData, healthModuleVccTimeDelta=healthModuleVccTimeDelta, health2DeviceMpmCam1HrMax=health2DeviceMpmCam1HrMax, healthDeviceVccTimeDelta=healthDeviceVccTimeDelta, health2DeviceMemoryLatest=health2DeviceMemoryLatest, health2DeviceMpmCam1MinAvg=health2DeviceMpmCam1MinAvg, health2ModuleRxTx1HrMax=health2ModuleRxTx1HrMax, health2DeviceVpLatest=health2DeviceVpLatest, healthThreshDeviceCamLimit=healthThreshDeviceCamLimit, healthDeviceRxData=healthDeviceRxData, healthThreshInfo=healthThreshInfo, healthModuleVccData=healthModuleVccData, health2DeviceCpuTable=health2DeviceCpuTable, healthDeviceIPXRouteCacheFlushCount=healthDeviceIPXRouteCacheFlushCount, health2PortRx1HrMax=health2PortRx1HrMax, healthPortUpDn=healthPortUpDn, healthPortBackplaneData=healthPortBackplaneData, health2DeviceCpuEntry=health2DeviceCpuEntry, healthDeviceMemoryFree=healthDeviceMemoryFree, healthPortRxTimeDelta=healthPortRxTimeDelta, healthModuleRxTxTimeDelta=healthModuleRxTxTimeDelta, health2ModuleRxTxLatest=health2ModuleRxTxLatest, healthSamplingInterval=healthSamplingInterval, healthPortVccData=healthPortVccData, healthModuleCamData=healthModuleCamData, health2DeviceVccLatest=health2DeviceVccLatest, healthThreshDeviceCpuLimit=healthThreshDeviceCpuLimit, health2DeviceTemperature1HrMax=health2DeviceTemperature1HrMax, healthDeviceMpmTxOverrunCount=healthDeviceMpmTxOverrunCount, health2DeviceBackplane1HrAvg=health2DeviceBackplane1HrAvg, health2PortBackplane1HrMax=health2PortBackplane1HrMax, health2PortVcc1MinAvg=health2PortVcc1MinAvg, health2PortInfo=health2PortInfo, healthPortBackplaneTimeDelta=healthPortBackplaneTimeDelta, health2PortRx1HrAvg=health2PortRx1HrAvg, health2PortTable=health2PortTable, healthThreshModTrapData=healthThreshModTrapData, healthModuleCamNumInstalled=healthModuleCamNumInstalled, health2DeviceMpmCamLatest=health2DeviceMpmCamLatest, health2DeviceHreCam1HrAvg=health2DeviceHreCam1HrAvg, healthDeviceIPRouteCacheFlushCount=healthDeviceIPRouteCacheFlushCount, healthDeviceMemoryTotal=healthDeviceMemoryTotal, healthDeviceHreCollisionTotal=healthDeviceHreCollisionTotal, healthModuleBackplaneTimeDelta=healthModuleBackplaneTimeDelta, healthPortMax=healthPortMax, health2ModuleVcc1HrMax=health2ModuleVcc1HrMax, health2ModuleBackplane1HrMax=health2ModuleBackplane1HrMax, health2PortBackplane1MinAvg=health2PortBackplane1MinAvg, health2DeviceTemperature1MinAvg=health2DeviceTemperature1MinAvg, health2DeviceVcc1MinAvg=health2DeviceVcc1MinAvg, healthThreshModuleSummaryData=healthThreshModuleSummaryData, healthThreshModuleSummarySlot=healthThreshModuleSummarySlot, health2ModuleRxTx1MinAvg=health2ModuleRxTx1MinAvg, health2DeviceBackplane1HrMax=health2DeviceBackplane1HrMax, healthDeviceNumCpus=healthDeviceNumCpus, healthDeviceInfo=healthDeviceInfo, healthDeviceMemoryData=healthDeviceMemoryData, health2DeviceHreCollision1HrAvg=health2DeviceHreCollision1HrAvg, healthModuleCamFree=healthModuleCamFree, healthModuleRxTimeDelta=healthModuleRxTimeDelta, healthDeviceHreCollisionFree=healthDeviceHreCollisionFree, healthModuleTable=healthModuleTable, healthPortInfo=healthPortInfo, healthThreshPortSummaryData=healthThreshPortSummaryData, health2DeviceBackplane1MinAvg=health2DeviceBackplane1MinAvg, healthThreshPortTrapData=healthThreshPortTrapData, health2PortVccLatest=health2PortVccLatest, healthThreshModuleSummaryTable=healthThreshModuleSummaryTable, healthThreshPortTrapSlot=healthThreshPortTrapSlot, healthGroupInfo=healthGroupInfo, health2PortRxTx1MinAvg=health2PortRxTx1MinAvg, healthModuleBackplaneData=healthModuleBackplaneData, health2DeviceTemperatureLatest=health2DeviceTemperatureLatest, healthModuleCamAvailNonIntern=healthModuleCamAvailNonIntern, healthSamplingReset=healthSamplingReset, health2PortIF=health2PortIF, health2PortVcc1HrMax=health2PortVcc1HrMax, health2DeviceVp1MinAvg=health2DeviceVp1MinAvg, healthDeviceVpData=healthDeviceVpData, health2DeviceMemory1HrMax=health2DeviceMemory1HrMax, health2DeviceCpu1HrAvg=health2DeviceCpu1HrAvg, healthModuleCamTimeDelta=healthModuleCamTimeDelta, health2DeviceCpuLatest=health2DeviceCpuLatest, health2DeviceHreCollisionLatest=health2DeviceHreCollisionLatest, healthDeviceMpmCamTotal=healthDeviceMpmCamTotal, health2ModuleRx1MinAvg=health2ModuleRx1MinAvg, healthDeviceCamData=healthDeviceCamData, health2DeviceVp1HrAvg=health2DeviceVp1HrAvg, healthModuleEntry=healthModuleEntry, healthPortTable=healthPortTable, health2DeviceRxTx1MinAvg=health2DeviceRxTx1MinAvg, health2ModuleVcc1HrAvg=health2ModuleVcc1HrAvg, healthDeviceCpuData=healthDeviceCpuData, health2DeviceVcc1HrAvg=health2DeviceVcc1HrAvg, health2PortRxTx1HrAvg=health2PortRxTx1HrAvg, health2DeviceRx1HrAvg=health2DeviceRx1HrAvg, healthThreshDeviceTemperatureLimit=healthThreshDeviceTemperatureLimit, health2ModuleVccLatest=health2ModuleVccLatest, healthModuleCamAvail=healthModuleCamAvail, health2DeviceMemory1MinAvg=health2DeviceMemory1MinAvg, healthThreshDeviceRxTxLimit=healthThreshDeviceRxTxLimit, health2DeviceMemory1HrAvg=health2DeviceMemory1HrAvg, health2PortRxTx1HrMax=health2PortRxTx1HrMax, healthThreshDevTrapData=healthThreshDevTrapData, healthDeviceCamTimeDelta=healthDeviceCamTimeDelta, health2DeviceRxTxLatest=health2DeviceRxTxLatest, health2DeviceRxTx1HrMax=health2DeviceRxTx1HrMax, health2ModuleRxLatest=health2ModuleRxLatest, health2ModuleTable=health2ModuleTable, healthThreshPortSummaryTable=healthThreshPortSummaryTable, healthModuleSlot=healthModuleSlot) |
expected_output = {
'vll': {
'MY-UNTAGGED-VLL': {
'vcid': 3566,
'vll_index': 37,
'local': {
'type': 'untagged',
'interface': 'ethernet2/8',
'state': 'Up',
'mct_state': 'None',
'ifl_id': '--',
'vc_type': 'tag',
'mtu': 9190,
'cos': '--',
'extended_counters': True
},
'peer': {
'ip': '192.168.1.2',
'state': 'UP',
'vc_type': 'tag',
'mtu': 9190,
'local_label': 851974,
'remote_label': 852059,
'local_group_id': 0,
'remote_group_id': 0,
'tunnel_lsp': {
'name': 'my_untagged-lsp',
'tunnel_interface': 'tnl32'
},
'lsps_assigned': 'No LSPs assigned'
}
}
}
}
| expected_output = {'vll': {'MY-UNTAGGED-VLL': {'vcid': 3566, 'vll_index': 37, 'local': {'type': 'untagged', 'interface': 'ethernet2/8', 'state': 'Up', 'mct_state': 'None', 'ifl_id': '--', 'vc_type': 'tag', 'mtu': 9190, 'cos': '--', 'extended_counters': True}, 'peer': {'ip': '192.168.1.2', 'state': 'UP', 'vc_type': 'tag', 'mtu': 9190, 'local_label': 851974, 'remote_label': 852059, 'local_group_id': 0, 'remote_group_id': 0, 'tunnel_lsp': {'name': 'my_untagged-lsp', 'tunnel_interface': 'tnl32'}, 'lsps_assigned': 'No LSPs assigned'}}}} |
class User:
def __init__(self, id = None, email = None, name = None, surname = None, password = None, wallet = 0.00, disability = False, active_account = False, id_user_category = 2): # id_user_category = 2 -> Student
self._id = id
self._email = email
self._name = name
self._surname = surname
self._password = password
self._wallet = wallet
self._disability = disability
self._active_account = active_account
self._id_user_category = id_user_category
def set_id(self, id):
self._id = id
# def set_email(self, email):
# self._email = email
# def set_name(self, name):
# self._name = name
# def set_surname(self, surname):
# self._surname = surname
def set_password(self, password):
self._password = password
def set_wallet(self, wallet):
self._wallet = wallet
def set_disability(self, disability):
self._disability = disability
def set_active_account(self, active_account):
self._active_account = active_account
# def set_id_user_category(self, id_user_category):
# self._id_user_category = id_user_category
def get_id(self):
return self._id
def get_email(self):
return self._email
def get_name(self):
return self._name
def get_surname(self):
return self._surname
def get_password(self):
return self._password
def get_wallet(self):
return self._wallet
def get_disability(self):
return self._disability
def get_active_account(self):
return self._active_account
def get_id_user_category(self):
return self._id_user_category
def __eq__(self, other):
if isinstance(other, User):
return self._id == other._id
return NotImplemented
def __str__(self):
user_info = (f"User Id: {self._id}, email: {self._email}, name: {self._name}, surname: {self._surname}, "
f"password: {self._password}, wallet: {self._wallet}, disability: {self._disability}, active accont: {self._active_account}, "
f"id_user_category: {self._id_user_category}")
return user_info
| class User:
def __init__(self, id=None, email=None, name=None, surname=None, password=None, wallet=0.0, disability=False, active_account=False, id_user_category=2):
self._id = id
self._email = email
self._name = name
self._surname = surname
self._password = password
self._wallet = wallet
self._disability = disability
self._active_account = active_account
self._id_user_category = id_user_category
def set_id(self, id):
self._id = id
def set_password(self, password):
self._password = password
def set_wallet(self, wallet):
self._wallet = wallet
def set_disability(self, disability):
self._disability = disability
def set_active_account(self, active_account):
self._active_account = active_account
def get_id(self):
return self._id
def get_email(self):
return self._email
def get_name(self):
return self._name
def get_surname(self):
return self._surname
def get_password(self):
return self._password
def get_wallet(self):
return self._wallet
def get_disability(self):
return self._disability
def get_active_account(self):
return self._active_account
def get_id_user_category(self):
return self._id_user_category
def __eq__(self, other):
if isinstance(other, User):
return self._id == other._id
return NotImplemented
def __str__(self):
user_info = f'User Id: {self._id}, email: {self._email}, name: {self._name}, surname: {self._surname}, password: {self._password}, wallet: {self._wallet}, disability: {self._disability}, active accont: {self._active_account}, id_user_category: {self._id_user_category}'
return user_info |
# 487. Max Consecutive Ones II
# Runtime: 420 ms, faster than 12.98% of Python3 online submissions for Max Consecutive Ones II.
# Memory Usage: 14.5 MB, less than 11.06% of Python3 online submissions for Max Consecutive Ones II.
class Solution:
_FLIP_COUNT = 1
# Sliding Window
def findMaxConsecutiveOnes(self, nums: list[int]) -> int:
assert Solution._FLIP_COUNT > 0
max_count = 0
left = 0
zero_idx = []
for right in range(len(nums)):
if nums[right] == 0:
zero_idx.append(right)
if len(zero_idx) > Solution._FLIP_COUNT:
left = zero_idx[0] + 1
del zero_idx[0]
max_count = max(max_count, right - left + 1)
return max_count | class Solution:
_flip_count = 1
def find_max_consecutive_ones(self, nums: list[int]) -> int:
assert Solution._FLIP_COUNT > 0
max_count = 0
left = 0
zero_idx = []
for right in range(len(nums)):
if nums[right] == 0:
zero_idx.append(right)
if len(zero_idx) > Solution._FLIP_COUNT:
left = zero_idx[0] + 1
del zero_idx[0]
max_count = max(max_count, right - left + 1)
return max_count |
x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1
ans = []
for i in range(2):
dx, dy = -dy, dx
x2 += dx
y2 += dy
ans.append(x2)
ans.append(y2)
print(*ans)
| (x1, y1, x2, y2) = map(int, input().split())
dx = x2 - x1
dy = y2 - y1
ans = []
for i in range(2):
(dx, dy) = (-dy, dx)
x2 += dx
y2 += dy
ans.append(x2)
ans.append(y2)
print(*ans) |
# O(NlogM) / O(1)
class Solution:
def shipWithinDays(self, weights: List[int], D: int) -> int:
def count(t):
ans, cur = 1, 0
for w in weights:
cur += w
if cur > t:
ans += 1
cur = w
return ans
l, r = max(weights), sum(weights) + 1
while l < r:
m = l + (r - l) // 2
if count(m) <= D:
r = m
else:
l = m + 1
return l | class Solution:
def ship_within_days(self, weights: List[int], D: int) -> int:
def count(t):
(ans, cur) = (1, 0)
for w in weights:
cur += w
if cur > t:
ans += 1
cur = w
return ans
(l, r) = (max(weights), sum(weights) + 1)
while l < r:
m = l + (r - l) // 2
if count(m) <= D:
r = m
else:
l = m + 1
return l |
x=oi()
q=x
z(q)
| x = oi()
q = x
z(q) |
class Output:
def __init__(self,
race_nr,
winner,
loser,
):
self.race_nr = race_nr
self.winner = winner
self.loser = loser
def get_output_template(self):
if self.winner == 'O' or 'X':
results = f'\nRace {self.race_nr}: car {self.winner} - WIN, car {self.loser} - LOSE\n'
return results
else:
results = f'\nRace {self.race_nr}: was a tie\n'
return results
def score_save(self):
with open("race_results.txt", "w", encoding='utf-8') as f:
f.write(self.get_output_template())
| class Output:
def __init__(self, race_nr, winner, loser):
self.race_nr = race_nr
self.winner = winner
self.loser = loser
def get_output_template(self):
if self.winner == 'O' or 'X':
results = f'\nRace {self.race_nr}: car {self.winner} - WIN, car {self.loser} - LOSE\n'
return results
else:
results = f'\nRace {self.race_nr}: was a tie\n'
return results
def score_save(self):
with open('race_results.txt', 'w', encoding='utf-8') as f:
f.write(self.get_output_template()) |
#-*- coding:utf-8 -*-
# <component_name>.<environment>[.<group_number>]
HostGroups = {
'web.dev': ['web.dev.example.com'],
'ap.dev': ['ap.dev.example.com'],
'web.prod.1': ['web001.example.com'],
'web.prod.2': ['web{:03d}.example.com'.format(n) for n in range(2,4)],
'web.prod.3': ['web{:03d}.example.com'.format(n) for n in range(4,6)],
'ap.prod.1': ['ap001.example.com'],
'ap.prod.2': ['ap{:03d}.example.com'.format(n) for n in range(2,4)],
'ap.prod.3': ['ap{:03d}.example.com'.format(n) for n in range(4,6)]
}
def get_environment_list():
return ['dev', 'prod']
def get_host_groups():
global HostGroups
return HostGroups | host_groups = {'web.dev': ['web.dev.example.com'], 'ap.dev': ['ap.dev.example.com'], 'web.prod.1': ['web001.example.com'], 'web.prod.2': ['web{:03d}.example.com'.format(n) for n in range(2, 4)], 'web.prod.3': ['web{:03d}.example.com'.format(n) for n in range(4, 6)], 'ap.prod.1': ['ap001.example.com'], 'ap.prod.2': ['ap{:03d}.example.com'.format(n) for n in range(2, 4)], 'ap.prod.3': ['ap{:03d}.example.com'.format(n) for n in range(4, 6)]}
def get_environment_list():
return ['dev', 'prod']
def get_host_groups():
global HostGroups
return HostGroups |
class NewsValidator:
def __init__(self, config):
self._config = config
def validate_news(self, news):
news = news.as_dict()
assert self.check_languages(news), "Wrong language!"
assert self.check_null_values(news), "Null values!"
assert self.check_description_length(news), "Short description!"
def check_null_values(self, news):
news_values = list(news.values())
return all(news_values)
def check_description_length(self, news):
description_length = self._config.get("description_length")
return len(news.get("description")) >= description_length
def check_languages(self, news):
languages = self._config.get("languages")
lang = news.get("language")
return any(
filter(lambda x: x == lang, languages)
)
| class Newsvalidator:
def __init__(self, config):
self._config = config
def validate_news(self, news):
news = news.as_dict()
assert self.check_languages(news), 'Wrong language!'
assert self.check_null_values(news), 'Null values!'
assert self.check_description_length(news), 'Short description!'
def check_null_values(self, news):
news_values = list(news.values())
return all(news_values)
def check_description_length(self, news):
description_length = self._config.get('description_length')
return len(news.get('description')) >= description_length
def check_languages(self, news):
languages = self._config.get('languages')
lang = news.get('language')
return any(filter(lambda x: x == lang, languages)) |
#https://programmers.co.kr/learn/courses/30/lessons/42860
def solution(name):
answer = 0
name_length = len(name)
move = [1 if name[i]=='A' else 0 for i in range(name_length)]
for i in range(name_length):
now_str = name[i]
answer += get_move_num_alphabet(now_str, 'A')
answer += get_move_num_cursor(move)
return answer
def get_move_num_alphabet(str1, str2):
return min(abs(ord(str1) - ord(str2)), 26 - abs(ord(str1) - ord(str2)))
def get_move_num_cursor(move):
cursor_pos = 0
move_num = 0
move[cursor_pos] = 1
while sum(move) != len(move):
now_move = [move[i%len(move)] for i in range(cursor_pos, len(move)+cursor_pos)]
move_right = now_move[1:][:(len(move)-1)//2]
move_left = now_move[1:][::-1][:(len(move)-1)//2]
is_right_direction = check_direction(move_right, move_left)
if is_right_direction:
cursor_pos += 1
else:
cursor_pos -= 1
move_num += 1
move[cursor_pos] = 1
return move_num
def check_direction(right, left):
assert len(right) == len(left), "len(right) == len(left) but differnt"
right_direction = True
left_direction = False
for i in range(len(right)):
r = right[i]
l = left[i]
if r == 0 and l == 1:
return right_direction
elif r == 1 and l == 0:
return left_direction
elif r == 0 and l == 0:
for j in range(i+1, len(right)):
r_ = right[j]
l_ = left[j]
if r_ == 1 and l_ == 0:
return right_direction
elif r_ == 0 and l_ == 1:
return left_direction
return right_direction | def solution(name):
answer = 0
name_length = len(name)
move = [1 if name[i] == 'A' else 0 for i in range(name_length)]
for i in range(name_length):
now_str = name[i]
answer += get_move_num_alphabet(now_str, 'A')
answer += get_move_num_cursor(move)
return answer
def get_move_num_alphabet(str1, str2):
return min(abs(ord(str1) - ord(str2)), 26 - abs(ord(str1) - ord(str2)))
def get_move_num_cursor(move):
cursor_pos = 0
move_num = 0
move[cursor_pos] = 1
while sum(move) != len(move):
now_move = [move[i % len(move)] for i in range(cursor_pos, len(move) + cursor_pos)]
move_right = now_move[1:][:(len(move) - 1) // 2]
move_left = now_move[1:][::-1][:(len(move) - 1) // 2]
is_right_direction = check_direction(move_right, move_left)
if is_right_direction:
cursor_pos += 1
else:
cursor_pos -= 1
move_num += 1
move[cursor_pos] = 1
return move_num
def check_direction(right, left):
assert len(right) == len(left), 'len(right) == len(left) but differnt'
right_direction = True
left_direction = False
for i in range(len(right)):
r = right[i]
l = left[i]
if r == 0 and l == 1:
return right_direction
elif r == 1 and l == 0:
return left_direction
elif r == 0 and l == 0:
for j in range(i + 1, len(right)):
r_ = right[j]
l_ = left[j]
if r_ == 1 and l_ == 0:
return right_direction
elif r_ == 0 and l_ == 1:
return left_direction
return right_direction |
#code
def SelectionSort(arr,n):
for i in range(0,n):
minpos = i
for j in range(i,n):
if(arr[j]<arr[minpos]):
minpos = j
arr[i],arr[minpos] = arr[minpos],arr[i]
#or
#temp = arr[minpos]
#arr[minpos] = arr[i]
#arr[i] = temp
#driver
arr = [5,2,8,6,9,1,4]
n = len(arr)
SelectionSort(arr,n)
print("Sorted array is :")
for i in range(n):
print(arr[i],end=" ") | def selection_sort(arr, n):
for i in range(0, n):
minpos = i
for j in range(i, n):
if arr[j] < arr[minpos]:
minpos = j
(arr[i], arr[minpos]) = (arr[minpos], arr[i])
arr = [5, 2, 8, 6, 9, 1, 4]
n = len(arr)
selection_sort(arr, n)
print('Sorted array is :')
for i in range(n):
print(arr[i], end=' ') |
ES_HOST = 'localhost:9200'
ES_INDEX = 'pending-pseudocap_go'
ES_DOC_TYPE = 'gene'
API_PREFIX = 'pseudocap_go'
API_VERSION = ''
| es_host = 'localhost:9200'
es_index = 'pending-pseudocap_go'
es_doc_type = 'gene'
api_prefix = 'pseudocap_go'
api_version = '' |
# V1.43 messages
# PID advanced
# does not include feedforward data or vbat sag comp or thrust linearization
# pid_advanced = b"$M>2^\x00\x00\x00\x00x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x007\x00\xfa\x00\xd8\x0e\x00\x00\x00\x00\x01\x01\x00\n\x14H\x00H\x00H\x00\x00\x15\x1a\x00(\x14\x00\xc8\x0fd\x04\x00\xb1"
pid_advanced = b'$M>2^\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x007\x00\xfa\x00\xd8\x0e\x00\x00\x00\x00\x01\x01\x00\n\x14H\x00H\x00H\x00\x00\x15\x1a\x00(\x14\x00\xc8\x0fd\x04\x00\xb1'
# PID coefficient
pid = b"$M>\x0fp\x16D\x1f\x1aD\x1f\x1dL\x0457K(\x00\x00G"
fc_version = b"$M>\x03\x03\x01\x0c\x15\x18"
fc_version_2 = b"$M>\x03\x01\x00\x01\x15\x16"
api_version = b"$M>\x03\x01\x00\x01\x15\x16"
status_response = b"$M>\x16e}\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x1a\x04\x01\x01\x00\x004"
status_ex_response = (
b"$M>\x16\x96}\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x05\x00\x03\x00\x00\x1a\x04\x01\x01\x00\x00\xc4"
)
sensor_alignment = b"$M>\x07~\x01\x01\x00\x01\x00\x01\x01x"
# status_ex_response = (
# b'$M>\x16\x96}\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x05\x00\x03\x04\x00\x1a\x04\x00\x00\x00\x00\xc0'
# )
rc_tuning = b"$M>\x17od\x00FFFA2\x00F\x05\x00dd\x00\x00d\xce\x07\xce\x07\xce\x07\x00\xc7"
rx_tuning2 = (
b"$M>\x02l\x07\xdc\x05\x1a\x04\x00u\x03C\x08\x02\x13\xe2\x04\x00\x00\x00\x00\x00\x00(\x02\x01\x00\x00\x01\x03\x00"
)
board_info = b"$M>J\x04S405\x00\x00\x027\tSTM32F405\nCLRACINGF4\x04CLRA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x02@\x1f\x00\x00\x00\x00\r"
# MSP.ATTITUDE
attitude_response = b"$M>\x06l`\x02\xaa\xff\x0e\x00S"
# MSP.BOXNAMES
box_names_response = (
b"$M>\xfft\x0b\x01ARM;ANGLE;HORIZON;HEADFREE;FAILSAFE;HEADADJ;BEEPER;"
b"OSD DISABLE SW;BLACKBOX;FPV ANGLE MIX;BLACKBOX ERASE (>30s);CAMERA CONTROL 1;"
b"CAMERA CONTROL 2;CAMERA CONTROL 3;FLIP OVER AFTER CRASH;PREARM;VTX PIT MODE;"
b"PARALYZE;USER1;ACRO TRAINER;DISABLE VTX CONTROL;LA"
)
# MSP.BOXIDS
box_names_response = b'$M>\x16w\x00\x01\x02\x06\x1b\x07\r\x13\x1a\x1e\x1f !"#$\'-(/01U'
# MSP.FEATURE_CONFIG
feature_config_response = b'$M>\x04$\x00 D0t'
| pid_advanced = b'$M>2^\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x007\x00\xfa\x00\xd8\x0e\x00\x00\x00\x00\x01\x01\x00\n\x14H\x00H\x00H\x00\x00\x15\x1a\x00(\x14\x00\xc8\x0fd\x04\x00\xb1'
pid = b'$M>\x0fp\x16D\x1f\x1aD\x1f\x1dL\x0457K(\x00\x00G'
fc_version = b'$M>\x03\x03\x01\x0c\x15\x18'
fc_version_2 = b'$M>\x03\x01\x00\x01\x15\x16'
api_version = b'$M>\x03\x01\x00\x01\x15\x16'
status_response = b'$M>\x16e}\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x1a\x04\x01\x01\x00\x004'
status_ex_response = b'$M>\x16\x96}\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x05\x00\x03\x00\x00\x1a\x04\x01\x01\x00\x00\xc4'
sensor_alignment = b'$M>\x07~\x01\x01\x00\x01\x00\x01\x01x'
rc_tuning = b'$M>\x17od\x00FFFA2\x00F\x05\x00dd\x00\x00d\xce\x07\xce\x07\xce\x07\x00\xc7'
rx_tuning2 = b'$M>\x02l\x07\xdc\x05\x1a\x04\x00u\x03C\x08\x02\x13\xe2\x04\x00\x00\x00\x00\x00\x00(\x02\x01\x00\x00\x01\x03\x00'
board_info = b'$M>J\x04S405\x00\x00\x027\tSTM32F405\nCLRACINGF4\x04CLRA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x02@\x1f\x00\x00\x00\x00\r'
attitude_response = b'$M>\x06l`\x02\xaa\xff\x0e\x00S'
box_names_response = b'$M>\xfft\x0b\x01ARM;ANGLE;HORIZON;HEADFREE;FAILSAFE;HEADADJ;BEEPER;OSD DISABLE SW;BLACKBOX;FPV ANGLE MIX;BLACKBOX ERASE (>30s);CAMERA CONTROL 1;CAMERA CONTROL 2;CAMERA CONTROL 3;FLIP OVER AFTER CRASH;PREARM;VTX PIT MODE;PARALYZE;USER1;ACRO TRAINER;DISABLE VTX CONTROL;LA'
box_names_response = b'$M>\x16w\x00\x01\x02\x06\x1b\x07\r\x13\x1a\x1e\x1f !"#$\'-(/01U'
feature_config_response = b'$M>\x04$\x00 D0t' |
N = int(input())
swifts = [int(n) for n in input().split(' ')]
semaphores = [int(n) for n in input().split(' ')]
swift_sum = 0
semaphore_sum = 0
largest = 0
for k in range(N):
swift_sum += swifts[k]
semaphore_sum += semaphores[k]
if swift_sum == semaphore_sum:
largest = k + 1
print(largest)
| n = int(input())
swifts = [int(n) for n in input().split(' ')]
semaphores = [int(n) for n in input().split(' ')]
swift_sum = 0
semaphore_sum = 0
largest = 0
for k in range(N):
swift_sum += swifts[k]
semaphore_sum += semaphores[k]
if swift_sum == semaphore_sum:
largest = k + 1
print(largest) |
# Iterate over the enitre array. Insert counts only if != 1. Pop repeated occurances of characters.
class Solution:
def compress(self, chars: List[str]) -> int:
run = 1
prev = chars[0]
i = 1
while i<len(chars):
c = chars[i]
if c==prev:
run += 1
chars.pop(i) # this makes up for incrementing i
else:
if run>1: # insert run only if > 1
for r in str(run):
chars.insert(i, r) # Insert run digit at i and increment i
i += 1
prev = c # now lookout for the new char
run = 1 # which has run of 1
i += 1 # increment i for jumping to the next itereation
if run>1: # Add the last run to the result
for r in str(run):
chars.append(r)
return len(chars)
| class Solution:
def compress(self, chars: List[str]) -> int:
run = 1
prev = chars[0]
i = 1
while i < len(chars):
c = chars[i]
if c == prev:
run += 1
chars.pop(i)
else:
if run > 1:
for r in str(run):
chars.insert(i, r)
i += 1
prev = c
run = 1
i += 1
if run > 1:
for r in str(run):
chars.append(r)
return len(chars) |
{
"targets": [{
"target_name": "pifacecad",
"sources": ["piface.cc"],
"include_dirs": ["./src/"],
"link_settings": {
"libraries": [
"../lib/libpifacecad.a",
"../lib/libmcp23s17.a"
]
},
"cflags": ["-std=c++11"]
}]
} | {'targets': [{'target_name': 'pifacecad', 'sources': ['piface.cc'], 'include_dirs': ['./src/'], 'link_settings': {'libraries': ['../lib/libpifacecad.a', '../lib/libmcp23s17.a']}, 'cflags': ['-std=c++11']}]} |
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode:
pre = ListNode(0)
pre.next = head
head1, head2 = pre, pre
for i in range(n):
head2 = head2.next
if not head2:
return head
while head2.next is not None:
head1 = head1.next
head2 = head2.next
head1.next = head1.next.next
return pre.next
def removeNthFromEnd2(self, head: ListNode, n: int) -> ListNode:
p = ListNode(-1)
p.next = head
a, b = p, p
while n > 0 and b:
n = n - 1
b = b.next
if not b:
return head
while b.next:
b = b.next
a = a.next
a.next = a.next.next
return p.next
'''
for i in range(n):
head2 = head2.next
while head2.next is not None:
head1 = head1.next
head2 = head2.next
print(head2.val, head1.val)
print(head1.val, "*******", head1.next.next.val)
head1.next = head1.next.next
return pre.next
'''
head = ListNode(1)
head.next = ListNode(2)
head.next.next = ListNode(3)
head.next.next.next = ListNode(4)
head.next.next.next.next = ListNode(5)
head.next.next.next.next.next = ListNode(6)
slu = Solution()
neddle = slu.removeNthFromEnd(head, 2)
while neddle:
print(neddle.val)
neddle = neddle.next
| class Listnode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def remove_nth_from_end(self, head: ListNode, n: int) -> ListNode:
pre = list_node(0)
pre.next = head
(head1, head2) = (pre, pre)
for i in range(n):
head2 = head2.next
if not head2:
return head
while head2.next is not None:
head1 = head1.next
head2 = head2.next
head1.next = head1.next.next
return pre.next
def remove_nth_from_end2(self, head: ListNode, n: int) -> ListNode:
p = list_node(-1)
p.next = head
(a, b) = (p, p)
while n > 0 and b:
n = n - 1
b = b.next
if not b:
return head
while b.next:
b = b.next
a = a.next
a.next = a.next.next
return p.next
'\n for i in range(n):\n head2 = head2.next\n while head2.next is not None:\n head1 = head1.next\n head2 = head2.next\n print(head2.val, head1.val)\n print(head1.val, "*******", head1.next.next.val)\n head1.next = head1.next.next\n\n return pre.next\n '
head = list_node(1)
head.next = list_node(2)
head.next.next = list_node(3)
head.next.next.next = list_node(4)
head.next.next.next.next = list_node(5)
head.next.next.next.next.next = list_node(6)
slu = solution()
neddle = slu.removeNthFromEnd(head, 2)
while neddle:
print(neddle.val)
neddle = neddle.next |
with open("day10/input.txt", encoding='utf-8') as file:
data = file.read().splitlines()
opening_chars = '([{<'
closing_chars = ')]}>'
sum_of_corrupted = 0
mapping_dict = {'(' : [')', 3], '[' : [']', 57], '{' : ['}', 1197], '<' : ['>', 25137]}
mapping_dict_sums = {')' : 3, ']' : 57, '}' : 1197, '>' : 25137}
mapping_dict_part2 = {'(' : 1, '[' : 2, '{' : 3, '<' : 4}
total_points = []
for line in data:
empty_array = []
for key, char in enumerate(line):
if char in closing_chars:
last_char = empty_array.pop(-1)
if char != mapping_dict[last_char][0]:
empty_array = []
break
else:
empty_array.insert(len(empty_array), char)
acc = 0
for score in empty_array[::-1]:
acc = acc * 5 + mapping_dict_part2[score]
if len(empty_array) != 0:
total_points.append(acc)
middle_key = int(len(total_points)/2)
middle_score = sorted(total_points)[middle_key]
print(middle_score)
| with open('day10/input.txt', encoding='utf-8') as file:
data = file.read().splitlines()
opening_chars = '([{<'
closing_chars = ')]}>'
sum_of_corrupted = 0
mapping_dict = {'(': [')', 3], '[': [']', 57], '{': ['}', 1197], '<': ['>', 25137]}
mapping_dict_sums = {')': 3, ']': 57, '}': 1197, '>': 25137}
mapping_dict_part2 = {'(': 1, '[': 2, '{': 3, '<': 4}
total_points = []
for line in data:
empty_array = []
for (key, char) in enumerate(line):
if char in closing_chars:
last_char = empty_array.pop(-1)
if char != mapping_dict[last_char][0]:
empty_array = []
break
else:
empty_array.insert(len(empty_array), char)
acc = 0
for score in empty_array[::-1]:
acc = acc * 5 + mapping_dict_part2[score]
if len(empty_array) != 0:
total_points.append(acc)
middle_key = int(len(total_points) / 2)
middle_score = sorted(total_points)[middle_key]
print(middle_score) |
{ 'application':{ 'type':'Application',
'name':'Template',
'backgrounds':
[
{ 'type':'Background',
'name':'bgTemplate',
'title':'Standard Template with File->Exit menu',
'size':( 400, 300 ),
'style':['resizeable'],
'statusBar':0,
'menubar':
{
'type':'MenuBar',
'menus':
[
{ 'type':'Menu',
'name':'menuFile',
'label':'&File',
'items': [
{ 'type':'MenuItem',
'name':'menuFileExit',
'label':'E&xit',
'command':'exit', } ] }
]
},
'components':
[
]
}
]
}
}
| {'application': {'type': 'Application', 'name': 'Template', 'backgrounds': [{'type': 'Background', 'name': 'bgTemplate', 'title': 'Standard Template with File->Exit menu', 'size': (400, 300), 'style': ['resizeable'], 'statusBar': 0, 'menubar': {'type': 'MenuBar', 'menus': [{'type': 'Menu', 'name': 'menuFile', 'label': '&File', 'items': [{'type': 'MenuItem', 'name': 'menuFileExit', 'label': 'E&xit', 'command': 'exit'}]}]}, 'components': []}]}} |
class ErosionStatus:
is_running: bool
# signalize that the erosion (usually in other thread) should stop
stop_requested: bool = False
progress: int
def __init__(self, is_running: bool = False, progress: int = 0):
self.is_running = is_running
self.progress = progress
| class Erosionstatus:
is_running: bool
stop_requested: bool = False
progress: int
def __init__(self, is_running: bool=False, progress: int=0):
self.is_running = is_running
self.progress = progress |
# Any recipe starts with a list of ingredients. Below is an extract
# from a cookbook with the ingredients for some dishes. Write a
# program that tells you what recipe you can make based on the
# ingredient you have.
# The input format:
# A name of some ingredient.
# The ouput format:
# A message that says "food time!" where "food" stands for the
# dish that contains this ingredient. For example, "pizza time!". If
# the ingredient is featured in several recipes, write about all of
# then in the order they're featured in the cook book.
pasta = "tomato, basil, garlic, salt, pasta, olive oil"
apple_pie = "apple, sugar, salt, cinnamon, flour, egg, butter"
ratatouille = "aubergine, carrot, onion, tomato, garlic, olive oil, pepper, salt"
chocolate_cake = "chocolate, sugar, salt, flour, coffee, butter"
omelette = "egg, milk, bacon, tomato, salt, pepper"
ingredient = input()
if ingredient in pasta:
print("pasta time!")
if ingredient in apple_pie:
print("apple pie time!")
if ingredient in ratatouille:
print("ratatouille time!")
if ingredient in chocolate_cake:
print("chocolate cake time!")
if ingredient in omelette:
print("omelette time!") | pasta = 'tomato, basil, garlic, salt, pasta, olive oil'
apple_pie = 'apple, sugar, salt, cinnamon, flour, egg, butter'
ratatouille = 'aubergine, carrot, onion, tomato, garlic, olive oil, pepper, salt'
chocolate_cake = 'chocolate, sugar, salt, flour, coffee, butter'
omelette = 'egg, milk, bacon, tomato, salt, pepper'
ingredient = input()
if ingredient in pasta:
print('pasta time!')
if ingredient in apple_pie:
print('apple pie time!')
if ingredient in ratatouille:
print('ratatouille time!')
if ingredient in chocolate_cake:
print('chocolate cake time!')
if ingredient in omelette:
print('omelette time!') |
PROXIES = [
{'protocol':'http', 'ip_port':'118.193.26.18:8080'},
{'protocol':'http', 'ip_port':'213.136.77.246:80'},
{'protocol':'http', 'ip_port':'198.199.127.16:80'},
{'protocol':'http', 'ip_port':'103.78.213.147:80'},
{'protocol':'https', 'ip_port':'61.90.73.10:8080'},
{'protocol':'http', 'ip_port':'36.83.78.184:80'},
{'protocol':'http', 'ip_port':'66.119.180.101:80'},
{'protocol':'https', 'ip_port':'142.44.135.148:8080'},
{'protocol':'http', 'ip_port':'80.211.181.37:3128'},
{'protocol':'http', 'ip_port':'36.79.15.169:80'},
{'protocol':'https', 'ip_port':'140.227.81.53:3128'},
{'protocol':'http', 'ip_port':'47.52.231.140:8080'},
{'protocol':'https', 'ip_port':'185.93.3.123:8080'},
{'protocol':'http', 'ip_port':'121.121.125.55:80'},
{'protocol':'https', 'ip_port':'191.252.92.198:8080'},
{'protocol':'http', 'ip_port':'213.136.89.121:80'},
{'protocol':'http', 'ip_port':'36.83.82.36:80'},
{'protocol':'https', 'ip_port':'163.44.165.165:8080'},
{'protocol':'https', 'ip_port':'191.252.186.52:80'},
{'protocol':'https', 'ip_port':'140.227.78.54:3128'},
{'protocol':'http', 'ip_port':'36.75.254.142:80'},
{'protocol':'https', 'ip_port':'178.57.44.159:44331'},
{'protocol':'http', 'ip_port':'80.48.119.28:8080'},
{'protocol':'https', 'ip_port':'103.241.205.66:8080'},
{'protocol':'http', 'ip_port':'36.83.77.39:80'},
{'protocol':'https', 'ip_port':'149.56.45.68:10000'},
{'protocol':'http', 'ip_port':'177.67.83.134:3128'},
{'protocol':'https', 'ip_port':'167.99.224.142:8080'},
{'protocol':'http', 'ip_port':'66.70.190.244:8080'},
{'protocol':'http', 'ip_port':'36.83.93.62:80'},
{'protocol':'https', 'ip_port':'178.136.225.96:53281'},
{'protocol':'https', 'ip_port':'212.77.86.103:80'},
{'protocol':'https', 'ip_port':'158.69.150.164:8080'},
{'protocol':'http', 'ip_port':'66.119.180.104:80'},
{'protocol':'https', 'ip_port':'66.70.146.227:3128'},
{'protocol':'https', 'ip_port':'110.164.181.164:8080'},
{'protocol':'http', 'ip_port':'88.99.215.14:80'},
{'protocol':'https', 'ip_port':'124.120.105.127:3128'},
{'protocol':'http', 'ip_port':'159.65.63.23:80'},
{'protocol':'http', 'ip_port':'66.119.180.103:80'},
{'protocol':'http', 'ip_port':'18.130.46.39:80'},
{'protocol':'http', 'ip_port':'81.22.54.60:53281'},
{'protocol':'http', 'ip_port':'45.115.39.139:7777'},
{'protocol':'http', 'ip_port':'60.49.97.65:53281'},
{'protocol':'http', 'ip_port':'176.15.169.70:53281'},
{'protocol':'http', 'ip_port':'81.211.23.6:3128'},
{'protocol':'http', 'ip_port':'190.12.58.187:53281'},
{'protocol':'http', 'ip_port':'196.61.28.125:53281'},
{'protocol':'http', 'ip_port':'47.89.30.82:8118'},
{'protocol':'http', 'ip_port':'109.76.229.164:8080'},
{'protocol':'http', 'ip_port':'199.195.119.37:80'},
{'protocol':'http', 'ip_port':'122.54.105.143:53281'},
{'protocol':'http', 'ip_port':'62.43.201.40:53281'},
{'protocol':'http', 'ip_port':'41.204.84.182:53281'},
{'protocol':'http', 'ip_port':'196.202.194.127:62225'},
{'protocol':'http', 'ip_port':'159.224.176.205:53281'},
{'protocol':'http', 'ip_port':'136.169.141.254:8080'},
{'protocol':'http', 'ip_port':'125.162.211.20:80'},
{'protocol':'http', 'ip_port':'60.250.79.187:80'},
{'protocol':'http', 'ip_port':'165.90.11.18:8080'},
{'protocol':'http', 'ip_port':'111.93.64.113:80'},
{'protocol':'https', 'ip_port':'147.135.210.114:54566'},
{'protocol':'http', 'ip_port':'184.172.231.86:80'},
{'protocol':'https', 'ip_port':'89.236.17.106:3128'},
{'protocol':'http', 'ip_port':'175.139.252.193:80'},
{'protocol':'http', 'ip_port':'187.60.253.78:3128'},
{'protocol':'http', 'ip_port':'109.74.75.61:80'},
{'protocol':'http', 'ip_port':'14.136.246.173:3128'},
{'protocol':'http', 'ip_port':'198.1.122.29:80'},
{'protocol':'http', 'ip_port':'159.65.182.63:80'},
{'protocol':'http', 'ip_port':'129.213.76.9:3128'},
{'protocol':'https', 'ip_port':'189.115.92.71:80'},
{'protocol':'http', 'ip_port':'74.209.243.116:3128'},
{'protocol':'https', 'ip_port':'191.252.120.198:8080'},
{'protocol':'http', 'ip_port':'115.249.145.202:80'},
{'protocol':'https', 'ip_port':'94.130.20.85:31288'},
{'protocol':'https', 'ip_port':'185.65.192.36:8080'},
{'protocol':'http', 'ip_port':'185.70.79.131:3128'},
{'protocol':'https', 'ip_port':'77.120.72.235:53281'},
{'protocol':'https', 'ip_port':'191.252.194.156:3128'},
{'protocol':'https', 'ip_port':'71.13.112.152:3128'},
{'protocol':'http', 'ip_port':'5.189.133.231:80'},
{'protocol':'http', 'ip_port':'91.205.239.120:8080'},
{'protocol':'http', 'ip_port':'121.254.214.219:80'},
{'protocol':'http', 'ip_port':'185.229.224.61:80'},
{'protocol':'http', 'ip_port':'34.201.72.254:80'},
{'protocol':'http', 'ip_port':'163.172.86.64:3128'},
{'protocol':'http', 'ip_port':'46.4.62.108:80'},
{'protocol':'http', 'ip_port':'47.89.41.164:80'},
{'protocol':'http', 'ip_port':'34.244.2.143:80'},
{'protocol':'http', 'ip_port':'177.21.115.43:20183'},
{'protocol':'http', 'ip_port':'190.109.32.251:8080'},
{'protocol':'http', 'ip_port':'177.21.109.90:20183'},
{'protocol':'http', 'ip_port':'89.169.88.169:8080'},
{'protocol':'http', 'ip_port':'167.99.28.176:8080'},
{'protocol':'http', 'ip_port':'128.199.129.5:80'},
{'protocol':'http', 'ip_port':'192.141.206.176:20183'},
{'protocol':'http', 'ip_port':'85.109.69.223:9090'},
{'protocol':'http', 'ip_port':'103.18.180.1:8080'},
{'protocol':'http', 'ip_port':'36.65.187.232:8080'},
{'protocol':'http', 'ip_port':'103.41.96.186:8080'},
{'protocol':'http', 'ip_port':'186.94.179.162:8080'},
{'protocol':'http', 'ip_port':'93.143.193.34:8080'},
{'protocol':'http', 'ip_port':'4.35.210.222:8181'},
{'protocol':'http', 'ip_port':'87.118.208.125:8080'},
{'protocol':'http', 'ip_port':'103.26.54.21:8080'},
{'protocol':'http', 'ip_port':'80.245.117.133:8080'},
{'protocol':'http', 'ip_port':'123.49.53.210:8080'},
{'protocol':'http', 'ip_port':'201.249.49.105:8080'},
{'protocol':'http', 'ip_port':'201.44.187.67:20183'},
{'protocol':'http', 'ip_port':'103.25.155.5:8080'},
{'protocol':'http', 'ip_port':'193.150.117.61:8000'},
{'protocol':'http', 'ip_port':'62.69.195.249:8080'},
{'protocol':'http', 'ip_port':'103.35.168.14:8080'},
{'protocol':'http', 'ip_port':'74.83.246.125:8081'},
{'protocol':'http', 'ip_port':'27.123.0.153:8080'},
{'protocol':'http', 'ip_port':'5.13.254.175:8080'},
{'protocol':'http', 'ip_port':'103.216.144.17:8080'},
{'protocol':'http', 'ip_port':'5.40.227.209:8080'},
{'protocol':'http', 'ip_port':'182.18.200.92:8080'},
{'protocol':'http', 'ip_port':'170.79.200.233:20183'},
{'protocol':'http', 'ip_port':'52.128.58.102:8080'},
{'protocol':'http', 'ip_port':'103.218.24.41:8080'},
{'protocol':'http', 'ip_port':'221.187.134.102:8080'},
{'protocol':'http', 'ip_port':'103.111.228.2:8080'},
{'protocol':'http', 'ip_port':'103.218.25.33:8080'},
{'protocol':'http', 'ip_port':'61.8.78.130:8080'},
{'protocol':'http', 'ip_port':'177.36.208.121:3128'},
{'protocol':'http', 'ip_port':'45.125.223.145:8080'},
{'protocol':'http', 'ip_port':'193.19.135.1:8080'},
{'protocol':'http', 'ip_port':'103.48.70.193:8080'},
{'protocol':'http', 'ip_port':'81.34.18.159:8080'},
{'protocol':'http', 'ip_port':'175.209.132.102:808'},
{'protocol':'http', 'ip_port':'177.74.247.59:3128'},
{'protocol':'http', 'ip_port':'1.179.181.17:8081'},
{'protocol':'http', 'ip_port':'80.72.66.212:8081'},
{'protocol':'http', 'ip_port':'91.237.240.70:8080'},
{'protocol':'http', 'ip_port':'200.122.209.78:8080'},
{'protocol':'http', 'ip_port':'36.66.103.63:3128'},
{'protocol':'http', 'ip_port':'122.54.20.216:8090'},
{'protocol':'http', 'ip_port':'203.154.82.34:8080'},
{'protocol':'http', 'ip_port':'66.96.237.133:8080'},
{'protocol':'http', 'ip_port':'177.36.131.200:20183'},
{'protocol':'http', 'ip_port':'200.122.211.26:8080'},
{'protocol':'http', 'ip_port':'103.35.171.93:8080'},
{'protocol':'http', 'ip_port':'2.138.25.150:8080'},
{'protocol':'http', 'ip_port':'177.204.155.131:3128'},
{'protocol':'http', 'ip_port':'103.206.254.190:8080'},
{'protocol':'http', 'ip_port':'177.220.186.11:8080'},
{'protocol':'http', 'ip_port':'177.47.243.74:8088'},
{'protocol':'http', 'ip_port':'177.21.109.69:20183'},
{'protocol':'http', 'ip_port':'1.179.185.253:8080'},
{'protocol':'http', 'ip_port':'182.23.28.186:3128'},
{'protocol':'http', 'ip_port':'80.87.176.16:8080'},
{'protocol':'http', 'ip_port':'202.169.252.73:8080'},
{'protocol':'http', 'ip_port':'154.72.81.45:8080'},
{'protocol':'http', 'ip_port':'190.201.95.84:8080'},
{'protocol':'http', 'ip_port':'195.228.210.245:8080'},
{'protocol':'http', 'ip_port':'91.237.240.4:8080'},
{'protocol':'http', 'ip_port':'202.137.15.93:8080'},
{'protocol':'http', 'ip_port':'87.249.205.103:8080'},
{'protocol':'http', 'ip_port':'189.8.93.173:20183'},
{'protocol':'http', 'ip_port':'177.21.104.205:20183'},
{'protocol':'http', 'ip_port':'172.245.211.188:5836'},
{'protocol':'http', 'ip_port':'88.255.101.175:8080'},
{'protocol':'http', 'ip_port':'131.161.124.36:3128'},
{'protocol':'http', 'ip_port':'182.16.171.26:53281'},
{'protocol':'http', 'ip_port':'45.123.43.158:8080'},
{'protocol':'http', 'ip_port':'94.45.49.170:8080'},
{'protocol':'http', 'ip_port':'177.22.91.71:20183'},
{'protocol':'http', 'ip_port':'181.129.33.218:62225'},
{'protocol':'http', 'ip_port':'190.109.169.41:53281'},
{'protocol':'https', 'ip_port':'204.48.22.184:3432'},
{'protocol':'https', 'ip_port':'198.50.137.181:3128'},
{'protocol':'http', 'ip_port':'173.212.202.65:443'},
{'protocol':'https', 'ip_port':'170.78.23.245:8080'},
{'protocol':'https', 'ip_port':'158.69.143.77:8080'},
{'protocol':'http', 'ip_port':'103.87.16.2:80'},
{'protocol':'https', 'ip_port':'18.222.124.59:8080'},
{'protocol':'http', 'ip_port':'47.254.22.115:8080'},
{'protocol':'http', 'ip_port':'118.69.34.21:8080'},
{'protocol':'http', 'ip_port':'138.117.115.249:53281'},
{'protocol':'http', 'ip_port':'190.4.4.204:3128'},
{'protocol':'http', 'ip_port':'42.112.208.124:53281'},
{'protocol':'http', 'ip_port':'188.120.232.181:8118'},
{'protocol':'https', 'ip_port':'177.52.250.126:8080'},
{'protocol':'http', 'ip_port':'218.50.2.102:8080'},
{'protocol':'http', 'ip_port':'54.95.211.163:8080'},
{'protocol':'http', 'ip_port':'35.200.69.141:8080'},
{'protocol':'http', 'ip_port':'181.49.24.126:8081'},
{'protocol':'https', 'ip_port':'96.9.69.230:53281'},
{'protocol':'https', 'ip_port':'192.116.142.153:8080'},
{'protocol':'http', 'ip_port':'171.244.32.140:8080'},
{'protocol':'https', 'ip_port':'195.133.220.18:43596'},
{'protocol':'https', 'ip_port':'209.190.4.117:8080'},
{'protocol':'http', 'ip_port':'39.109.112.111:8080'},
{'protocol':'http', 'ip_port':'176.53.2.122:8080'},
{'protocol':'https', 'ip_port':'200.255.53.2:8080'},
{'protocol':'http', 'ip_port':'125.26.98.165:8080'},
{'protocol':'http', 'ip_port':'212.90.167.90:55555'},
{'protocol':'https', 'ip_port':'125.25.202.139:3128'},
{'protocol':'http', 'ip_port':'83.238.100.226:3128'},
{'protocol':'http', 'ip_port':'103.87.170.105:42421'},
{'protocol':'http', 'ip_port':'195.138.83.218:53281'},
{'protocol':'http', 'ip_port':'185.237.87.240:80'},
{'protocol':'http', 'ip_port':'188.0.138.147:8080'},
{'protocol':'http', 'ip_port':'181.211.166.105:54314'},
{'protocol':'http', 'ip_port':'87.185.153.132:8080'},
{'protocol':'http', 'ip_port':'67.238.124.52:8080'},
{'protocol':'http', 'ip_port':'159.192.206.10:8080'},
{'protocol':'http', 'ip_port':'159.65.168.7:80'},
{'protocol':'http', 'ip_port':'108.61.203.146:8118'},
{'protocol':'http', 'ip_port':'173.212.209.59:80'},
{'protocol':'http', 'ip_port':'88.205.171.222:8080'},
{'protocol':'http', 'ip_port':'38.103.239.2:44372'},
{'protocol':'http', 'ip_port':'182.16.171.18:53281'},
{'protocol':'http', 'ip_port':'177.21.108.222:20183'},
{'protocol':'http', 'ip_port':'182.253.139.36:65301'},
{'protocol':'https', 'ip_port':'200.7.205.198:8081'},
{'protocol':'https', 'ip_port':'41.169.67.242:53281'},
{'protocol':'http', 'ip_port':'41.190.33.162:8080'},
{'protocol':'https', 'ip_port':'94.130.14.146:31288'},
{'protocol':'https', 'ip_port':'88.99.149.188:31288'},
{'protocol':'https', 'ip_port':'80.211.151.246:8145'},
{'protocol':'https', 'ip_port':'136.169.225.53:3128'},
{'protocol':'http', 'ip_port':'47.252.1.152:80'},
{'protocol':'https', 'ip_port':'61.7.175.138:41496'},
{'protocol':'http', 'ip_port':'52.214.181.43:80'},
{'protocol':'https', 'ip_port':'67.205.148.246:8080'},
{'protocol':'https', 'ip_port':'176.31.250.164:3128'},
{'protocol':'http', 'ip_port':'109.195.243.177:8197'},
{'protocol':'http', 'ip_port':'46.105.51.183:80'},
{'protocol':'https', 'ip_port':'94.141.157.182:8080'},
{'protocol':'https', 'ip_port':'14.207.100.203:8080'},
{'protocol':'http', 'ip_port':'163.172.181.29:80'},
{'protocol':'https', 'ip_port':'54.36.162.123:10000'},
{'protocol':'http', 'ip_port':'52.87.190.26:80'},
{'protocol':'http', 'ip_port':'212.98.150.50:80'},
{'protocol':'https', 'ip_port':'66.82.144.29:8080'},
{'protocol':'http', 'ip_port':'188.166.223.181:80'},
{'protocol':'http', 'ip_port':'180.251.80.119:8080'},
{'protocol':'http', 'ip_port':'94.21.75.9:8080'},
{'protocol':'http', 'ip_port':'177.105.252.133:20183'},
{'protocol':'http', 'ip_port':'61.7.138.109:8080'},
{'protocol':'http', 'ip_port':'110.78.155.27:8080'},
{'protocol':'http', 'ip_port':'178.49.139.13:80'},
{'protocol':'https', 'ip_port':'146.158.30.192:53281'},
{'protocol':'https', 'ip_port':'171.255.199.129:80'},
{'protocol':'http', 'ip_port':'92.222.74.221:80'},
{'protocol':'http', 'ip_port':'170.79.202.23:20183'},
{'protocol':'http', 'ip_port':'179.182.63.63:20183'},
{'protocol':'http', 'ip_port':'212.14.166.26:3128'},
{'protocol':'https', 'ip_port':'103.233.118.83:808'},
{'protocol':'http', 'ip_port':'110.170.150.52:8080'},
{'protocol':'http', 'ip_port':'181.143.129.180:3128'},
{'protocol':'http', 'ip_port':'181.119.115.2:53281'},
{'protocol':'http', 'ip_port':'185.8.158.149:8080'},
{'protocol':'http', 'ip_port':'103.39.251.241:8080'},
{'protocol':'http', 'ip_port':'46.229.252.61:8080'},
{'protocol':'http', 'ip_port':'93.182.72.36:8080'},
{'protocol':'http', 'ip_port':'201.54.5.117:3128'},
{'protocol':'http', 'ip_port':'78.140.6.68:53281'},
{'protocol':'http', 'ip_port':'177.184.83.162:20183'},
{'protocol':'http', 'ip_port':'143.202.75.240:20183'},
{'protocol':'http', 'ip_port':'31.145.83.202:8080'},
{'protocol':'http', 'ip_port':'177.101.181.33:20183'},
{'protocol':'http', 'ip_port':'144.76.190.233:3128'},
{'protocol':'http', 'ip_port':'134.0.63.134:8000'},
{'protocol':'http', 'ip_port':'38.103.239.13:35617'},
{'protocol':'http', 'ip_port':'110.78.168.138:62225'},
{'protocol':'http', 'ip_port':'198.58.123.138:8123'},
{'protocol':'http', 'ip_port':'190.78.8.120:8080'},
{'protocol':'http', 'ip_port':'190.23.68.39:8080'},
{'protocol':'http', 'ip_port':'191.55.10.27:3128'},
{'protocol':'http', 'ip_port':'200.71.146.146:8080'},
{'protocol':'http', 'ip_port':'103.102.248.56:3128'},
{'protocol':'http', 'ip_port':'37.110.74.231:8181'},
{'protocol':'http', 'ip_port':'191.5.183.120:20183'},
{'protocol':'http', 'ip_port':'154.68.195.8:8080'},
{'protocol':'http', 'ip_port':'182.53.201.240:8080'},
{'protocol':'http', 'ip_port':'177.21.115.164:20183'},
{'protocol':'http', 'ip_port':'201.49.238.77:20183'},
{'protocol':'http', 'ip_port':'101.109.64.19:8080'},
{'protocol':'http', 'ip_port':'36.81.21.226:8080'},
{'protocol':'http', 'ip_port':'37.60.209.54:8081'},
{'protocol':'http', 'ip_port':'143.0.141.96:80'},
{'protocol':'http', 'ip_port':'201.49.238.28:20183'},
{'protocol':'http', 'ip_port':'175.107.208.74:8080'},
{'protocol':'http', 'ip_port':'80.211.226.156:80'},
{'protocol':'http', 'ip_port':'119.42.72.139:31588'},
{'protocol':'http', 'ip_port':'61.5.101.56:3128'},
{'protocol':'http', 'ip_port':'180.183.223.47:8080'},
{'protocol':'http', 'ip_port':'197.159.16.2:8080'},
{'protocol':'http', 'ip_port':'27.147.142.146:8080'},
{'protocol':'http', 'ip_port':'201.76.125.107:20183'},
{'protocol':'http', 'ip_port':'103.78.74.170:3128'},
{'protocol':'http', 'ip_port':'85.130.3.136:53281'},
{'protocol':'http', 'ip_port':'213.144.123.146:80'},
{'protocol':'http', 'ip_port':'182.253.179.230:8080'},
{'protocol':'http', 'ip_port':'170.79.202.162:20183'},
] | proxies = [{'protocol': 'http', 'ip_port': '118.193.26.18:8080'}, {'protocol': 'http', 'ip_port': '213.136.77.246:80'}, {'protocol': 'http', 'ip_port': '198.199.127.16:80'}, {'protocol': 'http', 'ip_port': '103.78.213.147:80'}, {'protocol': 'https', 'ip_port': '61.90.73.10:8080'}, {'protocol': 'http', 'ip_port': '36.83.78.184:80'}, {'protocol': 'http', 'ip_port': '66.119.180.101:80'}, {'protocol': 'https', 'ip_port': '142.44.135.148:8080'}, {'protocol': 'http', 'ip_port': '80.211.181.37:3128'}, {'protocol': 'http', 'ip_port': '36.79.15.169:80'}, {'protocol': 'https', 'ip_port': '140.227.81.53:3128'}, {'protocol': 'http', 'ip_port': '47.52.231.140:8080'}, {'protocol': 'https', 'ip_port': '185.93.3.123:8080'}, {'protocol': 'http', 'ip_port': '121.121.125.55:80'}, {'protocol': 'https', 'ip_port': '191.252.92.198:8080'}, {'protocol': 'http', 'ip_port': '213.136.89.121:80'}, {'protocol': 'http', 'ip_port': '36.83.82.36:80'}, {'protocol': 'https', 'ip_port': '163.44.165.165:8080'}, {'protocol': 'https', 'ip_port': '191.252.186.52:80'}, {'protocol': 'https', 'ip_port': '140.227.78.54:3128'}, {'protocol': 'http', 'ip_port': '36.75.254.142:80'}, {'protocol': 'https', 'ip_port': '178.57.44.159:44331'}, {'protocol': 'http', 'ip_port': '80.48.119.28:8080'}, {'protocol': 'https', 'ip_port': '103.241.205.66:8080'}, {'protocol': 'http', 'ip_port': '36.83.77.39:80'}, {'protocol': 'https', 'ip_port': '149.56.45.68:10000'}, {'protocol': 'http', 'ip_port': '177.67.83.134:3128'}, {'protocol': 'https', 'ip_port': '167.99.224.142:8080'}, {'protocol': 'http', 'ip_port': '66.70.190.244:8080'}, {'protocol': 'http', 'ip_port': '36.83.93.62:80'}, {'protocol': 'https', 'ip_port': '178.136.225.96:53281'}, {'protocol': 'https', 'ip_port': '212.77.86.103:80'}, {'protocol': 'https', 'ip_port': '158.69.150.164:8080'}, {'protocol': 'http', 'ip_port': '66.119.180.104:80'}, {'protocol': 'https', 'ip_port': '66.70.146.227:3128'}, {'protocol': 'https', 'ip_port': '110.164.181.164:8080'}, {'protocol': 'http', 'ip_port': '88.99.215.14:80'}, {'protocol': 'https', 'ip_port': '124.120.105.127:3128'}, {'protocol': 'http', 'ip_port': '159.65.63.23:80'}, {'protocol': 'http', 'ip_port': '66.119.180.103:80'}, {'protocol': 'http', 'ip_port': '18.130.46.39:80'}, {'protocol': 'http', 'ip_port': '81.22.54.60:53281'}, {'protocol': 'http', 'ip_port': '45.115.39.139:7777'}, {'protocol': 'http', 'ip_port': '60.49.97.65:53281'}, {'protocol': 'http', 'ip_port': '176.15.169.70:53281'}, {'protocol': 'http', 'ip_port': '81.211.23.6:3128'}, {'protocol': 'http', 'ip_port': '190.12.58.187:53281'}, {'protocol': 'http', 'ip_port': '196.61.28.125:53281'}, {'protocol': 'http', 'ip_port': '47.89.30.82:8118'}, {'protocol': 'http', 'ip_port': '109.76.229.164:8080'}, {'protocol': 'http', 'ip_port': '199.195.119.37:80'}, {'protocol': 'http', 'ip_port': '122.54.105.143:53281'}, {'protocol': 'http', 'ip_port': '62.43.201.40:53281'}, {'protocol': 'http', 'ip_port': '41.204.84.182:53281'}, {'protocol': 'http', 'ip_port': '196.202.194.127:62225'}, {'protocol': 'http', 'ip_port': '159.224.176.205:53281'}, {'protocol': 'http', 'ip_port': '136.169.141.254:8080'}, {'protocol': 'http', 'ip_port': '125.162.211.20:80'}, {'protocol': 'http', 'ip_port': '60.250.79.187:80'}, {'protocol': 'http', 'ip_port': '165.90.11.18:8080'}, {'protocol': 'http', 'ip_port': '111.93.64.113:80'}, {'protocol': 'https', 'ip_port': '147.135.210.114:54566'}, {'protocol': 'http', 'ip_port': '184.172.231.86:80'}, {'protocol': 'https', 'ip_port': '89.236.17.106:3128'}, {'protocol': 'http', 'ip_port': '175.139.252.193:80'}, {'protocol': 'http', 'ip_port': '187.60.253.78:3128'}, {'protocol': 'http', 'ip_port': '109.74.75.61:80'}, {'protocol': 'http', 'ip_port': '14.136.246.173:3128'}, {'protocol': 'http', 'ip_port': '198.1.122.29:80'}, {'protocol': 'http', 'ip_port': '159.65.182.63:80'}, {'protocol': 'http', 'ip_port': '129.213.76.9:3128'}, {'protocol': 'https', 'ip_port': '189.115.92.71:80'}, {'protocol': 'http', 'ip_port': '74.209.243.116:3128'}, {'protocol': 'https', 'ip_port': '191.252.120.198:8080'}, {'protocol': 'http', 'ip_port': '115.249.145.202:80'}, {'protocol': 'https', 'ip_port': '94.130.20.85:31288'}, {'protocol': 'https', 'ip_port': '185.65.192.36:8080'}, {'protocol': 'http', 'ip_port': '185.70.79.131:3128'}, {'protocol': 'https', 'ip_port': '77.120.72.235:53281'}, {'protocol': 'https', 'ip_port': '191.252.194.156:3128'}, {'protocol': 'https', 'ip_port': '71.13.112.152:3128'}, {'protocol': 'http', 'ip_port': '5.189.133.231:80'}, {'protocol': 'http', 'ip_port': '91.205.239.120:8080'}, {'protocol': 'http', 'ip_port': '121.254.214.219:80'}, {'protocol': 'http', 'ip_port': '185.229.224.61:80'}, {'protocol': 'http', 'ip_port': '34.201.72.254:80'}, {'protocol': 'http', 'ip_port': '163.172.86.64:3128'}, {'protocol': 'http', 'ip_port': '46.4.62.108:80'}, {'protocol': 'http', 'ip_port': '47.89.41.164:80'}, {'protocol': 'http', 'ip_port': '34.244.2.143:80'}, {'protocol': 'http', 'ip_port': '177.21.115.43:20183'}, {'protocol': 'http', 'ip_port': '190.109.32.251:8080'}, {'protocol': 'http', 'ip_port': '177.21.109.90:20183'}, {'protocol': 'http', 'ip_port': '89.169.88.169:8080'}, {'protocol': 'http', 'ip_port': '167.99.28.176:8080'}, {'protocol': 'http', 'ip_port': '128.199.129.5:80'}, {'protocol': 'http', 'ip_port': '192.141.206.176:20183'}, {'protocol': 'http', 'ip_port': '85.109.69.223:9090'}, {'protocol': 'http', 'ip_port': '103.18.180.1:8080'}, {'protocol': 'http', 'ip_port': '36.65.187.232:8080'}, {'protocol': 'http', 'ip_port': '103.41.96.186:8080'}, {'protocol': 'http', 'ip_port': '186.94.179.162:8080'}, {'protocol': 'http', 'ip_port': '93.143.193.34:8080'}, {'protocol': 'http', 'ip_port': '4.35.210.222:8181'}, {'protocol': 'http', 'ip_port': '87.118.208.125:8080'}, {'protocol': 'http', 'ip_port': '103.26.54.21:8080'}, {'protocol': 'http', 'ip_port': '80.245.117.133:8080'}, {'protocol': 'http', 'ip_port': '123.49.53.210:8080'}, {'protocol': 'http', 'ip_port': '201.249.49.105:8080'}, {'protocol': 'http', 'ip_port': '201.44.187.67:20183'}, {'protocol': 'http', 'ip_port': '103.25.155.5:8080'}, {'protocol': 'http', 'ip_port': '193.150.117.61:8000'}, {'protocol': 'http', 'ip_port': '62.69.195.249:8080'}, {'protocol': 'http', 'ip_port': '103.35.168.14:8080'}, {'protocol': 'http', 'ip_port': '74.83.246.125:8081'}, {'protocol': 'http', 'ip_port': '27.123.0.153:8080'}, {'protocol': 'http', 'ip_port': '5.13.254.175:8080'}, {'protocol': 'http', 'ip_port': '103.216.144.17:8080'}, {'protocol': 'http', 'ip_port': '5.40.227.209:8080'}, {'protocol': 'http', 'ip_port': '182.18.200.92:8080'}, {'protocol': 'http', 'ip_port': '170.79.200.233:20183'}, {'protocol': 'http', 'ip_port': '52.128.58.102:8080'}, {'protocol': 'http', 'ip_port': '103.218.24.41:8080'}, {'protocol': 'http', 'ip_port': '221.187.134.102:8080'}, {'protocol': 'http', 'ip_port': '103.111.228.2:8080'}, {'protocol': 'http', 'ip_port': '103.218.25.33:8080'}, {'protocol': 'http', 'ip_port': '61.8.78.130:8080'}, {'protocol': 'http', 'ip_port': '177.36.208.121:3128'}, {'protocol': 'http', 'ip_port': '45.125.223.145:8080'}, {'protocol': 'http', 'ip_port': '193.19.135.1:8080'}, {'protocol': 'http', 'ip_port': '103.48.70.193:8080'}, {'protocol': 'http', 'ip_port': '81.34.18.159:8080'}, {'protocol': 'http', 'ip_port': '175.209.132.102:808'}, {'protocol': 'http', 'ip_port': '177.74.247.59:3128'}, {'protocol': 'http', 'ip_port': '1.179.181.17:8081'}, {'protocol': 'http', 'ip_port': '80.72.66.212:8081'}, {'protocol': 'http', 'ip_port': '91.237.240.70:8080'}, {'protocol': 'http', 'ip_port': '200.122.209.78:8080'}, {'protocol': 'http', 'ip_port': '36.66.103.63:3128'}, {'protocol': 'http', 'ip_port': '122.54.20.216:8090'}, {'protocol': 'http', 'ip_port': '203.154.82.34:8080'}, {'protocol': 'http', 'ip_port': '66.96.237.133:8080'}, {'protocol': 'http', 'ip_port': '177.36.131.200:20183'}, {'protocol': 'http', 'ip_port': '200.122.211.26:8080'}, {'protocol': 'http', 'ip_port': '103.35.171.93:8080'}, {'protocol': 'http', 'ip_port': '2.138.25.150:8080'}, {'protocol': 'http', 'ip_port': '177.204.155.131:3128'}, {'protocol': 'http', 'ip_port': '103.206.254.190:8080'}, {'protocol': 'http', 'ip_port': '177.220.186.11:8080'}, {'protocol': 'http', 'ip_port': '177.47.243.74:8088'}, {'protocol': 'http', 'ip_port': '177.21.109.69:20183'}, {'protocol': 'http', 'ip_port': '1.179.185.253:8080'}, {'protocol': 'http', 'ip_port': '182.23.28.186:3128'}, {'protocol': 'http', 'ip_port': '80.87.176.16:8080'}, {'protocol': 'http', 'ip_port': '202.169.252.73:8080'}, {'protocol': 'http', 'ip_port': '154.72.81.45:8080'}, {'protocol': 'http', 'ip_port': '190.201.95.84:8080'}, {'protocol': 'http', 'ip_port': '195.228.210.245:8080'}, {'protocol': 'http', 'ip_port': '91.237.240.4:8080'}, {'protocol': 'http', 'ip_port': '202.137.15.93:8080'}, {'protocol': 'http', 'ip_port': '87.249.205.103:8080'}, {'protocol': 'http', 'ip_port': '189.8.93.173:20183'}, {'protocol': 'http', 'ip_port': '177.21.104.205:20183'}, {'protocol': 'http', 'ip_port': '172.245.211.188:5836'}, {'protocol': 'http', 'ip_port': '88.255.101.175:8080'}, {'protocol': 'http', 'ip_port': '131.161.124.36:3128'}, {'protocol': 'http', 'ip_port': '182.16.171.26:53281'}, {'protocol': 'http', 'ip_port': '45.123.43.158:8080'}, {'protocol': 'http', 'ip_port': '94.45.49.170:8080'}, {'protocol': 'http', 'ip_port': '177.22.91.71:20183'}, {'protocol': 'http', 'ip_port': '181.129.33.218:62225'}, {'protocol': 'http', 'ip_port': '190.109.169.41:53281'}, {'protocol': 'https', 'ip_port': '204.48.22.184:3432'}, {'protocol': 'https', 'ip_port': '198.50.137.181:3128'}, {'protocol': 'http', 'ip_port': '173.212.202.65:443'}, {'protocol': 'https', 'ip_port': '170.78.23.245:8080'}, {'protocol': 'https', 'ip_port': '158.69.143.77:8080'}, {'protocol': 'http', 'ip_port': '103.87.16.2:80'}, {'protocol': 'https', 'ip_port': '18.222.124.59:8080'}, {'protocol': 'http', 'ip_port': '47.254.22.115:8080'}, {'protocol': 'http', 'ip_port': '118.69.34.21:8080'}, {'protocol': 'http', 'ip_port': '138.117.115.249:53281'}, {'protocol': 'http', 'ip_port': '190.4.4.204:3128'}, {'protocol': 'http', 'ip_port': '42.112.208.124:53281'}, {'protocol': 'http', 'ip_port': '188.120.232.181:8118'}, {'protocol': 'https', 'ip_port': '177.52.250.126:8080'}, {'protocol': 'http', 'ip_port': '218.50.2.102:8080'}, {'protocol': 'http', 'ip_port': '54.95.211.163:8080'}, {'protocol': 'http', 'ip_port': '35.200.69.141:8080'}, {'protocol': 'http', 'ip_port': '181.49.24.126:8081'}, {'protocol': 'https', 'ip_port': '96.9.69.230:53281'}, {'protocol': 'https', 'ip_port': '192.116.142.153:8080'}, {'protocol': 'http', 'ip_port': '171.244.32.140:8080'}, {'protocol': 'https', 'ip_port': '195.133.220.18:43596'}, {'protocol': 'https', 'ip_port': '209.190.4.117:8080'}, {'protocol': 'http', 'ip_port': '39.109.112.111:8080'}, {'protocol': 'http', 'ip_port': '176.53.2.122:8080'}, {'protocol': 'https', 'ip_port': '200.255.53.2:8080'}, {'protocol': 'http', 'ip_port': '125.26.98.165:8080'}, {'protocol': 'http', 'ip_port': '212.90.167.90:55555'}, {'protocol': 'https', 'ip_port': '125.25.202.139:3128'}, {'protocol': 'http', 'ip_port': '83.238.100.226:3128'}, {'protocol': 'http', 'ip_port': '103.87.170.105:42421'}, {'protocol': 'http', 'ip_port': '195.138.83.218:53281'}, {'protocol': 'http', 'ip_port': '185.237.87.240:80'}, {'protocol': 'http', 'ip_port': '188.0.138.147:8080'}, {'protocol': 'http', 'ip_port': '181.211.166.105:54314'}, {'protocol': 'http', 'ip_port': '87.185.153.132:8080'}, {'protocol': 'http', 'ip_port': '67.238.124.52:8080'}, {'protocol': 'http', 'ip_port': '159.192.206.10:8080'}, {'protocol': 'http', 'ip_port': '159.65.168.7:80'}, {'protocol': 'http', 'ip_port': '108.61.203.146:8118'}, {'protocol': 'http', 'ip_port': '173.212.209.59:80'}, {'protocol': 'http', 'ip_port': '88.205.171.222:8080'}, {'protocol': 'http', 'ip_port': '38.103.239.2:44372'}, {'protocol': 'http', 'ip_port': '182.16.171.18:53281'}, {'protocol': 'http', 'ip_port': '177.21.108.222:20183'}, {'protocol': 'http', 'ip_port': '182.253.139.36:65301'}, {'protocol': 'https', 'ip_port': '200.7.205.198:8081'}, {'protocol': 'https', 'ip_port': '41.169.67.242:53281'}, {'protocol': 'http', 'ip_port': '41.190.33.162:8080'}, {'protocol': 'https', 'ip_port': '94.130.14.146:31288'}, {'protocol': 'https', 'ip_port': '88.99.149.188:31288'}, {'protocol': 'https', 'ip_port': '80.211.151.246:8145'}, {'protocol': 'https', 'ip_port': '136.169.225.53:3128'}, {'protocol': 'http', 'ip_port': '47.252.1.152:80'}, {'protocol': 'https', 'ip_port': '61.7.175.138:41496'}, {'protocol': 'http', 'ip_port': '52.214.181.43:80'}, {'protocol': 'https', 'ip_port': '67.205.148.246:8080'}, {'protocol': 'https', 'ip_port': '176.31.250.164:3128'}, {'protocol': 'http', 'ip_port': '109.195.243.177:8197'}, {'protocol': 'http', 'ip_port': '46.105.51.183:80'}, {'protocol': 'https', 'ip_port': '94.141.157.182:8080'}, {'protocol': 'https', 'ip_port': '14.207.100.203:8080'}, {'protocol': 'http', 'ip_port': '163.172.181.29:80'}, {'protocol': 'https', 'ip_port': '54.36.162.123:10000'}, {'protocol': 'http', 'ip_port': '52.87.190.26:80'}, {'protocol': 'http', 'ip_port': '212.98.150.50:80'}, {'protocol': 'https', 'ip_port': '66.82.144.29:8080'}, {'protocol': 'http', 'ip_port': '188.166.223.181:80'}, {'protocol': 'http', 'ip_port': '180.251.80.119:8080'}, {'protocol': 'http', 'ip_port': '94.21.75.9:8080'}, {'protocol': 'http', 'ip_port': '177.105.252.133:20183'}, {'protocol': 'http', 'ip_port': '61.7.138.109:8080'}, {'protocol': 'http', 'ip_port': '110.78.155.27:8080'}, {'protocol': 'http', 'ip_port': '178.49.139.13:80'}, {'protocol': 'https', 'ip_port': '146.158.30.192:53281'}, {'protocol': 'https', 'ip_port': '171.255.199.129:80'}, {'protocol': 'http', 'ip_port': '92.222.74.221:80'}, {'protocol': 'http', 'ip_port': '170.79.202.23:20183'}, {'protocol': 'http', 'ip_port': '179.182.63.63:20183'}, {'protocol': 'http', 'ip_port': '212.14.166.26:3128'}, {'protocol': 'https', 'ip_port': '103.233.118.83:808'}, {'protocol': 'http', 'ip_port': '110.170.150.52:8080'}, {'protocol': 'http', 'ip_port': '181.143.129.180:3128'}, {'protocol': 'http', 'ip_port': '181.119.115.2:53281'}, {'protocol': 'http', 'ip_port': '185.8.158.149:8080'}, {'protocol': 'http', 'ip_port': '103.39.251.241:8080'}, {'protocol': 'http', 'ip_port': '46.229.252.61:8080'}, {'protocol': 'http', 'ip_port': '93.182.72.36:8080'}, {'protocol': 'http', 'ip_port': '201.54.5.117:3128'}, {'protocol': 'http', 'ip_port': '78.140.6.68:53281'}, {'protocol': 'http', 'ip_port': '177.184.83.162:20183'}, {'protocol': 'http', 'ip_port': '143.202.75.240:20183'}, {'protocol': 'http', 'ip_port': '31.145.83.202:8080'}, {'protocol': 'http', 'ip_port': '177.101.181.33:20183'}, {'protocol': 'http', 'ip_port': '144.76.190.233:3128'}, {'protocol': 'http', 'ip_port': '134.0.63.134:8000'}, {'protocol': 'http', 'ip_port': '38.103.239.13:35617'}, {'protocol': 'http', 'ip_port': '110.78.168.138:62225'}, {'protocol': 'http', 'ip_port': '198.58.123.138:8123'}, {'protocol': 'http', 'ip_port': '190.78.8.120:8080'}, {'protocol': 'http', 'ip_port': '190.23.68.39:8080'}, {'protocol': 'http', 'ip_port': '191.55.10.27:3128'}, {'protocol': 'http', 'ip_port': '200.71.146.146:8080'}, {'protocol': 'http', 'ip_port': '103.102.248.56:3128'}, {'protocol': 'http', 'ip_port': '37.110.74.231:8181'}, {'protocol': 'http', 'ip_port': '191.5.183.120:20183'}, {'protocol': 'http', 'ip_port': '154.68.195.8:8080'}, {'protocol': 'http', 'ip_port': '182.53.201.240:8080'}, {'protocol': 'http', 'ip_port': '177.21.115.164:20183'}, {'protocol': 'http', 'ip_port': '201.49.238.77:20183'}, {'protocol': 'http', 'ip_port': '101.109.64.19:8080'}, {'protocol': 'http', 'ip_port': '36.81.21.226:8080'}, {'protocol': 'http', 'ip_port': '37.60.209.54:8081'}, {'protocol': 'http', 'ip_port': '143.0.141.96:80'}, {'protocol': 'http', 'ip_port': '201.49.238.28:20183'}, {'protocol': 'http', 'ip_port': '175.107.208.74:8080'}, {'protocol': 'http', 'ip_port': '80.211.226.156:80'}, {'protocol': 'http', 'ip_port': '119.42.72.139:31588'}, {'protocol': 'http', 'ip_port': '61.5.101.56:3128'}, {'protocol': 'http', 'ip_port': '180.183.223.47:8080'}, {'protocol': 'http', 'ip_port': '197.159.16.2:8080'}, {'protocol': 'http', 'ip_port': '27.147.142.146:8080'}, {'protocol': 'http', 'ip_port': '201.76.125.107:20183'}, {'protocol': 'http', 'ip_port': '103.78.74.170:3128'}, {'protocol': 'http', 'ip_port': '85.130.3.136:53281'}, {'protocol': 'http', 'ip_port': '213.144.123.146:80'}, {'protocol': 'http', 'ip_port': '182.253.179.230:8080'}, {'protocol': 'http', 'ip_port': '170.79.202.162:20183'}] |
def dict_words(string):
dict_word={}
list_words=string.split()
for word in list_words:
if(dict_word.get(word)!=None):
dict_word[word]+=1
else:
dict_word[word]=1
return dict_word
def main():
with open('datasets/rosalind_ini6.txt') as input_file:
string=input_file.read().strip()
dict_word=dict_words(string)
for key, value in dict_word.items():
print(str(key)+' '+str(value))
with open('solutions/rosalind_ini6.txt', 'w') as output_file:
for key, value in dict_word.items():
output_file.write(str(key)+' '+str(value)+'\n')
if(__name__=='__main__'):
main() | def dict_words(string):
dict_word = {}
list_words = string.split()
for word in list_words:
if dict_word.get(word) != None:
dict_word[word] += 1
else:
dict_word[word] = 1
return dict_word
def main():
with open('datasets/rosalind_ini6.txt') as input_file:
string = input_file.read().strip()
dict_word = dict_words(string)
for (key, value) in dict_word.items():
print(str(key) + ' ' + str(value))
with open('solutions/rosalind_ini6.txt', 'w') as output_file:
for (key, value) in dict_word.items():
output_file.write(str(key) + ' ' + str(value) + '\n')
if __name__ == '__main__':
main() |
SORTIE_PREFIXE = "God save"
def get_enfants(parent, liens_parente, morts):
return [f for p, f in liens_parente if (p == parent) and (f not in morts)]
def get_parent(fils, liens_parente):
for p, f in liens_parente:
if f == fils:
return p
def get_heritier(mec_mort, liens_parente, morts):
enfants = get_enfants(mec_mort, liens_parente, morts)
if len(enfants) > 0:
if enfants[0] not in morts:
return enfants[0]
else:
return get_heritier(enfants[0], liens_parente, morts)
else:
pere = get_parent(mec_mort, liens_parente)
return get_heritier(pere, liens_parente, morts)
def main():
mec_mort = input()
N = int(input())
liens_parente = [input().split() for _ in range(N - 1)]
D = int(input())
morts = [input() for _ in range(D)]
print(SORTIE_PREFIXE, get_heritier(mec_mort, liens_parente, morts))
if __name__ == '__main__':
main()
| sortie_prefixe = 'God save'
def get_enfants(parent, liens_parente, morts):
return [f for (p, f) in liens_parente if p == parent and f not in morts]
def get_parent(fils, liens_parente):
for (p, f) in liens_parente:
if f == fils:
return p
def get_heritier(mec_mort, liens_parente, morts):
enfants = get_enfants(mec_mort, liens_parente, morts)
if len(enfants) > 0:
if enfants[0] not in morts:
return enfants[0]
else:
return get_heritier(enfants[0], liens_parente, morts)
else:
pere = get_parent(mec_mort, liens_parente)
return get_heritier(pere, liens_parente, morts)
def main():
mec_mort = input()
n = int(input())
liens_parente = [input().split() for _ in range(N - 1)]
d = int(input())
morts = [input() for _ in range(D)]
print(SORTIE_PREFIXE, get_heritier(mec_mort, liens_parente, morts))
if __name__ == '__main__':
main() |
###############################################
# #
# Created by Youssef Sully #
# Beginner python #
# While Loops 3 #
# #
###############################################
# 1. in while loop we have to INITIALIZE the variable (iterator = 0)
# 2. execute the below command until this statement is (iterator < 10) TRUE
print("\n{} {} {}\n".format("-" * 9, "While loop", "-" * 9))
iterator = 0
while iterator < 10:
print("{} ".format(iterator), end='')
# means the new iterator = old iterator + 1 ---> the new value of the iterator is 1
# # also can be written as ---> iterator += 1
iterator = iterator + 1
print("\n")
print("{} {} {}\n".format("-" * 9, "Using break", "-" * 9))
# break used to break out of the loop
iterator = 0
while iterator < 10:
if iterator == 4:
print("Number 4 is reached the loop stopped due to break")
break
print("{} ".format(iterator), end='')
iterator += 1
print("\n{} {} {}\n".format("-" * 9, "Infinite loop", "-" * 9))
# Infinite loop needs a BREAK condition otherwise is going to run forever!
iterator = 0
while True:
if iterator == 4:
print("Number 4 is reached the loop stopped due to break")
break
print("{} ".format(iterator), end='')
iterator += 1
| print('\n{} {} {}\n'.format('-' * 9, 'While loop', '-' * 9))
iterator = 0
while iterator < 10:
print('{} '.format(iterator), end='')
iterator = iterator + 1
print('\n')
print('{} {} {}\n'.format('-' * 9, 'Using break', '-' * 9))
iterator = 0
while iterator < 10:
if iterator == 4:
print('Number 4 is reached the loop stopped due to break')
break
print('{} '.format(iterator), end='')
iterator += 1
print('\n{} {} {}\n'.format('-' * 9, 'Infinite loop', '-' * 9))
iterator = 0
while True:
if iterator == 4:
print('Number 4 is reached the loop stopped due to break')
break
print('{} '.format(iterator), end='')
iterator += 1 |
class Solution:
def findOcurrences(self, text: str, first: str, second: str) -> List[str]:
text = text.split(' ')
return [text[i] for i in range(2, len(text)) if text[i - 2] == first and text[i - 1] == second]
| class Solution:
def find_ocurrences(self, text: str, first: str, second: str) -> List[str]:
text = text.split(' ')
return [text[i] for i in range(2, len(text)) if text[i - 2] == first and text[i - 1] == second] |
# Swap Pairs using Recursion
'''
Given a linked list, swap every two adjacent nodes and return its head.
You may not modify the values in the list's nodes, only nodes itself may be changed.
Example:
Given 1->2->3->4, you should return the list as 2->1->4->3.
'''
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def swapPairs(self, head: ListNode) -> ListNode:
if not head or not head.next:
return head
temp = head
head = head.next
temp.next = head.next
head.next = temp
head.next.next = self.swapPairs(head.next.next)
return head | """
Given a linked list, swap every two adjacent nodes and return its head.
You may not modify the values in the list's nodes, only nodes itself may be changed.
Example:
Given 1->2->3->4, you should return the list as 2->1->4->3.
"""
class Solution:
def swap_pairs(self, head: ListNode) -> ListNode:
if not head or not head.next:
return head
temp = head
head = head.next
temp.next = head.next
head.next = temp
head.next.next = self.swapPairs(head.next.next)
return head |
class BaseMixin(object):
@property
def blocks(self):
return self.request.GET.getlist('hierarchy_block', [])
@property
def awcs(self):
return self.request.GET.getlist('hierarchy_awc', [])
@property
def gp(self):
return self.request.GET.getlist('hierarchy_gp', None)
def _safeint(value):
try:
return int(value)
except (ValueError, TypeError):
return 0
def format_percent(x, y):
y = _safeint(y)
percent = (y or 0) * 100 / (x or 1)
if percent < 33:
color = 'red'
elif 33 <= percent <= 67:
color = 'orange'
else:
color = 'green'
return "<span style='display: block; text-align:center; color:%s;'>%d<hr style='margin: 0;border-top: 0; border-color: black;'>%d%%</span>" % (color, y, percent)
def normal_format(value):
if not value:
value = 0
return "<span style='display: block; text-align:center;'>%d<hr style='margin: 0;border-top: 0; border-color: black;'></span>" % value
| class Basemixin(object):
@property
def blocks(self):
return self.request.GET.getlist('hierarchy_block', [])
@property
def awcs(self):
return self.request.GET.getlist('hierarchy_awc', [])
@property
def gp(self):
return self.request.GET.getlist('hierarchy_gp', None)
def _safeint(value):
try:
return int(value)
except (ValueError, TypeError):
return 0
def format_percent(x, y):
y = _safeint(y)
percent = (y or 0) * 100 / (x or 1)
if percent < 33:
color = 'red'
elif 33 <= percent <= 67:
color = 'orange'
else:
color = 'green'
return "<span style='display: block; text-align:center; color:%s;'>%d<hr style='margin: 0;border-top: 0; border-color: black;'>%d%%</span>" % (color, y, percent)
def normal_format(value):
if not value:
value = 0
return "<span style='display: block; text-align:center;'>%d<hr style='margin: 0;border-top: 0; border-color: black;'></span>" % value |
n, k = input().strip().split(' ')
n, k = int(n), int(k)
imp_contests = 0
imp = []
nimp = []
for i in range(n):
l, t = input().strip().split(' ')
l, t = int(l), int(t)
if t == 1:
imp.append([l,t])
else:
nimp.append([l,t])
imp.sort()
ans = 0
ans_subtract = 0
for i in range(len(imp)-k):
ans_subtract += imp[i][0]
del imp[i]
for i in range(len(imp)):
ans += imp[i][0]
for i in range(len(nimp)):
ans += nimp[i][0]
print(ans-ans_subtract)
| (n, k) = input().strip().split(' ')
(n, k) = (int(n), int(k))
imp_contests = 0
imp = []
nimp = []
for i in range(n):
(l, t) = input().strip().split(' ')
(l, t) = (int(l), int(t))
if t == 1:
imp.append([l, t])
else:
nimp.append([l, t])
imp.sort()
ans = 0
ans_subtract = 0
for i in range(len(imp) - k):
ans_subtract += imp[i][0]
del imp[i]
for i in range(len(imp)):
ans += imp[i][0]
for i in range(len(nimp)):
ans += nimp[i][0]
print(ans - ans_subtract) |
def f(a):
s = 0
for i in range(1,a):
if a%i == 0:
s+=i
return "Perfect" if s==a else ("Abundant" if s > a else "Deficient")
T = int(input())
L = list(map(int,input().split()))
for i in L:
print(f(i)) | def f(a):
s = 0
for i in range(1, a):
if a % i == 0:
s += i
return 'Perfect' if s == a else 'Abundant' if s > a else 'Deficient'
t = int(input())
l = list(map(int, input().split()))
for i in L:
print(f(i)) |
#!/usr/bin/python
class Block(object):
def __init__(self):
print("Block")
class Chain(object):
def __init__(self):
print("Chain")
def main():
b = Block()
c = Chain()
if __name__ == "__main__":
main() | class Block(object):
def __init__(self):
print('Block')
class Chain(object):
def __init__(self):
print('Chain')
def main():
b = block()
c = chain()
if __name__ == '__main__':
main() |
class Config:
DEBUG = True
SQLALCHEMY_DATABASE_URI = "mysql+mysqldb://taewookim:1234@173.194.86.171:3306/roompi2_db"
SQLALCHEMY_TRACK_MODIFICATION = True
@classmethod
def init_app(cls, app):
# config setting for flask app instance
app.config.from_object(cls)
return app
| class Config:
debug = True
sqlalchemy_database_uri = 'mysql+mysqldb://taewookim:1234@173.194.86.171:3306/roompi2_db'
sqlalchemy_track_modification = True
@classmethod
def init_app(cls, app):
app.config.from_object(cls)
return app |
# -*- coding: utf-8 -*-
# segundo link: dobro do terceiro
# segundo link: metade do primeiro
clicks_on_3 = int(input())
clicks_on_2 = clicks_on_3 * 2
clicks_on_1 = clicks_on_2 * 2
print(clicks_on_1)
| clicks_on_3 = int(input())
clicks_on_2 = clicks_on_3 * 2
clicks_on_1 = clicks_on_2 * 2
print(clicks_on_1) |
#Coded by Ribhu Sengupta.
def solveKnightMove(board, n, move_no, currRow, currCol): #solveKnightMove(board, dimesion of board, Moves_already_done, currRoe, currCol)
if move_no == n*n: #Lets say n=8, if no of moves knight covered 64 then it will stop further recursion.
return True
rowDir = [+2, +1, -1, -2, -2, -1, +2, +2] #x or Row Co-ordinates where knight can be placed in respective to its current co-ordinate.
colDir = [+1, +2, +2, +1, -1, -2, -2, -1] #y or Column Co-ordinates where knight can be placed in respective to its current co-ordinate.
for index in range(0, len(rowDir)): #Loop among row and column coordinates
nextRow = currRow + rowDir[index]
nextCol = currCol + colDir[index]
if canPlace(board, n, nextRow, nextCol) is True: #checking weather next move is valid and not covered till yet.
board[nextRow][nextCol] = move_no+1
isSuccessfull = solveKnightMove(board, n, move_no+1, nextRow, nextCol) # can predict that the next valid move could cover all the cells of chess board or not.
if isSuccessfull is True:
return True
board[nextRow][nextCol] = 0
return False
def canPlace(board, n, row, col): # Can Check the next moves of knight
if row>=0 and row<n and col>=0 and col<n:
if board[row][col] == 0:
return True
return False
return False
def printBoard(board, n): #printing the board.
for index1 in range(0, n):
for index2 in range(0, n):
print(board[index1][index2])
print('\n')
n = int(input("Enter a Dimension of board: "))
#creation of chess Board
board = [[]]
for index in range(0, n):
for index2 in range(0, n):
board[index].append(0)
board.append([])
board.pop(index+1)
# end of creation of chess board
board[0][0] = 1
ans = solveKnightMove(board, n, 1, 0, 0) #solveKnightMove(board, dimesion, Moves_already_done, currRoe, currCol)
if ans is True:
printBoard(board, n)
print(board)
else:
print("Not able to solve the board.")
| def solve_knight_move(board, n, move_no, currRow, currCol):
if move_no == n * n:
return True
row_dir = [+2, +1, -1, -2, -2, -1, +2, +2]
col_dir = [+1, +2, +2, +1, -1, -2, -2, -1]
for index in range(0, len(rowDir)):
next_row = currRow + rowDir[index]
next_col = currCol + colDir[index]
if can_place(board, n, nextRow, nextCol) is True:
board[nextRow][nextCol] = move_no + 1
is_successfull = solve_knight_move(board, n, move_no + 1, nextRow, nextCol)
if isSuccessfull is True:
return True
board[nextRow][nextCol] = 0
return False
def can_place(board, n, row, col):
if row >= 0 and row < n and (col >= 0) and (col < n):
if board[row][col] == 0:
return True
return False
return False
def print_board(board, n):
for index1 in range(0, n):
for index2 in range(0, n):
print(board[index1][index2])
print('\n')
n = int(input('Enter a Dimension of board: '))
board = [[]]
for index in range(0, n):
for index2 in range(0, n):
board[index].append(0)
board.append([])
board.pop(index + 1)
board[0][0] = 1
ans = solve_knight_move(board, n, 1, 0, 0)
if ans is True:
print_board(board, n)
print(board)
else:
print('Not able to solve the board.') |
# https://leetcode.com/problems/jewels-and-stones/description/
# input: J = "aA" | S = "aAAbbbb"
# output: 3
# input: J = "z", S = "ZZ"
# output: 0
# Solution: O(N^2)
def num_jewels_in_stones(J, S):
jewels = 0
for j in J:
for s in S:
if s == j:
jewels += 1
return jewels
print(num_jewels_in_stones("aA", "aAAbbbb"))
print(num_jewels_in_stones("z", "ZZ"))
# Solution: O(N)
def num_jewels_in_stones_opt(J, S):
number_by_chars = {}
counter = 0
for char in J:
if char in number_by_chars:
number_by_chars[char] += 1
else:
number_by_chars[char] = 1
for char in S:
if char in number_by_chars:
counter += number_by_chars[char]
return counter
print(num_jewels_in_stones_opt("aA", "aAAbbbb"))
print(num_jewels_in_stones_opt("z", "ZZ"))
| def num_jewels_in_stones(J, S):
jewels = 0
for j in J:
for s in S:
if s == j:
jewels += 1
return jewels
print(num_jewels_in_stones('aA', 'aAAbbbb'))
print(num_jewels_in_stones('z', 'ZZ'))
def num_jewels_in_stones_opt(J, S):
number_by_chars = {}
counter = 0
for char in J:
if char in number_by_chars:
number_by_chars[char] += 1
else:
number_by_chars[char] = 1
for char in S:
if char in number_by_chars:
counter += number_by_chars[char]
return counter
print(num_jewels_in_stones_opt('aA', 'aAAbbbb'))
print(num_jewels_in_stones_opt('z', 'ZZ')) |
def writeList(l,name):
wptr = open(name,"w")
wptr.write("%d\n" % len(l))
for i in l:
wptr.write("%d\n" % i)
wptr.close() | def write_list(l, name):
wptr = open(name, 'w')
wptr.write('%d\n' % len(l))
for i in l:
wptr.write('%d\n' % i)
wptr.close() |
# DEFAULT ROUTE
ROUTE_SANDBOX = 'https://sandbox.boletobancario.com/api-integration'
ROUTE_SANDBOX_AUTORIZATION_SERVER = "https://sandbox.boletobancario.com/authorization-server/oauth/token"
ROUTE_PRODUCAO = 'https://api.juno.com.br'
ROUTE_PRODUCAO_AUTORIZATION_SERVER = "https://api.juno.com.br/authorization-server/oauth/token"
| route_sandbox = 'https://sandbox.boletobancario.com/api-integration'
route_sandbox_autorization_server = 'https://sandbox.boletobancario.com/authorization-server/oauth/token'
route_producao = 'https://api.juno.com.br'
route_producao_autorization_server = 'https://api.juno.com.br/authorization-server/oauth/token' |
user_input = input("Enter maximum number: ")
number = int(user_input)
spaces_amount = number // 2
f = open("my_tree.txt", "w")
while (spaces_amount >= 0):
if (spaces_amount*2 == number):
spaces_amount -= 1
continue
for j in range(spaces_amount):
f.write(" ")
# print(" ", sep="", end="")
for j in range((number - (spaces_amount * 2))):
f.write("*")
# print("*", sep="", end="")
spaces_amount -= 1
f.write("\n")
# print()
f.close()
| user_input = input('Enter maximum number: ')
number = int(user_input)
spaces_amount = number // 2
f = open('my_tree.txt', 'w')
while spaces_amount >= 0:
if spaces_amount * 2 == number:
spaces_amount -= 1
continue
for j in range(spaces_amount):
f.write(' ')
for j in range(number - spaces_amount * 2):
f.write('*')
spaces_amount -= 1
f.write('\n')
f.close() |
# Copyright (c) 2020. JetBrains s.r.o.
# Use of this source code is governed by the MIT license that can be found in the LICENSE file.
# from .corr import *
# from .im import *
# __all__ = (im.__all__ +
# corr.__all__)
# 'bistro' packages must be imported explicitly.
__all__ = []
| __all__ = [] |
if __name__ == "__main__":
net_amount=0
while(True):
person = input("Enter the amount that you want to Deposit/Withdral ? ")
transaction = person.split(" ")
type = transaction[0]
amount =int( transaction[1])
if type =="D" or type =='d':
net_amount += amount
print("Your Net_amount is :-",net_amount)
elif type == 'W' or 'w':
net_amount -= amount
if net_amount>0:
print("Your Net_amount is :-",net_amount)
else:
print("Insufficient Balance!!!!!!!")
else:
pass
ext = input("Want to Continue (Y for yes and N for no)")
if not (ext=='Y' or ext=='y'):
break
| if __name__ == '__main__':
net_amount = 0
while True:
person = input('Enter the amount that you want to Deposit/Withdral ? ')
transaction = person.split(' ')
type = transaction[0]
amount = int(transaction[1])
if type == 'D' or type == 'd':
net_amount += amount
print('Your Net_amount is :-', net_amount)
elif type == 'W' or 'w':
net_amount -= amount
if net_amount > 0:
print('Your Net_amount is :-', net_amount)
else:
print('Insufficient Balance!!!!!!!')
else:
pass
ext = input('Want to Continue (Y for yes and N for no)')
if not (ext == 'Y' or ext == 'y'):
break |
# Put the token you got from https://discord.com/developers/applications/ here
token = 'x'
# Choose the prefix you'd like for your bot
prefix = "?"
# Copy your user id on Discord to set you as the owner of this bot
myid = 0
# Change None to the id of your logschannel (if you want one)
logschannelid = None
# Change 0 to your server's id (if you have one)
myserverid = 0
| token = 'x'
prefix = '?'
myid = 0
logschannelid = None
myserverid = 0 |
# course = "Python's course for Beginners"
# print(course[0])
# print(course[-1])
# print(course[-2])
# print(course[0:3])
# print(course[0:])
# print(course[1:])
# print(course[:5])
# print(course[:]) # copy string
#
# another = course[:]
# print(another)
#######################################
# first_name = 'Jennifer'
# print(first_name[1:-1])
#######################################
# Formatted Strings
# first = 'john'
# last = 'Smith'
# john [smith] is a coder
# message = first + ' [' + last + '] ' + 'is a coder'
#
# print(message)
#
# msg = f'{first} [{last}] is a coder'
#
# print(msg)
#######################################
# string Methods
course = "Python's course for Beginners"
# print(len(course)) # count number of chars
# print(course.upper())
# print(course.lower())
print(course.find('p')) # prints -1 means not exist
print(course.find('P'))
print(course.find('o'))
print(course.find('Beginners'))
print(course.replace('Beginners', 'Absolute Beginners'))
print('Python' in course)
print(course.title()) # to capitalize the first letter of every word
| course = "Python's course for Beginners"
print(course.find('p'))
print(course.find('P'))
print(course.find('o'))
print(course.find('Beginners'))
print(course.replace('Beginners', 'Absolute Beginners'))
print('Python' in course)
print(course.title()) |
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
# default load test intervals, in milliseconds
INTERVAL_DEFAULT = 200
# load test speed, txs per second
TXS_PER_SEC_NORMAL = 100
TXS_PER_SEC_SLOW = 10
# broadcast mode
TxCommit = 1
TxSync = 2
TxAsync = 3
| class Bcolors:
header = '\x1b[95m'
okblue = '\x1b[94m'
okgreen = '\x1b[92m'
warning = '\x1b[93m'
fail = '\x1b[91m'
endc = '\x1b[0m'
bold = '\x1b[1m'
underline = '\x1b[4m'
interval_default = 200
txs_per_sec_normal = 100
txs_per_sec_slow = 10
tx_commit = 1
tx_sync = 2
tx_async = 3 |
# -*- coding: utf-8 -*-
# @Time : 2020/1/23 13:38
# @Author : jwh5566
# @Email : jwh5566@aliyun.com
# @File : if_example.py
def check_if():
a = int(input("Enter a number \n"))
if (a == 100):
print("a is equal 100")
else:
print("a is not equal 100")
return a
| def check_if():
a = int(input('Enter a number \n'))
if a == 100:
print('a is equal 100')
else:
print('a is not equal 100')
return a |
amount_of_dancers = int(input())
amount_of_points = float(input())
season = input()
place = input()
money_left = 0
charity = 0
dancers_point_won = amount_of_dancers * amount_of_points
dancers_point_won_aboard = dancers_point_won + (dancers_point_won * 0.50)
money_per_dancer = 0
if place == "Bulgaria":
if season == "summer":
dancers_point_won = dancers_point_won - (dancers_point_won * 0.05)
charity = dancers_point_won * 0.75
money_left = dancers_point_won - charity
elif season == "winter":
dancers_point_won = dancers_point_won - (dancers_point_won * 0.08)
charity = dancers_point_won * 0.75
money_left = dancers_point_won - charity
if place == "Abroad":
if season == "summer":
dancers_point_won_aboard = dancers_point_won_aboard - (dancers_point_won_aboard * 0.10)
charity = dancers_point_won_aboard * 0.75
money_left = dancers_point_won_aboard - charity
elif season == "winter":
dancers_point_won_aboard = dancers_point_won_aboard - (dancers_point_won_aboard * 0.15)
charity = dancers_point_won_aboard * 0.75
money_left = dancers_point_won_aboard - charity
money_per_dancer = money_left / amount_of_dancers
print(f"Charity - {charity:.2f} ")
print(f"Money per dancer - {money_per_dancer:.2f}") | amount_of_dancers = int(input())
amount_of_points = float(input())
season = input()
place = input()
money_left = 0
charity = 0
dancers_point_won = amount_of_dancers * amount_of_points
dancers_point_won_aboard = dancers_point_won + dancers_point_won * 0.5
money_per_dancer = 0
if place == 'Bulgaria':
if season == 'summer':
dancers_point_won = dancers_point_won - dancers_point_won * 0.05
charity = dancers_point_won * 0.75
money_left = dancers_point_won - charity
elif season == 'winter':
dancers_point_won = dancers_point_won - dancers_point_won * 0.08
charity = dancers_point_won * 0.75
money_left = dancers_point_won - charity
if place == 'Abroad':
if season == 'summer':
dancers_point_won_aboard = dancers_point_won_aboard - dancers_point_won_aboard * 0.1
charity = dancers_point_won_aboard * 0.75
money_left = dancers_point_won_aboard - charity
elif season == 'winter':
dancers_point_won_aboard = dancers_point_won_aboard - dancers_point_won_aboard * 0.15
charity = dancers_point_won_aboard * 0.75
money_left = dancers_point_won_aboard - charity
money_per_dancer = money_left / amount_of_dancers
print(f'Charity - {charity:.2f} ')
print(f'Money per dancer - {money_per_dancer:.2f}') |
nome = input("Qual seu nome: ")
idade = int(input("Qual sua idade: "))
altura = float(input("Qual sua altura: "))
peso = float(input("Qual seu peso: "))
op= int(input("Estado civil:\n1.Casado\n2.Solteiro\n"))
if op==1:
op = True
else:
op = False
eu = [nome, idade, altura, peso, op]
for c in eu:
print(c, "\n")
| nome = input('Qual seu nome: ')
idade = int(input('Qual sua idade: '))
altura = float(input('Qual sua altura: '))
peso = float(input('Qual seu peso: '))
op = int(input('Estado civil:\n1.Casado\n2.Solteiro\n'))
if op == 1:
op = True
else:
op = False
eu = [nome, idade, altura, peso, op]
for c in eu:
print(c, '\n') |
#Example:
grocery = 'Milk\nChicken\r\nBread\rButter'
print(grocery.splitlines())
print(grocery.splitlines(True))
grocery = 'Milk Chicken Bread Butter'
print(grocery.splitlines())
| grocery = 'Milk\nChicken\r\nBread\rButter'
print(grocery.splitlines())
print(grocery.splitlines(True))
grocery = 'Milk Chicken Bread Butter'
print(grocery.splitlines()) |
class Document:
# general info about document
class Info:
def __init__(self):
self.author = "unknown"
self.producer = "unknown"
self.subject = "unknown"
self.title = "unknown"
self.table_of_contents = []
def __init__(self, path: str, is_pdf: bool):
self.is_pdf = is_pdf
self.info = Document.Info()
self.path = path
self.ocr_path = path
self.num_pages = None
self.images = []
self.tables = []
self.paragraphs = []
self.extractable = False
self.filename = None
def document_info_to_string(self):
return "Author: " + self.info.author + "\n" \
+ "Producer: " + self.info.producer + "\n" \
+ "Subject: " + self.info.subject + "\n" \
+ "Title: " + self.info.title + "\n" \
+ "Number of Pages: " + str(self.num_pages)
def table_of_contents_to_string(self):
output_string = ""
for tup in self.info.table_of_contents:
output_string += str(tup[0]) + ': ' + tup[1] + '\n'
return output_string
| class Document:
class Info:
def __init__(self):
self.author = 'unknown'
self.producer = 'unknown'
self.subject = 'unknown'
self.title = 'unknown'
self.table_of_contents = []
def __init__(self, path: str, is_pdf: bool):
self.is_pdf = is_pdf
self.info = Document.Info()
self.path = path
self.ocr_path = path
self.num_pages = None
self.images = []
self.tables = []
self.paragraphs = []
self.extractable = False
self.filename = None
def document_info_to_string(self):
return 'Author: ' + self.info.author + '\n' + 'Producer: ' + self.info.producer + '\n' + 'Subject: ' + self.info.subject + '\n' + 'Title: ' + self.info.title + '\n' + 'Number of Pages: ' + str(self.num_pages)
def table_of_contents_to_string(self):
output_string = ''
for tup in self.info.table_of_contents:
output_string += str(tup[0]) + ': ' + tup[1] + '\n'
return output_string |
class Solution:
def removeElement(self, nums: [int], val: int) -> int:
i = 0
j = len(nums)
while i < j:
if nums[i] == val:
nums[i] = nums[j - 1]
j -= 1
else:
i += 1
return i
| class Solution:
def remove_element(self, nums: [int], val: int) -> int:
i = 0
j = len(nums)
while i < j:
if nums[i] == val:
nums[i] = nums[j - 1]
j -= 1
else:
i += 1
return i |
class Solution:
def findItinerary(self, tickets: List[List[str]]) -> List[str]:
def dfs(graph, u, res):
while(len(graph[u])):
dfs(graph, graph[u].pop(), res)
res.append(u)
graph = defaultdict(list)
res = []
for ticket in tickets:
graph[ticket[0]].append(ticket[1])
for k in graph:
graph[k].sort(reverse=True)
u = "JFK"
dfs(graph, u, res)
res.reverse()
return res
| class Solution:
def find_itinerary(self, tickets: List[List[str]]) -> List[str]:
def dfs(graph, u, res):
while len(graph[u]):
dfs(graph, graph[u].pop(), res)
res.append(u)
graph = defaultdict(list)
res = []
for ticket in tickets:
graph[ticket[0]].append(ticket[1])
for k in graph:
graph[k].sort(reverse=True)
u = 'JFK'
dfs(graph, u, res)
res.reverse()
return res |
'''
Description:
X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotated - we cannot choose to leave it alone.
A number is valid if each digit remains a digit after rotation. 0, 1, and 8 rotate to themselves; 2 and 5 rotate to each other; 6 and 9 rotate to each other, and the rest of the numbers do not rotate to any other number and become invalid.
Now given a positive number N, how many numbers X from 1 to N are good?
Example:
Input: 10
Output: 4
Explanation:
There are four good numbers in the range [1, 10] : 2, 5, 6, 9.
Note that 1 and 10 are not good numbers, since they remain unchanged after rotating.
Note:
N will be in range [1, 10000].
'''
class Solution:
def rotatedDigits(self, N: int) -> int:
counter = 0
for i in range(1, N+1):
# convert number i to digit character array
str_num_list = list( str(i) )
# flag for good number judgement
is_good_number = False
for digit in str_num_list:
if digit in {'3','4','7'}:
# invalid number after rotation
is_good_number = False
break
elif digit in {'2','5','6','9'}:
is_good_number = True
if is_good_number:
# update conter for good number
counter += 1
return counter
# n : input value of N
## Time Complexity: O( n log n )
#
# The overhead in time is the outer for loop and inner for loop.
# The outer for loop, iterating on i, takes O( n )
# The inner for loop, iterating on digit, takes O( log n )
# It takes O( n log n ) in total
## Space Complexity: O( log n )
#
# The overhead in space is the storage for buffer, str_num_list, which is of O( log n )
def test_bench():
test_data = [10,20,30,50,100]
# expected output:
'''
4
9
15
16
40
'''
for n in test_data:
print( Solution().rotatedDigits(n) )
return
if __name__ == '__main__':
test_bench() | """
Description:
X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotated - we cannot choose to leave it alone.
A number is valid if each digit remains a digit after rotation. 0, 1, and 8 rotate to themselves; 2 and 5 rotate to each other; 6 and 9 rotate to each other, and the rest of the numbers do not rotate to any other number and become invalid.
Now given a positive number N, how many numbers X from 1 to N are good?
Example:
Input: 10
Output: 4
Explanation:
There are four good numbers in the range [1, 10] : 2, 5, 6, 9.
Note that 1 and 10 are not good numbers, since they remain unchanged after rotating.
Note:
N will be in range [1, 10000].
"""
class Solution:
def rotated_digits(self, N: int) -> int:
counter = 0
for i in range(1, N + 1):
str_num_list = list(str(i))
is_good_number = False
for digit in str_num_list:
if digit in {'3', '4', '7'}:
is_good_number = False
break
elif digit in {'2', '5', '6', '9'}:
is_good_number = True
if is_good_number:
counter += 1
return counter
def test_bench():
test_data = [10, 20, 30, 50, 100]
'\n 4\n 9\n 15\n 16\n 40\n '
for n in test_data:
print(solution().rotatedDigits(n))
return
if __name__ == '__main__':
test_bench() |
# Python - 2.7.6
Test.describe('Basic tests')
Test.assert_equals(logical_calc([True, False], 'AND'), False)
Test.assert_equals(logical_calc([True, False], 'OR'), True)
Test.assert_equals(logical_calc([True, False], 'XOR'), True)
Test.assert_equals(logical_calc([True, True, False], 'AND'), False)
Test.assert_equals(logical_calc([True, True, False], 'OR'), True)
Test.assert_equals(logical_calc([True, True, False], 'XOR'), False)
| Test.describe('Basic tests')
Test.assert_equals(logical_calc([True, False], 'AND'), False)
Test.assert_equals(logical_calc([True, False], 'OR'), True)
Test.assert_equals(logical_calc([True, False], 'XOR'), True)
Test.assert_equals(logical_calc([True, True, False], 'AND'), False)
Test.assert_equals(logical_calc([True, True, False], 'OR'), True)
Test.assert_equals(logical_calc([True, True, False], 'XOR'), False) |
# -*- coding: utf-8 -*-
class INITIALIZE(object):
def __init__(self, ALPHANUMERIC=' ', NUMERIC=0):
self.alphanumeric = ALPHANUMERIC
self.numeric = NUMERIC
def __call__(self, obj):
self.initialize(obj)
def initialize(self, obj):
if isinstance(obj, dict):
for k, v in obj.items():
if isinstance(v, dict):
self.initialize(obj[k])
elif isinstance(v, list):
for l in v:
self.initialize(l)
elif k.startswith('FILLER'):
continue
elif isinstance(v, str):
obj[k] = self.alphanumeric
elif isinstance(v, int):
obj[k] = self.numeric
elif isinstance(v, float):
obj[k] = float(self.numeric)
elif isinstance(obj, list):
for l in obj:
self.initialize(l)
| class Initialize(object):
def __init__(self, ALPHANUMERIC=' ', NUMERIC=0):
self.alphanumeric = ALPHANUMERIC
self.numeric = NUMERIC
def __call__(self, obj):
self.initialize(obj)
def initialize(self, obj):
if isinstance(obj, dict):
for (k, v) in obj.items():
if isinstance(v, dict):
self.initialize(obj[k])
elif isinstance(v, list):
for l in v:
self.initialize(l)
elif k.startswith('FILLER'):
continue
elif isinstance(v, str):
obj[k] = self.alphanumeric
elif isinstance(v, int):
obj[k] = self.numeric
elif isinstance(v, float):
obj[k] = float(self.numeric)
elif isinstance(obj, list):
for l in obj:
self.initialize(l) |
class Config:
SECRET_KEY = 'hard to guess string'
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
MAIL_SERVER = 'smtp.qq.com'
MAIL_PORT = 465
MAIL_USE_TLS = False
MAIL_USE_SSL = True
MAIL_USERNAME = '536700549@qq.com'
MAIL_PASSWORD = 'mystery123.'
FLASKY_MAIL_SUBJECT_PREFIX = '[Flasky]'
FLASKY_MAIL_SENDER = '536700549@qq.com'
FLASKY_ADMIN = '536700549@qq.com'
FLASKY_POSTS_PER_PAGE = 20
FLASKY_FOLLOWERS_PER_PAGE = 50
FLASKY_COMMENTS_PER_PAGE = 30
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_DATABASE_URI = 'mysql://root:root@localhost/finaldev'
class TestingConfig(Config):
TESTING = True
SQLALCHEMY_DATABASE_URI = 'mysql://root:root@localhost/finaltest'
class ProductionConfig(Config):
SQLALCHEMY_DATABASE_URI = 'mysql://root:root@localhost/finalpro'
config = {
'development': DevelopmentConfig,
'testing': TestingConfig,
'production': ProductionConfig,
'default': DevelopmentConfig
} | class Config:
secret_key = 'hard to guess string'
sqlalchemy_commit_on_teardown = True
mail_server = 'smtp.qq.com'
mail_port = 465
mail_use_tls = False
mail_use_ssl = True
mail_username = '536700549@qq.com'
mail_password = 'mystery123.'
flasky_mail_subject_prefix = '[Flasky]'
flasky_mail_sender = '536700549@qq.com'
flasky_admin = '536700549@qq.com'
flasky_posts_per_page = 20
flasky_followers_per_page = 50
flasky_comments_per_page = 30
@staticmethod
def init_app(app):
pass
class Developmentconfig(Config):
debug = True
sqlalchemy_database_uri = 'mysql://root:root@localhost/finaldev'
class Testingconfig(Config):
testing = True
sqlalchemy_database_uri = 'mysql://root:root@localhost/finaltest'
class Productionconfig(Config):
sqlalchemy_database_uri = 'mysql://root:root@localhost/finalpro'
config = {'development': DevelopmentConfig, 'testing': TestingConfig, 'production': ProductionConfig, 'default': DevelopmentConfig} |
n = int(input())
lst = [float('inf') for _ in range(n+1)]
lst[1] = 0
for i in range(1,n):
if 3*i<=n:lst[3*i]=min(lst[3*i],lst[i]+1)
if 2*i<=n:lst[2*i]=min(lst[2*i],lst[i]+1)
lst[i+1]=min(lst[i+1],lst[i]+1)
print(lst[n])
| n = int(input())
lst = [float('inf') for _ in range(n + 1)]
lst[1] = 0
for i in range(1, n):
if 3 * i <= n:
lst[3 * i] = min(lst[3 * i], lst[i] + 1)
if 2 * i <= n:
lst[2 * i] = min(lst[2 * i], lst[i] + 1)
lst[i + 1] = min(lst[i + 1], lst[i] + 1)
print(lst[n]) |
Till=int(input("Enter the upper limit\n"))
From=int(input("Enter the lower limit\n"))
i=1
print("\n")
while(From<=Till):
if((From%4==0)and(From%100!=0))or(From%400==0):
print(From)
From+=1
input()
| till = int(input('Enter the upper limit\n'))
from = int(input('Enter the lower limit\n'))
i = 1
print('\n')
while From <= Till:
if From % 4 == 0 and From % 100 != 0 or From % 400 == 0:
print(From)
from += 1
input() |
class Square:
piece = None
promoting = False
def __init__(self, promoting=False):
self.promoting = promoting
def set_piece(self, piece):
self.piece = piece
def remove_piece(self):
self.piece = None
def get_piece(self):
return self.piece
def is_empty(self):
return self.piece is None
def is_promoting(self):
return self.promoting
def to_string(self):
return self.piece.to_string() if self.piece is not None else ' '
| class Square:
piece = None
promoting = False
def __init__(self, promoting=False):
self.promoting = promoting
def set_piece(self, piece):
self.piece = piece
def remove_piece(self):
self.piece = None
def get_piece(self):
return self.piece
def is_empty(self):
return self.piece is None
def is_promoting(self):
return self.promoting
def to_string(self):
return self.piece.to_string() if self.piece is not None else ' ' |
# -*- coding: utf-8 -*-
# @Time : 2022/2/14 13:50
# @Author : ZhaoXiangPeng
# @File : __init__.py
class Monitor:
def update(self):
pass
| class Monitor:
def update(self):
pass |
print("Welcome to the tip calculator!!")
total_bill = float(input("What was the total bill? "))
percent = int(input("What percentage tip you would like to give: 10%, 12%, or 15%? "))
people = int(input("How many people to split the bill? "))
pay = round((total_bill/people) + ((total_bill*percent)/100)/people,2)
print(f"Each person should pay {pay}")
| print('Welcome to the tip calculator!!')
total_bill = float(input('What was the total bill? '))
percent = int(input('What percentage tip you would like to give: 10%, 12%, or 15%? '))
people = int(input('How many people to split the bill? '))
pay = round(total_bill / people + total_bill * percent / 100 / people, 2)
print(f'Each person should pay {pay}') |
'''
Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:
21 22 23 24 25
20 7 8 9 10
19 6 1 2 11
18 5 4 3 12
17 16 15 14 13
It can be verified that the sum of the numbers on the diagonals is 101.
What is the sum of the numbers on the diagonals in a 1001 by 1001 spiral formed in the same way?
'''
def spiral_diagonal_sum(n):
_sum = 0
for side in range(1, n-1, 2):
step = (side+2) - 1
_sum += sum(range(side**2, (side+2)**2, step))
return _sum + n**2
spiral_diagonal_sum(1001)
| """
Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:
21 22 23 24 25
20 7 8 9 10
19 6 1 2 11
18 5 4 3 12
17 16 15 14 13
It can be verified that the sum of the numbers on the diagonals is 101.
What is the sum of the numbers on the diagonals in a 1001 by 1001 spiral formed in the same way?
"""
def spiral_diagonal_sum(n):
_sum = 0
for side in range(1, n - 1, 2):
step = side + 2 - 1
_sum += sum(range(side ** 2, (side + 2) ** 2, step))
return _sum + n ** 2
spiral_diagonal_sum(1001) |
__version__ = "0.19.2" # NOQA
if __name__ == "__main__":
print(__version__)
| __version__ = '0.19.2'
if __name__ == '__main__':
print(__version__) |
# Copyright 2015 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.
DEPS = [
'depot_tools/bot_update',
'depot_tools/gclient',
'depot_tools/infra_paths',
'infra_checkout',
'recipe_engine/buildbucket',
'recipe_engine/json',
'recipe_engine/path',
'recipe_engine/platform',
'recipe_engine/properties',
'recipe_engine/python',
'recipe_engine/step',
]
def RunSteps(api):
patch_root = 'infra-data-master-manager'
co = api.infra_checkout.checkout(
gclient_config_name='infradata_master_manager',
patch_root=patch_root,
internal=True)
co.gclient_runhooks()
api.python('master manager configuration test',
co.path.join('infra', 'run.py'),
['infra.services.master_manager_launcher',
'--verify',
'--ts-mon-endpoint=none',
'--json-file',
co.path.join(
'infra-data-master-manager',
'desired_master_state.json')])
def GenTests(api):
yield (
api.test('master_manager_config') +
api.buildbucket.ci_build(
project='infra',
builder='infradata_config',
git_repo=(
'https://chrome-internal.googlesource.com/'
'infradata/master-manager')))
yield (
api.test('master_manager_config_patch') +
api.buildbucket.try_build(
project='infra',
builder='infradata_config',
git_repo=(
'https://chrome-internal.googlesource.com/'
'infradata/master-manager')))
| deps = ['depot_tools/bot_update', 'depot_tools/gclient', 'depot_tools/infra_paths', 'infra_checkout', 'recipe_engine/buildbucket', 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine/python', 'recipe_engine/step']
def run_steps(api):
patch_root = 'infra-data-master-manager'
co = api.infra_checkout.checkout(gclient_config_name='infradata_master_manager', patch_root=patch_root, internal=True)
co.gclient_runhooks()
api.python('master manager configuration test', co.path.join('infra', 'run.py'), ['infra.services.master_manager_launcher', '--verify', '--ts-mon-endpoint=none', '--json-file', co.path.join('infra-data-master-manager', 'desired_master_state.json')])
def gen_tests(api):
yield (api.test('master_manager_config') + api.buildbucket.ci_build(project='infra', builder='infradata_config', git_repo='https://chrome-internal.googlesource.com/infradata/master-manager'))
yield (api.test('master_manager_config_patch') + api.buildbucket.try_build(project='infra', builder='infradata_config', git_repo='https://chrome-internal.googlesource.com/infradata/master-manager')) |
input_image = itk.imread('data/BrainProtonDensitySlice.png', itk.ctype('unsigned char'))
isolated_connected = itk.IsolatedConnectedImageFilter.New(input_image)
isolated_connected.SetSeed1([98, 112])
isolated_connected.SetSeed2([98, 136])
isolated_connected.SetUpperValueLimit( 245 )
isolated_connected.FindUpperThresholdOff();
isolated_connected.Update()
view(isolated_connected) | input_image = itk.imread('data/BrainProtonDensitySlice.png', itk.ctype('unsigned char'))
isolated_connected = itk.IsolatedConnectedImageFilter.New(input_image)
isolated_connected.SetSeed1([98, 112])
isolated_connected.SetSeed2([98, 136])
isolated_connected.SetUpperValueLimit(245)
isolated_connected.FindUpperThresholdOff()
isolated_connected.Update()
view(isolated_connected) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.